@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gordon.gan/specflow",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "SpecFlow — unified spec-driven development: OpenSpec planning + Superpowers execution in one CLI and cross-IDE workflow",
6
6
  "keywords": [
@@ -17,14 +17,14 @@
17
17
  "code-generation"
18
18
  ],
19
19
  "license": "MIT",
20
- "author": "bstzyf",
21
- "homepage": "https://github.com/bstzyf/specflow",
20
+ "author": "Gordon-Gan-Jiang",
21
+ "homepage": "https://github.com/Gordon-Gan-Jiang/specflow",
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git+https://github.com/bstzyf/specflow.git"
24
+ "url": "git+https://github.com/Gordon-Gan-Jiang/specflow.git"
25
25
  },
26
26
  "bugs": {
27
- "url": "https://github.com/bstzyf/specflow/issues"
27
+ "url": "https://github.com/Gordon-Gan-Jiang/specflow/issues"
28
28
  },
29
29
  "bin": {
30
30
  "specflow": "./bin/specflow.js"
@@ -60,9 +60,6 @@
60
60
  "js-yaml": "^4.1.0",
61
61
  "zod": "^3.24.4"
62
62
  },
63
- "optionalDependencies": {
64
- "code-review-graph": "github:tirth8205/code-review-graph"
65
- },
66
63
  "devDependencies": {
67
64
  "@types/js-yaml": "^4.0.9",
68
65
  "@types/node": "^22.15.3",
@@ -101,7 +101,7 @@ If any CRITICAL security issue is found, stop and escalate to `security-reviewer
101
101
  - **Missing `@Transactional` awareness**: MongoDB multi-document transactions require an explicit `ClientSession` — Panache MongoDB does not auto-manage transactions like Hibernate ORM; document the consistency guarantees
102
102
 
103
103
  ### MEDIUM -- NoSQL General
104
- - **Schema evolution without migration strategy**: Changing document shapes without a versioned migration plan (e.g. a `schemaVersion` field or migration script) — leads to runtime deserialization failures on old documents
104
+ - **Schema evolution without migration strategy**: Changing document shapes without a versioned migration propose (e.g. a `schemaVersion` field or migration script) — leads to runtime deserialization failures on old documents
105
105
  - **Storing large blobs in documents**: Embedding large binary data directly in documents instead of using GridFS or external storage — causes memory pressure and hits the 16 MB BSON limit
106
106
  - **Overly nested documents**: Deeply nested document structures that should be modelled as separate collections with references — query and update complexity grows exponentially
107
107
  - **Missing TTL or expiry policy**: Time-sensitive data (sessions, tokens, caches) stored without a TTL index — leads to unbounded collection growth
@@ -8,12 +8,12 @@ Detection checks only the project root; do not recurse into subdirectories.
8
8
 
9
9
  | Priority | Detection Signal (project root only) | Language ID | Reviewer File |
10
10
  |----------|--------------------------------------|-------------|---------------|
11
- | 1 | `./tsconfig.json` | `typescript` | `prompts/build/ecc-typescript-reviewer.md` |
12
- | 2 | `./pyproject.toml` OR `./requirements.txt` OR `./setup.py` | `python` | `prompts/build/ecc-python-reviewer.md` |
13
- | 3 | `./go.mod` | `go` | `prompts/build/ecc-go-reviewer.md` |
14
- | 4 | `./Cargo.toml` | `rust` | `prompts/build/ecc-rust-reviewer.md` |
15
- | 5 | `./build.gradle.kts` OR `./settings.gradle.kts` | `kotlin` | `prompts/build/ecc-kotlin-reviewer.md` |
16
- | 6 | `./pom.xml` OR `./build.gradle` (non-.kts) | `java` | `prompts/build/ecc-java-reviewer.md` |
11
+ | 1 | `./tsconfig.json` | `typescript` | `prompts/apply/ecc-typescript-reviewer.md` |
12
+ | 2 | `./pyproject.toml` OR `./requirements.txt` OR `./setup.py` | `python` | `prompts/apply/ecc-python-reviewer.md` |
13
+ | 3 | `./go.mod` | `go` | `prompts/apply/ecc-go-reviewer.md` |
14
+ | 4 | `./Cargo.toml` | `rust` | `prompts/apply/ecc-rust-reviewer.md` |
15
+ | 5 | `./build.gradle.kts` OR `./settings.gradle.kts` | `kotlin` | `prompts/apply/ecc-kotlin-reviewer.md` |
16
+ | 6 | `./pom.xml` OR `./build.gradle` (non-.kts) | `java` | `prompts/apply/ecc-java-reviewer.md` |
17
17
  | 7 | (no match) | `unknown` | `prompts/shared/code-reviewer-prompt.md` |
18
18
 
19
19
  ## Fallback
@@ -1,4 +1,4 @@
1
- > **HARD GATE**: User must confirm the rewritten plan before Phase B execution begins. Do NOT proceed to implementation until the user has reviewed and approved the rewritten tasks.md.
1
+ > **HARD GATE**: User must confirm the rewritten propose before Phase B execution begins. Do NOT proceed to implementation until the user has reviewed and approved the rewritten tasks.md.
2
2
 
3
3
  <!-- SOURCE: skills/writing-plans/SKILL.md (with build Phase A rewrite semantics) -->
4
4
 
@@ -7,14 +7,14 @@
7
7
  ## Purpose Declaration
8
8
 
9
9
  **This prompt is for REWRITING an existing tasks.md into writing-plans precision.**
10
- **NOT for generating tasks.md from scratch.** The tasks.md already exists from the `plan` or `refine` phase. Your job is to take a coarse-grained first-iteration plan (or a refine-updated version of it) and transform each checkbox into a 2-5 minute atomic task that a fresh subagent can execute without additional context.
10
+ **NOT for generating tasks.md from scratch.** The tasks.md already exists from the `plan` or `refine` phase. Your job is to take a coarse-grained first-iteration propose (or a refine-updated version of it) and transform each checkbox into a 2-5 minute atomic task that a fresh subagent can execute without additional context.
11
11
 
12
- **Announce at start:** "I'm using specflow:build Phase A to rewrite the existing plan into writing-plans precision."
12
+ **Announce at start:** "I'm using specflow:apply Phase A to rewrite the existing propose into writing-plans precision."
13
13
 
14
14
  **Context:** This should be run in the dedicated worktree created by specflow:refine.
15
15
 
16
16
  **Plan location (input and output):** `specflow/changes/<change-name>/tasks.md`
17
- - (User preferences for plan location override this default)
17
+ - (User preferences for propose location override this default)
18
18
 
19
19
  ## Input Order
20
20
 
@@ -22,7 +22,7 @@ Phase A MUST read inputs in the following order before making any analysis decis
22
22
 
23
23
  1. **Read `design.md`** — this must be finalized (refine phase should have closed any ambiguity). This is the authoritative source of technical decisions: interfaces, error handling strategy, data flow, file structure.
24
24
  2. **Read `specs/**/*.md`** (the delta specs for this change) — these are the behavioral requirements. Every spec scenario must map to at least one atomic task.
25
- 3. **Read existing `tasks.md`** — this is the coarse first-iteration plan (from `/specflow:plan`) or the refine-updated version. Its top-level group structure (`## N. <Group Name>`) is the starting point for rewrite.
25
+ 3. **Read existing `tasks.md`** — this is the coarse first-iteration propose (from `/specflow:propose`) or the refine-updated version. Its top-level group structure (`## N. <Group Name>`) is the starting point for rewrite.
26
26
  4. **Analyze** all three documents jointly, THEN decide one of the 3 outcomes below. Do not start rewriting until you have classified the situation.
27
27
 
28
28
  ## Three Possible Outcomes
@@ -75,14 +75,14 @@ Old → New mapping:
75
75
  Choices:
76
76
  A) Accept reorganization — I will rewrite tasks.md using the new groups.
