@jakkrichm/create-nexus-devflow 2.17.2 → 2.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakkrichm/create-nexus-devflow",
3
- "version": "2.17.2",
3
+ "version": "2.17.4",
4
4
  "description": "Installer and workflow manager for Nexus-DevFlow agentic workflow layer.",
5
5
  "license": "MIT",
6
6
  "author": "Jakkrich",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bughunter
3
- description: "[devflow] Offensive security orchestrator & bug hunting guide. Indexes 83 vulnerability classes, 5-phase methodology (Think, Hunt, Perimeter, Ship), 681 disclosed HackerOne patterns, and JIT reference guides in devflow/.vendor/bughunter/. Use when running /bughunter, performing security reviews, verifying auth/injection risks in /check or /audit, or testing API endpoints for vulnerabilities."
3
+ description: "[devflow] Investigate security vulnerabilities with evidence. Use for /bughunter or an authorized security review of code or endpoints."
4
4
  argument-hint: "[{target, vuln-class, or topic}]"
5
5
  ---
6
6
 
@@ -36,7 +36,8 @@ When invoked without an argument (or when determining the next step), inspect:
36
36
 
37
37
  ### Default State Recommendations
38
38
  - If no run is active and user wants to start a feature -> Recommend `/feature <name>`.
39
- - If no run is active and user wants to fix a bug -> Recommend `/fix <bug>`.
39
+ - If the user requests a bugfix plan -> Recommend `/fix <bug>`.
40
+ - If the user requests a completed fix -> preserve the implementation and verification scope; draft the required spec internally and continue to `/implement` using existing authorization.
40
41
  - If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/feature IDEA-xxx` or `/discovery IDEA-xxx`.
41
42
  - If no run is active and user wants deep architectural exploration -> Recommend `/discovery`.
42
43
  - If user asks to check system health -> Recommend `doctor`.
@@ -48,7 +49,7 @@ When invoked without an argument (or when determining the next step), inspect:
48
49
  | User Intent / Request Type | Recommended Skill | Normal Name / Alias | Lifecycle Path |
49
50
  | :--- | :--- | :--- | :--- |
50
51
  | **"Spec new feature / living spec"** | `feature` | `/feature` / `/spec` | **Unified**: `/feature` -> `/implement` -> `/check` -> `/complete` |
51
- | **"Quick bugfix / ad-hoc change"** | `fix` | `/fix` | **Unified**: `/fix` -> `/implement` -> `/check` -> `/complete` |
52
+ | **"Draft a bugfix / small-change plan"** | `fix` | `/fix` | **Unified**: `/fix` -> `/implement` -> `/check` -> `/complete` |
52
53
  | **"Capture quick idea / thought"** | `idea` | `/idea` | **Companion**: Enriches & saves to `devflow/ideas.md` |
53
54
  | **"Pre-delivery exploration / research"**| `discovery`| `/discovery` | **Pre-Flight**: `discovery` -> `/feature` |
54
55
  | **"Socratic alignment / ADR / glossary"**| `grill` | `/grill` / `/align` | **Pre-Flight**: `grill` -> `/feature` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fix
3
- description: "[devflow] Write a task-isolated spec (devflow/context/{xxx-slug}/spec.md) for an ad-hoc bug fix or small unplanned change, then stop before implementation. Use for /fix, confirmed bugs, or small changes outside the build plan."
3
+ description: "[devflow] Draft a task-isolated spec for a bug or small change. Use when invoking /fix or requesting a fix plan."
4
4
  argument-hint: "[{title or issue-description}]"
5
5
  ---
6
6
 
@@ -23,7 +23,7 @@ it creates a dedicated run folder at `devflow/context/{xxx-slug}/` (e.g. `059-fi
23
23
  ## Input
24
24
 
25
25
  A description of the bug or change, for example `/fix "password reset email never
26
- sends"`. If the user just reported the problem in chat, use that.
26
+ sends"`. Use the reported problem as input when the user asks for a fix plan. A request to diagnose a problem belongs to `/debug`; a request to fix and verify it retains its full delivery scope.
27
27
 
28
28
  The input may also be a finding ID from `devflow/context/{xxx-slug}/findings.md` (or previous findings), alone
29
29
  or with a description, for example `/fix F-03`.
@@ -46,7 +46,7 @@ then write a short spec to `devflow/context/{xxx-slug}/spec.md`. Also initialize
46
46
  big to read. Each ends with an observable "done when".
47
47
  - **Verify** - how to confirm it's fixed (what to click or test).
48
48
 
49
- Then stop. Tell the user to review the fix spec, then run `/implement` to build it.
49
+ For an explicit `/fix` or a planning-only request, present the spec as the completed deliverable and identify `/implement` as the next command. For an existing request to implement and verify the fix, preserve that authorization: use this spec as the internal handoff and continue through `/implement` without an extra approval pause. Ask only for unresolved material scope, design, or permission decisions.
50
50
 
51
51
  ## Rules
