@jakkrichm/create-nexus-devflow 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/create-nexus-devflow.js +29 -5
  3. package/dist/bin/create-nexus-devflow.js.map +1 -1
  4. package/dist/lib/command-catalog.js +5 -2
  5. package/dist/lib/command-catalog.js.map +1 -1
  6. package/dist/lib/dashboard.js +1 -1
  7. package/dist/lib/discoveries.js +18 -6
  8. package/dist/lib/discoveries.js.map +1 -1
  9. package/dist/lib/ideas.js +2 -2
  10. package/dist/lib/ideas.js.map +1 -1
  11. package/dist/lib/project-metadata.d.ts +1 -1
  12. package/dist/lib/project-metadata.js +3 -2
  13. package/dist/lib/project-metadata.js.map +1 -1
  14. package/dist/lib/update.js +13 -5
  15. package/dist/lib/update.js.map +1 -1
  16. package/dist/lib/workflow-state.js +9 -6
  17. package/dist/lib/workflow-state.js.map +1 -1
  18. package/dist/scripts/prepare-template.js +10 -2
  19. package/dist/scripts/prepare-template.js.map +1 -1
  20. package/package.json +1 -1
  21. package/template/.agents/skills/10-define/SKILL.md +1 -1
  22. package/template/.agents/skills/adopt/SKILL.md +58 -5
  23. package/template/.agents/skills/brainstorm/SKILL.md +1 -1
  24. package/template/.agents/skills/devflow/SKILL.md +9 -7
  25. package/template/.agents/skills/discovery/SKILL.md +75 -150
  26. package/template/.agents/skills/doctor/SKILL.md +23 -16
  27. package/template/.agents/skills/feature/SKILL.md +1 -0
  28. package/template/.agents/skills/grill/SKILL.md +93 -0
  29. package/template/.agents/skills/implement/SKILL.md +2 -2
  30. package/template/.agents/skills/onboard/SKILL.md +18 -17
  31. package/template/.agents/skills/rollback/SKILL.md +1 -1
  32. package/template/.claude/skills/10-define/SKILL.md +3 -3
  33. package/template/.claude/skills/20-spec/SKILL.md +1 -2
  34. package/template/.claude/skills/30-plan/SKILL.md +1 -2
  35. package/template/.claude/skills/40-execute/SKILL.md +2 -2
  36. package/template/.claude/skills/50-verify/SKILL.md +2 -2
  37. package/template/.claude/skills/60-report/SKILL.md +2 -2
  38. package/template/.claude/skills/70-deliver/SKILL.md +2 -2
  39. package/template/.claude/skills/adopt/SKILL.md +191 -75
  40. package/template/.claude/skills/audit/SKILL.md +267 -133
  41. package/template/.claude/skills/autopilot/SKILL.md +226 -167
  42. package/template/.claude/skills/brainstorm/SKILL.md +62 -0
  43. package/template/.claude/skills/brief/SKILL.md +93 -92
  44. package/template/.claude/skills/check/SKILL.md +96 -76
  45. package/template/.claude/skills/ci/SKILL.md +140 -61
  46. package/template/.claude/skills/complete/SKILL.md +156 -101
  47. package/template/.claude/skills/convert-any-to-md/SKILL.md +2 -2
  48. package/template/.claude/skills/convert-any-to-md/references/setup.md +29 -0
  49. package/template/.claude/skills/convert-any-to-md/scripts/convert_any_to_md.py +487 -0
  50. package/template/.claude/skills/convert-any-to-md/scripts/requirements.txt +3 -0
  51. package/template/.claude/skills/debug/SKILL.md +124 -49
  52. package/template/.claude/skills/devflow/SKILL.md +18 -10
  53. package/template/.claude/skills/discovery/SKILL.md +65 -119
  54. package/template/.claude/skills/doctor/SKILL.md +195 -72
  55. package/template/.claude/skills/feature/SKILL.md +197 -152
  56. package/template/.claude/skills/fix/SKILL.md +41 -90
  57. package/template/.claude/skills/grill/SKILL.md +93 -0
  58. package/template/.claude/skills/idea/SKILL.md +2 -2
  59. package/template/.claude/skills/implement/SKILL.md +189 -46
  60. package/template/.claude/skills/onboard/SKILL.md +216 -85
  61. package/template/.claude/skills/overview/SKILL.md +44 -29
  62. package/template/.claude/skills/prototype/SKILL.md +82 -27
  63. package/template/.claude/skills/release/SKILL.md +119 -130
  64. package/template/.claude/skills/report-html/SKILL.md +2 -2
  65. package/template/.claude/skills/rollback/SKILL.md +123 -77
  66. package/template/.claude/skills/status/SKILL.md +109 -0
  67. package/template/.claude/skills/test/SKILL.md +2 -2
  68. package/template/.claude/skills/tests/SKILL.md +126 -0
  69. package/template/.claude/skills/try/SKILL.md +77 -65
  70. package/template/AGENTS.md +8 -7
  71. package/template/devflow/build-plan.md +8 -0
  72. package/template/devflow/context/ai-interaction.md +11 -0
  73. package/template/devflow/context/coding-standards.md +15 -1
  74. package/template/devflow/context/current-stage.md +1 -1
  75. package/template/devflow/decisions/.gitkeep +0 -0
  76. package/template/devflow/decisions/README.md +24 -0
  77. package/template/devflow/history/HISTORY.md +1 -1
  78. package/template/devflow/history/features/README.md +5 -0
  79. package/template/devflow/history/fixes/README.md +5 -0
  80. package/template/devflow/history/rollbacks/README.md +5 -0
  81. package/template/.agents/skills/00-explore/SKILL.md +0 -84
  82. package/template/.claude/skills/00-explore/SKILL.md +0 -84
