@jakkrichm/create-nexus-devflow 2.17.8 → 2.18.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.
- package/README.md +9 -10
- package/dist/bin/create-nexus-devflow.js +52 -80
- package/dist/bin/create-nexus-devflow.js.map +1 -1
- package/dist/lib/doctor.js +0 -27
- package/dist/lib/doctor.js.map +1 -1
- package/dist/lib/history.js +2 -2
- package/dist/lib/history.js.map +1 -1
- package/dist/lib/skill-registry-engine.js +3 -3
- package/dist/lib/skill-registry-engine.js.map +1 -1
- package/dist/lib/tooling/commands/scan-doc-contract.js +1 -0
- package/dist/lib/tooling/commands/scan-doc-contract.js.map +1 -1
- package/dist/lib/ui.d.ts +0 -23
- package/dist/lib/ui.js +0 -85
- package/dist/lib/ui.js.map +1 -1
- package/dist/lib/update.d.ts +6 -1
- package/dist/lib/update.js +78 -7
- package/dist/lib/update.js.map +1 -1
- package/dist/scripts/prepare-template.js +7 -3
- package/dist/scripts/prepare-template.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/audit/SKILL.md +1 -4
- package/template/.agents/skills/brainstorm/SKILL.md +4 -5
- package/template/.agents/skills/bughunter/SKILL.md +1 -1
- package/template/.agents/skills/check/SKILL.md +116 -26
- package/template/.agents/skills/check/reference/guide.md +17 -53
- package/template/.agents/skills/ci/SKILL.md +13 -35
- package/template/.agents/skills/complete/SKILL.md +0 -2
- package/template/.agents/skills/devflow/SKILL.md +2 -3
- package/template/.agents/skills/discovery/SKILL.md +0 -9
- package/template/.agents/skills/doctor/SKILL.md +6 -6
- package/template/.agents/skills/feature/SKILL.md +1 -4
- package/template/.agents/skills/feature/reference/feature-spec-template.md +16 -16
- package/template/.agents/skills/fix/SKILL.md +3 -3
- package/template/.agents/skills/grill/SKILL.md +1 -6
- package/template/.agents/skills/idea/SKILL.md +6 -6
- package/template/.agents/skills/implement/SKILL.md +119 -45
- package/template/.agents/skills/setup-tests/reference/browser.md +95 -0
- package/template/.agents/skills/test/SKILL.md +0 -26
- package/template/.claude/skills/audit/SKILL.md +1 -4
- package/template/.claude/skills/brainstorm/SKILL.md +4 -5
- package/template/.claude/skills/bughunter/SKILL.md +1 -1
- package/template/.claude/skills/check/SKILL.md +116 -26
- package/template/.claude/skills/check/reference/guide.md +17 -53
- package/template/.claude/skills/ci/SKILL.md +13 -35
- package/template/.claude/skills/complete/SKILL.md +0 -2
- package/template/.claude/skills/devflow/SKILL.md +2 -3
- package/template/.claude/skills/discovery/SKILL.md +3 -11
- package/template/.claude/skills/doctor/SKILL.md +6 -6
- package/template/.claude/skills/feature/SKILL.md +1 -4
- package/template/.claude/skills/feature/reference/feature-spec-template.md +16 -16
- package/template/.claude/skills/fix/SKILL.md +3 -3
- package/template/.claude/skills/grill/SKILL.md +1 -6
- package/template/.claude/skills/idea/SKILL.md +6 -6
- package/template/.claude/skills/implement/SKILL.md +119 -45
- package/template/.claude/skills/setup-tests/reference/browser.md +95 -0
- package/template/.claude/skills/test/SKILL.md +0 -26
- package/template/AGENTS.md +39 -17
- package/template/devflow/build-plan.md +1 -1
- package/template/devflow/context/ai-interaction.md +14 -15
- package/template/devflow/context/coding-standards.md +19 -68
- package/template/devflow/context/glossary.md +6 -26
- package/template/devflow/decisions/README.md +1 -15
- package/template/devflow/docs/USAGE.md +194 -0
- package/template/devflow/docs/diagrams/nexus-devflow-architecture.html +14821 -0
- package/template/devflow/docs/diagrams/nexus-devflow-architecture.json +80 -0
- package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.html +14860 -0
- package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.json +88 -0
- package/template/devflow/docs/examples/living-spec/adr.example.md +43 -0
- package/template/devflow/docs/examples/living-spec/current-feature.example.md +113 -0
- package/template/devflow/docs/examples/living-spec/discovery.example.md +45 -0
- package/template/devflow/docs/examples/living-spec/ideas.example.md +22 -0
- package/template/devflow/docs/governance-rules.md +39 -0
- package/template/devflow/docs/manual-review-workflow-spec.md +116 -0
- package/template/devflow/docs/markdown-metadata-contract.md +140 -0
- package/template/devflow/docs/quickstart.md +124 -0
- package/template/devflow/docs/release-process.md +52 -0
- package/template/devflow/docs/skill-selection-policy.md +64 -0
- package/template/devflow/docs/workflow-surface-map.md +85 -0
- package/template/devflow/reference/feature-spec-template.md +79 -59
- package/template/devflow/runs/.gitkeep +1 -0
- package/template/.agents/skills/check/reference/verify.md +0 -129
- package/template/.agents/skills/explore/SKILL.md +0 -78
- package/template/.claude/skills/check/reference/verify.md +0 -129
- package/template/.claude/skills/explore/SKILL.md +0 -78
- package/template/devflow/reference/help-playbook-protocol.md +0 -33
- package/template/devflow/reference/slicing-archetypes.md +0 -105
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ci
|
|
3
|
-
description: "[devflow] Set up or normalize one project Verify command and matching GitHub Actions checks while preserving existing CI
|
|
4
|
-
argument-hint: "[--hook | --no-hook]"
|
|
3
|
+
description: "[devflow] Set up or normalize one project Verify command and matching GitHub Actions checks while preserving existing CI. Use for /ci, GitHub Actions setup, pull-request checks, automatic checks, or aligning verification."
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# ci - set up automatic GitHub checks
|
|
8
7
|
|
|
9
|
-
**Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.
|
|
10
|
-
|
|
11
8
|
**First action:** Before project inspection, preflight, or any other tool call,
|
|
12
9
|
publish `running` to `devflow/.state/run.json` using the dashboard activity
|
|
13
10
|
contract in `AGENTS.md`.
|
|
@@ -18,7 +15,7 @@ Where this sits in the workflow:
|
|
|
18
15
|
(project commands) (setup) (same recipe) (pull requests)
|
|
19
16
|
|
|
20
17
|
This skill gives local work and GitHub one shared automated command. It is an
|
|
21
|
-
optional setup task, not a requirement for using
|
|
18
|
+
optional setup task, not a requirement for using the Blueprint.
|
|
22
19
|
|
|
23
20
|
Keep the beginner explanation simple:
|
|
24
21
|
|
|
@@ -26,12 +23,9 @@ Keep the beginner explanation simple:
|
|
|
26
23
|
- **GitHub Actions is the worker.** It runs the same recipe automatically.
|
|
27
24
|
- **A GitHub ruleset is the lock.** That optional remote setting can require the
|
|
28
25
|
worker to report green before merge.
|
|
29
|
-
- **A pre-push hook is the early warning.** That optional local setting runs the
|
|
30
|
-
recipe before a push leaves the machine. It is a convenience, not the lock:
|
|
31
|
-
`git push --no-verify` skips it.
|
|
32
26
|
|
|
33
|
-
This skill configures the recipe and worker
|
|
34
|
-
|
|
27
|
+
This skill configures the recipe and worker. It never changes the remote ruleset,
|
|
28
|
+
pushes, publishes, deploys, or adds local git hooks.
|
|
35
29
|
|
|
36
30
|
## Input
|
|
37
31
|
|
|
@@ -53,7 +47,7 @@ Read enough to identify the real project setup:
|
|
|
53
47
|
- `.github/workflows/` and any documented external CI
|
|
54
48
|
- git's current branch, configured default branch, and remotes when available
|
|
55
49
|
|
|
56
|
-
Do not assume npm, Node.js, `main`, or GitHub from the
|
|
50
|
+
Do not assume npm, Node.js, `main`, or GitHub from the Blueprint template. Do not
|
|
57
51
|
run installs or edit files during inspection.
|
|
58
52
|
|
|
59
53
|
If an existing workflow already provides equivalent pull-request checks, explain
|
|
@@ -119,26 +113,11 @@ After the workflow exists, ask one question and default to no:
|
|
|
119
113
|
|
|
120
114
|
Also add a local pre-push hook that runs Verify before every push? [y/N]
|
|
121
115
|
|
|
122
|
-
Skip the question when the request already answered it (for example "/ci with
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
the exact `Verify` command from `AGENTS.md` with `exec`, so the command's
|
|
128
|
-
exit code is the hook's exit code.
|
|
129
|
-
2. Point git at the folder: `git config core.hooksPath .githooks`.
|
|
130
|
-
3. For JavaScript and TypeScript projects, add a `prepare` script,
|
|
131
|
-
`git config core.hooksPath .githooks 2>/dev/null || true`, so a fresh
|
|
132
|
-
install wires the hook without a manual step. The `|| true` keeps installs
|
|
133
|
-
working where no git checkout exists, such as a deploy build. For other
|
|
134
|
-
stacks, document the `git config` line in the README instead.
|
|
135
|
-
4. Run the hook once (`.githooks/pre-push`). If it fails, remove what this
|
|
136
|
-
step added and report the failing subcommand. Never leave a hook the
|
|
137
|
-
project cannot pass.
|
|
138
|
-
|
|
139
|
-
The hook and the workflow run the same `Verify` command; if one changes, the
|
|
140
|
-
other changes with it. Say in the report that `--no-verify` bypasses the hook,
|
|
141
|
-
so the GitHub ruleset remains the lock.
|
|
116
|
+
Skip the question when the request already answered it (for example "/ci with hook" or "no hook"). When the answer is no, write nothing and move on. When it is yes:
|
|
117
|
+
|
|
118
|
+
1. Use `npx nexus-devflow hook install pre-push` or configure `.githooks/pre-push` running the exact `Verify` command with `git config core.hooksPath .githooks`.
|
|
119
|
+
2. Run the hook once to verify it passes cleanly. If it fails, revert the hook setup and report the failure. Never leave a hook the project cannot pass.
|
|
120
|
+
3. Note that `git push --no-verify` bypasses the hook if an emergency push is ever needed.
|
|
142
121
|
|
|
143
122
|
## Step 4 - prove the setup locally
|
|
144
123
|
|
|
@@ -167,7 +146,6 @@ Finish with a concise setup report:
|
|
|
167
146
|
- checks included and checks omitted
|
|
168
147
|
- test gate status
|
|
169
148
|
- workflow path and triggers
|
|
170
|
-
- whether a pre-push hook was added, and that `--no-verify` bypasses it
|
|
171
149
|
- local Verify result and whether CI is only prepared locally or confirmed by a
|
|
172
150
|
successful GitHub run
|
|
173
151
|
- files changed
|
|
@@ -179,7 +157,7 @@ part of this skill.
|
|
|
179
157
|
|
|
180
158
|
## Interaction with other skills
|
|
181
159
|
|
|
182
|
-
- `/
|
|
160
|
+
- `/tests` adds the real test command to an existing Verify command, but never
|
|
183
161
|
creates CI by itself.
|
|
184
162
|
- `/implement`, `/complete`, and `/autopilot` run Verify when it is documented,
|
|
185
163
|
with their existing fallback behavior when it is absent.
|
|
@@ -190,8 +168,8 @@ part of this skill.
|
|
|
190
168
|
|
|
191
169
|
- Preserve existing CI and custom checks.
|
|
192
170
|
- Never invent tests or install a runner as part of CI setup.
|
|
193
|
-
- Never add coverage, browser tests, security scans, or matrices by
|
|
194
|
-
|
|
171
|
+
- Never add git hooks, coverage, browser tests, security scans, or matrices by
|
|
172
|
+
default.
|
|
195
173
|
- Never push or change a remote ruleset without separate explicit approval.
|
|
196
174
|
- Keep one exact Verify command shared by local work and GitHub.
|
|
197
175
|
|
|
@@ -106,8 +106,6 @@ Before logging or committing, run a short safety pass and report blockers only:
|
|
|
106
106
|
- no P0 or P1 finding in `devflow/context/{xxx-slug}/findings.md` is `open` or `fixed`.
|
|
107
107
|
`fixed` still blocks on purpose: the repair exists but no review has looked at
|
|
108
108
|
it - run `/audit` to close it. The only waivers are `accepted` or `invalid`.
|
|
109
|
-
- any `Status: Assumed` ADR in `devflow/decisions/` has been surfaced with its ratification plan noted.
|
|
110
|
-
|
|
111
109
|
|
|
112
110
|
Do not claim "passed", "verified", or "working" without naming the command,
|
|
113
111
|
route, screenshot, or output that proves it. Stop before Step 1 if required
|
|
@@ -36,8 +36,7 @@ When invoked without an argument (or when determining the next step), inspect:
|
|
|
36
36
|
|
|
37
37
|
### Default State Recommendations
|
|
38
38
|
- If no run is active and user wants to start a feature -> Recommend `/feature <name>`.
|
|
39
|
-
- If
|
|
40
|
-
- If the user requests a completed fix -> preserve the implementation and verification scope; draft the required spec internally and continue to `/implement` using existing authorization.
|
|
39
|
+
- If no run is active and user wants to fix a bug -> Recommend `/fix <bug>`.
|
|
41
40
|
- If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/feature IDEA-xxx` or `/discovery IDEA-xxx`.
|
|
42
41
|
- If no run is active and user wants deep architectural exploration -> Recommend `/discovery`.
|
|
43
42
|
- If user asks to check system health -> Recommend `doctor`.
|
|
@@ -49,7 +48,7 @@ When invoked without an argument (or when determining the next step), inspect:
|
|
|
49
48
|
| User Intent / Request Type | Recommended Skill | Normal Name / Alias | Lifecycle Path |
|
|
50
49
|
| :--- | :--- | :--- | :--- |
|
|
51
50
|
| **"Spec new feature / living spec"** | `feature` | `/feature` / `/spec` | **Unified**: `/feature` -> `/implement` -> `/check` -> `/complete` |
|
|
52
|
-
| **"
|
|
51
|
+
| **"Quick bugfix / ad-hoc change"** | `fix` | `/fix` | **Unified**: `/fix` -> `/implement` -> `/check` -> `/complete` |
|
|
53
52
|
| **"Capture quick idea / thought"** | `idea` | `/idea` | **Companion**: Enriches & saves to `devflow/ideas.md` |
|
|
54
53
|
| **"Pre-delivery exploration / research"**| `discovery`| `/discovery` | **Pre-Flight**: `discovery` -> `/feature` |
|
|
55
54
|
| **"Socratic alignment / ADR / glossary"**| `grill` | `/grill` / `/align` | **Pre-Flight**: `grill` -> `/feature` |
|
|
@@ -81,15 +81,6 @@ devflow/discoveries/{DISCOVERY_ID}-{slug}/discovery.md
|
|
|
81
81
|
- **For interactive system architecture, dataflows, state transitions, and sequence traces**: Use `archify` (`.agents/skills/archify/SKILL.md`) to compile validated interactive HTML artifacts with dark/light themes, motion, and route probes.
|
|
82
82
|
- **For editorial, business, quadrant, or broad diagram types**: Use `diagram-design` (`.agents/skills/diagram-design/SKILL.md`).
|
|
83
83
|
- Save diagram artifacts to `devflow/discoveries/{DISCOVERY_ID}-{slug}/diagrams/{name}.html` and reference them directly in `discovery.md`.
|
|
84
|
-
7. **🧩 Slicing & Decomposition Lens (4 Slicing Archetypes)**:
|
|
85
|
-
- When breaking down a large initiative into sub-features or milestones, evaluate against [`devflow/reference/slicing-archetypes.md`](file:///d:/Projects/devtools/nexus-devflow/devflow/reference/slicing-archetypes.md):
|
|
86
|
-
- **Skateboard**: Minimal functional loop (prove core logic end-to-end with minimal UI).
|
|
87
|
-
- **Facade**: Rich UI/DX with mock backend (validate user flow & interaction first).
|
|
88
|
-
- **Tracer Bullet**: Deep vertical slice across all layers (DB -> API -> UI) for 1 happy path.
|
|
89
|
-
- **Journey**: Slice along natural user workflow milestones.
|
|
90
|
-
- Recommend the primary Archetype for each proposed sub-feature in `discovery.md`.
|
|
91
|
-
|
|
92
|
-
|
|
93
84
|
|
|
94
85
|
### Decision & Approval Gate:
|
|
95
86
|
Set one visible decision:
|
|
@@ -100,10 +100,12 @@ Gather these, then summarize. Do not dump file contents.
|
|
|
100
100
|
report it as an obsolete installer artifact. Its absence is healthy. An
|
|
101
101
|
unchanged managed copy can be removed by the updater; a modified copy needs
|
|
102
102
|
user review.
|
|
103
|
-
- Check whether `AGENTS.md`
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
- Check whether `AGENTS.md` has substantive proportional-engineering guidance,
|
|
104
|
+
under `## Proportional engineering` or equivalent customized wording.
|
|
105
|
+
Accept equivalent guidance anywhere in the file; do not require exact prose.
|
|
106
|
+
Look for current requirements over hypothetical scale, reuse before new
|
|
107
|
+
machinery, smaller reversible defaults, questions for material unknowns,
|
|
108
|
+
and harmonization with `ponytail`.
|
|
107
109
|
- Check whether `AGENTS.md` has a `## Commands` section with dev and build
|
|
108
110
|
commands.
|
|
109
111
|
- Report missing lint or test commands as informational unless the project has
|
|
@@ -164,8 +166,6 @@ Gather these, then summarize. Do not dump file contents.
|
|
|
164
166
|
last commit subject, and whether the branch is ahead of upstream.
|
|
165
167
|
- If the directory is not a git repo, report that as a setup issue and keep
|
|
166
168
|
going.
|
|
167
|
-
9. **Token Economics & Session Cost Audit**
|
|
168
|
-
- When session transcript is available, report token efficiency, cache hit rate, and estimated model costs using `npm run analyze:tokens` or `scripts/analyze-token-usage.ts`.
|
|
169
169
|
|
|
170
170
|
## Output
|
|
171
171
|
|
|
@@ -102,8 +102,6 @@ the data model, stack, and conventions. Decide how big the feature is:
|
|
|
102
102
|
those sub-items back under the parent in `build-plan.md` as an indented
|
|
103
103
|
checklist (`4a`, `4b`, `4c` ...). Spec only the **first** sub-feature now; the
|
|
104
104
|
rest get picked up on later `/feature` runs.
|
|
105
|
-
*Use the **4 Slicing Archetypes** ([`devflow/reference/slicing-archetypes.md`](file:///d:/Projects/devtools/nexus-devflow/devflow/reference/slicing-archetypes.md)) to guide the split: 🛹 Skateboard (core logic first), 🎭 Facade (UI/DX mock first), 🎯 Tracer Bullet (end-to-end slice), or 🧭 Journey (workflow steps).*
|
|
106
|
-
|
|
107
105
|
|
|
108
106
|
Two levels of breakdown - don't confuse them:
|
|
109
107
|
|
|
@@ -200,7 +198,7 @@ Before the user reads it, turn on the spec yourself and try to break it. The
|
|
|
200
198
|
cheapest place to catch a scope problem or an oversized step is here, before any
|
|
201
199
|
code exists. Run the draft against these questions:
|
|
202
200
|
|
|
203
|
-
- **Coverage
|
|
201
|
+
- **Coverage.** What does this feature need that no step delivers? Push on the
|
|
204
202
|
unhappy paths the happy-path spec skipped: empty / missing / malformed input,
|
|
205
203
|
the error / loading / empty states, the first-run case, failure of anything
|
|
206
204
|
external it calls.
|
|
@@ -220,7 +218,6 @@ code exists. Run the draft against these questions:
|
|
|
220
218
|
anything pushed to "out of scope" that this feature actually can't ship without?
|
|
221
219
|
- **Done-whens.** Is each one observable and checkable by `/check`, or is it a
|
|
222
220
|
vague "it works"? Make it concrete.
|
|
223
|
-
- **Proportionality.** Does any proposed abstraction, dependency, service, config surface, or security mechanism lack a current requirement, or duplicate existing code/platform features? If so, remove it.
|
|
224
221
|
- **Testing.** Does the predicted coverage match the gate - in-scope logic gets a
|
|
225
222
|
test when a `test` command is declared in `AGENTS.md`, UI/integration rides on
|
|
226
223
|
screenshot + build?
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
## 1. Specification & Scope
|
|
15
15
|
|
|
16
16
|
### 1.1 Problem Statement
|
|
17
|
-
{
|
|
17
|
+
{คำอธิบายปัญหาและที่มาของความจำเป็นในการพัฒนาฟีเจอร์นี้}
|
|
18
18
|
|
|
19
19
|
### 1.2 In-Scope
|
|
20
|
-
1. {
|
|
21
|
-
2. {
|
|
20
|
+
1. {ขอบเขตการทำงานข้อที่ 1}
|
|
21
|
+
2. {ขอบเขตการทำงานข้อที่ 2}
|
|
22
22
|
|
|
23
23
|
### 1.3 Out-of-Scope
|
|
24
|
-
- {
|
|
24
|
+
- {สิ่งที่อยู่นอกเหนือขอบเขตหรือไม่ทำในรอบนี้}
|
|
25
25
|
|
|
26
|
-
### 1.4 Acceptance Criteria
|
|
27
|
-
- [ ] **AC-1**: {
|
|
28
|
-
- [ ] **AC-2**: {
|
|
26
|
+
### 1.4 Acceptance Criteria (เกณฑ์การยอมรับ)
|
|
27
|
+
- [ ] **AC-1**: {เกณฑ์การตรวจรับข้อที่ 1}
|
|
28
|
+
- [ ] **AC-2**: {เกณฑ์การตรวจรับข้อที่ 2}
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
- **Review Strategy**: One feature-level review packet at completion
|
|
41
41
|
|
|
42
42
|
### 2.3 Test Decision: Required (TDD) | Optional
|
|
43
|
-
- **Rationale**: {
|
|
43
|
+
- **Rationale**: {เหตุผลความจำเป็นในการเขียน Unit Tests / TDD}
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
47
|
## 3. Implementation Checklist (Strict TDD)
|
|
48
48
|
|
|
49
|
-
- [ ] **Task 1: {
|
|
50
|
-
- [ ] 1.1 `[TDD-Red]`: {
|
|
51
|
-
- [ ] 1.2 `[TDD-Green]`: {
|
|
52
|
-
- [ ] 1.3 `[TDD-Refactor]`: {Refactor
|
|
49
|
+
- [ ] **Task 1: {หัวข้องานที่ 1}**
|
|
50
|
+
- [ ] 1.1 `[TDD-Red]`: {เขียน Test เคสล้มเหลว}
|
|
51
|
+
- [ ] 1.2 `[TDD-Green]`: {เขียนโค้ดขั้นต่ำเพื่อให้ Test ผ่าน}
|
|
52
|
+
- [ ] 1.3 `[TDD-Refactor]`: {Refactor และตรวจให้ 100% Tests Green}
|
|
53
53
|
|
|
54
|
-
- [ ] **Task 2: {
|
|
54
|
+
- [ ] **Task 2: {หัวข้องานที่ 2}**
|
|
55
55
|
- [ ] 2.1 `[TDD-Red]`: ...
|
|
56
56
|
- [ ] 2.2 `[TDD-Green]`: ...
|
|
57
57
|
- [ ] 2.3 `[TDD-Refactor]`: ...
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
- **Automated Test Matrix**: TBD
|
|
66
66
|
- **Static Contract Verification**: TBD
|
|
67
67
|
- **Package Smoke Test**: TBD
|
|
68
|
-
- **Findings Ledger**:
|
|
68
|
+
- **Findings Ledger**: ตรวจสอบ `findings.md` สะอาด 100%
|
|
69
69
|
|
|
70
70
|
### 🎯 Axis 2: Spec Fidelity & Behavioral Acceptance Gate
|
|
71
|
-
- [ ] **AC-1**: {
|
|
72
|
-
- [ ] **AC-2**: {
|
|
71
|
+
- [ ] **AC-1**: {หลักฐานการผ่านเกณฑ์ข้อที่ 1}
|
|
72
|
+
- [ ] **AC-2**: {หลักฐานการผ่านเกณฑ์ข้อที่ 2}
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fix
|
|
3
|
-
description: "[devflow]
|
|
3
|
+
description: "[devflow] Write a task-isolated spec (devflow/context/{xxx-slug}/spec.md) for an ad-hoc bug fix or small unplanned change, then stop before implementation. Use for /fix, confirmed bugs, or small changes outside the build plan."
|
|
4
4
|
argument-hint: "[{title or issue-description}]"
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ it creates a dedicated run folder at `devflow/context/{xxx-slug}/` (e.g. `059-fi
|
|
|
23
23
|
## Input
|
|
24
24
|
|
|
25
25
|
A description of the bug or change, for example `/fix "password reset email never
|
|
26
|
-
sends"`.
|
|
26
|
+
sends"`. If the user just reported the problem in chat, use that.
|
|
27
27
|
|
|
28
28
|
The input may also be a finding ID from `devflow/context/{xxx-slug}/findings.md` (or previous findings), alone
|
|
29
29
|
or with a description, for example `/fix F-03`.
|
|
@@ -46,7 +46,7 @@ then write a short spec to `devflow/context/{xxx-slug}/spec.md`. Also initialize
|
|
|
46
46
|
big to read. Each ends with an observable "done when".
|
|
47
47
|
- **Verify** - how to confirm it's fixed (what to click or test).
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Then stop. Tell the user to review the fix spec, then run `/implement` to build it.
|
|
50
50
|
|
|
51
51
|
## Rules
|
|
52
52
|
|
|
@@ -70,14 +70,10 @@ Allocate the next sequential ID (`ADR-001`, `ADR-002`, ...) and create `devflow/
|
|
|
70
70
|
```markdown
|
|
71
71
|
# ADR-xxx: {Title}
|
|
72
72
|
|
|
73
|
-
- **Status**: Accepted
|
|
73
|
+
- **Status**: Accepted
|
|
74
74
|
- **Date**: {YYYY-MM-DD}
|
|
75
75
|
- **Context**: {Why was this decision needed? What problem does it solve?}
|
|
76
76
|
- **Decision**: {What did we decide to do?}
|
|
77
|
-
- **Assumption Metadata** *(Required when Status is Assumed)*:
|
|
78
|
-
- **Assumption**: {What was assumed to unblock progress}
|
|
79
|
-
- **Risk Level & Blast Radius**: {Risk if assumption fails}
|
|
80
|
-
- **Ratification Plan**: {Trigger, date, or test to ratify as Accepted or Rejected}
|
|
81
77
|
- **Alternatives Considered**:
|
|
82
78
|
- *Option 1*: {Pros / Cons}
|
|
83
79
|
- *Option 2*: {Pros / Cons}
|
|
@@ -86,7 +82,6 @@ Allocate the next sequential ID (`ADR-001`, `ADR-002`, ...) and create `devflow/
|
|
|
86
82
|
- *Trade-offs / Risks*: {Costs, constraints, or follow-ups}
|
|
87
83
|
```
|
|
88
84
|
|
|
89
|
-
|
|
90
85
|
---
|
|
91
86
|
|
|
92
87
|
## 4. Closing & Handoff
|
|
@@ -26,7 +26,7 @@ When invoked:
|
|
|
26
26
|
3. Allocate the next sequential ID (e.g. `IDEA-001`, `IDEA-002`).
|
|
27
27
|
|
|
28
28
|
### 2. AI Feasibility & Value Analysis
|
|
29
|
-
Evaluate the user's raw idea and generate an enriched entry:
|
|
29
|
+
Evaluate the user's raw idea and generate an enriched entry in Thai (`th` per user communication rules):
|
|
30
30
|
- **Raw Idea**: The user's input description
|
|
31
31
|
- **AI Feasibility & Tech**: Feasibility rating (Easy / Medium / Complex) along with recommended libraries, APIs, or architectural approaches
|
|
32
32
|
- **Value & Potential**: Business value, user benefits, and strategic impact
|
|
@@ -37,17 +37,17 @@ Insert the new idea block directly under `## 📌 Pending Ideas` in `devflow/ide
|
|
|
37
37
|
|
|
38
38
|
```markdown
|
|
39
39
|
### [IDEA-001] {Brief idea title}
|
|
40
|
-
-
|
|
41
|
-
-
|
|
40
|
+
- **บันทึกเมื่อ**: {YYYY-MM-DD}
|
|
41
|
+
- **ไอเดียตั้งต้น**: {User's raw idea text}
|
|
42
42
|
- **AI Feasibility & Tech**: {Feasibility and tooling analysis}
|
|
43
43
|
- **Value & Potential**: {Value and impact analysis}
|
|
44
|
-
- **Quick Seed**:
|
|
44
|
+
- **Quick Seed (กันลืม)**:
|
|
45
45
|
1. {Key point 1}
|
|
46
46
|
2. {Key point 2}
|
|
47
|
-
-
|
|
47
|
+
- **สถานะ**: `Pending` (Ready for pickup via `/feature IDEA-001` or `/discovery IDEA-001`)
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
*(If placeholder `*(
|
|
50
|
+
*(If placeholder `*(ยังไม่มีไอเดียค้างอยู่...)*` exists, remove it upon recording the first idea)*
|
|
51
51
|
|
|
52
52
|
### 4. Output Summary
|
|
53
53
|
Report to the user:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement
|
|
3
|
-
description: "[devflow]
|
|
3
|
+
description: "[devflow] Implement or start coding the active task-isolated spec on its branch in small steps, running tests after each step and presenting the configured review handoff. Use for /implement or requests to build or resume an approved spec."
|
|
4
4
|
argument-hint: "[{run-id, number, or name}] [--ticket <NN | path>]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# implement - build
|
|
7
|
+
# implement - build the target spec, one reviewed step at a time
|
|
8
8
|
|
|
9
9
|
**Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.
|
|
10
10
|
|
|
@@ -20,23 +20,17 @@ Where this sits in the workflow:
|
|
|
20
20
|
|
|
21
21
|
`/feature`, `/fix`, or `/rollback` wrote the spec to
|
|
22
22
|
`devflow/context/{xxx-slug}/spec.md` and stopped.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- `stepReview: "feature"`: continue through all authorized steps without asking Continue after each step. Record evidence as work proceeds and present one final review packet.
|
|
30
|
-
- `stepReview: "every"`: after a working step, show its diff and evidence, then wait for approval before the next step. A walkthrough is available on request.
|
|
31
|
-
- `checkpointCommits: "disabled"`: omit ordinary checkpoint offers.
|
|
32
|
-
- `checkpointCommits: "enabled"`: offer an optional checkpoint at the configured review boundary (per-step for `every`, final packet for `feature`). Show the exact candidate and obtain commit authorization before committing. The setting itself is not authorization.
|
|
33
|
-
|
|
34
|
-
Independent-review checkpoints follow their separate contract below. Review cadence never authorizes commit, merge, push, or deployment.
|
|
23
|
+
This skill turns that spec into code, following the build loop in
|
|
24
|
+
`devflow/context/ai-interaction.md`, without vibe coding: small steps, a visible diff plus
|
|
25
|
+
a plain-English explanation for each, testing, and iteration until it works, all
|
|
26
|
+
behind your approval. It builds on a branch and offers an optional commit
|
|
27
|
+
checkpoint after each step; the work-level commit, merging, and logging are
|
|
28
|
+
`/complete`'s job.
|
|
35
29
|
|
|
36
30
|
## Multi-Run Target & Ticket-Driven Target Resolution
|
|
37
31
|
|
|
38
|
-
- **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`,
|
|
39
|
-
- **With no argument** (`/implement`) -> checks
|
|
32
|
+
- **Given an ID or name** (e.g. `/implement 12`, `/implement 012`, `/implement kanban`) -> locates the matching run folder `devflow/context/{xxx-slug}/`, checks out `feature/{xxx-slug}`, and loads only that run's `spec.md`.
|
|
33
|
+
- **With no argument** (`/implement`) -> checks current git branch matching `feature/{xxx-slug}`, or auto-picks if only 1 spec is active in `devflow/context/`, or prompts the user if multiple specs are queued.
|
|
40
34
|
- **Ticket Input (`--ticket <NN | path>`)**: Targets a specific tracer-bullet ticket directly (e.g. `/implement 12 --ticket 01`, `/implement --ticket 02`, `/implement --ticket issues/01-auth.md`, or `/implement 01` when run-id is not ambiguous).
|
|
41
35
|
|
|
42
36
|
### Ticket Discovery Hierarchy
|
|
@@ -86,23 +80,23 @@ receipt. After the final Verify pass, an active gate routes to
|
|
|
86
80
|
`current` freshness may proceed toward `/complete`. This skill never approves
|
|
87
81
|
its own work or rewrites receipt evidence.
|
|
88
82
|
|
|
89
|
-
For browser-facing
|
|
83
|
+
For a browser-facing step, run `npm run test:browser` when the script exists and
|
|
84
|
+
record the result in the step evidence. Use `browseros-neo` for the interactive
|
|
85
|
+
handoff when it is available and the done-when is visual or behavioral. When the
|
|
86
|
+
script or MCP is absent, report that exact limitation; do not silently install a
|
|
87
|
+
runner or claim browser evidence.
|
|
90
88
|
|
|
91
89
|
**Resuming?** If the spec already has some build steps checked off (`- [x]`), this
|
|
92
90
|
feature was started earlier and interrupted (often a cleared context). The spec and
|
|
93
91
|
its ticked steps are files, so pick up where it left off: read which steps are done,
|
|
94
92
|
check the git branch and `git status`/log to see what is committed and what is still
|
|
95
93
|
in the working tree, then continue from the **first unchecked step** instead of
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Before touching code or executing build tasks, perform a positive **Input Coverage Test** against the active Living Spec:
|
|
99
|
-
- Enumerate every value, state, or data field this implementation must produce, compute, or display (from the acceptance criteria and spec design).
|
|
100
|
-
- For each required value, verify that the spec explicitly names where it comes from (e.g. database schema/column, API request parameter, calculated derivation from a named source, or explicit prior architectural decision).
|
|
101
|
-
- **Anti-Hallucination Guard**: Any required value with no named source is an **Owed Decision**. Do NOT rationalize it as "just wiring" and do NOT silently invent an ad-hoc provider, schema field, or business rule. Stop and route to `/grill` or request user clarification before proceeding.
|
|
94
|
+
starting over.
|
|
102
95
|
|
|
103
96
|
## Step 1 - branch
|
|
104
97
|
|
|
105
|
-
Create
|
|
98
|
+
Create and check out a branch named from the spec: `feature/{xxx-slug}` for a feature,
|
|
99
|
+
`fix/{xxx-slug}` for a fix, or `rollback/{xxx-slug}` for a Type: Rollback spec. If the
|
|
106
100
|
project isn't a git repo yet, say so and ask the user to run `git init` first;
|
|
107
101
|
the loop needs branches. On resume, the branch already exists - check it out
|
|
108
102
|
instead of creating a new one.
|
|
@@ -111,23 +105,99 @@ instead of creating a new one.
|
|
|
111
105
|
|
|
112
106
|
When implementing a rollback task, follow the exact safety procedure in `reference/rollback-implementation.md`.
|
|
113
107
|
|
|
114
|
-
## Step 2 -
|
|
115
|
-
|
|
116
|
-
Work
|
|
117
|
-
|
|
118
|
-
1.
|
|
119
|
-
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
108
|
+
## Step 2 - build one step, review, iterate, checkpoint (Strict TDD)
|
|
109
|
+
|
|
110
|
+
Work through the spec's build steps in order, one at a time. For each step:
|
|
111
|
+
|
|
112
|
+
1. **Strict TDD Cycle (for logic & behavior changes)**:
|
|
113
|
+
- **🔴 RED**: Write the unit test first in the relevant test file. Execute the test command and show the failing assertion output.
|
|
114
|
+
- **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
|
|
115
|
+
- **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
|
|
116
|
+
- *Code Reversion Rule*: If production code is written without a prior test for behavior changes, revert it and write the test first.
|
|
117
|
+
|
|
118
|
+
**⚖️ The Iron Law**: `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` — Apply to behavior changes according to the spec's test decision. If code came first, revert only your own work for that step and restart from the test, preserving the user's existing work.
|
|
119
|
+
|
|
120
|
+
**Red-Phase Verification (confirm all three before GREEN):**
|
|
121
|
+
- The test actually fails, rather than encountering a syntax error
|
|
122
|
+
- The error message identifies missing behavior, rather than invalid configuration
|
|
123
|
+
- The failure reflects the behavior under test, rather than a bug in the test itself
|
|
124
|
+
|
|
125
|
+
**Green-Phase Discipline**: Write the minimum code needed to pass the test; add only the options/features it requires (YAGNI constraint).
|
|
126
|
+
|
|
127
|
+
> 📖 For anti-patterns and Bad vs Good examples, read [`tdd-anti-patterns.md`](tdd-anti-patterns.md).
|
|
128
|
+
|
|
129
|
+
2. Implement just that step: the smallest change that satisfies its "done when."
|
|
130
|
+
3. Show the **diff**, not whole files.
|
|
131
|
+
4. **Explain it, and prove it.** Give a short summary: what the step delivered,
|
|
132
|
+
one line per changed file on what it does and why, then confirm the step's
|
|
133
|
+
"done when" is met with empirical evidence (test pass output, build output, or screenshot). This summary is the comprehension gate, so keep it concrete, not
|
|
134
|
+
vague. Include a short **How to try it** note when the step has a manual
|
|
135
|
+
path: the command, URL, click, endpoint, or output the user can check.
|
|
136
|
+
5. **Verify the step.** If `AGENTS.md` declares a `Verify` command, run that exact
|
|
137
|
+
command as the automated gate. It is only an umbrella for checks the project
|
|
138
|
+
actually has, so do not invent tests or other checks to satisfy it. If no
|
|
139
|
+
`Verify` command exists, run the documented build command and the test command
|
|
140
|
+
when the project declares one. A step that adds logic must ship a passing test
|
|
141
|
+
in the same diff when the test gate is on, and the suite must be green before
|
|
142
|
+
the step is approved (see the Testing gate in `coding-standards.md`). UI and
|
|
143
|
+
integration-only steps ride on screenshot plus build evidence. Run a focused
|
|
144
|
+
test separately when it gives faster feedback, then use `Verify` as the final
|
|
145
|
+
automated gate. For UI or integration done-whens, prefer Playwright when it is
|
|
146
|
+
already installed or declared in `AGENTS.md`; do not add it silently for an
|
|
147
|
+
unrelated feature. Create focused test files next to the source they cover,
|
|
148
|
+
per `coding-standards.md`. Never install a runner mid-step unless the current
|
|
149
|
+
spec is explicitly the unit-testing setup itself (for example `/fix "add unit
|
|
150
|
+
testing"`). If a step surfaces non-trivial logic the spec did not foresee, add
|
|
151
|
+
a focused test then, or note why not. When a step's done-when is behavioral (a
|
|
152
|
+
click, a download, or a flow across screens), run `/check` to prove it against
|
|
153
|
+
the running app rather than eyeballing it.
|
|
154
|
+
5. **Iterate until it works.** If it fails or the user wants changes, revise the
|
|
155
|
+
step (re-prompt or hand-edit the code), show the updated diff, and re-test.
|
|
156
|
+
Repeat until it works and the user approves. Nothing is committed until the
|
|
157
|
+
user is happy with the step.
|
|
158
|
+
6. **Mark it done, then prompt to move on.** Once the step is approved, check that
|
|
159
|
+
step off (`- [x]`) in `devflow/context/{xxx-slug}/spec.md` so progress survives a context
|
|
160
|
+
clear. If the step repaired a finding tracked in
|
|
161
|
+
`devflow/context/{xxx-slug}/findings.md`, set that finding's status to `fixed` now too
|
|
162
|
+
and note the repair in its **Resolution** line. Never set `closed`: a repair
|
|
163
|
+
is re-reviewed by `/audit` before it clears, because a fix can introduce a
|
|
164
|
+
worse defect than the one it removed. Then offer a short choice, noting that checkpoints are optional since
|
|
165
|
+
`/complete` makes the real feature-level commit. Use the current tool's short
|
|
166
|
+
user-input prompt when available; when you've just produced a long block to
|
|
167
|
+
read (a deep explanation, a big
|
|
168
|
+
walk-through), ask in plain text instead, so the prompt doesn't cover what the
|
|
169
|
+
user is still reading:
|
|
170
|
+
- **Continue** (default) - roll into the next step without committing.
|
|
171
|
+
- **Commit checkpoint** - commit just this step on the branch with a
|
|
172
|
+
conventional message (a cheap rollback point).
|
|
173
|
+
- **Walk me through it** - give a deeper, line-level explanation of the new or
|
|
174
|
+
changed code (why this approach, what each part does, any gotchas), then
|
|
175
|
+
re-ask this checkpoint prompt. A loop-back, not a terminal choice.
|
|
176
|
+
- **Stop here** - pause the loop so the user can review or come back later.
|
|
177
|
+
|
|
178
|
+
On **Continue** or after **Commit checkpoint**, go to the next step. On **Walk
|
|
179
|
+
me through it**, explain in depth and then re-ask this prompt in plain text (the
|
|
180
|
+
explanation is long, so a modal would cover it). On **Stop here**, stop and say
|
|
181
|
+
where things stand: the branch is intact; run `/implement` again to resume, or
|
|
182
|
+
`/complete` to wrap up what's built so far.
|
|
183
|
+
|
|
184
|
+
### Ticket-Driven TDD Execution (when working from a Ticket)
|
|
185
|
+
|
|
186
|
+
When executing a tracer-bullet ticket (via `--ticket` or auto-frontier):
|
|
187
|
+
1. **Extract Scope**: Read *What to build* and *Acceptance criteria* checklist (`- [ ]`) from the active ticket file.
|
|
188
|
+
2. **Strict TDD Cycle per Criterion**:
|
|
189
|
+
- **🔴 RED**: Write the unit/integration test for the criterion first at the agreed seam. Execute the test command and verify the expected failing assertion.
|
|
190
|
+
- **🟢 GREEN**: Implement only the minimal code in the source file necessary to make the test pass. Re-run test and show passing output.
|
|
191
|
+
- **🔵 REFACTOR**: Refactor and format cleanly, verifying that 100% of tests remain green.
|
|
192
|
+
3. **Verify Gate**: Run the project's Verify command (`npm run check` or documented test suite) to ensure whole-system health before concluding the ticket.
|
|
193
|
+
4. **Bidirectional State Sync**:
|
|
194
|
+
- Mark each completed criterion `- [x]` in the ticket file.
|
|
195
|
+
- Once all criteria in the ticket pass, update the ticket status to `**Status:** done` (or `Status: done`).
|
|
196
|
+
- Mirror the completed work, status, and diff evidence into `devflow/context/{xxx-slug}/spec.md` (under `## 📋 3. Execution Plan & TDD Checklist` and `## ⚡ 4. Implementation Log & Evidence`) so the Living Spec remains the authoritative single source of truth for `/check`, `/audit`, and `/complete`.
|
|
197
|
+
|
|
198
|
+
Never batch the whole thing into one diff. If a step's diff is too big to read,
|
|
199
|
+
split it. The documented `Verify` command, or the fallback build and tests, must
|
|
200
|
+
pass before any commit.
|
|
131
201
|
|
|
132
202
|
After final Verify and required Check pass, set the active spec to `verified`
|
|
133
203
|
with every completed box checked. Then resolve independent review before the
|
|
@@ -200,19 +270,23 @@ named area. If the feature spans too many distinct areas for one useful pass,
|
|
|
200
270
|
name the sections first and let the user choose where to begin. Remain read-only
|
|
201
271
|
unless the user separately requests changes.
|
|
202
272
|
|
|
203
|
-
|
|
273
|
+
Never create an ordinary step, product, or work-level commit from this skill.
|
|
274
|
+
The sole exception is exactly one immutable independent-review checkpoint after
|
|
275
|
+
showing its exact candidate and receiving current explicit commit approval.
|
|
276
|
+
Configuration never supplies that approval. Never merge, push, deploy, publish,
|
|
204
277
|
or start unrelated work from this skill.
|
|
205
278
|
|
|
206
279
|
## Rules
|
|
207
280
|
|
|
208
|
-
-
|
|
281
|
+
- One small step per diff; the user reviews and approves each before any commit.
|
|
209
282
|
- Explain every change in plain English. Understanding the code is the point.
|
|
210
283
|
- Iterate on the branch until each step works; never commit code the user hasn't
|
|
211
284
|
approved.
|
|
212
285
|
- Follow `devflow/context/coding-standards.md` (server vs client, scope user-owned queries
|
|
213
286
|
by the authenticated user id, validate inputs, and so on).
|
|
214
|
-
-
|
|
215
|
-
|
|
287
|
+
- Build only what the spec says. If the spec is wrong or thin, stop and fix the
|
|
288
|
+
spec first, do not improvise.
|
|
289
|
+
- Per-step commits are optional checkpoints. The work-level commit, the merge,
|
|
216
290
|
and any push are `/complete`'s job.
|
|
217
291
|
- For Type: Rollback, reverse only the approved product diff and preserve all
|
|
218
292
|
protected Blueprint paths.
|