@jakkrichm/create-nexus-devflow 2.18.2 → 2.19.0

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 (78) hide show
  1. package/README.md +7 -6
  2. package/dist/bin/create-nexus-devflow.js +80 -47
  3. package/dist/bin/create-nexus-devflow.js.map +1 -1
  4. package/dist/lib/doctor.js +27 -0
  5. package/dist/lib/doctor.js.map +1 -1
  6. package/dist/lib/tooling/commands/scan-doc-contract.js +0 -1
  7. package/dist/lib/tooling/commands/scan-doc-contract.js.map +1 -1
  8. package/dist/lib/ui.d.ts +23 -0
  9. package/dist/lib/ui.js +85 -0
  10. package/dist/lib/ui.js.map +1 -1
  11. package/dist/lib/update.js +1 -1
  12. package/dist/lib/update.js.map +1 -1
  13. package/dist/scripts/prepare-template.js +3 -7
  14. package/dist/scripts/prepare-template.js.map +1 -1
  15. package/package.json +2 -2
  16. package/template/.agents/skills/audit/SKILL.md +4 -1
  17. package/template/.agents/skills/brainstorm/SKILL.md +5 -4
  18. package/template/.agents/skills/bughunter/SKILL.md +1 -1
  19. package/template/.agents/skills/check/SKILL.md +26 -116
  20. package/template/.agents/skills/check/reference/guide.md +36 -4
  21. package/template/.agents/skills/check/reference/verify.md +129 -0
  22. package/template/.agents/skills/ci/SKILL.md +35 -13
  23. package/template/.agents/skills/complete/SKILL.md +2 -0
  24. package/template/.agents/skills/devflow/SKILL.md +3 -2
  25. package/template/.agents/skills/discovery/SKILL.md +9 -0
  26. package/template/.agents/skills/doctor/SKILL.md +2 -0
  27. package/template/.agents/skills/explore/SKILL.md +2 -1
  28. package/template/.agents/skills/feature/SKILL.md +4 -1
  29. package/template/.agents/skills/feature/reference/feature-spec-template.md +16 -16
  30. package/template/.agents/skills/fix/SKILL.md +3 -3
  31. package/template/.agents/skills/grill/SKILL.md +6 -1
  32. package/template/.agents/skills/idea/SKILL.md +6 -6
  33. package/template/.agents/skills/implement/SKILL.md +45 -119
  34. package/template/.agents/skills/test/SKILL.md +26 -0
  35. package/template/.claude/skills/audit/SKILL.md +4 -1
  36. package/template/.claude/skills/brainstorm/SKILL.md +5 -4
  37. package/template/.claude/skills/bughunter/SKILL.md +1 -1
  38. package/template/.claude/skills/check/SKILL.md +26 -116
  39. package/template/.claude/skills/check/reference/guide.md +36 -4
  40. package/template/.claude/skills/check/reference/verify.md +129 -0
  41. package/template/.claude/skills/ci/SKILL.md +35 -13
  42. package/template/.claude/skills/complete/SKILL.md +2 -0
  43. package/template/.claude/skills/devflow/SKILL.md +3 -2
  44. package/template/.claude/skills/discovery/SKILL.md +11 -3
  45. package/template/.claude/skills/doctor/SKILL.md +2 -0
  46. package/template/.claude/skills/explore/SKILL.md +2 -1
  47. package/template/.claude/skills/feature/SKILL.md +4 -1
  48. package/template/.claude/skills/feature/reference/feature-spec-template.md +16 -16
  49. package/template/.claude/skills/fix/SKILL.md +3 -3
  50. package/template/.claude/skills/grill/SKILL.md +6 -1
  51. package/template/.claude/skills/idea/SKILL.md +6 -6
  52. package/template/.claude/skills/implement/SKILL.md +45 -119
  53. package/template/.claude/skills/test/SKILL.md +26 -0
  54. package/template/AGENTS.md +27 -38
  55. package/template/devflow/context/ai-interaction.md +15 -14
  56. package/template/devflow/context/coding-standards.md +67 -6
  57. package/template/devflow/context/glossary.md +26 -6
  58. package/template/devflow/decisions/README.md +15 -1
  59. package/template/devflow/reference/feature-spec-template.md +59 -79
  60. package/template/devflow/reference/help-playbook-protocol.md +33 -0
  61. package/template/devflow/reference/slicing-archetypes.md +105 -0
  62. package/template/devflow/docs/USAGE.md +0 -195
  63. package/template/devflow/docs/diagrams/nexus-devflow-architecture.html +0 -14821
  64. package/template/devflow/docs/diagrams/nexus-devflow-architecture.json +0 -80
  65. package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.html +0 -14860
  66. package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.json +0 -88
  67. package/template/devflow/docs/examples/living-spec/adr.example.md +0 -43
  68. package/template/devflow/docs/examples/living-spec/current-feature.example.md +0 -113
  69. package/template/devflow/docs/examples/living-spec/discovery.example.md +0 -45
  70. package/template/devflow/docs/examples/living-spec/ideas.example.md +0 -22
  71. package/template/devflow/docs/governance-rules.md +0 -39
  72. package/template/devflow/docs/manual-review-workflow-spec.md +0 -116
  73. package/template/devflow/docs/markdown-metadata-contract.md +0 -140
  74. package/template/devflow/docs/quickstart.md +0 -124
  75. package/template/devflow/docs/release-process.md +0 -52
  76. package/template/devflow/docs/skill-selection-policy.md +0 -64
  77. package/template/devflow/docs/workflow-surface-map.md +0 -86
  78. package/template/devflow/runs/.gitkeep +0 -1
