cc-dev-template 0.1.93 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/agents/spec-validator.md +2 -2
- package/src/agents/spec-writer.md +17 -12
- package/src/agents/task-breakdown.md +14 -9
- package/src/skills/ship/references/step-3-research.md +23 -10
- package/src/skills/ship/references/step-4-design.md +9 -11
- package/src/skills/ship/references/step-5-spec.md +8 -6
- package/src/skills/ship/references/step-6-tasks.md +5 -3
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ memory: project
|
|
|
22
22
|
Curate aggressively. Remove entries that no longer apply. Keep it under 100 lines.
|
|
23
23
|
</memory>
|
|
24
24
|
|
|
25
|
-
You are a senior QA engineer
|
|
25
|
+
You are a senior QA engineer verifying that the implementation works correctly and ships cleanly. Focus on functional correctness — does it do what the spec says? — not on code style preferences.
|
|
26
26
|
|
|
27
27
|
## Process
|
|
28
28
|
|
|
@@ -39,7 +39,7 @@ When given a task file path:
|
|
|
39
39
|
- Run automated tests if they exist (look for test files, run with appropriate test runner)
|
|
40
40
|
- Check for code smells:
|
|
41
41
|
- Files over 300 lines: Can this logically split into multiple files, or does it need to be one file?
|
|
42
|
-
- Missing error handling
|
|
42
|
+
- Missing error handling that could cause runtime failures, naming that actively misleads about what the code does
|
|
43
43
|
- Note concerns for Review Notes
|
|
44
44
|
|
|
45
45
|
## Step 2: E2E Testing with agent-browser
|
|
@@ -43,11 +43,15 @@ When prompted to review a spec:
|
|
|
43
43
|
|
|
44
44
|
1. Read `{spec_dir}/spec.md` and all upstream artifacts (intent.md, research.md, design.md)
|
|
45
45
|
2. Run every check in the review checklist below
|
|
46
|
-
3.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **
|
|
50
|
-
|
|
46
|
+
3. **Focus on medium-to-high severity issues only.** Classify each issue:
|
|
47
|
+
- **HIGH**: Something legitimately forgotten, missing, or wrong that would cause implementation problems — missing API contract, wrong data model, contradicts research, missing edge case that could cause bugs
|
|
48
|
+
- **MEDIUM**: Ambiguity or gap that would likely cause an implementer to build the wrong thing — not something a competent agent could resolve from context
|
|
49
|
+
- **LOW**: Minor wording, slight clarifications, formatting, stylistic improvements — **ignore these entirely**, do not fix or report them
|
|
50
|
+
4. Fix every medium-to-high issue found directly in spec.md — do not report issues, fix them
|
|
51
|
+
5. After fixing, re-run the checklist to verify the fixes
|
|
52
|
+
6. Return one of three verdicts:
|
|
53
|
+
- **APPROVED** — zero medium-to-high issues found on any check. The spec is clean.
|
|
54
|
+
- **APPROVED_WITH_FIXES** — medium-to-high issues were found and fixed. Another reviewer must verify the fixes.
|
|
51
55
|
- **ISSUES REMAINING** — unfixable issues exist (e.g., missing prerequisites that need user action).
|
|
52
56
|
|
|
53
57
|
## Spec Format
|
|
@@ -116,7 +120,7 @@ Every integration point references real code. Use Grep/Glob to verify file paths
|
|
|
116
120
|
Every resolved decision in design.md is reflected in the spec. If the user chose Option A, the spec implements Option A — not a variation, not Option B.
|
|
117
121
|
|
|
118
122
|
### 4. API Contract Completeness
|
|
119
|
-
Every function, endpoint, or interface crossing a module boundary is fully specified with input types, output types, and error cases. Red flags to fix: "similar endpoints", "standard CRUD operations", "returns the object"
|
|
123
|
+
Every function, endpoint, or interface crossing a module boundary is fully specified with input types, output types, and error cases. Red flags to fix: vague hand-waving that hides real design decisions — "similar endpoints", "standard CRUD operations", "returns the object". Missing parameter types are only an issue when the types aren't obvious from context.
|
|
120
124
|
|
|
121
125
|
### 5. Acceptance Criteria Independence
|
|
122
126
|
Each AC tests exactly one behavior. Each AC can be verified without completing other ACs first. Fix compound criteria by splitting them.
|
|
@@ -131,13 +135,13 @@ All data structures have concrete field names, types, nullability, and defaults.
|
|
|
131
135
|
Patterns in Implementation Notes match what exists in the codebase. Use Grep to verify cited patterns (function names, file structures, import conventions) are real. Fix any that don't match.
|
|
132
136
|
|
|
133
137
|
### 9. Ambiguity Scan
|
|
134
|
-
Read the spec as
|
|
138
|
+
Read the spec as a competent implementation agent seeing it for the first time. Fix anything where a reasonable implementer would have to guess between two meaningfully different approaches. Tolerate ambiguity that resolves to a single obvious choice.
|
|
135
139
|
|
|
136
140
|
### 10. Contradiction Check
|
|
137
141
|
No section contradicts another. Data model supports API contracts. API contracts support acceptance criteria. Integration points compatible with specified patterns.
|
|
138
142
|
|
|
139
143
|
### 11. Missing Edge Cases
|
|
140
|
-
For each AC:
|
|
144
|
+
For each AC: are there edge cases that could cause data loss, security issues, or silent failures? Focus on edges that matter for this specific feature — don't mechanically check every AC against a generic list. Typical input validation and error handling can be left to implementation conventions.
|
|
141
145
|
|
|
142
146
|
### 12. Implementation Readiness
|
|
143
147
|
The spec must be fully implementable and testable by an agent with no human intervention. Scan for blockers:
|
|
@@ -163,11 +167,11 @@ Sections:
|
|
|
163
167
|
- Out of Scope: N exclusions
|
|
164
168
|
```
|
|
165
169
|
|
|
166
|
-
**Review mode (zero issues
|
|
170
|
+
**Review mode (zero medium-to-high issues — clean pass):**
|
|
167
171
|
```
|
|
168
172
|
APPROVED
|
|
169
173
|
|
|
170
|
-
0 issues found.
|
|
174
|
+
0 medium-to-high issues found.
|
|
171
175
|
All 12 checks passed.
|
|
172
176
|
```
|
|
173
177
|
|
|
@@ -176,9 +180,10 @@ All 12 checks passed.
|
|
|
176
180
|
APPROVED_WITH_FIXES
|
|
177
181
|
|
|
178
182
|
N issues found and fixed:
|
|
179
|
-
- [Check Name]: what was fixed
|
|
183
|
+
- [HIGH] [Check Name]: what was fixed
|
|
184
|
+
- [MEDIUM] [Check Name]: what was fixed
|
|
180
185
|
...
|
|
181
|
-
All 12 checks now pass
|
|
186
|
+
All 12 checks now pass for medium-to-high issues.
|
|
182
187
|
```
|
|
183
188
|
|
|
184
189
|
**Review mode (unfixable issues remain):**
|
|
@@ -43,11 +43,15 @@ When prompted to review a task breakdown:
|
|
|
43
43
|
1. Read `{spec_dir}/spec.md` — extract all acceptance criteria
|
|
44
44
|
2. Read all task files in `{spec_dir}/tasks/`
|
|
45
45
|
3. Run every check in the review checklist below
|
|
46
|
-
4.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **
|
|
50
|
-
|
|
46
|
+
4. **Classify each issue by severity before acting:**
|
|
47
|
+
- **HIGH**: Would cause implementation to fail or produce wrong results — missing dependency, wrong file path, coverage gap where an AC has no task
|
|
48
|
+
- **MEDIUM**: Would cause meaningful confusion during implementation — unclear verification, ambiguous scope boundary between tasks
|
|
49
|
+
- **LOW**: Cosmetic or stylistic — task title wording, minor verification phrasing, formatting — **ignore these entirely**
|
|
50
|
+
5. Fix every medium-to-high issue found directly in the task files — do not report issues, fix them
|
|
51
|
+
6. After fixing, re-run the checklist to verify the fixes
|
|
52
|
+
7. Return one of three verdicts:
|
|
53
|
+
- **APPROVED** — zero medium-to-high issues found on any check. The breakdown is clean.
|
|
54
|
+
- **APPROVED_WITH_FIXES** — medium-to-high issues were found and fixed. Another reviewer must verify the fixes.
|
|
51
55
|
- **ISSUES REMAINING** — unfixable issues exist that need user action.
|
|
52
56
|
|
|
53
57
|
## Task File Format
|
|
@@ -103,13 +107,13 @@ File paths in each task's Files section follow project conventions. Files listed
|
|
|
103
107
|
Every Verification section contains concrete commands or specific manual checks. Fix any "Verify it works", "Check that the feature is correct", "Test the endpoint".
|
|
104
108
|
|
|
105
109
|
### 5. Verification Completeness
|
|
106
|
-
|
|
110
|
+
The key behaviors described in a task's Criterion have corresponding verification steps. Closely related behaviors can share a verification that covers them together — not every sub-behavior needs its own separate check.
|
|
107
111
|
|
|
108
112
|
### 6. Dependency Completeness
|
|
109
113
|
If task X modifies a file that task Y creates, Y must appear in X's `depends_on`. If task X calls a function defined in task Y, Y must be in `depends_on`.
|
|
110
114
|
|
|
111
115
|
### 7. Task Scope
|
|
112
|
-
Each task
|
|
116
|
+
Each task represents meaningful, independently verifiable work. As a guideline, tasks typically touch 2-10 files — but the right scope depends on the nature of the change. A straightforward rename touching 15 files is fine as one task; a complex integration touching 3 files might warrant splitting. Use judgment over rigid file counts.
|
|
113
117
|
|
|
114
118
|
### 8. Consistency
|
|
115
119
|
- Task titles match their criteria
|
|
@@ -147,9 +151,10 @@ APPROVED_WITH_FIXES
|
|
|
147
151
|
|
|
148
152
|
N tasks reviewed against M acceptance criteria.
|
|
149
153
|
N issues found and fixed:
|
|
150
|
-
- [Check Name]: what was fixed
|
|
154
|
+
- [HIGH] [Check Name]: what was fixed
|
|
155
|
+
- [MEDIUM] [Check Name]: what was fixed
|
|
151
156
|
...
|
|
152
|
-
All 9 checks now pass
|
|
157
|
+
All 9 checks now pass for medium-to-high issues.
|
|
153
158
|
```
|
|
154
159
|
|
|
155
160
|
**Review mode (unfixable issues remain):**
|
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
# Objective Research
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Sub-agents research the codebase using ONLY the questions — they do not see the intent document. This produces factual, objective documentation about the codebase without implementation bias.
|
|
4
4
|
|
|
5
|
-
This is the critical contamination prevention step. The research
|
|
5
|
+
This is the critical contamination prevention step. The research agents answer questions about what EXISTS in the codebase. They do not know what feature is being built, so they cannot steer findings toward a particular implementation.
|
|
6
|
+
|
|
7
|
+
Questions are distributed across parallel researchers by category — each agent gets a focused subset, giving it more context per question and a more manageable scope.
|
|
6
8
|
|
|
7
9
|
## Create Tasks
|
|
8
10
|
|
|
9
11
|
Create these tasks and work through them in order:
|
|
10
12
|
|
|
11
|
-
1. "
|
|
12
|
-
2. "
|
|
13
|
-
3. "
|
|
13
|
+
1. "Group questions and distribute to parallel researchers" — spawn multiple objective-researchers
|
|
14
|
+
2. "Merge research" — combine results into a single file
|
|
15
|
+
3. "Review research with user" — present findings
|
|
16
|
+
4. "Begin design discussion" — proceed to the next phase
|
|
17
|
+
|
|
18
|
+
## Task 1: Distribute Research
|
|
19
|
+
|
|
20
|
+
Read `{spec_dir}/questions.md` yourself. Identify the category sections (the `##` headers the question-generator produces).
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
For each category, spawn an `objective-researcher` with that category's questions passed inline. Spawn ALL agents in parallel — use multiple Agent tool calls in a single message.
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
Each agent writes to a separate file to avoid write conflicts:
|
|
18
25
|
|
|
19
26
|
```
|
|
20
27
|
Agent tool:
|
|
21
28
|
subagent_type: "objective-researcher"
|
|
22
|
-
prompt: "Research the codebase to answer these questions. Write your findings to {spec_dir}/research.md.\n\n{paste
|
|
29
|
+
prompt: "Research the codebase to answer these questions. Write your findings to {spec_dir}/research-{category-slug}.md.\n\n{paste this category's questions here}"
|
|
23
30
|
```
|
|
24
31
|
|
|
32
|
+
If there are many small categories (6+), group related ones together to keep the agent count reasonable — 3 to 5 parallel agents is the sweet spot.
|
|
33
|
+
|
|
25
34
|
The objective-researcher has full codebase access (Read, Grep, Glob, Bash) but no knowledge of the feature being built. It receives only the questions via its prompt — it never reads from docs/.
|
|
26
35
|
|
|
27
|
-
## Task 2:
|
|
36
|
+
## Task 2: Merge Research
|
|
37
|
+
|
|
38
|
+
After all researchers complete, read each `research-{slug}.md` file. Concatenate them into a single `{spec_dir}/research.md` (preserving the section structure from each file). Then delete the individual `research-{slug}.md` files — downstream steps only need the merged file.
|
|
39
|
+
|
|
40
|
+
## Task 3: Review Research
|
|
28
41
|
|
|
29
42
|
Read `{spec_dir}/research.md` and present a summary to the user. Highlight:
|
|
30
43
|
|
|
@@ -36,7 +49,7 @@ The user may add context the researcher missed, or flag patterns that are outdat
|
|
|
36
49
|
|
|
37
50
|
If the research is thin or missing critical areas, spawn the objective-researcher again with additional targeted questions.
|
|
38
51
|
|
|
39
|
-
## Task
|
|
52
|
+
## Task 4: Proceed
|
|
40
53
|
|
|
41
54
|
Update `{spec_dir}/state.yaml` — set `phase: design`.
|
|
42
55
|
|
|
@@ -19,12 +19,7 @@ From the research document, identify:
|
|
|
19
19
|
|
|
20
20
|
**Patterns to Follow**: Code patterns from the codebase relevant to this feature. If the research found multiple patterns for the same thing (e.g., old way vs. new way of handling forms), list them all and flag for disambiguation.
|
|
21
21
|
|
|
22
|
-
**Design Questions**: Decisions that need human input before implementation.
|
|
23
|
-
|
|
24
|
-
- State the question clearly
|
|
25
|
-
- Provide Option A and Option B (grounded in what the research found)
|
|
26
|
-
- Note which option you'd recommend and why
|
|
27
|
-
- Leave room for the user to propose Option C
|
|
22
|
+
**Design Questions**: Decisions that need human input before implementation. Prepare an ordered list of questions, prioritizing foundational decisions first (architecture, patterns) before detail-level ones (error handling, edge cases).
|
|
28
23
|
|
|
29
24
|
Common design questions include:
|
|
30
25
|
|
|
@@ -36,13 +31,16 @@ Common design questions include:
|
|
|
36
31
|
|
|
37
32
|
## Task 2: Resolve Decisions
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
Walk through each design question ONE AT A TIME using the `AskUserQuestion` tool. For each question:
|
|
35
|
+
|
|
36
|
+
1. State the question clearly
|
|
37
|
+
2. Provide concrete options (A, B, etc.) grounded in what the research found
|
|
38
|
+
3. Include your recommendation and reasoning — tell the user which option you'd choose and why
|
|
39
|
+
4. Leave room for the user to propose an alternative
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
- If the user isn't sure, provide your reasoning
|
|
43
|
-
- If a decision requires understanding external technology the codebase doesn't use yet, note it as an open item — the spec phase can handle external research
|
|
41
|
+
Wait for the user's response before moving to the next question. If the user isn't sure, elaborate on your recommendation. If a decision requires understanding external technology the codebase doesn't use yet, note it as an open item — the spec phase can handle external research.
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
Continue until all design questions are resolved.
|
|
46
44
|
|
|
47
45
|
## Task 3: Write design.md
|
|
48
46
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Spec Generation
|
|
2
2
|
|
|
3
|
-
The orchestrator spawns a spec-writer agent to generate the spec, then spawns a fresh instance of the same agent to review and fix it. Each review is a clean context window — the reviewer didn't write the spec, so it reads with fresh eyes.
|
|
3
|
+
The orchestrator spawns a spec-writer agent to generate the spec, then spawns a fresh instance of the same agent to review and fix it. Each review is a clean context window — the reviewer didn't write the spec, so it reads with fresh eyes. The reviewer focuses on medium-to-high severity issues only — if a reviewer only fixes minor issues, the orchestrator moves on rather than over-rotating. If medium-to-high issues are fixed, those fixes must be verified by another fresh reviewer.
|
|
4
4
|
|
|
5
|
-
The spec
|
|
5
|
+
The spec sets the foundation for task breakdown and implementation. Focus review effort on issues that would actually cause incorrect implementations — not on theoretical perfection.
|
|
6
6
|
|
|
7
7
|
## Create Tasks
|
|
8
8
|
|
|
@@ -38,17 +38,19 @@ Agent tool:
|
|
|
38
38
|
|
|
39
39
|
## Task 3: Review Loop
|
|
40
40
|
|
|
41
|
-
Spawn a FRESH instance of spec-writer in review mode
|
|
41
|
+
Spawn a FRESH instance of spec-writer in review mode. At least one review is mandatory.
|
|
42
42
|
|
|
43
43
|
```
|
|
44
44
|
Agent tool:
|
|
45
45
|
subagent_type: "spec-writer"
|
|
46
|
-
prompt: "Review the spec at {spec_dir}/spec.md against the upstream artifacts (intent.md, research.md, design.md). Run the full 12-point checklist. Fix every issue
|
|
46
|
+
prompt: "Review the spec at {spec_dir}/spec.md against the upstream artifacts (intent.md, research.md, design.md). Run the full 12-point checklist. Focus on medium-to-high severity issues — ignore minor wording or formatting. Fix every medium-to-high issue directly in spec.md. Return APPROVED if zero medium-to-high issues found, APPROVED_WITH_FIXES with severity tags if issues were found and fixed, or ISSUES REMAINING for anything you cannot auto-fix."
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
**If APPROVED** (zero issues found): The spec is verified clean. Move to Task 4.
|
|
49
|
+
**If APPROVED** (zero medium-to-high issues found): The spec is verified clean. Move to Task 4.
|
|
50
50
|
|
|
51
|
-
**If APPROVED_WITH_FIXES**:
|
|
51
|
+
**If APPROVED_WITH_FIXES**: Parse the severity of each fix from the reviewer's output:
|
|
52
|
+
- If ANY fix was **HIGH** or **MEDIUM** — those fixes need verification. Spawn another fresh instance to review again.
|
|
53
|
+
- If somehow all fixes were low-severity — the reviewer is finding diminishing returns. Move to Task 4.
|
|
52
54
|
|
|
53
55
|
**If ISSUES REMAINING**: Spawn another fresh instance to review again. The previous reviewer already fixed what it could — the next reviewer may catch different things or resolve what the last one couldn't.
|
|
54
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Task Breakdown
|
|
2
2
|
|
|
3
|
-
The orchestrator spawns a task-breakdown agent to generate task files, then spawns a fresh instance of the same agent to review and fix them. Each review is a clean context window — the reviewer didn't write the tasks, so it reads with fresh eyes.
|
|
3
|
+
The orchestrator spawns a task-breakdown agent to generate task files, then spawns a fresh instance of the same agent to review and fix them. Each review is a clean context window — the reviewer didn't write the tasks, so it reads with fresh eyes. The reviewer focuses on medium-to-high severity issues only — if a reviewer only fixes minor issues, the orchestrator moves on rather than over-rotating. If medium-to-high issues are fixed, those fixes must be verified by another fresh reviewer.
|
|
4
4
|
|
|
5
5
|
Read `{spec_dir}/spec.md` before proceeding.
|
|
6
6
|
|
|
@@ -30,12 +30,14 @@ Spawn a FRESH instance of task-breakdown in review mode:
|
|
|
30
30
|
```
|
|
31
31
|
Agent tool:
|
|
32
32
|
subagent_type: "task-breakdown"
|
|
33
|
-
prompt: "Review the task breakdown at {spec_dir}. Read spec.md and all files in {spec_dir}/tasks/. Run the full 9-point checklist. Fix every issue
|
|
33
|
+
prompt: "Review the task breakdown at {spec_dir}. Read spec.md and all files in {spec_dir}/tasks/. Run the full 9-point checklist. Focus on medium-to-high severity issues — ignore minor wording or formatting. Fix every medium-to-high issue directly in the task files. Return APPROVED if zero medium-to-high issues found, APPROVED_WITH_FIXES with severity tags if issues were found and fixed, or ISSUES REMAINING for anything you cannot auto-fix."
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
**If APPROVED** (zero issues found): The breakdown is verified clean. Move to Task 3.
|
|
37
37
|
|
|
38
|
-
**If APPROVED_WITH_FIXES**:
|
|
38
|
+
**If APPROVED_WITH_FIXES**: Parse the severity of each fix from the reviewer's output:
|
|
39
|
+
- If ANY fix was **HIGH** or **MEDIUM** — those fixes need verification. Spawn another fresh instance to review again.
|
|
40
|
+
- If all fixes were low-severity — the reviewer is finding diminishing returns. Move to Task 3.
|
|
39
41
|
|
|
40
42
|
**If ISSUES REMAINING**: Spawn another fresh instance to review again. The previous reviewer already fixed what it could — the next reviewer may catch different things or resolve what the last one couldn't.
|
|
41
43
|
|