team-roadmap-dev
npx skills add https://github.com/catlog22/claude-code-workflow --skill team-roadmap-dev
Agent 安装分布
Skill 文档
Team Roadmap Dev
Unified team skill: roadmap-driven development with phased execution pipeline. Coordinator discusses roadmap with the user and manages phase transitions. All team members invoke with --role=xxx to route to role-specific execution.
Architecture Overview
âââââââââââââââââââââââââââââââââââââââââââââââââ
â Skill(skill="team-roadmap-dev") â
â args="<task-description>" or args="--role=xxx"â
âââââââââââââââââââââ¬ââââââââââââââââââââââââââââ
â Role Router
âââââ --role present? âââââ
â NO â YES
â â
Orchestration Mode Role Dispatch
(auto â coordinator) (route to role.md)
â
ââââââ´âââââ¬ââââââââââââ¬ââââââââââââ
â â â â
âââââââââââââââââââââââââââââââââââââââââââââââ
âcoordinatorââ planner ââ executor ââ verifier â
â (human ââ PLAN-* ââ EXEC-* ââ VERIFY-* â
â 交äº) ââ ââ ââ â
âââââââââââââââââââââââââââââââââââââââââââââââ
Command Architecture
roles/
âââ coordinator/
â âââ role.md # Orchestrator: roadmap discussion + phase management
â âââ commands/
â âââ roadmap-discuss.md # Discuss roadmap with user, generate phase plan
â âââ dispatch.md # Create task chain per phase
â âââ monitor.md # Stop-Wait phase execution loop
â âââ pause.md # Save state and exit cleanly
â âââ resume.md # Resume from paused session
âââ planner/
â âââ role.md # Research + task JSON generation per phase
â âââ commands/
â âââ research.md # Context gathering + codebase exploration
â âââ create-plans.md # action-planning-agent delegation â IMPL-*.json
âââ executor/
â âââ role.md # Task execution with wave parallelism
â âââ commands/
â âââ implement.md # Code implementation via code-developer
âââ verifier/
âââ role.md # Goal-backward verification
âââ commands/
âââ verify.md # Convergence criteria checking + gap detection
Role Router
Input Parsing
Parse $ARGUMENTS to extract --role. If absent â Orchestration Mode (auto route to coordinator). If --resume present â coordinator handles resume via commands/resume.md.
Role Registry
| Role | File | Task Prefix | Type | Compact |
|---|---|---|---|---|
| coordinator | roles/coordinator/role.md | (none) | orchestrator | â ï¸ å缩åå¿ é¡»é读 |
| planner | roles/planner/role.md | PLAN-* | pipeline | å缩åå¿ é¡»é读 |
| executor | roles/executor/role.md | EXEC-* | pipeline | å缩åå¿ é¡»é读 |
| verifier | roles/verifier/role.md | VERIFY-* | pipeline | å缩åå¿ é¡»é读 |
â ï¸ COMPACT PROTECTION: è§è²æä»¶æ¯æ§è¡ææ¡£ï¼ä¸æ¯åèèµæãå½ context compression åçåï¼è§è²æä»¤ä» å©æè¦æ¶ï¼å¿ é¡»ç«å³
Readå¯¹åº role.md éæ°å è½½ååç»§ç»æ§è¡ãä¸å¾åºäºæè¦æ§è¡ä»»ä½ Phaseã
Dispatch
- Extract
--rolefrom arguments - If no
--roleâ route to coordinator (Orchestration Mode) - Look up role in registry â Read the role file â Execute its phases
Orchestration Mode
When invoked without --role, coordinator auto-starts. User just provides task description.
Invocation: Skill(skill="team-roadmap-dev", args="<task-description>")
Lifecycle:
User provides task description
â coordinator: Roadmap discussion â TeamCreate â Create phase task chain
â coordinator Phase 4: spawn first batch workers (background) â STOP
â Worker executes â SendMessage callback â coordinator advances next step
â Loop until phase pipeline complete â transition to next phase or complete
User Commands (wake paused coordinator):
| Command | Action |
|---|---|
check / status |
Output execution status graph, no advancement |
resume / continue |
Check worker states, advance next step |
Shared Infrastructure
Artifact System
Fixed Artifacts (session-level, persist throughout session):
| Artifact | Path | Created By | Purpose |
|---|---|---|---|
| roadmap.md | <session>/roadmap.md |
coordinator (roadmap-discuss) | Phase plan with requirements and success criteria |
| state.md | <session>/state.md |
coordinator | Living memory (<100 lines), updated every significant action |
| config.json | <session>/config.json |
coordinator | Session settings: mode, depth, gates |
Dynamic Artifacts (per-phase, form execution history):
| Artifact | Path | Created By | Purpose |
|---|---|---|---|
| context.md | <session>/phase-N/context.md |
planner (research) | Phase context and requirements |
| IMPL_PLAN.md | <session>/phase-N/IMPL_PLAN.md |
planner (create-plans) | Implementation overview with task dependency graph |
| IMPL-*.json | <session>/phase-N/.task/IMPL-*.json |
planner (create-plans) | Task JSON files (unified flat schema with convergence criteria) |
| TODO_LIST.md | <session>/phase-N/TODO_LIST.md |
planner (create-plans) | Checklist tracking for all tasks |
| summary-{ID}.md | <session>/phase-N/summary-{IMPL-ID}.md |
executor (implement) | Execution record with requires/provides/convergence-met |
| verification.md | <session>/phase-N/verification.md |
verifier (verify) | Convergence criteria check results + gap list |
Init Prerequisite
Coordinator must ensure .workflow/project-tech.json exists before starting. If not found, invoke /workflow:init.
Team Configuration
| Setting | Value |
|---|---|
| Team name | roadmap-dev |
| Session directory | .workflow/.team/RD-<slug>-<date>/ |
| Message directory | .workflow/.team-msg/roadmap-dev/ |
Worker Phase 1: Task Discovery (shared by all workers)
Every worker executes the same task discovery flow on startup:
- Call
TaskList()to get all tasks - Filter: subject matches this role’s prefix + owner is this role + status is pending + blockedBy is empty
- No tasks â idle wait
- Has tasks â
TaskGetfor details âTaskUpdatemark in_progress
Resume Artifact Check (prevent duplicate output after resume):
- Check whether this task’s output artifact already exists
- Artifact complete â skip to Phase 5 report completion
- Artifact incomplete or missing â normal Phase 2-4 execution
Worker Phase 5: Report (shared by all workers)
Standard reporting flow after task completion:
- Message Bus: Call
mcp__ccw-tools__team_msgto log message- Parameters: operation=”log”, team=”roadmap-dev”, from=, to=”coordinator”, type=, summary=”[] “, ref=
- CLI fallback: When MCP unavailable â
ccw team log --team roadmap-dev --from <role> --to coordinator --type <type> --summary "[<role>] ..." --json
- SendMessage: Send result to coordinator (content and summary both prefixed with
[<role>]) - TaskUpdate: Mark task completed
- Loop: Return to Phase 1 to check next task
Wisdom Accumulation (all roles)
Cross-task knowledge accumulation. Coordinator creates wisdom/ directory at session initialization.
Directory:
<session-folder>/wisdom/
âââ learnings.md # Patterns and insights
âââ decisions.md # Architecture and design decisions
âââ conventions.md # Codebase conventions
âââ issues.md # Known risks and issues
Worker Load (Phase 2): Extract Session: <path> from task description, read wisdom directory files.
Worker Contribute (Phase 4/5): Write this task’s discoveries to corresponding wisdom files.
Role Isolation Rules
Output Tagging
All outputs must carry [role_name] prefix.
Coordinator Isolation
| Allowed | Forbidden |
|---|---|
| Discuss roadmap with user (AskUserQuestion) | Direct code writing/modification |
| Create task chain (TaskCreate) | Calling implementation subagents |
| Dispatch tasks to workers | Direct analysis/testing/verification |
| Monitor progress (message bus) | Bypassing workers |
| Report results to user | Modifying source code |
Worker Isolation
| Allowed | Forbidden |
|---|---|
| Process own-prefix tasks only | Process other roles’ tasks |
| SendMessage to coordinator only | Direct worker-to-worker communication |
| Use Toolbox-declared tools | TaskCreate for other roles |
| Delegate to commands/*.md | Modify resources outside scope |
Message Bus & Task Lifecycle
Each role’s role.md contains self-contained Message Bus and Task Lifecycle. See roles/<role>/role.md.
Pipeline
Phase N lifecycle:
Coordinator (roadmap-discuss â dispatch phase N)
â PLAN-N01: Planner (research â action-planning-agent â IMPL-*.json)
â EXEC-N01: Executor (load IMPL-*.json â wave-based code-developer)
â VERIFY-N01: Verifier (convergence criteria check)
â Coordinator (transition: gap closure or next phase)
Cross-phase flow:
Init â Roadmap Discussion â Phase 1 â Phase 2 â ... â Phase N â Complete
â |
âââ gap closure loop âââââââ
Session lifecycle:
Running â Pause (save coordinates) â Resume (re-enter monitor at coordinates)
Cadence Control
Beat model: Event-driven, each beat = coordinator wake â process â spawn â STOP. Phase beat: PLAN â EXEC â VERIFY per phase.
Beat Cycle (single beat)
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Event Coordinator Workers
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
callback/resume âââ ââ handleCallback ââ
â mark completed â
â check pipeline â
ââ handleSpawnNext ââ¤
â find ready tasks â
â spawn workers ââââ¼âââ [Worker A] Phase 1-5
ââ STOP (idle) ââââââ â
â
callback âââââââââââââââââââââââââââââââââââââââââââ
(next beat) SendMessage + TaskUpdate(completed)
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase beat view:
Single Phase (3 beats, strictly serial)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Beat 1 2 3
â â â
PLAN â EXEC âââ VERIFY
â² â²
phase phase
start done
PLAN=planner EXEC=executor VERIFY=verifier
Multi-Phase (N x 3 beats, with gap closure loop)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase 1: PLAN-101 â EXEC-101 â VERIFY-101
â
⸠CHECKPOINT ââ gap closure or next phase
â
Phase 2: PLAN-201 â EXEC-201 â VERIFY-201
â
⸠CHECKPOINT
â
Phase N: PLAN-N01 â EXEC-N01 â VERIFY-N01 â Complete
Checkpoints:
| Trigger | Location | Behavior |
|---|---|---|
| Phase transition | VERIFY-N01 complete | Evaluate gaps: if gaps found â gap closure loop; if clean â next phase |
| Gap closure limit | 3 iterations | Stop iteration, report current state to user |
| Pipeline stall | No ready + no running | Check missing tasks, report to user |
Stall Detection (coordinator handleCheck executes):
| Check | Condition | Resolution |
|---|---|---|
| Worker no response | in_progress task no callback | Report waiting task list, suggest user resume |
| Pipeline deadlock | no ready + no running + has pending | Check blockedBy dependency chain, report blocking point |
| Phase verification fails | Gaps detected in VERIFY | Coordinator triggers gap closure loop (max 3 iterations) |
Task Metadata Registry
| Task ID | Role | Phase | Dependencies | Description |
|---|---|---|---|---|
| PLAN-N01 | planner | phase N | (none or previous VERIFY) | Research + context gathering + task JSON generation |
| EXEC-N01 | executor | phase N | PLAN-N01 | Wave-based code implementation following plans |
| VERIFY-N01 | verifier | phase N | EXEC-N01 | Convergence criteria verification + gap detection |
Coordinator Spawn Template
When coordinator spawns workers, use background mode (Spawn-and-Stop):
Task({
subagent_type: "general-purpose",
description: "Spawn <role> worker",
team_name: "roadmap-dev",
name: "<role>",
run_in_background: true,
prompt: `You are team "roadmap-dev" <ROLE>.
## Primary Directive
All your work must be executed through Skill to load role definition:
Skill(skill="team-roadmap-dev", args="--role=<role>")
Current requirement: <task-description>
Session: <session-folder>
## Role Guidelines
- Only process <PREFIX>-* tasks, do not execute other role work
- All output prefixed with [<role>] identifier
- Only communicate with coordinator
- Do not use TaskCreate for other roles
- Call mcp__ccw-tools__team_msg before every SendMessage
## Workflow
1. Call Skill -> load role definition and execution logic
2. Follow role.md 5-Phase flow
3. team_msg + SendMessage results to coordinator
4. TaskUpdate completed -> check next task`
})
Session Directory
.workflow/.team/RD-<slug>-<date>/
âââ roadmap.md # Phase plan with requirements
âââ state.md # Living memory (<100 lines)
âââ config.json # Session settings
âââ wisdom/ # Cross-task knowledge
â âââ learnings.md
â âââ decisions.md
â âââ conventions.md
â âââ issues.md
âââ phase-1/ # Per-phase artifacts
â âââ context.md
â âââ IMPL_PLAN.md
â âââ TODO_LIST.md
â âââ .task/IMPL-*.json
â âââ summary-*.md
â âââ verification.md
âââ phase-2/
â âââ ...
âââ shared-memory.json # Cross-role state
Session Resume
Coordinator supports --resume / --continue for interrupted sessions:
- Scan
.workflow/.team/RD-*/for sessions with status “active” or “paused” - Multiple matches â AskUserQuestion for selection
- Audit TaskList â reconcile session state <-> task status
- Reset in_progress â pending (interrupted tasks)
- Rebuild team and spawn needed workers only
- Create missing tasks with correct blockedBy
- Kick first executable task â Phase 4 coordination loop
Error Handling
| Scenario | Resolution |
|---|---|
| Unknown –role value | Error with available role list |
| Missing –role arg | Orchestration Mode â auto route to coordinator |
| Role file not found | Error with expected path (roles//role.md) |
| project-tech.json missing | Coordinator invokes /workflow:init |
| Phase verification fails with gaps | Coordinator triggers gap closure loop |
| Max gap closure iterations (3) | Report to user, ask for guidance |