@jakkrichm/create-nexus-devflow 2.5.0 β†’ 2.6.1

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 (81) hide show
  1. package/README.md +58 -45
  2. package/dist/lib/branch-context.d.ts +61 -8
  3. package/dist/lib/branch-context.js +362 -125
  4. package/dist/lib/branch-context.js.map +1 -1
  5. package/dist/lib/core-skill-inventory.d.ts +16 -0
  6. package/dist/lib/core-skill-inventory.js +96 -0
  7. package/dist/lib/core-skill-inventory.js.map +1 -0
  8. package/dist/lib/doctor.js +13 -10
  9. package/dist/lib/doctor.js.map +1 -1
  10. package/dist/lib/status.d.ts +2 -0
  11. package/dist/lib/status.js +7 -2
  12. package/dist/lib/status.js.map +1 -1
  13. package/dist/lib/update.js +5 -8
  14. package/dist/lib/update.js.map +1 -1
  15. package/dist/scripts/prepare-template.js +19 -16
  16. package/dist/scripts/prepare-template.js.map +1 -1
  17. package/package.json +1 -1
  18. package/template/.agents/skills/adopt/SKILL.md +1 -1
  19. package/template/.agents/skills/audit/SKILL.md +1 -1
  20. package/template/.agents/skills/autopilot/SKILL.md +1 -1
  21. package/template/.agents/skills/brainstorm/SKILL.md +1 -1
  22. package/template/.agents/skills/brief/SKILL.md +1 -1
  23. package/template/.agents/skills/check/SKILL.md +80 -75
  24. package/template/.agents/skills/ci/SKILL.md +1 -1
  25. package/template/.agents/skills/complete/SKILL.md +9 -3
  26. package/template/.agents/skills/convert-any-to-md/SKILL.md +1 -1
  27. package/template/.agents/skills/debug/SKILL.md +76 -94
  28. package/template/.agents/skills/devflow/SKILL.md +1 -1
  29. package/template/.agents/skills/discovery/SKILL.md +7 -9
  30. package/template/.agents/skills/doctor/SKILL.md +1 -1
  31. package/template/.agents/skills/feature/SKILL.md +10 -5
  32. package/template/.agents/skills/fix/SKILL.md +6 -8
  33. package/template/.agents/skills/grill/SKILL.md +1 -1
  34. package/template/.agents/skills/idea/SKILL.md +1 -1
  35. package/template/.agents/skills/implement/SKILL.md +10 -4
  36. package/template/.agents/skills/onboard/SKILL.md +1 -1
  37. package/template/.agents/skills/overview/SKILL.md +1 -1
  38. package/template/.agents/skills/prototype/SKILL.md +1 -1
  39. package/template/.agents/skills/release/SKILL.md +1 -1
  40. package/template/.agents/skills/report-html/SKILL.md +1 -1
  41. package/template/.agents/skills/rollback/SKILL.md +1 -1
  42. package/template/.agents/skills/status/SKILL.md +1 -1
  43. package/template/.agents/skills/test/SKILL.md +1 -1
  44. package/template/.agents/skills/tests/SKILL.md +1 -1
  45. package/template/.agents/skills/try/SKILL.md +1 -1
  46. package/template/.claude/skills/adopt/SKILL.md +1 -1
  47. package/template/.claude/skills/audit/SKILL.md +1 -1
  48. package/template/.claude/skills/autopilot/SKILL.md +1 -1
  49. package/template/.claude/skills/brainstorm/SKILL.md +1 -1
  50. package/template/.claude/skills/brief/SKILL.md +1 -1
  51. package/template/.claude/skills/check/SKILL.md +80 -75
  52. package/template/.claude/skills/ci/SKILL.md +1 -1
  53. package/template/.claude/skills/complete/SKILL.md +9 -3
  54. package/template/.claude/skills/convert-any-to-md/SKILL.md +1 -1
  55. package/template/.claude/skills/debug/SKILL.md +76 -94
  56. package/template/.claude/skills/devflow/SKILL.md +1 -1
  57. package/template/.claude/skills/discovery/SKILL.md +7 -9
  58. package/template/.claude/skills/doctor/SKILL.md +1 -1
  59. package/template/.claude/skills/feature/SKILL.md +10 -5
  60. package/template/.claude/skills/fix/SKILL.md +6 -8
  61. package/template/.claude/skills/grill/SKILL.md +1 -1
  62. package/template/.claude/skills/idea/SKILL.md +1 -1
  63. package/template/.claude/skills/implement/SKILL.md +10 -4
  64. package/template/.claude/skills/onboard/SKILL.md +1 -1
  65. package/template/.claude/skills/overview/SKILL.md +1 -1
  66. package/template/.claude/skills/prototype/SKILL.md +1 -1
  67. package/template/.claude/skills/release/SKILL.md +1 -1
  68. package/template/.claude/skills/report-html/SKILL.md +1 -1
  69. package/template/.claude/skills/rollback/SKILL.md +1 -1
  70. package/template/.claude/skills/status/SKILL.md +1 -1
  71. package/template/.claude/skills/test/SKILL.md +1 -1
  72. package/template/.claude/skills/tests/SKILL.md +1 -1
  73. package/template/.claude/skills/try/SKILL.md +1 -1
  74. package/template/AGENTS.md +1 -1
  75. package/template/devflow/build-plan.md +10 -0
  76. package/template/devflow/context/ai-interaction.md +5 -6
  77. package/template/devflow/context/coding-standards.md +31 -6
  78. package/template/devflow/context/current-stage.md +10 -7
  79. package/template/devflow/history/HISTORY.md +1 -1
  80. package/template/devflow/project-plan.md +2 -2
  81. package/template/devflow/reference/running-id-contract.md +24 -20
