Add Multi-Agent Impact Analysis Framework for planning phase#40
Conversation
Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
Addresses gaps identified in PRD review against GitHub issue #34: **Planner Enhancements:** - Add consultation status marker (In Progress | Complete | Blocked) - Add inline metrics tracking (Coverage, Issues Discovered, Checkpoints) - Add specialist disagreement handling with conflict documentation - Note about critic escalation to high-level-advisor **Specialist Template Additions:** - Implementer: Breaking Changes section - DevOps: Developer Experience Impact section - Security: Blast Radius Assessment and Dependency Security sections - Architect: Domain Model Alignment and Abstraction Consistency sections - QA: Automation Strategy section - All specialists: Issues Discovered tracking table **Critic Agent Updates:** - Impact Analysis Validation checklist - Disagreement Detection & Escalation protocol - Conflict Categories table for systematic assessment - high-level-advisor added to Handoff Options **Orchestrator Enhancements:** - Impact Analysis Orchestration section with trigger conditions - Orchestration flow for parallel specialist consultations - Handling failed consultations and timeout strategy - Escalation path table for disagreement resolution **Infrastructure:** - Fix 38 markdown fence errors across all agent files - Create impact analysis framework review critique Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR implements a Multi-Agent Impact Analysis Framework that enables comprehensive planning by orchestrating specialist agent consultations before implementation. The framework addresses the problem of missing cross-domain impact considerations during planning, which leads to late discovery of security, operations, quality, and architecture issues.
Key Changes:
- Added impact analysis orchestration to planner agent with 5 trigger conditions and 3-phase consultation protocol
- Enhanced 5 specialist agents (implementer, architect, security, devops, qa) with dedicated Impact Analysis Mode sections and domain-specific templates
- Updated orchestrator with impact analysis routing patterns and escalation protocols
- Updated critic with validation checklists for impact analysis completeness and specialist disagreement detection
- Created comprehensive documentation (IMPACT-ANALYSIS-FRAMEWORK.md) and complete example walkthrough (IMPACT-ANALYSIS-EXAMPLE.md)
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.agents/planning/IMPACT-ANALYSIS-FRAMEWORK.md |
New: Core framework documentation explaining process, benefits, and when to use |
.agents/planning/IMPACT-ANALYSIS-EXAMPLE.md |
New: Complete OAuth 2.0 example demonstrating all 5 specialist consultations |
.agents/critique/impact-analysis-framework-review.md |
New: Self-critique identifying partial implementations and gaps |
claude/planner.md |
Added 247-line Multi-Agent Impact Analysis Framework section with templates |
claude/orchestrator.md |
Added impact analysis orchestration flow with trigger conditions and escalation paths |
claude/critic.md |
Added impact analysis validation checklist and disagreement detection protocol |
claude/implementer.md |
Added Impact Analysis Mode with code impact template including breaking changes |
claude/architect.md |
Added Impact Analysis Mode with architecture impact template including domain model alignment |
claude/security.md |
Added Impact Analysis Mode with security impact template including blast radius |
claude/devops.md |
Added Impact Analysis Mode with DevOps impact template including developer experience |
claude/qa.md |
Added Impact Analysis Mode with QA impact template including automation strategy |
vs-code-agents/*.agent.md |
Synchronized impact analysis additions with critical markdown fence bugs |
copilot-cli/*.agent.md |
Synchronized impact analysis additions with critical markdown fence bugs |
README.md |
Added reference to impact analysis example documentation |
CLAUDE.md |
Added Impact Analysis Framework section with workflow examples |
Critical Issue: The vs-code-agents/ and copilot-cli/ directories contain systematic markdown fence nesting errors throughout all modified files where ``` is immediately followed by ```text, creating malformed nested fences that will break markdown rendering. The claude/ directory uses the correct format and should be the reference for fixing these issues.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…chestrator Enhances orchestrator with formal task classification and domain identification to properly select agent sequences: **Phase 0.5: Task Classification & Domain Identification (MANDATORY)** Step 1: Classify Task Type - 9 task types with definitions and signal words/patterns - Feature, Bug Fix, Refactoring, Infrastructure, Security, Documentation, Research, Strategic, Ideation - Classification output template with confidence and reasoning Step 2: Identify Affected Domains - 8 domains: Code, Architecture, Security, Operations, Quality, Data, API, UX - Domain identification checklist - Domain output template with primary/secondary domains and count Step 3: Determine Complexity - Maps task type + domain count to complexity level - Single domain = Simple, 2 domains = Standard, 3+ = Complex - Security/Strategic/Ideation always Complex Step 4: Select Agent Sequence - Classification Summary Template for documenting decisions **Disagree and Commit Protocol** Replaces timeout strategy with principled disagreement handling: - Phase 1: Decision (dissent encouraged) - Phase 2: Resolution (critic or high-level-advisor decides) - Phase 3: Commitment (alignment required) - Commitment language template - Failure modes to avoid Applied to all three orchestrator files (claude, copilot-cli, vs-code-agents). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive documentation for the enhanced orchestrator workflow: - Task Classification Framework: 9 task types with definitions and signal words - Domain Identification Framework: 8 domains with scope descriptions - Complexity Determination: mapping domain count to complexity level - Impact Analysis Framework: when to use and consultation process - Disagree and Commit Protocol: three-phase conflict resolution Also: - Fix duplicate heading names (MD024) for platform-specific sections - Update workflow patterns with impact analysis variant - Add Ideation Pipeline workflow - Update agent descriptions with new capabilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove spurious fence pairs that created nested/malformed markdown structures. The pattern of closing a fence with ``` then immediately opening another ```text fence breaks markdown rendering. Fixes: - vs-code-agents/planner.agent.md: Multiple fence structure issues throughout the file (Memory Protocol, Planning Process phases, Impact Analysis Framework sections). Changed bold Phase headers to proper #### headings per MD036. - vs-code-agents/task-generator.agent.md: Multiple fence structure issues in Memory Protocol, Decomposition Process, and template sections. Addresses PR #40 review comments from @Copilot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Multi-Agent Impact Analysis Framework Implementation ✅
All Phases Complete
Phase 1: Core Framework Design
Phase 2: Update Planner Agent Instructions
claude/planner.mdcopilot-cli/planner.agent.mdvs-code-agents/planner.agent.mdPhase 3: Create Impact Analysis Templates
Phase 4: Update Specialist Agent Instructions
Phase 5: Documentation and Examples
Phase 6: Testing and Validation
Recent Fix
Fixed malformed markdown code fence structures identified in code review:
All 14 agent files updated with correct markdown formatting.
Original prompt
This section details on the original issue you should resolve
<issue_title>PRD: Multi-Agent Impact Analysis Framework for Planning Phase</issue_title>
<issue_description>## Product Requirements Document
Background
Currently, agent instructions in downstream projects (e.g., Qwiq) only document build configuration impact analysis. However, comprehensive change planning requires impact analysis across multiple dimensions: code structure, architecture, quality, security, and operations.
Reference: Qwiq PR rjmurillo/ai-agents#136 Discussion
Problem Statement
When planning changes, agents lack a structured framework for:
This leads to:
Proposed Solution
Add a Multi-Agent Impact Analysis Framework to the ai-agents system that enables the
planneragent to orchestrate specialized agent consultations during the planning phase.Core Capabilities
1. Agent Consultation Protocol
When
planneragent creates a plan, it should:2. Specialist Agent Roles
implementer- Are there reusable patterns?
- What's the implementation complexity?
- Are there breaking changes?
architect- Are abstractions consistent?
- Should an ADR be created?
- What are the long-term implications?
qa- What edge cases exist?
- How do we verify correctness?
- What regression risks exist?
security- What's the threat model?
- Are there dependency vulnerabilities?
- What's the blast radius?
devops- What's the developer experience impact?
- Are there deployment considerations?
- Do validation scripts need updates?
3. Consultation Workflow
4. Impact Analysis Template
Each consultation should produce:
User Stories
Story 1: Planner Orchestrates Multi-Agent Consultation
As a
planneragentI want to automatically identify and consult specialist agents
So that proposed changes are reviewed across all affected domains
Acceptance Criteria:
Story 2: Implementer Provides Code Impact Analysis
As an
implementeragentI want to analyze code-level impacts of proposed changes
So that architectural patterns, maintainability, and breaking changes are identified early
Acceptance Criteria:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Introduces a cross-platform Multi‑Agent Impact Analysis framework, updating planner/orchestrator/critic and specialist agents with workflows and templates, plus docs updates and removal of obsolete planning files.
planneracross Claude, Copilot CLI, and VS Code.high-level-advisor.implementer,architect,security,devops,qa(files inclaude/,copilot-cli/,vs-code-agents/).CLAUDE.md,USING-AGENTS.md,README.mdwith framework overview, examples, and usage..agents/planning/and.agents/critique/(Phase 1/2 plans, PRD explainer, summary).Written by Cursor Bugbot for commit da7efad. This will update automatically on new commits. Configure here.