Skip to content

feat: establish ROOT delegation model, optimize model selection, enhance agent workflows#46

Merged
rjmurillo merged 42 commits into
mainfrom
feat/agent-updates
Dec 16, 2025
Merged

feat: establish ROOT delegation model, optimize model selection, enhance agent workflows#46
rjmurillo merged 42 commits into
mainfrom
feat/agent-updates

Conversation

@rjmurillo

@rjmurillo rjmurillo commented Dec 16, 2025

Copy link
Copy Markdown
Owner

Agent System Architecture Overhaul

Summary

This PR introduces significant architectural changes to the multi-agent system, establishing a strict one-level delegation model, optimizing model selection for cost efficiency, and enhancing several agent workflows with comprehensive phase-based execution patterns.

Key Impact: 77 files changed, ~6,500 insertions, ~2,100 deletions across all platforms (Claude, VS Code, Copilot CLI)


Breaking Changes

ROOT Agent Delegation Model

Establishes orchestrator as the ROOT agent with strict one-level delegation:

  • Subagents can NO LONGER delegate to other subagents
  • All delegation flows through orchestrator: Orchestrator -> Subagent -> Back to Orchestrator
  • Impact analysis now orchestrator-managed (planner creates plan, orchestrator executes consultations)
  • Updated handoff protocols across all 18 agents to reflect this constraint

Rationale: Prevents infinite nesting while maintaining clear orchestrator-worker separation. Orchestrator is responsible for all coordination, handoffs, and routing decisions.


Major Enhancements

1. Agent Model Selection Optimization (ADR-002)

Optimized model selection for cost and latency based on structured evaluation criteria:

Criteria Weight Description
Reasoning Depth High Complex analysis vs execution
Latency Sensitivity Medium User-facing vs background
Error Cost High Production impact
Volume Medium Invocation frequency
Tool Complexity Low MCP tool requirements

Model Assignments:

  • Opus (retained): architect, high-level-advisor, implementer, independent-thinker, orchestrator, roadmap, security
  • Sonnet (downgraded): analyst, critic, devops, explainer, planner, pr-comment-responder, qa, retrospective, task-generator

Expected Impact: 40-50% cost reduction on agent invocations

2. Enhanced Agent Workflows

PR Comment Responder - 8-Phase Workflow

  • Phase 0: Initial triage and classification
  • Phase 1: Context gathering
  • Phase 2: Analysis and understanding
  • Phase 3: Solution design
  • Phase 4: Implementation planning
  • Phase 5: Execution
  • Phase 6: Validation
  • Phase 7: Documentation and handoff

Retrospective Agent - 6-Phase Workflow

  • Phase 0: Session context retrieval
  • Phase 1: Data gathering (commits, files, decisions)
  • Phase 2: Pattern analysis
  • Phase 3: Insight synthesis
  • Phase 4: Memory persistence
  • Phase 5: Skill extraction

Orchestrator - PR Comment Routing

  • Added canonical workflow paths (Quick Fix, Standard, Strategic)
  • Decision tree for PR comment classification
  • Integration with pr-comment-responder agent

3. Architect Enhancements

  • MADR 4.0 template integration for ADRs
  • Definition of Ready/Done checklists
  • Anti-patterns table for common mistakes

Standardization & Fixes

UX Improvements

  • argument-hint: Added UX affordance to all agents showing available subagent types
  • Serena tools: Added 'serena/*' tool access to various agents for enhanced functionality

Path Standardization

  • Impact analysis files: impact-analysis-[feature]-[domain].md -> impact-analysis-[domain]-[feature].md
  • Updated all references in documentation and templates

Build Fixes

  • Fixed YAML frontmatter parsing to support hyphenated keys (e.g., model-id)

Documentation

  • Updated CLAUDE.md with one-level delegation model
  • Updated USING-AGENTS.md with new patterns
  • Added ADR-002 documenting model selection rationale

Platform Synchronization

All 36 platform agents regenerated from shared templates:

  • VS Code: 18 agents updated with handoff protocols
  • Copilot CLI: 18 agents updated with handoff protocols
  • Drift detection: 18 OK, 0 drift

Commits by Theme

Architecture (Breaking)

  • feat(orchestrator): establish ROOT agent with one-level delegation architecture
  • refactor(agents): update *-agents handoff protocols (4 commits)
  • docs(claude): update documentation for one-level delegation model

Cost Optimization

  • refactor: optimize agent model selection for cost and latency
  • docs: add ADR-002 agent model selection optimization

