cc-dev-template 0.1.80 → 0.1.82

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.
Files changed (94) hide show
  1. package/bin/install.js +10 -1
  2. package/package.json +1 -1
  3. package/src/agents/objective-researcher.md +52 -0
  4. package/src/agents/question-generator.md +70 -0
  5. package/src/scripts/restrict-to-spec-dir.sh +23 -0
  6. package/src/skills/agent-browser/SKILL.md +7 -133
  7. package/src/skills/agent-browser/references/common-patterns.md +64 -0
  8. package/src/skills/agent-browser/references/ios-simulator.md +25 -0
  9. package/src/skills/agent-browser/references/reflect.md +9 -0
  10. package/src/skills/agent-browser/references/semantic-locators.md +11 -0
  11. package/src/skills/claude-md/SKILL.md +1 -3
  12. package/src/skills/claude-md/references/audit-reflect.md +0 -4
  13. package/src/skills/claude-md/references/audit.md +1 -3
  14. package/src/skills/claude-md/references/create-reflect.md +0 -4
  15. package/src/skills/claude-md/references/create.md +1 -3
  16. package/src/skills/claude-md/references/modify-reflect.md +0 -4
  17. package/src/skills/claude-md/references/modify.md +1 -3
  18. package/src/skills/creating-agent-skills/SKILL.md +2 -2
  19. package/src/skills/creating-agent-skills/references/create-step-1-understand.md +1 -1
  20. package/src/skills/creating-agent-skills/references/create-step-2-design.md +3 -3
  21. package/src/skills/creating-agent-skills/references/create-step-3-write.md +42 -10
  22. package/src/skills/creating-agent-skills/references/create-step-4-review.md +2 -2
  23. package/src/skills/creating-agent-skills/references/create-step-5-install.md +1 -3
  24. package/src/skills/creating-agent-skills/references/create-step-6-reflect.md +1 -3
  25. package/src/skills/creating-agent-skills/references/fix-step-1-diagnose.md +5 -4
  26. package/src/skills/creating-agent-skills/references/fix-step-2-apply.md +2 -2
  27. package/src/skills/creating-agent-skills/references/fix-step-3-validate.md +1 -3
  28. package/src/skills/creating-agent-skills/references/fix-step-4-reflect.md +1 -3
  29. package/src/skills/creating-agent-skills/templates/router-skill.md +3 -3
  30. package/src/skills/creating-sub-agents/references/create-step-1-understand.md +1 -1
  31. package/src/skills/creating-sub-agents/references/create-step-2-design.md +1 -1
  32. package/src/skills/creating-sub-agents/references/create-step-3-write.md +1 -1
  33. package/src/skills/creating-sub-agents/references/create-step-4-review.md +1 -1
  34. package/src/skills/creating-sub-agents/references/create-step-5-install.md +1 -3
  35. package/src/skills/creating-sub-agents/references/create-step-6-reflect.md +0 -4
  36. package/src/skills/creating-sub-agents/references/fix-step-3-validate.md +1 -3
  37. package/src/skills/creating-sub-agents/references/fix-step-4-reflect.md +0 -4
  38. package/src/skills/initialize-project/SKILL.md +2 -4
  39. package/src/skills/initialize-project/references/reflect.md +0 -4
  40. package/src/skills/project-setup/references/step-5-verify.md +1 -3
  41. package/src/skills/project-setup/references/step-6-reflect.md +0 -4
  42. package/src/skills/prompting/SKILL.md +1 -1
  43. package/src/skills/prompting/references/create-reflect.md +0 -4
  44. package/src/skills/prompting/references/create.md +1 -3
  45. package/src/skills/prompting/references/review-reflect.md +0 -4
  46. package/src/skills/prompting/references/review.md +1 -3
  47. package/src/skills/setup-lsp/SKILL.md +1 -1
  48. package/src/skills/setup-lsp/references/step-1-scan.md +1 -1
  49. package/src/skills/setup-lsp/references/step-2-install-configure.md +1 -3
  50. package/src/skills/setup-lsp/references/step-3-verify.md +1 -3
  51. package/src/skills/setup-lsp/references/step-4-reflect.md +0 -2
  52. package/src/skills/ship/SKILL.md +46 -0
  53. package/src/skills/ship/references/step-1-intent.md +50 -0
  54. package/src/skills/ship/references/step-2-questions.md +42 -0
  55. package/src/skills/ship/references/step-3-research.md +44 -0
  56. package/src/skills/ship/references/step-4-design.md +70 -0
  57. package/src/skills/ship/references/step-5-spec.md +86 -0
  58. package/src/skills/ship/references/step-6-tasks.md +83 -0
  59. package/src/skills/ship/references/step-7-implement.md +61 -0
  60. package/src/skills/ship/references/step-8-reflect.md +21 -0
  61. package/src/skills/execute-spec/SKILL.md +0 -48
  62. package/src/skills/execute-spec/references/phase-1-hydrate.md +0 -71
  63. package/src/skills/execute-spec/references/phase-2-build.md +0 -63
  64. package/src/skills/execute-spec/references/phase-3-validate.md +0 -72
  65. package/src/skills/execute-spec/references/phase-4-triage.md +0 -75
  66. package/src/skills/execute-spec/references/phase-5-reflect.md +0 -34
  67. package/src/skills/execute-spec/references/workflow.md +0 -82
  68. package/src/skills/research/SKILL.md +0 -14
  69. package/src/skills/research/references/step-1-check-existing.md +0 -25
  70. package/src/skills/research/references/step-2-conduct-research.md +0 -67
  71. package/src/skills/research/references/step-3-reflect.md +0 -33
  72. package/src/skills/spec-interview/SKILL.md +0 -48
  73. package/src/skills/spec-interview/references/critic-prompt.md +0 -140
  74. package/src/skills/spec-interview/references/pragmatist-prompt.md +0 -76
  75. package/src/skills/spec-interview/references/researcher-prompt.md +0 -46
  76. package/src/skills/spec-interview/references/step-1-opening.md +0 -47
  77. package/src/skills/spec-interview/references/step-2-ideation.md +0 -73
  78. package/src/skills/spec-interview/references/step-3-ui-ux.md +0 -83
  79. package/src/skills/spec-interview/references/step-4-deep-dive.md +0 -119
  80. package/src/skills/spec-interview/references/step-5-research-needs.md +0 -53
  81. package/src/skills/spec-interview/references/step-6-verification.md +0 -89
  82. package/src/skills/spec-interview/references/step-7-finalize.md +0 -62
  83. package/src/skills/spec-interview/references/step-8-reflect.md +0 -34
  84. package/src/skills/spec-review/SKILL.md +0 -92
  85. package/src/skills/spec-sanity-check/SKILL.md +0 -82
  86. package/src/skills/spec-to-tasks/SKILL.md +0 -24
  87. package/src/skills/spec-to-tasks/references/step-1-identify-spec.md +0 -39
  88. package/src/skills/spec-to-tasks/references/step-2-explore.md +0 -43
  89. package/src/skills/spec-to-tasks/references/step-3-generate.md +0 -69
  90. package/src/skills/spec-to-tasks/references/step-4-review.md +0 -95
  91. package/src/skills/spec-to-tasks/references/step-5-reflect.md +0 -22
  92. package/src/skills/spec-to-tasks/templates/task.md +0 -30
  93. package/src/skills/task-review/SKILL.md +0 -18
  94. package/src/skills/task-review/references/checklist.md +0 -155
