@jakkrichm/create-nexus-devflow 2.0.25 → 2.1.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 (147) hide show
  1. package/README.md +30 -8
  2. package/dist/bin/create-nexus-devflow.d.ts +22 -1
  3. package/dist/bin/create-nexus-devflow.js +658 -11
  4. package/dist/bin/create-nexus-devflow.js.map +1 -1
  5. package/dist/lib/branch-context.d.ts +39 -0
  6. package/dist/lib/branch-context.js +196 -0
  7. package/dist/lib/branch-context.js.map +1 -0
  8. package/dist/lib/code-graph.d.ts +30 -0
  9. package/dist/lib/code-graph.js +209 -0
  10. package/dist/lib/code-graph.js.map +1 -0
  11. package/dist/lib/command-catalog.d.ts +11 -0
  12. package/dist/lib/command-catalog.js +63 -0
  13. package/dist/lib/command-catalog.js.map +1 -0
  14. package/dist/lib/context-slicer.d.ts +31 -0
  15. package/dist/lib/context-slicer.js +234 -0
  16. package/dist/lib/context-slicer.js.map +1 -0
  17. package/dist/lib/current-work.js +97 -49
  18. package/dist/lib/current-work.js.map +1 -1
  19. package/dist/lib/dashboard-page.d.ts +2 -0
  20. package/dist/lib/dashboard-page.js +285 -0
  21. package/dist/lib/dashboard-page.js.map +1 -0
  22. package/dist/lib/dashboard-snapshot.d.ts +62 -0
  23. package/dist/lib/dashboard-snapshot.js +114 -0
  24. package/dist/lib/dashboard-snapshot.js.map +1 -0
  25. package/dist/lib/dashboard.d.ts +2 -0
  26. package/dist/lib/dashboard.js +398 -8
  27. package/dist/lib/dashboard.js.map +1 -1
  28. package/dist/lib/discoveries.d.ts +19 -0
  29. package/dist/lib/discoveries.js +81 -0
  30. package/dist/lib/discoveries.js.map +1 -0
  31. package/dist/lib/doctor.d.ts +26 -0
  32. package/dist/lib/doctor.js +474 -0
  33. package/dist/lib/doctor.js.map +1 -0
  34. package/dist/lib/drift-reconciler.d.ts +38 -0
  35. package/dist/lib/drift-reconciler.js +155 -0
  36. package/dist/lib/drift-reconciler.js.map +1 -0
  37. package/dist/lib/findings.d.ts +26 -2
  38. package/dist/lib/findings.js +165 -1
  39. package/dist/lib/findings.js.map +1 -1
  40. package/dist/lib/gatekeeper.d.ts +20 -0
  41. package/dist/lib/gatekeeper.js +106 -0
  42. package/dist/lib/gatekeeper.js.map +1 -0
  43. package/dist/lib/git-hooks.d.ts +16 -0
  44. package/dist/lib/git-hooks.js +103 -0
  45. package/dist/lib/git-hooks.js.map +1 -0
  46. package/dist/lib/history.d.ts +6 -1
  47. package/dist/lib/history.js +98 -11
  48. package/dist/lib/history.js.map +1 -1
  49. package/dist/lib/ide-extension.d.ts +38 -0
  50. package/dist/lib/ide-extension.js +61 -0
  51. package/dist/lib/ide-extension.js.map +1 -0
  52. package/dist/lib/ideas.d.ts +26 -0
  53. package/dist/lib/ideas.js +179 -0
  54. package/dist/lib/ideas.js.map +1 -0
  55. package/dist/lib/mcp.d.ts +36 -0
  56. package/dist/lib/mcp.js +653 -0
  57. package/dist/lib/mcp.js.map +1 -0
  58. package/dist/lib/status.d.ts +3 -1
  59. package/dist/lib/status.js +60 -6
  60. package/dist/lib/status.js.map +1 -1
  61. package/dist/lib/swarm-orchestrator.d.ts +31 -0
  62. package/dist/lib/swarm-orchestrator.js +134 -0
  63. package/dist/lib/swarm-orchestrator.js.map +1 -0
  64. package/dist/lib/update.js +2 -2
  65. package/dist/lib/update.js.map +1 -1
  66. package/dist/lib/version-check.d.ts +22 -0
  67. package/dist/lib/version-check.js +59 -0
  68. package/dist/lib/version-check.js.map +1 -0
  69. package/dist/lib/webview-studio.d.ts +8 -0
  70. package/dist/lib/webview-studio.js +463 -0
  71. package/dist/lib/webview-studio.js.map +1 -0
  72. package/dist/lib/workflow-state.d.ts +23 -0
  73. package/dist/lib/workflow-state.js +128 -0
  74. package/dist/lib/workflow-state.js.map +1 -0
  75. package/dist/scripts/prepare-template.js +3 -3
  76. package/package.json +1 -1
  77. package/template/{.claude/skills/00-discover → .agents/skills/00-explore}/SKILL.md +10 -10
  78. package/template/.agents/skills/10-define/SKILL.md +4 -4
  79. package/template/.agents/skills/20-spec/SKILL.md +2 -3
  80. package/template/.agents/skills/30-plan/SKILL.md +2 -3
  81. package/template/.agents/skills/40-execute/SKILL.md +2 -2
  82. package/template/.agents/skills/50-verify/SKILL.md +2 -2
  83. package/template/.agents/skills/60-report/SKILL.md +3 -3
  84. package/template/{.claude/skills/70-release → .agents/skills/70-deliver}/SKILL.md +7 -13
  85. package/template/.agents/skills/adopt/SKILL.md +136 -73
  86. package/template/.agents/skills/audit/SKILL.md +275 -0
  87. package/template/.agents/skills/autopilot/SKILL.md +228 -147
  88. package/template/.agents/skills/brainstorm/SKILL.md +3 -3
  89. package/template/.agents/skills/brief/SKILL.md +74 -51
  90. package/template/.agents/skills/check/SKILL.md +96 -76
  91. package/template/.agents/skills/ci/SKILL.md +140 -61
  92. package/template/.agents/skills/complete/SKILL.md +156 -101
  93. package/template/.agents/skills/convert-any-to-md/SKILL.md +2 -2
  94. package/template/.agents/skills/debug/SKILL.md +124 -49
  95. package/template/.agents/skills/devflow/SKILL.md +16 -10
  96. package/template/.agents/skills/discovery/SKILL.md +166 -0
  97. package/template/.agents/skills/doctor/SKILL.md +188 -72
  98. package/template/.agents/skills/feature/SKILL.md +195 -102
  99. package/template/.agents/skills/fix/SKILL.md +41 -90
  100. package/template/.agents/skills/idea/SKILL.md +3 -3
  101. package/template/.agents/skills/implement/SKILL.md +189 -46
  102. package/template/.agents/skills/onboard/SKILL.md +215 -85
  103. package/template/.agents/skills/overview/SKILL.md +51 -85
  104. package/template/.agents/skills/prototype/SKILL.md +82 -27
  105. package/template/.agents/skills/release/SKILL.md +160 -0
  106. package/template/.agents/skills/report-html/SKILL.md +2 -2
  107. package/template/.agents/skills/rollback/SKILL.md +123 -77
  108. package/template/.agents/skills/status/SKILL.md +109 -0
  109. package/template/.agents/skills/test/SKILL.md +2 -2
  110. package/template/.agents/skills/tests/SKILL.md +126 -0
  111. package/template/.agents/skills/try/SKILL.md +77 -65
  112. package/template/{.agents/skills/00-discover → .claude/skills/00-explore}/SKILL.md +9 -9
  113. package/template/.claude/skills/10-define/SKILL.md +2 -2
  114. package/template/.claude/skills/20-spec/SKILL.md +1 -1
  115. package/template/.claude/skills/30-plan/SKILL.md +1 -1
  116. package/template/.claude/skills/60-report/SKILL.md +1 -1
  117. package/template/{.agents/skills/70-release → .claude/skills/70-deliver}/SKILL.md +6 -12
  118. package/template/.claude/skills/adopt/SKILL.md +2 -2
  119. package/template/.claude/skills/audit/SKILL.md +141 -0
  120. package/template/.claude/skills/autopilot/SKILL.md +74 -52
  121. package/template/.claude/skills/brief/SKILL.md +67 -45
  122. package/template/.claude/skills/ci/SKILL.md +1 -1
  123. package/template/.claude/skills/complete/SKILL.md +1 -1
  124. package/template/.claude/skills/debug/SKILL.md +1 -1
  125. package/template/.claude/skills/devflow/SKILL.md +7 -7
  126. package/template/.claude/skills/discovery/SKILL.md +145 -0
  127. package/template/.claude/skills/doctor/SKILL.md +1 -1
  128. package/template/.claude/skills/feature/SKILL.md +67 -18
  129. package/template/.claude/skills/fix/SKILL.md +1 -1
  130. package/template/.claude/skills/idea/SKILL.md +2 -2
  131. package/template/.claude/skills/onboard/SKILL.md +3 -3
  132. package/template/.claude/skills/overview/SKILL.md +39 -88
  133. package/template/.claude/skills/prototype/SKILL.md +1 -1
  134. package/template/.claude/skills/release/SKILL.md +171 -0
  135. package/template/.claude/skills/rollback/SKILL.md +2 -2
  136. package/template/AGENTS.md +5 -5
  137. package/template/devflow/build-plan.md +62 -0
  138. package/template/devflow/context/ai-interaction.md +4 -4
  139. package/template/devflow/context/coding-standards.md +3 -3
  140. package/template/devflow/context/current-stage.md +1 -1
  141. package/template/devflow/context/findings.md +1 -1
  142. package/template/devflow/history/HISTORY.md +2 -2
  143. package/template/devflow/project-plan.md +79 -0
  144. package/template/devflow/reference/mockup.html +476 -0
  145. package/template/devflow/reference/project-overview-template.md +39 -0
  146. package/template/devflow/reference/running-id-contract.md +24 -2
  147. package/template/devflow/reference/studio.html +504 -0
