@jakkrichm/create-nexus-devflow 2.1.0 → 2.2.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 (56) hide show
  1. package/dist/bin/create-nexus-devflow.js +28 -4
  2. package/dist/bin/create-nexus-devflow.js.map +1 -1
  3. package/dist/lib/project-metadata.d.ts +1 -1
  4. package/dist/lib/project-metadata.js +3 -2
  5. package/dist/lib/project-metadata.js.map +1 -1
  6. package/dist/lib/update.js +7 -3
  7. package/dist/lib/update.js.map +1 -1
  8. package/package.json +1 -1
  9. package/template/.agents/skills/adopt/SKILL.md +58 -5
  10. package/template/.agents/skills/doctor/SKILL.md +23 -16
  11. package/template/.agents/skills/implement/SKILL.md +2 -2
  12. package/template/.agents/skills/onboard/SKILL.md +18 -17
  13. package/template/.agents/skills/rollback/SKILL.md +1 -1
  14. package/template/.claude/skills/00-explore/SKILL.md +2 -2
  15. package/template/.claude/skills/10-define/SKILL.md +2 -2
  16. package/template/.claude/skills/20-spec/SKILL.md +1 -2
  17. package/template/.claude/skills/30-plan/SKILL.md +1 -2
  18. package/template/.claude/skills/40-execute/SKILL.md +2 -2
  19. package/template/.claude/skills/50-verify/SKILL.md +2 -2
  20. package/template/.claude/skills/60-report/SKILL.md +2 -2
  21. package/template/.claude/skills/70-deliver/SKILL.md +2 -2
  22. package/template/.claude/skills/adopt/SKILL.md +191 -75
  23. package/template/.claude/skills/audit/SKILL.md +267 -133
  24. package/template/.claude/skills/autopilot/SKILL.md +226 -167
  25. package/template/.claude/skills/brainstorm/SKILL.md +62 -0
  26. package/template/.claude/skills/brief/SKILL.md +93 -92
  27. package/template/.claude/skills/check/SKILL.md +96 -76
  28. package/template/.claude/skills/ci/SKILL.md +140 -61
  29. package/template/.claude/skills/complete/SKILL.md +156 -101
  30. package/template/.claude/skills/convert-any-to-md/SKILL.md +2 -2
  31. package/template/.claude/skills/convert-any-to-md/references/setup.md +29 -0
  32. package/template/.claude/skills/convert-any-to-md/scripts/convert_any_to_md.py +487 -0
  33. package/template/.claude/skills/convert-any-to-md/scripts/requirements.txt +3 -0
  34. package/template/.claude/skills/debug/SKILL.md +124 -49
  35. package/template/.claude/skills/devflow/SKILL.md +9 -3
  36. package/template/.claude/skills/discovery/SKILL.md +150 -129
  37. package/template/.claude/skills/doctor/SKILL.md +195 -72
  38. package/template/.claude/skills/feature/SKILL.md +195 -151
  39. package/template/.claude/skills/fix/SKILL.md +41 -90
  40. package/template/.claude/skills/idea/SKILL.md +2 -2
  41. package/template/.claude/skills/implement/SKILL.md +189 -46
  42. package/template/.claude/skills/onboard/SKILL.md +216 -85
  43. package/template/.claude/skills/overview/SKILL.md +44 -29
  44. package/template/.claude/skills/prototype/SKILL.md +82 -27
  45. package/template/.claude/skills/release/SKILL.md +119 -130
  46. package/template/.claude/skills/report-html/SKILL.md +2 -2
  47. package/template/.claude/skills/rollback/SKILL.md +123 -77
  48. package/template/.claude/skills/status/SKILL.md +109 -0
  49. package/template/.claude/skills/test/SKILL.md +2 -2
  50. package/template/.claude/skills/tests/SKILL.md +126 -0
  51. package/template/.claude/skills/try/SKILL.md +77 -65
  52. package/template/AGENTS.md +2 -1
  53. package/template/devflow/build-plan.md +8 -0
  54. package/template/devflow/history/features/README.md +5 -0
  55. package/template/devflow/history/fixes/README.md +5 -0
  56. package/template/devflow/history/rollbacks/README.md +5 -0
@@ -1,197 +1,256 @@
1
1
  ---
2
2
  name: autopilot