@@ -45,7 +45,7 @@ Go through each file and verify:
45
45
  - Description uses third person with quoted trigger phrases?
46
46
  - All referenced files exist? (no broken links)
47
47
  - For procedural skills: dedicated reflection step file as the final step in the chain?
48
- - Chain link to reflection step uses mandatory language? ("IMPORTANT: You are not done. You MUST read and complete the next step.")
48
+ - Chain link to reflection step uses redirect pattern? ("Use the Read tool on `references/...` to review your work and report results to the user.")
49
49
  - For informational skills: reflection section at the end of SKILL.md?
50
50
  - For forked-context skills: "Skill Observations" section in the output format?
51
51
 
@@ -64,4 +64,4 @@ Only proceed when validation passes and self-review is clean.
64
64
 
65
65
  If you found and fixed issues, re-run both the self-review and validation to confirm.
66
66
 
67
- Read `references/create-step-5-install.md` when review passes with no remaining issues.
67
+ Use the Read tool on `references/create-step-5-install.md` to install and test the skill.
@@ -62,6 +62,4 @@ Summarize what was created:
62
62
  - Trigger phrases
63
63
  - File structure (list all files)
64
64
 
65
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
66
-
67
- Read `references/create-step-6-reflect.md` now.
65
+ Use the Read tool on `references/create-step-6-reflect.md` to review your work and report results to the user.
@@ -1,8 +1,6 @@
1
1
  # Step 6: Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The skill creation workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience creating this skill. The purpose is to improve the creating-agent-skills skill itself based on what you just learned.