@@ -1,108 +1,120 @@
1
1
  ---
2
2
  name: try
3
- description: "[Devflow] Generate human manual QA review walkthrough guide (where to go, what to click, what to expect)."
3
+ description: "[devflow][B] Generate a human manual try guide for the current or most recently completed Blueprint feature, fix, or rollback. Reads the spec, project commands, and available app context, then tells the user exactly what to start, where to go, what to click or run, what to expect, and what would count as wrong. Read-only. Use when the user runs /try, invokes $try, asks how to test manually, asks where to click, asks how to see the change, or wants a manual review path after /implement, /autopilot, /check, or /complete."
4
4
  ---
5
5
 
6
- # try - Manual QA & Review Walkthrough Guide
6
+ # try - manual review guide
7
7
 
8
8
  Where this sits in the workflow:
9
9
 
10
- ```text
11
- 40-execute or 50-verify or 60-report -> [try] -> human review & verification
12
- (work implemented / verified) (manual (where to go,
13
- steps) what to click)
14
- ```
10
+ /implement or /complete -> [try] -> human review
11
+ (work exists) (manual (where to go,
12
+ path) what to click)
15
13
 
16
- `50-verify` proves behavior from automated QA and test runs. `try` gives the user and testers an actionable, step-by-step manual walkthrough: start this command, open this route, click these controls, expect this result, and watch for these failure signs.
14
+ `/check` proves behavior from the agent side. `/try` gives the user a practical
15
+ manual walkthrough: start this command, open this route, click these controls,
16
+ expect this result, and watch for these failure signs.
17
17
 
18
- It is always **read-only 100%**. It does not edit files, install dependencies, commit, merge, push, or run destructive commands.
18
+ It is always read-only. It does not edit files, install dependencies, commit,
19
+ merge, push, or run destructive commands.
19
20
 
20
21
  ## Input
21
22
 
22
23
  Optional scope:
23
24
 
24
- - **no argument**: use the active run in `devflow/context/current-stage.md` (or the latest completed run under `devflow/runs/`)
25
- - `latest`: use the most recent completed run in `devflow/runs/`
26
- - a run ID or path: e.g. `try RUN-002-add-onboard-adopt-doctor-skills`
27
- - a specific route, endpoint, or CLI command: focus the walkthrough on that surface
25
+ - no argument: use the active feature, fix, or rollback in
26
+ `devflow/context/current-feature.md`
27
+ - `latest`: use the most recent archive under `devflow/history/features/`,
28
+ `devflow/history/fixes/`, or `devflow/history/rollbacks/`
29
+ - a step name or number: focus the guide on that current-feature step
30
+ - a path, route, or command: include it as the main thing to try
28
31
 
29
- If there is no active run and no run history, ask what change or feature the user wants to test manually.
32
+ If there is no active feature and no useful archive, ask what change the user
33
+ wants to try instead of guessing.
30
34
 
31
- ## Step 1 - Find The Work To Explain
35
+ ## Step 1 - find the work to explain
32
36
 
33
37
  Read:
34
38
 
35
- - `AGENTS.md` (Commands section)
36
- - `devflow/context/current-stage.md`
39
+ - `AGENTS.md`
40
+ - `devflow/context/current-feature.md`
37
41
  - `devflow/context/project-overview.md`
38
42
  - `devflow/context/coding-standards.md`
39
- - Active run artifacts: `20-spec.md`, `30-plan.md`, `40-execute.md`, `50-verify.md` (or archived run artifacts)
40
- - Current git branch and status
43
+ - `devflow/build-plan.md`
44
+ - latest files under `devflow/history/features/`,
45
+ `devflow/history/fixes/`, and `devflow/history/rollbacks/`, if the current
46
+ feature is reset
47
+ - git branch and working tree status
41
48
 
42
- Do not dump the full spec. Extract only the concrete routes, screens, CLI commands, API endpoints, test data, and expected outcomes that a human needs to verify the feature.
49
+ Prefer the active spec. If `current-feature.md` is the reset stub, use the most
50
+ recent archived feature, fix, or rollback by filename or modification time and
51
+ say that is what you used.
43
52
 
44
- ## Step 2 - Identify How To Run The App
53
+ Do not dump the spec. Pull out the routes, commands, UI surfaces, CLI commands,
54
+ API endpoints, data states, and done-whens that matter for a human trying it.
55
+ For a rollback, lead with the path that proves the removed behavior is gone, then
56
+ include one unaffected regression path from the rollback spec.
45
57
 
46
- Check the Commands section in `AGENTS.md`. Adapt to the project type:
58
+ ## Step 2 - identify how to run the app
47
59
 
48
- - **Web app**: dev server command (e.g. `npm run dev`), local URL (e.g. `http://localhost:3000`), and specific route/screen.
49
- - **Server / API**: start command, base URL, endpoint, HTTP method, payload, and expected response shape.
50
- - **CLI**: exact CLI command, flags, arguments, and expected terminal output.
51
- - **Library / Module**: sample usage snippet, REPL call, or interactive test command.
52
- - **Fullstack / Microservices**: minimal combined startup commands (e.g. backend + frontend).
60
+ Use the Commands section in `AGENTS.md`. Match the project type:
53
61
 
54
- If a startup command is missing or unclear in `AGENTS.md`, report that as a configuration gap rather than guessing.
62
+ - **Web app** - dev server command, URL, and the route or screen to open.
63
+ - **Server/API** - server command, base URL, endpoint, method, and expected
64
+ response shape.
65
+ - **CLI** - exact command(s), arguments, and expected output.
66
+ - **Library** - example command, test fixture, REPL snippet, or sample call.
67
+ - **Hybrid app** - list the smallest set of commands needed, such as backend plus
68
+ web dev server.
55
69
 
56
- ## Step 3 - Produce The Manual Walkthrough Guide
70
+ If the app may already be running, say how to reuse it. If a command is missing
71
+ from `AGENTS.md`, report that as a gap rather than inventing certainty.
57
72
 
58
- Format the guide with these 5 standard sections:
73
+ ## Step 3 - write the manual guide
59
74
 
60
- 1. **1. Start** - exact command(s) to start the system and where to run them.
61
- 2. **2. Open** - URL(s), screens, tabs, API endpoints, or terminal locations.
62
- 3. **3. Do** - specific clicks, form inputs, toggles, selections, or arguments.
63
- 4. **4. Expect** - expected visible UI change, response payload, state change, output, or absence of errors.
64
- 5. **5. Watch For** - common failure symptoms, console errors, network 4xx/5xx errors, stale state, layout breakage, or safety warnings.
75
+ Produce a short guide with these sections:
65
76
 
66
- ### Example Walkthrough Style:
77
+ 1. **Start** - commands to run and where to run them.
78
+ 2. **Open** - URLs, screens, tabs, API endpoints, or CLI commands.
79
+ 3. **Do** - clicks, inputs, selections, or command arguments.
80
+ 4. **Expect** - visible result, output, response, state change, file, or lack of
81
+ error.
82
+ 5. **Watch For** - common wrong outcomes, console or network errors, stale data,
83
+ missing fields, bad empty states, layout issues, or safety warnings.
67
84
 
68
- ```markdown
69
- ### 1. Start
70
- Run `npm run dev` in the project root.
85
+ Keep it concrete. Prefer:
71
86
 
72
- ### 2. Open
73
- Navigate to `http://localhost:3000/dashboard/reports`.
87
+ Open http://127.0.0.1:7788/api/snapshot
88
+ Expect a JSON object with `generated_at`, `services`, `projects`, and
89
+ `conflicts`.
74
90
 
75
- ### 3. Do
76
- 1. Click the **"Export Report"** button in the top right.
77
- 2. Select **"Format: HTML"** from the dropdown.
78
- 3. Click **"Download"**.
91
+ Avoid:
79
92
 
80
- ### 4. Expect
81
- - A new file `report.html` is downloaded.
82
- - The UI displays a green success toast: *"Report exported successfully"*.
83
- - The downloaded HTML file opens in the browser with full styling and charts.
93
+ Check that the snapshot works.
84
94
 
85
- ### 5. Watch For
86
- - Spinner hanging indefinitely without downloading.
87
- - Console error related to `Blob` or `URL.createObjectURL`.
88
- - Broken styling or unrendered Mermaid charts in the exported HTML.
89
- ```
95
+ ## Step 4 - include confidence and gaps
90
96
 
91
- ## Step 4 - Include Confidence, Best Signal & Gaps
97
+ End with:
92
98
 
93
- Conclude with:
99
+ - **Best signal** - the one thing the user should try first.
100
+ - **Optional deeper checks** - only if useful.
101
+ - **Gaps** - anything the guide cannot know from the docs, such as missing route
102
+ names, seed data, credentials, or external services.
94
103
 
95
- - **Best Signal**: the single most critical action the user should try first to confirm functionality.
96
- - **Edge Cases & Error Flows**: optional secondary checks (e.g. invalid input, empty state, network failure).
97
- - **Gaps & Assumptions**: anything the guide cannot know for certain (e.g. seed credentials, third-party API keys, required database fixtures).
104
+ If the feature is not user-visible, say so and provide the closest manual signal,
105
+ such as an API response, CLI output, log line, or unit test command.
98
106
 
99
107
  ## Rules
100
108
 
101
- - **Strictly Read-Only**: Never edit code, commit, push, install packages, or mutate repository state.
102
- - **Do Not Run Automatically**: Do not launch the server or run commands unless the user explicitly instructs you to do so in the chat.
103
- - **Be Concrete & Specific**: Provide exact URLs, button labels, and payloads.
104
- - **Acknowledge Uncertainty**: If a route or behavior is not specified in the spec, state it clearly as an assumption.
109
+ - Read-only only. Do not edit, commit, merge, push, install, or delete.
110
+ - Do not run the app unless the user explicitly asks you to try it for them.
111
+ - Do not pretend a path is known when the spec does not say it. Give the best
112
+ likely path and label uncertainty.
113
+ - Keep the guide short enough to follow while the app is open.
114
+ - Match the project's commands from `AGENTS.md`.
105
115
 
106
- ## Output Formatting
116
+ ## Formatting
107
117
 
108
- Follow the project conventions in `devflow/context/ai-interaction.md`: concise, scannable markdown with numbered steps and clear bold headers.
118
+ Format the output to match the project's conventions in
119
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with numbered
120
+ steps for the manual path and short bullets for warnings.
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: 00-discover
3
- description: "[Devflow] Discover stage in DevFlow 2.0 - explore a request, route supporting inquiry, and decide whether delivery work should begin without allocating a running ID."
2
+ name: 00-explore
3
+ description: "[Devflow] Explore stage in DevFlow 2.0 - explore a request, route supporting inquiry, and decide whether delivery work should begin without allocating a running ID."
4
4
  argument-hint: "{title, request, or discovery-id}"
5
5
  ---
6
6
 
7
- # Phase 00: Discover
7
+ # Phase 00: Explore
8
8
 
9
9
  $ARGUMENTS
10
10
 
@@ -13,15 +13,15 @@ Explore a request before delivery commitment. Create or resume a Discovery ID, c
13
13
  ## Usage
14
14
 
15
15
  ```text
16
- 00-discover {title or request}
17
- 00-discover IDEA-xxx
18
- 00-discover {discovery-id}
16
+ 00-explore {title or request}
17
+ 00-explore IDEA-xxx
18
+ 00-explore {discovery-id}
19
19
  ```
20
20
 
21
21
  Use this when:
22
22
 
23
23
  - a new request needs discussion before the team commits to delivery
24
- - exploring a pending idea from `devflow/ideas.md` (`00-discover IDEA-xxx`)
24
+ - exploring a pending idea from `devflow/ideas.md` (`00-explore IDEA-xxx`)
25
25
  - the best route may be `Brainstorm`, `PRD`, `Research`, or `Debug`
26
26
  - supporting findings need to be synthesized into a go/no-go decision
27
27
 
@@ -30,7 +30,7 @@ Use this when:
30
30
  Write the primary discovery artifact to:
31
31
 
32
32
  ```text
33
- devflow/discoveries/{DISCOVERY_ID}-{slug}/00-discover.md
33
+ devflow/discoveries/{DISCOVERY_ID}-{slug}/00-explore.md
34
34
  ```
35
35
 
36
36
  A Discovery ID uses a separate namespace such as `DISC-YYYYMMDD-NNN`. It is not a Running ID and must not reserve a numeric delivery run.
@@ -74,7 +74,7 @@ Set one decision:
74
74
  - `Defer`: the idea remains relevant but timing, evidence, or ownership is not ready
75
75
  - `Reject`: the idea should not proceed under the current framing
76
76
 
77
- ### 3. Write `00-discover.md`
77
+ ### 3. Write `00-explore.md`
78
78
 
79
79
  Record selected routes, returned findings, open questions, decision, and rationale.
80
80
 
@@ -37,13 +37,13 @@ using:
37
37
  1. Inspect `devflow/context/current-stage.md`, `devflow/context/current-feature.md`, and `devflow/context/current-run/`.
38
38
  2. If an active uncompleted run exists:
39
39
  - **HALT and reject opening a new define stage**.
40
- - Warn the user to complete or close the active run with `/complete` or `70-release` first.
40
+ - Warn the user to complete or close the active run with `/complete` or `70-deliver` first.
41
41
 
42
42
  ### 2. Validate The Discovery Gate
43
43
  Require:
44
44
  - `Decision: Proceed`
45
45
  - `Approval Status: Approved`
46
- - A resolvable Discovery ID and `00-discover.md`
46
+ - A resolvable Discovery ID and `00-explore.md`
47
47
 
48
48
  ### 3. Allocate Sequential ID
49
49
  - Inspect `devflow/history/HISTORY.md` and allocate sequential ID without prefix (e.g. `022-{slug}`).
@@ -69,7 +69,7 @@ Run specification as a contract-hardening loop, not as a prose expansion of the
69
69
  Read:
70
70
 
71
71
  - `10-define.md`
72
- - the shared `00-discover.md` referenced by `source_discovery` when the original framing still matters
72
+ - the shared `00-explore.md` referenced by `source_discovery` when the original framing still matters
73
73
  - research notes if they impose real constraints
74
74
 
75
75
  ### 2. Write The Specification
@@ -55,7 +55,7 @@ Run planning as an evidence loop, not as a one-shot outline.
55
55
  Read:
56
56
 
57
57
  - `devflow/runs/{ID}-*20-spec.md`
58
- - `10-define.md` and the shared `00-discover.md` referenced by `source_discovery` when they help clarify intent
58
+ - `10-define.md` and the shared `00-explore.md` referenced by `source_discovery` when they help clarify intent
59
59
 
60
60
  ### 2. Assess Complexity
61
61
 
@@ -53,5 +53,5 @@ Structure the report in **Thai (`th`)**:
53
53
 
54
54
  ## Next Workflow Recommendation
55
55
 
56
- - **Primary**: `70-release {ID}`
56
+ - **Primary**: `70-deliver {ID}`
57
57
  - **Optional Standalone HTML**: `/report:html`
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: 70-release
3
- description: "[Devflow] Release stage in DevFlow 2.0 - package verified work for delivery, archive run to categorized history, git merge, PR, or deployment."
2
+ name: 70-deliver
3
+ description: "[Devflow] Deliver stage in DevFlow 2.0 - package verified work for delivery, archive run to categorized history, git merge, PR, or deployment."
4
4
  argument-hint: "{running-id or workspace path}"
5
5
  ---
6
6
 
7
- # Phase 70: Release
7
+ # Phase 70: Deliver
8
8
 
9
9
  $ARGUMENTS
10
10
 
@@ -13,7 +13,7 @@ Package approved work for delivery after the report stage has captured the final
13
13
  ## Usage
14
14
 
15
15
  ```text
16
- 70-release {id or workspace path}
16
+ 70-deliver {id or workspace path}
17
17
  ```
18
18
 
19
19
  ## Markdown-First Contract
@@ -21,20 +21,14 @@ Package approved work for delivery after the report stage has captured the final
21
21
  Write the primary stage artifact to:
22
22
 
23
23
  ```text
24
- devflow/context/current-run/70-release.md
25
- ```
26
-
27
- using:
28
-
29
- ```text
30
- .agent/resources/schemas/release.template.md
24
+ devflow/context/current-run/70-deliver.md
31
25
  ```
32
26
 
33
27
  ## Process & Quality Gates
34
28
 
35
29
  ### 0. Step 0 Safety Pass & Findings Ledger Gate
36
30
 
37
- Before packaging, merging, or releasing:
31
+ Before packaging, merging, or delivering:
38
32
 
39
33
  1. **Findings Ledger Blockers**:
40
34
  - Inspect `devflow/context/findings.md`.
@@ -8,7 +8,7 @@ description: "[Devflow] Survey existing brownfield codebase and bootstrap DevFlo
8
8
  Where this sits in the workflow:
9
9
 
10
10
  ```text
11
- existing codebase -> [adopt] -> project-overview + coding-standards -> 00-discover or 10-define
11
+ existing codebase -> [adopt] -> project-overview + coding-standards -> 00-explore or 10-define
12
12
  (already has code) (survey + (seeded from the real code; (first feature / refactoring
13
13
  interview) shipped architecture documented) delivery lifecycle)
14
14
  ```
@@ -91,5 +91,5 @@ Present the adoption summary for review:
91
91
  - Inferred conventions and coding standards
92
92
  - Available verified commands in `AGENTS.md`
93
93
  - Recommended next step:
94
- - Run `00-discover` (or `00-discover`, `$00-discover`) to explore the next major initiative or feature
94
+ - Run `00-explore` (or `00-explore`, `$00-explore`) to explore the next major initiative or feature
95
95
  - Run `10-define` (or `10-define`, `$10-define`) to immediately scope a delivery run for known roadmap items
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: audit
3
+ description: "[Devflow] Code, quality, security, performance, and test audit skill with durable ledger tracking in devflow/context/findings.md."
4
+ argument-hint: "{scope/path or lens: quality | security | performance | tests | full}"
5
+ ---
6
+
7
+ # audit - Dedicated Multi-Lens Audit & Quality Ledger
8
+
9
+ Where this sits in the workflow:
10
+
11
+ ```text
12
+ git diff / codebase / path -> [audit] -> devflow/context/findings.md -> check-gate / /complete
13
+ (target scope & lenses) (analyze & (durable findings ledger) (quality gates)
14
+ record)
15
+ ```
16
+
17
+ `audit` is the dedicated quality, security, performance, and test review engine for Nexus-DevFlow. It inspects changed files in the active branch, a targeted path, or the full repository, evaluates them through specialized review lenses, and records findings with durable IDs into `devflow/context/findings.md`.
18
+
19
+ It is **strictly non-destructive**: it inspects and records findings in `findings.md`, but never modifies source code directly. Remediation is handled via `/fix <ID>` or `/implement`.
20
+
21
+ ## Usage & Invocations
22
+
23
+ ```text
24
+ /audit # Audit active branch changes across all lenses (Default)
25
+ /audit security # Focused Security audit on active changes
26
+ /audit quality # Focused Quality, dead code & code smells audit
27
+ /audit performance # Focused Performance & efficiency audit
28
+ /audit tests # Focused Test quality & coverage gap audit
29
+ /audit full # Full repository audit across all lenses
30
+ /audit <path> # Targeted audit on a specific file or directory
31
+ $audit # Codex CLI invocation
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Process
37
+
38
+ ### Step 1 - Determine Scope & Lens
39
+
40
+ 1. **Scope Resolution**:
41
+ - **Branch / Active Run (Default)**: Inspect `git diff main...HEAD` or files touched in `devflow/context/current-feature.md`.
42
+ - **Targeted Path**: If a directory/file path is passed (e.g. `src/auth/`), scope analysis to that path.
43
+ - **Full Project**: If `full` is passed, scope analysis across the entire project repository.
44
+ 2. **Lens Selection**:
45
+ - If a lens name is provided (`security`, `quality`, `performance`, `tests`), focus primarily on that domain.
46
+ - If none is provided, evaluate across all four lenses.
47
+
48
+ ---
49
+
50
+ ### Step 2 - Multi-Lens Inspection
51
+
52
+ Evaluate code against standard criteria:
53
+
54
+ #### 1. 🛡️ Security Lens
55
+ - **Secrets & Credentials**: Look for hardcoded API keys, JWT secrets, passwords, or tokens.
56
+ - **Injection Risks**: Unsanitized SQL, shell command execution, template injection, path traversal.
57
+ - **Access Control & Auth**: Unprotected API routes, missing permission checks, insecure direct object references.
58
+ - **Data Protection & Sanitization**: Missing XSS sanitization, unsafe HTML rendering, sensitive data leaks in logs.
59
+
60
+ #### 2. 💎 Quality & Maintainability Lens
61
+ - **Code Smells & Complexity**: Overly complex functions, deep nesting, high cyclomatic complexity.
62
+ - **Duplication & Dead Code**: Repeated logic that should be abstracted, unused variables/imports/functions.
63
+ - **Contract & Type Safety**: Unsafe `any` casts, missing error handling, unhandled Promise rejections.
64
+ - **Standards & Conventions**: Compliance with `devflow/context/coding-standards.md`.
65
+
66
+ #### 3. ⚡ Performance Lens
67
+ - **Database & Query Efficiency**: N+1 queries, unindexed filter columns, unbounded queries without pagination.
68
+ - **Resource Management**: Memory leaks, unclosed streams/handles, blocking synchronous operations in async loops.
69
+ - **Bundle & Asset Footprint**: Unnecessary heavy dependencies, oversized client-side bundles.
70
+
71
+ #### 4. 🧪 Test Quality Lens
72
+ - **Coverage Gaps**: Critical business logic or branch conditions lacking unit or integration tests.
73
+ - **Negative & Error Cases**: Testing only the happy path without asserting error handling and failure boundaries.
74
+ - **Flakiness & Assertions**: Tests with race conditions, missing awaits, or non-deterministic assertions.
75
+
76
+ ---
77
+
78
+ ### Step 3 - Record Findings in `devflow/context/findings.md`
79
+
80
+ For every confirmed issue found:
81
+
82
+ 1. Determine **Severity**:
83
+ - `P0` (Critical Blocker): Security vulnerabilities, data corruption bugs, crash-level defects.
84
+ - `P1` (High Blocker): Major regressions, broken critical flows, unhandled failure paths.
85
+ - `P2` (Medium): Code smells, missing non-critical tests, performance bottlenecks.
86
+ - `P3` (Low / Polish): Minor naming inconsistencies, style polish, documentation gaps.
87
+
88
+ 2. Determine **Durable ID**:
89
+ - Check existing IDs in `devflow/context/findings.md` and use the next sequential ID:
90
+ - `SEC-001`, `SEC-002` (Security)
91
+ - `QUAL-001`, `QUAL-002` (Quality)
92
+ - `PERF-001`, `PERF-002` (Performance)
93
+ - `TEST-001`, `TEST-002` (Tests)
94
+ - Or universal `FIND-001`, `FIND-002`
95
+
96
+ 3. Append to `devflow/context/findings.md`:
97
+ ```markdown
98
+ ### SEC-001 [P0] open - Hardcoded Secret Key in config.ts
99
+ - **Location**: `src/config.ts:24`
100
+ - **Impact**: API secret key exposed in client bundle
101
+ - **Remediation**: Move to environment variable `process.env.API_SECRET`
102
+ ```
103
+
104
+ ---
105
+
106
+ ### Step 4 - Output Audit Summary & Recommendations
107
+
108
+ Present a clean markdown report in **Thai (`th`)**:
109
+
110
+ ```markdown
111
+ ### 🛡️ ผลการตรวจสอบความปลอดภัยและคุณภาพโค้ด (Audit Summary)
112
+
113
+ - **ขอบเขตการตรวจสอบ (Scope)**: `{Branch Diff | Path | Full Project}`
114
+ - **เลนส์การตรวจ (Lenses)**: `{Quality, Security, Performance, Tests}`
115
+ - **ข้อบกพร่องที่พบ (Findings Summary)**:
116
+ - 🔴 **P0 (Critical)**: {count}
117
+ - 🟠 **P1 (High)**: {count}
118
+ - 🟡 **P2 (Medium)**: {count}
119
+ - 🔵 **P3 (Low)**: {count}
120
+
121
+ #### รายการข้อบกพร่องใหม่ที่บันทึกใน Findings Ledger:
122
+ 1. `SEC-001 [P0] open - Hardcoded Secret Key in config.ts` (`src/config.ts:24`)
123
+ 2. `PERF-001 [P2] open - Unbounded query in user list` (`src/users.ts:58`)
124
+
125
+ ---
126
+ 👉 **คำแนะนำถัดไป (Next Actions)**:
127
+ - หากมีข้อบกพร่องระดับ P0/P1: เรียก `/fix SEC-001` เพื่อเริ่มการแก้ไขที่ติดตามได้
128
+ - ตรวจสอบสถานะ Blockers: `nexus-devflow findings --blockers`
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Release Gatekeeper Rule
134
+
135
+ > [!IMPORTANT]
136
+ > Any `P0` or `P1` finding in `open` or `fixed` status in `devflow/context/findings.md` **unconditionally blocks**:
137
+ > - `nexus-devflow check-gate` (Exit code 1)
138
+ > - `/complete` (Fast-Track delivery close)
139
+ > - `70-deliver` (Deep-Track release packaging)
140
+ >
141
+ > Findings must be repaired via `/fix` and verified with `/check` to reach `closed`, `accepted`, or `invalid` status.