@@ -1,64 +1,207 @@
1
1
  ---
2
2
  name: implement
3
- description: "[Devflow] Fast-Track Implement stage in DevFlow (Blueprint Mode) - execute checklist tasks incrementally with TDD and update current-feature.md in context."
4
- argument-hint: "{running-id or workspace path}"
3
+ description: "[devflow][F] Build the feature, fix, or rollback spec'd in devflow/context/current-feature.md, one small reviewable step at a time. Creates the matching branch, implements each step, shows the diff and explains it in plain English, tests, and iterates until it works. Type: Rollback specs use a guarded reverse patch that preserves Blueprint history. After each approved step it offers an optional commit checkpoint on the branch; the work-level commit, merge, and logging are /complete's job. Use when the user runs /implement, or asks to build, implement, or start the current feature, fix, or rollback once its spec is ready."
5
4
  ---
6
5
 
7
- # Fast-Track: Implement (Blueprint Mode)
6
+ # implement - build the current spec, one reviewed step at a time
8
7
 
9
- $ARGUMENTS
8
+ Where this sits in the workflow:
10
9
 
11
- Incremental code execution stage in Fast-Track. Reads the Single Living Spec (`devflow/context/current-feature.md`), executes checklist tasks, implements tests (TDD), and updates the implementation record.
10
+ /feature, /fix, or /rollback -> [implement] -> /complete -> next
11
+ (the spec) (build it, (commit +
12
+ reviewed) merge + log)
12
13
 
13
- ## Invocations & Aliases
14
+ `/feature`, `/fix`, or `/rollback` wrote the spec to
15
+ `devflow/context/current-feature.md` and stopped.
16
+ This skill turns that spec into code, following the build loop in
17
+ `devflow/context/ai-interaction.md`, without vibe coding: small steps, a visible diff plus
18
+ a plain-English explanation for each, testing, and iteration until it works, all
19
+ behind your approval. It builds on a branch and offers an optional commit
20
+ checkpoint after each step; the work-level commit, merging, and logging are
21
+ `/complete`'s job.
14
22
 
15
- - `/implement`: Run implementation on current active run
16
- - `/implement {id}`: Run implementation on specified ID
17
- - `$implement`: Codex CLI invocation
23
+ ## Before you start
18
24
 
19
- ## Fast-Track Mainline Workflow
25
+ Read `devflow/context/current-feature.md`. If it has no real spec (still the stub, or its
26
+ status is already complete), stop and tell the user to run `/feature` (for a
27
+ planned feature), `/fix` (for an ad-hoc bug or change), or `/rollback` (for a
28
+ completed feature reversal) first. Pull the
29
+ conventions from `devflow/context/coding-standards.md` and the data model from
30
+ `devflow/context/project-overview.md` so the code matches them.
20
31
 
21
- ```text
22
- /feature (หรือ /fix) ──▶ /implement ──▶ /check ──▶ /complete
23
- ```
32
+ If the spec's Design reference points at `prototypes/*.html`, those mockups are
33
+ the visual target - build components to match them, and treat `prototypes/theme.css`
34
+ as the token source (the spec's first step ports it into the app's global
35
+ stylesheet before the components are built).
24
36
 
25
- ## Behavior & Contract
37
+ **Resuming?** If the spec already has some build steps checked off (`- [x]`), this
38
+ feature was started earlier and interrupted (often a cleared context). The spec and
39
+ its ticked steps are files, so pick up where it left off: read which steps are done,
40
+ check the git branch and `git status`/log to see what is committed and what is still
41
+ in the working tree, then continue from the **first unchecked step** instead of
42
+ starting over. No separate save/load is needed - the project instructions load
43
+ `current-feature.md` every session.
26
44
 
27
- When invoked:
45
+ ## Step 1 - branch
28
46
 