77
77
  B) Keep original grouping — I will force writing-plans precision to fit the existing groups.
78
- C) I will edit groups manually, then re-run /specflow:build.
78
+ C) I will edit groups manually, then re-run /specflow:apply.
79
79
  ```
80
80
 
81
81
  **Gate behavior:**
82
82
  - Wait for user choice A, B, or C before proceeding. There is no silent default.
83
83
  - On **A**: proceed with rewrite using the new group structure, then run Before/After Audit with the new groups reflected.
84
84
  - On **B**: proceed with rewrite preserving the original group structure (Outcome 1 path).
85
- - On **C**: halt Phase A and exit. User will manually edit groups and re-run `/specflow:build` later.
85
+ - On **C**: halt Phase A and exit. User will manually edit groups and re-run `/specflow:apply` later.
86
86
 
87
87
  ---
88
88
 
@@ -113,7 +113,7 @@ Refine may update design.md, specs, or even proposal as needed.
113
113
  - Any **already-rewritten atomic tasks** in tasks.md MUST be preserved (do NOT discard).
114
114
  - **Not-yet-rewritten tasks** remain in their coarse form from the previous phase (do NOT discard, do NOT stub out).
115
115
  - Phase remains `refined` in `.specflow.yaml` (no transition).
116
- - When user re-runs `/specflow:build` after refine closes the gaps, Phase A re-examines tasks.md and continues rewriting from where it halted — it does not restart from scratch.
116
+ - When user re-runs `/specflow:apply` after refine closes the gaps, Phase A re-examines tasks.md and continues rewriting from where it halted — it does not restart from scratch.
117
117
 
118
118
  ---
119
119
 
@@ -147,7 +147,7 @@ Before finalizing atomic tasks within a group, confirm which files will be creat
147
147
  ```markdown