3
- description: "[Devflow] Optional explicit mode for one bounded Fast-Track or Deep-Track delivery pass with checkpoint commits and review packet."
3
+ description: "[devflow][B] Optional explicit Blueprint mode for one bounded spec/build/check/audit pass. It can pick or resume the current feature, write the spec when needed, create or reuse the branch, implement small steps, run build/tests/checks, create checkpoint commits after passing steps, audit changed code, repair confirmed high-severity findings, and stop with a review packet. It never completes, merges, pushes, deploys, publishes, sends, or performs destructive actions without explicit approval. Use only when the user explicitly runs /autopilot, invokes $autopilot, or directly asks for Autopilot."
4
4
  ---
5
5
 
6
- # autopilot - Autonomous Bounded DevFlow Loop
6
+ # autopilot - optional Blueprint loop
7
7
 
8
8
  Where this sits in the workflow:
9
9
 
10
- ```text
11
- devflow -> [autopilot] -> review packet -> /complete (fast) / 70-deliver (deep)
12
- (where (fast or deep (human review, (package, PR,
13
- are we?) track loop) walkthrough) merge with approval)
14
- ```
10
+ /status -> [autopilot] -> review packet -> /complete
11
+ (where (spec, build, (human review, (log, commit,
12
+ are we?) check, audit) fixes if needed) merge with approval)
15
13
 
16
- Autopilot is an explicit opt-in execution skill for Nexus-DevFlow 2.0. It runs one bounded loop without requiring human confirmation between every sub-step, in either track:
14
+ Autopilot is an explicit opt-in path. It uses the same Blueprint files and the
15
+ same quality gates, but it does not stop after every normal review point. A
16
+ single user request is permission to run one bounded loop until the feature is
17
+ ready for review, blocked, or unsafe to continue.
17
18
 
18
- - Fast-Track: `feature` / `fix` -> `implement` -> `check`.
19
- - Deep-Track: `20-spec` -> `30-plan` -> `40-execute` -> `50-verify` -> `60-report`.
19
+ It does **not** replace the normal workflow. `/feature`, `/implement`, `/check`,
20
+ and `/complete` remain the conservative default.
20
21
 
21
- It does **not** replace the normal step-by-step workflow. Mainline commands (`feature`, `fix`, `implement`, `check`, `complete`, `20-spec`, `30-plan`, `40-execute`, `50-verify`, `60-report`, `70-deliver`) remain the conservative default.
22
+ Do not suggest Autopilot as the default next action. Use it only when the user
23
+ explicitly asks for it.
22
24
 
23
- Do not suggest Autopilot as the default next action. Use it only when the user explicitly asks for it.
24
-
25
- The explicit Autopilot request is permission to create checkpoint commits on the feature/fix branch after passing implementation steps. It is **not** permission to merge into `main`, push to remote, deploy, publish, delete data, or run destructive actions.
25
+ The explicit Autopilot request is permission to create checkpoint commits on the
26
+ feature or fix branch after passing implementation steps. It is not permission to
27
+ merge, push, deploy, publish, send, delete data, or run destructive actions.
26
28
 
27
29
  ## Input
28
30
 
29
31
  Common forms:
30
32
 
31
- - **No argument**: resume the active run in `devflow/context/current-stage.md`, or target the next planned run/feature in `devflow/context/project-overview.md`.
32
- - **`fast`**: force Fast-Track mode. Example: `autopilot fast "add auth header"`
33
- - **`deep`**: force Deep-Track mode. Example: `autopilot deep "data migration"`
34
- - **Running ID or feature name**: target that run, e.g. `autopilot RUN-004` or `autopilot "add user authentication"` (mode auto-selected from context).
35
- - **`fix "<issue>"`**: write and execute an ad-hoc fast-mode fix run.
36
- - **`resume`**: continue the current active run on its existing branch.
33
+ - No argument: resume the current feature if one exists, otherwise target the next
34
+ unchecked build-plan item.
35
+ - A number or name: target that build-plan feature, for example `/autopilot 3` or
36
+ `$autopilot "directory listing"`.
37
+ - `fix "<issue>"`: write and build an ad-hoc fix spec.
38
+ - `resume`: continue the current feature on its existing branch.
37
39
 
38
- If the requested target conflicts with a run already in progress, stop and ask which one should win. Do not overwrite active stage artifacts silently.
40
+ If the requested target conflicts with a feature already in progress, stop and
41
+ ask which one should win. Do not overwrite `devflow/context/current-feature.md`
42
+ silently.
39
43
 
