Commit cb5da5

2026-03-13 05:02:51 Claude (Dev): [mcp] Document agent delegation workflow
/dev/null .. design/agent workflow.md
@@ 0,0 1,65 @@
+ ---
+ category: reference
+ tags: [process, agents]
+ last_updated: 2026-03-13
+ confidence: high
+ ---
+
+ # Agent Workflow
+
+ How Claude Code orchestrates work on wikibot.io using delegated subagents.
+
+ ## Roles
+
+ **Orchestrator** (the main Claude Code session) — reads task specs, tracks progress, coordinates across tasks, relays concerns to the human, commits/pushes code, updates the wiki. Does NOT write implementation code directly.
+
+ **Manager** (general-purpose subagent, one per task) — follows the proceed workflow end-to-end for a single task. Writes all code. Has access to all tools including Task, so it can spawn its own sub-agents.
+
+ **Groucho** (Plan subagent) — reviews the manager's proposed approach before implementation. Flags issues, suggests alternatives, answers architectural questions.
+
+ **Chico** (general-purpose subagent) — code review after implementation. Rates issues as critical, important, or minor.
+
+ **Zeppo** (general-purpose subagent) — security and infrastructure review after implementation. Same rating scale.
+
+ ## Proceed Workflow (per task)
+
+ Each manager follows this sequence:
+
+ 1. **Plan with Groucho.** Describe the proposed approach. Groucho reviews and flags issues.
+ 2. **Implement.** Write code, parallelize independent operations.
+ 3. **Review with Chico and Zeppo** (in parallel). Fix any issues rated "critical" or "important".
+ 4. **Report back** to the orchestrator with results, concerns, and any questions for the human.
+
+ ## Orchestrator Responsibilities
+
+ 1. Read task specs from the wiki.
+ 2. For each task, launch a general-purpose manager agent with:
+ - Full task spec (deliverables, acceptance criteria)
+ - Context about existing infrastructure (resource IDs, file paths, patterns)
+ - Instructions to follow the proceed workflow
+ - Use `isolation: "worktree"` for code changes
+ 3. Use `run_in_background` for independent tasks so they run in parallel.
+ 4. When a manager returns with a question for the human:
+ - Relay the question to the human
+ - Get the answer
+ - Resume the manager agent with `resume: <agentId>` (preserves full context)
+ 5. When a manager completes:
+ - Review its output
+ - Commit and push the code
+ - Update the wiki
+
+ ## Question Relay Protocol
+
+ When a manager agent encounters a decision that needs human input:
+
+ 1. Manager stops and returns with the question clearly stated.
+ 2. Orchestrator relays the question to the human (via text or AskUserQuestion).
+ 3. Human answers.
+ 4. Orchestrator resumes the manager with the answer.
+ 5. Manager continues from where it left off.
+
+ Other managers running in parallel are not blocked.
+
+ ## Invoking the Workflow
+
+ The orchestrator uses the `/proceed` skill to load the workflow instructions, then follows the delegation model above. The key rule: **the orchestrator coordinates, managers implement.**
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9