3
+ Reflect on your experience creating this skill and report results to the user. This step improves the creating-agent-skills skill itself based on what you just learned.
6
4
 
7
5
  ## Assess
8
6
 
@@ -74,10 +74,11 @@ Evaluate each file against these criteria:
74
74
 
75
75
  ### Self-Learning
76
76
  - For procedural skills: does the skill have a dedicated reflection step file as the final step in its chain?
77
- - Does the chain link to the reflection step use mandatory language? ("IMPORTANT: You are not done. You MUST read and complete the next step.")
77
+ - Does the chain link to the reflection step use the redirect pattern? (e.g., "Use the Read tool on `references/step-N-reflect.md` to review your work and report results to the user.")
78
+ - Do chain links use positive redirect framing, not negative warnings like "IMPORTANT: You are not done"?
78
79
  - For informational skills: is there a reflection section at the end of SKILL.md?
79
80
  - For forked-context skills (`context: fork`): does the output format include a "Skill Observations" section?
80
- - If missing or embedded as a section in another step file, flag it — every procedural skill needs a separate mandatory reflection step.
81
+ - If missing or embedded as a section in another step file, flag it — every procedural skill needs a separate reflection step.
81
82
 
82
83
  ## Summarize Findings
83
84
 
@@ -114,5 +115,5 @@ Tell the user which type of fix is needed.
114
115
 
115
116
  | Fix Type | Action |
116
117
  |----------|--------|
117
- | Surface fixes only | Read `references/fix-step-2-apply.md` |
118
- | Structural changes needed | Read `references/create-step-2-design.md` first to design the new structure, then read `references/fix-step-2-apply.md` to apply |
118
+ | Surface fixes only | Use the Read tool on `references/fix-step-2-apply.md` to apply the fixes |
119
+ | Structural changes needed | Use the Read tool on `references/create-step-2-design.md` to design the new structure, then read `references/fix-step-2-apply.md` to apply |
@@ -94,7 +94,7 @@ Does this justify its token cost? If Claude already knows it — remove it. If i
94
94
 
95
95
  **Fix description:** Rewrite to third person, add quoted trigger phrases, focus on WHEN not HOW.
96
96
 
97
- **Add reflection step:** Create a dedicated reflection step file as the final step in the chain. Add a mandatory chain link from the previous final step using "**IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**" See `references/create-step-3-write.md` "Reflection Step" section for the full writing guidance. For informational skills, append a reflection section to the end of SKILL.md instead. For forked-context skills, add a "Skill Observations" section to the output format instead.
97
+ **Add reflection step:** Create a dedicated reflection step file as the final step in the chain. Add a redirect chain link from the previous final step: "Use the Read tool on `references/step-N-reflect.md` to review your work and report results to the user." See `references/create-step-3-write.md` "Chain Links Between Steps" section for the full pattern. For informational skills, append a reflection section to the end of SKILL.md instead. For forked-context skills, add a "Skill Observations" section to the output format instead.
98
98
 