148
148
  # [Feature Name] Implementation Plan
149
149
 
150
- > **For agentic workers:** REQUIRED SUB-SKILL: Use specflow:build Phase B (recommended) or specflow:build Phase B (inline mode) to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
150
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use specflow:apply Phase B (recommended) or specflow:apply Phase B (inline mode) to implement this propose task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
151
151
 
152
152
  **Goal:** [One sentence describing what this builds]
153
153
 
@@ -204,7 +204,7 @@ Verify: `git log -1 --oneline` shows the new commit
204
204
 
205
205
  ## Portable `Verify:` commands
206
206
 
207
- A `Verify:` line is only useful if the command actually runs in the target environment and behaves the way the plan predicts. Some test-runner invocations look portable but silently change behavior across language/runtime versions — avoid those.
207
+ A `Verify:` line is only useful if the command actually runs in the target environment and behaves the way the propose predicts. Some test-runner invocations look portable but silently change behavior across language/runtime versions — avoid those.
208
208
 
209
209
  Concrete rules:
210
210
 
@@ -236,11 +236,11 @@ Every step must contain the actual content an engineer needs. These are **plan f
236
236
 
237
237
  ## Self-Review
238
238
 
239
- After completing the rewrite (before presenting the Before/After audit), look at the spec with fresh eyes and check the rewritten plan against it. This is a checklist you run yourself — not a subagent dispatch.
239
+ After completing the rewrite (before presenting the Before/After audit), look at the spec with fresh eyes and check the rewritten propose against it. This is a checklist you run yourself — not a subagent dispatch.
240
240
 
241
241
  **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
242
242
 
243
- **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
243
+ **2. Placeholder scan:** Search your propose for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
244
244
 
245
245
  **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks?
246
246
 
@@ -280,9 +280,9 @@ After the rewrite is complete and the Before/After audit has been presented:
280
280
  **Which approach?"**
281
281
 
282
282
  **If Subagent-Driven chosen:**
283
- - **REQUIRED SUB-SKILL:** Use specflow:build Phase B
283
+ - **REQUIRED SUB-SKILL:** Use specflow:apply Phase B
284
284
  - Fresh subagent per task + two-stage review (spec + code)
285
285
 
286
286
  **If Inline Execution chosen:**
287
- - **REQUIRED SUB-SKILL:** Use specflow:build Phase B (inline mode)
287
+ - **REQUIRED SUB-SKILL:** Use specflow:apply Phase B (inline mode)
288
288
  - Batch execution with checkpoints for review
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Subagent-Driven Development (Phase B)
6
6
 
7
- Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
7
+ Execute propose by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
8
8
 
9
9
  **Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history -- you construct exactly what they need. This also preserves your own context for coordination work.
10
10
 