Enhanced Workflows

  • feat(orchestrator): add PR comment routing and workflow paths
  • feat(pr-comment-responder): add comprehensive 8-phase workflow
  • feat(retrospective): add comprehensive 6-phase workflow with structured activities
  • feat(architect): enhance ADR section with MADR 4.0 template

UX & Tooling

  • feat(agents): add argument-hint UX affordance to all agents
  • feat: add 'serena/*' tool to various agents and templates

Standardization

  • fix(claude): standardize impact analysis file path pattern
  • feat(claude): add robust descriptions to remaining agents
  • fix(build): support hyphenated keys in YAML frontmatter parsing

Platform Sync (Chore)

  • refactor(templates): add handoff protocols to agent templates
  • chore(agents): regenerate platform agents (multiple commits)

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Testing

Validation Performed

  • Drift detection: 18 OK, 0 drift, 1 no counterpart (CLAUDE.md - expected)
  • Markdown linting passed on all files
  • Regenerated platform agents verified
  • Build script YAML parsing tested with hyphenated keys

Review Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated
  • No new warnings introduced
  • ADR documented for model selection decision

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

rjmurillo and others added 13 commits December 16, 2025 01:03
Add canonical workflow paths and PR comment routing to orchestrator:

- Add Workflow Paths (Canonical Reference) table with Quick Fix, Standard, Strategic paths
- Add PR Comment Routing section with decision tree
- Add PR Comment entries to Agent Sequences by Task Type (quick fix, standard, strategic)
- Add PR review comment to Quick Classification table
- Add PR comment triage to Routing Heuristics
- Add .agents/pr-comments/ to Output Directory

Regenerated VS Code and Copilot CLI agent files from updated template.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update template with full workflow protocol (Context Gathering, Comment Map,
  Analysis, Task List, Immediate Replies, Implementation, PR Update, Verification)
- Add pagination support for comment retrieval
- Add Comment Map template saved to .agents/pr-comments/PR-[number]/
- Simplify Core Identity to thin coordination layer
- Streamline Memory Protocol
- Add Anti-Patterns to Avoid section
- Fix nested markdown code blocks to use 4-backtick fences

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ed activities

- Add Retrospective Flow diagram showing all 6 phases (0-5)
- Phase 0: Data Gathering with 4-Step Debrief, Execution Trace, Outcome Classification
- Phase 1: Generate Insights with Five Whys, Fishbone, Force Field, Patterns, Learning Matrix
- Phase 2: Diagnosis with priority order and template
- Phase 3: Decide What to Do with Action Classification, SMART Validation, Dependency Ordering
- Phase 4: Learning Extraction with atomicity scoring and templates
- Phase 5: Close the Retrospective with +/Delta, ROTI, Helped/Hindered/Hypothesis
- Add Memory Storage section delegating to memory agent
- Update description to match Claude conventions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive 'When to Create an ADR' criteria
- Add Definition of Ready (START) checklist
- Add Definition of Done (ecADR) checklist
- Upgrade ADR template to MADR 4.0 format with frontmatter
- Add ADR anti-patterns to avoid table
- Add ADR review checklist
- Standardize file naming to architecture-impact-analysis-[feature].md
- Update output location to ADR-NNNN and DESIGN-REVIEW naming
- Synchronize MADR 4.0 ADR template from Claude agent
- Add START (Definition of Ready) and ecADR (Definition of Done) sections
- Add ADR anti-patterns and review checklist
- Update file naming conventions for consistency
- Update Memory Protocol language for clarity
Regenerated using Generate-Agents.ps1 after template sync:
- VS Code architect.agent.md
- Copilot CLI architect.agent.md

Drift detection: architect agent at 100% similarity
Update agent descriptions with action-oriented, scoped, trigger-aware
patterns for all agents in the Claude folder.

Changes include:
- explainer: document type specification, lifecycle guidance
- high-level-advisor: strategic advisory triggers
- implementer: code/test execution conditions
- independent-thinker: contrarian analysis triggers
- memory: cross-session context operations
- orchestrator: coordination routing conditions
- planner: work package planning triggers
- pr-comment-responder: PR feedback handling
- qa: test strategy and verification triggers
- retrospective: full structured framework sync (Phases 0-5)
- roadmap: strategic outcome focus
- security: vulnerability assessment triggers
- skillbook: atomic skill management
- task-generator: epic decomposition triggers
Update all shared template descriptions to match Claude source agents.
This ensures consistent descriptions across all generated platforms.

Pattern applied: [Role/Expertise] + [Primary Actions] + [Trigger Conditions]