@@ -1,108 +1,113 @@
1
1
  ---
2
2
  name: check
3
- description: "[devflow][F] Prove the current work actually does what its spec says by running the real app and observing behavior against the \"done when\" criteria in current-feature.md. Drives the app (browser, CLI, or server), captures evidence (screenshots, output, console/network errors), and reports pass/fail per criterion. Does not edit source or commit - it observes; fixing stays /implement's job. Use when the user runs /check, asks to confirm a step or feature works, wants proof before /complete, or wants to check a change in the running app rather than just the build. (Supersedes the built-in /verify with a spec-aware version inside blueprint projects.)"
3
+ description: "[devflow] Prove the current work actually does what its spec says and adheres to architectural standards through a Dual-Axis Independent Review. Supports Multi-Run: given an optional ID or name (/check 12), targets that spec and records proof to devflow/context/{xxx-slug}/findings.md. Drives the app, captures empirical evidence, checks Fowler smells, and reports pass/fail. Use when running /check, confirming work, or validating before /complete."
4
+ argument-hint: "[{run-id, number, or name}]"
4
5
  ---
5
6
 
6
- # check - prove it works against the spec, with evidence
7
+ # check - Dual-Axis Independent Verification Engine
7
8
 
8
9
  Where this sits in the workflow:
9
10
 
10
11
  /implement -> [check] -> /complete
11
- (built a (run the app, (only once the
12
- step or prove each done-whens are
13
- the feature) done-when) proven)
12
+ (built a (dual-axis (only once both
13
+ step or review with axes pass with
14
+ the feature) empirical proof) evidence)
14
15
 
15
- `/implement` builds and does a quick build-plus-screenshot check inline. `/check`
16
- is the deeper, repeatable gate for when a "done when" needs the *real running app*,
17
- not just a green build: a click that triggers a download, a route that returns a
18
- file, a flow across screens. Run it on a single step whose done-when is
19
- behavioral, or on the whole feature as the acceptance check before `/complete`.
16
+ `/implement` builds and does a quick build-plus-screenshot check inline. `/check` is the rigorous, repeatable gate for when a feature or step needs **empirical proof** on the running app and **two-axis code review** before merging.
20
17
 
21
- The point is evidence. A passing build proves the code compiles; `/check` proves
22
- the thing the spec promised actually happens. It changes no source and commits
23
- nothing - it runs the app and reports what it saw.
18
+ It changes no source and commits nothing β€” it executes, inspects, and reports observed facts.
19
+
20
+ ---
24
21
 
25
22
  ## Input
26
23
 
27
- Optional: a specific thing to check (a step, a flow, a URL). With no argument,
28
- verify the whole current feature against every "done when" in
29
- `devflow/context/current-feature.md`.
24
+ - **Given an ID or name** (e.g. `/check 12`, `/check 012`) -> targets `devflow/context/{xxx-slug}/` and records audit ledger to `{xxx-slug}/findings.md`.
25
+ - **With no argument** (`/check`) -> verifies the active run matching current git branch or single active spec.
30
26
 
31
- ## Step 1 - build the checklist
27
+ ---
32
28
 
33
- Read `devflow/context/current-feature.md`. Pull the observable "done when"
34
- criteria from the build steps (and any acceptance notes in the Testing section).
35
- Turn them into a concrete checklist of claims to prove - each one a specific,
36
- observable behavior, not "it works". If the user named one thing, scope to that.
29
+ ## Step 1 - Build the Dual-Axis Review Matrix
37
30
 
38
- If there's no current feature spec, ask what to verify rather than guessing.
31
+ Read the target spec from `devflow/context/{xxx-slug}/spec.md` (or `devflow/context/current-feature.md`) and `devflow/context/coding-standards.md`. Prepare the inspection criteria across two independent axes:
39
32
 
40
- ## Step 2 - get the app running
33
+ 1. **Axis 1 (Standards & Architecture Criteria)**:
34
+ - Coding conventions in `coding-standards.md`
35
+ - Deep Modules discipline (Small interface, deep implementation, clean seams, no leaky abstractions)
36
+ - Baseline 12 Fowler Code Smells (Primitive obsession, Feature envy, Shotgun surgery, Speculative generality, etc.)
37
+ - Multi-lane technical gates (Typecheck, test suites, zero secrets, zero P0/P1 findings)
38
+ 2. **Axis 2 (Spec Fidelity & Behavioral Observables)**:
39
+ - Line-by-line Acceptance Criteria (ACs) and "Done When" observables from `current-feature.md`
40
+ - Scope Creep detection (Unrequested behavior in the diff)
41
+ - Missing Requirements detection (Unimplemented edge cases)
41
42
 
42
- Use the project's real commands (see Commands in `AGENTS.md`). Match the project
43
- type:
43
+ ---
44
44
 
45
- - **Web app** - start (or reuse) the dev/preview server, then drive a real browser
46
- to the relevant routes. Prefer reusing an already-running server over starting a
47
- duplicate. If Playwright is already installed or declared in `AGENTS.md`, prefer
48
- it for browser driving, screenshots, console errors, and failed request checks.
49
- If it is not installed, do not add it from `/check`; use another real-browser
50
- evidence path and report what you used.
51
- - **CLI** - run the actual command(s) with representative inputs.
52
- - **Server/API** - start it and hit the endpoints.
53
- - **Library** - exercise the public API through an example or the test command.
45
+ ## Step 2 - Get the App Running & Exercise Live Proof
54
46
 
55
- If a `test` command is declared in `AGENTS.md`, you may run it as *one* input, but
56
- `/check` is broader than unit tests: it checks real behavior, which is exactly the
57
- evidence UI and integration steps ride on instead of unit tests.
47
+ Use the project's real commands (from `AGENTS.md`):
58
48
 