52
52
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: implement
3
- description: "[devflow] Implement or start coding the active task-isolated spec on its branch in small steps, running tests after each step and presenting the configured review handoff. Use for /implement or requests to build or resume an approved spec."
3
+ description: "[devflow] Build and verify a task-isolated spec. Use for /implement or requests to implement an approved plan."
4
4
  argument-hint: "[{run-id, number, or name}] [--ticket <NN | path>]"
5
5
  ---
6
6
 
7
- # implement - build the target spec, one reviewed step at a time
7
+ # implement - build and verify the target spec
8
8
 
9
9
  **Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.
10
10
 
@@ -20,17 +20,23 @@ Where this sits in the workflow:
20
20
 
21
21
  `/feature`, `/fix`, or `/rollback` wrote the spec to
22
22
  `devflow/context/{xxx-slug}/spec.md` and stopped.
23
- This skill turns that spec into code, following the build loop in
24
- `devflow/context/ai-interaction.md`, without vibe coding: small steps, a visible diff plus
25
- a plain-English explanation for each, testing, and iteration until it works, all
26
- behind your approval. It builds on a branch and offers an optional commit
27
- checkpoint after each step; the work-level commit, merging, and logging are
28
- `/complete`'s job.
23
+ Build the selected spec through its acceptance criteria and required verification, then present the configured review handoff. Preserve authorization already given for this work. Read only relevant conventions and reuse loaded context.
24
+
25
+ ## Review cadence and checkpoints
26
+
27
+ Read `workflow.stepReview` and `workflow.checkpointCommits` from `devflow/config.json` independently; defaults are `feature` and `disabled`.
28
+
29
+ - `stepReview: "feature"`: continue through all authorized steps without asking Continue after each step. Record evidence as work proceeds and present one final review packet.
30
+ - `stepReview: "every"`: after a working step, show its diff and evidence, then wait for approval before the next step. A walkthrough is available on request.
31
+ - `checkpointCommits: "disabled"`: omit ordinary checkpoint offers.
32
+ - `checkpointCommits: "enabled"`: offer an optional checkpoint at the configured review boundary (per-step for `every`, final packet for `feature`). Show the exact candidate and obtain commit authorization before committing. The setting itself is not authorization.
33
+
34
+ Independent-review checkpoints follow their separate contract below. Review cadence never authorizes commit, merge, push, or deployment.
29
35
 
30
36
  ## Multi-Run Target & Ticket-Driven Target Resolution
31
37
 
32
- - **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`, checks out `feature/{xxx-slug}`, and loads only that run's `spec.md`.
33
- - **With no argument** (`/implement`) -> checks current git branch matching `feature/{xxx-slug}`, or auto-picks if only 1 spec is active in `devflow/context/`, or prompts the user if multiple specs are queued.
38
+ - **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`, selects the branch matching the run type and configured prefix, and loads only that run's `spec.md`.
39
+ - **With no argument** (`/implement`) -> checks the current feature, fix, or rollback branch against the configured prefixes, or auto-picks if only 1 spec is active in `devflow/context/`, or prompts the user if multiple specs are queued.
34
40
  - **Ticket Input (`--ticket <NN | path>`)**: Targets a specific tracer-bullet ticket directly (e.g. `/implement 12 --ticket 01`, `/implement --ticket 02`, `/implement --ticket issues/01-auth.md`, or `/implement 01` when run-id is not ambiguous).
35
41
 
36
42
  ### Ticket Discovery Hierarchy
@@ -80,11 +86,7 @@ receipt. After the final Verify pass, an active gate routes to
80
86
  `current` freshness may proceed toward `/complete`. This skill never approves
81
87
  its own work or rewrites receipt evidence.
82
88
 
83
- For a browser-facing step, run `npm run test:browser` when the script exists and
84
- record the result in the step evidence. Use `browseros-neo` for the interactive
85
- handoff when it is available and the done-when is visual or behavioral. When the
86
- script or MCP is absent, report that exact limitation; do not silently install a
87
- runner or claim browser evidence.
89
+ For browser-facing changes, run focused browser tests during iteration when available. Run the required `npm run test:browser` gate once before handoff if the spec or project requires it. Use `browseros-neo` for visual or behavioral evidence when available and relevant. Record missing tooling accurately; install a runner only when setup is in the authorized scope.
88
90
 
89
91
  **Resuming?** If the spec already has some build steps checked off (`- [x]`), this
90
92
  feature was started earlier and interrupted (often a cleared context). The spec and
@@ -95,8 +97,7 @@ starting over.
95
97
 
96
98
  ## Step 1 - branch
97
99
 
98
- Create and check out a branch named from the spec: `feature/{xxx-slug}` for a feature,
99
- `fix/{xxx-slug}` for a fix, or `rollback/{xxx-slug}` for a Type: Rollback spec. If the
100
+ Create or select the branch for the spec using `git.featureBranchPrefix`, `git.fixBranchPrefix`, or `git.rollbackBranchPrefix` from config (defaults: `feature/`, `fix/`, `rollback/`). Preserve unrelated working-tree changes before switching. If the
100
101
  project isn't a git repo yet, say so and ask the user to run `git init` first;
101
102
  the loop needs branches. On resume, the branch already exists - check it out
102
103
  instead of creating a new one.
