@jakkrichm/create-nexus-devflow 2.16.4 → 2.17.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.
- package/dist/bin/create-nexus-devflow.d.ts +1 -1
- package/dist/bin/create-nexus-devflow.js +77 -4
- package/dist/bin/create-nexus-devflow.js.map +1 -1
- package/dist/lib/doctor.js +2 -1
- package/dist/lib/doctor.js.map +1 -1
- package/dist/lib/project-config.js +2 -1
- package/dist/lib/project-config.js.map +1 -1
- package/dist/lib/project-status-engine.d.ts +11 -3
- package/dist/lib/project-status-engine.js +99 -17
- package/dist/lib/project-status-engine.js.map +1 -1
- package/dist/lib/review.d.ts +1 -0
- package/dist/lib/review.js +58 -3
- package/dist/lib/review.js.map +1 -1
- package/dist/lib/skill-registry-engine.js +1 -1
- package/dist/lib/skill-registry-engine.js.map +1 -1
- package/dist/lib/status.d.ts +3 -3
- package/dist/lib/status.js +2 -2
- package/dist/lib/status.js.map +1 -1
- package/dist/lib/tooling/commands/migrate-structure.d.ts +8 -0
- package/dist/lib/tooling/commands/migrate-structure.js +200 -0
- package/dist/lib/tooling/commands/migrate-structure.js.map +1 -0
- package/dist/lib/tooling/commands/summarize-run-status.js +3 -1
- package/dist/lib/tooling/commands/summarize-run-status.js.map +1 -1
- package/dist/lib/tooling/registry.js +2 -0
- package/dist/lib/tooling/registry.js.map +1 -1
- package/dist/lib/update.d.ts +34 -3
- package/dist/lib/update.js +142 -1
- package/dist/lib/update.js.map +1 -1
- package/dist/lib/workspace-paths.d.ts +16 -0
- package/dist/lib/workspace-paths.js +85 -0
- package/dist/lib/workspace-paths.js.map +1 -0
- package/dist/scripts/prepare-template.js +75 -15
- package/dist/scripts/prepare-template.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/analyze/SKILL.md +21 -21
- package/template/.agents/skills/audit/SKILL.md +36 -18
- package/template/.agents/skills/audit/reference/independent-review.md +58 -2
- package/template/.agents/skills/brainstorm/SKILL.md +1 -1
- package/template/.agents/skills/complete/SKILL.md +23 -1
- package/template/.agents/skills/complete/reference/completion-recovery.md +248 -0
- package/template/.agents/skills/continuous/SKILL.md +156 -82
- package/template/.agents/skills/feature/SKILL.md +6 -0
- package/template/.agents/skills/feature/reference/build-history.md +79 -0
- package/template/.agents/skills/idea/SKILL.md +14 -14
- package/template/.agents/skills/rollback/SKILL.md +23 -10
- package/template/.claude/skills/analyze/SKILL.md +21 -21
- package/template/.claude/skills/audit/SKILL.md +33 -16
- package/template/.claude/skills/audit/reference/independent-review.md +58 -2
- package/template/.claude/skills/brainstorm/SKILL.md +1 -1
- package/template/.claude/skills/complete/SKILL.md +23 -1
- package/template/.claude/skills/complete/reference/completion-recovery.md +248 -0
- package/template/.claude/skills/continuous/SKILL.md +156 -82
- package/template/.claude/skills/feature/SKILL.md +6 -0
- package/template/.claude/skills/feature/reference/build-history.md +79 -0
- package/template/.claude/skills/idea/SKILL.md +14 -14
- package/template/.claude/skills/rollback/SKILL.md +23 -10
- package/template/AGENTS.md +11 -10
- package/template/devflow/{context → 00-context}/ai-interaction.md +1 -1
- package/template/devflow/{build-plan.md → 30-planning/build-plan.md} +24 -0
- package/template/devflow/40-tasks/.gitkeep +0 -0
- package/template/devflow/40-tasks/README.md +11 -0
- package/template/devflow/60-docs/migration-guide-decade-numbered.md +93 -0
- package/template/devflow/config.json +1 -0
- /package/template/devflow/{context → 00-context}/coding-standards.md +0 -0
- /package/template/devflow/{context → 00-context}/glossary.md +0 -0
- /package/template/devflow/{context → 00-context}/project-overview.md +0 -0
- /package/template/devflow/{ideas.md → 10-ideation/ideas.md} +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/build-plan-template.md +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/feature-spec-template.md +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/mockup.html +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/project-overview-template.md +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/project-plan-template.md +0 -0
- /package/template/devflow/{reference → 10-ideation/reference}/running-id-contract.md +0 -0
- /package/template/devflow/{decisions → 20-discovery/decisions}/.gitkeep +0 -0
- /package/template/devflow/{decisions → 20-discovery/decisions}/README.md +0 -0
- /package/template/devflow/{discoveries → 20-discovery/discoveries}/.gitkeep +0 -0
- /package/template/devflow/{project-plan.md → 30-planning/project-plan.md} +0 -0
- /package/template/devflow/{history → 50-history}/HISTORY.md +0 -0
- /package/template/devflow/{history → 50-history}/features/README.md +0 -0
- /package/template/devflow/{history → 50-history}/fixes/README.md +0 -0
- /package/template/devflow/{history → 50-history}/rollbacks/README.md +0 -0
- /package/template/devflow/{docs → 60-docs}/USAGE.md +0 -0
- /package/template/devflow/{docs → 60-docs}/diagrams/nexus-devflow-architecture.html +0 -0
- /package/template/devflow/{docs → 60-docs}/diagrams/nexus-devflow-architecture.json +0 -0
- /package/template/devflow/{docs → 60-docs}/diagrams/nexus-devflow-lifecycle.html +0 -0
- /package/template/devflow/{docs → 60-docs}/diagrams/nexus-devflow-lifecycle.json +0 -0
- /package/template/devflow/{docs → 60-docs}/examples/living-spec/adr.example.md +0 -0
- /package/template/devflow/{docs → 60-docs}/examples/living-spec/current-feature.example.md +0 -0
- /package/template/devflow/{docs → 60-docs}/examples/living-spec/discovery.example.md +0 -0
- /package/template/devflow/{docs → 60-docs}/examples/living-spec/ideas.example.md +0 -0
- /package/template/devflow/{docs → 60-docs}/governance-rules.md +0 -0
- /package/template/devflow/{docs → 60-docs}/manual-review-workflow-spec.md +0 -0
- /package/template/devflow/{docs → 60-docs}/markdown-metadata-contract.md +0 -0
- /package/template/devflow/{docs → 60-docs}/quickstart.md +0 -0
- /package/template/devflow/{docs → 60-docs}/release-process.md +0 -0
- /package/template/devflow/{docs → 60-docs}/skill-selection-policy.md +0 -0
- /package/template/devflow/{docs → 60-docs}/workflow-surface-map.md +0 -0
|
@@ -6,6 +6,8 @@ argument-hint: "[{resume, max-features, or start-feature}]"
|
|
|
6
6
|
|
|
7
7
|
# continuous - Complete the Build Plan One Local Feature at a Time
|
|
8
8
|
|
|
9
|
+
**Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.
|
|
10
|
+
|
|
9
11
|
**First action:** Before project inspection, preflight, or any other tool call,
|
|
10
12
|
publish `running` to `devflow/.state/run.json` using the dashboard activity
|
|
11
13
|
contract in `AGENTS.md`.
|
|
@@ -19,120 +21,192 @@ Where this sits in the workflow:
|
|
|
19
21
|
Gates ➔ Merge)
|
|
20
22
|
```
|
|
21
23
|
|
|
22
|
-
`/continuous`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
24
|
+
Continuous Mode (`/continuous` or `$continuous`) is an explicit opt-in loop for
|
|
25
|
+
completing planned features serially from `devflow/build-plan.md` in local isolation
|
|
26
|
+
without pausing at normal human review prompts. It preserves the same strict
|
|
27
|
+
**The 3-Pillars Model & Task-Isolated Living Spec (`devflow/context/{xxx-slug}/spec.md`)**,
|
|
28
|
+
disciplined TDD verification, quality gates, findings ledger, branch isolation, and
|
|
29
|
+
one clean local main commit per feature that a careful human workflow would produce.
|
|
30
|
+
|
|
31
|
+
### Authorized Local Actions for this Run:
|
|
32
|
+
- Create and switch local feature branches (`feature/{xxx-slug}`)
|
|
33
|
+
- Create configured checkpoint commits on those branches
|
|
34
|
+
- Create required immutable independent-review checkpoints
|
|
35
|
+
- Create the final local feature commit
|
|
36
|
+
- Squash-merge a completed feature into the local default branch (`main`)
|
|
37
|
+
- Delete the merged local feature branch
|
|
38
|
+
- Repeat with the next unchecked build-plan item
|
|
39
|
+
|
|
40
|
+
### Strict Safety Boundaries:
|
|
41
|
+
- **NEVER** push to remote repositories
|
|
42
|
+
- **NEVER** deploy or publish externally
|
|
43
|
+
- **NEVER** delete production data, destroy databases, or run irreversible migrations
|
|
44
|
+
- **NEVER** accept findings or waive failing quality gates on behalf of the user
|
|
45
|
+
- Always stop before those actions and hand off to the user
|
|
38
46
|
|
|
39
47
|
---
|
|
40
48
|
|
|
41
49
|
## Input & Target Selection
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
Before selecting a new feature or requiring an active live spec, always inspect
|
|
52
|
+
pending completion using the installed Complete skill and
|
|
53
|
+
`../complete/reference/completion-recovery.md`. Use its read-only candidate screen
|
|
54
|
+
first: settled clean default-branch history needs no historical transient objects
|
|
55
|
+
for a new run. An actual completion candidate or an explicit request to resume
|
|
56
|
+
interrupted completion requires full recovery proof, using this run's scoped Git
|
|
57
|
+
authority and `qualityGates.continuous`. Do not repeat archival or a work commit/merge.
|
|
58
|
+
Missing, conflicting, or unprovable recovery evidence stops before next-feature work.
|
|
59
|
+
An active feature with no completion candidate resumes implementation normally; its
|
|
60
|
+
ordinary `resume` does not require an archive or completion proof.
|
|
61
|
+
|
|
62
|
+
With no argument after pending completion has been reconciled:
|
|
63
|
+
|
|
64
|
+
1. Resume an active feature in `devflow/context/{xxx-slug}/spec.md`.
|
|
65
|
+
2. Otherwise select the next unchecked leaf item (`- [ ]`) in `devflow/build-plan.md`.
|
|
66
|
+
3. Continue in build-plan order until no unchecked leaf remains or
|
|
67
|
+
`continuous.maxFeatures` completed features have been counted.
|
|
68
|
+
|
|
69
|
+
`resume` explicitly resumes the active feature or its pending completion.
|
|
70
|
+
A feature number or name may set the starting item only when no different work item
|
|
71
|
+
is active. After that item, continue with the next unchecked leaf items in normal
|
|
72
|
+
build-plan order.
|
|
73
|
+
|
|
74
|
+
Continuous Mode handles planned features only. If the active work is a fix or rollback,
|
|
75
|
+
stop and point to its normal reviewed workflow. Never overwrite active work to make
|
|
76
|
+
the requested target fit.
|
|
49
77
|
|
|
50
78
|
---
|
|
51
79
|
|
|
52
|
-
## Step 1: Preflight Safety Check
|
|
80
|
+
## Step 1: Preflight Safety Check
|
|
53
81
|
|
|
54
|
-
|
|
82
|
+
Read initial context:
|
|
55
83
|
- `AGENTS.md`
|
|
56
|
-
- `devflow/config.json` (
|
|
57
|
-
- `devflow/project-plan.md`
|
|
84
|
+
- `devflow/config.json` (if missing, use safe defaults; if invalid, stop and point to `/doctor`)
|
|
85
|
+
- `devflow/project-plan.md` and `devflow/build-plan.md`
|
|
58
86
|
- `devflow/context/project-overview.md`
|
|
59
|
-
- `devflow/context/{xxx-slug}/` (
|
|
60
|
-
- `devflow/context/coding-standards.md`
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
###
|
|
64
|
-
1.
|
|
65
|
-
2.
|
|
66
|
-
|
|
67
|
-
|
|
87
|
+
- `devflow/context/{xxx-slug}/` (if work is already active)
|
|
88
|
+
- `devflow/context/coding-standards.md` and `devflow/context/ai-interaction.md`
|
|
89
|
+
- Git status (`git status`, `git branch`, default branch, and recent log)
|
|
90
|
+
|
|
91
|
+
### Start Conditions:
|
|
92
|
+
1. The project is a Git repository.
|
|
93
|
+
2. The working tree is clean on the default branch, or all dirty work belongs to the
|
|
94
|
+
active feature on its matching configured feature branch, including proven pending
|
|
95
|
+
completion handled through the recovery contract.
|
|
96
|
+
3. `devflow/build-plan.md` is a valid ordered checkbox plan with at least one remaining leaf.
|
|
97
|
+
4. Overview is fresh. If stale but both plans are clear and consistent, refresh it
|
|
98
|
+
using `/overview` behavior and include that change with the first feature.
|
|
99
|
+
5. Existing P0 or P1 findings are not `open` or `fixed`.
|
|
100
|
+
6. Project commands and the exact `Verify` command, when declared, are usable.
|
|
101
|
+
7. Record the starting default-branch commit SHA for the final integration summary.
|
|
102
|
+
|
|
103
|
+
The initial `devflow/.state/run.json` record required by `AGENTS.md` must already show
|
|
104
|
+
command `continuous` and status `running` before preflight begins. After preflight passes,
|
|
105
|
+
enrich it with boundary `local-only`, the current feature, and completed-feature progress
|
|
106
|
+
against the smaller of the remaining queue or configured limit. Update it when a feature
|
|
107
|
+
starts, after every passing build step, after each quality gate, and after each local main
|
|
108
|
+
commit. On a stop, set status `blocked` with `/continuous resume` when resuming is safe.
|
|
109
|
+
At the end of the queue or limit, set status `completed`.
|
|
68
110
|
|
|
69
111
|
---
|
|
70
112
|
|
|
71
|
-
## Step 2: Serial Feature Lifecycle
|
|
113
|
+
## Step 2: Serial Feature Lifecycle
|
|
72
114
|
|
|
73
|
-
|
|
115
|
+
Execute the loop one feature at a time in strict order:
|
|
74
116
|
|
|
75
|
-
### 2.1 Select & Spec
|
|
76
|
-
-
|
|
77
|
-
-
|
|
117
|
+
### 2.1 Select & Spec
|
|
118
|
+
- If resuming: Reuse the existing spec in `devflow/context/{xxx-slug}/spec.md`.
|
|
119
|
+
- If new feature: Extract requirements from `devflow/build-plan.md` and initialize the
|
|
120
|
+
task workspace at `devflow/context/{xxx-slug}/` with `spec.md`, `stage.md`, and `findings.md`.
|
|
121
|
+
Check `../feature/reference/build-history.md` for `--build-N` naming conventions if
|
|
122
|
+
rebuilding a previously rolled-back feature, ensuring existing archives in
|
|
123
|
+
`devflow/history/features/` are never overwritten. Self-review the spec before coding.
|
|
78
124
|
|
|
79
125
|
### 2.2 Create / Resume Feature Branch
|
|
80
|
-
-
|
|
126
|
+
- Use the configured branch prefix (e.g., `feature/{xxx-slug}`) from the current local default branch.
|
|
127
|
+
- When resuming, require the existing branch and active spec to agree.
|
|
128
|
+
- If switching would strand unrelated work or the default branch changed unsafely, stop.
|
|
129
|
+
Never stash, reset, or discard work automatically.
|
|
81
130
|
|
|
82
131
|
### 2.3 Implement Small Steps with Strict TDD
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
132
|
+
Execute the spec in order, one small diff at a time:
|
|
133
|
+
1. `[TDD-Red]`: Write the failing unit test first.
|
|
134
|
+
2. `[TDD-Green]`: Implement the minimal code to pass the test.
|
|
135
|
+
3. `[TDD-Refactor]`: Clean up and ensure all verifications pass cleanly.
|
|
136
|
+
4. Check off the step (`- [x]`) in `spec.md`.
|
|
137
|
+
5. When `workflow.checkpointCommits` is `enabled`, create a conventional local
|
|
138
|
+
checkpoint commit containing that passing step and its checked spec state.
|
|
139
|
+
When `disabled`, keep the work uncommitted until feature completion.
|
|
88
140
|
|
|
89
141
|
### 2.4 Apply Continuous Quality Gates
|
|
90
|
-
|
|
91
|
-
- **Audit**: `manual`
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
142
|
+
Evaluate `qualityGates.continuous` in `devflow/config.json`:
|
|
143
|
+
- **Audit**: `manual` skips automatic audit; `when-sensitive` runs `/audit current`
|
|
144
|
+
for authentication, authorization, payments, secrets, personal or user data, migrations,
|
|
145
|
+
destructive operations, external side effects, security boundaries, or unusually broad changes;
|
|
146
|
+
`always` audits every feature.
|
|
147
|
+
- **Independent Review**: Read `qualityGates.continuous.independentReview`; `manual` skips
|
|
148
|
+
automatic review; `when-sensitive` requires an isolated reviewer for the same sensitive
|
|
149
|
+
categories as Audit; `always` requires an isolated reviewer for every feature. A passing
|
|
150
|
+
independent receipt satisfies the Audit gate for that feature.
|
|
151
|
+
- **Check**: `manual` skips automatic `/check`; `when-behavioral` runs it when a done-when
|
|
152
|
+
needs observed runtime behavior (UI, CLI, API, background job); `always` checks every feature.
|
|
153
|
+
- **Try Guide**: `manual` skips automatic generation; `when-user-facing` generates a guide
|
|
154
|
+
for UI, CLI, or user-facing workflows; `always` generates one for every feature.
|
|
155
|
+
|
|
156
|
+
Run required gates in order: check, review, then try guide. When independent review is
|
|
157
|
+
selected, ensure application code is in a clean immutable checkpoint. First rerun final
|
|
158
|
+
verification and selected Check gate and set spec status to `verified`. This review
|
|
159
|
+
checkpoint is covered by Continuous Mode authority even when step checkpoint commits are
|
|
160
|
+
disabled. Follow `/audit independent current`.
|
|
161
|
+
|
|
162
|
+
With `review.independentExecution: "automatic"`, spawn and wait for the isolated reviewer
|
|
163
|
+
subagent and validate its receipt before continuing. With `manual`, or when runtime cannot
|
|
164
|
+
prove isolation, identity, model, or completion, set activity to `ready` and stop with the
|
|
165
|
+
manual handoff. Continuous Mode never audits its own work.
|
|
166
|
+
|
|
167
|
+
The request records `Requested execution`; the receipt records `Actual execution`. Require
|
|
168
|
+
the execution and reviewer-context pairing defined by the review contract. A pending request
|
|
169
|
+
without `Requested execution` is legacy manual-only.
|
|
170
|
+
|
|
171
|
+
For browser-facing features, run `npm run test:browser` when `test:browser` script exists
|
|
172
|
+
and collect interactive evidence via `browseros-neo` when available.
|
|
110
173
|
|
|
111
174
|
### 2.5 Repair Findings
|
|
112
|
-
-
|
|
113
|
-
|
|
175
|
+
- Automatically repair confirmed P0 and P1 findings directly caused by the feature, up to
|
|
176
|
+
`continuous.maxRepairAttempts` times.
|
|
177
|
+
- After repair, rerun affected verification and re-audit the repaired area.
|
|
178
|
+
- Any unresolved P0 or P1 finding left `open` or `fixed` stops the loop before completion.
|
|
114
179
|
|
|
115
180
|
### 2.6 Complete Locally Like a Human
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
181
|
+
Apply the `/complete` safety, logging, and archive behavior without asking commit and merge prompts:
|
|
182
|
+
1. Run final documented verification.
|
|
183
|
+
2. Confirm the current spec status is `verified`.
|
|
184
|
+
3. Capture source tree / annotation proof per `../complete/reference/completion-recovery.md`
|
|
185
|
+
and embed `<!-- devflow:completion {...} -->` in the archive.
|
|
186
|
+
4. Place the archive at `devflow/history/features/{xxx-slug}.md`.
|
|
187
|
+
5. Update checkboxes in `devflow/build-plan.md` and append entry to `devflow/history/HISTORY.md`.
|
|
188
|
+
6. Remove the active run directory `devflow/context/{xxx-slug}/`.
|
|
189
|
+
7. Switch to the local default branch, squash-merge the feature branch, and create one
|
|
190
|
+
conventional commit containing product work, tests, and DevFlow history.
|
|
191
|
+
8. Delete the merged local feature branch.
|
|
192
|
+
9. Confirm the default branch is clean before selecting the next feature.
|
|
122
193
|
|
|
123
194
|
---
|
|
124
195
|
|
|
125
196
|
## Step 3: Optional Final Integration Audit
|
|
126
197
|
|
|
127
|
-
|
|
198
|
+
When the feature queue completes or `continuous.maxFeatures` is reached, if
|
|
199
|
+
`continuous.finalIntegrationAudit: true`, execute an integration compatibility check
|
|
200
|
+
(Cross-Feature Contracts & Seams) covering the span from the starting commit to current HEAD.
|
|
128
201
|
|
|
129
202
|
---
|
|
130
203
|
|
|
131
|
-
## Step 4: Stop & Report
|
|
204
|
+
## Step 4: Stop & Report
|
|
132
205
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
206
|
+
When Continuous Mode finishes (either fully completed or stopped at a safety boundary),
|
|
207
|
+
present a concise summary report in Thai (per user communication rules):
|
|
208
|
+
- Starting and ending commit SHAs of the local default branch.
|
|
209
|
+
- List of features delivered in this run with their commit hashes.
|
|
210
|
+
- Summary of quality gates executed and findings resolved.
|
|
211
|
+
- Overall progress of `devflow/build-plan.md` and next upcoming feature.
|
|
212
|
+
- Clear reminder that **no remote push or deployment has occurred**.
|
|
@@ -126,6 +126,10 @@ build plan starts high-level.
|
|
|
126
126
|
|
|
127
127
|
## Step 3 - write the spec
|
|
128
128
|
|
|
129
|
+
Before review, allocate the selected feature ID's build attempt using
|
|
130
|
+
`reference/build-history.md`: first build 1, otherwise one greater than
|
|
131
|
+
the maximum proven prior attempt after all prior builds were reversed. For attempt N > 1, append `--build-N` to the slug and archive path (e.g. `086-export--build-2.md`).
|
|
132
|
+
|
|
129
133
|
For the one (sub-)feature being built now, allocate sequential ID (`xxx-slug`) and create a dedicated workspace at `devflow/context/{xxx-slug}/`. Write the full living spec to
|
|
130
134
|
`devflow/context/{xxx-slug}/spec.md`, following `reference/feature-spec-template.md`. Also initialize `stage.md` and `findings.md` in that folder. The first heading and build-plan identity must use this canonical form:
|
|
131
135
|
|
|
@@ -133,8 +137,10 @@ For the one (sub-)feature being built now, allocate sequential ID (`xxx-slug`) a
|
|
|
133
137
|
# Feature: <title>
|
|
134
138
|
|
|
135
139
|
**From build-plan:** feature <id>
|
|
140
|
+
**Build attempt:** <positive integer>
|
|
136
141
|
```
|
|
137
142
|
|
|
143
|
+
|
|
138
144
|
Fill every section:
|
|
139
145
|
- Goal, Problem Statement, and In/Out of scope
|
|
140
146
|
- Acceptance Criteria (AC-1, AC-2, ...)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Build history identity
|
|
2
|
+
|
|
3
|
+
Read metadata from the archived original spec, not appended findings or review.
|
|
4
|
+
Read the feature ID from its `**From build-plan:**` or supported legacy
|
|
5
|
+
feature field, not its title or filename. Normalize the numeric part by removing
|
|
6
|
+
leading zeros and the optional letter to lowercase (`012A` becomes `12a`). Match
|
|
7
|
+
that complete ID, never a substring. Use the archived spec's positive integer
|
|
8
|
+
`**Build attempt:**`; duplicate or malformed fields stop selection. A legacy
|
|
9
|
+
first-build archive without it counts as attempt 1 only when its spec identity
|
|
10
|
+
and unsuffixed `NN-name.md` path agree unambiguously. Derive the expected name
|
|
11
|
+
from its own spec, not today's renamed plan title. Text such as `Build 2` in a
|
|
12
|
+
title proves no attempt.
|
|
13
|
+
For new paths, pad the numeric part to at least two digits, keep its letter, and
|
|
14
|
+
use the spec title's lowercase kebab-case slug. Append `--build-N` only for N > 1.
|
|
15
|
+
An archive declaring an attempt must agree with that computed path.
|
|
16
|
+
The double hyphen is reserved: slug normalization collapses punctuation runs to
|
|
17
|
+
one hyphen, so a first build titled `Export Build 2` uses `04-export-build-2.md`,
|
|
18
|
+
while a later attempt 2 titled `Export` uses `04-export--build-2.md`.
|
|
19
|
+
|
|
20
|
+
Before freezing a new spec, check its exact planned archive path in `devflow/history/features/` and branch.
|
|
21
|
+
Require `lstat` to return `ENOENT` for the archive leaf; any existing entry,
|
|
22
|
+
including a dangling symlink, blocks it. Present parents must be ordinary
|
|
23
|
+
directories. Require a valid branch name and no existing or namespace-conflicting
|
|
24
|
+
local branch ref (inspect `git for-each-ref refs/heads/`, including packed refs).
|
|
25
|
+
Also require no prior use of the archive path in available Git history:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git log --all --reflog --full-history --format=%H -- <planned-archive-path>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Any result or inspection failure stops before spec review with the exact collision.
|
|
32
|
+
Do not auto-bump the attempt or rename reviewed work to avoid it. These checks
|
|
33
|
+
apply to new specs; existing completion must run its recovery routing first so
|
|
34
|
+
its own archive is reconciled rather than rejected. Preserve already-reviewed
|
|
35
|
+
legacy spec bytes, branch, and any proven recovery destination.
|
|
36
|
+
|
|
37
|
+
A legacy rebuild can preserve a reviewed spec without this field. Its completion
|
|
38
|
+
annotation must freeze the original `baseCommit`: resolve only prior builds and
|
|
39
|
+
their completed reversals present at that base, derive `max(attempts) + 1`, and
|
|
40
|
+
require the exact resulting archive path. For an integrated archive, its unique
|
|
41
|
+
introducing commit's sole parent must equal that base. For unfinished completion,
|
|
42
|
+
use Complete's phase proof. The path checks this derived attempt; it never supplies
|
|
43
|
+
the number. Missing or ambiguous proof stops without rewriting the archived spec.
|
|
44
|
+
Settled history numbering and rollback selection do not require the annotation's
|
|
45
|
+
historical `head` or `sourceTree`; actual completion recovery still requires them.
|
|
46
|
+
|
|
47
|
+
Before using prior builds or reversals, prove each selected record on the local
|
|
48
|
+
default branch. Resolve the unique introducing commit with:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git log --full-history --diff-filter=A --format=%H <local-default> -- <archive-path>
|
|
52
|
+
git log --full-history --format=%H <introducing-commit>..<local-default> -- <archive-path>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The first result must contain exactly one commit which actually adds the path;
|
|
56
|
+
the second must be empty. Confirm the current blob and mode equal that addition
|
|
57
|
+
(use Git's normal EOL normalization for a working-file comparison). Inspect the
|
|
58
|
+
record at that commit, not an uncommitted replacement. Reject orphan, overwritten,
|
|
59
|
+
deleted/re-added, renamed, multiply-added, or conflicting records. Never choose
|
|
60
|
+
the newest commit, file count, or timestamp to resolve ambiguity.
|
|
61
|
+
|
|
62
|
+
A build is reversed only by a completed `**Type:** Rollback` record in `devflow/history/rollbacks/` with its exact
|
|
63
|
+
`**Target archive:**` and full `**Target commit:**`, matching feature ID, verified
|
|
64
|
+
or complete status and finished steps. Its `Target parent` must match the target's
|
|
65
|
+
sole parent. Prove that rollback record's unique unchanged addition
|
|
66
|
+
by the same procedure, reachable on the local default after the target build.
|
|
67
|
+
Require a non-merge rollback commit containing that record and its completed
|
|
68
|
+
plan bookkeeping. Uncommitted, malformed, changed, or merely rollback-looking
|
|
69
|
+
files are not completed reversals. Conflicting or duplicate reversals stop.
|
|
70
|
+
|
|
71
|
+
Include exact rollback references retained on the selected plan line; missing
|
|
72
|
+
referenced records are a blocker, not an empty history. For a new unchecked feature,
|
|
73
|
+
use 1 when there are no prior records; otherwise
|
|
74
|
+
require every prior build to have one proven completed reversal and allocate
|
|
75
|
+
`max(attempts) + 1`. Duplicate attempts or inconsistent/missing history stop with
|
|
76
|
+
the exact paths and missing proof. Search only this feature's records and their
|
|
77
|
+
exact reversal references. Ignored local-only history without introducing-commit
|
|
78
|
+
proof cannot establish a rebuild or rollback target; stop without force-adding or
|
|
79
|
+
migrating it. Ordinary first builds do not require prior history.
|
|
@@ -26,32 +26,32 @@ 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
|
|
30
|
-
-
|
|
31
|
-
- **AI Feasibility & Tech**:
|
|
32
|
-
- **Value & Potential**:
|
|
33
|
-
- **Quick Seed
|
|
29
|
+
Evaluate the user's raw idea and generate an enriched entry in Thai (`th` per user communication rules):
|
|
30
|
+
- **Raw Idea**: The user's input description
|
|
31
|
+
- **AI Feasibility & Tech**: Feasibility rating (Easy / Medium / Complex) along with recommended libraries, APIs, or architectural approaches
|
|
32
|
+
- **Value & Potential**: Business value, user benefits, and strategic impact
|
|
33
|
+
- **Quick Seed**: 2-3 key technical nuances or seed points to preserve context for later pickup
|
|
34
34
|
|
|
35
35
|
### 3. Append to `devflow/ideas.md`
|
|
36
36
|
Insert the new idea block directly under `## 📌 Pending Ideas` in `devflow/ideas.md`:
|
|
37
37
|
|
|
38
38
|
```markdown
|
|
39
|
-
### [IDEA-001] {
|
|
39
|
+
### [IDEA-001] {Brief idea title}
|
|
40
40
|
- **บันทึกเมื่อ**: {YYYY-MM-DD}
|
|
41
|
-
- **ไอเดียตั้งต้น**: {
|
|
42
|
-
- **AI Feasibility & Tech**: {
|
|
43
|
-
- **Value & Potential**: {
|
|
41
|
+
- **ไอเดียตั้งต้น**: {User's raw idea text}
|
|
42
|
+
- **AI Feasibility & Tech**: {Feasibility and tooling analysis}
|
|
43
|
+
- **Value & Potential**: {Value and impact analysis}
|
|
44
44
|
- **Quick Seed (กันลืม)**:
|
|
45
|
-
1. {
|
|
46
|
-
2. {
|
|
47
|
-
- **สถานะ**: `Pending` (
|
|
45
|
+
1. {Key point 1}
|
|
46
|
+
2. {Key point 2}
|
|
47
|
+
- **สถานะ**: `Pending` (Ready for pickup via `/feature IDEA-001` or `/discovery IDEA-001`)
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
*(
|
|
50
|
+
*(If placeholder `*(ยังไม่มีไอเดียค้างอยู่...)*` exists, remove it upon recording the first idea)*
|
|
51
51
|
|
|
52
52
|
### 4. Output Summary
|
|
53
53
|
Report to the user:
|
|
54
54
|
- Allocated Idea ID: `[IDEA-xxx]`
|
|
55
55
|
- Summary of Feasibility & Value analysis
|
|
56
56
|
- Seed points saved
|
|
57
|
-
- Instructions for promotion: "
|
|
57
|
+
- Instructions for promotion: "Ready to implement? Run `/feature IDEA-xxx` or `/discovery IDEA-xxx` anytime."
|
|
@@ -53,16 +53,23 @@ skill.
|
|
|
53
53
|
|
|
54
54
|
## Step 1 - resolve the exact feature
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
Resolve the requested number or name to one checked build-plan ID; for an archive
|
|
57
|
+
path, read its exact spec identity first and match that checked item. Then gather
|
|
58
|
+
all exact-ID feature archive candidates using `../feature/reference/build-history.md`.
|
|
59
|
+
Normalize the stable ID, retaining its letter, and read attempts from verified
|
|
60
|
+
spec metadata/history proof, never arbitrary title or filename suffixes.
|
|
61
|
+
|
|
62
|
+
For each candidate, require its unique introducing commit on the local default
|
|
63
|
+
and prove the archive blob and mode have not changed since that addition. Exclude
|
|
64
|
+
builds with a proven completed reachable rollback naming that exact archive and
|
|
65
|
+
introducing commit. The checked item must have exactly one unreversed build.
|
|
66
|
+
An explicit archive request stays bound to that exact path: reject it if already
|
|
67
|
+
reversed, rather than silently choosing another build. Ambiguous, orphan,
|
|
68
|
+
overwritten, multiply-added, or missing records stop with their exact paths and
|
|
69
|
+
missing proof. Do not select by newest commit, filename order, or rollback date.
|
|
70
|
+
|
|
71
|
+
Confirm the selected commit's diff is consistent with the requested feature.
|
|
72
|
+
If the target is a merge commit, stop before Step 2 and before
|
|
66
73
|
writing or changing `devflow/context/{xxx-slug}/spec.md`. Do not record a
|
|
67
74
|
target parent or choose a mainline. Publish `blocked` to
|
|
68
75
|
`devflow/.state/run.json`, explain that DevFlow cannot safely infer which
|
|
@@ -129,6 +136,12 @@ Allocate sequential ID (`xxx-slug`) and create `devflow/context/{xxx-slug}/`. Wr
|
|
|
129
136
|
- compatibility work that is allowed, if any
|
|
130
137
|
- exact verification commands and observable removal criteria
|
|
131
138
|
|
|
139
|
+
Before freezing a new rollback spec, apply the archive-path and branch-availability
|
|
140
|
+
checks in `../feature/reference/build-history.md` to its planned branch and
|
|
141
|
+
`YYYY-MM-DD-<exact-target-archive-stem>.md` destination. Retain `--build-N` in the
|
|
142
|
+
target stem when present. A collision stops for an explicit decision; never
|
|
143
|
+
renumber the target or silently rename reviewed work. Existing completion recovery runs first.
|
|
144
|
+
|
|
132
145
|
The first build step must apply the target commit's product diff in reverse using
|
|
133
146
|
the guarded Type: Rollback behavior in `/implement`. Later steps may repair only
|
|
134
147
|
the specific downstream compatibility issues named in the spec. Do not use a
|
|
@@ -21,10 +21,10 @@ contract in `AGENTS.md`.
|
|
|
21
21
|
```text
|
|
22
22
|
# 1. Ingest specific file from any path (PDF, DOCX, XLSX, Image, CSV, Text)
|
|
23
23
|
/analyze C:\Users\...\Downloads\customer-spec.pdf
|
|
24
|
-
/analyze ./mockup.png ./schema.xlsx "
|
|
24
|
+
/analyze ./mockup.png ./schema.xlsx "Loyalty point system"
|
|
25
25
|
|
|
26
26
|
# 2. Ingest raw text or requirement from chat
|
|
27
|
-
/analyze "
|
|
27
|
+
/analyze "Customer requested 0% installment plan connected to KBank Payment Gateway..."
|
|
28
28
|
|
|
29
29
|
# 3. Scan pending unassigned files in devflow/inbox/
|
|
30
30
|
/analyze
|
|
@@ -46,50 +46,50 @@ contract in `AGENTS.md`.
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
## Step 1: Auto-Allocate Workspace & Ingestion (Frictionless Ingest)
|
|
50
50
|
1. **Allocate REQ-ID**: Generate sequential ID format `REQ-YYYYMMDD-NNN` (e.g. `REQ-20260903-001-point-system`).
|
|
51
51
|
2. **Create Request Workspace**:
|
|
52
52
|
```text
|
|
53
53
|
devflow/inbox/{REQ-ID}/
|
|
54
|
-
├── raw/ #
|
|
55
|
-
├── parsed.md #
|
|
56
|
-
└── clarifications.md #
|
|
54
|
+
├── raw/ # Original source files (PDF, Word, Excel, Images, Email)
|
|
55
|
+
├── parsed.md # Extracted structured text/tables (Clean Markdown)
|
|
56
|
+
└── clarifications.md # Questions and clarifications checklist for stakeholders
|
|
57
57
|
```
|
|
58
58
|
3. Copy or save incoming files into `devflow/inbox/{REQ-ID}/raw/`.
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
## Step 2: Parse & Normalize Requirement (`parsed.md`)
|
|
63
63
|
1. Extract text and tables from all raw files:
|
|
64
64
|
- For Office/PDF docs: Invoke `convert-any-to-md` or document extractor.
|
|
65
65
|
- For Web URLs / Confluence / Notion: Invoke `defuddle`.
|
|
66
66
|
- For Images / Wireframes / Screenshots: Conduct Multimodal Vision OCR and describe layout and fields.
|
|
67
67
|
2. Structure into `devflow/inbox/{REQ-ID}/parsed.md`:
|
|
68
|
-
- **Executive Summary**:
|
|
69
|
-
- **Target Persona & User Stories**:
|
|
70
|
-
- **Functional Requirements (FR)**:
|
|
71
|
-
- **Non-Functional Requirements (NFR)**: Performance, Security, PDPA, Retention
|
|
72
|
-
- **Data Entities & Fields**:
|
|
68
|
+
- **Executive Summary**: Core purpose and business objective of the requirement
|
|
69
|
+
- **Target Persona & User Stories**: Who performs what action and why
|
|
70
|
+
- **Functional Requirements (FR)**: List of functions and business rules
|
|
71
|
+
- **Non-Functional Requirements (NFR)**: Performance, Security, PDPA/Privacy, Data Retention
|
|
72
|
+
- **Data Entities & Fields**: Data fields, schemas, and initial types
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
*(
|
|
76
|
+
## Step 3: Codebase Impact & Blast Radius Analysis (`codebase-impact.md`)
|
|
77
|
+
*(Execute when operating on an existing system / brownfield codebase)*
|
|
78
78
|
|
|
79
79
|
1. Search codebase patterns using `grep_search`, `rg`, and AST analysis for affected models, controllers, APIs, and routes.
|
|
80
80
|
2. Calculate **Blast Radius & Complexity Score**:
|
|
81
|
-
- **Affected Files & Modules**:
|
|
82
|
-
- **API & Contract Breaking Risk**:
|
|
83
|
-
- **Complexity Rating**: `Low` | `Medium` | `High` | `Extreme`
|
|
81
|
+
- **Affected Files & Modules**: List of files to be modified or newly created
|
|
82
|
+
- **API & Contract Breaking Risk**: Check if existing APIs or third-party contracts are impacted
|
|
83
|
+
- **Complexity Rating**: `Low` | `Medium` | `High` | `Extreme` with rationale
|
|
84
84
|
3. Save analysis report to `devflow/analysis/{REQ-ID}/codebase-impact.md`.
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
## Step 4: Socratic Gap Detection & Clarification Checklist (`clarifications.md`)
|
|
89
89
|
1. Apply `grilling` and `domain-modeling` lenses to detect gaps:
|
|
90
|
-
- **Missing Edge Cases**:
|
|
91
|
-
- **Ambiguous Business Rules**:
|
|
92
|
-
- **Security & Authorization**:
|
|
90
|
+
- **Missing Edge Cases**: Boundary conditions, error states, network drops, concurrent requests
|
|
91
|
+
- **Ambiguous Business Rules**: Unclear policies, unspecified SLAs, or undefined workflows
|
|
92
|
+
- **Security & Authorization**: Role definitions, access permissions, personal identifiable data (PII)
|
|
93
93
|
2. Generate an actionable checklist in `devflow/inbox/{REQ-ID}/clarifications.md` for the SA to take directly into stakeholder meetings.
|
|
94
94
|
|
|
95
95
|
---
|