@gordon.gan/specflow 1.0.0 → 1.0.2

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 (66) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +52 -38
  3. package/dist/cli/commands/change-phase.d.ts +1 -1
  4. package/dist/cli/commands/change-phase.js +1 -1
  5. package/dist/cli/commands/change-status.js +15 -6
  6. package/dist/core/archive.js +2 -2
  7. package/dist/core/artifact-graph/explore-status.d.ts +5 -0
  8. package/dist/core/artifact-graph/explore-status.js +21 -0
  9. package/dist/core/artifact-graph/index.d.ts +3 -1
  10. package/dist/core/artifact-graph/index.js +2 -1
  11. package/dist/core/artifact-graph/outputs.d.ts +3 -3
  12. package/dist/core/artifact-graph/outputs.js +24 -6
  13. package/dist/core/artifact-graph/state.d.ts +4 -0
  14. package/dist/core/artifact-graph/state.js +22 -0
  15. package/dist/core/templates/index.js +1 -0
  16. package/dist/core/templates/types.d.ts +1 -1
  17. package/dist/integrations/codex/adapter.js +1 -1
  18. package/dist/integrations/cursor/adapter.js +1 -1
  19. package/dist/integrations/shared/capability-evidence.js +12 -8
  20. package/dist/integrations/shared/command-catalog.js +4 -4
  21. package/dist/integrations/shared/parity-manifest.js +12 -8
  22. package/dist/utils/change-metadata.d.ts +1 -1
  23. package/dist/utils/change-metadata.js +1 -1
  24. package/package.json +5 -8
  25. package/prompts/{build → apply}/ecc-java-reviewer.md +1 -1
  26. package/prompts/{build → apply}/language-router.md +6 -6
  27. package/prompts/{build → apply}/phase-a-plan.md +14 -14
  28. package/prompts/{build → apply}/phase-b-execute.md +17 -17
  29. package/prompts/{build → apply}/phase-b-review.md +2 -2
  30. package/prompts/{build → apply}/phase-b-worktree.md +3 -3
  31. package/prompts/{build → apply}/plan-document-reviewer.md +6 -6
  32. package/prompts/{build → apply}/tdd.md +3 -3
  33. package/prompts/{done → archive}/branch-finish.md +4 -4
  34. package/prompts/explore/explore-session.md +152 -0
  35. package/prompts/fix/debug.md +2 -2
  36. package/prompts/{plan → propose}/design-draft.md +1 -1
  37. package/prompts/{plan → propose}/proposal.md +30 -0
  38. package/prompts/{plan → propose}/specs.md +1 -1
  39. package/prompts/{plan → propose}/tasks-draft.md +9 -9
  40. package/prompts/reference/specflow/example-design.md +20 -20
  41. package/prompts/reference/superpowers/anthropic-best-practices.md +6 -6
  42. package/prompts/reference/superpowers/codex-tools.md +1 -1
  43. package/prompts/refine/brainstorm.md +15 -15
  44. package/prompts/refine/design-output.md +1 -1
  45. package/prompts/refine/spec-document-reviewer.md +1 -1
  46. package/prompts/review/code-review.md +4 -4
  47. package/prompts/shared/code-reviewer-prompt.md +1 -1
  48. package/prompts/shared/executing-plans.md +12 -12
  49. package/prompts/shared/implementer-prompt.md +3 -3
  50. package/prompts/test/verification.md +1 -1
  51. package/prompts/verify/verification.md +3 -3
  52. package/schemas/specflow/schema.yaml +6 -4
  53. package/skills/{specflow-build → specflow-apply}/SKILL.md +12 -12
  54. package/skills/{specflow-done → specflow-archive}/SKILL.md +5 -5
  55. package/skills/specflow-explore/SKILL.md +102 -0
  56. package/skills/specflow-fix/SKILL.md +2 -2
  57. package/skills/{specflow-plan → specflow-propose}/SKILL.md +38 -11
  58. package/skills/specflow-refine/SKILL.md +4 -4
  59. package/skills/specflow-verify/SKILL.md +1 -1
  60. package/templates/explore.md +89 -0
  61. package/skills/specflow-scan/SKILL.md +0 -48
  62. /package/prompts/{build → apply}/ecc-go-reviewer.md +0 -0
  63. /package/prompts/{build → apply}/ecc-kotlin-reviewer.md +0 -0
  64. /package/prompts/{build → apply}/ecc-python-reviewer.md +0 -0
  65. /package/prompts/{build → apply}/ecc-rust-reviewer.md +0 -0
  66. /package/prompts/{build → apply}/ecc-typescript-reviewer.md +0 -0
@@ -1,10 +1,10 @@
1
- > **HARD GATE — READ THIS FIRST.** Generate substantive first-iteration tasks. Not placeholders. Not "TBD". Not empty group headers. Each group gets real tasks with concrete verbs. Build Phase A will later rewrite this to writing-plans precision (exact paths, code blocks, bite-sized steps) — but you are producing the first honest pass at "what needs to happen," not a skeleton for someone else to fill.
1
+ > **HARD GATE — READ THIS FIRST.** Generate substantive first-iteration tasks. Not placeholders. Not "TBD". Not empty group headers. Each group gets real tasks with concrete verbs. Apply Phase A will later rewrite this to writing-plans precision (exact paths, code blocks, bite-sized steps) — but you are producing the first honest pass at "what needs to happen," not a skeleton for someone else to fill.
2
2
 
3
3
  # Plan Phase: First-Iteration Tasks Draft
4
4
 
5
5
  ## Purpose
6
6
 