@@ -105,99 +106,20 @@ instead of creating a new one.
105
106
 
106
107
  When implementing a rollback task, follow the exact safety procedure in `reference/rollback-implementation.md`.
107
108
 
108
- ## Step 2 - build one step, review, iterate, checkpoint (Strict TDD)
109
-
110
- Work through the spec's build steps in order, one at a time. For each step:
111
-
112
- 1. **Strict TDD Cycle (for logic & behavior changes)**:
113
- - **🔴 RED**: Write the unit test first in the relevant test file. Execute the test command and show the failing assertion output.
114
- - **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
115
- - **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
116
- - *Code Reversion Rule*: If production code is written without a prior test for behavior changes, revert it and write the test first.
117
-
118
- **⚖️ The Iron Law**: `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` — Apply to behavior changes according to the spec's test decision. If code came first, revert only your own work for that step and restart from the test, preserving the user's existing work.
119
-
120
- **Red-Phase Verification (confirm all three before GREEN):**
121
- - The test actually fails, rather than encountering a syntax error
122
- - The error message identifies missing behavior, rather than invalid configuration
123
- - The failure reflects the behavior under test, rather than a bug in the test itself
124
-
125
- **Green-Phase Discipline**: Write the minimum code needed to pass the test; add only the options/features it requires (YAGNI constraint).
126
-
127
- > 📖 For anti-patterns and Bad vs Good examples, read [`tdd-anti-patterns.md`](tdd-anti-patterns.md).
128
-
129
- 2. Implement just that step: the smallest change that satisfies its "done when."
130
- 3. Show the **diff**, not whole files.
131
- 4. **Explain it, and prove it.** Give a short summary: what the step delivered,
132
- one line per changed file on what it does and why, then confirm the step's
133
- "done when" is met with empirical evidence (test pass output, build output, or screenshot). This summary is the comprehension gate, so keep it concrete, not
134
- vague. Include a short **How to try it** note when the step has a manual
135
- path: the command, URL, click, endpoint, or output the user can check.
136
- 5. **Verify the step.** If `AGENTS.md` declares a `Verify` command, run that exact
137
- command as the automated gate. It is only an umbrella for checks the project
138
- actually has, so do not invent tests or other checks to satisfy it. If no
139
- `Verify` command exists, run the documented build command and the test command
140
- when the project declares one. A step that adds logic must ship a passing test
141
- in the same diff when the test gate is on, and the suite must be green before
142
- the step is approved (see the Testing gate in `coding-standards.md`). UI and
143
- integration-only steps ride on screenshot plus build evidence. Run a focused
144
- test separately when it gives faster feedback, then use `Verify` as the final
145
- automated gate. For UI or integration done-whens, prefer Playwright when it is
146
- already installed or declared in `AGENTS.md`; do not add it silently for an
147
- unrelated feature. Create focused test files next to the source they cover,
148
- per `coding-standards.md`. Never install a runner mid-step unless the current
149
- spec is explicitly the unit-testing setup itself (for example `/fix "add unit
150
- testing"`). If a step surfaces non-trivial logic the spec did not foresee, add
151
- a focused test then, or note why not. When a step's done-when is behavioral (a
152
- click, a download, or a flow across screens), run `/check` to prove it against
153
- the running app rather than eyeballing it.
154
- 5. **Iterate until it works.** If it fails or the user wants changes, revise the
155
- step (re-prompt or hand-edit the code), show the updated diff, and re-test.
156
- Repeat until it works and the user approves. Nothing is committed until the
157
- user is happy with the step.
158
- 6. **Mark it done, then prompt to move on.** Once the step is approved, check that
159
- step off (`- [x]`) in `devflow/context/{xxx-slug}/spec.md` so progress survives a context
160
- clear. If the step repaired a finding tracked in
161
- `devflow/context/{xxx-slug}/findings.md`, set that finding's status to `fixed` now too
162
- and note the repair in its **Resolution** line. Never set `closed`: a repair
163
- is re-reviewed by `/audit` before it clears, because a fix can introduce a
164
- worse defect than the one it removed. Then offer a short choice, noting that checkpoints are optional since
165
- `/complete` makes the real feature-level commit. Use the current tool's short
166
- user-input prompt when available; when you've just produced a long block to
167
- read (a deep explanation, a big
168
- walk-through), ask in plain text instead, so the prompt doesn't cover what the
169
- user is still reading:
170
- - **Continue** (default) - roll into the next step without committing.
171
- - **Commit checkpoint** - commit just this step on the branch with a
172
- conventional message (a cheap rollback point).
173
- - **Walk me through it** - give a deeper, line-level explanation of the new or
174
- changed code (why this approach, what each part does, any gotchas), then
175
- re-ask this checkpoint prompt. A loop-back, not a terminal choice.
176
- - **Stop here** - pause the loop so the user can review or come back later.
177
-
178
- On **Continue** or after **Commit checkpoint**, go to the next step. On **Walk
179
- me through it**, explain in depth and then re-ask this prompt in plain text (the
180
- explanation is long, so a modal would cover it). On **Stop here**, stop and say
181
- where things stand: the branch is intact; run `/implement` again to resume, or
182
- `/complete` to wrap up what's built so far.
183
-
184
- ### Ticket-Driven TDD Execution (when working from a Ticket)
185
-
186
- When executing a tracer-bullet ticket (via `--ticket` or auto-frontier):
187
- 1. **Extract Scope**: Read *What to build* and *Acceptance criteria* checklist (`- [ ]`) from the active ticket file.
188
- 2. **Strict TDD Cycle per Criterion**:
189
- - **🔴 RED**: Write the unit/integration test for the criterion first at the agreed seam. Execute the test command and verify the expected failing assertion.
190
- - **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
191
- - **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
192
- 3. **Verify Gate**: Run the project's Verify command (`npm run check` or documented test suite) to ensure whole-system health before concluding the ticket.
193
- 4. **Bidirectional State Sync**:
194
- - Mark each completed criterion `- [x]` in the ticket file.
195
- - Once all criteria in the ticket pass, update the ticket status to `**Status:** done` (or `Status: done`).
196
- - Mirror the completed work, status, and diff evidence into `devflow/context/{xxx-slug}/spec.md` (under `## 📋 3. Execution Plan & TDD Checklist` and `## ⚡ 4. Implementation Log & Evidence`) so the Living Spec remains the authoritative single source of truth for `/check`, `/audit`, and `/complete`.
197
-
198
- Never batch the whole thing into one diff. If a step's diff is too big to read,
199
- split it. The documented `Verify` command, or the fallback build and tests, must
200
- pass before any commit.
109
+ ## Step 2 - implement and verify
110
+
111
+ Work in small reviewable diffs, keeping progress in the selected spec.
112
+
113
+ 1. For logic or behavior changes with the test gate on, use Red-Green-Refactor: write a focused failing test, confirm the assertion fails for the missing behavior, implement the smallest change, then refactor with affected tests green. Preserve the user's existing work. Consult [TDD anti-patterns](tdd-anti-patterns.md) when test design needs it.
114
+ 2. Match the step's done-when and run focused checks. Documentation or formatting-only edits use structural checks and review; they do not require artificial unit tests. Capture relevant runtime or browser proof for behavioral criteria, following the selected Check policy.
115
+ 3. Fix failures caused by the change and rerun affected checks without requesting authorization again. Broaden verification when dependencies, failures, or risk justify it.
116
+ 4. Record the diff summary and evidence. Mark a step complete once its done-when passes and any configured per-step review has been approved. A repaired finding becomes `fixed` with resolution evidence; only a subsequent audit can close it. Apply the review cadence above before proceeding.
117
+
118
+ At the final handoff, run the exact documented Verify command and all required gates. If there is no Verify command, use the project's declared build and test commands. Reuse a passing result for unchanged inputs within this pass; rerun affected gates after subsequent edits. Do not add tests or tools just to inflate the verification matrix.
119
+
120
+ ### Ticket execution
121
+
122
+ When a ticket is selected, use its acceptance criteria as the steps above. Mark completed criteria in the ticket, mark it `done` after its criteria and required verification pass, and mirror status and evidence into the run's spec. A ticket handoff runs required gates once; criteria within the ticket use focused checks. A request to finish the whole run continues through the dependency frontier until the authorized scope is verified.
201
123
 
