This document describes each stage of the /coord pipeline in detail, including inputs, processing logic, outputs, and the tools involved.
μ΄ λ¬Έμλ /coord νμ΄νλΌμΈμ κ° λ¨κ³λ₯Ό μ
λ ₯, μ²λ¦¬ λ‘μ§, μΆλ ₯, κ΄λ ¨ λꡬλ₯Ό ν¬ν¨νμ¬ μμΈν μ€λͺ
ν©λλ€.
User message
β
βΌ
Stage 0: BOOTSTRAP
β Complexity score > threshold?
β Yes βββββββββββββββββββββββββββΊ Enter 6-stage pipeline
β No βββββββββββββββββββββββββββΊ Direct native response
βΌ
Stage 1: MEMORY PRE-CHECK (parallel / λ³λ ¬)
β Auto-memory β Serena β Graphiti
βΌ
Stage 2: PLAN
β Sequential-thinking MCP β dependency map β parallelization analysis
βΌ
Stage 3: RESEARCH (parallel where independent / λ
립 μμ
μ λ³λ ¬)
β Explore agents β deep-research-agent β context7 β tavily
βΌ
Stage 4: EXECUTE
β Specialist agents β intermediate lint/test β TodoWrite tracking
βΌ
Stage 5: REVIEW
β critic agent (parallel with generator if Opus model)
β Optional: premium model review via OpenRouter
βΌ
Stage 6: MEMORY UPDATE
β Route lessons β Auto-memory > Graphiti > Serena
β Update MEMORY.md index
βΌ
Done
Purpose: Measure task complexity and decide whether to engage the full pipeline or respond directly.
λͺ©μ : μμ 볡μ‘λλ₯Ό μΈ‘μ νκ³ μ 체 νμ΄νλΌμΈμ μ€νν μ§ μ§μ μλ΅ν μ§ κ²°μ ν©λλ€.
- Raw user message text (μμ μ¬μ©μ λ©μμ§ ν μ€νΈ)
- Active Claude Code session context (νμ± Claude Code μΈμ 컨ν μ€νΈ)
The bootstrap stage scores the task across four dimensions:
| Dimension (μ°¨μ) | Signal (μ νΈ) | Weight (κ°μ€μΉ) |
|---|---|---|
| Scope ambiguity (λ²μ λͺ¨νΈμ±) | Vague verbs, qualifiers like "maybe", "explore" | 0.25 |
| Domain count (λλ©μΈ μ) | Mentions of frontend + backend, infra + code, etc. | 0.30 |
| Step count (λ¨κ³ μ) | Estimated number of sequential operations | 0.25 |
| Risk level (μν μμ€) | Production environment, destructive ops, PII | 0.20 |
If the composite score exceeds 0.5, the full pipeline activates. Below that threshold, Claude responds without the pipeline overhead.
λ³΅ν© μ μκ° 0.5λ₯Ό μ΄κ³Όνλ©΄ μ 체 νμ΄νλΌμΈμ΄ νμ±νλ©λλ€. κ·Έ μ΄νμμλ νμ΄νλΌμΈ μ€λ²ν€λ μμ΄ Claudeκ° μ§μ μλ΅ν©λλ€.
mode:pipelineordirect(νμ΄νλΌμΈ λλ μ§μ )complexity_score: float 0.0β1.0task_summary: one-sentence restatement of the request (μμ²μ ν λ¬Έμ₯ μ¬μ§μ )
Purpose: Retrieve all relevant prior context before any planning occurs, so the plan does not repeat solved problems.
λͺ©μ : κ³νμ΄ λ°μνκΈ° μ μ λͺ¨λ κ΄λ ¨ μ΄μ 컨ν μ€νΈλ₯Ό κ²μνμ¬ κ³νμ΄ μ΄λ―Έ ν΄κ²°λ λ¬Έμ λ₯Ό λ°λ³΅νμ§ μλλ‘ ν©λλ€.
task_summaryfrom Stage 0 (Stage 0μ μμ μμ½)- Known project identifiers (μλ €μ§ νλ‘μ νΈ μλ³μ)
All three sources are queried simultaneously (μΈ μμ€λ₯Ό λμμ μ‘°νν©λλ€):
Source 1: Auto-memory (~/.claude/projects/β¦/memory/)
scan MEMORY.md index
βββ read relevant topic files: feedback_*.md, *_project.md, lessons/
Source 2: Serena MCP
list_memories() β active workspace memory
read_memory("*_plan") β any existing implementation plans
Source 3: Graphiti (graphiti-memory)
search_nodes(query=task_summary) β related entities
search_memory_facts(query=task_summary) β relationships and decisions
Note: Graphiti requires an OpenRouter embedding API key. If unavailable, this source is skipped gracefully and a warning is logged. (Graphitiλ OpenRouter μλ² λ© API ν€κ° νμν©λλ€. μ¬μ©ν μ μλ κ²½μ° κ²½κ³ λ₯Ό κΈ°λ‘νκ³ κ±΄λλλλ€.)
prior_context: merged dict of all retrieved facts (κ²μλ λͺ¨λ μ¬μ€μ λ³ν© λμ λ리)lessons_loaded: list of lesson file names that were read (μ½μ κ΅ν νμΌ μ΄λ¦ λͺ©λ‘)existing_plan: optional, if a plan was found in memory (μ νμ , λ©λͺ¨λ¦¬μμ κ³νμ΄ λ°κ²¬λ κ²½μ°)
Purpose: Produce a structured, dependency-aware execution plan that explicitly identifies which steps can run in parallel.
λͺ©μ : λ³λ ¬λ‘ μ€νν μ μλ λ¨κ³λ₯Ό λͺ μμ μΌλ‘ μλ³νλ ꡬ쑰νλ μμ‘΄μ± μΈμ μ€ν κ³νμ μμ±ν©λλ€.
task_summary(μμ μμ½)prior_contextfrom Stage 1 (Stage 1μ μ΄μ 컨ν μ€νΈ)
The sequential-thinking MCP is the primary tool for this stage. It performs structured multi-step reasoning with hypothesis testing.
sequential-thinking MCPκ° μ΄ λ¨κ³μ κΈ°λ³Έ λꡬμ
λλ€. κ°μ€ ν
μ€νΈμ ν¨κ» ꡬ쑰νλ λ€λ¨κ³ μΆλ‘ μ μνν©λλ€.
sequential-thinking:
step 1: Understand the task boundaries (μμ
κ²½κ³ μ΄ν΄)
step 2: Identify all required subtasks (νμν λͺ¨λ νμ μμ
μλ³)
step 3: Map dependencies between subtasks (νμ μμ
κ° μμ‘΄μ± λ§€ν)
step 4: Separate sequential chains from parallel groups (μμ°¨ 체μΈκ³Ό λ³λ ¬ κ·Έλ£Ή λΆλ¦¬)
step 5: Estimate resource usage and agent types needed (리μμ€ μ¬μ©λ λ° νμν μμ΄μ νΈ μ ν μΆμ )
step 6: Output structured plan with parallelization annotations (λ³λ ¬ν μ£Όμκ³Ό ν¨κ» ꡬ쑰νλ κ³ν μΆλ ₯)
If the task is ambiguous, a requirements-analyst subagent clarifies the request before planning continues.
μμ
μ΄ λͺ¨νΈν κ²½μ°, requirements-analyst μλΈμμ΄μ νΈκ° κ³νμ κ³μνκΈ° μ μ μμ²μ λͺ
νν ν©λλ€.
The plan explicitly marks every task as one of:
κ³νμ λͺ¨λ μμ μ λ€μ μ€ νλλ‘ λͺ μμ μΌλ‘ νμν©λλ€:
PARALLELβ can start at the same time as other PARALLEL tasks (λ€λ₯Έ PARALLEL μμ κ³Ό λμμ μμ κ°λ₯)SEQUENTIAL(after=X)β must wait for task X to complete (μμ Xκ° μλ£λ λκΉμ§ κΈ°λ€λ €μΌ ν¨)BLOCKINGβ must complete before any next stage begins (λ€μ λ¨κ³κ° μμλκΈ° μ μ μλ£λμ΄μΌ ν¨)
Why parallelization matters: Running 3 independent file reads in parallel saves 60β70% of wall-clock time compared to sequential execution. The plan stage forces this analysis upfront so execution does not default to unnecessary serialization.
λ³λ ¬νκ° μ€μν μ΄μ : 3κ°μ λ 립μ μΈ νμΌ μ½κΈ°λ₯Ό λ³λ ¬λ‘ μ€ννλ©΄ μμ°¨ μ€νμ λΉν΄ μ€μ μκ°μ 60-70%λ₯Ό μ μ½ν μ μμ΅λλ€.
- Structured plan document written to
write_memory("current_plan", β¦)(ꡬ쑰νλ κ³ν λ¬Έμ) TodoWritetasks created for all subtasks (λͺ¨λ νμ μμ μ λνTodoWriteμμ μμ±)
Purpose: Gather all information required for execution before any code is written or files are modified.
λͺ©μ : μ½λκ° μμ±λκ±°λ νμΌμ΄ μμ λκΈ° μ μ μ€νμ νμν λͺ¨λ μ 보λ₯Ό μμ§ν©λλ€.
- Plan from Stage 2 (Stage 2μ κ³ν)
- Research tasks identified in the plan (κ³νμμ μλ³λ 리μμΉ μμ )
Multiple research subagents are dispatched simultaneously. Each covers a different domain.
μ¬λ¬ 리μμΉ μλΈμμ΄μ νΈκ° λμμ λ°μ‘λ©λλ€. κ°κ° λ€λ₯Έ λλ©μΈμ λ΄λΉν©λλ€.
Parallel dispatch (λ³λ ¬ λ°μ‘):
βββ Explore agent(s) β codebase structure, existing patterns
βββ deep-research-agent β web sources, academic papers, blog posts
βββ context7 MCP β official library documentation
Additional routing:
βββ tavily β current events, recent releases
βββ notebooklm β long-form document analysis
Research routing rules (리μμΉ λΌμ°ν κ·μΉ):
| Query type (쿼리 μ ν) | Route to (λΌμ°ν λμ) |
|---|---|
| "How does X work in the codebase?" | Explore agent |
| "What is the latest version of X?" | Tavily |
| "How does library X handle Y?" | Context7 MCP |
| "Summarize this 50-page PDF" | NotebookLM |
| "Compare three approaches to Z" | deep-research-agent |
research_findings: merged summary from all agents (λͺ¨λ μμ΄μ νΈμ λ³ν© μμ½)- Source citations with credibility scores (μ λ’°λ μ μκ° μλ μμ€ μΈμ©)
Purpose: Implement the plan using specialist agents, with intermediate validation gates.
λͺ©μ : μ€κ° κ²μ¦ κ²μ΄νΈμ ν¨κ» μ λ¬Έκ° μμ΄μ νΈλ₯Ό μ¬μ©νμ¬ κ³νμ ꡬνν©λλ€.
- Approved plan (μΉμΈλ κ³ν)
- Research findings (리μμΉ κ²°κ³Ό)
TodoWritetask list (μμ λͺ©λ‘)
Tasks are dispatched to specialist agents matching the work type. Agents update TodoWrite status as they complete each item.
μμ
μ μμ
μ νμ λ§λ μ λ¬Έκ° μμ΄μ νΈμκ² λ°μ‘λ©λλ€. μμ΄μ νΈλ κ° νλͺ©μ μλ£ν λ TodoWrite μνλ₯Ό μ
λ°μ΄νΈν©λλ€.
Agent selection by task type (μμ μ νλ³ μμ΄μ νΈ μ ν):
| Task (μμ ) | Agent (μμ΄μ νΈ) |
|---|---|
| API design, server logic | backend-architect |
| React components, CSS | frontend-architect |
| Data pipelines, scripts | python-expert |
| Full system cross-domain | system-architect |
| Security audit | security-engineer |
| Performance bottleneck | performance-engineer |
| Test suite creation | quality-engineer |
| Docs and guides | technical-writer |
| Code smells, refactor | refactoring-expert |
Intermediate validation (μ€κ° κ²μ¦):
After each logical group of changes, the pipeline runs:
κ° λ Όλ¦¬μ λ³κ²½ κ·Έλ£Ή ν νμ΄νλΌμΈμ΄ μ€νν©λλ€:
# Language-appropriate checks (μΈμ΄μ λ°λ₯Έ κ²μ¬)
python -m pytest # Python projects
npm run lint && npm run typecheck # JavaScript/TypeScript
go test ./... # Go projects
cargo test # Rust projectsFailures block further execution and trigger a root-cause-analyst agent.
μ€ν¨λ μΆκ° μ€νμ μ°¨λ¨νκ³ root-cause-analyst μμ΄μ νΈλ₯Ό νΈλ¦¬κ±°ν©λλ€.
- All planned code changes applied and validated (κ³νλ λͺ¨λ μ½λ λ³κ²½ μ μ© λ° κ²μ¦)
- Updated
TodoWritewith completed statuses (μλ£ μνκ° μ λ°μ΄νΈλTodoWrite) - Memory checkpoint:
write_memory("checkpoint_β¦", current_state)(λ©λͺ¨λ¦¬ 체ν¬ν¬μΈνΈ)
Purpose: Independent quality check to catch errors, compliance issues, and sycophantic reasoning in the output.
λͺ©μ : μΆλ ₯μμ μ€λ₯, κ·μ μ€μ λ¬Έμ , μ첨μ μΆλ‘ μ λ°κ²¬νκΈ° μν λ 립μ μΈ νμ§ κ²μ¬μ λλ€.
- All artifacts produced in Stage 4 (Stage 4μμ μμ±λ λͺ¨λ κ²°κ³Όλ¬Ό)
- Original plan and requirements (μλ κ³ν λ° μꡬμ¬ν)
Standard review (νμ€ λ¦¬λ·°):
The critic agent runs in parallel with the primary generator when an Opus model is used. It applies Popperian falsifiability checks: every claim must include a "wrong if X" condition.
critic μμ΄μ νΈλ Opus λͺ¨λΈ μ¬μ© μ κΈ°λ³Έ μμ±κΈ°μ λ³λ ¬λ‘ μ€νλ©λλ€. Popperian λ°μ¦ κ°λ₯μ± κ²μ¬λ₯Ό μ μ©ν©λλ€: λͺ¨λ μ£Όμ₯μλ "XμΈ κ²½μ° νλ¦Ό" μ‘°κ±΄μ΄ ν¬ν¨λμ΄μΌ ν©λλ€.
Premium review (ν리미μ 리뷰, optional):
For high-stakes work (proposals, papers, production deployments), a second independent review uses a premium model via OpenRouter:
κ³ μν μμ (μ μμ, λ Όλ¬Έ, νλ‘λμ λ°°ν¬)μ κ²½μ°, λ λ²μ§Έ λ 립μ μΈ κ²ν κ° OpenRouterλ₯Ό ν΅ν ν리미μ λͺ¨λΈμ μ¬μ©ν©λλ€:
OpenRouter β Gemini 2.5 Pro (κ²ν 1)
OpenRouter β GPT-4.1 o3 (κ²ν 2)
- Review report with pass/fail per criterion (κΈ°μ€λ³ ν΅κ³Ό/μ€ν¨κ° μλ κ²ν λ³΄κ³ μ)
- Falsifiability score: fraction of claims with
wrong-if-Xconditions (λ°μ¦ κ°λ₯μ± μ μ) - Approval to proceed, or revision requests (μ§ν μΉμΈ λλ μμ μμ²)
Purpose: Preserve lessons, decisions, and new knowledge for future sessions.
λͺ©μ : λ―Έλ μΈμ μ μν΄ κ΅ν, κ²°μ , μλ‘μ΄ μ§μμ 보쑴ν©λλ€.
- Session outcomes (μΈμ κ²°κ³Ό)
- Review findings (κ²ν κ²°κ³Ό)
- Any errors or surprises encountered (λ°μν μ€λ₯ λλ μμμΉ λͺ»ν μν©)
| Content type (λ΄μ© μ ν) | Route to (λΌμ°ν λμ) | File pattern (νμΌ ν¨ν΄) |
|---|---|---|
| Code locations, symbols (μ½λ μμΉ, μ¬λ³Ό) | Serena MCP | workspace memory |
| User preferences, lessons (μ¬μ©μ μ νΈ, κ΅ν) | Auto-memory | feedback_*.md |
| Project status (νλ‘μ νΈ μν) | Auto-memory | *_project.md |
| Domain facts, decisions (λλ©μΈ μ¬μ€, κ²°μ ) | Graphiti (if running) | knowledge graph node |
| Session summary (μΈμ μμ½) | Auto-memory | *_handoff.md |
Priority order (μ°μ μμ μμ): Auto-memory > Graphiti > Serena
1. write_memory("session_summary", outcomes) β Serena
2. Append lesson to feedback_*.md β Auto-memory
3. Update MEMORY.md index (one line per entry) β Auto-memory
4. graphiti: add_memory(episode) for domain facts β Graphiti (if available)
5. delete_memory("checkpoint_*") for temp items β Serena
- Updated persistent memory across all three stores (μΈ μ μ₯μ λͺ¨λμ μ λ°μ΄νΈλ μꡬ λ©λͺ¨λ¦¬)
- MEMORY.md index reflects new entries (MEMORY.md μΈλ±μ€κ° μ νλͺ©μ λ°μ)
The following patterns violate the pipeline's design principles and will produce worse outcomes than simply responding directly.
λ€μ ν¨ν΄μ νμ΄νλΌμΈμ μ€κ³ μμΉμ μλ°νλ©° μ§μ μλ΅νλ κ²λ³΄λ€ λ λμ κ²°κ³Όλ₯Ό λ³μ΅λλ€.
| Anti-pattern (νΌν΄μΌ ν ν¨ν΄) | Why it is harmful (ν΄λ‘μ΄ μ΄μ ) |
|---|---|
| Skipping memory check (λ©λͺ¨λ¦¬ νμΈ κ±΄λλ°κΈ°) | Repeats solved problems from previous sessions (μ΄μ μΈμ μμ ν΄κ²°λ λ¬Έμ λ°λ³΅) |
| Jump-to-implementation (κ³ν μμ΄ μ¦μ ꡬν) | Produces code that misses edge cases and requirements (μ£μ§ μΌμ΄μ€ λ° μꡬμ¬νμ λμΉ μ½λ μμ±) |
| Sequential where parallel is possible (λ³λ ¬ κ°λ₯ μ μμ°¨ μ€ν) | Wastes 60β70% of available execution time (μ¬μ© κ°λ₯ν μ€ν μκ°μ 60-70% λλΉ) |
| Using /coord for simple tasks (λ¨μ μμ μ /coord μ¬μ©) | Pipeline overhead exceeds task time (νμ΄νλΌμΈ μ€λ²ν€λκ° μμ μκ° μ΄κ³Ό) |
| Skipping critic review (critic κ²ν 건λλ°κΈ°) | Sycophantic reasoning goes undetected (μ첨μ μΆλ‘ μ΄ κ°μ§λμ§ μμ) |
| Omitting memory update (λ©λͺ¨λ¦¬ μ λ°μ΄νΈ μλ΅) | Lessons are lost and re-learned unnecessarily (κ΅νμ΄ μ¬λΌμ§κ³ λΆνμνκ² λ€μ νμ΅) |
| 3+ sequential searches in one context | Delegate to parallel subagents instead (λ³λ ¬ μλΈμμ΄μ νΈμ μμ) |