40
- > [!IMPORTANT]
41
- > Rollback is intentionally excluded from Autopilot. If the request is a rollback or the stage is marked Rollback, stop and direct the user to `rollback` and reviewed `40-execute`. Reversing completed work requires explicit dependency and human review gates.
44
+ Rollback is intentionally excluded from Autopilot. If the request is a rollback
45
+ or `current-feature.md` is marked `Type: Rollback`, stop and direct the user to
46
+ the reviewed `/implement` path. Reversing completed work requires the explicit
47
+ dependency and conflict gates in `/rollback` and `/implement`.
42
48
 
43
- ## Step 1 - Preflight & Safety Check
49
+ ## Step 1 - preflight like /status
44
50
 
45
- Read the project state:
51
+ Read the same state `/status` reads:
46
52
 
47
- - `AGENTS.md` & `CLAUDE.md`
53
+ - `AGENTS.md`
54
+ - `devflow/project-plan.md`
55
+ - `devflow/build-plan.md`
48
56
  - `devflow/context/project-overview.md`
49
- - `devflow/context/current-stage.md`
50
57
  - `devflow/context/current-feature.md`
51
- - `devflow/context/current-run/` artifacts
58
+ - `devflow/context/findings.md`
52
59
  - `devflow/context/coding-standards.md`
53
60
  - `devflow/context/ai-interaction.md`
54
- - `devflow/context/findings.md`
55
61
  - git branch, status, and recent log
56
62
 
57
- Track mode selection:
58
-
59
- 1. Use explicit `fast` or `deep` if provided.
60
- 2. If `devflow/context/current-feature.md` is active and `current-run/` has no deep stage files, default to **fast**.
61
- 3. If `devflow/context/current-run/` has deep stage files (`10-define.md`, `20-spec.md`, `30-plan.md`, etc.), default to **deep**.
62
- 4. If both tracks are active, stop and ask which track should win.
63
+ Then decide whether it is safe to run.
63
64
 
64
65
  Stop before changing files when:
65
66
 