202
124
  After final Verify and required Check pass, set the active spec to `verified`
203
125
  with every completed box checked. Then resolve independent review before the
@@ -270,23 +192,19 @@ named area. If the feature spans too many distinct areas for one useful pass,
270
192
  name the sections first and let the user choose where to begin. Remain read-only
271
193
  unless the user separately requests changes.
272
194
 
273
- Never create an ordinary step, product, or work-level commit from this skill.
274
- The sole exception is exactly one immutable independent-review checkpoint after
275
- showing its exact candidate and receiving current explicit commit approval.
276
- Configuration never supplies that approval. Never merge, push, deploy, publish,
195
+ Ordinary checkpoint commits are available only through the configured review boundary and explicit candidate approval above. The immutable independent-review checkpoint also requires explicit candidate approval. Work-level completion commits belong to `/complete`. Configuration never supplies commit approval. Never merge, push, deploy, publish,
277
196
  or start unrelated work from this skill.
278
197
 
279
198
  ## Rules
280
199
 
281
- - One small step per diff; the user reviews and approves each before any commit.
200
+ - Keep diffs small and apply the configured review cadence.
282
201
  - Explain every change in plain English. Understanding the code is the point.
283
202
  - Iterate on the branch until each step works; never commit code the user hasn't
284
203
  approved.
285
204
  - Follow `devflow/context/coding-standards.md` (server vs client, scope user-owned queries
286
205
  by the authenticated user id, validate inputs, and so on).
287
- - Build only what the spec says. If the spec is wrong or thin, stop and fix the
288
- spec first, do not improvise.
289
- - Per-step commits are optional checkpoints. The work-level commit, the merge,
206
+ - Keep the spec aligned with the authorized scope. Correct routine omissions with evidence; ask only when a material scope or design decision is unresolved.
207
+ - Configured checkpoint offers are optional. The work-level commit, the merge,
290
208
  and any push are `/complete`'s job.