7
- Generate a substantive first-iteration `tasks.md` that maps the change into coarse, concrete work items. This is **v1 of the task plan** — Build Phase A will use writing-plans to produce v2 (with exact file paths, code snippets, and bite-sized test-first steps). Your job here is to outline the real work so refine can challenge it and Build Phase A can refine it into executable form.
7
+ Generate a substantive first-iteration `tasks.md` that maps the change into coarse, concrete work items. This is **v1 of the task plan** — Apply Phase A will use writing-plans to produce v2 (with exact file paths, code snippets, and bite-sized test-first steps). Your job here is to outline the real work so refine can challenge it and Apply Phase A can refine it into executable form.
8
8
 
9
9
  ## Inputs You Must Read
10
10
 
@@ -18,10 +18,10 @@ Generate a substantive first-iteration `tasks.md` that maps the change into coar
18
18
  The generated `tasks.md` file **must begin** with this HTML comment as its first line (this is content you inject into the output file, not part of this prompt):
19
19
 
20
20
  ```
21
- <!-- Plan-phase first-iteration tasks. Will be rewritten to writing-plans precision in /specflow:build Phase A. -->
21
+ <!-- Plan-phase first-iteration tasks. Will be rewritten to writing-plans precision in /specflow:apply Phase A. -->
22
22
  ```
23
23
 
24
- This marker tells future readers (and the Build Phase A prompt) that this document is coarse-grained by design and will be rewritten to a stricter format later.
24
+ This marker tells future readers (and the Apply Phase A prompt) that this document is coarse-grained by design and will be rewritten to a stricter format later.
25
25
 
26
26
  ## Structure Rules
27
27
 
@@ -40,7 +40,7 @@ This marker tells future readers (and the Build Phase A prompt) that this docume
40
40
  - "handle searching" (bad — same problem in English)
41
41
  - "完善测试" (bad — improvement verb without a subject)
42
42
 
43
- 4. **Each item should be a coherent unit of work** — roughly the size that Build Phase A will later expand into a handful of bite-sized TDD steps. If an item feels like it's really 5 unrelated actions, split it.
43
+ 4. **Each item should be a coherent unit of work** — roughly the size that Apply Phase A will later expand into a handful of bite-sized TDD steps. If an item feels like it's really 5 unrelated actions, split it.
44
44
 
45
45
  ## Grouping Guidance
46
46
 
@@ -58,7 +58,7 @@ If the change has both parallel capabilities and deep layering, a two-level grou
58
58
  Below is a short worked example for a hypothetical "add search to notes CLI" change. Study the **granularity and verb concreteness**, not the specific content.
59
59
 
60
60
  ```markdown
61
- <!-- Plan-phase first-iteration tasks. Will be rewritten to writing-plans precision in /specflow:build Phase A. -->
61
+ <!-- Plan-phase first-iteration tasks. Will be rewritten to writing-plans precision in /specflow:apply Phase A. -->
62
62
 
63
63
  # notes-search Implementation Tasks
64
64
 
@@ -89,7 +89,7 @@ Note how each item names a specific artifact or action (`searchNotes` function,
89
89
 
90
90
  ## What This Draft Is NOT
91
91
 
92
- - It is **not** the writing-plans format. Build Phase A does that rewrite with exact file paths, code blocks, and `Write test → Run test → Implement → Run test → Commit` per step. Do not pre-write those here — you don't yet have the design detail to do it well, and duplicating effort wastes the refine pass.
92
+ - It is **not** the writing-plans format. Apply Phase A does that rewrite with exact file paths, code blocks, and `Write test → Run test → Implement → Run test → Commit` per step. Do not pre-write those here — you don't yet have the design detail to do it well, and duplicating effort wastes the refine pass.
93
93
  - It is **not** a skeleton to be filled in. Every item should reflect a real action you'd expect to perform.
94
94
  - It is **not** a design document. If you find yourself writing "decide whether to use X or Y" as a task, that's a design decision that belongs in `design.md`. Move it there.
95
95
 
@@ -112,7 +112,7 @@ Save the document to:
112
112
  specflow/changes/<change-name>/tasks.md
113
113
  ```
114
114
 
115
- **Do NOT ask the user to confirm this draft at this stage.** The orchestrating SKILL will present all plan-phase artifacts together at the end of the plan phase. Refine will challenge and restructure; Build Phase A will rewrite to precision. Your job is to hand off a substantive first pass.
115
+ **Do NOT ask the user to confirm this draft at this stage.** The orchestrating SKILL will present all plan-phase artifacts together at the end of the propose phase. Refine will challenge and restructure; Apply Phase A will rewrite to precision. Your job is to hand off a substantive first pass.
116
116
 
117
117
  ## Remember
118
118
 
@@ -120,4 +120,4 @@ specflow/changes/<change-name>/tasks.md
120
120
  - 3 to 8 groups, 2 to 6 items each
121
121
  - Concrete verbs on concrete subjects
122
122
  - Top-of-file marker comment is mandatory
123
- - Writing-plans precision comes in Build Phase A — do not pre-write it here
123
+ - Writing-plans precision comes in Apply Phase A — do not pre-write it here
@@ -75,7 +75,7 @@ specflow init # Generate .claude/skills/, .claude/commands/, op
75
75
 
76
76
  **Choice**: Design SpecFlow's CLI commands from scratch rather than copying OpenSpec's structure. Aligned with SpecFlow's 10-command workflow.
77
77
 
