@jakkrichm/create-nexus-devflow 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/create-nexus-devflow.d.ts +2 -0
  3. package/dist/bin/create-nexus-devflow.js +63 -2
  4. package/dist/bin/create-nexus-devflow.js.map +1 -1
  5. package/dist/lib/project-config.d.ts +3 -1
  6. package/dist/lib/project-config.js +3 -1
  7. package/dist/lib/project-config.js.map +1 -1
  8. package/dist/lib/skill-manager.d.ts +5 -0
  9. package/dist/lib/skill-manager.js +30 -0
  10. package/dist/lib/skill-manager.js.map +1 -1
  11. package/dist/lib/update.d.ts +4 -2
  12. package/dist/lib/update.js +12 -6
  13. package/dist/lib/update.js.map +1 -1
  14. package/dist/scripts/prepare-template.js +11 -0
  15. package/dist/scripts/prepare-template.js.map +1 -1
  16. package/package.json +1 -1
  17. package/template/.agents/skills/analyze/SKILL.md +113 -0
  18. package/template/.agents/skills/doctor/SKILL.md +52 -49
  19. package/template/.agents/skills/doctor/scripts/run-state.mjs +513 -0
  20. package/template/.agents/skills/feature/SKILL.md +2 -0
  21. package/template/.agents/skills/feature/reference/feature-spec-template.md +82 -0
  22. package/template/.agents/skills/implement/SKILL.md +3 -35
  23. package/template/.agents/skills/implement/reference/rollback-implementation.md +35 -0
  24. package/template/.agents/skills/report-html/SKILL.md +25 -5
  25. package/template/.agents/skills/status/SKILL.md +17 -20
  26. package/template/.claude/skills/analyze/SKILL.md +113 -0
  27. package/template/.claude/skills/doctor/SKILL.md +52 -49
  28. package/template/.claude/skills/doctor/scripts/run-state.mjs +513 -0
  29. package/template/.claude/skills/feature/SKILL.md +2 -0
  30. package/template/.claude/skills/feature/reference/feature-spec-template.md +82 -0
  31. package/template/.claude/skills/implement/SKILL.md +3 -35
  32. package/template/.claude/skills/implement/reference/rollback-implementation.md +35 -0
  33. package/template/.claude/skills/report-html/SKILL.md +25 -5
  34. package/template/.claude/skills/status/SKILL.md +17 -20
  35. package/template/AGENTS.md +19 -11
  36. package/template/devflow/build-plan.md +31 -0
  37. package/template/devflow/reference/studio.html +0 -504
@@ -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. Render Interactive HTML Dashboard
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/reports/{RUNNING_ID}-report.html` (or adjacent `{xxx-slug}.html`)
59
+ - Output: `devflow/context/{xxx-slug}/report.html` (or adjacent `{xxx-slug}.html`)
40
60
 
41
- ### 3. Output
61
+ ### 4. Output
42
62
  Provide:
43
- - Generated HTML file path: `file:///devflow/reports/{RUNNING_ID}-report.html`
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
- This skill answers one question: *where am I?* It reads the files that already
14
- track progress and prints a short orientation. It is the fast way back in after a
15
- break, a context clear, or a day away. It never changes anything: no edits, no
16
- commits, no installs, no builds, no branch changes.
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
- For setup problems, missing files, placeholder plans, adapter drift, or questions
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 reads
26
+ ## What it gathers
30
27
 