29
- ### 1. Load Active Context
30
- 1. Identify active Running ID from `devflow/context/current-stage.md` or `devflow/context/current-feature.md`.
31
- 2. Read `devflow/context/current-feature.md`.
32
- 3. Locate `## 2. Plan & Test Strategy` and `## 3. Implementation Checklist`.
47
+ Create and check out a branch named from the spec: `feature/<name>` for a feature,
48
+ `fix/<name>` for a fix, or `rollback/<name>` for a Type: Rollback spec. If the
49
+ project isn't a git repo yet, say so and ask the user to run `git init` first;
50
+ the loop needs branches. On resume, the branch already exists - check it out
51
+ instead of creating a new one.
33
52
 
34
- ### 2. Incremental Execution with TDD
35
- 1. Select unchecked items `- [ ]` from the checklist in order.
36
- 2. For each task:
37
- - **TDD (Red-Green-Refactor)**: When `Test Decision: Required`, create or update unit tests first.
38
- - Implement the minimal, clean code change satisfying the task.
39
- - Run localized verification (e.g. `npm test`, linter).
40
- - Mark the item as `- [x]` in `current-feature.md`.
53
+ ### Type: Rollback safeguard
41
54
 
42
- ### 3. Update Living Spec (`current-feature.md`)
43
- Append or update `## 4. Implementation Record` in `devflow/context/current-feature.md` with:
44
- - Summary of completed tasks and modified files
45
- - Key architectural observations or notes
46
- - Status of checklist items
55
+ For a rollback spec, do not hand-delete the old feature and do not run a whole
56
+ commit `git revert`. Completed feature commits also contain Blueprint history and
57
+ plan bookkeeping, while `current-feature.md` now contains the active rollback
58
+ spec. Reversing the whole commit would damage that state.
47
59
 
48
- Example:
49
- ```markdown
50
- ## 4. Implementation Record
51
- - **[Task 1.1]**: Implemented JWT auth middleware in `src/middleware/auth.ts`
52
- - **[Task 1.2]**: Added unit tests in `test/auth.test.ts` (All 6 tests passing)
53
- - **[Task 1.3]**: Registered auth route in `src/server.ts`
54
- ```
60
+ Before the first rollback build step:
55
61
 
56
- ### 4. Update Workspace Status
57
- Update `devflow/context/current-stage.md`:
58
- - `Current Stage`: `implement (Fast-Track -> Checklist Completed -> Ready for /check)`
62
+ 1. Re-resolve the target archive's introducing commit and confirm it matches the
63
+ full Target commit SHA recorded in the approved spec.
64
+ 2. Confirm the target is an ancestor of `HEAD`, has the recorded single parent,
65
+ and the only dirty path before applying the patch is the approved rollback
66
+ spec. Stop on drift.
67
+ 3. Preview the target's product diff while excluding `.agents/**`, `.claude/**`,
68
+ `devflow/**`, `AGENTS.md`, `CLAUDE.md`, and
69
+ `prototypes/**`. Confirm the preview is non-empty and matches the Product
70
+ paths in the spec.
71
+ 4. Apply that product diff in reverse with three-way conflict detection and
72
+ stage it. Substitute the two approved full SHAs before running:
59
73
 