291
209
  - For Type: Rollback, reverse only the approved product diff and preserve all
292
210
  protected Blueprint paths.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bughunter
3
- description: "[devflow] Offensive security orchestrator & bug hunting guide. Indexes 83 vulnerability classes, 5-phase methodology (Think, Hunt, Perimeter, Ship), 681 disclosed HackerOne patterns, and JIT reference guides in devflow/.vendor/bughunter/. Use when running /bughunter, performing security reviews, verifying auth/injection risks in /check or /audit, or testing API endpoints for vulnerabilities."
3
+ description: "[devflow] Investigate security vulnerabilities with evidence. Use for /bughunter or an authorized security review of code or endpoints."
4
4
  argument-hint: "[{target, vuln-class, or topic}]"
5
5
  ---
6
6
 
@@ -36,7 +36,8 @@ When invoked without an argument (or when determining the next step), inspect:
36
36
 
37
37
  ### Default State Recommendations
38
38
  - If no run is active and user wants to start a feature -> Recommend `/feature <name>`.
39
- - If no run is active and user wants to fix a bug -> Recommend `/fix <bug>`.
39
+ - If the user requests a bugfix plan -> Recommend `/fix <bug>`.
40
+ - If the user requests a completed fix -> preserve the implementation and verification scope; draft the required spec internally and continue to `/implement` using existing authorization.
40
41
  - If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/feature IDEA-xxx` or `/discovery IDEA-xxx`.
41
42
  - If no run is active and user wants deep architectural exploration -> Recommend `/discovery`.
42
43
  - If user asks to check system health -> Recommend `doctor`.
@@ -48,7 +49,7 @@ When invoked without an argument (or when determining the next step), inspect:
48
49
  | User Intent / Request Type | Recommended Skill | Normal Name / Alias | Lifecycle Path |
49
50
  | :--- | :--- | :--- | :--- |
50
51
  | **"Spec new feature / living spec"** | `feature` | `/feature` / `/spec` | **Unified**: `/feature` -> `/implement` -> `/check` -> `/complete` |
51
- | **"Quick bugfix / ad-hoc change"** | `fix` | `/fix` | **Unified**: `/fix` -> `/implement` -> `/check` -> `/complete` |
52
+ | **"Draft a bugfix / small-change plan"** | `fix` | `/fix` | **Unified**: `/fix` -> `/implement` -> `/check` -> `/complete` |
52
53
  | **"Capture quick idea / thought"** | `idea` | `/idea` | **Companion**: Enriches & saves to `devflow/ideas.md` |
53
54
  | **"Pre-delivery exploration / research"**| `discovery`| `/discovery` | **Pre-Flight**: `discovery` -> `/feature` |
54
55
  | **"Socratic alignment / ADR / glossary"**| `grill` | `/grill` / `/align` | **Pre-Flight**: `grill` -> `/feature` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fix
3
- description: "[devflow] Write a task-isolated spec (devflow/context/{xxx-slug}/spec.md) for an ad-hoc bug fix or small unplanned change, then stop before implementation. Use for /fix, confirmed bugs, or small changes outside the build plan."
3
+ description: "[devflow] Draft a task-isolated spec for a bug or small change. Use when invoking /fix or requesting a fix plan."
4
4
  argument-hint: "[{title or issue-description}]"
5
5
  ---
6
6
 
@@ -23,7 +23,7 @@ it creates a dedicated run folder at `devflow/context/{xxx-slug}/` (e.g. `059-fi
23
23
  ## Input
24
24
 
25
25
  A description of the bug or change, for example `/fix "password reset email never
26
- sends"`. If the user just reported the problem in chat, use that.
26
+ sends"`. Use the reported problem as input when the user asks for a fix plan. A request to diagnose a problem belongs to `/debug`; a request to fix and verify it retains its full delivery scope.
27
27
 
28
28
  The input may also be a finding ID from `devflow/context/{xxx-slug}/findings.md` (or previous findings), alone
29
29
  or with a description, for example `/fix F-03`.
@@ -46,7 +46,7 @@ then write a short spec to `devflow/context/{xxx-slug}/spec.md`. Also initialize
46
46
  big to read. Each ends with an observable "done when".
47
47
  - **Verify** - how to confirm it's fixed (what to click or test).
48
48
 
49
- Then stop. Tell the user to review the fix spec, then run `/implement` to build it.
49
+ For an explicit `/fix` or a planning-only request, present the spec as the completed deliverable and identify `/implement` as the next command. For an existing request to implement and verify the fix, preserve that authorization: use this spec as the internal handoff and continue through `/implement` without an extra approval pause. Ask only for unresolved material scope, design, or permission decisions.
50
50
 
51
51
  ## Rules
52
52
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: implement
3
- description: "[devflow] Implement or start coding the active task-isolated spec on its branch in small steps, running tests after each step and presenting the configured review handoff. Use for /implement or requests to build or resume an approved spec."
3
+ description: "[devflow] Build and verify a task-isolated spec. Use for /implement or requests to implement an approved plan."
4
4
  argument-hint: "[{run-id, number, or name}] [--ticket <NN | path>]"
