@jakkrichm/create-nexus-devflow 2.11.1 → 2.12.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/README.md +3 -3
- package/dist/bin/create-nexus-devflow.d.ts +2 -0
- package/dist/bin/create-nexus-devflow.js +63 -2
- package/dist/bin/create-nexus-devflow.js.map +1 -1
- package/dist/lib/project-config.d.ts +3 -1
- package/dist/lib/project-config.js +3 -1
- package/dist/lib/project-config.js.map +1 -1
- package/dist/lib/skill-manager.d.ts +5 -0
- package/dist/lib/skill-manager.js +30 -0
- package/dist/lib/skill-manager.js.map +1 -1
- package/dist/lib/update.d.ts +4 -2
- package/dist/lib/update.js +12 -6
- package/dist/lib/update.js.map +1 -1
- package/dist/scripts/prepare-template.js +11 -0
- package/dist/scripts/prepare-template.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/analyze/SKILL.md +113 -0
- package/template/.agents/skills/doctor/SKILL.md +52 -49
- package/template/.agents/skills/doctor/scripts/run-state.mjs +513 -0
- package/template/.agents/skills/feature/SKILL.md +2 -0
- package/template/.agents/skills/feature/reference/feature-spec-template.md +82 -0
- package/template/.agents/skills/implement/SKILL.md +3 -35
- package/template/.agents/skills/implement/reference/rollback-implementation.md +35 -0
- package/template/.agents/skills/onboard/SKILL.md +43 -2
- package/template/.agents/skills/overview/SKILL.md +25 -12
- package/template/.agents/skills/report-html/SKILL.md +25 -5
- package/template/.agents/skills/status/SKILL.md +17 -20
- package/template/.claude/skills/analyze/SKILL.md +113 -0
- package/template/.claude/skills/doctor/SKILL.md +52 -49
- package/template/.claude/skills/doctor/scripts/run-state.mjs +513 -0
- package/template/.claude/skills/feature/SKILL.md +2 -0
- package/template/.claude/skills/feature/reference/feature-spec-template.md +82 -0
- package/template/.claude/skills/implement/SKILL.md +3 -35
- package/template/.claude/skills/implement/reference/rollback-implementation.md +35 -0
- package/template/.claude/skills/onboard/SKILL.md +43 -2
- package/template/.claude/skills/overview/SKILL.md +25 -12
- package/template/.claude/skills/report-html/SKILL.md +25 -5
- package/template/.claude/skills/status/SKILL.md +17 -20
- package/template/AGENTS.md +19 -11
- package/template/devflow/analysis/REQ-20260903-001-sync-upstream-ai-blueprint/codebase-impact.md +46 -0
- package/template/devflow/build-plan.md +32 -2
- package/template/devflow/context/ai-interaction.md +2 -0
- package/template/devflow/inbox/REQ-20260903-001-sync-upstream-ai-blueprint/clarifications.md +34 -0
- package/template/devflow/inbox/REQ-20260903-001-sync-upstream-ai-blueprint/parsed.md +66 -0
- package/template/devflow/inbox/REQ-20260903-001-sync-upstream-ai-blueprint/raw/upstream-v152-diff.md +16 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# 📐 [{xxx-slug}] {title}
|
|
2
|
+
|
|
3
|
+
> **Status**: In-Progress
|
|
4
|
+
> **Track**: Fast-Track (Task-Isolated Living Spec Mode - Feature)
|
|
5
|
+
> **Category**: Feature
|
|
6
|
+
> **Source**: `devflow/build-plan.md: Feature {n}` & `devflow/discoveries/{DISC-ID}/discovery.md`
|
|
7
|
+
> **Branch**: `feature/{xxx-slug}`
|
|
8
|
+
> **Started Date**: {YYYY-MM-DD}
|
|
9
|
+
> **Delivered Date**: TBD
|
|
10
|
+
> **Owner**: DevFlow Core Framework Team & AI
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Specification & Scope
|
|
15
|
+
|
|
16
|
+
### 1.1 Problem Statement
|
|
17
|
+
{คำอธิบายปัญหาและที่มาของความจำเป็นในการพัฒนาฟีเจอร์นี้}
|
|
18
|
+
|
|
19
|
+
### 1.2 In-Scope
|
|
20
|
+
1. {ขอบเขตการทำงานข้อที่ 1}
|
|
21
|
+
2. {ขอบเขตการทำงานข้อที่ 2}
|
|
22
|
+
|
|
23
|
+
### 1.3 Out-of-Scope
|
|
24
|
+
- {สิ่งที่อยู่นอกเหนือขอบเขตหรือไม่ทำในรอบนี้}
|
|
25
|
+
|
|
26
|
+
### 1.4 Acceptance Criteria (เกณฑ์การยอมรับ)
|
|
27
|
+
- [ ] **AC-1**: {เกณฑ์การตรวจรับข้อที่ 1}
|
|
28
|
+
- [ ] **AC-2**: {เกณฑ์การตรวจรับข้อที่ 2}
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 2. Plan & Test Strategy
|
|
33
|
+
|
|
34
|
+
### 2.1 Files Modified / Created
|
|
35
|
+
- `{file-path}` [NEW | MODIFY | DELETE]
|
|
36
|
+
|
|
37
|
+
### 2.2 Quality Gates & Sensitivity Check
|
|
38
|
+
- **Quality Gate Policy (`independentReview`)**: `manual` | `always` | `when-sensitive`
|
|
39
|
+
- **UI Evidence / Browser Tests**: {Not applicable | Playwright / BrowserOS Neo}
|
|
40
|
+
- **Review Strategy**: One feature-level review packet at completion
|
|
41
|
+
|
|
42
|
+
### 2.3 Test Decision: Required (TDD) | Optional
|
|
43
|
+
- **Rationale**: {เหตุผลความจำเป็นในการเขียน Unit Tests / TDD}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 3. Implementation Checklist (Strict TDD)
|
|
48
|
+
|
|
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
|
+
|
|
54
|
+
- [ ] **Task 2: {หัวข้องานที่ 2}**
|
|
55
|
+
- [ ] 2.1 `[TDD-Red]`: ...
|
|
56
|
+
- [ ] 2.2 `[TDD-Green]`: ...
|
|
57
|
+
- [ ] 2.3 `[TDD-Refactor]`: ...
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 4. Verification Evidence Matrix
|
|
62
|
+
|
|
63
|
+
### ⚖️ Axis 1: Standards, Architecture & Quality Gate
|
|
64
|
+
- **Type Safety & Build Integrity**: TBD
|
|
65
|
+
- **Automated Test Matrix**: TBD
|
|
66
|
+
- **Static Contract Verification**: TBD
|
|
67
|
+
- **Package Smoke Test**: TBD
|
|
68
|
+
- **Findings Ledger**: ตรวจสอบ `findings.md` สะอาด 100%
|
|
69
|
+
|
|
70
|
+
### 🎯 Axis 2: Spec Fidelity & Behavioral Acceptance Gate
|
|
71
|
+
- [ ] **AC-1**: {หลักฐานการผ่านเกณฑ์ข้อที่ 1}
|
|
72
|
+
- [ ] **AC-2**: {หลักฐานการผ่านเกณฑ์ข้อที่ 2}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 5. Delivery Verification & Independent Receipt
|
|
77
|
+
|
|
78
|
+
- **Delivery Date**: TBD
|
|
79
|
+
- **Verification Verdict**: TBD
|
|
80
|
+
- **Framework Tests**: TBD
|
|
81
|
+
- **Static Contract**: TBD
|
|
82
|
+
- **Package Smoke Test**: TBD
|
|
@@ -6,6 +6,8 @@ argument-hint: "[{run-id, number, or name}]"
|
|
|
6
6
|
|
|
7
7
|
# implement - build the target spec, one reviewed step 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`.
|
|
@@ -81,41 +83,7 @@ instead of creating a new one.
|
|
|
81
83
|
|
|
82
84
|
### Type: Rollback safeguard
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
commit `git revert`. Completed feature commits also contain Blueprint history and
|
|
86
|
-
plan bookkeeping, while `devflow/context/{xxx-slug}/spec.md` now contains the active rollback
|
|
87
|
-
spec. Reversing the whole commit would damage that state.
|
|
88
|
-
|
|
89
|
-
Before the first rollback build step:
|
|
90
|
-
|
|
91
|
-
1. Re-resolve the target archive's introducing commit and confirm it matches the
|
|
92
|
-
full Target commit SHA recorded in the approved spec.
|
|
93
|
-
2. Confirm the target is an ancestor of `HEAD`, has the recorded single parent,
|
|
94
|
-
and the only dirty path before applying the patch is the approved rollback
|
|
95
|
-
spec. Stop on drift.
|
|
96
|
-
3. Preview the target's product diff while excluding `.agents/**`, `.claude/**`,
|
|
97
|
-
`devflow/**`, `AGENTS.md`, `CLAUDE.md`, and
|
|
98
|
-
`prototypes/**`. Confirm the preview is non-empty and matches the Product
|
|
99
|
-
paths in the spec.
|
|
100
|
-
4. Apply that product diff in reverse with three-way conflict detection and
|
|
101
|
-
stage it. Substitute the two approved full SHAs before running:
|
|
102
|
-
|
|
103
|
-
git diff --binary <target-parent> <target-commit> -- . \
|
|
104
|
-
':(exclude).agents/**' \
|
|
105
|
-
':(exclude).claude/**' ':(exclude)devflow/**' \
|
|
106
|
-
':(exclude)AGENTS.md' ':(exclude)CLAUDE.md' \
|
|
107
|
-
':(exclude)prototypes/**' |
|
|
108
|
-
git apply --reverse --3way --index
|
|
109
|
-
|
|
110
|
-
Never omit the protected pathspec exclusions for convenience.
|
|
111
|
-
5. Show both `git diff --cached` and `git status`. Confirm no protected path is
|
|
112
|
-
staged or modified before presenting the step for review.
|
|
113
|
-
|
|
114
|
-
If the reverse patch conflicts, stop and report the exact paths and later commit
|
|
115
|
-
that appears involved. Do not auto-resolve, discard, stash, reset, or switch to a
|
|
116
|
-
broad checkout. Ask whether to resolve only the conflict allowed by the approved
|
|
117
|
-
spec or abandon the attempt. A cascade into another completed feature needs a
|
|
118
|
-
new rollback plan.
|
|
86
|
+
When implementing a rollback task, follow the exact safety procedure in `reference/rollback-implementation.md`.
|
|
119
87
|
|
|
120
88
|
## Step 2 - build one step, review, iterate, checkpoint (Strict TDD)
|
|
121
89
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Rollback implementation safeguard
|
|
2
|
+
|
|
3
|
+
Use this only when `stage.md` / `spec.md` indicates a rollback task.
|
|
4
|
+
|
|
5
|
+
Do not hand-delete the old feature and do not run a whole-commit `git revert`.
|
|
6
|
+
The completed commit also contains DevFlow history and plan bookkeeping.
|
|
7
|
+
|
|
8
|
+
Before the first rollback step:
|
|
9
|
+
|
|
10
|
+
1. Read `Target commit` and `Target parent`. Stop unless both values match
|
|
11
|
+
`^[0-9a-f]{40}$`.
|
|
12
|
+
2. Resolve the archive's introducing commit and verify it has exactly one parent.
|
|
13
|
+
Stop on a merge target. Confirm the resolved commit exactly equals `Target
|
|
14
|
+
commit` and the resolved parent exactly equals `Target parent`.
|
|
15
|
+
3. Confirm the target is an ancestor of `HEAD` and the approved rollback spec is
|
|
16
|
+
the only dirty path. Stop on drift.
|
|
17
|
+
4. Preview the target's product diff while excluding `.agents/**`,
|
|
18
|
+
`.claude/**`, `devflow/**`, `AGENTS.md`, `CLAUDE.md`, and `prototypes/**`.
|
|
19
|
+
Confirm it is non-empty and matches the Product paths in the spec.
|
|
20
|
+
5. Apply only the resolved product diff in reverse with three-way conflict
|
|
21
|
+
detection. Use only the resolved full SHA values:
|
|
22
|
+
|
|
23
|
+
git diff --binary <target-parent> <target-commit> -- . \
|
|
24
|
+
':(exclude).agents/**' \
|
|
25
|
+
':(exclude).claude/**' ':(exclude)devflow/**' \
|
|
26
|
+
':(exclude)AGENTS.md' ':(exclude)CLAUDE.md' \
|
|
27
|
+
':(exclude)prototypes/**' |
|
|
28
|
+
git apply --reverse --3way --index
|
|
29
|
+
|
|
30
|
+
6. Show the staged diff and status. Stop if any protected path is staged or
|
|
31
|
+
modified.
|
|
32
|
+
|
|
33
|
+
If the reverse patch conflicts, report the exact paths and later commit involved.
|
|
34
|
+
Do not auto-resolve, discard, stash, reset, or broaden the rollback. Ask whether
|
|
35
|
+
to resolve only the approved conflict or abandon the attempt.
|
|
@@ -29,7 +29,48 @@ and project behavior already exist and need to be reflected into the plans.
|
|
|
29
29
|
No argument is required. If the user provides context about the stack, hosting,
|
|
30
30
|
database, auth, or preferred tool, use it as a hint and verify against files.
|
|
31
31
|
|
|
32
|
-
## Step 0 - confirm
|
|
32
|
+
## Step 0 - confirm Git and make an unborn repository usable
|
|
33
|
+
|
|
34
|
+
Before reading application code or changing setup files, confirm both Git states:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git rev-parse --is-inside-work-tree
|
|
38
|
+
git rev-parse --verify HEAD
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If this is not a Git repository, stop and ask the user to initialize one, then
|
|
42
|
+
rerun `/onboard`.
|
|
43
|
+
|
|
44
|
+
An existing first commit may contain only the scaffold or may already contain
|
|
45
|
+
DevFlow. Both are valid. Do not ask the user to rewrite either history shape.
|
|
46
|
+
|
|
47
|
+
If Git reports an unborn `HEAD`, handle it here instead of sending the user away
|
|
48
|
+
to run Git commands:
|
|
49
|
+
|
|
50
|
+
1. Inspect status and build a safe scaffold-only candidate from paths outside
|
|
51
|
+
`AGENTS.md`, `CLAUDE.md`, `.agents/`, `.claude/`, and `devflow/`. Exclude
|
|
52
|
+
secrets, dependencies, caches, build output, generated state, and anything
|
|
53
|
+
else that should not enter source control. Include the existing `.gitignore`
|
|
54
|
+
when it is safe.
|
|
55
|
+
2. Resolve the intended default branch from a remote default when available,
|
|
56
|
+
then an existing `main` or `master`, then Git's configured initial branch,
|
|
57
|
+
and otherwise `main`. Preserve the current unborn branch name as the setup
|
|
58
|
+
branch when it is not the intended default. If the intended name is genuinely
|
|
59
|
+
ambiguous, ask only that one question.
|
|
60
|
+
3. Show the exact candidate and the branch result, then ask once:
|
|
61
|
+
`Create the initial scaffold commit and continue Onboard? (Recommended)`
|
|
62
|
+
State that this creates one local commit and never pushes.
|
|
63
|
+
4. On approval, stage only the reviewed candidate, verify the staged diff, and
|
|
64
|
+
commit it as `chore: scaffold application`. If needed, rename the unborn
|
|
65
|
+
branch before committing so the root commit establishes the intended default
|
|
66
|
+
branch. Then create or return to the named setup branch at that same commit
|
|
67
|
+
and continue Onboard in the same run.
|
|
68
|
+
|
|
69
|
+
If there is no safe scaffold candidate, stop with the exact blocker rather than
|
|
70
|
+
creating an empty or mixed root commit. Never create the commit without explicit
|
|
71
|
+
approval.
|
|
72
|
+
|
|
73
|
+
Then confirm this is onboarding, not adoption.
|
|
33
74
|
|
|
34
75
|
Inspect the repository and the two planning docs:
|
|
35
76
|
|
|
@@ -41,7 +82,7 @@ Inspect the repository and the two planning docs:
|
|
|
41
82
|
Continue only with setup files such as `AGENTS.md`, `coding-standards.md`,
|
|
42
83
|
`.gitignore`, and optional notes.
|
|
43
84
|
|
|
44
|
-
Never run a framework scaffolder.
|
|
85
|
+
Never run a framework scaffolder. DevFlow is already overlaid.
|
|
45
86
|
|
|
46
87
|
## Step 1 - survey the project facts
|
|
47
88
|
|
|
@@ -81,8 +81,8 @@ commit. Never create this commit silently.
|
|
|
81
81
|
Treat this as the initial pre-feature state only when all of these are true:
|
|
82
82
|
|
|
83
83
|
- the project is a Git repository with an existing `HEAD` commit
|
|
84
|
-
- the current branch is the default branch,
|
|
85
|
-
|
|
84
|
+
- the current branch is the default branch, or it is a dedicated setup branch
|
|
85
|
+
whose starting commit exactly matches the current default-branch tip
|
|
86
86
|
- the version of `devflow/context/project-overview.md` in `HEAD` does not
|
|
87
87
|
already contain a generated overview baseline
|
|
88
88
|
- `devflow/context/` has no active task-isolated workspace directories (`devflow/context/{xxx-slug}/`)
|
|
@@ -91,11 +91,11 @@ Treat this as the initial pre-feature state only when all of these are true:
|
|
|
91
91
|
- `devflow/build-plan.md` contains no checked feature items
|
|
92
92
|
- the DevFlow workflow is meant to be committed, not kept local-only
|
|
93
93
|
|
|
94
|
-
If there is no `HEAD` yet, stop and
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
If there is no `HEAD` yet, stop and send the user back to `/onboard`, which owns
|
|
95
|
+
the initial scaffold commit recovery. Overview never creates a root commit. If a
|
|
96
|
+
dedicated setup branch did not start at the current default tip, stop with that
|
|
97
|
+
exact mismatch. These are recoverable initial handoffs, not permission to offer
|
|
98
|
+
another baseline after one is committed.
|
|
99
99
|
|
|
100
100
|
Detect local-only mode with Git, not memory. Use `git check-ignore` on the
|
|
101
101
|
present workflow paths. If `.agents/`, `.claude/`, `devflow/`, or `CLAUDE.md`
|
|
@@ -103,7 +103,7 @@ are ignored as part of the onboarding local-only choice, skip the offer and
|
|
|
103
103
|
continue to the normal `/feature` guidance. `AGENTS.md` remaining public does not
|
|
104
104
|
make a local-only setup eligible.
|
|
105
105
|
|
|
106
|
-
Before asking:
|
|
106
|
+
Before asking, record the resolved default branch and its exact tip:
|
|
107
107
|
|
|
108
108
|
1. Read `git status`, the staged diff, the unstaged diff, and untracked paths.
|
|
109
109
|
2. Build a candidate containing only DevFlow installation, adapter,
|
|
@@ -111,16 +111,21 @@ Before asking:
|
|
|
111
111
|
`CLAUDE.md`, `.agents/`, `.claude/`, and `devflow/`. Include `.gitignore`
|
|
112
112
|
only when every changed hunk is clearly an onboarding or DevFlow ignore
|
|
113
113
|
entry.
|
|
114
|
-
3.
|
|
115
|
-
|
|
114
|
+
3. Include the installer-owned `devflow/.state/manifest.json` and
|
|
115
|
+
`devflow/.state/.gitignore` when present. Exclude transient state such as
|
|
116
|
+
`run.json`, backups, and staging, plus secrets, logs, caches, dependencies,
|
|
117
|
+
build output, and application source.
|
|
116
118
|
4. Stop if any staged change or dirty path falls outside the candidate, or if an
|
|
117
119
|
allowed file contains an unrelated hunk. Do not mix app scaffolding or other
|
|
118
120
|
user work into this commit. Tell the user exactly what must be committed,
|
|
119
121
|
moved, or restored first, then leave the repository unchanged.
|
|
120
122
|
5. If the candidate is empty, skip the offer.
|
|
121
123
|
6. Show the exact candidate paths and their diff before asking:
|
|
122
|
-
`
|
|
123
|
-
State that accepting creates one local commit
|
|
124
|
+
`Finalize the DevFlow baseline locally? (Recommended)`
|
|
125
|
+
State that accepting creates one local commit. When running on a dedicated
|
|
126
|
+
setup branch, it also fast-forwards the unchanged default branch to that
|
|
127
|
+
commit, returns to the default branch, and deletes the setup branch. It never
|
|
128
|
+
pushes.
|
|
124
129
|
|
|
125
130
|
If the user accepts, stage only the reviewed candidate, show the staged paths
|
|
126
131
|
and diff summary, verify no other path is staged, and commit with this exact
|
|
@@ -130,6 +135,14 @@ message:
|
|
|
130
135
|
chore: establish DevFlow project baseline
|
|
131
136
|
```
|
|
132
137
|
|
|
138
|
+
For a dedicated setup branch, verify before committing that the default tip is
|
|
139
|
+
still the one shown in the prompt. After the commit, require a clean working
|
|
140
|
+
tree, switch to the default branch, run `git merge --ff-only <setup-branch>`, and
|
|
141
|
+
delete the setup branch locally. The single approval above covers only these
|
|
142
|
+
named local actions. If the default moved or any check fails, stop without
|
|
143
|
+
merging or deleting. Then confirm the final branch and working tree and recommend
|
|
144
|
+
`/feature`.
|
|
145
|
+
|
|
133
146
|
Then confirm the working tree state and recommend `/feature`. If the user
|
|
134
147
|
declines, leave the repository untouched and explain that these setup and
|
|
135
148
|
planning changes will remain uncommitted until they create the baseline later.
|
|
@@ -30,16 +30,36 @@ When invoked:
|
|
|
30
30
|
- Archived History: `devflow/history/{features|fixes|rollbacks}/{xxx-slug}.md`
|
|
31
31
|
2. Parse spec sections, checklist steps, QA evidence, and verification logs.
|
|
32
32
|
|
|
33
|
-
### 2.
|
|
33
|
+
### 2. Diagram Pre-Check & Skill Auto-Install (Optional)
|
|
34
|
+
If the spec involves architectural design, system topology, sequence flows, or if the user requests diagrams:
|
|
35
|
+
1. **Inspect Existing Diagrams**:
|
|
36
|
+
Check `devflow/context/{xxx-slug}/diagrams/`. Any `.svg`, `.html`, or image files will be automatically embedded into the **System & Architecture Diagrams** showcase.
|
|
37
|
+
2. **Auto-Detect & Install Diagram Skills**:
|
|
38
|
+
If diagrams are requested but not yet generated:
|
|
39
|
+
- Check if `.agents/skills/archify/` or `.agents/skills/diagram-design/` exists.
|
|
40
|
+
- If not installed, run CLI installation:
|
|
41
|
+
```bash
|
|
42
|
+
# For technical architecture, dataflows, sequence traces, interactive motion
|
|
43
|
+
npx create-nexus-devflow skill add archify
|
|
44
|
+
|
|
45
|
+
# For editorial, business, quadrant, timeline, or radar diagrams
|
|
46
|
+
npx create-nexus-devflow skill add diagram-design
|
|
47
|
+
```
|
|
48
|
+
3. **Generate Diagram**:
|
|
49
|
+
Use the installed skill to create the diagram artifact in `devflow/context/{xxx-slug}/diagrams/{name}.html` (or `.svg`).
|
|
50
|
+
4. **Native Mermaid Support**:
|
|
51
|
+
Any ` ```mermaid ` code block inside the document is automatically rendered visually via the dashboard's built-in theme-aware Mermaid.js engine.
|
|
52
|
+
|
|
53
|
+
### 3. Render Interactive HTML Dashboard
|
|
34
54
|
Execute the HTML generation engine or script:
|
|
35
55
|
```bash
|
|
36
56
|
npm run report:html -- {RUNNING_ID}
|
|
37
57
|
```
|
|
38
58
|
Or transform Markdown into a styled, standalone HTML document:
|
|
39
|
-
- Output: `devflow/
|
|
59
|
+
- Output: `devflow/context/{xxx-slug}/report.html` (or adjacent `{xxx-slug}.html`)
|
|
40
60
|
|
|
41
|
-
###
|
|
61
|
+
### 4. Output
|
|
42
62
|
Provide:
|
|
43
|
-
- Generated HTML file path: `file:///devflow/
|
|
44
|
-
- Summary of sections rendered (Spec, Plan, Progress, QA Evidence, Release Notes)
|
|
63
|
+
- Generated HTML file path: `file:///devflow/context/{xxx-slug}/report.html`
|
|
64
|
+
- Summary of sections rendered (Spec, Plan, Progress, QA Evidence, Diagrams Showcase, Release Notes)
|
|
45
65
|
- Instructions to open the file in any browser
|
|
@@ -5,38 +5,32 @@ description: "[devflow] Show where the project stands: build-plan progress, the
|
|
|
5
5
|
|
|
6
6
|
# status - where the project stands right now
|
|
7
7
|
|
|
8
|
+
**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.
|
|
9
|
+
|
|
8
10
|
Where this sits in the workflow:
|
|
9
11
|
|
|
10
12
|
any time -> [status] -> reads build-plan + current-feature + git
|
|
11
13
|
(read-only) prints a short "you are here"
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Progress in this workflow lives in files, not the chat, so everything this skill
|
|
19
|
-
reports comes from disk and git. That is the point: a fresh session can run
|
|
20
|
-
`/status` and know exactly as much as the last one did.
|
|
15
|
+
`/status` is orientation: where the project stands right now, what's done,
|
|
16
|
+
what's in flight, whether there's drift between plans and reality, and what
|
|
17
|
+
single action makes the most sense next. It is purely read-only: it reads files
|
|
18
|
+
and git, prints a summary, and exits.
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
about whether the Blueprint is installed correctly, run `/doctor` instead.
|
|
20
|
+
Use `/doctor` instead when the user wants a full setup-and-health check.
|
|
24
21
|
|
|
25
22
|
## Input
|
|
26
23
|
|
|
27
24
|
None. `/status` takes no argument.
|
|
28
25
|
|
|
29
|
-
## What it
|
|
26
|
+
## What it gathers
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
state.
|
|
28
|
+
Read these, distill them into a few lines, then stop. Do not dump file contents.
|
|
33
29
|
|
|
34
|
-
1. **Build plan** - `devflow/build-plan.md`.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
progress? If a feature, fix, or rollback spec is
|
|
39
|
-
present, report its type, name, running ID, which build steps are checked, and the
|
|
30
|
+
1. **Build plan progress** - `devflow/build-plan.md`. How many features total, how
|
|
31
|
+
many are checked off (`- [x]`), what's the next unchecked item.
|
|
32
|
+
2. **Current work** - `devflow/context/{xxx-slug}/spec.md` (Pure Multi-Run support). If active, how
|
|
33
|
+
many build steps total, how many are checked off, what is the description of the
|
|
40
34
|
first unchecked step where `/implement` resumes. If multiple tasks are queued, list the active spec queue.
|
|
41
35
|
3. **Findings** - `devflow/context/{xxx-slug}/findings.md`. Count findings by status and
|
|
42
36
|
report open and fixed counts next to build-plan progress. Call out any P0 or
|
|
@@ -54,7 +48,8 @@ state.
|
|
|
54
48
|
7. **Dashboard activity** - read `devflow/.state/run.json` when it exists.
|
|
55
49
|
Report the command, mode, status, progress, boundary, and safe resume command.
|
|
56
50
|
A missing file simply means no activity has been recorded. Invalid activity
|
|
57
|
-
state is a warning, not a blocker for the underlying workflow
|
|
51
|
+
state is a warning, not a blocker for the underlying workflow; point to
|
|
52
|
+
`/doctor` to inspect and offer the approved generated-state reset.
|
|
58
53
|
8. **Onboarding check** - Before recommending `/overview`, check whether `AGENTS.md`
|
|
59
54
|
still contains the `<!-- devflow:onboarding-required -->` marker or standard template commands.
|
|
60
55
|
When it does, onboarding is incomplete and `/onboard` is the next action.
|
|
@@ -84,6 +79,8 @@ A short, scannable summary, not a wall of text. Aim for something like:
|
|
|
84
79
|
|
|
85
80
|
End with a single suggested next action, chosen in this order:
|
|
86
81
|
|
|
82
|
+
- The project configuration is invalid -> `/doctor`.
|
|
83
|
+
- Dashboard activity is malformed -> `/doctor`.
|
|
87
84
|
- The overview is missing or stale and no feature is in progress -> `/overview`.
|
|
88
85
|
- A spec is in progress with unchecked steps -> `/implement [id]` and name the step.
|
|
89
86
|
- A spec is in progress and all implementation steps are checked -> `/check [id]` if
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze
|
|
3
|
+
description: "[devflow] Unified SA requirement ingestion, multi-format doc parsing (PDF, Word, Excel, images, text), codebase impact scan, and Socratic clarification checklist."
|
|
4
|
+
argument-hint: "[{file-path, raw requirement text, or REQ-ID}]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# analyze - SA Requirement Ingestion & Codebase Impact Analysis
|
|
8
|
+
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
11
|
+
**First action:** Before project inspection, preflight, or any other tool call,
|
|
12
|
+
publish `running` to `devflow/.state/run.json` using the dashboard activity
|
|
13
|
+
contract in `AGENTS.md`.
|
|
14
|
+
|
|
15
|
+
`/analyze` is the flagship System Analyst (SA) entry point in Nexus-DevFlow. It ingests messy, multi-format requirements, auto-allocates an isolated Request Workspace, normalizes raw content into structured Markdown, scans codebase impact (for existing systems), and generates a Socratic clarification checklist before system design.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Invocations & Usage
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
# 1. Ingest specific file from any path (PDF, DOCX, XLSX, Image, CSV, Text)
|
|
23
|
+
/analyze C:\Users\...\Downloads\customer-spec.pdf
|
|
24
|
+
/analyze ./mockup.png ./schema.xlsx "ระบบสะสมแต้มสมาชิก"
|
|
25
|
+
|
|
26
|
+
# 2. Ingest raw text or requirement from chat
|
|
27
|
+
/analyze "ลูกค้าต้องการระบบผ่อนชำระ 0% เชื่อมกับ KBank Payment Gateway..."
|
|
28
|
+
|
|
29
|
+
# 3. Scan pending unassigned files in devflow/inbox/
|
|
30
|
+
/analyze
|
|
31
|
+
|
|
32
|
+
# 4. Resume analysis on an existing Request ID
|
|
33
|
+
/analyze REQ-20260903-001
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 4-Step Analysis Execution Pipeline
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
[Multi-format Input] ──▶ 1. Auto-Allocate & Ingest ──▶ 2. Parse & Normalize
|
|
42
|
+
│
|
|
43
|
+
▼
|
|
44
|
+
[Clarification Checklist] ◀── 4. Socratic Gap Scan ◀── 3. Codebase Impact Scan
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### Step 1: Auto-Allocate Workspace & Ingestion (Frictionless Ingest)
|
|
50
|
+
1. **Allocate REQ-ID**: Generate sequential ID format `REQ-YYYYMMDD-NNN` (e.g. `REQ-20260903-001-point-system`).
|
|
51
|
+
2. **Create Request Workspace**:
|
|
52
|
+
```text
|
|
53
|
+
devflow/inbox/{REQ-ID}/
|
|
54
|
+
├── raw/ # เก็บไฟล์ต้นฉบับ (PDF, Word, Excel, Images, Email)
|
|
55
|
+
├── parsed.md # ข้อความ/ตารางที่สกัดออกมาแล้ว (Clean Markdown)
|
|
56
|
+
└── clarifications.md # รายการคำถามที่ต้องไปถาม Stakeholder เพิ่ม
|
|
57
|
+
```
|
|
58
|
+
3. Copy or save incoming files into `devflow/inbox/{REQ-ID}/raw/`.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Step 2: Parse & Normalize Requirement (`parsed.md`)
|
|
63
|
+
1. Extract text and tables from all raw files:
|
|
64
|
+
- For Office/PDF docs: Invoke `convert-any-to-md` or document extractor.
|
|
65
|
+
- For Web URLs / Confluence / Notion: Invoke `defuddle`.
|
|
66
|
+
- For Images / Wireframes / Screenshots: Conduct Multimodal Vision OCR and describe layout and fields.
|
|
67
|
+
2. Structure into `devflow/inbox/{REQ-ID}/parsed.md`:
|
|
68
|
+
- **Executive Summary**: วัตถุประสงค์หลักของ Requirement
|
|
69
|
+
- **Target Persona & User Stories**: ใครทำอะไร เพื่ออะไร
|
|
70
|
+
- **Functional Requirements (FR)**: รายการฟังก์ชันและ Business Rules
|
|
71
|
+
- **Non-Functional Requirements (NFR)**: Performance, Security, PDPA, Retention
|
|
72
|
+
- **Data Entities & Fields**: ฟิลด์ข้อมูลและชนิดข้อมูลเบื้องต้น
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Step 3: Codebase Impact & Blast Radius Analysis (`codebase-impact.md`)
|
|
77
|
+
*(ดำเนินการเมื่อเป็นระบบเดิม / Brownfield Codebase)*
|
|
78
|
+
|
|
79
|
+
1. Search codebase patterns using `grep_search`, `rg`, and AST analysis for affected models, controllers, APIs, and routes.
|
|
80
|
+
2. Calculate **Blast Radius & Complexity Score**:
|
|
81
|
+
- **Affected Files & Modules**: รายการไฟล์ที่ต้องแก้ไขหรือสร้างใหม่
|
|
82
|
+
- **API & Contract Breaking Risk**: ตรวจสอบว่ากระทบกับ API เดิมหรือ Third-Party หรือไม่
|
|
83
|
+
- **Complexity Rating**: `Low` | `Medium` | `High` | `Extreme` พร้อมเหตุผล
|
|
84
|
+
3. Save analysis report to `devflow/analysis/{REQ-ID}/codebase-impact.md`.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Step 4: Socratic Gap Detection & Clarification Checklist (`clarifications.md`)
|
|
89
|
+
1. Apply `grilling` and `domain-modeling` lenses to detect gaps:
|
|
90
|
+
- **Missing Edge Cases**: เงื่อนไขขอบ, กรณีข้อมูลผิดพลาด, เน็ตหลุด, Concurrent Requests
|
|
91
|
+
- **Ambiguous Business Rules**: กฎที่ยังคลุมเครือ ไม่ระบุ SLA หรือขั้นตอนที่ชัดเจน
|
|
92
|
+
- **Security & Authorization**: การกำหนด Role, สิทธิ์การเข้าถึงข้อมูล, ข้อมูลส่วนบุคคล (PII)
|
|
93
|
+
2. Generate an actionable checklist in `devflow/inbox/{REQ-ID}/clarifications.md` for the SA to take directly into stakeholder meetings.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Output Artifacts Summary
|
|
98
|
+
|
|
99
|
+
| Artifact | Location | Purpose |
|
|
100
|
+
| :--- | :--- | :--- |
|
|
101
|
+
| **Raw Files** | `devflow/inbox/{REQ-ID}/raw/` | Archived original files |
|
|
102
|
+
| **Parsed Spec** | `devflow/inbox/{REQ-ID}/parsed.md` | Clean structured Markdown requirements |
|
|
103
|
+
| **Impact Report** | `devflow/analysis/{REQ-ID}/codebase-impact.md` | Codebase blast radius & complexity score |
|
|
104
|
+
| **Clarifications** | `devflow/inbox/{REQ-ID}/clarifications.md` | Socratic questions for stakeholders |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Next Workflow Step
|
|
109
|
+
|
|
110
|
+
Once analysis is reviewed and gaps are aligned, proceed to **System Design & Acceptance Test Matrix**:
|
|
111
|
+
```bash
|
|
112
|
+
/design {REQ-ID}
|
|
113
|
+
```
|