60
- ### 5. Output Summary & Next Step
61
- Report to the user:
62
- - Completed checklist items and modified files
63
- - Local verification results
64
- - **Next Command**: `/check` (or `/check {ID}`)
74
+ git diff --binary <target-parent> <target-commit> -- . \
75
+ ':(exclude).agents/**' \
76
+ ':(exclude).claude/**' ':(exclude)devflow/**' \
77
+ ':(exclude)AGENTS.md' ':(exclude)CLAUDE.md' \
78
+ ':(exclude)prototypes/**' |
79
+ git apply --reverse --3way --index
80
+
81
+ Never omit the protected pathspec exclusions for convenience.
82
+ 5. Show both `git diff --cached` and `git status`. Confirm no protected path is
83
+ staged or modified before presenting the step for review.
84
+
85
+ If the reverse patch conflicts, stop and report the exact paths and later commit
86
+ that appears involved. Do not auto-resolve, discard, stash, reset, or switch to a
87
+ broad checkout. Ask whether to resolve only the conflict allowed by the approved
88
+ spec or abandon the attempt. A cascade into another completed feature needs a
89
+ new rollback plan.
90
+
91
+ ## Step 2 - build one step, review, iterate, checkpoint
92
+
93
+ Work through the spec's build steps in order, one at a time. For each step:
94
+
95
+ 1. Implement just that step: the smallest change that satisfies its "done when."
96
+ 2. Show the **diff**, not whole files.
97
+ 3. **Explain it, and prove it.** Give a short summary: what the step delivered,
98
+ one line per changed file on what it does and why, then confirm the step's
99
+ "done when" is met with evidence (build output, a screenshot, a passing
100
+ assertion). This summary is the comprehension gate, so keep it concrete, not
101
+ ceremonial. Include a short **How to try it** note when the step has a manual
102
+ path: the command, URL, click, endpoint, or output the user can check.
103
+ 4. **Verify the step.** If `AGENTS.md` declares a `Verify` command, run that exact
104
+ command as the automated gate. It is only an umbrella for checks the project
105
+ actually has, so do not invent tests or other checks to satisfy it. If no
106
+ `Verify` command exists, run the documented build command and the test command
107
+ when the project declares one. A step that adds logic must ship a passing test
108
+ in the same diff when the test gate is on, and the suite must be green before
109
+ the step is approved (see the Testing gate in `coding-standards.md`). UI and
110
+ integration-only steps ride on screenshot plus build evidence. Run a focused
111
+ test separately when it gives faster feedback, then use `Verify` as the final
112
+ automated gate. For UI or integration done-whens, prefer Playwright when it is
113
+ already installed or declared in `AGENTS.md`; do not add it silently for an
114
+ unrelated feature. Create focused test files next to the source they cover,
115
+ per `coding-standards.md`. Never install a runner mid-step unless the current
116
+ spec is explicitly the unit-testing setup itself (for example `/fix "add unit
117
+ testing"`). If a step surfaces non-trivial logic the spec did not foresee, add
118
+ a focused test then, or note why not. When a step's done-when is behavioral (a
119
+ click, a download, or a flow across screens), run `/check` to prove it against
120
+ the running app rather than eyeballing it.
121
+ 5. **Iterate until it works.** If it fails or the user wants changes, revise the
122
+ step (re-prompt or hand-edit the code), show the updated diff, and re-test.
123
+ Repeat until it works and the user approves. Nothing is committed until the
124
+ user is happy with the step.
125
+ 6. **Mark it done, then prompt to move on.** Once the step is approved, check that
126
+ step off (`- [x]`) in `devflow/context/current-feature.md` so progress survives a context
127
+ clear. If the step repaired a finding tracked in
128
+ `devflow/context/findings.md`, set that finding's status to `fixed` now too
129
+ and note the repair in its **Resolution** line. Never set `closed`: a repair
130
+ is re-reviewed by `/audit` before it clears, because a fix can introduce a
131
+ worse defect than the one it removed. Then offer a short choice, noting that checkpoints are optional since
132
+ `/complete` makes the real feature-level commit. Use the current tool's short
133
+ user-input prompt when available; when you've just produced a long block to
134
+ read (a deep explanation, a big
135
+ walk-through), ask in plain text instead, so the prompt doesn't cover what the
136
+ user is still reading:
137
+ - **Continue** (default) - roll into the next step without committing.
138
+ - **Commit checkpoint** - commit just this step on the branch with a
139
+ conventional message (a cheap rollback point).
140
+ - **Walk me through it** - give a deeper, line-level explanation of the new or
141
+ changed code (why this approach, what each part does, any gotchas), then
142
+ re-ask this checkpoint prompt. A loop-back, not a terminal choice.
143
+ - **Stop here** - pause the loop so the user can review or come back later.
144
+
145
+ On **Continue** or after **Commit checkpoint**, go to the next step. On **Walk
146
+ me through it**, explain in depth and then re-ask this prompt in plain text (the
147
+ explanation is long, so a modal would cover it). On **Stop here**, stop and say
148
+ where things stand: the branch is intact; run `/implement` again to resume, or
149
+ `/complete` to wrap up what's built so far.
150
+
151
+ Never batch the whole thing into one diff. If a step's diff is too big to read,
152
+ split it. The documented `Verify` command, or the fallback build and tests, must
153
+ pass before any commit.
154
+
155
+ ## Step 3 - hand off to /complete
156
+
157
+ Before handing off, check `devflow/context/findings.md`. A P0 or P1 finding
158
+ still `open` or `fixed` there means `/complete` will refuse the merge, so close
159
+ the loop now:
160
+
161
+ - Repair each `open` P0 or P1 as an extra reviewed step. First append it to the
162
+ spec's build steps in `current-feature.md` (`- [ ] Repair F-03 - <title>`) so
163
+ the repair is on the record and survives a context clear, then run the same
164
+ loop as Step 2: smallest change, diff, plain-English explanation, evidence.
165
+ Check the step off and mark the finding `fixed` together.
166
+ - Then run `/audit` so the repairs are re-reviewed and can move to `closed`.
167
+ A repair this skill made never closes itself.
168
+ - If the user decides a finding should not be fixed, only they can set
169
+ `accepted` (reason recorded). A finding that looks wrong goes back to
170
+ `/audit` to invalidate with recorded evidence; this skill never sets
171
+ `accepted` or `invalid`.
172
+
173
+ When every step is built and `Verify`, or the fallback build and tests, passes
174
+ (committed as checkpoints or not), stop with a compact review packet:
175
+
176
+ - branch name
177
+ - what changed, grouped by file or area
178
+ - checks run, with the exact command or proof used
179
+ - how to try it manually, or a pointer to `/try`
180
+ - ledger state: any findings still `open` or `fixed`, by ID
181
+ - known risks, skipped checks, or follow-up notes
182
+ - next action, usually `/complete`
183
+
184
+ Then tell the user `/complete` makes the one work-level commit, logs it (archive,
185
+ update the build plan for a feature or rollback, reset), and merges with
186
+ approval. This skill does not touch main.
187
+
188
+ ## Rules
189
+
190
+ - One small step per diff; the user reviews and approves each before any commit.
191
+ - Explain every change in plain English. Understanding the code is the point.
192
+ - Iterate on the branch until each step works; never commit code the user hasn't
193
+ approved.
194
+ - Follow `devflow/context/coding-standards.md` (server vs client, scope user-owned queries
195
+ by the authenticated user id, validate inputs, and so on).
196
+ - Build only what the spec says. If the spec is wrong or thin, stop and fix the
197
+ spec first, do not improvise.
198
+ - Per-step commits are optional checkpoints. The work-level commit, the merge,
199
+ and any push are `/complete`'s job.
200
+ - For Type: Rollback, reverse only the approved product diff and preserve all
201
+ protected Blueprint paths.
202
+
203
+ ## Formatting
204
+
205
+ Format the output to match the project's conventions in
206
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
207
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -1,129 +1,260 @@
1
1
  ---