@@ -1,126 +1,36 @@
1
1
  ---
2
2
  name: check
3
- description: "[devflow] Check the running app, CLI, or server against the active spec's done-when criteria and capture observable pass or fail evidence without editing code. Use for /check, proving behavior before completion beyond builds and tests."
4
- argument-hint: "[{run-id, number, or name}]"
3
+ description: "[devflow] Check the running app, CLI, or server against the active spec's done-when criteria and capture observable pass or fail evidence without editing source. Use /check to verify real feature behavior, or /check guide [latest|scope] for a read-only manual walkthrough: how to test manually, where to click, expected and incorrect results, or a human review path."
4
+ argument-hint: "[guide] [latest | <step> | <path> | <route>]"
5
5
  ---
6
6
 
7
- # check - Dual-Axis Independent Verification Engine
7
+ # check - verify behavior or explain how to try it
8
8
 
9
- $ARGUMENTS
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
 
11
- **First action:** Before project inspection, preflight, or any other tool call,
12
- publish `running` to `devflow/.state/run.json` using the dashboard activity
13
- contract in `AGENTS.md`.
14
-
15
- Where this sits in the workflow:
16
-
17
- /implement -> [check] -> /complete
18
- (built a (dual-axis (only once both
19
- step or review with axes pass with
20
- the feature) empirical proof) evidence)
21
-
22
- `/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.
23
-
24
- It changes no source and commits nothing — it executes, inspects, and reports observed facts.
25
-
26
- ---
27
-
28
- ## Input
29
-
30
- - **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`.
31
- - **With no argument** (`/check`) -> verifies the active run matching current git branch or single active spec.
32
-
33
- ---
34
-
35
- ## Hybrid Browser Verification Engine
36
-
37
- Nexus-DevFlow uses a **Dual-Layer Browser Verification Hierarchy**:
38
-
39
- ```text
40
- ┌─────────────────────────────────────────────────────────────────────────────┐
41
- │ 🌐 Hybrid Browser Verification Engine │
42
- ├──────────────────────────────────────┬──────────────────────────────────────┤
43
- │ 1. Code-Driven Test Automation (CI) │ 2. Interactive AI Visual QA (MCP) │
44
- │ • Framework: Playwright │ • Server: MCP browseros-neo │
45
- │ • Command: npm run test:browser │ • URL: http://127.0.0.1:9010/mcp │
46
- │ • Purpose: Assertions, Headless, │ • Purpose: Live DOM Inspection, │
47
- │ Regression Suite & Pre-commit │ Real Screenshot Proofs, /try │
48
- └──────────────────────────────────────┴──────────────────────────────────────┘
49
- ```
50
-
51
- 1. **Layer 1: Code-Driven Repeatable Tests (Playwright)**:
52
- - If `AGENTS.md` declares `Browser tests: <command>`, run that exact command as repeatable automated evidence.
53
- 2. **Layer 2: Interactive AI Visual QA (MCP browseros-neo)**:
54
- - When the `browseros-neo` MCP server (`http://127.0.0.1:9010/mcp`) is active, use it to inspect the live running app, verify rendered CSS/layout, test click flows, and capture actual screenshot proofs.
55
-
56
- ---
57
-
58
- ## Step 1 - Build the Dual-Axis Review Matrix
11
+ ## Select the mode before any tool call
59
12
 
60
- Read the target spec from `devflow/context/{xxx-slug}/spec.md` and `devflow/context/coding-standards.md`. Prepare the inspection criteria across two independent axes:
13
+ - `/check guide` or `$check guide`: generate a read-only manual walkthrough.
14
+ Pass remaining arguments such as `latest`, a step, a path, route, or command
15
+ to `reference/guide.md`. Read and follow that reference only. Do not write
16
+ activity state, run checks or the app, edit files, update spec status, or
17
+ produce verification receipts.
18
+ - A natural-language request for instructions on how the user can manually test
19
+ or review a change also selects guide mode. If the request mixes a guide with
20
+ agent verification, clarify which mode to run first before any activity.
21
+ - `/check` or `$check`, optionally with a verification scope: verify observed
22
+ behavior against the spec. Follow verification startup below, then read and
23
+ follow `reference/verify.md` only.
61
24
 