78
- **Rationale**: OpenSpec's CLI was designed for a broader audience (25+ tools). SpecFlow targets Claude Code specifically and has a different workflow (scan → plan → refine → build → ...). Commands should reflect this workflow.
78
+ **Rationale**: OpenSpec's CLI was designed for a broader audience (25+ tools). SpecFlow targets Claude Code specifically and has a different workflow (scan → propose → refine → apply → ...). Commands should reflect this workflow.
79
79
 
80
80
  CLI design is a separate task — will be defined during implementation based on the workflows that SKILL.md files need to invoke.
81
81
 
@@ -83,23 +83,23 @@ CLI design is a separate task — will be defined during implementation based on
83
83
 
84
84
  **Choice**: SKILL.md files are lightweight orchestrators (~50-100 lines) that route execution through stages. Each stage loads its detailed prompt via Claude Code's Read tool from the `prompts/` directory.
85
85
 
86
- **Structure example** (`specflow-build/SKILL.md`):
86
+ **Structure example** (`specflow-apply/SKILL.md`):
87
87
  ```
88
88
  SKILL.md (orchestrator, ~80 lines)
89
- ├── Stage A: Read prompts/build/phase-a-plan.md → generate task plan
89
+ ├── Stage A: Read prompts/apply/phase-a-plan.md → generate task plan
90
90
  ├── User confirmation gate
91
- ├── Stage B: Read prompts/build/phase-b-worktree.md → setup isolation
92
- ├── Stage C: Read prompts/build/phase-b-execute.md → per-task TDD
91
+ ├── Stage B: Read prompts/apply/phase-b-worktree.md → setup isolation
92
+ ├── Stage C: Read prompts/apply/phase-b-execute.md → per-task TDD
93
93
  │ └── Each subagent: Read prompts/shared/implementer-prompt.md
94
- ├── Stage D: Read prompts/build/phase-b-review.md → two-phase review
94
+ ├── Stage D: Read prompts/apply/phase-b-review.md → two-phase review
95
95
  │ ├── Read prompts/shared/spec-reviewer-prompt.md
96
96
  │ └── Read prompts/shared/code-reviewer-prompt.md
97
97
  └── User confirmation per task
98
98
  ```
99
99
 
100
- **Why**: A single specflow-build SKILL.md with all content inline would be ~1300 lines. Claude Code follows smaller, focused prompts more reliably than monolithic ones. Progressive loading keeps each execution stage in a clean context.
100
+ **Why**: A single specflow-apply SKILL.md with all content inline would be ~1300 lines. Claude Code follows smaller, focused prompts more reliably than monolithic ones. Progressive loading keeps each execution stage in a clean context.
101
101
 