@@ -17,16 +17,16 @@ digraph when_to_use {
17
17
  "Have implementation plan?" [shape=diamond];
18
18
  "Tasks mostly independent?" [shape=diamond];
19
19
  "Stay in this session?" [shape=diamond];
20
- "specflow:build Phase B" [shape=box];
21
- "specflow:build Phase B (inline mode)" [shape=box];
20
+ "specflow:apply Phase B" [shape=box];
21
+ "specflow:apply Phase B (inline mode)" [shape=box];
22
22
  "Manual execution or brainstorm first" [shape=box];
23
23
 
24
24
  "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
25
25
  "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
26
26
  "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
27
27
  "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
28
- "Stay in this session?" -> "specflow:build Phase B" [label="yes"];
29
- "Stay in this session?" -> "specflow:build Phase B (inline mode)" [label="no - parallel session"];
28
+ "Stay in this session?" -> "specflow:apply Phase B" [label="yes"];
29
+ "Stay in this session?" -> "specflow:apply Phase B (inline mode)" [label="no - parallel session"];
30
30
  }
31
31
  ```
32
32
 
@@ -60,7 +60,7 @@ digraph process {
60
60
  "Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
61
61
  "More tasks remain?" [shape=diamond];
62
62
  "Dispatch final code reviewer subagent for entire implementation" [shape=box];
63
- "Use specflow:done" [shape=box style=filled fillcolor=lightgreen];
63
+ "Use specflow:archive" [shape=box style=filled fillcolor=lightgreen];
64
64
 
65
65
  "Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent\n(Read .claude/specflow/prompts/shared/implementer-prompt.md)";
66
66
  "Dispatch implementer subagent\n(Read .claude/specflow/prompts/shared/implementer-prompt.md)" -> "Implementer subagent asks questions?";
@@ -79,7 +79,7 @@ digraph process {
79
79
  "Mark task complete in TodoWrite" -> "More tasks remain?";
80
80
  "More tasks remain?" -> "Dispatch implementer subagent\n(Read .claude/specflow/prompts/shared/implementer-prompt.md)" [label="yes"];
81
81
  "More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
82
- "Dispatch final code reviewer subagent for entire implementation" -> "Use specflow:done";
82
+ "Dispatch final code reviewer subagent for entire implementation" -> "Use specflow:archive";
83
83
  }
84
84
  ```
85
85
 