99
99
  ## Apply the Changes
100
100
 
@@ -102,4 +102,4 @@ Make all planned modifications now.
102
102
 
103
103
  For structural changes that involve writing new files (new step files, new SKILL.md sections, new scripts), reference `references/create-step-3-write.md` for the complete writing guidance — it covers size targets, step file structure, MCP tool references, and anti-patterns in more depth than the principles above.
104
104
 
105
- Read `references/fix-step-3-validate.md` when all fixes are applied.
105
+ Use the Read tool on `references/fix-step-3-validate.md` to validate and test the fixes.
@@ -53,6 +53,4 @@ Summarize what was fixed:
53
53
  - What was wrong and how it was resolved
54
54
  - Confirm with the user that the skill now behaves as expected
55
55
 
56
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
57
-
58
- Read `references/fix-step-4-reflect.md` now.
56
+ Use the Read tool on `references/fix-step-4-reflect.md` to review your work and report results to the user.
@@ -1,8 +1,6 @@
1
1
  # Step 4: Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The skill fix workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience fixing this skill. The purpose is to improve the creating-agent-skills skill itself based on what you just learned.
3
+ Reflect on your experience fixing this skill and report results to the user. This step improves the creating-agent-skills skill itself based on what you just learned.
6
4
 
7
5
  ## Assess
8
6
 
@@ -11,6 +11,6 @@ Ask the user what they need.
11
11
 
12
12
  | Intent | Action |
13
13
  |--------|--------|
14
- | {{First option}} | Read `references/{{first-workflow}}.md` |
15
- | {{Second option}} | Read `references/{{second-workflow}}.md` |
16
- | {{Third option}} | Read `references/{{third-workflow}}.md` |
14
+ | {{First option}} | Use the Read tool on `references/{{first-workflow}}.md` to {{what it accomplishes}} |
15
+ | {{Second option}} | Use the Read tool on `references/{{second-workflow}}.md` to {{what it accomplishes}} |
16
+ | {{Third option}} | Use the Read tool on `references/{{third-workflow}}.md` to {{what it accomplishes}} |
@@ -43,4 +43,4 @@ Move on when all of these are true:
43
43
  - Tool requirements are known
44
44
  - The user confirms you understand their needs
45
45
 
46
- Read `references/create-step-2-design.md`.
46
+ Use the Read tool on `references/create-step-2-design.md` to design the sub-agent's configuration.
@@ -178,4 +178,4 @@ Present the complete design:
178
178
 
179
179
  Ask: "Does this design look right?"
180
180
 
181
- Read `references/create-step-3-write.md` after confirmation.
181
+ Use the Read tool on `references/create-step-3-write.md` to write the sub-agent's system prompt.
@@ -151,4 +151,4 @@ With these principles applied, write the complete `.md` file now:
151
151
  1. YAML frontmatter with all designed configuration
152
152
  2. System prompt body following the structure above
153
153
 
154
- Read `references/create-step-4-review.md` when the file is written.
154
+ Use the Read tool on `references/create-step-4-review.md` to review the sub-agent before installation.
@@ -64,4 +64,4 @@ Handle results:
64
64
 
65
65
  Only proceed when validation passes and self-review is clean.
66
66
 
67
- Read `references/create-step-5-install.md` when review passes.
67
+ Use the Read tool on `references/create-step-5-install.md` to install and test the sub-agent.
@@ -75,6 +75,4 @@ Summarize what was created:
75
75
  - Memory scope (if any)
76
76
  - Skills preloaded (if any)
77
77
 
78
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
79
-
80
- Read `references/create-step-6-reflect.md` now.
78
+ Use the Read tool on `references/create-step-6-reflect.md` to reflect on the creation process and note any skill issues.
@@ -1,9 +1,5 @@
1
1
  # Step 6: Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The sub-agent creation workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience creating this sub-agent. The purpose is to improve the creating-sub-agents skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -51,6 +51,4 @@ Summarize what was fixed:
51
51
  - What was wrong and how it was resolved