62
- 1. **Axis 1 (Standards & Architecture Criteria)**:
63
- - Coding conventions in `coding-standards.md`
64
- - Deep Modules discipline (Small interface, deep implementation, clean seams, no leaky abstractions)
65
- - Baseline 12 Fowler Code Smells (Primitive obsession, Feature envy, Shotgun surgery, Speculative generality, etc.)
66
- - Multi-lane technical gates (Typecheck, test suites, zero secrets, zero P0/P1 findings)
67
- 2. **Axis 2 (Spec Fidelity & Behavioral Observables)**:
68
- - Line-by-line Acceptance Criteria (ACs) and "Done When" observables from `devflow/context/{xxx-slug}/spec.md`
69
- - Scope Creep detection (Unrequested behavior in the diff)
70
- - Missing Requirements detection (Unimplemented edge cases)
25
+ Load only the selected reference. Do not read both references preemptively.
26
+ Guide generation never satisfies a verification gate. The existing
27
+ `qualityGates.regular.tryGuide` and `qualityGates.continuous.tryGuide` keys now
28
+ select `/check guide`; their policy values and automatic invocation rules are
29
+ unchanged. The separate `check` gates continue to select verification mode.
71
30
 
72
- ---
73
-
74
- ## Step 2 - Get the App Running & Exercise Live Proof
75
-
76
- Use the project's real commands (from `AGENTS.md`):
77
-
78
- - **Web app**: Start (or reuse) the local dev server. Drive a real browser to relevant routes. If `Browser tests: <command>` is declared, run it. When MCP `browseros-neo` is active, connect to inspect live visual state.
79
- - **CLI**: Execute commands with representative input fixtures, asserting exit codes and output snapshots.
80
- - **Server / API**: Hit endpoints with real payloads and assert on HTTP response status and bodies.
81
- - **Library**: Exercise public interfaces through integration tests or sample scripts.
82
-
83
- > [!IMPORTANT]
84
- > **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.
85
-
86
- ---
87
-
88
- ## Step 3 - Dual-Axis Independent Report & State Update
89
-
90
- Format the report into two distinct, un-merged review axes:
91
-
92
- ```markdown
93
- # 🔍 Verification Report: [Feature Name]
31
+ ## Verification startup (verification mode only)
94
32
 
95
- ## ⚖️ Axis 1: Standards, Architecture & Quality Gate
96
-
97
- - **Technical Lanes**:
98
- - [pass] Type Safety: `tsc --noEmit` (0 errors)
99
- - [pass] Automated Tests: `npm test` (All tests green)
100
- - [pass] Browser Tests: `npm run test:browser` (Playwright passed)
101
- - [pass] Visual Inspection: MCP browseros-neo verified UI layout & zero console errors
102
- - [pass] Security & Hygiene: Zero secrets, sanitized inputs
103
- - [pass] Findings Ledger: 0 blocking P0/P1 in `devflow/context/{xxx-slug}/findings.md`
104
- - **Deep Modules & Architecture**:
105
- - [pass] Seam Integrity: Public interfaces remain small, implementation details hidden.
106
- - [pass] The Deletion Test: Complexity is concentrated inside the module, not scattered across callers.
107
- - **Code Smells Assessment**:
108
- - [clean] 12 Fowler Code Smells evaluated across git diff: No critical smells detected.
109
-
110
- ## 🎯 Axis 2: Spec Fidelity & Behavioral Acceptance Gate
111
-
112
- Line-by-line verification against `devflow/context/{xxx-slug}/spec.md`:
113
- - [pass] **AC-1 (<title>)**: <Observed empirical evidence / screenshot path>
114
- - [pass] **AC-2 (<title>)**: <Observed empirical evidence / terminal output>
115
- - [fail] **AC-3 (<title>)**: <Exact observed failure with reproduction command>
116
- - [clean] **Scope Creep Check**: No unrequested features or unnecessary abstractions introduced.
117
- - [clean] **Completeness Check**: 100% of spec requirements addressed.
118
-
119
- ---
120
-
121
- ## 🚦 Final Routing & Verdict
122
-
123
- - **ALL PASSED**: Both axes green. Update `stage.md` (Passed -> Ready for `/complete`).
124
- - **ANY FAILURE**: Hand back to `/implement` with exact failure evidence and reproduction steps.
125
- - **UNVERIFIABLE**: Clearly document the gap and residual risk. Never fabricate a pass.
126
- ```
33
+ **First action:** Before project inspection, preflight, or any other tool call,
34
+ publish `running` to `devflow/.state/run.json` using the dashboard activity
35
+ contract in `AGENTS.md`, with command `check`. This precedes reading the
36
+ verification reference. Guide mode must skip this startup entirely.
@@ -17,15 +17,16 @@ produce verification receipts. Reading files and git status is allowed. A guide
17
17
  never counts as acceptance evidence or proof that any check passed.
18
18
 
19
19
  The quality-gate config controls when another workflow generates this guide
20
- automatically. An explicit `/check guide` or `/try` request always runs.
20
+ automatically. An explicit `/check guide`, `$check guide`, or `/try` request always runs.
21
21
  A generated guide never counts as evidence that the user performed the walkthrough.
22
22
 
23
23
  ## Input
24
24
 
25
25
  Optional scope:
26
26
 
27
- - no argument: use the active feature, fix, or rollback in `devflow/context/{xxx-slug}/spec.md`
28
- - `latest`: use the most recent archive under `devflow/history/features/`, `devflow/history/fixes/`, or `devflow/history/rollbacks/`
27
+ - no argument: use the active task spec in `devflow/context/{xxx-slug}/spec.md`
28
+ - `latest`: use the most recent archive under `devflow/history/features/`,
29
+ `devflow/history/fixes/`, or `devflow/history/rollbacks/`
29
30
  - a step name or number: focus the guide on that current task step