2
2
  name: onboard
3
- description: "[Devflow] Set up Nexus-DevFlow after overlaying it onto a freshly scaffolded or early-stage project."
3
+ description: "[devflow][B] Set up the Blueprint after overlaying it onto a freshly scaffolded or early project. Detects the stack, tunes project files and adapters, documents real commands and existing checks, points to the optional standalone CI setup, and tells the user what to fill in before /overview or $overview. Use when the user runs /onboard, invokes $onboard, just copied the Blueprint into a new project, or asks what to do after overlaying the Blueprint. For an existing app with meaningful shipped features, use adopt instead."
4
4
  ---
5
5
 
6
- # onboard - Finish the Nexus-DevFlow Setup for Fresh Projects
6
+ # onboard - finish the Blueprint overlay setup
7
7
 
8
8
  Where this sits in the workflow:
9
9
 
10
- ```text
11
- scaffold app -> overlay DevFlow -> [onboard] -> 00-explore or 10-define -> Mainline Loop
12
- (user/tool) (create-nexus) (tune setup) (discovery / run scoping) (20-spec -> 70-deliver)
13
- ```
10
+ scaffold app -> overlay Blueprint -> [onboard] -> project-plan + build-plan -> /overview
11
+ (user/tool) (copied files) (tune setup) (user-owned inputs) (generated context)
14
12
 
15
- `onboard` is the fresh-project on-ramp for Nexus-DevFlow. It assumes the application was scaffolded first (e.g. via `create-next-app`, `create-vite`, `cargo new`, etc.) and DevFlow was overlaid after.
13
+ `/onboard` is the fresh-project on-ramp. It assumes the app was scaffolded first
14
+ and the Blueprint files were overlaid after. Run it before filling in plans or
15
+ running `/overview`. Its job is to make the Blueprint fit the real project before
16
+ planning starts: commands, project title, conventions, ignore rules, and tool
17
+ adapters. It also asks whether the Blueprint workflow files should be committed
18
+ with the repo or kept local-only through `.gitignore`.
16
19
 
17
- Run `onboard` before starting discovery or delivery runs. Its job is to make DevFlow fit the real project from day one: detecting commands, project name, coding conventions, ignore rules, and tool adapters.
20
+ Use `/adopt` instead when the app is brownfield: real routes, shipped features,
21
+ and project behavior already exist and need to be reflected into the plans.
18
22
 
19
- Use `adopt` instead when the app already has substantial shipped code, working routes, and existing business logic.
23
+ ## Input
20
24
 
21
- ---
25
+ No argument is required. If the user provides context about the stack, hosting,
26
+ database, auth, or preferred tool, use it as a hint and verify against files.
22
27
 
23
- ## Input
28
+ ## Step 0 - confirm this is onboarding, not adoption
24
29
 
25
- No argument is required. If the user provides context about the stack, database, authentication, or preferred tooling, use it as a hint and verify against files.
30
+ Inspect the repository and the two planning docs:
26
31
 
27
- ---
32
+ - If `devflow/project-plan.md` and `devflow/build-plan.md` are mostly empty or
33
+ worksheet-like, proceed.
34
+ - If the app already has substantial shipped features, stop and recommend
35
+ `/adopt` instead.
36
+ - If the plans already contain real user-owned content, do not overwrite them.
37
+ Continue only with setup files such as `AGENTS.md`, `coding-standards.md`,
38
+ `.gitignore`, and optional notes.
28
39
 
