Add document standards, quality gates, and templates for team lifecycle phases

- Introduced `document-standards.md` to define YAML frontmatter schema, naming conventions, and content structure for spec-generator outputs.
- Created `quality-gates.md` outlining per-phase quality gate criteria and scoring dimensions for spec-generator outputs.
- Added templates for architecture documents, epics and stories, product briefs, and requirements PRD to streamline documentation in respective phases.
This commit is contained in:
catlog22
2026-03-04 23:54:20 +08:00
parent fd0c9efa4d
commit bbdd1840de
103 changed files with 1959 additions and 1311 deletions

View File

@@ -192,7 +192,7 @@ All outputs must carry `[role_name]` prefix.
| Allowed | Forbidden |
|---------|-----------|
| Discuss roadmap with user (AskUserQuestion) | Direct code writing/modification |
| Create task chain (TaskCreate) | Calling implementation subagents |
| Create task chain (TaskCreate) | Calling CLI tools for implementation |
| Dispatch tasks to workers | Direct analysis/testing/verification |
| Monitor progress (message bus) | Bypassing workers |
| Report results to user | Modifying source code |

View File

@@ -1,8 +1,8 @@
---
prefix: EXEC
inner_loop: true
subagents:
- code-developer
cli_tools:
- gemini --mode write
message_types:
success: exec_complete
progress: exec_progress
@@ -11,7 +11,7 @@ message_types:
# Executor
Wave-based code implementation per phase. Reads IMPL-*.json task files, computes execution waves from the dependency graph, delegates each task to code-developer subagent. Produces summary-{IMPL-ID}.md per task.
Wave-based code implementation per phase. Reads IMPL-*.json task files, computes execution waves from the dependency graph, delegates each task to CLI tool for code generation. Produces summary-{IMPL-ID}.md per task.
## Phase 2: Context Loading
@@ -38,13 +38,24 @@ Execute waves sequentially, tasks within each wave can be parallel.
| Task Count | Strategy |
|------------|----------|
| <= 2 | Direct: inline Edit/Write |
| 3-5 | Single code-developer for all |
| > 5 | Batch: one code-developer per module group |
| 3-5 | Single CLI tool call for all |
| > 5 | Batch: one CLI tool call per module group |
**Per task**:
1. Build prompt from task JSON: description, files, implementation steps, convergence criteria
2. Include prior summaries and wisdom as context
3. Delegate to code-developer subagent (`run_in_background: false`)
3. Delegate to CLI tool (`run_in_background: false`):
```
Bash({
command: `ccw cli -p "PURPOSE: Implement task ${taskId}: ${description}
TASK: ${implementationSteps}
MODE: write
CONTEXT: @${files.join(' @')} | Memory: ${priorSummaries}
EXPECTED: Working code changes matching convergence criteria
CONSTRAINTS: ${convergenceCriteria}" --tool gemini --mode write`,
run_in_background: false
})
```
4. Write `<session>/phase-{N}/summary-{IMPL-ID}.md` with: task ID, affected files, changes made, status
**Between waves**: report wave progress via team_msg (type: exec_progress)

View File

@@ -1,9 +1,8 @@
---
prefix: PLAN
inner_loop: true
subagents:
- cli-explore-agent
- action-planning-agent
cli_tools:
- gemini --mode analysis
message_types:
success: plan_ready
progress: plan_progress
@@ -12,7 +11,7 @@ message_types:
# Planner
Research and plan creation per roadmap phase. Gathers codebase context via cli-explore-agent, then generates wave-based execution plans with convergence criteria via action-planning-agent.
Research and plan creation per roadmap phase. Gathers codebase context via CLI exploration, then generates wave-based execution plans with convergence criteria via CLI planning tool.
## Phase 2: Context Loading + Research
@@ -27,7 +26,18 @@ Research and plan creation per roadmap phase. Gathers codebase context via cli-e
2. Read config.json for depth setting (quick/standard/comprehensive)
3. Load prior phase summaries for dependency context
4. Detect gap closure mode (task description contains "Gap closure")
5. Launch cli-explore-agent with phase requirements as exploration query:
5. Launch CLI exploration with phase requirements as exploration query:
```
Bash({
command: `ccw cli -p "PURPOSE: Explore codebase for phase requirements
TASK: • Identify files needing modification • Map patterns and dependencies • Assess test infrastructure • Identify risks
MODE: analysis
CONTEXT: @**/* | Memory: Phase goal: ${phaseGoal}
EXPECTED: Structured exploration results with file lists, patterns, risks
CONSTRAINTS: Read-only analysis" --tool gemini --mode analysis`,
run_in_background: false
})
```
- Target: files needing modification, patterns, dependencies, test infrastructure, risks
6. If depth=comprehensive: run Gemini CLI analysis (`--mode analysis --rule analysis-analyze-code-patterns`)
7. Write `<session>/phase-{N}/context.md` combining roadmap requirements + exploration results
@@ -36,12 +46,19 @@ Research and plan creation per roadmap phase. Gathers codebase context via cli-e
1. Load context.md from Phase 2
2. Create output directory: `<session>/phase-{N}/.task/`
3. Delegate to action-planning-agent with:
- Phase context + roadmap section + prior summaries
- Task ID format: `IMPL-{phase}{seq}` (e.g., IMPL-101, IMPL-102)
- Convergence criteria rules: measurable, goal-backward, includes file existence + export checks + test checks
- Hard limits: <= 10 tasks per phase, valid DAG, no cycles
4. Agent produces: `IMPL_PLAN.md`, `.task/IMPL-*.json`, `TODO_LIST.md`
3. Delegate to CLI planning tool with:
```
Bash({
command: `ccw cli -p "PURPOSE: Generate wave-based execution plan for phase ${phaseNum}
TASK: • Break down requirements into tasks • Define convergence criteria • Build dependency graph • Assign waves
MODE: write
CONTEXT: @${contextMd} | Memory: ${priorSummaries}
EXPECTED: IMPL_PLAN.md + IMPL-*.json files + TODO_LIST.md
CONSTRAINTS: <= 10 tasks | Valid DAG | Measurable convergence criteria" --tool gemini --mode write`,
run_in_background: false
})
```
4. CLI tool produces: `IMPL_PLAN.md`, `.task/IMPL-*.json`, `TODO_LIST.md`
5. If gap closure: only create tasks for gaps, starting from next available ID
## Phase 4: Self-Validation

View File

@@ -1,7 +1,8 @@
---
prefix: VERIFY
inner_loop: true
subagents: []
cli_tools:
- gemini --mode analysis
message_types:
success: verify_passed
failure: gaps_found

View File

@@ -15,8 +15,8 @@ Handle all coordinator monitoring events for the roadmap-dev pipeline using the
| Prefix | Role | Role Spec | inner_loop |
|--------|------|-----------|------------|
| PLAN | planner | `.claude/skills/team-roadmap-dev/role-specs/planner.md` | true (subagents: cli-explore-agent, action-planning-agent) |
| EXEC | executor | `.claude/skills/team-roadmap-dev/role-specs/executor.md` | true (subagents: code-developer) |
| PLAN | planner | `.claude/skills/team-roadmap-dev/role-specs/planner.md` | true (cli_tools: gemini --mode analysis) |
| EXEC | executor | `.claude/skills/team-roadmap-dev/role-specs/executor.md` | true (cli_tools: gemini --mode write) |
| VERIFY | verifier | `.claude/skills/team-roadmap-dev/role-specs/verifier.md` | true |
### Pipeline Structure

View File

@@ -13,7 +13,7 @@ Discuss project roadmap with the user using project-tech.json + specs/*.md as co
## Strategy
Direct interaction via AskUserQuestion. No delegation to workers or subagents. Coordinator handles this entirely.
Direct interaction via AskUserQuestion. No delegation to workers or CLI tools. Coordinator handles this entirely.
## Parameters
@@ -130,7 +130,7 @@ if (!autoYes) {
### Step 6: Analyze Codebase and Generate Phased Roadmap
```javascript
// Use Gemini CLI (or cli-explore-agent) to analyze the codebase
// Use Gemini CLI (or CLI exploration tool) to analyze the codebase
// and generate a phased breakdown based on goal + project context
Bash({
command: `ccw cli -p "PURPOSE: Analyze codebase and generate phased execution roadmap for: ${projectGoal}

View File

@@ -18,7 +18,7 @@ Orchestrate the roadmap-driven development workflow: init prerequisites -> roadm
- Manage state.md updates at every phase transition
- Route verifier gap results to planner for closure
- Parse user requirements and clarify ambiguous inputs via AskUserQuestion
- Create team and spawn worker subagents in background
- Create team and spawn worker team members in background
- Dispatch tasks with proper dependency chains
- Monitor progress via worker callbacks and route messages
- Maintain session state persistence
@@ -26,7 +26,7 @@ Orchestrate the roadmap-driven development workflow: init prerequisites -> roadm
### MUST NOT
- Execute any business tasks (code, analysis, testing, verification)
- Call code-developer, cli-explore-agent, or other implementation subagents
- Call CLI tools for code generation, exploration, or planning
- Modify source code or generate implementation artifacts
- Bypass worker roles to do work directly
- Skip roadmap discussion phase

View File

@@ -29,9 +29,8 @@
"display_name": "RD Planner",
"responsibility_type": "Orchestration",
"task_prefix": "PLAN",
"description": "Research, context gathering, task JSON generation via action-planning-agent",
"description": "Research, context gathering, task JSON generation via CLI planning tool",
"commands": ["research", "create-plans"],
"subagents": ["cli-explore-agent", "action-planning-agent"],
"cli_tools": [{"tool": "gemini", "mode": "analysis"}],
"message_types": ["plan_ready", "plan_progress", "error"]
},
@@ -42,7 +41,7 @@
"task_prefix": "EXEC",
"description": "Code implementation from IMPL-*.json tasks, wave-based parallel execution",
"commands": ["implement"],
"subagents": ["code-developer"],
"cli_tools": [{"tool": "gemini", "mode": "write"}],
"message_types": ["exec_complete", "exec_progress", "error"]
},
{