31
- Gather these, then summarize. Don't dump file contents; report the distilled
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`. Count checked vs unchecked leaf
35
- items. Name the next unchecked leaf, the same target `/feature` would pick,
36
- and note if a parent item was split into sub-items (`4a`, `4b`, ...).
37
- 2. **Current work & Spec Queue** - scan `devflow/context/{xxx-slug}/`. Is something in
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
@@ -40,10 +40,10 @@ Unused adapter families can be removed. Codex, Antigravity, GitHub Copilot, and
40
40
 
41
41
  ### Universal Invocation & Agent Directives:
42
42
 
43
- 1. **Canonical Command Names & AI Provider Invocation**: Each workflow stage and companion tool has exactly **one Canonical Name** (e.g. `feature`, `fix`, `implement`, `check`, `complete`, `continuous`, `discovery`, `idea`, `grill`, `brainstorm`, `devflow`, `doctor`, `overview`, `debug`, `onboard`, `adopt`, `try`, `rollback`, `ci`, `test`, `setup-tests`, `browser-tests`, `autopilot`, `prototype`, `report-html`, `brief`, `audit`, `release`, `convert-any-to-md`, `publish-devflow`). The way you invoke commands depends on your AI Provider / Tool:
44
- - **Canonical Name (Plain text)**: Directly invoke or prompt the command by its standard name (e.g., `feature`, `implement`, `continuous`, `devflow`, `discovery`).
45
- - **Slash Prefix (`/`)**: For tools supporting slash commands (Claude Code, Google Antigravity, Gemini CLI), e.g., `/feature`, `/fix`, `/implement`, `/continuous`, `/devflow`, `/discovery`.
46
- - **Dollar Prefix (`$`)**: For OpenAI Codex CLI or skill-invocation tools, e.g., `$feature`, `$fix`, `$continuous`, `$devflow`, `$discovery`.
43
+ 1. **Canonical Command Names & AI Provider Invocation**: Each workflow stage and companion tool has exactly **one Canonical Name** (e.g. `feature`, `fix`, `implement`, `check`, `complete`, `continuous`, `analyze`, `discovery`, `idea`, `grill`, `brainstorm`, `bughunter`, `devflow`, `doctor`, `overview`, `debug`, `onboard`, `adopt`, `try`, `rollback`, `ci`, `test`, `setup-tests`, `browser-tests`, `autopilot`, `prototype`, `report-html`, `brief`, `audit`, `release`, `convert-any-to-md`, `publish-devflow`). The way you invoke commands depends on your AI Provider / Tool:
44
+ - **Canonical Name (Plain text)**: Directly invoke or prompt the command by its standard name (e.g., `feature`, `implement`, `continuous`, `devflow`, `discovery`, `analyze`).
45
+ - **Slash Prefix (`/`)**: For tools supporting slash commands (Claude Code, Google Antigravity, Gemini CLI), e.g., `/feature`, `/fix`, `/implement`, `/continuous`, `/devflow`, `/discovery`, `/analyze`.
46
+ - **Dollar Prefix (`$`)**: For OpenAI Codex CLI or skill-invocation tools, e.g., `$feature`, `$fix`, `$continuous`, `$devflow`, `$discovery`, `$analyze`.
47
47
  2. **OpenAI Codex & Non-Native CLI Tools**: In environments without automatic background skill discovery (such as OpenAI Codex CLI, Aider, or generic terminals), **you MUST use your file reading tool to inspect `.agents/skills/<skill>/SKILL.md` before executing the stage** to strictly follow its schema, artifact contract, and quality gates.
48
48
  3. **Google Antigravity & Claude Code**: Native skill engines automatically discover and surface `.agents/skills/` and `.claude/skills/`.
49
49
  4. **State-Aware Inspection**: When unsure what to do next, invoke `devflow` to automatically inspect active task directories in `devflow/context/{xxx-slug}/`, `devflow/discoveries/`, and `devflow/ideas.md`.
@@ -71,8 +71,9 @@ All development tasks execute through the 4-step progressive lifecycle:
71
71
 
72
72
  ---
73
73
 
74
- ## 🔮 Pre-Flight Discovery & Architectural Alignment (Companions)
74
+ ## 🔮 Pre-Flight Discovery, SA & Architectural Alignment (Companions)
75
75
 
76
+ - `analyze`: Unified SA requirement ingestion, multi-format doc parsing (PDF, Word, Excel, images, text), codebase impact scan (`devflow/inbox/`, `devflow/analysis/`).
76
77
  - `discovery`: Unified pre-delivery discovery & exploration (`devflow/discoveries/{DISC-ID}/discovery.md`).
77
78
  - `idea`: Quick idea capture and AI feasibility scoring (`devflow/ideas.md`).
78
79
  - `grill` (or `align`): Socratic alignment, domain modeling, and ADR recording (`devflow/decisions/`).
@@ -84,13 +85,20 @@ All development tasks execute through the 4-step progressive lifecycle:
84
85
 
85
86
  The dashboard and status reporting can show the active or most recent substantial DevFlow command from `devflow/.state/run.json`. This file is generated local state, ignored by Git, and never part of a feature commit.
86
87
 
87
- <<<<<<< HEAD
88
- Commands with meaningful progress or a durable handoff should write it when the state directory exists: `onboard`, `adopt`, `discovery`, `overview`, `feature`, `fix`, `rollback`, `implement`, `debug`, `check`, `audit`, `tests`, `browser-tests`, `ci`, `prototype`, `autopilot`, `continuous`, `complete`, and `release`. Short read-only orientation commands such as `brief`, `try`, `status`, and `doctor` do not need activity state.
89
- =======
90
- Commands with meaningful progress or a durable handoff should write it when the state directory exists: `onboard`, `adopt`, `discovery`, `overview`, `feature`, `fix`, `rollback`, `implement`, `debug`, `check`, `audit`, `setup-tests`, `ci`, `prototype`, `autopilot`, `continuous`, `complete`, and `release`. Short read-only orientation commands such as `brief`, `try`, `status`, and `doctor` do not need activity state.
91
- >>>>>>> feature/064-bughunter-master-skill-and-sync-engine
88
+ Commands with meaningful progress or a durable handoff should write it when the state directory exists: `onboard`, `adopt`, `analyze`, `discovery`, `overview`, `feature`, `fix`, `rollback`, `implement`, `debug`, `check`, `audit`, `bughunter`, `setup-tests`, `browser-tests`, `test`, `ci`, `prototype`, `autopilot`, `continuous`, `complete`, and `release`. Short read-only orientation commands such as `brief`, `try`, `status`, and `doctor` do not need activity state. Doctor's optional approved reset removes malformed activity instead of recording another run.
92
89
 
93
- Writing the initial activity record is the first action of a tracked command, before project inspection, preflight, or other tool calls. This one generated state write does not authorize product changes or bypass any safety check. Set status to `running`, use the command name and a truthful initial summary, then replace the record at meaningful milestones. On a preflight stop or another blocker, set it to `blocked` with the exact recovery command. Leave the final state in place for the next session; the next tracked command replaces it. Use this schema:
90
+ Writing the initial activity record is the first action of a tracked command, before project inspection, preflight, or other tool calls. This one generated state write does not authorize product changes or bypass any safety check.
91
+
92
+ Never create or edit `run.json` directly. From the project root, use the first helper that exists:
93
+
94
+ ```text
95
+ node .agents/skills/doctor/scripts/run-state.mjs <action> <options>
96
+ node .claude/skills/doctor/scripts/run-state.mjs <action> <options>
97
+ ```
98
+
99
+ Start with `start --command <skill> --summary <truthful-summary> --boundary <boundary>`. Use `update` at meaningful milestones or for a blocker, with `--status blocked` and `--resume <exact-command>` when recovery is needed. End with `finish --status ready|completed --summary <truthful-summary>`. The helper validates every field before atomically replacing the generated file. If it is missing or fails, report the activity warning and continue the workflow without writing a manual fallback.
100
+
101
+ The helper writes this schema:
94
102
 
95
103
  ```json