52
52
  - Confirm with the user that the sub-agent now behaves as expected
53
53
 
54
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
55
-
56
- Read `references/fix-step-4-reflect.md` now.
54
+ Use the Read tool on `references/fix-step-4-reflect.md` to reflect on the fix process and note any skill issues.
@@ -1,9 +1,5 @@
1
1
  # Step 4: Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The sub-agent fix workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience fixing this sub-agent. The purpose is to improve the creating-sub-agents skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: initialize-project
3
- description: Scaffold docs structure for Claude Code sessions. Use when starting a new project, when "docs/CURRENT_WORK.md is missing", or when user says "initialize this project" or "set up session tracking".
3
+ description: Scaffold docs structure for Claude Code sessions. Use when starting a new project, when the project lacks docs/CURRENT_WORK.md, or when the user wants session tracking initialized.
4
4
  ---
5
5
 
6
6
  # Initialize Project
@@ -32,6 +32,4 @@ Report what was created:
32
32
 
33
33
  End with: "Run `/prime` to start a session."
34
34
 
35
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
36
-
37
- Read references/reflect.md now.
35
+ Use the Read tool on `references/reflect.md` to reflect on the setup and note any skill issues.
@@ -1,9 +1,5 @@
1
1
  # Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The initialize-project workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience using this skill. The purpose is to improve the initialize-project skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -69,6 +69,4 @@ Tell the user:
69
69
 
70
70
  If everything passed, the setup is complete.
71
71
 
72
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
73
-
74
- Read `references/step-6-reflect.md` now.
72
+ Use the Read tool on `references/step-6-reflect.md` to reflect on the setup experience and note any skill issues.
@@ -1,9 +1,5 @@
1
1
  # Step 6: Reflect and Improve
2
2
 
3
- **IMPORTANT: This step is mandatory. The project setup workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience setting up this project. The purpose is to improve the project-setup skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: prompting
3
- description: Invoked when user says "review my prompt", "help me write a prompt", "improve this prompt", or "create a prompt for...". Guides prompt creation and improvement using Claude 4.x best practices.
3
+ description: Guide prompt creation and improvement using Claude 4.x best practices. Use for reviewing existing prompts, creating new prompts, or improving prompt effectiveness.
4
4
  ---
5
5
 
6
6
  # Prompting
@@ -1,9 +1,5 @@
1
1
  # Reflect on Prompt Creation
2
2
 
3
- **IMPORTANT: This step is mandatory. The prompt creation workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience using this skill to create the prompt. The purpose is to improve the prompting skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -58,6 +58,4 @@ Ask: "Does this capture what you need? Any adjustments?"
58
58
 
59
59
  Incorporate feedback until the user is satisfied.
60
60
 
61
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
62
-
63
- Read `references/create-reflect.md` now.
61
+ Use the Read tool on `references/create-reflect.md` to reflect on the prompt creation and note any skill issues.
@@ -1,9 +1,5 @@
1
1
  # Reflect on Prompt Review
2
2
 
3
- **IMPORTANT: This step is mandatory. The prompt review workflow is not complete until this step is finished. Do not skip this.**
4
-
5
- Reflect on your experience using this skill to review the prompt. The purpose is to improve the prompting skill itself based on what you just learned.
6
-
7
3
  ## Assess
8
4
 
9
5
  Answer these questions honestly:
@@ -77,6 +77,4 @@ Ask: "Would you like me to adjust anything in the improved version?"
77
77
 
78
78
  Incorporate feedback and present updated version until the user is satisfied.
79
79
 
80
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
81
-
82
- Read `references/review-reflect.md` now.
80
+ Use the Read tool on `references/review-reflect.md` to reflect on the prompt review and note any skill issues.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: setup-lsp
3
- description: Set up LSP language servers for the current project. Use when the user says "setup LSP", "configure LSP", "enable LSP", "install language servers", or "add code intelligence". Use "verify" argument after restart to confirm LSP is working.
3
+ description: Set up LSP language servers for the current project. Use when the project needs code intelligence configured, or to verify an existing LSP setup. Pass "verify" argument after restart to confirm LSP is working.
4
4
  disable-model-invocation: true
