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

@@ -224,7 +224,7 @@ TDSCAN-001 内部并行架构:
┌────────────────────────────────────────────────────┐
│ Scanner Worker │
│ │
│ Fan-out A: Subagent Exploration (并行 cli-explore) │
│ Fan-out A: CLI Exploration (parallel CLI explore)
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │structure │ │patterns │ │deps │ │
│ │角度 │ │角度 │ │角度 │ │

View File

@@ -9,7 +9,7 @@ message_types:
# Tech Debt Executor
Debt cleanup executor. Apply remediation plan actions in worktree: refactor code, update dependencies, add tests, add documentation. Batch-delegate to code-developer subagent, self-validate after each batch.
Debt cleanup executor. Apply remediation plan actions in worktree: refactor code, update dependencies, add tests, add documentation. Batch-delegate to CLI tools, self-validate after each batch.
## Phase 2: Load Remediation Plan
@@ -32,14 +32,24 @@ Debt cleanup executor. Apply remediation plan actions in worktree: refactor code
## Phase 3: Execute Fixes
For each batch, delegate to `code-developer` subagent (synchronous, `run_in_background: false`):
For each batch, use CLI tool for implementation:
**Worktree constraint**: ALL file operations and commands must execute within worktree path. Use `cd "<worktree-path>" && ...` prefix for all Bash commands.
**Per-batch delegation**:
- Provide batch type prompt (refactor/update-deps/add-tests/add-docs/restructure)
- List all items with file paths, descriptions, and fix steps
- Enforce: read files before modifying, minimal changes, backward compatibility, no new features, no suppressions
```bash
ccw cli -p "PURPOSE: Apply tech debt fixes in batch; success = all items fixed without breaking changes
TASK: <batch-type-specific-tasks>
MODE: write
CONTEXT: @<worktree-path>/**/* | Memory: Remediation plan context
EXPECTED: Code changes that fix debt items, maintain backward compatibility, pass existing tests
CONSTRAINTS: Minimal changes only | No new features | No suppressions | Read files before modifying
Batch type: <refactor|update-deps|add-tests|add-docs|restructure>
Items: <list-of-items-with-file-paths-and-descriptions>" --tool gemini --mode write --cd "<worktree-path>"
```
Wait for CLI completion before proceeding to next batch.
**Fix Results Tracking**:

View File

@@ -1,7 +1,6 @@
---
prefix: TDSCAN
inner_loop: false
subagents: []
message_types:
success: scan_complete
error: error
@@ -47,8 +46,8 @@ Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, arch
| Score | Complexity | Strategy |
|-------|------------|----------|
| >= 4 | High | Triple Fan-out: subagent explore + CLI 5 dimensions + multi-perspective Gemini |
| 2-3 | Medium | Dual Fan-out: subagent explore + CLI 3 dimensions |
| >= 4 | High | Triple Fan-out: CLI explore + CLI 5 dimensions + multi-perspective Gemini |
| 2-3 | Medium | Dual Fan-out: CLI explore + CLI 3 dimensions |
| 0-1 | Low | Inline: ACE search + Grep |
## Phase 3: Multi-Dimension Scan
@@ -58,7 +57,7 @@ Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, arch
- Classify findings into dimensions
**Medium/High Complexity** (Fan-out):
- Fan-out A: Subagent exploration (structure, patterns, dependencies angles) via `cli-explore-agent`
- Fan-out A: CLI exploration (structure, patterns, dependencies angles) via `ccw cli --tool gemini --mode analysis`
- Fan-out B: CLI dimension analysis (parallel gemini per dimension -- code, architecture, testing, dependency, documentation)
- Fan-out C (High only): Multi-perspective Gemini analysis (security, performance, code-quality, architecture)
- Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings

View File

@@ -58,8 +58,18 @@ Execute 4-layer validation (all commands in worktree):
- improvement_percentage = ((before - after) / before) * 100
**Auto-fix attempt** (when total_regressions <= 3):
- Spawn code-developer subagent to fix regressions in worktree
- Constraints: fix only regressions, preserve debt cleanup changes, no suppressions
- Use CLI tool to fix regressions in worktree:
```
Bash({
command: `cd "${worktreePath}" && ccw cli -p "PURPOSE: Fix regressions found in validation
TASK: ${regressionDetails}
MODE: write
CONTEXT: @${modifiedFiles.join(' @')}
EXPECTED: Fixed regressions
CONSTRAINTS: Fix only regressions | Preserve debt cleanup changes | No suppressions" --tool gemini --mode write`,
run_in_background: false
})
```
- Re-run checks after fix attempt
## Phase 4: Compare & Report

View File

@@ -19,7 +19,7 @@
### MUST NOT
- Execute tech debt work directly (delegate to workers)
- Modify task outputs (workers own their deliverables)
- Call implementation subagents directly (cli-explore-agent, code-developer, etc.)
- Call CLI tools for analysis, exploration, or code generation
- Modify source code or generate artifact files directly
- Bypass worker roles to complete delegated work
- Skip dependency validation when creating task chains
@@ -100,7 +100,7 @@ For callback/check/resume/complete: load `commands/monitor.md` and execute match
| `Task` | Tool | Phase 4 | Worker spawning |
| `AskUserQuestion` | Tool | Phase 1 | Requirement clarification |
> Coordinator does not directly use CLI analysis tools or implementation subagents
> Coordinator does not directly use CLI analysis tools or CLI code generation
---

View File

@@ -23,8 +23,7 @@
"message_types_sent": ["scan_complete", "debt_items_found", "error"],
"message_types_received": [],
"commands": ["scan-debt"],
"cli_tools": ["gemini"],
"subagents": ["cli-explore-agent"]
"cli_tools": ["gemini"]
},
"assessor": {
"name": "assessor",
@@ -44,8 +43,7 @@
"message_types_sent": ["plan_ready", "plan_revision", "error"],
"message_types_received": [],
"commands": ["create-plan"],
"cli_tools": ["gemini"],
"subagents": ["cli-explore-agent"]
"cli_tools": ["gemini"]
},
"executor": {
"name": "executor",
@@ -55,7 +53,7 @@
"message_types_sent": ["fix_complete", "fix_progress", "error"],
"message_types_received": [],
"commands": ["remediate"],
"subagents": ["code-developer"]
"cli_tools": [{"tool": "gemini", "mode": "write"}]
},
"validator": {
"name": "validator",
@@ -65,8 +63,7 @@
"message_types_sent": ["validation_complete", "regression_found", "error"],
"message_types_received": [],
"commands": ["verify"],
"subagents": ["code-developer"],
"cli_tools": ["gemini"]
"cli_tools": [{"tool": "gemini", "mode": "write"}]
}
},