96
104
  {
@@ -172,4 +172,35 @@
172
172
  - *Dependencies*: Feature 20, DISC-20260902-001
173
173
  - *Scope*: ขยายชุดทดสอบ Evals Routing ให้ครอบคลุมทุกสคิล (`browser-tests.json`, `continuous.json`, `bughunter.json`, `publish-devflow.json`), นำเข้าและปรับใช้ Live-Agent E2E Test Harness (`scripts/e2e/`), สคริปต์จำลองติดตั้ง Sandbox Scaffolding (`scripts/scaffold-sandbox.ts`), สคริปต์ตรวจจับ Upstream Drift (`scripts/check-upstream-drift.ts`), และเอกสารวิเคราะห์ Token Efficiency (`benchmarks/context-efficiency.md`)
174
174
 
175
+ ---
176
+
177
+ ## 🎨 Phase 22: Visual Dashboard & Diagram Integration
178
+
179
+ - [x] **22. Standalone HTML Report Diagram Integration (`DISC-20260902-003`, `069-report-html-diagram-integration`)** `[Size: S]`
180
+ - *Dependencies*: Feature 17 (`055`), DISC-20260902-003
181
+ - *Scope*: ปรับปรุง `md2html-report.mjs` รองรับการเรนเดอร์ native Mermaid block (`.mermaid`), เพิ่มการสแกนและ embed ไฟล์ไดอะแกรมจาก `devflow/context/{xxx-slug}/diagrams/` (`.svg` และ `.html`), อัปเดต `report-html` skill ให้ตรวจจับและ auto-install `archify` / `diagram-design` ผ่าน `nexus-devflow skill add` และเขียนชุดทดสอบครอบคลุม
182
+
183
+ ---
184
+
185
+ ## 🧹 Phase 23: Reference Artifacts Housekeeping
186
+
187
+ - [x] **23. Prune Studio Reference Artifacts (`069-prune-studio-reference-artifacts`)** `[Size: S]`
188
+ - *Dependencies*: None
189
+ - *Scope*: ลบไฟล์ Static HTML Snapshot ตกค้าง `devflow/reference/studio.html` และสคริปต์ `scripts/export-studio.ts` โดยยังคงรักษา Webview Studio Engine (`webview-studio.ts`), MCP tool (`devflow_get_studio_html`), CLI Command (`nexus-devflow studio`) และชุดทดสอบทั้งหมดให้ทำงานได้สมบูรณ์ 100%
190
+
191
+ ---
192
+
193
+ ## 📐 Phase 24: Role-Based Profiles & SA Command Suite Engine
194
+
195
+ - [x] **24. Role-Based Profiles & SA Analyze Command Engine (`DISC-20260903-001`, `070-role-based-profile-and-sa-analyze-engine`)** `[Size: M]`
196
+ - *Dependencies*: None
197
+ - *Scope*: เพิ่มตัวเลือก `--role [sa|dev|full]` ใน CLI Installer (`create-nexus-devflow`), ระบบจำแนกชุด Skill Profiles ใน `skill-manager.ts`, โฟลเดอร์ Template สำหรับ SA (`devflow/inbox/`, `devflow/analysis/`, `devflow/blueprints/`), พัฒนาสคิล `/analyze` สำหรับสกัดเอกสารหลายรูปแบบ (PDF, Word, Excel, รูปภาพ, ข้อความ) และวิเคราะห์ Codebase Impact พร้อมชุดทดสอบ Automated Tests
198
+
199
+ ---
200
+
201
+ ## 🔄 Phase 25: Upstream AI Blueprint v1.5.0 – v1.5.1 Synchronization
202
+
203
+ - [x] **25. Sync Upstream v1.5.0 & v1.5.1 (Hardened Run-State Engine & On-Demand Context Loading) (`DISC-20260903-001`, `070-sync-upstream-ai-blueprint-v150-v151`)** `[Size: M]`
204
+ - *Dependencies*: Feature 20, Feature 21, DISC-20260903-001
205
+ - *Scope*: พอร์ตและปรับแต่ง Hardened Dashboard Activity State Helper (`.agents/skills/doctor/scripts/run-state.mjs` และ `.claude/`), บังคับใช้ Zero-Manual Writes กับ `devflow/.state/run.json`, ปรับใช้ On-Demand Context Loading Protocol พร้อมแยก Reference Templates ย่อย (`reference/`), เพิ่ม Unit Tests `run-state-helper.test.ts`, อัปเดต `scripts/validate-framework.ts`, `AGENTS.md`, `CLAUDE.md` และยืนยันการผ่าน 100%
175
206