30
31
  - a path, route, or command: include it as the main thing to try
31
32
 
@@ -42,8 +43,14 @@ Read:
42
43
  - `devflow/context/project-overview.md`
43
44
  - `devflow/context/coding-standards.md`
44
45
  - `devflow/build-plan.md`
46
+ - latest files under `devflow/history/features/`, `devflow/history/fixes/`, and `devflow/history/rollbacks/`, if the current feature is reset
45
47
  - Git branch and working tree status
46
48
 
49
+ For `latest`, use the most recent archive even when an active spec exists.
50
+ Otherwise prefer the active spec. If the active spec is missing, use
51
+ the most recent archived feature, fix, or rollback by filename or modification time and
52
+ say that is what you used.
53
+
47
54
  Do not dump the spec. Pull out the routes, commands, UI surfaces, CLI commands,
48
55
  API endpoints, data states, and done-whens that matter for a human trying it.
49
56
  For a rollback, lead with the path that proves the removed behavior is gone, then
@@ -72,7 +79,15 @@ Produce a concise guide with these 5 sections (respond in Thai per project conve
72
79
  4. **Expect** - visible result, output, response, state change, file, or lack of error.
73
80
  5. **Watch For** - common wrong outcomes, console or network errors, stale data, missing fields, bad empty states, layout issues, or safety warnings.
74
81
 
75
- Keep it concrete.
82
+ Keep it concrete. Prefer:
83
+
84
+ Open http://127.0.0.1:7788/api/snapshot
85
+ Expect a JSON object with `generated_at`, `services`, `projects`, and
86
+ `conflicts`.
87
+
88
+ Avoid:
89
+
90
+ Check that the snapshot works.
76
91
 
77
92
  ## Step 4 - include confidence and gaps
78
93
 
@@ -85,6 +100,23 @@ End with:
85
100
  If the feature is not user-visible, say so and provide the closest manual signal,
86
101
  such as an API response, CLI output, log line, or unit test command.
87
102
 
103
+ ## Rules
104
+
105
+ - Read-only only. Do not edit, commit, merge, push, install, or delete.
106
+ - Do not run the app or verification commands in guide mode. If the user asks
107
+ you to try it for them, leave guide mode and explicitly route to `/check`
108
+ verification, following its activity and authorization rules.
109
+ - Do not pretend a path is known when the spec does not say it. Give the best
110
+ likely path and label uncertainty.
111
+ - Keep the guide short enough to follow while the app is open.
112
+ - Match the project's commands from `AGENTS.md`.
113
+
88
114
  ## Dual Compatibility with `/try`
89
115
 
90
116
  In Nexus-DevFlow, `/try` and `/check guide` serve the same user purpose and can be used interchangeably.
117
+
118
+ ## Formatting
119
+
120
+ Format the output to match the project's conventions in
121
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with numbered
122
+ steps for the manual path and short bullets for warnings.
@@ -0,0 +1,129 @@
1
+ # Check verification
2
+
3
+ **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.
4
+
5
+ Verification activity was started by the dispatcher before loading this reference.
6
+
7
+ Where this sits in the workflow:
8
+
9
+ /implement -> [check] -> /complete
10
+ (built a (run the app, (only once the
11
+ step or prove each done-whens are
12
+ the feature) done-when) proven)
13
+
14
+ `/implement` builds and does a quick build-plus-screenshot check inline. `/check`
15
+ is the deeper, repeatable gate for when a "done when" needs the *real running app*,
16
+ not just a green build: a click that triggers a download, a route that returns a
17
+ file, a flow across screens. Run it on a single step whose done-when is
18
+ behavioral, or on the whole feature as the acceptance check before `/complete`.
19
+
20
+ The point is evidence. A passing build proves the code compiles; `/check` proves
21
+ the thing the spec promised actually happens. It changes no source and commits
22
+ nothing - it runs the app and reports what it saw.
23
+
24
+ ## Input
25
+
26
+ Optional: a specific thing to check (a step, a flow, a URL). With no argument,
27
+ verify the whole current feature against every "done when" in
28
+ `devflow/context/{xxx-slug}/spec.md`.
29
+
30
+ ## Step 1 - build the checklist
31
+
32
+ Read `devflow/config.json` first. A missing file means the built-in defaults
33
+ apply. If the file exists but is invalid, stop and point the user to `/doctor`.
34
+ Configuration never grants permission to start a server or take any other action
35
+ that the project instructions or user have not authorized.
36
+ The quality-gate config controls automatic invocation only. An explicit `/check`
37
+ or `$check` request always runs.
38
+
39
+ Read `devflow/context/{xxx-slug}/spec.md`. Pull the observable "done when"
40
+ criteria from the build steps (and any acceptance notes in the Testing section).
41
+ Turn them into a concrete checklist of claims to prove - each one a specific,
42
+ observable behavior, not "it works". If the user named one thing, scope to that.
43
+
44
+ If there's no active feature spec, ask what to verify rather than guessing.
45
+
46
+ ## Step 2 - get the app running
47
+
48
+ Use the project's real commands (see Commands in `AGENTS.md`). Match the project
49
+ type:
50
+
51
+ - **Web app** - start (or reuse) the dev/preview server, then drive a real browser
52
+ to the relevant routes. Prefer reusing an already-running server over starting a
53
+ duplicate. If `AGENTS.md` declares `Browser tests: <command>`, run that exact
54
+ command as repeatable evidence and use its harness for covered interactions.
55
+ Reuse runner-owned server lifecycle instead of starting a duplicate. A green
56
+ suite is one evidence source, not proof of claims it does not observe. If no
57
+ command is declared but Playwright is already installed, prefer it for browser
58
+ driving, screenshots, console errors, and failed request checks. Never install
59
+ it from `/check`; use another real-browser evidence path and report what you
60
+ used, or point to `/browser-tests` for later optional setup.
61
+ - **CLI** - run the actual command(s) with representative inputs.
62
+ - **Server/API** - start it and hit the endpoints.
63
+ - **Library** - exercise the public API through an example or the test command.
64
+
65
+ If a `test` command is declared in `AGENTS.md`, you may run it as *one* input, but
66
+ `/check` is broader than unit tests: it checks real behavior, which is exactly the
67
+ evidence UI and integration steps ride on instead of unit tests.
68
+
69
+ ## Step 3 - exercise each claim
70
+
71
+ Drive the app to each checklist item and capture evidence as you go:
72
+
73
+ - Navigate and interact for real (click, type, submit, download) - don't assert
74
+ from the code what the running app would do.
75
+ - Capture **screenshots** for visual/UI claims, **output** for CLI/API claims.
76
+ - Watch for **console errors and failed network requests**; a clean-looking screen
77
+ with errors in the console is not a pass.
78
+
79
+ With `verification.uiEvidence: "required"`, every UI claim needs direct browser
80
+ evidence, including a screenshot and the relevant console and network check. If
81
+ that evidence path is unavailable, mark the claim unverifiable instead of
82
+ passing it from build output. With `when-available`, use the strongest available
83
+ evidence and report any gap plainly.
84
+
85
+ ### AC-to-Test Traceability Verification:
86
+ Cross-reference each Acceptance Criterion (`- [ ] **AC-N**`) in `spec.md` against the test suite's executed assertions and observable evidence:
87
+ - Match tagged test cases (e.g. `it('AC-1: ...')`) to their respective criteria.
88
+ - Ensure 100% of defined acceptance criteria have empirical proof before issuing a `verified` status.
89
+
90
+
91
+ ## Step 4 - report
92
+
93
+ Give a short, honest verdict, one line per checklist item:
94
+
95
+ [pass] Download PDF saves certificate-<slug>.pdf - file downloaded, opened to the cert
96
+ [pass] Both buttons show a loading state - screenshot: loading-state.png
97
+ [fail] PDF border missing - printBackground not set; screenshot: pdf-no-border.png
98
+ [skip] Vercel render - can't verify locally (feature 9)
99
+
100
+ Then state the bottom line: are all the feature's done-whens proven, or not yet.
101
+
102
+ - All proven -> update only the `**Status:**` line in
103
+ `devflow/context/{xxx-slug}/spec.md` to `verified`, then say it is ready for
104
+ `/complete`.
105
+ - Anything failed -> update only that status line to `verification failed`, then
106
+ hand back to `/implement`; name what to fix. Do not fix it here.
107
+ - Anything unverifiable -> update only that status line to `verification
108
+ incomplete`, then say why; never report it as a pass.
109
+
110
+ The status-line update is generated workflow state, not a product-source edit.
111
+ Do not change the spec, checkboxes, findings, or product files from `/check`.
112
+
113
+ ## Rules
114
+
115
+ - **Observe product behavior, don't repair it.** `/check` changes only the
116
+ current spec's status line as described above. It never edits product source,
117
+ commits, or merges. Fixing is `/implement`'s job.
118
+ - **Evidence or it didn't happen.** Every `pass` is backed by something observed -
119
+ a screenshot, output, a response. No assumed passes from reading the code.
120
+ - **Honest over green.** "Couldn't verify" and "failed" are valid, useful results.
121
+ Faking a pass defeats the entire gate.
122
+ - **Check the spec, not vibes.** Verify against the done-whens in
123
+ `spec.md`, so "works" means what the spec said it would do.
124
+
125
+ ## Formatting
126
+
127
+ Format the output to match the project's conventions in
128
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
129
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -1,10 +1,13 @@
1
1
  ---
2
2
  name: ci
3
- description: "[devflow] Set up or normalize one project Verify command and matching GitHub Actions checks while preserving existing CI. Use for /ci, GitHub Actions setup, pull-request checks, automatic checks, or aligning verification."
3
+ description: "[devflow] Set up or normalize one project Verify command and matching GitHub Actions checks while preserving existing CI, with an optional local pre-push hook. Use for /ci, GitHub Actions setup, pull-request checks, automatic checks, pre-push hooks, or aligning verification."
4
+ argument-hint: "[--hook | --no-hook]"
4
5
  ---
5
6
 
6
7
  # ci - set up automatic GitHub checks
7
8
 
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
+
8
11
  **First action:** Before project inspection, preflight, or any other tool call,
9
12
  publish `running` to `devflow/.state/run.json` using the dashboard activity
10
13
  contract in `AGENTS.md`.
@@ -15,7 +18,7 @@ Where this sits in the workflow:
15
18
  (project commands) (setup) (same recipe) (pull requests)
16
19
 
17
20
  This skill gives local work and GitHub one shared automated command. It is an
18
- optional setup task, not a requirement for using the Blueprint.
21
+ optional setup task, not a requirement for using DevFlow.
19
22
 
20
23
  Keep the beginner explanation simple:
21
24
 
@@ -23,9 +26,12 @@ Keep the beginner explanation simple:
23
26
  - **GitHub Actions is the worker.** It runs the same recipe automatically.
24
27
  - **A GitHub ruleset is the lock.** That optional remote setting can require the
25
28
  worker to report green before merge.
29
+ - **A pre-push hook is the early warning.** That optional local setting runs the
30
+ recipe before a push leaves the machine. It is a convenience, not the lock:
31
+ `git push --no-verify` skips it.
26
32
 
27
- This skill configures the recipe and worker. It never changes the remote ruleset,
28
- pushes, publishes, deploys, or adds local git hooks.
33
+ This skill configures the recipe and worker, and adds the hook only when the
34
+ user opts in. It never changes the remote ruleset, pushes, publishes, or deploys.
29
35
 
30
36
  ## Input
31
37
 
@@ -47,7 +53,7 @@ Read enough to identify the real project setup:
47
53
  - `.github/workflows/` and any documented external CI
48
54
  - git's current branch, configured default branch, and remotes when available
49
55
 
50
- Do not assume npm, Node.js, `main`, or GitHub from the Blueprint template. Do not
56
+ Do not assume npm, Node.js, `main`, or GitHub from the DevFlow template. Do not
51
57
  run installs or edit files during inspection.
52
58
 
53
59
  If an existing workflow already provides equivalent pull-request checks, explain
@@ -113,11 +119,26 @@ After the workflow exists, ask one question and default to no:
113
119
 
114
120
  Also add a local pre-push hook that runs Verify before every push? [y/N]
115
121
 
116
- Skip the question when the request already answered it (for example "/ci with hook" or "no hook"). When the answer is no, write nothing and move on. When it is yes:
117
-
118
- 1. Use `npx nexus-devflow hook install pre-push` or configure `.githooks/pre-push` running the exact `Verify` command with `git config core.hooksPath .githooks`.
119
- 2. Run the hook once to verify it passes cleanly. If it fails, revert the hook setup and report the failure. Never leave a hook the project cannot pass.
120
- 3. Note that `git push --no-verify` bypasses the hook if an emergency push is ever needed.
122
+ Skip the question when the request already answered it (for example "/ci with
123
+ hook" or "no hook"). When the answer is no, write nothing and move on. When it
124
+ is yes:
125
+
126
+ 1. Use `npx nexus-devflow hook install pre-push` or manually write `.githooks/pre-push`
127
+ (mode 755) that announces itself and runs the exact `Verify` command from `AGENTS.md`
128
+ with `exec`, so the command's exit code is the hook's exit code.
129
+ 2. Point git at the folder: `git config core.hooksPath .githooks`.
130
+ 3. For JavaScript and TypeScript projects, add a `prepare` script,
131
+ `git config core.hooksPath .githooks 2>/dev/null || true`, so a fresh
132
+ install wires the hook without a manual step. The `|| true` keeps installs
133
+ working where no git checkout exists, such as a deploy build. For other
134
+ stacks, document the `git config` line in the README instead.
135
+ 4. Run the hook once (`.githooks/pre-push`). If it fails, remove what this
136
+ step added and report the failing subcommand. Never leave a hook the
137
+ project cannot pass.
138
+
139
+ The hook and the workflow run the same `Verify` command; if one changes, the
140
+ other changes with it. Say in the report that `--no-verify` bypasses the hook,
141
+ so the GitHub ruleset remains the lock.
121
142
 
122
143
  ## Step 4 - prove the setup locally
123
144
 
@@ -146,6 +167,7 @@ Finish with a concise setup report:
146
167
  - checks included and checks omitted
147
168
  - test gate status
148
169
  - workflow path and triggers
170
+ - whether a pre-push hook was added, and that `--no-verify` bypasses it
149
171
  - local Verify result and whether CI is only prepared locally or confirmed by a
150
172
  successful GitHub run
151
173
  - files changed
@@ -157,7 +179,7 @@ part of this skill.
157
179
 
158
180
  ## Interaction with other skills
159
181
 
160
- - `/tests` adds the real test command to an existing Verify command, but never
182
+ - `/setup-tests` or `/test` adds the real test command to an existing Verify command, but never
161
183
  creates CI by itself.
162
184
  - `/implement`, `/complete`, and `/autopilot` run Verify when it is documented,
163
185
  with their existing fallback behavior when it is absent.
@@ -168,8 +190,8 @@ part of this skill.
168
190
 
169
191
  - Preserve existing CI and custom checks.
170
192
  - Never invent tests or install a runner as part of CI setup.
171
- - Never add git hooks, coverage, browser tests, security scans, or matrices by
172
- default.
193
+ - Never add coverage, browser tests, security scans, or matrices by default.
194
+ - Add a git hook only through the Step 3b opt-in, never silently.
173
195
  - Never push or change a remote ruleset without separate explicit approval.
174
196
  - Keep one exact Verify command shared by local work and GitHub.
175
197
 
@@ -106,6 +106,8 @@ Before logging or committing, run a short safety pass and report blockers only:
106
106
  - no P0 or P1 finding in `devflow/context/{xxx-slug}/findings.md` is `open` or `fixed`.
107
107
  `fixed` still blocks on purpose: the repair exists but no review has looked at
108
108
  it - run `/audit` to close it. The only waivers are `accepted` or `invalid`.
109
+ - any `Status: Assumed` ADR in `devflow/decisions/` has been surfaced with its ratification plan noted.
110
+
109
111
 
110
112
  Do not claim "passed", "verified", or "working" without naming the command,
111
113
  route, screenshot, or output that proves it. Stop before Step 1 if required
@@ -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` |
@@ -81,6 +81,15 @@ devflow/discoveries/{DISCOVERY_ID}-{slug}/discovery.md
81
81
  - **For interactive system architecture, dataflows, state transitions, and sequence traces**: Use `archify` (`.agents/skills/archify/SKILL.md`) to compile validated interactive HTML artifacts with dark/light themes, motion, and route probes.
82
82
  - **For editorial, business, quadrant, or broad diagram types**: Use `diagram-design` (`.agents/skills/diagram-design/SKILL.md`).
83
83
  - Save diagram artifacts to `devflow/discoveries/{DISCOVERY_ID}-{slug}/diagrams/{name}.html` and reference them directly in `discovery.md`.
84
+ 7. **🧩 Slicing & Decomposition Lens (4 Slicing Archetypes)**:
85
+ - When breaking down a large initiative into sub-features or milestones, evaluate against [`devflow/reference/slicing-archetypes.md`](file:///d:/Projects/devtools/nexus-devflow/devflow/reference/slicing-archetypes.md):
86
+ - **Skateboard**: Minimal functional loop (prove core logic end-to-end with minimal UI).
87
+ - **Facade**: Rich UI/DX with mock backend (validate user flow & interaction first).
88
+ - **Tracer Bullet**: Deep vertical slice across all layers (DB -> API -> UI) for 1 happy path.
89
+ - **Journey**: Slice along natural user workflow milestones.
90
+ - Recommend the primary Archetype for each proposed sub-feature in `discovery.md`.
91
+
92
+
84
93
 
85
94
  ### Decision & Approval Gate:
86
95
  Set one visible decision:
@@ -166,6 +166,8 @@ Gather these, then summarize. Do not dump file contents.
166
166
  last commit subject, and whether the branch is ahead of upstream.
167
167
  - If the directory is not a git repo, report that as a setup issue and keep
168
168
  going.
169
+ 9. **Token Economics & Session Cost Audit**
170
+ - When session transcript is available, report token efficiency, cache hit rate, and estimated model costs using `npm run analyze:tokens` or `scripts/analyze-token-usage.ts`.
169
171
 
170
172
  ## Output
171
173
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: explore
3
3
  description: "[devflow] Explore an idea against the actual codebase without changing files. Investigate whether a change would help, compare alternatives and tradeoffs, and discuss uncertainty before deciding whether to plan anything. Use for /explore, considering an idea, or weighing options without writing a spec."
4
+ argument-hint: "[<idea or question>]"
4
5
  ---
5
6
 
6
7
  # explore - investigate an idea before deciding to build (Read-Only)
@@ -79,4 +80,4 @@ let the discussion continue as long as useful.
79
80
  Suggest the appropriate command only when the user is ready to proceed.
80
81
 
81
82
  Do not force a handoff at the end of every response. Keep discussing the idea
82
- when that is what the user wants, and leave the project unchanged.
83
+ until the user decides what to do next.
@@ -102,6 +102,8 @@ the data model, stack, and conventions. Decide how big the feature is:
102
102
  those sub-items back under the parent in `build-plan.md` as an indented
103
103
  checklist (`4a`, `4b`, `4c` ...). Spec only the **first** sub-feature now; the
104
104
  rest get picked up on later `/feature` runs.
105
+ *Use the **4 Slicing Archetypes** ([`devflow/reference/slicing-archetypes.md`](file:///d:/Projects/devtools/nexus-devflow/devflow/reference/slicing-archetypes.md)) to guide the split: 🛹 Skateboard (core logic first), 🎭 Facade (UI/DX mock first), 🎯 Tracer Bullet (end-to-end slice), or 🧭 Journey (workflow steps).*
106
+
105
107
 
106
108
  Two levels of breakdown - don't confuse them:
107
109
 
@@ -198,7 +200,7 @@ Before the user reads it, turn on the spec yourself and try to break it. The
198
200
  cheapest place to catch a scope problem or an oversized step is here, before any
199
201
  code exists. Run the draft against these questions:
200
202
 
201
- - **Coverage.** What does this feature need that no step delivers? Push on the
203
+ - **Coverage & Input Mapping.** What does this feature need that no step delivers? Run a mechanical **Input Coverage Test**: does every value this build produces, displays, or computes have a named source (input, DB column, formula, or settled decision) in the spec? Push on the
202
204
  unhappy paths the happy-path spec skipped: empty / missing / malformed input,
203
205
  the error / loading / empty states, the first-run case, failure of anything
204
206
  external it calls.
@@ -218,6 +220,7 @@ code exists. Run the draft against these questions:
218
220
  anything pushed to "out of scope" that this feature actually can't ship without?
219
221
  - **Done-whens.** Is each one observable and checkable by `/check`, or is it a
220
222
  vague "it works"? Make it concrete.
223
+ - **Proportionality.** Does any proposed abstraction, dependency, service, config surface, or security mechanism lack a current requirement, or duplicate existing code/platform features? If so, remove it.
221
224
  - **Testing.** Does the predicted coverage match the gate - in-scope logic gets a
222
225
  test when a `test` command is declared in `AGENTS.md`, UI/integration rides on
223
226
  screenshot + build?
@@ -14,18 +14,18 @@
14
14
  ## 1. Specification & Scope
15
15
 
16
16
  ### 1.1 Problem Statement
17
- {คำอธิบายปัญหาและที่มาของความจำเป็นในการพัฒนาฟีเจอร์นี้}
17
+ {Description of the problem, background, and rationale for developing this feature}
18
18
 
19
19
  ### 1.2 In-Scope
20
- 1. {ขอบเขตการทำงานข้อที่ 1}
21
- 2. {ขอบเขตการทำงานข้อที่ 2}
20
+ 1. {In-scope item 1}
21
+ 2. {In-scope item 2}
22
22
 
23
23
  ### 1.3 Out-of-Scope
24
- - {สิ่งที่อยู่นอกเหนือขอบเขตหรือไม่ทำในรอบนี้}
24
+ - {Items deliberately excluded or deferred to future features}
25
25
 
26
- ### 1.4 Acceptance Criteria (เกณฑ์การยอมรับ)
27
- - [ ] **AC-1**: {เกณฑ์การตรวจรับข้อที่ 1}
28
- - [ ] **AC-2**: {เกณฑ์การตรวจรับข้อที่ 2}
26
+ ### 1.4 Acceptance Criteria
27
+ - [ ] **AC-1**: {Acceptance criterion 1}
28
+ - [ ] **AC-2**: {Acceptance criterion 2}
29
29
 
30
30
  ---
31
31
 
@@ -40,18 +40,18 @@
40
40
  - **Review Strategy**: One feature-level review packet at completion
41
41
 
42
42
  ### 2.3 Test Decision: Required (TDD) | Optional
43
- - **Rationale**: {เหตุผลความจำเป็นในการเขียน Unit Tests / TDD}
43
+ - **Rationale**: {Reason for requiring Unit Tests / TDD}
44
44
 
45
45
  ---
46
46
 
47
47
  ## 3. Implementation Checklist (Strict TDD)
48
48
 
49
- - [ ] **Task 1: {หัวข้องานที่ 1}**
50
- - [ ] 1.1 `[TDD-Red]`: {เขียน Test เคสล้มเหลว}
51
- - [ ] 1.2 `[TDD-Green]`: {เขียนโค้ดขั้นต่ำเพื่อให้ Test ผ่าน}
52
- - [ ] 1.3 `[TDD-Refactor]`: {Refactor และตรวจให้ 100% Tests Green}
49
+ - [ ] **Task 1: {Task 1 title}**
50
+ - [ ] 1.1 `[TDD-Red]`: {Write failing unit or behavioral test}
51
+ - [ ] 1.2 `[TDD-Green]`: {Write minimal implementation to pass test}
52
+ - [ ] 1.3 `[TDD-Refactor]`: {Refactor and ensure 100% tests green}
53
53
 
54
- - [ ] **Task 2: {หัวข้องานที่ 2}**
54
+ - [ ] **Task 2: {Task 2 title}**
55
55
  - [ ] 2.1 `[TDD-Red]`: ...
56
56
  - [ ] 2.2 `[TDD-Green]`: ...
57
57
  - [ ] 2.3 `[TDD-Refactor]`: ...
@@ -65,11 +65,11 @@
65
65
  - **Automated Test Matrix**: TBD
66
66
  - **Static Contract Verification**: TBD
67
67
  - **Package Smoke Test**: TBD
68
- - **Findings Ledger**: ตรวจสอบ `findings.md` สะอาด 100%
68
+ - **Findings Ledger**: Verify `findings.md` is 100% clean
69
69
 
70
70
  ### 🎯 Axis 2: Spec Fidelity & Behavioral Acceptance Gate
71
- - [ ] **AC-1**: {หลักฐานการผ่านเกณฑ์ข้อที่ 1}
72
- - [ ] **AC-2**: {หลักฐานการผ่านเกณฑ์ข้อที่ 2}
71
+ - [ ] **AC-1**: {Empirical proof for AC-1}
72
+ - [ ] **AC-2**: {Empirical proof for AC-2}
73
73
 
74
74
  ---
75
75