59
- ## Step 3 - exercise each claim
49
+ - **Web app**: Start (or reuse) the local dev server. Drive a real browser to relevant routes. Prefer Playwright when installed for screenshots, network errors, and console assertions.
50
+ - **CLI**: Execute commands with representative input fixtures, asserting exit codes and output snapshots.
51
+ - **Server / API**: Hit endpoints with real payloads and assert on HTTP response status and bodies.
52
+ - **Library**: Exercise public interfaces through integration tests or sample scripts.
60
53
 
61
- Drive the app to each checklist item and capture evidence as you go:
54
+ > [!IMPORTANT]
55
+ > **Evidence or it didn't happen**: Every verdict must be backed by empirical evidence (screenshot, command output, status code, response time). Never assume a pass from reading source code alone.
62
56
 
63
- - Navigate and interact for real (click, type, submit, download) - don't assert
64
- from the code what the running app would do.
65
- - Capture **screenshots** for visual/UI claims, **output** for CLI/API claims.
66
- - Watch for **console errors and failed network requests**; a clean-looking screen
67
- with errors in the console is not a pass.
57
+ ---
68
58
 
69
- ## Step 4 - report (Two-Stage Review Pattern)
59
+ ## Step 3 - Dual-Axis Independent Report
70
60
 
71
- Format the verification report into two explicit review stages:
61
+ Format the report into two distinct, un-merged review axes:
72
62
 
73
- ### Stage 1: Spec Fidelity & Acceptance Gate
74
- Give a line-by-line verdict for each Acceptance Criterion and "done when" item:
63
+ ```markdown
64
+ # πŸ” Verification Report: [Feature Name]
75
65
 
76
- [pass] AC-1: Download PDF saves certificate-<slug>.pdf - file downloaded, opened to cert
77
- [pass] AC-2: Both buttons show a loading state - screenshot: loading-state.png
78
- [fail] AC-3: PDF border missing - printBackground not set; screenshot: pdf-no-border.png
79
- [skip] AC-4: Vercel deploy smoke test - can't verify locally (pending staging)
66
+ ## βš–οΈ Axis 1: Standards, Architecture & Quality Gate
80
67
 
81
- ### Stage 2: Code Quality, Security & Architecture Gate
82
- Report the multi-lane technical verification results:
83
- - **Type & Syntax**: `tsc --noEmit` (0 errors)
84
- - **Automated Tests**: Unit & integration tests (100% pass)
85
- - **Security & Hygiene**: Zero secrets, sanitized inputs
86
- - **Findings Ledger**: 0 blockers (P0/P1) in `devflow/context/findings.md`
68
+ - **Technical Lanes**:
69
+ - [pass] Type Safety: `tsc --noEmit` (0 errors)
70
+ - [pass] Automated Tests: `npm test` (All tests green)
71
+ - [pass] Security & Hygiene: Zero secrets, sanitized inputs
72
+ - [pass] Findings Ledger: 0 blocking P0/P1 in `devflow/context/findings.md`
73
+ - **Deep Modules & Architecture**:
74
+ - [pass] Seam Integrity: Public interfaces remain small, implementation details hidden.
75
+ - [pass] The Deletion Test: Complexity is concentrated inside the module, not scattered across callers.
76
+ - **Code Smells Assessment**:
77
+ - [clean] 12 Fowler Code Smells evaluated across git diff: No critical smells detected.
87
78
 
88
- ### Final Verdict & Route
89
- - **All Passed**: State that the feature is verified and ready for `/complete`.
90
- - **Any Failure**: Hand back to `/implement` with exact failure evidence and reproduction steps. Never fix issues inside `/check`.
91
- - **Unverifiable**: Clearly state reasons and residual risk. Never fabricate a pass.
79
+ ## 🎯 Axis 2: Spec Fidelity & Behavioral Acceptance Gate
92
80
 
93
- ## Rules
81
+ Line-by-line verification against `current-feature.md`:
82
+ - [pass] **AC-1 (<title>)**: <Observed empirical evidence / screenshot path>
83
+ - [pass] **AC-2 (<title>)**: <Observed empirical evidence / terminal output>
84
+ - [fail] **AC-3 (<title>)**: <Exact observed failure with reproduction command>
85
+ - [clean] **Scope Creep Check**: No unrequested features or unnecessary abstractions introduced.
86
+ - [clean] **Completeness Check**: 100% of spec requirements addressed.
87
+
88
+ ---
89
+
90
+ ## 🚦 Final Routing & Verdict
94
91
 
95
- - **Observe, don't change.** `/check` runs the app and reports. It never edits
96
- source, never commits, never merges. Fixing is `/implement`'s job.
97
- - **Evidence or it didn't happen.** Every `pass` is backed by something observed -
98
- a screenshot, output, a response. No assumed passes from reading the code.
99
- - **Honest over green.** "Couldn't verify" and "failed" are valid, useful results.
100
- Faking a pass defeats the entire gate.
101
- - **Check the spec, not vibes.** Verify against the done-whens in
102
- `current-feature.md`, so "works" means what the spec said it would do.
92
+ - **ALL PASSED**: Both axes green. Ready for `/complete`.
93
+ - **ANY FAILURE**: Hand back to `/implement` with exact failure evidence and reproduction steps.
94
+ - **UNVERIFIABLE**: Clearly document the gap and residual risk. Never fabricate a pass.
95
+ ```
103
96
 