All 18 templates updated:
- analyst, architect, critic, devops
- explainer, high-level-advisor, implementer, independent-thinker
- memory, orchestrator, planner, pr-comment-responder
- qa, retrospective, roadmap, security, skillbook, task-generator
Regenerate VS Code and Copilot CLI agents using Generate-Agents.ps1.
All 36 agent files updated with new robust descriptions.

Drift detection verified:
- 18 agents compared
- All pass 80% similarity threshold
- 0 drift detected
Changed from impact-analysis-[feature]-[domain].md to
impact-analysis-[domain]-[feature].md for consistency across agents.

Affected agents: architect, security, qa, implementer, devops, planner
…is paths

Aligned with Claude source file path pattern change:
impact-analysis-[domain]-[feature].md
VS Code and Copilot CLI agents regenerated from updated shared templates.
Standardized file naming pattern across CLAUDE.md and USING-AGENTS.md.
Copilot AI review requested due to automatic review settings December 16, 2025 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR comprehensively enhances the agent system with improved workflows, standardized descriptions, and consistent file naming patterns across all three platforms (Claude, VS Code, Copilot CLI). The changes focus on making agents more discoverable and usable through detailed descriptions with explicit use cases and triggers.

Key Changes:

  • Enhanced 4 major agents with comprehensive structured workflows (orchestrator, pr-comment-responder, retrospective, architect)
  • Added robust 2-3 sentence descriptions to all 18 agents explaining what they do, key capabilities, and when to use them
  • Standardized impact analysis file naming from impact-analysis-[feature]-[domain].md to impact-analysis-[domain]-[feature].md for alphabetical sorting

Reviewed changes

Copilot reviewed 74 out of 74 changed files in this pull request and generated no comments.