29
- ## Step 0 - Confirm Onboarding vs Adoption
40
+ Never run a framework scaffolder. The Blueprint is already overlaid.
30
41
 
31
- Inspect the repository and context files:
42
+ ## Step 1 - survey the project facts
32
43
 
33
- - If the project is freshly scaffolded with minimal boilerplate, proceed.
34
- - If `devflow/context/project-overview.md` and `devflow/context/coding-standards.md` already contain rich, user-customized content, do not overwrite them without explicit confirmation.
35
- - If the repository already has substantial existing routes, controllers, or database models, stop and recommend `adopt` instead.
44
+ Read only enough to identify the setup:
36
45
 
37
- Never run a framework scaffolder. DevFlow is already overlaid.
46
+ - package manager and lockfile (`pnpm-lock.yaml`, `package-lock.json`,
47
+ `yarn.lock`, `bun.lockb`, etc.)
48
+ - manifest scripts (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, and
49
+ similar)
50
+ - framework and runtime config (`astro.config.*`, `next.config.*`, `vite.config.*`,
51
+ `tailwind.config.*`, database config, test config)
52
+ - source layout, route layout, and app/package directories
53
+ - existing `.gitignore`
54
+ - whether `.agents/` and `.claude/` are both needed
55
+ - whether Blueprint workflow paths are already tracked by git
56
+ - existing verification commands and `.github/workflows/`
57
+ - project name, from `package.json`, the folder name, existing docs, or the user
38
58
 
39
- ---
59
+ Do not infer more than the files support. Mark uncertain items as `> TODO` in the
60
+ summary rather than inventing a convention.
40
61
 
41
- ## Step 1 - Survey the Project Facts
62
+ ## Step 2 - update project entry files
42
63
 
43
- Read only enough to identify the setup:
64
+ If the root `README.md` is a copied Blueprint workflow document, replace that
65
+ obsolete overlay content in the product README slot:
44
66
 
45
- - **Package Manager & Lockfile**: `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `bun.lockb`, `Cargo.lock`, `poetry.lock`, `go.sum`, etc.
46
- - **Manifest Scripts**: `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc.
47
- - **Framework & Configs**: `tsconfig.json`, `next.config.*`, `vite.config.*`, `astro.config.*`, `tailwind.config.*`, database configs, test configs.
48
- - **Source Layout**: `src/`, `app/`, `pages/`, `components/`, `lib/`, etc.
49
- - **Existing Git & Ignore Rules**: `.gitignore`, git branches.
50
- - **Project Name**: Extracted from manifest, root directory, or user.
67
+ - Detect it conservatively: the first heading is `# AI Coding Blueprint`, or the
68
+ opening section clearly describes the Blueprint workflow rather than this app.
69
+ - Create a small root `README.md` stub for the actual project using the detected
70
+ project name, one-line purpose when known, and the Commands from `AGENTS.md`.
71
+ Keep it minimal if the project plan is not filled yet.
72
+ - Do not move or copy the workflow document into `devflow/`. Agents use the
73
+ local skills, plans, and context files directly.
74
+ - Remove any `AGENTS.md` claim that a project README explains the Blueprint
75
+ workflow.
51
76
 
52
- ---
77
+ If the root `README.md` already looks like a real project README, leave it alone.
78
+ Never replace a project README with Blueprint documentation.
53
79
 
54
- ## Step 2 - Update Entry Files (AGENTS.md & CLAUDE.md)
80
+ Update the Commands section of `AGENTS.md` to match real scripts and commands.
81
+ Include only commands that exist or are intentionally available:
55
82
 
56
- 1. **Update `AGENTS.md` Commands**:
57
- - Fill in the actual commands found in the project:
58
- - `Dev`: dev server command (e.g. `npm run dev`)
59
- - `Build`: production build command (e.g. `npm run build`)
60
- - `Test`: test runner command (e.g. `npm test`, `vitest`, `pytest`)
61
- - `Lint / Typecheck`: linting and typechecking commands
62
- - `Verify`: combined verification command if present (e.g. `npm run check` or `npm run typecheck && npm test && npm run build`)
63
- - If no test command exists, state explicitly that testing is opt-in and not yet configured.
83
+ - dev server
84
+ - build
85
+ - preview or start
86
+ - lint, format, typecheck, and test, if configured
87
+ - verify, when a real combined verification command already exists
88
+ - useful app-specific commands, if obvious
64
89
 
65
- 2. **Update `CLAUDE.md`**:
66
- - Replace any `# Project Name` placeholder with the real detected project name.
67
- - Keep `@AGENTS.md` and `@devflow/context/...` imports intact.
90
+ If no test command exists, say so explicitly. Do not claim tests are a gate until
91
+ a real test command is configured.
68
92
 
