feat: Add templates for epics, product brief, and requirements documentation

- Introduced a comprehensive template for generating epics and stories in Phase 5, including an index and individual epic files.
- Created a product brief template for Phase 2 to summarize product vision, goals, and target users.
- Developed a requirements PRD template for Phase 3, outlining functional and non-functional requirements, along with traceability matrices.

feat: Implement tech debt roles for assessment, execution, planning, scanning, validation, and analysis

- Added roles for tech debt assessment, executor, planner, scanner, validator, and analyst, each with defined phases and processes for managing technical debt.
- Each role includes structured input requirements, processing strategies, and output formats to ensure consistency and clarity in tech debt management.
This commit is contained in:
catlog22
2026-03-07 13:32:04 +08:00
parent 7ee9b579fa
commit 29a1fea467
255 changed files with 14407 additions and 21120 deletions

View File

@@ -0,0 +1,35 @@
# Fix
Revision workflow for bug fixes and feedback-driven changes.
## Workflow
1. Read original task + feedback/revision notes from task description
2. Load original implementation context (files modified, approach taken)
3. Analyze feedback to identify specific changes needed
4. Apply fixes:
- Agent mode: Edit tool for targeted changes
- CLI mode: Resume previous session with fix prompt
5. Re-validate convergence criteria
6. Report: original task, changes applied, validation result
## Fix Prompt Template (CLI mode)
```
PURPOSE: Fix issues in <task.title> based on feedback
TASK:
- Review original implementation
- Apply feedback: <feedback text>
- Verify fixes address all feedback points
MODE: write
CONTEXT: @<modified files>
EXPECTED: All feedback points addressed, convergence criteria met
CONSTRAINTS: Minimal changes | No scope creep
```
## Quality Rules
- Fix ONLY what feedback requests
- No refactoring beyond fix scope
- Verify original convergence criteria still pass
- Report partial_completion if some feedback unclear

View File

@@ -0,0 +1,62 @@
# Implement
Execute implementation from task JSON via agent or CLI delegation.
## Agent Mode
Direct implementation using Edit/Write/Bash tools:
1. Read task.files[] as target files
2. Read task.implementation[] as step-by-step instructions
3. For each step:
- Substitute [variable] placeholders with pre_analysis results
- New file → Write tool; Modify file → Edit tool
- Follow task.reference patterns
4. Apply task.rationale.chosen_approach
5. Mitigate task.risks[] during implementation
Quality rules:
- Verify module existence before referencing
- Incremental progress — small working changes
- Follow existing patterns from task.reference
- ASCII-only, no premature abstractions
## CLI Delegation Mode
Build prompt from task JSON, delegate to CLI:
Prompt structure:
```
PURPOSE: <task.title>
<task.description>
TARGET FILES:
<task.files[] with paths and changes>
IMPLEMENTATION STEPS:
<task.implementation[] numbered>
PRE-ANALYSIS CONTEXT:
<pre_analysis results>
REFERENCE:
<task.reference pattern and files>
DONE WHEN:
<task.convergence.criteria[]>
MODE: write
CONSTRAINTS: Only modify listed files | Follow existing patterns
```
CLI call:
```
Bash({ command: `ccw cli -p "<prompt>" --tool <tool> --mode write --rule development-implement-feature`,
run_in_background: false, timeout: 3600000 })
```
Resume strategy:
| Strategy | Command |
|----------|---------|
| new | --id <session>-<task_id> |
| resume | --resume <parent_id> |