5
5
  ---
6
6
 
7
- # implement - build the target spec, one reviewed step at a time
7
+ # implement - build and verify the target spec
8
8
 
9
9
  **Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.
10
10
 
@@ -20,17 +20,23 @@ Where this sits in the workflow:
20
20
 
21
21
  `/feature`, `/fix`, or `/rollback` wrote the spec to
22
22
  `devflow/context/{xxx-slug}/spec.md` and stopped.
23
- This skill turns that spec into code, following the build loop in
24
- `devflow/context/ai-interaction.md`, without vibe coding: small steps, a visible diff plus
25
- a plain-English explanation for each, testing, and iteration until it works, all
26
- behind your approval. It builds on a branch and offers an optional commit
27
- checkpoint after each step; the work-level commit, merging, and logging are
28
- `/complete`'s job.
23
+ Build the selected spec through its acceptance criteria and required verification, then present the configured review handoff. Preserve authorization already given for this work. Read only relevant conventions and reuse loaded context.
24
+
25
+ ## Review cadence and checkpoints
26
+
27
+ Read `workflow.stepReview` and `workflow.checkpointCommits` from `devflow/config.json` independently; defaults are `feature` and `disabled`.
28
+
29
+ - `stepReview: "feature"`: continue through all authorized steps without asking Continue after each step. Record evidence as work proceeds and present one final review packet.
30
+ - `stepReview: "every"`: after a working step, show its diff and evidence, then wait for approval before the next step. A walkthrough is available on request.
31
+ - `checkpointCommits: "disabled"`: omit ordinary checkpoint offers.
32
+ - `checkpointCommits: "enabled"`: offer an optional checkpoint at the configured review boundary (per-step for `every`, final packet for `feature`). Show the exact candidate and obtain commit authorization before committing. The setting itself is not authorization.
33
+
34
+ Independent-review checkpoints follow their separate contract below. Review cadence never authorizes commit, merge, push, or deployment.
29
35
 
30
36
  ## Multi-Run Target & Ticket-Driven Target Resolution
31
37
 
32
- - **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`, checks out `feature/{xxx-slug}`, and loads only that run's `spec.md`.
33
- - **With no argument** (`/implement`) -> checks current git branch matching `feature/{xxx-slug}`, or auto-picks if only 1 spec is active in `devflow/context/`, or prompts the user if multiple specs are queued.
38
+ - **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`, selects the branch matching the run type and configured prefix, and loads only that run's `spec.md`.
39
+ - **With no argument** (`/implement`) -> checks the current feature, fix, or rollback branch against the configured prefixes, or auto-picks if only 1 spec is active in `devflow/context/`, or prompts the user if multiple specs are queued.
34
40
  - **Ticket Input (`--ticket <NN | path>`)**: Targets a specific tracer-bullet ticket directly (e.g. `/implement 12 --ticket 01`, `/implement --ticket 02`, `/implement --ticket issues/01-auth.md`, or `/implement 01` when run-id is not ambiguous).
35
41
 
36
42
  ### Ticket Discovery Hierarchy
@@ -80,11 +86,7 @@ receipt. After the final Verify pass, an active gate routes to
80
86
  `current` freshness may proceed toward `/complete`. This skill never approves
81
87
  its own work or rewrites receipt evidence.
82
88
 
83
- For a browser-facing step, run `npm run test:browser` when the script exists and
84
- record the result in the step evidence. Use `browseros-neo` for the interactive
85
- handoff when it is available and the done-when is visual or behavioral. When the
86
- script or MCP is absent, report that exact limitation; do not silently install a
87
- runner or claim browser evidence.
89
+ For browser-facing changes, run focused browser tests during iteration when available. Run the required `npm run test:browser` gate once before handoff if the spec or project requires it. Use `browseros-neo` for visual or behavioral evidence when available and relevant. Record missing tooling accurately; install a runner only when setup is in the authorized scope.
88
90
 
89
91
  **Resuming?** If the spec already has some build steps checked off (`- [x]`), this
90
92
  feature was started earlier and interrupted (often a cleared context). The spec and
@@ -95,8 +97,7 @@ starting over.
95
97
 
96
98
  ## Step 1 - branch
97
99
 
98
- Create and check out a branch named from the spec: `feature/{xxx-slug}` for a feature,
99
- `fix/{xxx-slug}` for a fix, or `rollback/{xxx-slug}` for a Type: Rollback spec. If the
100
+ Create or select the branch for the spec using `git.featureBranchPrefix`, `git.fixBranchPrefix`, or `git.rollbackBranchPrefix` from config (defaults: `feature/`, `fix/`, `rollback/`). Preserve unrelated working-tree changes before switching. If the
100
101
  project isn't a git repo yet, say so and ask the user to run `git init` first;
101
102
  the loop needs branches. On resume, the branch already exists - check it out
102
103
  instead of creating a new one.
@@ -105,99 +106,20 @@ instead of creating a new one.
105
106
 
106
107
  When implementing a rollback task, follow the exact safety procedure in `reference/rollback-implementation.md`.