5
5
  argument-hint: "[verify]"
6
6
  ---
@@ -25,4 +25,4 @@ Show the user:
25
25
 
26
26
  Ask the user to confirm which LSPs to install. They may want to skip some languages.
27
27
 
28
- Read `references/step-2-install-configure.md`.
28
+ Use the Read tool on `references/step-2-install-configure.md` to install language server binaries and configure Claude Code plugins.
@@ -80,6 +80,4 @@ Tell the user:
80
80
  2. Restart Claude Code in this project directory
81
81
  3. Run `/setup-lsp verify` to confirm LSP is working
82
82
 
83
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
84
-
85
- Read `references/step-4-reflect.md` now.
83
+ Use the Read tool on `references/step-4-reflect.md` to reflect on the setup and capture any workarounds for future runs.
@@ -38,6 +38,4 @@ Tell the user:
38
38
  - Which operations were tested and their results
39
39
  - Any operations that didn't work (with explanation)
40
40
 
41
- **IMPORTANT: You are not done. You MUST read and complete the next step. The workflow is incomplete without it.**
42
-
43
- Read `references/step-4-reflect.md` now.
41
+ Use the Read tool on `references/step-4-reflect.md` to reflect on the setup and capture any workarounds for future runs.
@@ -1,7 +1,5 @@
1
1
  # Step 4: Reflect
2
2
 
3
- **IMPORTANT: This step is mandatory. The setup-lsp workflow is not complete until this step is finished. Do not skip this.**
4
-
5
3
  ## Assess
6
4
 