104
- ## Formatting
97
+ ---
98
+
99
+ ## Why Two Independent Axes?
100
+
101
+ A code change can pass one axis and fail the other:
102
+ - **Standards Pass, Spec Fail**: Code is beautifully architected and tested, but implements the wrong business behavior.
103
+ - **Spec Pass, Standards Fail**: Feature works end-to-end, but violates encapsulation, introduces shallow modules, or leaks secrets.
104
+
105
+ Reporting both axes side-by-side stops elegance from masking functional bugs, and stops functional completeness from excusing architectural rot.
106
+
107
+ ---
108
+
109
+ ## Rules
105
110
 
106
- Format the output to match the project's conventions in
107
- `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
108
- enumerations and tables for matrices rather than dense paragraphs.
111
+ - **Observe, don't change**: `/check` runs the app and reports. It never edits source or commits. Fixing is `/implement`'s job.
112
+ - **Honest over green**: "Failed" and "Could not verify" are valid, valuable outputs. Faking a pass destroys the gate.
113
+ - **Check the spec, not vibes**: Verify against documented ACs, not subjective feelings.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ci
3
- description: "[devflow][B] Set up or normalize automatic GitHub checks for a Blueprint project around one documented Verify command. Detects the real stack, package manager, existing checks, default branch, and workflows; preserves existing CI; combines only configured typecheck, test, and build commands; runs the command locally; and stops before push or remote ruleset changes. Use when the user runs /ci, invokes $ci, asks to add CI, set up GitHub Actions, add pull-request checks, or create automatic GitHub checks."
3
+ description: "[devflow] Set up or normalize automatic GitHub checks for a Blueprint project around one documented Verify command. Detects the real stack, package manager, existing checks, default branch, and workflows; preserves existing CI; combines only configured typecheck, test, and build commands; runs the command locally; and stops before push or remote ruleset changes. Use when the user runs /ci, invokes $ci, asks to add CI, set up GitHub Actions, add pull-request checks, or create automatic GitHub checks."
4
4
  ---
5
5
 
6
6
  # ci - set up automatic GitHub checks
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: complete
3
- description: "[devflow][F] Wrap up a finished feature, fix, or rollback. Runs a final safety pass, archives its spec to devflow/history/features/, devflow/history/fixes/, or devflow/history/rollbacks/, updates the build plan for features and rollbacks, resets devflow/context/current-feature.md to its stub, and makes the work commit. Enforces a mandatory user gate: asks whether to squash-merge to main/master OR pull latest main/master into the feature/dev branch and push to remote for Merge Request (MR / PR) creation. Never merges into main/master without explicit user instruction."
3
+ description: "[devflow] Wrap up a finished feature, fix, or rollback. Supports Multi-Run: given an optional ID (/complete 12), archives that run from devflow/context/{xxx-slug}/ to devflow/history/, cleans up the run workspace, updates build-plan and HISTORY.md, and makes the work commit. Enforces mandatory user gate (Squash-merge vs MR/PR)."
4
+ argument-hint: "[{run-id, number, or name}]"
4
5
  ---
5
6
 
6
7
  # complete - log the finished work, make the work commit, and deliver
@@ -12,13 +13,18 @@ Where this sits in the workflow:
12
13
 
13
14
  `/implement` built the feature, fix, or rollback on its branch, with optional per-step commit
14
15
  checkpoints. This skill closes it out: it logs the work, makes the single
15
- work-level commit, and guides the delivery through a **Mandatory User Delivery Gate**. Run it only when the work is done,
16
+ work-level commit, archives from `devflow/context/{xxx-slug}/`, cleans up the active run workspace, and guides the delivery through a **Mandatory User Delivery Gate**. Run it only when the work is done,
16
17
  reviewed, and the documented `Verify` command, or the fallback build and tests,
17
18
  passes.
18
19
 
20
+ ## Multi-Run Target Resolution
21
+
22
+ - **Given an ID or name** (e.g. `/complete 12`, `/complete 058`) -> targets `devflow/context/{xxx-slug}/` for archiving and cleanup.
23
+ - **With no argument** (`/complete`) -> targets the run matching the active branch or single active spec.
24
+
19
25
  ## Before you start
20
26
 
21
- Confirm the work is actually finished: `devflow/context/current-feature.md`
27
+ Confirm the target work is actually finished: `devflow/context/{xxx-slug}/spec.md` (or `current-feature.md`)
22
28
  holds a real spec, its steps are built on a branch, and `Verify`, or the fallback
23
29
  build and tests, passes. If any of the
24
30
  spec's done-whens are behavioral, `/check` should have proven them against the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: convert-any-to-md
3
- description: "[devflow][B] Converts any document (.xlsx, .pdf, .docx, .txt, .csv, .log, .json, .yaml, etc.) or mixed folders into clean Markdown in devflow/reference. Use whenever documents need to be analyzed, summarized, searched, or extracted from."
3
+ description: "[devflow] Converts any document (.xlsx, .pdf, .docx, .txt, .csv, .log, .json, .yaml, etc.) or mixed folders into clean Markdown in devflow/reference. Use whenever documents need to be analyzed, summarized, searched, or extracted from."
4
4
  ---
5
5
 
6
6
  # Convert Any Document to Markdown
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: debug
3
- description: "[devflow][B] Diagnose a failing test, broken build, crash, error, regression, or unexpected behavior without editing source or Blueprint state. Reproduces the symptom with the smallest safe command, localizes the failing path, tests competing hypotheses, identifies the root cause when evidence supports one, and reports a repair handoff to /fix or /implement. Use when the user runs /debug, invokes $debug, asks why something is failing or broken, wants a root-cause investigation, or asks to diagnose before fixing."
3
+ description: "[devflow] Diagnose a failing test, broken build, crash, error, regression, or unexpected behavior without editing source or DevFlow state. Follows a strict 6-Phase Scientific Debugging Loop: builds a red-capable tight feedback loop, reproduces & minimises, tests 3-5 falsifiable hypotheses, localizes the failure to a root cause, and reports a repair handoff to /fix or /implement. Use when the user runs /debug, invokes $debug, asks why something is failing or broken, wants a root-cause investigation, or asks to diagnose before fixing."
4
4
  ---
5
5
 
6
- # debug - find the cause before changing the code
6
+ # debug - 6-Phase Scientific Debugging Protocol
7
7
 
8
8
  Where this sits in the workflow:
9
9
 
@@ -12,130 +12,112 @@ Where this sits in the workflow:
12
12
  crash, behavior) isolate, repair active work)
13
13
  explain)
14
14
 
15
- `/debug` separates diagnosis from repair. It gathers evidence, narrows the
16
- failure to a specific cause when possible, and stops with a useful handoff. It
17
- does not make the code "temporarily work" while investigating.
15
+ `/debug` separates diagnosis from repair. It gathers empirical evidence, narrows the failure to a specific root cause using scientific method, and stops with an actionable repair handoff. It does not guess, assume, or perform ad-hoc "vibe debugging".
16
+
17
+ ---
18
18
 
19
19
  ## Input
20
20
 
21
21
  Accept a symptom, failing command, error message, or unexpected behavior. Examples:
22
22
 
23
- /debug npm test fails in cart-total.test.js
23
+ /debug npm test fails in cart-total.test.ts
24
24
  /debug the upload route returns 500 for PNG files
25
- /debug why does the production build fail?
25
+ /debug why does the build fail on Windows?
26
26
 
27
- With no useful symptom, ask for the expected behavior, actual behavior, and
28
- smallest known reproduction. Do not guess which problem the user means.
27
+ With no useful symptom, ask for expected behavior, actual behavior, and smallest known reproduction. Do not guess.
29
28
 
30
- ## Step 1 - establish the boundary
29
+ ---
31
30
 
32
- Read the project instructions and the context relevant to the failure:
31
+ ## πŸ”¬ The 6-Phase Scientific Debugging Loop
33
32
 
34
- - `AGENTS.md` and its real commands
35
- - `devflow/context/project-overview.md`
36
- - `devflow/context/coding-standards.md`
37
- - `devflow/context/current-feature.md`
38
- - the reported error, failing output, and affected files
39
- - git status, diff, and recent log when a regression is possible
33
+ ### Phase 1: Build a Red-Capable Feedback Loop (Golden Rule)
40
34
 
41
- State the symptom and what would count as reproducing it. Note whether the
42
- failure belongs to an active feature or is an unplanned bug.
35
+ **This is the core discipline.** If you have a **tight** pass/fail command that actively goes RED on this bug, you will find the root cause. If you do not have one, staring at code will not save you.
43
36
 
44
- Do not treat a dirty working tree as permission to discard or rewrite anything.
45
- Use the diff as evidence and preserve it.
37
+ **Spend disproportionate effort here. Ways to construct one (in order):**
38
+ 1. **Failing Unit / Integration Test** at the responsible module seam.
39
+ 2. **Curl / HTTP script** against the running local dev server.
40
+ 3. **CLI invocation** diffing stdout/stderr against expected output.
41
+ 4. **Headless browser script** (Playwright) asserting on DOM/network/console.
42
+ 5. **Replay captured trace**: Replay isolated payload/event log through the code path.
46
43
 
47
- ## Step 2 - reproduce safely
44
+ **Completion Criterion for Phase 1**:
45
+ You must name **one single command** (a test invocation, a script, or curl) that you have **already run at least once** and proven:
46
+ - [ ] **Red-capable**: It exercises the actual code path and catches the user's exact symptom (fails red now, will pass green once fixed).
47
+ - [ ] **Deterministic**: Returns the same verdict every run.
48
+ - [ ] **Fast & Agent-runnable**: Completes in seconds, executable without manual intervention.
48
49
 
49
- Run the smallest existing command or interaction that can reproduce the symptom.
50
+ > [!CAUTION]
51
+ > **No Red-Capable Command = No Phase 2.** If you catch yourself reading code to form theories before this command exists, **STOP**. Jumping straight to a hypothesis is the exact failure this protocol prevents.
50
52
 
51
- - Prefer one focused test, request, CLI command, or input over the entire suite.
52
- - Capture the exact exit code, error, stack trace, output, response, console
53
- error, or failed request.
54
- - Reuse an already-running local app when available. If reproduction requires a
55
- long-running server that is not running, ask the user to start it and provide
56
- the documented command.
57
- - Do not install dependencies, change configuration, run migrations, mutate
58
- production data, contact external users, or use destructive commands to force
59
- a reproduction.
60
- - Do not edit code to add logs or probes. Use existing logs, debuggers,
61
- read-only inspection, or one-off commands that do not change project files.
62
- - Compare git status after diagnostic commands. If one changes tracked or
63
- untracked project files, stop and report those paths. Do not clean, restore,
64
- or hide the changes.
53
+ ---
65
54
 
66
- If the symptom cannot be reproduced, say what was attempted and what evidence is
67
- missing. Continue with static investigation only when it can produce a clearly
68
- labeled hypothesis, not a claimed root cause.
55
+ ### Phase 2: Reproduce & Minimise
69
56
 
70
- ## Step 3 - localize the failure
57
+ Run the feedback loop and watch it go RED.
71
58
 
72
- Trace from the observed failure toward the smallest responsible area.
59
+ 1. **Confirm Symptom**: Ensure the failure mode matches what the user reported (not a nearby unrelated error).
60
+ 2. **Minimise the Repro**: Cut inputs, configs, dependencies, and steps **one at a time**, re-running the command after each cut. Keep only what is load-bearing for the failure.
61
+ 3. **Done when**: Every remaining parameter is load-bearing (removing any one makes the loop go green).
73
62
 
74
- Use the evidence that fits the project:
63
+ ---
75
64
 
76
- - the first relevant application frame in a stack trace
77
- - the smallest failing test and its inputs
78
- - request and response data at the failing boundary
79
- - console and network errors
80
- - callers, imports, data flow, and configuration reads
81
- - `git diff`, `git log`, and `git blame` for a suspected regression
82
- - comparison with a nearby working path or input
65
+ ### Phase 3: Form 3–5 Ranked Falsifiable Hypotheses
83
66
 
84
- Separate facts from hypotheses. Test the cheapest safe competing explanations
85
- first. Do not stop at the first plausible line, blame a dependency without
86
- evidence, or confuse the place an error surfaced with the place it originated.
67
+ Generate **3 to 5 ranked hypotheses** before testing or inspecting deeply. Never anchor on the first plausible idea.
87
68
 
88
- ## Step 4 - confirm or narrow
69
+ Every hypothesis MUST be **falsifiable** using this exact format:
70
+ > *"If `<X>` is the cause, then `<changing Y>` will make the bug disappear / `<changing Z>` will make it worse."*
89
71
 
90
- A root cause is confirmed only when the evidence connects all three:
72
+ If you cannot state the prediction, it is a vibe: sharpen or discard it.
91
73
 
92
- 1. the triggering input or state
93
- 2. the responsible code, configuration, or contract
94
- 3. the observed failure
74
+ ---
95
75
 
96
- When safe and read-only, vary one input or run a smaller focused command to
97
- confirm the connection. Do not change implementation or tests to prove the fix.
76
+ ### Phase 4: Targeted Instrumentation & Isolation
98
77
 
99
- Use one of these verdicts:
78
+ Test hypotheses by changing **one variable at a time**:
79
+ 1. **Tool preference**: Read-only inspection > REPL/debugger > Targeted probe logs.
80
+ 2. **Debug Tag Rule**: If temporary diagnostic logs are necessary, tag every log line with a unique prefix, e.g. `[DEBUG-a4f2]`. This guarantees a single `grep` can find and remove all probes.
81
+ 3. **Redaction**: Redact all secrets, tokens, and credentials in terminal outputs (`<REDACTED>`).
100
82
 
101
- - **Confirmed** - evidence identifies the cause and explains the failure.
102
- - **Likely** - evidence narrows the cause, but one specific proof is unavailable.
103
- - **Blocked** - the failure cannot be reproduced or required evidence is
104
- inaccessible.
83
+ ---
105
84
 
106
- ## Step 5 - report and hand off
85
+ ### Phase 5: Confirm Root Cause at Real Seam
107
86
 
108
- Give a concise debug report:
87
+ A root cause is **Confirmed** only when empirical evidence connects all three:
88
+ 1. The triggering input or state
89
+ 2. The responsible code / configuration boundary
90
+ 3. The observed failure
109
91
 
110
- - symptom and reproduction
111
- - verdict
112
- - root cause or leading hypothesis
113
- - evidence, including commands and relevant paths
114
- - affected behavior and likely repair boundary
115
- - what was not verified
116
- - exact next action
92
+ **Seam Identification**: Identify the exact architectural seam (per `devflow/context/coding-standards.md` Deep Modules) where the regression test must live. If no clean seam exists, note that as an architectural finding.
117
93
 
118
- Choose the next action without writing files:
94
+ ---
95
+
96
+ ### Phase 6: Report & Hand-off
97
+
98
+ Give a structured, concise debug report:
119
99
 
120
- - Active feature or fix caused the failure -> return the diagnosis to `/implement` with instructions to write a failing reproduction test ([TDD-Red]) first.
121
- - No active work item and the bug is confirmed -> recommend `/fix "<concise bug and confirmed cause>"` (which will write a failing test first before fixing).
122
- - Cause is only likely or blocked -> recommend the next diagnostic evidence, not a speculative repair.
123
- - The issue is planned product work rather than a defect -> point to `/feature`.
100
+ ```markdown
101
+ ### 🐞 Debug Report: <Concise Title>
102
+
103
+ - **Symptom**: <Exact user symptom observed>
104
+ - **Reproduction Command**: `<Single red-capable command>`
105
+ - **Verdict**: Confirmed | Likely | Blocked
106
+ - **Root Cause**: <Precise technical explanation of why it failed>
107
+ - **Responsible Seam**: `<path/to/file.ts#line>`
108
+ - **Evidence**:
109
+ - Test/Curl output confirming the red signal
110
+ - Trace connecting triggering state to failure
111
+ - **Next Action**:
112
+ - For active feature -> Hand back to `/implement` with instructions to write failing test first.
113
+ - For standalone bug -> Recommend `/fix "<concise description>"` to create spec and implement regression test.
114
+ ```
115
+
116
+ ---
124
117
 
125
118
  ## Rules
126
119
 
127
- - Diagnose, do not repair. Never edit source, tests, configuration, lockfiles, or
128
- Blueprint files.
129
- - Never create, switch, merge, or delete branches. Never commit or push.
130
- - Do not update the findings ledger. `/audit` owns recorded code-quality
131
- findings; `/debug` reports one investigated failure in chat.
132
- - Evidence outranks confidence. Label uncertainty and failed reproduction
133
- honestly.
134
- - Preserve the user's working tree and running processes.
135
- - Do not broaden one failure into a general audit or refactor.
136
-
137
- ## Formatting
138
-
139
- Format the output to match the project's conventions in
140
- `devflow/context/ai-interaction.md`: concise, scannable markdown with a short
141
- evidence list and a clear next action.
120
+ - **Diagnose, do not repair**: Never edit production source, package lockfiles, or DevFlow state inside `/debug`.
121
+ - **Evidence outranks confidence**: Label uncertainty honestly (`Likely` vs `Confirmed`).
122
+ - **Preserve git state**: Never switch branches, commit, reset, or clean the working tree.
123
+ - **Clean up probes**: Ensure any temporary test scripts in scratch/ are cleanly referenced.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: devflow
3
- description: "[devflow][B] Flagship interactive guide, state inspector, and intent router for DevFlow workflows."
3
+ description: "[devflow] Flagship interactive guide, state inspector, and intent router for DevFlow workflows."
4
4
  ---
5
5
 
6
6
  # devflow - Interactive Workflow Guide & Intent Router for Nexus-DevFlow
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: discovery
3
- description: "[devflow][D] Unified discovery and exploration stage in DevFlow 2.0 - conducts project-level roadmap discovery (project-plan.md/build-plan.md) or feature-level exploration (Stage 00) before delivery commitment."
3
+ description: "[devflow] Unified discovery and exploration stage in DevFlow 2.5.0 - conducts project-level roadmap discovery (project-plan.md/build-plan.md) or feature-level pre-delivery exploration before the Single Living Spec lifecycle."
4
4
  argument-hint: "[{title, request, IDEA-xxx, or discovery-id}]"
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ $ARGUMENTS
10
10
 
11
11
  `/discovery` is the central discovery entry point in Nexus-DevFlow. It operates in two adaptive modes based on input scope:
12
12
  1. **πŸ—ΊοΈ Macro Project Discovery**: Develops high-level product and build roadmap plans (`devflow/project-plan.md` & `devflow/build-plan.md`) through an adaptive conversation before `/overview`.
13
- 2. **πŸ” Micro Feature Exploration (Stage 00)**: Explores a specific feature, request, or idea before committing to delivery, routes through supporting lenses, and finishes with a visible `Proceed`, `Defer`, or `Reject` decision before `10-define`.
13
+ 2. **πŸ” Micro Feature Exploration (Pre-Flight)**: Explores a specific feature, request, or idea before committing to delivery, routes through supporting lenses, and finishes with a visible `Proceed`, `Defer`, or `Reject` decision before `/feature` or `/fix`.
14
14
 
15
15
  ---
16
16
 
@@ -21,7 +21,7 @@ $ARGUMENTS
21
21
  /discovery
22
22
  /discovery --project
23
23
 
24
- # 2. Micro Feature Exploration Mode (Stage 00 of Deep-Track)
24
+ # 2. Micro Feature Exploration Mode (Pre-Flight)
25
25
  /discovery {title or request}
26
26
  /discovery IDEA-xxx
27
27
  /discovery {discovery-id}
@@ -44,7 +44,7 @@ Use when:
44
44
 
45
45
  ---
46
46
 
47
- ## Mode 2: Micro Feature Exploration (Stage 00 of Deep-Track)
47
+ ## Mode 2: Micro Feature Exploration (Pre-Flight)
48
48
 
49
49
  Use when:
50
50
  - Exploring a specific feature, complex architectural change, or pending idea (`/discovery IDEA-xxx`).
@@ -76,8 +76,7 @@ devflow/discoveries/{DISCOVERY_ID}-{slug}/discovery.md
76
76
  ### Decision & Approval Gate:
77
77
  Set one visible decision:
78
78
  - `Proceed`: Enough value and evidence exist to define delivery work:
79
- - **🏎️ Fast-Track (Recommended for 85% of standard features/fixes)**: Handoff to `/feature {discovery_id}` or `/fix {discovery_id}` (writes `devflow/context/current-feature.md`).
80
- - **πŸ—οΈ Deep-Track (For large architectural epics/migrations)**: Handoff to `10-define {discovery_id}` (writes `devflow/context/current-run/10-define.md`).
79
+ - Handoff to `/feature {discovery_id}` or `/fix {discovery_id}` to create the Single Living Spec in `devflow/context/current-feature.md`.
81
80
  - `Defer`: The idea remains relevant but timing or evidence is not ready.
82
81
  - `Reject`: The idea should not proceed under current framing.
83
82
 
@@ -86,6 +85,5 @@ Set one visible decision:
86
85
  ## Next Workflow Recommendations
87
86
 
88
87
  - **From Macro Project Mode**: Run `/overview` to compile context into `devflow/context/project-overview.md`.
89
- - **From Micro Stage 00 (Approved Proceed βž” Fast-Track)**: Run `/feature {discovery_id}` to start lean living spec.
90
- - **From Micro Stage 00 (Approved Proceed βž” Deep-Track)**: Run `10-define {discovery_id}` to allocate a Running ID.
91
- - **From Micro Stage 00 (Defer / Reject)**: No next command needed.
88
+ - **From Micro Pre-Flight (Approved Proceed)**: Run `/feature {discovery_id}` or `/fix {discovery_id}` to start the Single Living Spec lifecycle.
89
+ - **From Micro Pre-Flight (Defer / Reject)**: No next command needed.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: doctor
3
- description: "[devflow][B] Run a read-only Blueprint health check for setup, onboarding, required files, tool adapters, commands, optional verification and CI, Blueprint visibility, ignore rules, planning readiness, overview freshness, and workflow drift. Use when the user runs /doctor, asks whether the Blueprint is installed correctly, wants a health check, setup check, doctor pass, or says something feels off before starting or resuming work."
3
+ description: "[devflow] Run a read-only Blueprint health check for setup, onboarding, required files, tool adapters, commands, optional verification and CI, Blueprint visibility, ignore rules, planning readiness, overview freshness, and workflow drift. Use when the user runs /doctor, asks whether the Blueprint is installed correctly, wants a health check, setup check, doctor pass, or says something feels off before starting or resuming work."
4
4
  ---
5
5
 
6
6
  # doctor - Blueprint health check
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: feature
3
- description: "[devflow][F] Turn a feature from build-plan.md into a buildable spec. With no argument, specs the next unchecked item in the build plan; given a number or name, specs that one. If a clearly new feature does not match the plan, proposes a reviewed plan addition, refreshes the overview after approval, then specs it. Sizes the feature and splits anything too big into smaller sub-features (4a, 4b, ...), writes small, reviewable build steps to devflow/context/current-feature.md, then red-teams its own draft for gaps, oversized steps, and scope creep before stopping at a review gate. Use when the user runs /feature, names or numbers a feature, asks to add and start a new feature, or asks to spec out, break down, or start the next feature."
3
+ description: "[devflow] Turn a feature from build-plan.md into a buildable living spec. Supports Multi-Run Spec Queue: drafts dedicated context in devflow/context/{xxx-slug}/ without blocking additional specs. With no argument, specs the next unchecked item; given a number or name, specs that one. Sizes and splits large items (4a, 4b), generates TDD checklist steps, red-teams the draft, and stops at review gate. Use when running /feature, naming a feature, or drafting the next living spec."
4
+ argument-hint: "[{number, name, DISC-id, or IDEA-id}]"
4
5
  ---
5
6
 
6
7
  # feature - turn a build-plan feature into a buildable spec
@@ -8,18 +9,22 @@ description: "[devflow][F] Turn a feature from build-plan.md into a buildable sp
8
9
  Where this sits in the workflow:
9
10
 
10
11
  project-overview.md + build-plan.md -> [this skill] -> build
11
- (source of truth, (which feature (the spec for (code,
12
- from /overview) to build) one feature) reviewed)
12
+ (source of truth, (which feature (the spec in (code,
13
+ from /overview) to build) contexts/xxx/) reviewed)
13
14
 
14
15
  `build-plan.md` is intentionally high-level - one line per feature, no detail,
15
16
  no ordering ceremony. All of that is this skill's job: take one listed feature,
16
17
  read the full context from `project-overview.md`, and turn it into something
17
- buildable.
18
+ buildable in `devflow/context/{xxx-slug}/spec.md`.
19
+
20
+ ## Multi-Run Spec-Ahead Support
21
+
22
+ `/feature` supports drafting multiple specs ahead of time. Creating a spec creates a dedicated workspace directory at `devflow/context/{xxx-slug}/` and does **not block** drafting subsequent features.
18
23
 
19
24
  ## Input
20
25
 
21
26
  A feature from `build-plan.md`, by number or name - e.g. `/feature 3` or
22
- `/feature "typing engine"`.
27
+ `/feature "typing engine"` or `/feature DISC-20260826-001`.
23
28
 
24
29
  The request may also describe a genuinely new feature that is not in the build
25
30
  plan yet. That goes through the new-feature intake in Step 1. Never silently add
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: fix
3
- description: "[devflow][F] Document an ad-hoc bug fix or small change (one not in the build plan) into devflow/context/current-feature.md so it runs through the same build loop. Writes a short fix spec and stops; then /implement builds it and /complete logs it to devflow/history/fixes/ and merges. Use when the user runs /fix, reports a bug, or asks to fix or change something that isn't a planned build-plan feature."
3
+ description: "[devflow] Document an ad-hoc bug fix or small change (one not in the build plan) into devflow/context/{xxx-slug}/spec.md so it runs through the same build loop. Supports Multi-Run: drafts dedicated fix context and allows selective /implement [id]. Writes a short fix spec and stops; then /implement builds it and /complete logs it to devflow/history/fixes/ and merges. Use when running /fix, reporting a bug, or fixing an ad-hoc issue."
4
+ argument-hint: "[{title or issue-description}]"
4
5
  ---
5
6
 
6
7
  # fix - document an ad-hoc fix, then build it like anything else
@@ -13,7 +14,7 @@ Where this sits in the workflow:
13
14
 
14
15
  A fix is a bug or small change that isn't a planned build-plan feature. It runs
15
16
  through the same loop as a feature (build with review gates, iterate, then merge);
16
- it just starts here instead of `/feature`, and is logged separately.
17
+ it creates a dedicated run folder at `devflow/context/{xxx-slug}/` (e.g. `059-fix-login-error`).
17
18
 
18
19
  ## Input
19
20
 
@@ -21,16 +22,13 @@ A description of the bug or change, for example `/fix "password reset email neve
21
22
  sends"`. If the user just reported the problem in chat, use that.
22
23
 
23
24
  The input may also be a finding ID from `devflow/context/findings.md`, alone
24
- or with a description, for example `/fix F-03`. Pull the problem statement from
25
- that ledger entry. Use this form only between work items, when
26
- `current-feature.md` is the reset stub: this skill overwrites that file, so
27
- while a spec is active, repair its findings through `/implement` instead.
25
+ or with a description, for example `/fix F-03`.
28
26
 
29
27
  ## Step 1 - write the fix spec
30
28
 
31
29
  Pull context from `devflow/context/project-overview.md` and `devflow/context/coding-standards.md`,
32
- then write a short spec to `devflow/context/current-feature.md` (this file holds whatever
33
- is being built now, feature or fix). Keep it lighter than a feature spec:
30
+ calculate the next sequential running ID (e.g. `059-fix-slug`),
31
+ then write a short spec to `devflow/context/{xxx-slug}/spec.md` (and update `devflow/context/current-feature.md`). Keep it lighter than a feature spec:
34
32
 
35
33
  - **Title** - the bug or change in a few words.
36
34
  - **Type:** Fix (so `/complete` logs it to `devflow/history/fixes/`, not `devflow/history/features/`).