107
108
 
108
- ## Step 2 - build one step, review, iterate, checkpoint (Strict TDD)
109
-
110
- Work through the spec's build steps in order, one at a time. For each step:
111
-
112
- 1. **Strict TDD Cycle (for logic & behavior changes)**:
113
- - **🔴 RED**: Write the unit test first in the relevant test file. Execute the test command and show the failing assertion output.
114
- - **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
115
- - **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
116
- - *Code Reversion Rule*: If production code is written without a prior test for behavior changes, revert it and write the test first.
117
-
118
- **⚖️ The Iron Law**: `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` — Apply to behavior changes according to the spec's test decision. If code came first, revert only your own work for that step and restart from the test, preserving the user's existing work.
119
-
120
- **Red-Phase Verification (confirm all three before GREEN):**
121
- - The test actually fails, rather than encountering a syntax error
122
- - The error message identifies missing behavior, rather than invalid configuration
123
- - The failure reflects the behavior under test, rather than a bug in the test itself
124
-
125
- **Green-Phase Discipline**: Write the minimum code needed to pass the test; add only the options/features it requires (YAGNI constraint).
126
-
127
- > 📖 For anti-patterns and Bad vs Good examples, read [`tdd-anti-patterns.md`](tdd-anti-patterns.md).
128
-
129
- 2. Implement just that step: the smallest change that satisfies its "done when."
130
- 3. Show the **diff**, not whole files.
131
- 4. **Explain it, and prove it.** Give a short summary: what the step delivered,
132
- one line per changed file on what it does and why, then confirm the step's
133
- "done when" is met with empirical evidence (test pass output, build output, or screenshot). This summary is the comprehension gate, so keep it concrete, not
134
- vague. Include a short **How to try it** note when the step has a manual
135
- path: the command, URL, click, endpoint, or output the user can check.
136
- 5. **Verify the step.** If `AGENTS.md` declares a `Verify` command, run that exact
137
- command as the automated gate. It is only an umbrella for checks the project
138
- actually has, so do not invent tests or other checks to satisfy it. If no
139
- `Verify` command exists, run the documented build command and the test command
140
- when the project declares one. A step that adds logic must ship a passing test
141
- in the same diff when the test gate is on, and the suite must be green before
142
- the step is approved (see the Testing gate in `coding-standards.md`). UI and
143
- integration-only steps ride on screenshot plus build evidence. Run a focused
144
- test separately when it gives faster feedback, then use `Verify` as the final
145
- automated gate. For UI or integration done-whens, prefer Playwright when it is
146
- already installed or declared in `AGENTS.md`; do not add it silently for an
147
- unrelated feature. Create focused test files next to the source they cover,
148
- per `coding-standards.md`. Never install a runner mid-step unless the current
149
- spec is explicitly the unit-testing setup itself (for example `/fix "add unit
150
- testing"`). If a step surfaces non-trivial logic the spec did not foresee, add
151
- a focused test then, or note why not. When a step's done-when is behavioral (a
152
- click, a download, or a flow across screens), run `/check` to prove it against
153
- the running app rather than eyeballing it.
154
- 5. **Iterate until it works.** If it fails or the user wants changes, revise the
155
- step (re-prompt or hand-edit the code), show the updated diff, and re-test.
156
- Repeat until it works and the user approves. Nothing is committed until the
157
- user is happy with the step.
158
- 6. **Mark it done, then prompt to move on.** Once the step is approved, check that
159
- step off (`- [x]`) in `devflow/context/{xxx-slug}/spec.md` so progress survives a context
160
- clear. If the step repaired a finding tracked in
161
- `devflow/context/{xxx-slug}/findings.md`, set that finding's status to `fixed` now too
162
- and note the repair in its **Resolution** line. Never set `closed`: a repair
163
- is re-reviewed by `/audit` before it clears, because a fix can introduce a
164
- worse defect than the one it removed. Then offer a short choice, noting that checkpoints are optional since
165
- `/complete` makes the real feature-level commit. Use the current tool's short
166
- user-input prompt when available; when you've just produced a long block to
167
- read (a deep explanation, a big
168
- walk-through), ask in plain text instead, so the prompt doesn't cover what the
169
- user is still reading:
170
- - **Continue** (default) - roll into the next step without committing.
171
- - **Commit checkpoint** - commit just this step on the branch with a
172
- conventional message (a cheap rollback point).
173
- - **Walk me through it** - give a deeper, line-level explanation of the new or
174
- changed code (why this approach, what each part does, any gotchas), then
175
- re-ask this checkpoint prompt. A loop-back, not a terminal choice.
176
- - **Stop here** - pause the loop so the user can review or come back later.
177
-
178
- On **Continue** or after **Commit checkpoint**, go to the next step. On **Walk
179
- me through it**, explain in depth and then re-ask this prompt in plain text (the
180
- explanation is long, so a modal would cover it). On **Stop here**, stop and say
181
- where things stand: the branch is intact; run `/implement` again to resume, or
182
- `/complete` to wrap up what's built so far.
183
-
184
- ### Ticket-Driven TDD Execution (when working from a Ticket)
185
-
186
- When executing a tracer-bullet ticket (via `--ticket` or auto-frontier):
187
- 1. **Extract Scope**: Read *What to build* and *Acceptance criteria* checklist (`- [ ]`) from the active ticket file.
188
- 2. **Strict TDD Cycle per Criterion**:
189
- - **🔴 RED**: Write the unit/integration test for the criterion first at the agreed seam. Execute the test command and verify the expected failing assertion.
190
- - **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
191
- - **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
192
- 3. **Verify Gate**: Run the project's Verify command (`npm run check` or documented test suite) to ensure whole-system health before concluding the ticket.
193
- 4. **Bidirectional State Sync**:
194
- - Mark each completed criterion `- [x]` in the ticket file.
195
- - Once all criteria in the ticket pass, update the ticket status to `**Status:** done` (or `Status: done`).
196
- - Mirror the completed work, status, and diff evidence into `devflow/context/{xxx-slug}/spec.md` (under `## 📋 3. Execution Plan & TDD Checklist` and `## ⚡ 4. Implementation Log & Evidence`) so the Living Spec remains the authoritative single source of truth for `/check`, `/audit`, and `/complete`.
197
-
198
- Never batch the whole thing into one diff. If a step's diff is too big to read,
199
- split it. The documented `Verify` command, or the fallback build and tests, must
200
- pass before any commit.
109
+ ## Step 2 - implement and verify
110
+
111
+ Work in small reviewable diffs, keeping progress in the selected spec.
112
+
113
+ 1. For logic or behavior changes with the test gate on, use Red-Green-Refactor: write a focused failing test, confirm the assertion fails for the missing behavior, implement the smallest change, then refactor with affected tests green. Preserve the user's existing work. Consult [TDD anti-patterns](tdd-anti-patterns.md) when test design needs it.
114
+ 2. Match the step's done-when and run focused checks. Documentation or formatting-only edits use structural checks and review; they do not require artificial unit tests. Capture relevant runtime or browser proof for behavioral criteria, following the selected Check policy.
115
+ 3. Fix failures caused by the change and rerun affected checks without requesting authorization again. Broaden verification when dependencies, failures, or risk justify it.
116
+ 4. Record the diff summary and evidence. Mark a step complete once its done-when passes and any configured per-step review has been approved. A repaired finding becomes `fixed` with resolution evidence; only a subsequent audit can close it. Apply the review cadence above before proceeding.
117
+
118
+ At the final handoff, run the exact documented Verify command and all required gates. If there is no Verify command, use the project's declared build and test commands. Reuse a passing result for unchanged inputs within this pass; rerun affected gates after subsequent edits. Do not add tests or tools just to inflate the verification matrix.
119
+
120
+ ### Ticket execution
121
+
122
+ When a ticket is selected, use its acceptance criteria as the steps above. Mark completed criteria in the ticket, mark it `done` after its criteria and required verification pass, and mirror status and evidence into the run's spec. A ticket handoff runs required gates once; criteria within the ticket use focused checks. A request to finish the whole run continues through the dependency frontier until the authorized scope is verified.
201
123
 
