refactor: rename agents to PascalCase + add swarm orchestration system#25
Closed
refactor: rename agents to PascalCase + add swarm orchestration system#25
Conversation
Update all 21 agent definition `name:` properties from kebab-case to PascalCase for consistency with standard naming conventions. Simple agents: commit -> Commit, debug -> Debug, etc. Audit agents: audit-security -> SecurityReview, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update all 9 command files to reference agents using their new PascalCase names (Commit, Debug, Brainstorm, etc.). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update documentation to reflect new PascalCase agent names: - CLAUDE.md: Agent persistence rules section - README.md: Sub-agent table and examples - src/claude/CLAUDE.md: Agent reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enable all 21 sub-agents to invoke skills during their execution. This allows agents to leverage quality enforcement skills like pattern-check, test-design, and code-smell during their work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove tools: field from all 21 sub-agents to inherit all tools from the main thread, including MCP tools. Benefits: - Agents automatically get MCP tools (Context7, Tavily, etc.) - Zero maintenance when tools are added/removed - Agent prompts already define correct behavior - Future-proof as Claude Code evolves 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces a complete swarm workflow for executing multiple tasks in parallel using git worktrees: Components: - /swarm command: Entry point for parallel task execution - SwarmOrchestrator agent: Coordinates explore/plan/implement/review phases - Coder agent: Autonomous implementation in isolated worktrees - worktree skill: Git worktree management patterns Workflow: 1. SETUP: Create release branch, worktrees for each task 2. EXPLORE: Parallel codebase exploration (Explore agents) 3. PLAN: Parallel planning with dependency detection (Plan agents) 4. ANALYZE: Build conflict matrix, determine merge order 5. IMPLEMENT: Parallel coding in worktrees (Coder agents) 6. REVIEW: Parallel code review per PR 7. MERGE: Sequential merge in dependency order 8. RELEASE: Final PR to main Features: - True parallelism via git worktrees (no file conflicts) - Smart dependency detection from plans - Per-task PRs with correct merge ordering - Automatic cleanup of worktrees and branches - Failure handling with partial completion support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major improvements to the code review workflow:
1. /code-review now ensures PR exists before reviewing:
- Checks for uncommitted changes → spawns Commit agent
- Checks if branch is pushed → pushes if needed
- Checks for PR → spawns PullRequest agent if missing
2. All 9 review agents now create PR line comments directly:
- SecurityReview, PerformanceReview, ArchitectureReview
- TestsReview, ComplexityReview, DependenciesReview
- DocumentationReview, TypescriptReview, DatabaseReview
- Uses gh api to create line-specific comments
- Tracks comments created vs skipped (lines not in diff)
3. PrComments agent simplified:
- Now only handles skipped issues (lines not in diff)
- Creates single summary comment for issues that couldn't
get line comments
Benefits:
- Comments can be resolved/replied to in GitHub
- Direct feedback on specific lines of code
- Automated PR creation when missing
- Cleaner workflow: commit → push → PR → review
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move all orchestration logic from /code-review command to CodeReview agent: - Command reduced from 422 lines (~2,700 tokens) to 33 lines (~150 tokens) - Agent now handles full workflow: pre-flight, analysis, parallel audits, PR comments, summary generation, and tech debt tracking - Smart audit selection: only runs relevant audits based on changed file types - Pre-flight checks: ensures changes are committed, pushed, and PR exists This significantly reduces token cost when invoking /code-review since the command prompt is loaded into context, while agent prompts are isolated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…chestration Remove brainstorm command and agent - functionality merged into /design. Redesign /design command to orchestrate Claude Code's built-in agents: - Phase 1: 3 parallel Explore agents (architecture, integration, reuse) - Phase 2: Synthesize findings, clarify with user via AskUserQuestion - Phase 3: 2 Plan agents (generate plan, then review/refine) - Phase 4: Merge plans, persist to .docs/design/ Benefits: - Leverages optimized built-in agents instead of custom 770-line prompts - Multi-agent exploration provides more thorough codebase analysis - Dual planning with self-review catches issues before implementation - User clarification ensures alignment on design decisions Removed: - src/claude/agents/devflow/brainstorm.md (279 lines) - src/claude/agents/devflow/design.md (491 lines) - src/claude/commands/devflow/brainstorm.md (69 lines) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore critical quality controls that were in the deleted agents: Philosophy section: - Never create generic plans - Ground everything in actual code with file:line references - Detailed enough for someone unfamiliar to execute - Honest about trade-offs and risks Evaluation priority: 1. Pattern alignment 2. Project philosophy (Result types, DI, immutability) 3. Minimal disruption 4. Testability 5. Maintainability 6. Performance Enhanced agent prompts: - Explorers must provide file:line proof for every claim - Planner 1 must reference specific files, follow patterns exactly - Planner 2 acts as skeptical reviewer, checks for common failures Quality gates checklist: - No generic steps, patterns verified, all integration points found - Edge cases explicit, code reuse maximized, testing concrete - Scope boundaries clear, risks surfaced 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reduce command from 326 to 87 lines while preserving quality controls. Guardrails now embedded directly in agent prompts: - Explorers: "Every claim needs file:line reference" - Planner 1: "Every step references specific files" - Planner 2: "Be harsh. Generic steps without file:line (REJECT)" Removed verbose prose, kept essential structure: - Phase 1: 3 parallel Explore agents - Phase 2: User clarification via AskUserQuestion - Phase 3: 2 sequential Plan agents (create + review) - Phase 4: Persist to .docs/design/ - Quality gates checklist 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dean0x
pushed a commit
that referenced
this pull request
Apr 16, 2026
Review walkthrough across 4 sessions resolved all 31 issues from the 2026-04-15_1022 code review (19 fixed, 5 rejected, 1 deferred, 6 pre-resolved). Blocking fixes (sessions 1-2): - CHANGELOG contradiction rewritten (#1) - Worktree placeholder unified on "{worktree}" across 11 sites (#3) - /debug migrated to index pattern (#4) - KNOWLEDGE_CONTEXT quoting standardized, no inline fallback (#6) - apply-knowledge skill defers to footer for paths (#7) - Simplifier dropped from knowledge consumers; 4 agents canonicalized (#8) - lstat+isFile guard on legacy-knowledge-purge unlink (#9) Architecture + consistency fixes (session 2): - Bare-form CLI removed, dispatch simplified to index-only (#10) - code-review-teams template+table extraction (#12) - Designer Apply Knowledge H2 added (#13) - Teams phase numbering aligned (#14) - loadKnowledgeContext + full subcommand removed entirely (#16) Complexity + performance + testing + docs fixes (sessions 3-4): - D-A filter extracted to isDeprecatedOrSuperseded predicate (#18) - formatAdrLine/formatPfLine merged into formatEntryLine (#19) - Shared test fixtures extracted to tests/knowledge/fixtures.ts (#21) - Token claim "~250 tokens" dropped from 12 sites (#22) - tmpdir cleanup added to test fixtures (#25) - self-learning.md example and footer paths corrected (#28, #29) 28 files changed, 333 insertions, 524 deletions. 1021/1021 tests passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR includes two major changes:
1. Agent Naming Refactor
name:properties from kebab-case to PascalCaseaudit-XtoXReviewpattern (e.g.,audit-security→SecurityReview)tools:field from all agents (inherit all tools including MCP)2. Swarm Orchestration System (NEW)
Introduces parallel task execution using git worktrees:
Components:
/swarmcommand - Entry point for parallel task executionSwarmOrchestratoragent - Coordinates explore/plan/implement/review phasesCoderagent - Autonomous implementation in isolated worktreesworktreeskill - Git worktree management patternsWorkflow:
Features:
Changes
Agent Renames
New Files
src/claude/agents/devflow/coder.mdsrc/claude/agents/devflow/swarm-orchestrator.mdsrc/claude/commands/devflow/swarm.mdsrc/claude/skills/devflow/worktree/SKILL.mdModified Files
Testing
Notes
The swarm system is implemented as prompt templates (markdown) but not yet tested in a real workflow. This PR establishes the architecture; testing and refinement will follow.
🤖 Generated with Claude Code