69
- ---
93
+ If `CLAUDE.md` exists and still has the placeholder `# Project Name`, replace it
94
+ with the detected project name. Keep the `@AGENTS.md` and `@devflow/...`
95
+ imports intact. Do not move detailed app context into `CLAUDE.md`; that belongs
96
+ in `AGENTS.md` and the generated project overview.
70
97
 
71
- ## Step 3 - Tune Coding Standards
98
+ ## Step 3 - tune coding standards
72
99
 
73
- Update `devflow/context/coding-standards.md` to match the detected stack:
100
+ Update `devflow/context/coding-standards.md` so it matches the detected stack.
101
+ Keep stable, tool-agnostic sections such as writing style, comments, scope, and
102
+ testing philosophy. Replace stack-specific defaults that do not apply.
74
103
 
75
- - Framework, rendering model, and component architecture
76
- - Package manager and runtime
77
- - Project directory conventions
78
- - Styling approach (Tailwind CSS, Vanilla CSS, CSS Modules)
79
- - Data fetching, state management, and API boundaries
80
- - Validation and error handling expectations
81
- - Testing expectations
104
+ Cover the practical conventions the build loop needs:
82
105
 
83
- Keep core general rules (functional style, small focused functions, clear naming) and replace template placeholders with real patterns.
106
+ - framework and rendering model
107
+ - package manager
108
+ - project structure
109
+ - styling approach
110
+ - data access and API boundaries, if known
111
+ - validation and error handling expectations
112
+ - test gate status
113
+ - build and verification commands, via `AGENTS.md`
84
114
 
85
- ---
115
+ If the project is too new to reveal a convention, leave a concise `> TODO` rather
116
+ than pretending a pattern exists.
86
117
 
87
- ## Step 4 - Check AI Interaction Rules
118
+ ## Step 4 - check AI interaction rules
88
119
 
89
- Review `devflow/context/ai-interaction.md` and adjust if needed:
90
- - Language preferences (`artifact_language: "th"` or `"en"`)
91
- - Branching conventions
92
- - Review checkpoint expectations
120
+ Read `devflow/context/ai-interaction.md` and update only obvious mismatches.
121
+ Usually the default review loop should stay intact. Flag preferences for the user
122
+ instead of guessing, such as:
93
123
 
94
- ---
124
+ - whether commits should be offered after every step
125
+ - whether branches should use a different naming pattern
126
+ - whether `/check` should require browser evidence for UI work
95
127
 
96
- ## Step 5 - Check Ignore Files, Visibility & Tool Adapters
128
+ If no changes are needed, say so.
97
129
 
98
- 1. **Update `.gitignore`**: Ensure common build artifacts, dependencies, and environment files are ignored.
99
- 2. **DevFlow Visibility**:
100
- - By default, keep DevFlow files tracked in git for team collaboration.
101
- - If local-only mode is requested, add `devflow/`, `.agents/`, `.claude/`, `CLAUDE.md` to `.gitignore` while keeping `AGENTS.md` public.
102
- 3. **Tool Adapters**:
103
- - Codex & Antigravity use `.agents/skills/`.
104
- - Claude Code uses `.claude/skills/`.
105
- - Both can coexist cleanly.
130
+ ## Step 5 - point to optional CI setup
106
131
 
107
- ---
132
+ Do not create or change Verify commands or GitHub workflows during onboarding.
133
+ Report any verification command or CI already present. When equivalent automatic
134
+ pull-request checks are absent, mention the optional standalone setup:
135
+
136
+ ```text
137
+ Run /ci or $ci when you want automatic GitHub checks.
138
+ ```
108
139
 
109
- ## Step 6 - Initialize Project Overview
140
+ Explain that CI is not required to continue with planning or the Blueprint build
141
+ loop. The `/ci` skill owns project-specific Verify and GitHub workflow setup.
110
142
 
111
- Populate `devflow/context/project-overview.md` with baseline information:
112
- - Project Name and One-line Summary
113
- - Tech Stack & Tooling Architecture
114
- - Initial Repository Structure
115
- - Available Verified Commands
143
+ ## Step 6 - check ignore files, visibility, and adapters
116
144
 
117
- ---
145
+ Update `.gitignore` for common generated files from the detected stack while
146
+ preserving existing entries. Typical examples include dependencies, build output,
147
+ framework caches, logs, environment files, test output, temporary files, and OS or
148
+ editor files.
149
+
150
+ Ask how DevFlow workflow files should be handled in git, unless the user
151
+ already gave a preference:
118
152
 
119
- ## Step 7 - Handoff to Planning
153
+ ```text
154
+ DevFlow visibility?
155
+
156
+ 1. Commit DevFlow workflow files
157
+ Portable. Best for teams and working across machines.
158
+
159
+ 2. Keep DevFlow workflow files local
160
+ Adds .agents/, .claude/, devflow/, and CLAUDE.md to .gitignore.
161
+ Keeps AGENTS.md public as the lightweight project agent guide.
162
+ ```
120
163
 