202
124
  After final Verify and required Check pass, set the active spec to `verified`
203
125
  with every completed box checked. Then resolve independent review before the
@@ -270,23 +192,19 @@ named area. If the feature spans too many distinct areas for one useful pass,
270
192
  name the sections first and let the user choose where to begin. Remain read-only
271
193
  unless the user separately requests changes.
272
194
 
273
- Never create an ordinary step, product, or work-level commit from this skill.
274
- The sole exception is exactly one immutable independent-review checkpoint after
275
- showing its exact candidate and receiving current explicit commit approval.
276
- Configuration never supplies that approval. Never merge, push, deploy, publish,
195
+ Ordinary checkpoint commits are available only through the configured review boundary and explicit candidate approval above. The immutable independent-review checkpoint also requires explicit candidate approval. Work-level completion commits belong to `/complete`. Configuration never supplies commit approval. Never merge, push, deploy, publish,
277
196
  or start unrelated work from this skill.
278
197
 
279
198
  ## Rules
280
199
 
281
- - One small step per diff; the user reviews and approves each before any commit.
200
+ - Keep diffs small and apply the configured review cadence.
282
201
  - Explain every change in plain English. Understanding the code is the point.
283
202
  - Iterate on the branch until each step works; never commit code the user hasn't
284
203
  approved.
285
204
  - Follow `devflow/context/coding-standards.md` (server vs client, scope user-owned queries
286
205
  by the authenticated user id, validate inputs, and so on).
287
- - Build only what the spec says. If the spec is wrong or thin, stop and fix the
288
- spec first, do not improvise.
289
- - Per-step commits are optional checkpoints. The work-level commit, the merge,
206
+ - Keep the spec aligned with the authorized scope. Correct routine omissions with evidence; ask only when a material scope or design decision is unresolved.
207
+ - Configured checkpoint offers are optional. The work-level commit, the merge,
290
208
  and any push are `/complete`'s job.
291
209
  - For Type: Rollback, reverse only the approved product diff and preserve all
292
210
  protected Blueprint paths.