7
5
  - Were any install commands wrong, outdated, or platform-specific in a way the registry didn't account for?
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: ship
3
+ description: End-to-end workflow for shipping complex features through intent discovery, contamination-free research, design discussion, spec generation, task breakdown, and implementation. Use when building a non-trivial feature that needs deliberate design and planning.
4
+ argument-hint: <feature-name>
5
+ allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Agent, TaskCreate, TaskList, TaskUpdate, TaskGet, AskUserQuestion
6
+ ---
7
+
8
+ # Ship
9
+
10
+ You orchestrate a multi-phase workflow for shipping complex features. Each phase produces artifacts that feed the next, with clean context separation to prevent intent contamination.
11
+
12
+ Every invocation of this skill is for a complex feature. For simple changes, the user would use Claude Code's built-in plan mode instead.
13
+
14
+ ## Determine Feature
15
+
16
+ If an argument was provided, use it as the feature name (convert to hyphen-case). If no argument, ask the user what feature they want to build and derive a short hyphen-case name from their description.
17
+
18
+ The spec directory is `docs/specs/{feature-name}/`.
19
+
20
+ ## Check State
21
+
22
+ Look for `docs/specs/{feature-name}/state.yaml`.
23
+
24
+ **If state.yaml exists**, read it. The `phase` field tells you where to resume:
25
+
26
+ | Phase | Step file |
27
+ |---|---|
28
+ | intent | `references/step-1-intent.md` |
29
+ | questions | `references/step-2-questions.md` |
30
+ | research | `references/step-3-research.md` |
31
+ | design | `references/step-4-design.md` |
32
+ | spec | `references/step-5-spec.md` |
33
+ | tasks | `references/step-6-tasks.md` |
34
+ | implement | `references/step-7-implement.md` |
35
+
36
+ Read the step file for the current phase and follow its instructions.
37
+
38
+ **If state.yaml does not exist**, this is a new feature. Create the spec directory and an initial state.yaml:
39
+
40
+ ```yaml
41
+ feature: {feature-name}
42
+ phase: intent
43
+ dir: docs/specs/{feature-name}
44
+ ```
45
+
46
+ Then read `references/step-1-intent.md` to begin.
@@ -0,0 +1,50 @@
1
+ # Intent Discovery
2
+
3
+ Capture what the user wants to build through conversation. This produces the intent document — a clear statement of the feature, not a spec, not a plan.
4
+
5
+ ## Create Tasks
6
+
7
+ Create these tasks and work through them in order:
8
+
9
+ 1. "Discuss the feature with the user" — understand what, why, and constraints
10
+ 2. "Write intent.md" — capture the understanding
11
+ 3. "Begin question generation" — proceed to the next phase
12
+
13
+ ## Task 1: Discuss
14
+
15
+ Have a conversation with the user about:
16
+
17
+ - **What** they want to build — the feature or change
18
+ - **Why** it matters — the problem it solves, who it's for
19
+ - **Constraints** — any technical limitations, patterns to follow, things to avoid
20
+ - **Success** — how they'll know it works (high-level, not formal acceptance criteria yet)
21
+
22
+ Keep this natural. A few rounds of back-and-forth is enough. You're building understanding, not conducting an interrogation.
23
+
24
+ ## Task 2: Write intent.md
25
+
26
+ When you have enough understanding, write `{spec_dir}/intent.md`:
27
+
28
+ ```markdown
29
+ # Feature: {Feature Name}
30
+
31
+ ## What
32
+ {Clear description of what's being built}
33
+
34
+ ## Why
35
+ {The problem this solves and who benefits}
36
+
37
+ ## Constraints
38
+ {Any stated technical limitations, patterns, or preferences}
39
+
40
+ ## Success Criteria
41
+ {High-level criteria for knowing it's done}
42
+ ```
43
+
44
+ Present the intent document to the user for confirmation. Adjust if they have corrections.
45
+
46
+ ## Task 3: Proceed
47
+
48
+ Update `{spec_dir}/state.yaml` — set `phase: questions`.
49
+
50
+ Use the Read tool on `references/step-2-questions.md` to generate research questions from the intent.
@@ -0,0 +1,42 @@
1
+ # Question Generation
2
+
3
+ Generate research questions that a senior engineer would need answered about the codebase before implementing this feature. A restricted sub-agent handles this — it reads the intent and produces questions but cannot explore the codebase.
4
+
5
+ The intent document captures what the user wants. The questions document will be used by a DIFFERENT agent to research the codebase — an agent that will NOT see the intent. This separation prevents implementation opinions from contaminating the research.
6
+
7
+ ## Create Tasks
8
+
9
+ Create these tasks and work through them in order:
10
+
11
+ 1. "Generate research questions from intent" — spawn the question-generator
12
+ 2. "Review questions with user" — present and refine
13
+ 3. "Begin objective research" — proceed to the next phase
14
+
15
+ ## Task 1: Generate Questions
16
+
17
+ Spawn a sub-agent to generate questions:
18
+
19
+ ```
20
+ Agent tool:
21
+ subagent_type: "question-generator"
22
+ prompt: "Read the intent document at {spec_dir}/intent.md. Write research questions to {spec_dir}/questions.md."
23
+ model: "sonnet"
24
+ ```
25
+
26
+ The question-generator is restricted — it can only read and write within docs/specs/. It has no search tools. It cannot explore the codebase even if it wanted to.
27
+
28
+ ## Task 2: Review Questions
29
+
30
+ Read `{spec_dir}/questions.md` and present the questions to the user. Ask:
31
+
32
+ - Are these the right questions?
33
+ - Any questions missing?
34
+ - Any questions that aren't relevant?
35
+
36
+ Update `questions.md` based on user feedback. The user may add questions about patterns, existing implementations, or concerns they have.
37
+
38
+ ## Task 3: Proceed
39
+
40
+ Update `{spec_dir}/state.yaml` — set `phase: research`.
41
+
42
+ Use the Read tool on `references/step-3-research.md` to begin objective codebase research.
@@ -0,0 +1,44 @@
1
+ # Objective Research
2
+
3
+ A sub-agent researches the codebase using ONLY the questions — it does not see the intent document. This produces factual, objective documentation about the codebase without implementation bias.
4
+
5
+ This is the critical contamination prevention step. The research agent answers questions about what EXISTS in the codebase. It does not know what feature is being built, so it cannot steer findings toward a particular implementation.
6
+
7
+ ## Create Tasks
8
+
9
+ Create these tasks and work through them in order:
10
+
11
+ 1. "Research codebase using questions" — spawn the objective-researcher
12
+ 2. "Review research with user" — present findings
13
+ 3. "Begin design discussion" — proceed to the next phase
14
+
15
+ ## Task 1: Research Codebase
16
+
17
+ Spawn a sub-agent to research the codebase:
18
+
19
+ ```
20
+ Agent tool:
21
+ subagent_type: "objective-researcher"
22
+ prompt: "Read the questions at {spec_dir}/questions.md. Research the codebase to answer each question. Write your findings to {spec_dir}/research.md. Do NOT read any other files in {spec_dir} — only questions.md."
23
+ model: "sonnet"
24
+ ```
25
+
26
+ The objective-researcher has full codebase access (Read, Grep, Glob, Bash) but no knowledge of the feature being built. It only sees the questions.
27
+
28
+ ## Task 2: Review Research
29
+
30
+ Read `{spec_dir}/research.md` and present a summary to the user. Highlight:
31
+
32
+ - Any questions the researcher couldn't answer (gaps)
33
+ - Places where multiple patterns were found (need disambiguation)
34
+ - Anything surprising or noteworthy
35
+
36
+ The user may add context the researcher missed, or flag patterns that are outdated.
37
+
38
+ If the research is thin or missing critical areas, spawn the objective-researcher again with additional targeted questions.
39
+
40
+ ## Task 3: Proceed
41
+
42
+ Update `{spec_dir}/state.yaml` — set `phase: design`.
43
+
44
+ Use the Read tool on `references/step-4-design.md` to begin the design discussion with the user.
@@ -0,0 +1,70 @@
1
+ # Design Discussion
2
+
3
+ This is the highest-leverage phase. You now have the objective research AND the original intent. Combine them to make design decisions with the user.
4
+
5
+ Read `{spec_dir}/intent.md` and `{spec_dir}/research.md` before proceeding.
6
+
7
+ ## Create Tasks
8
+
9
+ Create these tasks and work through them in order:
10
+
11
+ 1. "Surface patterns and present design questions" — analyze research, identify decisions needed
12
+ 2. "Resolve design decisions with user" — interactive discussion
13
+ 3. "Write design.md" — capture resolved decisions
14
+ 4. "Begin spec generation" — proceed to the next phase
15
+
16
+ ## Task 1: Surface Patterns
17
+
18
+ From the research document, identify:
19
+
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
+
22
+ **Design Questions**: Decisions that need human input before implementation. For each question:
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
28
+
29
+ Common design questions include:
30
+
31
+ - Which existing pattern to follow when there are multiple
32
+ - Where new code should live (which directory, which module)
33
+ - How to handle edge cases and error states
34
+ - What to do about backward compatibility
35
+ - Testing strategy (unit, integration, E2E)
36
+
37
+ ## Task 2: Resolve Decisions
38
+
39
+ Present the patterns and design questions to the user. Work through each decision:
40
+
41
+ - Let the user choose options or propose alternatives
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
44
+
45
+ This is interactive. Go back and forth until all design questions are resolved.
46
+
47
+ ## Task 3: Write design.md
48
+
49
+ Write `{spec_dir}/design.md`:
50
+
51
+ ```markdown
52
+ # Design Decisions: {Feature Name}
53
+
54
+ ## Patterns to Follow
55
+ {List each pattern with code location and why it's relevant}
56
+
57
+ ## Resolved Decisions
58
+ {For each design question: the question, the chosen option, and the rationale}
59
+
60
+ ## Open Items
61
+ {Anything requiring external research or further investigation}
62
+ ```
63
+
64
+ Present to the user for confirmation.
65
+
66
+ ## Task 4: Proceed
67
+
68
+ Update `{spec_dir}/state.yaml` — set `phase: spec`.
69
+
70
+ Use the Read tool on `references/step-5-spec.md` to generate the implementation specification.