121
- Present a concise onboarding summary report:
164
+ Recommend option 1 by default. If the user chooses option 2:
165
+
166
+ - Add this block to `.gitignore`, preserving existing entries:
167
+
168
+ ```gitignore
169
+ # DevFlow local workflow files
170
+ .agents/
171
+ .claude/
172
+ devflow/
173
+ CLAUDE.md
174
+ ```
175
+
176
+ - Keep `AGENTS.md` tracked. It remains the lightweight public project guide for
177
+ commands and conventions.
178
+ - Make `AGENTS.md` public-safe: keep project description, commands, testing gate,
179
+ and coding conventions, but remove or avoid DevFlow workflow explanations,
180
+ hidden adapter paths, workflow-document pointers, and core skill lists that
181
+ would expose the local-only workflow.
182
+ - Explain that local-only mode hides the workflow contents from the repo, but the
183
+ `.gitignore` names still reveal the ignored paths.
184
+ - Explain that DevFlow state, specs, findings, and history will not travel
185
+ with the repo; another machine needs DevFlow reinstalled or restored
186
+ locally.
187
+ - If any of `.agents/`, `.claude/`, `devflow/`, or
188
+ `CLAUDE.md` are already tracked, say `.gitignore` will not hide tracked files.
189
+ Ask before running
190
+ `git rm --cached -r .agents .claude devflow CLAUDE.md`, and
191
+ only run it if the user explicitly approves. Never delete the local files.
192
+
193
+ Then report which adapter folders are needed:
194
+
195
+ - Codex, Antigravity, and GitHub Copilot: keep `AGENTS.md`, `.agents/`, and `devflow/`; `CLAUDE.md` and
196
+ `.claude/` can be deleted.
197
+ - Claude Code only: keep `AGENTS.md`, `CLAUDE.md`, `.claude/`, and `devflow/`;
198
+ `.agents/` can be deleted.
199
+ - OpenCode: shares either `.agents/` or `.claude/` compatible skill tree without duplicate folders.
200
+ - Mixed tools: keep both `.agents/` and `.claude/` adapters.
201
+
202
+ Do not delete adapters unless the user explicitly asks.
203
+
204
+ ## Step 7 - hand off to planning
205
+
206
+ Stop with a concise onboarding report:
207
+
208
+ - stack and package manager detected
209
+ - project name used for entry files
210
+ - README handling, especially if the copied Blueprint README was moved
211
+ - Blueprint visibility choice
212
+ - tracked-file warning if local-only mode was chosen after files were already tracked
213
+ - files changed
214
+ - commands now available
215
+ - testing gate status
216
+ - verification command and GitHub checks status
217
+ - adapter recommendation
218
+ - TODOs or uncertainties
219
+ - exact next files for the user to fill in:
220
+ - `devflow/project-plan.md`
221
+ - `devflow/build-plan.md`
222
+
223
+ Make the direct path clear: the user can write or develop those files through
224
+ any conversation, then run `/overview`. Also mention `/discovery` or `$discovery`
225
+ as an optional deep planning conversation for users who want guided help. Do not
226
+ start it, make it a prerequisite, or imply that directly written plans are less
227
+ complete.
228
+
229
+ End with the next command:
230
+
231
+ ```text
232
+ /overview
233
+ ```
234
+
235
+ For Codex, also mention:
236
+
237
+ ```text
238
+ $overview
239
+ ```
122
240
 
123
- - Stack, framework, and package manager detected
124
- - Commands configured in `AGENTS.md`
125
- - Files tuned during onboarding
126
- - Adapter status (`.agents/`, `.claude/`)
127
- - Recommended next step:
128
- - Run `00-explore` (or `00-explore`, `$00-explore`) to explore the first feature or product direction
129
- - Run `10-define` (or `10-define`, `$10-define`) if the initial delivery slice is already clear and ready for execution
241
+ ## Rules
242
+
243
+ - Setup files are fair game; planning docs are user-owned.
244
+ - `/discovery` is optional and never runs as part of onboarding. The direct
245
+ plan-writing path must remain fully supported.
246
+ - Never overwrite real `project-plan.md` or `build-plan.md` content.
247
+ - Never run scaffolders or install dependencies unless the user explicitly asks.
248
+ - Reflect the stack that exists, not the stack the default Blueprint mentions.
249
+ - Be honest about tests. No `test` command means no required test gate yet.
250
+ - Keep `AGENTS.md` public in local-only mode unless the user explicitly asks for
251
+ a more advanced setup.
252
+ - Do not untrack Blueprint files with `git rm --cached` without a separate
253
+ explicit approval.
254
+ - Keep changes small and explain what changed.
255
+
256
+ ## Formatting
257
+
258
+ Format the output to match the project's conventions in
259
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
260
+ enumerations and tables for matrices rather than dense paragraphs.