@@ -87,7 +87,7 @@ digraph process {
87
87
 
88
88
  Use the least powerful model that can handle each role to conserve cost and increase speed.
89
89
 
90
- **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
90
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the propose is well-specified.
91
91
 
92
92
  **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
93
93
 
@@ -112,7 +112,7 @@ Implementer subagents report one of four statuses. Handle each appropriately:
112
112
  1. If it's a context problem, provide more context and re-dispatch with the same model
113
113
  2. If the task requires more reasoning, re-dispatch with a more capable model
114
114
  3. If the task is too large, break it into smaller pieces
115
- 4. If the plan itself is wrong, escalate to the human
115
+ 4. If the propose itself is wrong, escalate to the human
116
116
 
117
117
  **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
118
118
 
@@ -125,9 +125,9 @@ Implementer subagents report one of four statuses. Handle each appropriately:
125
125
  ## Example Workflow
126
126
 
127
127
  ```
128
- You: I'm using specflow:build Phase B to execute this plan.
128
+ You: I'm using specflow:apply Phase B to execute this plan.
129
129
 
130
- [Read plan file once: specflow/changes/<change-name>/tasks.md]
130
+ [Read propose file once: specflow/changes/<change-name>/tasks.md]
131
131
  [Extract all 5 tasks with full text and context]
132
132
  [Create TodoWrite with all tasks]
133
133
 
@@ -237,7 +237,7 @@ Done!
237
237
  - Skip reviews (spec compliance OR code quality)
238
238
  - Proceed with unfixed issues
239
239
  - Dispatch multiple implementation subagents in parallel (conflicts)
240
- - Make subagent read plan file (provide full text instead)
240
+ - Make subagent read propose file (provide full text instead)
241
241
  - Skip scene-setting context (subagent needs to understand where task fits)
242
242
  - Ignore subagent questions (answer before letting them proceed)
243
243
  - Accept "close enough" on spec compliance (spec reviewer found issues = not done)
@@ -264,13 +264,13 @@ Done!
264
264
  ## Integration
265
265
 
266
266
  **Required workflow skills:**
267
- - **specflow:build Phase B (worktree)** - REQUIRED: Set up isolated workspace before starting
268
- - **specflow:build Phase A** - Creates the plan this skill executes
267
+ - **specflow:apply Phase B (worktree)** - REQUIRED: Set up isolated workspace before starting
268
+ - **specflow:apply Phase A** - Creates the propose this skill executes
269
269
  - **specflow:review** - Code review template for reviewer subagents
270
- - **specflow:done** - Complete development after all tasks
270
+ - **specflow:archive** - Complete development after all tasks
271
271
 
272
272
  **Subagents should use:**
273
- - **specflow:build TDD** - Subagents follow TDD for each task
273
+ - **specflow:apply TDD** - Subagents follow TDD for each task
274
274
 
275
275
  **Alternative workflow:**
276
- - **specflow:build Phase B (inline mode)** - Use for parallel session instead of same-session execution
276
+ - **specflow:apply Phase B (inline mode)** - Use for parallel session instead of same-session execution
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Two-Phase Review Routing
4
4
 
5
- Orchestration for the two-phase review process used during specflow:build Phase B. Each task's implementation goes through spec compliance first, then code quality.
5
+ Orchestration for the two-phase review process used during specflow:apply Phase B. Each task's implementation goes through spec compliance first, then code quality.
6
6
 
7
7
  ## Overview
8
8
 
@@ -40,7 +40,7 @@ Task tool (general-purpose):
40
40
 
41
41
  ## Phase 2: Code Quality Review
42
42
 
43
- **Prompt source:** Read the `ReviewerFile` session context set after Stage B1b. Mapping details live in `.claude/specflow/prompts/build/language-router.md`. When `Language` is `unknown`, fall back to `.claude/specflow/prompts/shared/code-reviewer-prompt.md`.
43
+ **Prompt source:** Read the `ReviewerFile` session context set after Stage B1b. Mapping details live in `.claude/specflow/prompts/apply/language-router.md`. When `Language` is `unknown`, fall back to `.claude/specflow/prompts/shared/code-reviewer-prompt.md`.
44
44
 
45
45
  **Purpose:** Verify the implementation is well-built -- clean, tested, maintainable, and language-appropriate when an ECC reviewer is selected.
46
46
 
@@ -207,9 +207,9 @@ Ready to implement auth feature
207
207
 
208
208
  **Called by:**
209
209
  - **specflow:refine** (Phase 4) - REQUIRED when design is approved and implementation follows
210
- - **specflow:build Phase B** - REQUIRED before executing any tasks
211
- - **specflow:build Phase B (inline mode)** - REQUIRED before executing any tasks
210
+ - **specflow:apply Phase B** - REQUIRED before executing any tasks
211
+ - **specflow:apply Phase B (inline mode)** - REQUIRED before executing any tasks
212
212
  - Any skill needing isolated workspace
213
213
 
214
214
  **Pairs with:**
215
- - **specflow:done** - REQUIRED for cleanup after work complete
215
+ - **specflow:archive** - REQUIRED for cleanup after work complete
@@ -2,17 +2,17 @@
2
2
 
3
3
  # Plan Document Reviewer Prompt Template
4
4
 
5
- Use this template when dispatching a plan document reviewer subagent.
5
+ Use this template when dispatching a propose document reviewer subagent.
6
6
 
7
- **Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
7
+ **Purpose:** Verify the propose is complete, matches the spec, and has proper task decomposition.
8
8
 
9
- **Dispatch after:** The complete plan is written.
9
+ **Dispatch after:** The complete propose is written.
10
10
 
11
11
  ```
12
12
  Task tool (general-purpose):
13
- description: "Review plan document"
13
+ description: "Review propose document"
14
14
  prompt: |
15
- You are a plan document reviewer. Verify this plan is complete and ready for implementation.
15
+ You are a propose document reviewer. Verify this propose is complete and ready for implementation.
16
16
 
17
17
  **Plan to review:** [PLAN_FILE_PATH]
18
18
  **Spec for reference:** [SPEC_FILE_PATH]
@@ -24,7 +24,7 @@ Task tool (general-purpose):
24
24
  | Completeness | TODOs, placeholders, incomplete tasks, missing steps |
25
25
  | Spec Alignment | Plan covers spec requirements, no major scope creep |
26
26
  | Task Decomposition | Tasks have clear boundaries, steps are actionable |
27
- | Buildability | Could an engineer follow this plan without getting stuck? |
27
+ | Buildability | Could an engineer follow this propose without getting stuck? |
28
28
 
29
29
  ## Calibration
30
30
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Test-Driven Development (Build Variant)
6
6
 
7
- Per-task atomic TDD for the build phase. Each task in the plan follows Red-Green-Refactor strictly.
7
+ Per-task atomic TDD for the apply phase. Each task in the rewritten plan follows Red-Green-Refactor strictly.
8
8
 
9
9
  ## Overview
10
10
 
@@ -16,7 +16,7 @@ Write the test first. Watch it fail. Write minimal code to pass.
16
16
 
17
17
  ## When to Use
18
18
 
19
- **Always during build phase tasks:**
19
+ **Always during apply phase tasks:**
20
20
  - Each task in the implementation plan
21
21
  - Bug fixes discovered during implementation
22
22
  - Behavior changes within a task
@@ -124,7 +124,7 @@ Next failing test for next behavior in the task.
124
124
 
125
125
  ## Per-Task Commit Pattern
126
126
 
127
- Each task in the plan should follow this atomic cycle:
127
+ Each task in the propose should follow this atomic cycle:
128
128
 
129
129
  1. Write failing test for first behavior -> verify RED
130
130
  2. Write minimal implementation -> verify GREEN
@@ -8,7 +8,7 @@ Guide completion of development work by presenting clear options and handling ch
8
8
 
9
9
  **Core principle:** Verify tests -> Present options -> Execute choice -> Clean up.
10
10
 
11
- **Announce at start:** "I'm using specflow:done to complete this work."
11
+ **Announce at start:** "I'm using specflow:archive to complete this work."
12
12
 
13
13
  ## The Process
14
14
 
@@ -197,8 +197,8 @@ git worktree remove <worktree-path>
197
197
  ## Integration
198
198
 
199
199
  **Called by:**
200
- - **specflow:build Phase B** (final step) - After all tasks complete
201
- - **specflow:build Phase B (inline mode)** (final step) - After all batches complete
200
+ - **specflow:apply Phase B** (final step) - After all tasks complete
201
+ - **specflow:apply Phase B (inline mode)** (final step) - After all batches complete
202
202
 
203
203
  **Pairs with:**
204
- - **specflow:build Phase B (worktree)** - Cleans up worktree created by that skill
204
+ - **specflow:apply Phase B (worktree)** - Cleans up worktree created by that skill
@@ -0,0 +1,152 @@
1
+ > **HARD GATE**: Do NOT write proposal, specs, design, tasks, or code during explore. Only `explore.md` is allowed output.
2
+
3
+ <!-- SOURCE: OpenSpec docs/explore.md (conversation-first exploration) + Superpowers brainstorming (options, trade-offs, YAGNI) -->
4
+
5
+ # Explore Session: Think Before Propose
6
+
7
+ > This prompt is for **from-scratch exploration** when requirements are fuzzy.
8
+ > NOT refine-phase brainstorming (that attacks existing propose artifacts).
9
+
10
+ ## Purpose
11
+
12
+ Turn a vague worry into a sharp, buildable direction **before** any contract artifacts exist.
13
+
14
+ Explore is a **conversation** that may read the codebase, compare options, and narrow scope. It commits you to nothing except the final `explore.md` the user confirms.
15
+
16
+ ## When to Explore
17
+
18
+ Explore when any of these is true:
19
+
20
+ - You know the **problem** but not the **solution**
21
+ - You are choosing between approaches and want tradeoffs against real code
22
+ - You are new to an area of the codebase
23
+ - Requirements are fuzzy and need sharpening
24
+ - Scope feels too big or too small
25
+ - You're stuck during apply or refine on a sub-decision and need to compare options before continuing
26
+
27
+ Skip explore when you already know exactly what to build — go straight to propose.
28
+
29
+ ## Process
30
+
31
+ ### Step 1 — Bring the problem, not the solution
32
+
33
+ Ask the user to state the problem in their own words. Prefer:
34
+
35
+ - "Checkout sometimes creates duplicate orders" ✅
36
+ - "Add Redis cache" ❌ (pre-commits to an answer)
37
+
38
+ If the user leads with a solution, reflect it back as a hypothesis and ask what problem it solves.
39
+
40
+ ### Step 2 — Investigate (OpenSpec explore)
41
+
42
+ Before proposing fixes, **read the relevant code** when a codebase exists:
43
+
44
+ - Search and read files on the critical path
45
+ - Summarize what exists today in plain language
46
+ - Name root causes or constraints tied to actual code — do not guess
47
+
48
+ Present findings as:
49
+
50
+ ```markdown
51
+ ## What I Found
52
+ - ...
53
+ ## Implications
54
+ - ...
55
+ ```
56
+
57
+ Use diagrams (mermaid or ascii) when they clarify architecture or flow.
58
+
59
+ ### Step 3 — Clarifying questions (Superpowers brainstorming)
60
+
61
+ Ask **one question at a time**. Prefer multiple-choice when options are enumerable.
62
+
63
+ Cover at least:
64
+
65
+ 1. **Who / what pain** — who is affected and what breaks today?
66
+ 2. **Success signal** — how will we know this worked? (measurable if possible)
67
+ 3. **Boundaries** — permissions, failure modes, non-functional concerns
68
+ 4. **Scope** — too broad, too narrow, or should split into multiple changes?
69
+
70
+ Inject **YAGNI**: flag features that sound nice but are not required for the stated problem.
71
+
72
+ ### Step 4 — Propose 2–3 approaches
73
+
74
+ For each non-trivial decision, present **at least 2 genuinely different options** (not cosmetic variants):
75
+
76
+ | Option | Pros | Cons | Best when |
77
+ |--------|------|------|-----------|
78
+ | A | ... | ... | ... |
79
+ | B | ... | ... | ... |
80
+
81
+ Include a **recommended direction** with rationale tied to findings from Step 2.
82
+
83
+ If exploration reveals the idea is not worth building, say so — that is a valid outcome. Offer to stop or narrow scope.
84
+
85
+ ### Step 5 — Draft explore.md
86
+
87
+ Load the scaffold from `.claude/specflow/templates/explore.md` and write `specflow/changes/<name>/explore.md` using the exact sections below.
88
+
89
+ ### Step 6 — Gate: Direction confirmation (HARD GATE)
90
+
91
+ Present a summary and ask explicitly:
92
+
93
+ > "Confirm this explored direction so I can hand off to `/specflow:propose`? (yes / revise / abandon)"
94
+
95
+ - **yes** → proceed to handoff
96
+ - **revise** → update explore.md and re-present
97
+ - **abandon** → note outcome; do not run propose
98
+
99
+ Do NOT proceed to propose inside this skill unless the user confirms.
100
+
101
+ ## explore.md Format (CRITICAL)
102
+
103
+ Use `templates/explore.md` as the scaffold (runtime: `.claude/specflow/templates/explore.md`). Section structure:
104
+
105
+ ```markdown
106
+ # Explore: <change-name>
107
+
108
+ **Status**: confirmed | draft
109
+ **Explored**: YYYY-MM-DD
110
+
111
+ ## Problem Space
112
+ <!-- Who / pain + Success signal -->
113
+
114
+ ## Evidence
115
+
116
+ ## What Exists Today
117
+ ### What I Found
118
+ ### Implications
119
+
120
+ ## Options Considered
121
+ ### Option A / B / (optional C) — Pros / Cons / Best when
122
+
123
+ ## Recommended Direction
124
+
125
+ ## MVP Scope
126
+
127
+ ## Non-Goals
128
+
129
+ ## Suggested Capabilities
130
+
131
+ ## Open Questions
132
+
133
+ ## Handoff Notes
134
+ <!-- propose mapping hints -->
135
+ ```
136
+
137
+ Do not omit sections without reason; for greenfield, leave **What Exists Today** empty or note "greenfield — no baseline code".
138
+
139
+ ## Tips for a Good Exploration
140
+
141
+ - **Bring the problem, not the solution.** Redirect premature solutioning to investigation.
142
+ - **Let it read first.** Point the AI at the relevant code path when helpful.
143
+ - **It's okay to bail.** If the idea isn't worth building, say so — that is a valid outcome.
144
+ - **Explore again mid-change.** Stuck during `/specflow:apply` or `/specflow:refine`? Re-run explore for the sub-problem, update `explore.md`, confirm, then return to the paused workflow.
145
+
146
+ ## Handoff to Propose
147
+
148
+ After confirmation, tell the user:
149
+
150
+ > Explore saved to `specflow/changes/<name>/explore.md`. Run `/specflow:propose` — propose will read explore.md and synthesize proposal without repeating resolved Q&A.
151
+
152
+ Do NOT generate proposal, specs, design, or tasks in explore.
@@ -158,7 +158,7 @@ You MUST complete each phase before proceeding to the next.
158
158
  - Automated test if possible
159
159
  - One-off test script if no framework
160
160
  - MUST have before fixing
161
- - Use specflow:test or specflow:build TDD for writing proper failing tests
161
+ - Use specflow:test or specflow:apply TDD for writing proper failing tests
162
162
 
163
163
  2. **Implement Single Fix**
164
164
  - Address the root cause identified
@@ -237,7 +237,7 @@ If you catch yourself thinking:
237
237
 
238
238
  ## Related Skills
239
239
 
240
- - **specflow:test** or **specflow:build TDD** - For creating failing test case (Phase 4, Step 1)
240
+ - **specflow:test** or **specflow:apply TDD** - For creating failing test case (Phase 4, Step 1)
241
241
  - **specflow:verify** - Verify fix worked before claiming success
242
242
 
243
243
  ## Real-World Impact
@@ -111,7 +111,7 @@ Save the document to:
111
111
  specflow/changes/<change-name>/design.md
112
112
  ```
113
113
 
114
- **Do NOT ask the user to confirm this draft at this stage.** The end-of-plan summary (handled by the orchestrating SKILL) will present all four plan-phase artifacts together for one cohesive user review. Write the best first-iteration design you can, save it, and move on to the next plan-phase artifact.
114
+ **Do NOT ask the user to confirm this draft at this stage.** The end-of-propose summary (handled by the orchestrating SKILL) will present all four plan-phase artifacts together for one cohesive user review. Write the best first-iteration design you can, save it, and move on to the next plan-phase artifact.
115
115
 
116
116
  ## Remember
117
117
 
@@ -23,6 +23,36 @@ ls specflow/specs/ 2>/dev/null
23
23
  **If no specs exist:**
24
24
  - This is a greenfield change; note that no baseline specs need to be considered
25
25
 
26
+ ### Step 1.5: Explore Handoff (if explore.md exists)
27
+
28
+ Check for a confirmed exploration artifact:
29
+
30
+ ```bash
31
+ cat specflow/changes/<change-name>/explore.md 2>/dev/null
32
+ ```
33
+
34
+ **If `explore.md` exists with `Status: confirmed`:**
35
+
36
+ 1. Read it completely before asking any proposal questions
37
+ 2. Do NOT re-ask topics already resolved in explore
38
+ 3. Synthesize `proposal.md` using this mapping:
39
+
40
+ | explore.md section | proposal.md section |
41
+ |--------------------|---------------------|
42
+ | Problem Space + Evidence | `## Why` |
43
+ | Recommended Direction + MVP Scope | `## What Changes` |
44
+ | Suggested Capabilities | `## Capabilities` |
45
+ | Non-Goals + Open Questions (impact) | `## Impact` |
46
+
47
+ 4. Only ask the user about items under **Open Questions** (one at a time)
48
+ 5. Present the mapping summary before writing: "explore §X → proposal §Y"
49
+
50
+ **If `explore.md` exists but `Status: draft`:**
51
+
52
+ - Stop and tell the user to finish `/specflow:explore` confirmation first
53
+
54
+ **If no `explore.md`:** proceed to Step 2 (standard Q&A). If the user's request is still vague, suggest `/specflow:explore` before continuing.
55
+
26
56
  ### Step 2: Gather Proposal Information
27
57
 
28
58
  Ask the user (one question at a time):
@@ -111,4 +111,4 @@ Save each spec file. Then present a summary:
111
111
 
112
112
  ## Next Step
113
113
 
114
- Once delta specs are approved, proceed to `/specflow:refine` for design work or `/specflow:build` for planning.
114
+ Once delta specs are approved, proceed to `/specflow:refine` for design work or `/specflow:apply` for planning.