102
- **Target location in user projects**: `.claude/specflow/prompts/` (avoids conflicts with user's own directories). SKILL.md orchestrators use CWD-relative paths like `.claude/specflow/prompts/build/phase-a-plan.md`.
102
+ **Target location in user projects**: `.claude/specflow/prompts/` (avoids conflicts with user's own directories). SKILL.md orchestrators use CWD-relative paths like `.claude/specflow/prompts/apply/phase-a-plan.md`.
103
103
 
104
104
  **Prompts directory organization** (hybrid):
105
105
  ```
@@ -193,14 +193,14 @@ my-project/
193
193
  | Superpowers skill | SpecFlow destination | Type |
194
194
  |---|---|---|
195
195
  | brainstorming | prompts/refine/brainstorm.md | Command prompt |
196
- | writing-plans | prompts/build/phase-a-plan.md | Command prompt |
197
- | subagent-driven-development | prompts/build/phase-b-execute.md | Command prompt |
198
- | using-git-worktrees | prompts/build/phase-b-worktree.md | Command prompt |
199
- | test-driven-development | prompts/build/ + prompts/test/ | Shared |
196
+ | writing-plans | prompts/apply/phase-a-plan.md | Command prompt |
197
+ | subagent-driven-development | prompts/apply/phase-b-execute.md | Command prompt |
198
+ | using-git-worktrees | prompts/apply/phase-b-worktree.md | Command prompt |
199
+ | test-driven-development | prompts/apply/ + prompts/test/ | Shared |
200
200
  | requesting-code-review + code-reviewer | prompts/review/ | Command prompt |
201
201
  | systematic-debugging | prompts/fix/debug.md | Command prompt |
202
202
  | verification-before-completion | prompts/test/ + prompts/verify/ | Shared |
203
- | finishing-a-development-branch | prompts/done/branch-finish.md | Command prompt |
203
+ | finishing-a-development-branch | prompts/archive/branch-finish.md | Command prompt |
204
204
  | dispatching-parallel-agents | prompts/shared/ | Shared utility |
205
205
  | executing-plans | prompts/shared/ | Shared utility |
206
206
  | receiving-code-review | prompts/shared/ | Shared utility |
@@ -210,13 +210,13 @@ my-project/
210
210
  **Rewrite rules**:
211
211
  - Skill name references: `brainstorming` → `specflow:refine`
212
212
  - Path references: `docs/superpowers/specs/` → `openspec/changes/<name>/`
213
- - Next-step invocations: "Invoke writing-plans skill" → "Proceed to specflow:build"
213
+ - Next-step invocations: "Invoke writing-plans skill" → "Proceed to specflow:apply"
214
214
  - All internal cross-references updated to SpecFlow equivalents
215
215
  - Logic, hard gates, fail-stops, verification requirements preserved exactly
216
216
 
217
217
  ### D7: Scan via code-review-graph
218
218
 
219
- **Choice**: `/specflow:scan` uses code-review-graph (npm dependency) to analyze codebase structure, then converts the analysis output into OpenSpec specs format.
219
+ **Choice (deferred):** A future `/specflow:scan` may use code-review-graph to analyze codebase structure and convert output into OpenSpec specs format. Scan is **not shipped** in public releases; brownfield onboarding uses `/specflow:explore` or `/specflow:propose` instead.
220
220
 
221
221
  **Why**: Code analysis is a hard problem. Rather than building a custom AST parser for every language, leverage an existing tool that generates structured project knowledge. SpecFlow's value-add is converting that knowledge into actionable specs.
222
222
 
@@ -232,16 +232,16 @@ my-project/
232
232
 
233
233
  ### D9: Strict user confirmation mode
234
234
 
235
- **Choice**: Every task in `specflow:build` completes with a review summary and waits for user confirmation before proceeding to the next task.
235
+ **Choice**: Every task in `specflow:apply` completes with a review summary and waits for user confirmation before proceeding to the next task.
236
236
 
237
237
  **Confirmation points across workflow**:
238
238
  1. `scan` → scan results confirmation
239
- 2. `plan` → proposal direction confirmation
239
+ 2. `propose` → proposal direction confirmation
240
240
  3. `refine` → approach selection (2-3 options) + final design confirmation
241
- 4. `build` Phase A → task plan confirmation
242
- 5. `build` Phase B → per-task review result + user confirmation
241
+ 4. `apply` Phase A → task plan confirmation
242
+ 5. `apply` Phase B → per-task review result + user confirmation
243
243
  6. `review` → critical issues require confirmation
244
- 7. `done` → 4 options (merge/PR/keep/discard)
244
+ 7. `archive` → 4 options (merge/PR/keep/discard)
245
245
 
246
246
  ### D10: Responsibility boundaries
247
247
 
@@ -129,9 +129,9 @@ Do not modify the command or add additional flags.
129
129
  * **Narrow bridge with cliffs on both sides**: There's only one safe way forward. Provide specific guardrails and exact instructions (low freedom). Example: database migrations that must run in exact sequence.
130
130
  * **Open field with no hazards**: Many paths lead to success. Give general direction and trust Claude to find the best route (high freedom). Example: code reviews where context determines the best approach.
131
131
 
132
- ### Test with all models you plan to use
132
+ ### Test with all models you propose to use
133
133
 
134
- Skills act as additions to models, so effectiveness depends on the underlying model. Test your Skill with all the models you plan to use it with.
134
+ Skills act as additions to models, so effectiveness depends on the underlying model. Test your Skill with all the models you propose to use it with.
135
135
 
136
136
  **Testing considerations by model**:
137
137
 
@@ -139,7 +139,7 @@ Skills act as additions to models, so effectiveness depends on the underlying mo
139
139
  * **Claude Sonnet** (balanced): Is the Skill clear and efficient?
140
140
  * **Claude Opus** (powerful reasoning): Does the Skill avoid over-explaining?
141
141
 
142
- What works perfectly for Opus might need more detail for Haiku. If you plan to use your Skill across multiple models, aim for instructions that work well with all of them.
142
+ What works perfectly for Opus might need more detail for Haiku. If you propose to use your Skill across multiple models, aim for instructions that work well with all of them.
143
143
 
144
144
  ## Skill structure
145
145
 
@@ -984,17 +984,17 @@ Claude's vision capabilities help understand layouts and structures.
984
984
 
985
985
  ### Create verifiable intermediate outputs
986
986
 
987
- When Claude performs complex, open-ended tasks, it can make mistakes. The "plan-validate-execute" pattern catches errors early by having Claude first create a plan in a structured format, then validate that plan with a script before executing it.
987
+ When Claude performs complex, open-ended tasks, it can make mistakes. The "plan-validate-execute" pattern catches errors early by having Claude first create a propose in a structured format, then validate that propose with a script before executing it.
988
988
 
989
989
  **Example**: Imagine asking Claude to update 50 form fields in a PDF based on a spreadsheet. Without validation, Claude might reference non-existent fields, create conflicting values, miss required fields, or apply updates incorrectly.
990
990
 
991
- **Solution**: Use the workflow pattern shown above (PDF form filling), but add an intermediate `changes.json` file that gets validated before applying changes. The workflow becomes: analyze → **create plan file** → **validate plan** → execute → verify.
991
+ **Solution**: Use the workflow pattern shown above (PDF form filling), but add an intermediate `changes.json` file that gets validated before applying changes. The workflow becomes: analyze → **create propose file** → **validate plan** → execute → verify.
992
992
 
993
993
  **Why this pattern works:**
994
994
 
995
995
  * **Catches errors early**: Validation finds problems before changes are applied
996
996
  * **Machine-verifiable**: Scripts provide objective verification
997
- * **Reversible planning**: Claude can iterate on the plan without touching originals
997
+ * **Reversible planning**: Claude can iterate on the propose without touching originals
998
998
  * **Clear debugging**: Error messages point to specific problems
999
999
 
1000
1000
  **When to use**: Batch operations, destructive changes, complex validation rules, high-stakes operations.
@@ -21,7 +21,7 @@ When skills or prompts reference Claude Code tool names, use these Codex equival
21
21
 
22
22
  - Skills: `.agents/skills/specflow-*/SKILL.md`
23
23
  - Runtime prompts: `.agents/specflow/prompts/`
24
- - Invoke workflows with `$specflow-plan`, `$specflow-refine`, `$specflow-build`, etc.
24
+ - Invoke workflows with `$specflow-propose`, `$specflow-refine`, `$specflow-apply`, etc.
25
25
 
26
26
  ## Related references
27
27
 
@@ -23,7 +23,7 @@ Before running this brainstorming flow, you MUST have read:
23
23
  - `specflow/specs/` baseline (main specs) for reference
24
24
  - `.claude/specflow/prompts/refine/update-artifacts.md` (the delegated artifact-update methodology)
25
25
 
26
- If any of the four change artifacts is missing, stop and tell the user to run `/specflow:plan` first.
26
+ If any of the four change artifacts is missing, stop and tell the user to run `/specflow:propose` first.
27
27
 
28
28
  ## Iteration Rules
29
29
 
@@ -49,8 +49,8 @@ injected; steps 3–5 carry the discussion into artifacts; steps 6–8 close the
49
49
  ### Step 1 — Examine existing artifacts (inject Challenge Behavior #1)
50
50
 
51
51
  Re-read all 4 plan-phase artifacts with fresh eyes. This is not a summary exercise — look for
52
- what the plan *did not* say. Explicitly INJECT **Challenge Behavior #1 (challenge plan's
53
- assumptions)** here: list assumptions the plan glossed over and explain why each matters. Each
52
+ what the propose *did not* say. Explicitly INJECT **Challenge Behavior #1 (challenge plan's
53
+ assumptions)** here: list assumptions the propose glossed over and explain why each matters. Each
54
54
  round MUST produce this list of challenged assumptions, even if shorter than the previous round.
55
55
 
56
56
  ### Step 2 — Ask clarifying questions (inject Challenge Behaviors #3 and #4)
@@ -60,7 +60,7 @@ are reasonably enumerable. This is where you INJECT **Challenge Behavior #3 (exp
60
60
  boundaries)** — survey edge cases, permissions, error modes, non-functional concerns absent
61
61
  from specs — and **Challenge Behavior #4 (question scope)** — ask whether the change is too
62
62
  broad, too narrow, or should be split. Clarifying questions are how you explore boundaries
63
- the plan omitted and how you question scope with the user directly.
63
+ the propose omitted and how you question scope with the user directly.
64
64
 
65
65
  Keep per-message questions small (1 question per message). Batch the mental exploration but
66
66
  serialize the user-facing dialogue.
@@ -70,7 +70,7 @@ serialize the user-facing dialogue.
70
70
  For every non-trivial design decision surfaced by Steps 1–2 (both the ones in the existing
71
71
  `design.md` and new ones revealed by this round's challenges), INJECT **Challenge Behavior #2
72
72
  (propose new options)**: for each existing decision, propose alternative approaches not
73
- considered in the plan — at least 2 such alternatives per decision, each with pros/cons and
73
+ considered in the propose — at least 2 such alternatives per decision, each with pros/cons and
74
74
  a recommendation.
75
75
 
76
76
  The 2-3 approaches MUST include the currently-chosen option from `design.md` PLUS genuinely
@@ -151,7 +151,7 @@ Announce clearly:
151
151
  > "Refine converged after N rounds. All artifacts have been updated and validated. Please
152
152
  > review the final state of proposal.md, specs/, design.md, tasks.md. Confirm that this
153
153
  > refined state is what you want — on confirmation I will mark phase as `refined` and you
154
- > can run `/specflow:build` next."
154
+ > can run `/specflow:apply` next."
155
155
 
156
156
  Do NOT invoke phase transition directly from this prompt — the calling SKILL.md owns that
157
157
  handoff, which happens only after explicit user confirmation of the final refined state.
@@ -164,25 +164,25 @@ to see each behavior fired in the round's output.
164
164
 
165
165
  ### Behavior 1 — challenge plan's assumptions
166
166
 
167
- - **Rationale**: plan was a first-iteration pass; assumptions were made under incomplete
167
+ - **Rationale**: propose was a first-iteration pass; assumptions were made under incomplete
168
168
  information and some were glossed over. Refine's job is to challenge those assumptions
169
169
  before they harden into implementation.
170
- - **AI self-prompt**: "What did the plan treat as given that actually deserves interrogation?
170
+ - **AI self-prompt**: "What did the propose treat as given that actually deserves interrogation?
171
171
  What 'of course'-flavored premises are hiding in `proposal.md` or `design.md`?"
172
- - **Sample user-facing question**: "The plan implies that [X]. Is that actually true for this
172
+ - **Sample user-facing question**: "The propose implies that [X]. Is that actually true for this
173
173
  user/context, or is it a plan-time shortcut?"
174
174
  - **Expected output per round**: a bulleted list titled "Plan assumptions under scrutiny"
175
175
  with at least 1 item (generally 2-5 early rounds, trailing toward 0 as convergence nears).
176
176
 
177
177
  ### Behavior 2 — propose new options
178
178
 
179
- - **Rationale**: plan usually picked the first-plausible option per decision. For each
179
+ - **Rationale**: propose usually picked the first-plausible option per decision. For each
180
180
  existing design decision you should propose alternatives — alternatives are where better-fit
181
181
  designs emerge.
182
182
  - **AI self-prompt**: "For each design decision already in `design.md`, what are the
183
- alternatives the plan did not consider? For each new decision surfaced by this round's
183
+ alternatives the propose did not consider? For each new decision surfaced by this round's
184
184
  challenges, what are the 2-3 approaches?"
185
- - **Sample user-facing question**: "The plan chose [current approach] for decision D3. I
185
+ - **Sample user-facing question**: "The propose chose [current approach] for decision D3. I
186
186
  also see two alternatives worth considering: [alt A] and [alt B]. Shall I walk through
187
187
  trade-offs?"
188
188
  - **Expected output per round**: for at least one existing decision, a block showing
@@ -190,7 +190,7 @@ to see each behavior fired in the round's output.
190
190
 
191
191
  ### Behavior 3 — explore omitted boundaries
192
192
 
193
- - **Rationale**: plan specs are drafted under time pressure and tend to cover happy paths
193
+ - **Rationale**: propose specs are drafted under time pressure and tend to cover happy paths
194
194
  first. You must explore omitted boundaries — edge cases, permissions, errors,
195
195
  non-functional concerns — because those are the most common omissions.
196
196
  - **AI self-prompt**: "What scenarios belong in the specs but are missing? What permission,
@@ -202,7 +202,7 @@ to see each behavior fired in the round's output.
202
202
 
203
203
  ### Behavior 4 — question scope
204
204
 
205
- - **Rationale**: plan sets scope early with incomplete information. Refine is the right
205
+ - **Rationale**: propose sets scope early with incomplete information. Refine is the right
206
206
  place to question scope — whether the change is too broad (decompose), too narrow
207
207
  (expand), or mis-cut (split capability A from B).
208
208
  - **AI self-prompt**: "Does the change try to do too much? Too little? Are any capabilities
@@ -235,7 +235,7 @@ diff summary format.
235
235
 
236
236
  After Step 9 announces final convergence AND the user confirms the refined state:
237
237
  the calling SKILL.md will invoke `specflow change phase <name> --set refined`, then suggest
238
- `/specflow:build` as the next slash command to run.
238
+ `/specflow:apply` as the next slash command to run.
239
239
 
240
240
  This prompt itself never writes the phase transition — that is the SKILL orchestrator's job,
241
241
  and it happens only after explicit user confirmation of the refined state.
@@ -123,4 +123,4 @@ Commit the design document to git.
123
123
 
124
124
  ## Next Step
125
125
 
126
- Once the design is approved, invoke specflow:build Phase A to create the implementation plan.
126
+ Once the design is approved, invoke specflow:apply Phase A to create the implementation plan.
@@ -23,7 +23,7 @@ Task tool (general-purpose):
23
23
  | Completeness | TODOs, placeholders, "TBD", incomplete sections |
24
24
  | Consistency | Internal contradictions, conflicting requirements |
25
25
  | Clarity | Requirements ambiguous enough to cause someone to build the wrong thing |
26
- | Scope | Focused enough for a single plan -- not covering multiple independent subsystems |
26
+ | Scope | Focused enough for a single propose -- not covering multiple independent subsystems |
27
27
  | YAGNI | Unrequested features, over-engineering |
28
28
 
29
29
  ## Calibration
@@ -9,7 +9,7 @@ Dispatch a code-reviewer subagent to catch issues before they cascade. The revie
9
9
  ## When to Request Review
10
10
 
11
11
  **Mandatory:**
12
- - After each task in specflow:build Phase B
12
+ - After each task in specflow:apply Phase B
13
13
  - After completing major feature
14
14
  - Before merge to main
15
15
 
@@ -101,7 +101,7 @@ Task tool (general-purpose):
101
101
  - All tests passing?
102
102
 
103
103
  **Requirements:**
104
- - All plan requirements met?
104
+ - All propose requirements met?
105
105
  - Implementation matches spec?
106
106
  - No scope creep?
107
107
  - Breaking changes documented?
@@ -196,12 +196,12 @@ You: [Fix progress indicators]
196
196
 
197
197
  ## Integration with Workflows
198
198
 
199
- **specflow:build Phase B:**
199
+ **specflow:apply Phase B:**
200
200
  - Review after EACH task
201
201
  - Catch issues before they compound
202
202
  - Fix before moving to next task
203
203
 
204
- **specflow:build Phase B (inline mode):**
204
+ **specflow:apply Phase B (inline mode):**
205
205
  - Review after each batch (3 tasks)
206
206
  - Get feedback, apply, continue
207
207
 
@@ -59,7 +59,7 @@ Task tool (general-purpose):
59
59
  - All tests passing?
60
60
 
61
61
  **Requirements:**
62
- - All plan requirements met?
62
+ - All propose requirements met?
63
63
  - Implementation matches spec?
64
64
  - No scope creep?
65
65
 
@@ -6,14 +6,14 @@
6
6
 
7
7
  Load plan, review critically, execute all tasks, report when complete.
8
8
 
9
- **Announce at start:** "I'm using specflow:build Phase B (inline mode) to implement this plan."
9
+ **Announce at start:** "I'm using specflow:apply Phase B (inline mode) to implement this plan."
10
10
 
11
- **Note:** SpecFlow works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (such as Claude Code or Codex). If subagents are available, use specflow:build Phase B instead of this skill.
11
+ **Note:** SpecFlow works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (such as Claude Code or Codex). If subagents are available, use specflow:apply Phase B instead of this skill.
12
12
 
13
13
  ## The Process
14
14
 
15
15
  ### Step 1: Load and Review Plan
16
- 1. Read plan file
16
+ 1. Read propose file
17
17
  2. Review critically - identify any questions or concerns about the plan
18
18
  3. If concerns: Raise them with your human partner before starting
19
19
  4. If no concerns: Create TodoWrite and proceed
@@ -29,8 +29,8 @@ For each task:
29
29
  ### Step 3: Complete Development
30
30
 
31
31
  After all tasks complete and verified:
32
- - Announce: "I'm using specflow:done to complete this work."
33
- - **REQUIRED SUB-SKILL:** Use specflow:done
32
+ - Announce: "I'm using specflow:archive to complete this work."
33
+ - **REQUIRED SUB-SKILL:** Use specflow:archive
34
34
  - Follow that skill to verify tests, present options, execute choice
35
35
 
36
36
  ## When to Stop and Ask for Help
@@ -46,22 +46,22 @@ After all tasks complete and verified:
46
46
  ## When to Revisit Earlier Steps
47
47
 
48
48
  **Return to Review (Step 1) when:**
49
- - Partner updates the plan based on your feedback
49
+ - Partner updates the propose based on your feedback
50
50
  - Fundamental approach needs rethinking
51
51
 
52
52
  **Don't force through blockers** - stop and ask.
53
53
 
54
54
  ## Remember
55
- - Review plan critically first
56
- - Follow plan steps exactly
55
+ - Review propose critically first
56
+ - Follow propose steps exactly
57
57
  - Don't skip verifications
58
- - Reference skills when plan says to
58
+ - Reference skills when propose says to
59
59
  - Stop when blocked, don't guess
60
60
  - Never start implementation on main/master branch without explicit user consent
61
61
 
62
62
  ## Integration
63
63
 
64
64
  **Required workflow skills:**
65
- - **specflow:build Phase B (worktree)** - REQUIRED: Set up isolated workspace before starting
66
- - **specflow:build Phase A** - Creates the plan this skill executes
67
- - **specflow:done** - Complete development after all tasks
65
+ - **specflow:apply Phase B (worktree)** - REQUIRED: Set up isolated workspace before starting
66
+ - **specflow:apply Phase A** - Creates the propose this skill executes
67
+ - **specflow:archive** - Complete development after all tasks
@@ -12,7 +12,7 @@ Task tool (general-purpose):
12
12
 
13
13
  ## Task Description
14
14
 
15
- [FULL TEXT of task from plan - paste it here, don't make subagent read file]
15
+ [FULL TEXT of task from propose - paste it here, don't make subagent read file]
16
16
 
17
17
  ## Context
18
18
 
@@ -50,7 +50,7 @@ Task tool (general-purpose):
50
50
  - Follow the file structure defined in the plan
51
51
  - Each file should have one clear responsibility with a well-defined interface
52
52
  - If a file you're creating is growing beyond the plan's intent, stop and report
53
- it as DONE_WITH_CONCERNS -- don't split files on your own without plan guidance
53
+ it as DONE_WITH_CONCERNS -- don't split files on your own without propose guidance
54
54
  - If an existing file you're modifying is already large or tangled, work carefully
55
55
  and note it as a concern in your report
56
56
  - In existing codebases, follow established patterns. Improve code you're touching
@@ -65,7 +65,7 @@ Task tool (general-purpose):
65
65
  - The task requires architectural decisions with multiple valid approaches
66
66
  - You need to understand code beyond what was provided and can't find clarity
67
67
  - You feel uncertain about whether your approach is correct
68
- - The task involves restructuring existing code in ways the plan didn't anticipate
68
+ - The task involves restructuring existing code in ways the propose didn't anticipate
69
69
  - You've been reading file after file trying to understand the system without progress
70
70
 
71
71
  **How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
@@ -94,7 +94,7 @@ WRONG: "Linter passed" (linter doesn't check compilation)
94
94
 
95
95
  **Requirements:**
96
96
  ```
97
- CORRECT: Re-read plan -> Create checklist -> Verify each -> Report gaps or completion
97
+ CORRECT: Re-read propose -> Create checklist -> Verify each -> Report gaps or completion
98
98
  WRONG: "Tests pass, phase complete"
99
99
  ```
100
100
 
@@ -58,7 +58,7 @@ Skip any step = lying, not verifying
58
58
 
59
59
  | Signal | Action |
60
60
  |--------|--------|
61
- | Changed files not in the plan | Flag and explain why |
61
+ | Changed files not in the propose | Flag and explain why |
62
62
  | Added features not in spec | Recommend removal |
63
63
  | Refactored unrelated code | Recommend reverting |
64
64
  | Over-engineered solution | Simplify to match requirements |
@@ -75,7 +75,7 @@ Skip any step = lying, not verifying
75
75
  | Regression test works | Red-green cycle verified | Test passes once |
76
76
  | Agent completed | VCS diff shows changes | Agent reports "success" |
77
77
  | Requirements met | Line-by-line checklist | Tests passing |
78
- | No scope creep | Diff matches plan scope | "I only changed what was needed" |
78
+ | No scope creep | Diff matches propose scope | "I only changed what was needed" |
79
79
 
80
80
  ## Red Flags - STOP
81
81
 
@@ -111,7 +111,7 @@ WRONG: "Should pass now" / "Looks correct"
111
111
 
112
112
  **Requirements + Scope:**
113
113
  ```
114
- CORRECT: Re-read plan -> Create checklist -> Verify each -> Check diff scope -> Report
114
+ CORRECT: Re-read propose -> Create checklist -> Verify each -> Check diff scope -> Report
115
115
  WRONG: "Tests pass, phase complete" (without scope check)
116
116
  ```
117
117
 
@@ -1,12 +1,14 @@
1
1
  name: specflow
2
2
  version: 3
3
- description: SpecFlow workflow — scanplan → refine → build → review → test → verify → done
3
+ description: SpecFlow workflow — explorepropose → refine → apply → review → test → verify → archive
4
4
 
5
5
  artifacts:
6
- - id: scan
7
- generates: "specflow/specs/**/*.md"
8
- description: Brownfield project scan - generates specs baseline
6
+ - id: explore
7
+ generates: "explore.md"
8
+ description: Pre-plan exploration - problem space, options, and recommended direction
9
9
  requires: []
10
+ instruction: |
11
+ Explore the problem before proposing. Capture findings in explore.md for propose handoff.
10
12
 
11
13
  - id: proposal
12
14
  generates: "proposal.md"
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: specflow-build
3
- description: "Two-phase buildplan rewrite + subagent TDD execution"
2
+ name: specflow-apply
3
+ description: "Two-phase applytask rewrite + subagent TDD execution"
4
4
  ---
5
5
 
6
- # SpecFlow: Build
6
+ # SpecFlow: Apply
7
7
 
8
8
  > **HARD GATE (prerequisite)**: phase must be `refined`. Run /specflow:refine first if not.
9
9
  > **HARD GATE (Phase A)**: rewritten tasks.md must be user-confirmed before Phase B.
@@ -12,10 +12,10 @@ description: "Two-phase build — plan rewrite + subagent TDD execution"
12
12
  ## Prerequisites
13
13
 
14
14
  - An active change exists with `.specflow.yaml` and `phase: refined`.
15
- - If phase is not `refined`, REFUSE to proceed and suggest: "This change is in phase `<phase>`. Run `/specflow:refine` first to complete deep review before build."
15
+ - If phase is not `refined`, REFUSE to proceed and suggest: "This change is in phase `<phase>`. Run `/specflow:refine` first to complete deep review before apply."
16
16
  - `design.md` is finalized (refine closed any ambiguity).
17
17
  - `specs/` is finalized (delta specs present for all modified/added capabilities).
18
- - Existing `tasks.md` is present (coarse first-iteration from `/specflow:plan`, or a refine-updated version).
18
+ - Existing `tasks.md` is present (coarse first-iteration from `/specflow:propose`, or a refine-updated version).
19
19
  - `specflow` CLI is available on PATH.
20
20
 
21
21
  ---
@@ -26,7 +26,7 @@ Phase A transforms the existing coarse `tasks.md` into writing-plans precision.
26
26
 
27
27
  ### Stage A1: Load Inputs
28
28
 
29
- Read the file at `.claude/specflow/prompts/build/phase-a-plan.md` and follow its instructions.
29
+ Read the file at `.claude/specflow/prompts/apply/phase-a-plan.md` and follow its instructions.
30
30
 
31
31
  Then read, in this order:
32
32
  1. `design.md` (finalized)
@@ -64,7 +64,7 @@ Present the rewritten `tasks.md` to the user. **Ask the user to confirm the rewr
64
64
 
65
65
  ### Stage B1: Worktree Setup
66
66
 
67
- Read the file at `.claude/specflow/prompts/build/phase-b-worktree.md` and follow its instructions.
67
+ Read the file at `.claude/specflow/prompts/apply/phase-b-worktree.md` and follow its instructions.
68
68
 
69
69
  Set up the isolated build environment (worktree or branch) for implementation.
70
70
 
@@ -72,7 +72,7 @@ Set up the isolated build environment (worktree or branch) for implementation.
72
72
 
73
73
  After Stage B1 completes successfully and before the per-task loop starts:
74
74
 
75
- 1. Read `.claude/specflow/prompts/build/language-router.md`.
75
+ 1. Read `.claude/specflow/prompts/apply/language-router.md`.
76
76
  2. If the file is missing, log `language-router.md not found, falling back to generic reviewer`, set `Language: unknown`, set `ReviewerFile: prompts/shared/code-reviewer-prompt.md`, and continue without interrupting Phase B.
77
77
  3. Otherwise check detection signals at the project root only, in router priority order (do not recurse into subdirectories).
78
78
  4. On first match, set `Language` to the language ID and `ReviewerFile` to the corresponding reviewer file path from the router table.
@@ -85,7 +85,7 @@ For each atomic task in the confirmed rewritten plan:
85
85
 
86
86
  #### B2a: Execute Task (implementer subagent)
87
87
 
88
- Read the file at `.claude/specflow/prompts/build/phase-b-execute.md` and follow its instructions.
88
+ Read the file at `.claude/specflow/prompts/apply/phase-b-execute.md` and follow its instructions.
89
89
 
90
90
  Dispatch a fresh implementer subagent to implement the task using TDD:
91
91
  1. Write failing tests first
@@ -95,7 +95,7 @@ Dispatch a fresh implementer subagent to implement the task using TDD:
95
95
 
96
96
  #### B2b: Review Task (spec reviewer → code reviewer)
97
97
 
98
- Read the file at `.claude/specflow/prompts/build/phase-b-review.md` and follow its instructions.
98
+ Read the file at `.claude/specflow/prompts/apply/phase-b-review.md` and follow its instructions.
99
99
 
100
100
  Dispatch a two-stage review: first a spec reviewer (does the implementation match the spec?), then a code quality reviewer (does the code meet quality standards?).
101
101
 
@@ -124,6 +124,6 @@ Once all tasks are confirmed:
124
124
  ## Phase Transition Notes
125
125
 
126
126
  - **On Phase B success**: phase → `built` (automatic via Stage B3 CLI call).
127
- - **On Phase A gap halt (Outcome 3)**: phase remains `refined`. No transition. User runs `/specflow:refine` to close gaps, then re-runs `/specflow:build`.
128
- - **On Phase A reorganization choice C**: phase remains `refined`. No transition. User edits groups manually, then re-runs `/specflow:build`.
127
+ - **On Phase A gap halt (Outcome 3)**: phase remains `refined`. No transition. User runs `/specflow:refine` to close gaps, then re-runs `/specflow:apply`.
128
+ - **On Phase A reorganization choice C**: phase remains `refined`. No transition. User edits groups manually, then re-runs `/specflow:apply`.
129
129
  - **On Phase B interruption or failing tests**: phase remains `refined`. User resumes Phase B later.