66
- 1. The repo is not a git repository.
67
- 2. The working tree is dirty with uncommitted changes unrelated to this run.
68
- 3. `current-stage.md` has an active run and the user requested a different target without resolving conflict.
69
- 4. The task requires architectural, financial, auth, billing, or destructive decisions not documented in the context.
70
-
71
- ## Step 2 - Choose or Write Specification
72
-
73
- ### Fast-Track
74
-
75
- 1. If `devflow/context/current-feature.md` already exists and is active, resume it.
76
- 2. If no spec exists:
77
- - Write or refresh the spec in `devflow/context/current-feature.md`.
78
- - Lock scope, acceptance criteria, and implementation checklist.
79
- - Add feasibility checks and test hooks.
80
- 3. Critique and red-team the spec (edge cases, unhappy paths, testable criteria), then apply fixes.
81
-
82
- ### Deep-Track
83
-
84
- 1. If `devflow/context/current-run/20-spec.md` already exists, resume it.
85
- 2. If no spec exists:
86
- - Ensure `10-define.md` exists with locked scope and allocated Running ID.
87
- - Write `20-spec.md` following the DevFlow specification schema.
88
- - Critique and red-team the spec (edge cases, unhappy paths, testable criteria), then apply fixes.
89
-
90
- ## Step 3 - Branch Setup & Implementation Plan (`30-plan`)
91
-
92
- 1. **Branch Management**:
93
- - Feature: `feature/{slug}-{running-id}`
94
- - Fix: `fix/{slug}-{running-id}`
95
- - Switch to or create the working branch. Never run Autopilot directly on `main` or `master`.
96
- 2. **Planning**:
97
- - **Fast-Track**: maintain the implementation and verification checklist sections in `devflow/context/current-feature.md`.
98
- - **Deep-Track**: write `devflow/context/current-run/30-plan.md` and seed `checklists/implementation-checklist.md` and `checklists/verification-checklist.md`.
99
-
100
- ## Step 4 - Implement in Small Increments (`40-execute`)
101
-
102
- Work through the implementation checklist in order. Each step must remain reviewable.
103
-
104
- For every subtask:
105
-
106
- 1. Implement only that scoped unit.
107
- 2. Run relevant verification (unit tests, typecheck, lint, build).
108
- 3. If UI is involved, inspect behavior, verify console errors and network calls.
109
- 4. Self-review diff against `coding-standards.md`.
110
- 5. Fix issues and rerun failed checks.
111
- 6. Mark the task checked `[x]`.
112
- 7. **Create a Checkpoint Commit** on the feature/fix branch for the passing step:
113
- ```bash
114
- # Fast-Track
115
- git add <modified-files> devflow/context/current-feature.md
116
- git commit -m "feat({running-id}): checkpoint <concise step description>"
117
-
118
- # Deep-Track
119
- git add <modified-files> devflow/context/current-run/{running-id}-{slug}/checklists/implementation-checklist.md
120
- git commit -m "feat({running-id}): checkpoint <concise step description>"
121
- ```
122
- 8. **Fast-Track**: write implementation status to `devflow/context/current-feature.md`.
123
- 9. **Deep-Track**: write `devflow/context/current-run/{running-id}-{slug}40-execute.md`.
124
-
125
- ## Step 5 - Senior QA Verification (`50-verify`)
126
-
127
- 1. Execute full project verification commands:
128
- - Framework integrity (`npm run check` or equivalent)
129
- - Static contracts (`npm run check:static` when applicable)
130
- - Project test suite (Unit tests, integration tests)
131
- - Build / Package smoke tests
132
- 2. Update verification evidence with concrete evidence in the active track artifact:
133
- - **Fast-Track**: `devflow/context/current-feature.md`
134
- - **Deep-Track**: `checklists/verification-checklist.md`
135
- 3. **Deep-Track**: write `devflow/context/current-run/{running-id}-{slug}50-verify.md` with QA verdict (`PASS` / `FAIL`).
136
- 4. **Fast-Track**: confirm check stage transition and verification state in `devflow/context/current-feature.md`.
137
-
138
- ## Step 6 - Targeted Quality Audit & Repair
139
-
140
- Review diffs and inspect `devflow/context/findings.md`:
141
-
142
- 1. **Repair confirmed P0 and P1 findings** within the current run scope.
143
- 2. Update finding status in `devflow/context/findings.md`.
144
- 3. Rerun verification tests after repairs.
145
- 4. Create a checkpoint commit for the fix.
146
- 5. If a P0/P1 finding cannot be repaired within scope or fails twice consecutively, stop immediately and report.
147
-
148
- ## Step 7 - Review Packet & Track Handoff
149
-
150
- 1. **Deep-Track**: write `devflow/context/current-run/{running-id}-{slug}60-report.md`, render standalone HTML dashboard `devflow/context/current-run/{running-id}-{slug}60-report.html` (via `md2html` or report generator), and set `devflow/context/current-stage.md` to ready for `70-deliver`.
151
- 2. **Fast-Track**: keep final checkpoint and evidence in `devflow/context/current-feature.md`.
152
- 3. Stop with a concise **Review Packet Dashboard** for human approval, including:
153
- - Track used (`fast` or `deep`)
154
- - Evidence summary
155
- - Commit count
156
- - Manual next action (`/complete` for fast, `/70-deliver` for deep)
157
-
158
- ## 🛑 Strict Hard Stops (Never Exceed)
159
-
160
- Stop immediately and report to the user instead of continuing when Autopilot would need to:
161
-
162
- - Commit directly to `main` or `master`, merge branches, delete branches, or force push.
163
- - Run `git push` to remote repositories.
164
- - Deploy to staging/production or publish packages to npm/registries.
165
- - Delete data, drop databases, or run irreversible destructive migrations.
166
- - Make product, business, or architecture decisions not specified in the context.
167
- - Continue after two failed attempts to fix the same issue (Two-attempt hard stop).
168
-
169
- ## Output Review Packet Format
170
-
171
- When Autopilot finishes successfully, output a scannable review packet:
172
-
173
- ```markdown
174
- ### 🛸 Autopilot Execution Summary: [{running-id}] ({track})
175
-
176
- - **Branch**: `{branch-name}`
177
- - **Target Run**: `{running-id} - {title}`
178
- - **Artifacts Generated**:
179
- - **Fast-Track**:
180
- - Spec/Build/Verify evidence: `devflow/context/current-feature.md`
181
- - **Deep-Track**:
182
- - Spec: `devflow/context/current-run/{id}20-spec.md`
183
- - Plan: `devflow/context/current-run/{id}30-plan.md`
184
- - Implement Evidence: `devflow/context/current-run/{id}40-execute.md`
185
- - QA Verify Report: `devflow/context/current-run/{id}50-verify.md`
186
- - Digest Report: `devflow/context/current-run/{id}60-report.md`
187
- - HTML Dashboard: `devflow/context/current-run/{id}60-report.html`
188
- - **Validation & Tests**: track-aware PASS/FAIL evidence
189
- - **Checkpoint Commits**: `{count} commits created on {branch-name}`
190
- - **Manual QA Walkthrough**: Run `try {running-id}` for human review guide
191
-
192
- ---
193
- 👉 **Next Recommended Action**:
194
- Inspect diffs and `try` walkthrough.
195
- - Fast-Track: run `/complete {running-id}` for final safety and merge flow.
196
- - Deep-Track: run `70-deliver {running-id}` to package, merge, or create PR.
197
- ```
67
+ - The repo is not a git repo.
68
+ - The working tree is dirty and there is no current feature tying those changes
69
+ to this run.
70
+ - `current-feature.md` has real work and the user requested a different target.
71
+ - `project-overview.md` is missing or stale and the planning docs are not clear
72
+ enough to regenerate it.
73
+ - The next feature is visual or replication-heavy and no design reference exists.
74
+ - The task needs product, data, auth, billing, or destructive decisions the docs
75
+ do not answer.
76
+
77
+ If the only issue is that `project-overview.md` is stale and the plans are clear,
78
+ regenerate it using the `/overview` behavior and continue. Include that in the
79
+ final packet.
80
+
81
+ ## Step 2 - choose or write the spec
82
+
83
+ If `devflow/context/current-feature.md` already contains an active spec,
84
+ resume it. Read checked steps and continue from the first unchecked step.
85
+
86
+ If there is no active spec:
87
+
88
+ 1. Use the `/feature` behavior for a planned feature, or `/fix` behavior for a
89
+ requested fix.
90
+ 2. Write `devflow/context/current-feature.md`.
91
+ 3. Red-team the spec before building:
92
+ - missing unhappy paths
93
+ - oversized steps
94
+ - undefined contracts
95
+ - missing design reference
96
+ - scope creep
97
+ - vague done-whens
98
+ - missing testing plan when `AGENTS.md` declares a test command
99
+ 4. Apply the spec fixes.
100
+
101
+ Autopilot may continue past this spec gate because the user explicitly invoked
102
+ Autopilot. Still report what the critique changed in the final packet.
103
+
104
+ ## Step 3 - create or reuse the branch
105
+
106
+ Use the same branch rules as `/implement`:
107
+
108
+ - Feature: `feature/<name>`
109
+ - Fix: `fix/<name>`
110
+
111
+ If the branch already exists, switch to it only if it matches the active spec.
112
+ If switching branches would strand unrelated dirty work, stop and report the
113
+ problem.
114
+
115
+ ## Step 4 - implement in small steps
116
+
117
+ Work through the spec's build steps in order. Each step must remain reviewable.
118
+ Unlike `/implement`, do not pause for user approval after each passing step. The
119
+ review happens at the final packet unless a hard stop is hit.
120
+
121
+ For every step:
122
+
123
+ 1. Implement only that step.
124
+ 2. Run the relevant verification:
125
+ - the exact `Verify` command from `AGENTS.md`, when declared
126
+ - otherwise the build, relevant test, lint, and typecheck commands already
127
+ documented by the project
128
+ - browser, CLI, API, or app-level evidence for behavioral done-whens
129
+ 3. If UI is involved, inspect the running app when possible. Prefer Playwright if
130
+ it is already installed or declared. Capture screenshots when they add useful
131
+ evidence. Check for console errors and failed requests.
132
+ 4. Self-review the diff for the step:
133
+ - does it match the spec?
134
+ - did it add scope?
135
+ - is the error path handled?
136
+ - did it follow `coding-standards.md`?
137
+ - are tests present for new in-scope logic when the test gate is on?
138
+ 5. Fix obvious issues and rerun the failed checks.
139
+ 6. Mark the step checked in `current-feature.md` only after the step passes.
140
+ 7. Create a checkpoint commit on the feature or fix branch for the passing step.
141
+ Include the code, tests, and the updated `current-feature.md` checkbox. Use a
142
+ conventional message such as `feat: checkpoint mock snapshot route` or
143
+ `fix: checkpoint stale service filter`. Keep the message about the step, not
144
+ about Autopilot.
145
+
146
+ Do not batch the whole feature into one large diff. If a step gets too large,
147
+ split the step in `current-feature.md` and continue with the first smaller step.
148
+
149
+ ## Step 5 - acceptance check
150
+
151
+ After all implementation steps are checked, run the `/check` behavior for the
152
+ feature when any done-when is behavioral, visual, or integration-facing.
153
+
154
+ For pure library or CLI work, build plus tests and representative command output
155
+ may be enough. Be explicit about the evidence used.
156
+
157
+ ## Step 6 - targeted quality audit and repair
158
+
159
+ After the acceptance check, apply the `/audit current` behavior to the active
160
+ feature, its diff, and the nearby code affected by the change. This is a targeted
161
+ feature audit, not a repository-wide cleanup pass. Findings are recorded in
162
+ `devflow/context/findings.md` with durable IDs and statuses, as `/audit`
163
+ defines; the ledger reports status and never scopes what the audit examines.
164
+
165
+ For every finding:
166
+
167
+ 1. Validate it against the actual code, spec, tests, `coding-standards.md`, and
168
+ local project patterns. An audit finding is evidence to investigate, not an
169
+ automatic instruction to edit.
170
+ 2. Repair confirmed P0 and P1 findings when the fix stays inside the approved
171
+ feature scope and does not require a product or architecture decision. Set
172
+ the repaired finding to `fixed` in the ledger, never `closed`.
173
+ 3. Report P2 and P3 findings in the final packet. Fix them only when the change
174
+ is small, directly caused by the current feature, and clearly required by the
175
+ project standards.
176
+ 4. If a confirmed P0 or P1 finding cannot be repaired safely within scope, stop
177
+ and report it. Do not present the feature as ready for `/complete`.
178
+
179
+ After any audit repair:
180
+
181
+ 1. Rerun the documented `Verify` command when present; otherwise rerun the
182
+ affected build, lint, typecheck, and test commands.
183
+ 2. Rerun the acceptance evidence affected by the repair.
184
+ 3. Recheck the repaired area using the same targeted audit criteria. When that
185
+ recheck confirms the original defect is gone and the repair introduced no
186
+ new one, move the `fixed` finding to `closed` under the `/audit` close
187
+ conditions and name it in the packet. An unrelated new finding gets its own
188
+ ledger entry and does not keep the repaired one open.
189
+ 4. Create a checkpoint commit only after the repair and its checks pass.
190
+
191
+ Use the existing two-attempt hard stop for repeated repair failures. Do not widen
192
+ the feature into a general refactor, silently suppress a finding, or turn this
193
+ step into a full-project hardening pass. A broader cleanup remains a separate
194
+ `/audit` followed by planned `/fix` work.
195
+
196
+ ## Step 7 - final review packet
197
+
198
+ Stop with a concise review packet. Keep it useful enough for `/complete` but not
199
+ a full audit report:
200
+
201
+ - branch name
202
+ - target feature or fix
203
+ - whether the spec was created or resumed
204
+ - what the spec critique changed
205
+ - changed files and why each changed
206
+ - build/test/check commands run, with pass or fail
207
+ - screenshots or output paths, when relevant
208
+ - how to try it manually, or a pointer to `/try` for the full walkthrough
209
+ - checkpoint commits created
210
+ - self-review findings
211
+ - targeted audit scope and findings
212
+ - audit repairs made and checks rerun
213
+ - P0/P1 findings still `open` or `fixed` in `devflow/context/findings.md`,
214
+ which block `/complete`
215
+ - unresolved risks or skipped checks
216
+ - exact next action
217
+
218
+ If everything is green, the next action is usually: review the diff, then run
219
+ `/try` if you want a manual walkthrough, then `/complete`.
220
+
221
+ If something failed, name the failing check and the next fix target.
222
+
223
+ ## Hard Stops
224
+
225
+ Stop immediately and report instead of continuing when Autopilot would need to:
226
+
227
+ - commit on `main`, merge, delete a branch, push, deploy, publish, or send
228
+ anything
229
+ - delete data, reset a database, run irreversible migrations, kill processes, or
230
+ change system settings
231
+ - install dependencies or use network access without the current tool's approval
232
+ flow
233
+ - make a product decision not covered by the docs
234
+ - continue after two failed fix attempts on the same issue
235
+ - hide, skip, or hand-wave a failing check
236
+
237
+ ## Rules
238
+
239
+ - One Autopilot run handles one feature or one fix.
240
+ - Autopilot creates checkpoint commits on the feature or fix branch after passing
241
+ steps.
242
+ - Autopilot audits the active feature and affected code, not the entire project.
243
+ - A P0 or P1 finding left `open` or `fixed` in `devflow/context/findings.md`
244
+ blocks readiness for `/complete`. The ledger is what makes this enforceable.
245
+ - Autopilot stops before `/complete`. It never merges.
246
+ - The Blueprint files remain the state machine. Keep
247
+ `current-feature.md` accurate as steps complete.
248
+ - Follow `coding-standards.md`, `ai-interaction.md`, and `AGENTS.md`.
249
+ - Prefer fewer, higher-quality changes over broad coverage.
250
+ - Report uncertainty plainly. A blocked run is useful if it tells the truth.
251
+
252
+ ## Formatting
253
+
254
+ Format the output to match the project's conventions in
255
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
256
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: brainstorm
3
+ description: "[devflow][B] Companion skill for structured divergent and convergent ideation, generating 2-3 viable options with trade-off analysis before committing to delivery."
4
+ argument-hint: "{topic, feature, or discovery-id}"
5
+ ---
6
+
7
+ # Brainstorming & Option Analysis
8
+
9
+ $ARGUMENTS
10
+
11
+ Explore a vague request, architectural choice, or feature direction without allocating a Running ID. Formulate 2-3 materially different options, analyze trade-offs, and recommend the optimal path.
12
+
13
+ ## Usage
14
+
15
+ ```text
16
+ brainstorm {topic or request}
17
+ brainstorm {discovery-id}
18
+ ```
19
+
20
+ Use this when:
21
+ - A request has multiple viable implementation paths
22
+ - The team needs to compare options before locking delivery scope
23
+ - Discovering or defining a complex technical feature
24
+
25
+ ## Process & Execution Lenses
26
+
27
+ ### 1. Ground the Problem
28
+ - Restate the core goal and target user/stakeholder value.
29
+ - Identify technical, business, or timeline constraints.
30
+
31
+ ### 2. Option Formulation (Divergent Phase)
32
+ Provide at least 2-3 materially distinct approaches:
33
+ - **Option A (Standard / Conservative)**: Low risk, proven pattern, minimal changes.
34
+ - **Option B (Modern / Optimized)**: Best-practice architecture, balanced trade-off, scalable.
35
+ - **Option C (Alternative / Unconventional)**: High innovation, simplified scope, or creative alternative.
36
+
37
+ ### 3. Trade-off Comparison Matrix
38
+ Construct a structured evaluation table:
39
+
40
+ | Option | Pros (ข้อดี) | Cons (ข้อเสีย) | Effort & Complexity | Verdict / Status |
41
+ | :--- | :--- | :--- | :--- | :--- |
42
+ | **Option A** | ... | ... | Low / Med / High | ... |
43
+ | **Option B** | ... | ... | Low / Med / High | **Recommended** |
44
+ | **Option C** | ... | ... | Low / Med / High | ... |
45
+
46
+ ### 4. Codebase & Feasibility Check
47
+ - Use `grep_search` to inspect existing patterns in the project.
48
+ - Verify library suitability or external API contracts before recommending.
49
+
50
+ ### 5. Recommendation & Next Steps (Convergent Phase)
51
+ - Select the best option and explain the core rationale.
52
+ - Define actionable next steps without writing prematurely detailed code.
53
+
54
+ ## Output
55
+
56
+ 1. Render the comparison matrix and recommended path directly in the conversation.
57
+ 2. (Optional) Save persistent artifact to `devflow/research/brainstorm-{slug}.md` when attached to a discovery run.
58
+
59
+ ## Next Workflow Recommendation
60
+
61
+ - **Primary**: `00-explore {discovery_id}` (if resuming discovery) or `10-define` / `feature` (if ready to specify)
62
+ - **Inbox**: `idea` to record into `devflow/ideas.md`