Show a summary per file
File Description
templates/agents/*.shared.md (18 files) Enhanced descriptions with use cases; standardized impact analysis paths
src/vs-code-agents/*.agent.md (18 files) Regenerated from templates with enhanced descriptions and paths
src/copilot-cli/*.agent.md (18 files) Regenerated from templates with enhanced descriptions and paths
src/claude/*.md (18 files) Enhanced descriptions matching shared templates
templates/agents/retrospective.shared.md Added comprehensive 6-phase workflow with 10+ structured retrospective activities
templates/agents/pr-comment-responder.shared.md Added 8-phase workflow for PR comment handling with detailed delegation patterns
templates/agents/orchestrator.shared.md Added PR comment routing section with canonical workflow path definitions
templates/agents/architect.shared.md Enhanced with MADR 4.0 ADR template, START/ecADR checklists, anti-patterns table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Update regex to use [\w-]+ for key matching to support keys like
  'argument-hint'
- Add 'argument-hint' to field order in Format-FrontmatterYaml
- Enables new UX affordance field for agent prompting hints
Add argument-hint field to YAML frontmatter for all 18 agent definitions
providing inline prompting guidance for users:

- analyst: Describe the topic, issue, or feature to research
- architect: Describe the design decision or architecture concern
- critic: Describe the plan or document to review critically
- devops: Describe the CI/CD, infrastructure, or deployment task
- explainer: Describe the feature or concept to document
- high-level-advisor: Describe your strategic question or decision
- implementer: Describe the code changes or feature to implement
- independent-thinker: Describe the decision or assumption to challenge
- memory: Describe what to store, retrieve, or manage in memory
- orchestrator: Describe your task or goal for end-to-end orchestration
- planner: Describe the epic or feature to break into work packages
- pr-comment-responder: Provide the PR comment or review to address
- qa: Describe the feature or changes to verify and test
- retrospective: Describe the completed work to analyze for learnings
- roadmap: Describe the product vision or strategic question
- security: Describe the security concern or code to audit
- skillbook: Describe the skill or pattern to document
- task-generator: Describe the PRD or milestone to decompose into tasks

This UX affordance helps users understand how to prompt each agent
effectively from IDE integrations and CLI tools.
Auto-generated by Generate-Agents.ps1 from updated shared templates.

VS Code agents: argument-hint appears in frontmatter for IDE integration
Copilot CLI agents: argument-hint included for consistency (not used by CLI)
@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Orchestrator becomes the ROOT coordinator: planner produces an impact plan, orchestrator invokes specialists one‑at‑a‑time (orchestrator-managed sequential/parallel), specialists return results to orchestrator, outputs renamed to domain-first impact-analysis files, memory calls standardized to cloudmcp-manager, and subagents are forbidden from delegating.

Changes

Cohort / File(s) Change Summary
Core docs
CLAUDE.md, USING-AGENTS.md, docs/ideation-workflow.md
Rewrote workflows to an orchestrator-as-ROOT model, clarified sequential/parallel routing, enforced subagent non-delegation, and standardized impact-analysis filename ordering.
Build tooling
build/Generate-Agents.Common.psm1
Relaxed frontmatter key regex to accept hyphenated keys and changed YAML output order to include argument-hint after description.
Claude agents
src/claude/*.md (e.g. analyst.md, orchestrator.md, planner.md, implementer.md, architect.md, critic.md, devops.md, qa.md, security.md, explainer.md, task-generator.md, retrospective.md, skillbook.md, memory.md, pr-comment-responder.md, high-level-advisor.md, independent-thinker.md)
Large documentation updates: expanded descriptions, added argument-hint, model changes, memory protocol → cloudmcp-manager, added Handoff Protocol (subagent cannot delegate), updated impact-analysis file paths, orchestrator-centric flows, PR-comment and retrospective expansions.
Copilot CLI agents
src/copilot-cli/*.agent.md
Platform-parallel updates mirroring Claude agents: metadata expansions, argument-hint, serena/* tool additions, memory tooling changes, impact-analysis naming, and orchestrator routing/hand-off enforcement.
VS Code agents
src/vs-code-agents/*.agent.md
Same platform-parallel updates as Copilot CLI: metadata changes, argument-hint, serena/*, ADR additions for architect, PR-comment/responder expansions, and orchestrator routing semantics.
Shared templates
templates/agents/*.shared.md
Template updates to match agents: add argument-hint, serena/* tools, standardized impact-analysis file naming, Handoff Protocol guidance, and cloudmcp-manager memory examples.
ADR & PR artifacts
.agents/architecture/ADR-002-agent-model-selection-optimization.md, .agents/pr-comments/*
Added ADR documenting model reassignment and scoring; added PR comment artifacts (.agents/pr-comments/) with PR-46 analysis, context, and review comment summaries.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User
participant Orchestrator
participant Planner
participant Specialist as "Specialist (arch/devops/sec/impl/qa)"
participant Critic
User->>Orchestrator: Request impact analysis / feature work
Orchestrator->>Planner: Request impact-analysis plan
Planner-->>Orchestrator: Return plan (plan fragments)
loop For each specialist (sequential or parallel per orchestrator)
Orchestrator->>Specialist: runSubAgent(plan fragment)
Specialist-->>Orchestrator: Return impact-analysis-[domain]-[feature].md
end
Orchestrator->>Critic: Request validation / verdict
Critic-->>Orchestrator: Verdict & recommendations
Orchestrator->>User: Deliver consolidated artifacts and routing

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Files/areas requiring extra attention:

  • src/*/orchestrator*.md and templates/agents/orchestrator.shared.md: verify mandatory runSubagent syntax, allowed/forbidden actions, and conflict-resolution semantics.
  • src/*/pr-comment-responder*.md and .agents/pr-comments/: confirm comment-map formats, pagination/deduplication logic, and artifact save paths.
  • src/*/retrospective*.md and related templates: validate phase templates, memory payloads, and skillbook persistence formats.
  • src/*/architect*.md and ADR files: check ADR naming (ADR-NNNN-...) consistency and DESIGN-REVIEW artifact conventions.
  • build/Generate-Agents.Common.psm1: confirm the frontmatter regex and YAML field ordering handle existing files and hyphenated keys safely.

Possibly related issues

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commit format (feat:) and describes the main change—comprehensive agent system enhancements. Accurately reflects the core objective of the PR.
Description check ✅ Passed Description is detailed and directly related to the changeset. Covers summary, major enhancements, standardization, platform sync, testing, and validation performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adda6d1 and b536c57.

📒 Files selected for processing (72)
  • .agents/pr-comments/PR-46-analysis.md (1 hunks)
  • .agents/pr-comments/PR-46-context.md (1 hunks)
  • .agents/pr-comments/PR-46-review-comments.md (1 hunks)
  • src/claude/analyst.md (3 hunks)
  • src/claude/architect.md (6 hunks)
  • src/claude/critic.md (4 hunks)
  • src/claude/devops.md (4 hunks)
  • src/claude/explainer.md (2 hunks)
  • src/claude/high-level-advisor.md (3 hunks)
  • src/claude/implementer.md (4 hunks)
  • src/claude/independent-thinker.md (3 hunks)
  • src/claude/memory.md (2 hunks)
  • src/claude/orchestrator.md (14 hunks)
  • src/claude/planner.md (4 hunks)
  • src/claude/pr-comment-responder.md (2 hunks)
  • src/claude/qa.md (4 hunks)
  • src/claude/retrospective.md (8 hunks)
  • src/claude/roadmap.md (3 hunks)
  • src/claude/security.md (4 hunks)
  • src/claude/skillbook.md (3 hunks)
  • src/claude/task-generator.md (2 hunks)
  • src/copilot-cli/analyst.agent.md (2 hunks)
  • src/copilot-cli/architect.agent.md (5 hunks)
  • src/copilot-cli/critic.agent.md (2 hunks)
  • src/copilot-cli/devops.agent.md (4 hunks)
  • src/copilot-cli/explainer.agent.md (2 hunks)
  • src/copilot-cli/high-level-advisor.agent.md (3 hunks)
  • src/copilot-cli/implementer.agent.md (3 hunks)
  • src/copilot-cli/independent-thinker.agent.md (3 hunks)
  • src/copilot-cli/memory.agent.md (2 hunks)
  • src/copilot-cli/orchestrator.agent.md (11 hunks)
  • src/copilot-cli/planner.agent.md (3 hunks)
  • src/copilot-cli/pr-comment-responder.agent.md (2 hunks)
  • src/copilot-cli/qa.agent.md (4 hunks)
  • src/copilot-cli/retrospective.agent.md (1 hunks)
  • src/copilot-cli/roadmap.agent.md (3 hunks)
  • src/copilot-cli/security.agent.md (4 hunks)
  • src/copilot-cli/task-generator.agent.md (3 hunks)
  • src/vs-code-agents/analyst.agent.md (2 hunks)
  • src/vs-code-agents/architect.agent.md (5 hunks)
  • src/vs-code-agents/critic.agent.md (2 hunks)
  • src/vs-code-agents/devops.agent.md (4 hunks)
  • src/vs-code-agents/explainer.agent.md (2 hunks)
  • src/vs-code-agents/high-level-advisor.agent.md (3 hunks)
  • src/vs-code-agents/implementer.agent.md (3 hunks)
  • src/vs-code-agents/independent-thinker.agent.md (3 hunks)
  • src/vs-code-agents/memory.agent.md (2 hunks)
  • src/vs-code-agents/orchestrator.agent.md (12 hunks)
  • src/vs-code-agents/planner.agent.md (3 hunks)
  • src/vs-code-agents/pr-comment-responder.agent.md (2 hunks)
  • src/vs-code-agents/qa.agent.md (4 hunks)
  • src/vs-code-agents/retrospective.agent.md (1 hunks)
  • src/vs-code-agents/roadmap.agent.md (3 hunks)
  • src/vs-code-agents/security.agent.md (4 hunks)
  • src/vs-code-agents/task-generator.agent.md (3 hunks)
  • templates/agents/analyst.shared.md (2 hunks)
  • templates/agents/architect.shared.md (5 hunks)
  • templates/agents/critic.shared.md (2 hunks)
  • templates/agents/devops.shared.md (4 hunks)
  • templates/agents/explainer.shared.md (2 hunks)
  • templates/agents/high-level-advisor.shared.md (3 hunks)
  • templates/agents/implementer.shared.md (3 hunks)
  • templates/agents/independent-thinker.shared.md (3 hunks)
  • templates/agents/memory.shared.md (2 hunks)
  • templates/agents/orchestrator.shared.md (11 hunks)
  • templates/agents/planner.shared.md (3 hunks)
  • templates/agents/pr-comment-responder.shared.md (2 hunks)
  • templates/agents/qa.shared.md (4 hunks)
  • templates/agents/retrospective.shared.md (1 hunks)
  • templates/agents/roadmap.shared.md (3 hunks)
  • templates/agents/security.shared.md (4 hunks)
  • templates/agents/task-generator.shared.md (3 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Reorganizes agent metadata and deliverable filename conventions across Claude, Copilot CLI, and VS Code platforms. Renames impact-analysis output files from [feature]-[domain] to [domain]-[feature] order. Adds argument-hint frontmatter field to all agents. Expands agent descriptions and responsibilities. Updates PowerShell build module to allow hyphenated YAML keys and reorder frontmatter fields. Substantially redesigns architect, orchestrator, pr-comment-responder, and retrospective agent documentation with new frameworks and multi-phase workflows.

Changes

Cohort / File(s) Summary
Build Module
build/Generate-Agents.Common.psm1
Updated YAML frontmatter parsing regex to allow hyphenated keys (e.g., argument-hint). Reordered frontmatter field output to insert argument-hint after description.
Documentation
CLAUDE.md, USING-AGENTS.md
Updated documentation to reflect new impact-analysis filename pattern: impact-analysis-[domain]-[feature].md.
Claude Agent Files
src/claude/analyst.md, src/claude/architect.md, src/claude/critic.md, src/claude/devops.md, src/claude/explainer.md, src/claude/high-level-advisor.md, src/claude/implementer.md, src/claude/independent-thinker.md, src/claude/memory.md, src/claude/orchestrator.md, src/claude/planner.md, src/claude/pr-comment-responder.md, src/claude/qa.md, src/claude/retrospective.md, src/claude/roadmap.md, src/claude/security.md, src/claude/skillbook.md, src/claude/task-generator.md
Added argument-hint frontmatter field across all agents. Expanded agent descriptions with usage guidance and scope clarification. Updated impact-analysis filename patterns. Architect: redesigned ADR framework (definitions, START/DONE criteria, MADR 4.0 template, anti-patterns, review checklists). Orchestrator: added canonical workflow paths (Quick Fix, Standard, Strategic), PR comment routing with decision tree, impact analysis orchestration rules. PR Comment Responder: expanded from triage specialist to coordinator role with 6+ phases (context gathering, comment mapping, analysis, task generation, immediate replies, implementation). Retrospective: introduced 6-phase workflow (data gathering through close) with diagnostic templates, action classification, learning extraction, and memory protocols.
Copilot CLI Agent Files
src/copilot-cli/analyst.agent.md, src/copilot-cli/architect.agent.md, src/copilot-cli/critic.agent.md, src/copilot-cli/devops.agent.md, src/copilot-cli/explainer.agent.md, src/copilot-cli/high-level-advisor.agent.md, src/copilot-cli/implementer.agent.md, src/copilot-cli/independent-thinker.agent.md, src/copilot-cli/memory.agent.md, src/copilot-cli/orchestrator.agent.md, src/copilot-cli/planner.agent.md, src/copilot-cli/pr-comment-responder.agent.md, src/copilot-cli/qa.agent.md, src/copilot-cli/retrospective.agent.md, src/copilot-cli/roadmap.agent.md, src/copilot-cli/security.agent.md, src/copilot-cli/skillbook.agent.md, src/copilot-cli/task-generator.agent.md
Same pattern as Claude agents: added argument-hint field, expanded descriptions, updated impact-analysis paths. Architect, orchestrator, pr-comment-responder, retrospective agents receive same substantial content redesigns as Claude versions.
VS Code Agent Files
src/vs-code-agents/analyst.agent.md, src/vs-code-agents/architect.agent.md, src/vs-code-agents/critic.agent.md, src/vs-code-agents/devops.agent.md, src/vs-code-agents/explainer.agent.md, src/vs-code-agents/high-level-advisor.agent.md, src/vs-code-agents/implementer.agent.md, src/vs-code-agents/independent-thinker.agent.md, src/vs-code-agents/memory.agent.md, src/vs-code-agents/orchestrator.agent.md, src/vs-code-agents/planner.agent.md, src/vs-code-agents/pr-comment-responder.agent.md, src/vs-code-agents/qa.agent.md, src/vs-code-agents/retrospective.agent.md, src/vs-code-agents/roadmap.agent.md, src/vs-code-agents/security.agent.md, src/vs-code-agents/skillbook.agent.md, src/vs-code-agents/task-generator.agent.md
Same pattern as other platforms: added argument-hint, expanded descriptions, updated impact-analysis paths. Added model field specifying Claude Opus 4.5. Architect, orchestrator, pr-comment-responder, retrospective receive same substantial redesigns.
Shared Template Files
templates/agents/analyst.shared.md, templates/agents/architect.shared.md, templates/agents/critic.shared.md, templates/agents/devops.shared.md, templates/agents/explainer.shared.md, templates/agents/high-level-advisor.shared.md, templates/agents/implementer.shared.md, templates/agents/independent-thinker.shared.md, templates/agents/memory.shared.md, templates/agents/orchestrator.shared.md, templates/agents/planner.shared.md, templates/agents/pr-comment-responder.shared.md, templates/agents/qa.shared.md, templates/agents/retrospective.shared.md, templates/agents/roadmap.shared.md, templates/agents/security.shared.md, templates/agents/skillbook.shared.md, templates/agents/task-generator.shared.md
Updated shared templates with expanded descriptions, argument-hint fields, and impact-analysis path updates. Added tools_vscode and tools_copilot arrays. Architect, orchestrator, pr-comment-responder, retrospective templates extensively redesigned with new frameworks and phases.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Areas requiring extra attention:

  • build/Generate-Agents.Common.psm1: Verify the regex change for hyphenated keys (^([\w-]+):\s*(.*)$) doesn't break existing key parsing. Confirm frontmatter field reordering doesn't break downstream dependencies.
  • Impact-analysis filename pattern consistency: Spot-check a sample of each platform (Claude, Copilot, VS Code) to ensure impact-analysis-[domain]-[feature].md pattern is applied uniformly across all impact analysis references. Verify planner, architect, implementer, devops, qa, security agents all use consistent ordering.
  • Architect ADR redesign (src/claude/architect.md and equivalents): Review new ADR framework comprehensiveness, template correctness, and alignment with MADR 4.0. Ensure ADR-NNNN naming convention and DESIGN-REVIEW artifact paths don't conflict with existing systems.
  • Orchestrator routing logic (src/claude/orchestrator.md and equivalents): Validate PR comment routing decision tree logic, new canonical paths (Quick Fix/Standard/Strategic), and multi-domain impact analysis trigger conditions (3+ domains). Ensure routing doesn't create ambiguity.
  • PR Comment Responder phase expansion (src/claude/pr-comment-responder.md and equivalents): Verify the 6+ phase workflow is executable and doesn't have circular dependencies. Check memory protocol storage schema and .agents/pr-comments/ artifact structure.
  • Retrospective phase workflow (src/claude/retrospective.md and equivalents): Validate the 6-phase structure (Data Gathering → Insights → Diagnosis → Decisions → Learning Extraction → Close) has clear inputs/outputs at each boundary. Ensure atomicity scoring thresholds and memory relation schemas are sensible.
  • Cross-platform consistency: Spot-check that Claude, Copilot CLI, and VS Code versions of the same agent are semantically aligned after these changes (description tone may differ, but workflows should match).

Possibly related issues

  • Issue #65: Adds PR comment workflow enhancements (context gathering phases, comment mapping artifacts in .agents/pr-comments/, orchestrator-driven routing, memory protocols for triage decisions) that support implementing Copilot follow-up PR detection and handling logic.

Possibly related PRs

  • PR #43: Both modify the same impact-analysis filename conventions and update build/Generate-Agents.Common.psm1 (frontmatter key regex and field ordering), indicating overlapping or sequential changes to the build module.
  • PR #23: Both extensively modify orchestrator and pr-comment-responder documentation with routing, memory protocols, and PR-comment workflow restructuring, suggesting potential dependency or conflict.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commit format with 'feat:' prefix and describes the main change: comprehensive agent system enhancements across platforms.
Description check ✅ Passed Description is directly related to the changeset, detailing major agent enhancements, standardization changes, platform synchronization, and testing validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/agent-updates

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
templates/agents/memory.shared.md (1)

205-251: Skill citation protocol enhances feedback loop integration.

The new section adds explicit format for agents to cite skills during execution (Applying [Skill-ID], Strategy, Expected Outcome, Result, Skill Validated). This creates measurable data for retrospective analysis. Verify that retrospective agent documentation aligns with this citation format and can consume validation feedback.

Comment thread templates/agents/orchestrator.shared.md Outdated
…chitecture

- Add Architecture Constraint section defining ROOT agent role
- Document that subagents CANNOT delegate to other subagents
- Show valid vs invalid delegation patterns with diagrams
- Update impact analysis flow: orchestrator manages all routing
- Clarify planner creates analysis plan, orchestrator executes consultations
- Update handoff protocol to emphasize ROOT agent responsibility
- Add visual workflow showing orchestrator at center of all delegation
- Update ideation workflow to show orchestrator sequential routing

BREAKING CHANGE: Subagents can no longer delegate. All delegation flows through orchestrator.

Refs #46
Analysis & Planning Agents:
- analyst: Add handoff protocol, return recommendations to orchestrator
- architect: Update to return results rather than announcing handoffs
- planner: Clarify mandatory return to orchestrator for critic routing
- critic: Update escalation to return conflict to orchestrator (no direct delegation)
  Remove Task() calls to high-level-advisor, planner, implementer

All agents now explicitly state they CANNOT delegate to other agents.
Subagents return results and recommendations; orchestrator handles routing.

Refs #46
Execution Agents:
- implementer: Return completion status to orchestrator (no direct qa delegation)
- qa: Return test results with failure routing recommendations
- devops: Add handoff protocol for infrastructure work completion
- security: Add handoff protocol for security assessment completion

All agents now return results to orchestrator who handles next routing decision.

Refs #46
…tocols

Strategic & Documentation Agents:
- roadmap: Update to recommend routing rather than direct routing
- high-level-advisor: Add handoff protocol returning guidance to orchestrator
- independent-thinker: Add handoff protocol returning analysis to orchestrator
- explainer: Add handoff protocol returning documentation to orchestrator
- task-generator: Add handoff protocol returning task breakdown to orchestrator

All agents now return results to orchestrator with routing recommendations.

Refs #46
Learning & Memory Agents:
- retrospective: Add handoff protocol returning learnings to orchestrator
- skillbook: Coordinate with orchestrator for skill updates routing
- memory: Clarify unique service role, returns memory operation results

Memory agent is unique as a service agent - other agents delegate TO it,
and it returns results to them.

Refs #46
- Update impact analysis section to show orchestrator manages all routing
- Clarify orchestrator is ROOT agent, subagents cannot delegate
- Update feature development workflow to show orchestrator coordination
- Fix example workflow to show planner creates plan, orchestrator executes
- Update consultation process to show orchestrator invokes each specialist
- Add critical note about one-level delegation architecture constraint

Documentation now accurately reflects Claude Code's one-level delegation
architecture where orchestrator is the only agent capable of delegation.

Refs #46
Add handoff protocol sections to 9 agent templates to enforce one-level
delegation architecture:
- devops, security, explainer (execution & documentation)
- high-level-advisor, independent-thinker (strategic)
- task-generator, retrospective (planning & learning)
- memory, pr-comment-responder (support)

Each protocol includes:
- CANNOT delegate constraint
- Return to orchestrator requirement
- Handoff options table (recommendations for orchestrator)

Refs #46
Regenerate Copilot CLI agent files from updated templates. All agents
now include handoff protocols enforcing one-level delegation:
- devops, security, explainer
- high-level-advisor, independent-thinker
- task-generator, retrospective
- memory, pr-comment-responder

Generated from templates via build/Generate-Agents.ps1

Refs #46
Copilot AI review requested due to automatic review settings December 16, 2025 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 80 out of 80 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rjmurillo

Copy link
Copy Markdown
Owner Author

PR Comment Review Summary

All CodeRabbit review comments have been addressed:

Verified Resolutions

Comment File Status
Word variant 'analyses' → 'analyzes' orchestrator.shared.md ✅ Fixed
Escalation constraint phrasing critic.md ✅ Fixed with structured template
Phase 2 independent analysis guidance pr-comment-responder (all) ✅ Fixed
Expand argument-hint format skillbook.md ✅ Fixed
Memory vs delegation clarification skillbook.md ✅ Fixed - uses cloudmcp-manager tools directly
Non-delegation constraint explainer explainer.agent.md ✅ Fixed
Duplicate Handoff Options retrospective.shared.md ✅ Fixed
Analyst impact analysis path analyst.md ✅ Fixed with Impact Analysis Mode
Escalation template structure critic.md ✅ Fixed with mandatory fields
Cross-file path inconsistency planner.md ✅ Intentional design clarified
Retrospective handler retrospective.md ✅ Fixed
Estimate reconciliation task-generator.md ✅ Fixed

Re: CodeRabbit Follow-up on skillbook.md (comment 2622884060)

The Memory Protocol section at line 124 already states 'Use cloudmcp-manager memory tools directly for cross-session context'. The Handoff Protocol section (line 237) also correctly references 'cloudmcp-manager memory tools'. The current file state is consistent with the clarification note at line 249.

All 15 original CodeRabbit comments resolved.

- Use POST /pulls/{pull_number}/comments with in_reply_to field
- Remove incorrect /issues/{number}/comments usage for replies
- Add anti-pattern warning about wrong reply API
- Issue comments API places replies out of context

Fixes reply threading for PR review comments
Regenerated pr-comment-responder agents with corrected reply API
coderabbitai[bot]
coderabbitai Bot previously approved these changes Dec 16, 2025
Copilot AI review requested due to automatic review settings December 16, 2025 12:16
@rjmurillo rjmurillo enabled auto-merge (squash) December 16, 2025 12:16
@rjmurillo rjmurillo merged commit 74d753a into main Dec 16, 2025
8 checks passed
@rjmurillo rjmurillo deleted the feat/agent-updates branch December 16, 2025 12:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 80 out of 80 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants