@jakkrichm/create-nexus-devflow 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/create-nexus-devflow.js +29 -5
  3. package/dist/bin/create-nexus-devflow.js.map +1 -1
  4. package/dist/lib/command-catalog.js +5 -2
  5. package/dist/lib/command-catalog.js.map +1 -1
  6. package/dist/lib/dashboard.js +1 -1
  7. package/dist/lib/discoveries.js +18 -6
  8. package/dist/lib/discoveries.js.map +1 -1
  9. package/dist/lib/ideas.js +2 -2
  10. package/dist/lib/ideas.js.map +1 -1
  11. package/dist/lib/project-metadata.d.ts +1 -1
  12. package/dist/lib/project-metadata.js +3 -2
  13. package/dist/lib/project-metadata.js.map +1 -1
  14. package/dist/lib/update.js +13 -5
  15. package/dist/lib/update.js.map +1 -1
  16. package/dist/lib/workflow-state.js +9 -6
  17. package/dist/lib/workflow-state.js.map +1 -1
  18. package/dist/scripts/prepare-template.js +10 -2
  19. package/dist/scripts/prepare-template.js.map +1 -1
  20. package/package.json +1 -1
  21. package/template/.agents/skills/10-define/SKILL.md +1 -1
  22. package/template/.agents/skills/adopt/SKILL.md +58 -5
  23. package/template/.agents/skills/brainstorm/SKILL.md +1 -1
  24. package/template/.agents/skills/devflow/SKILL.md +9 -7
  25. package/template/.agents/skills/discovery/SKILL.md +75 -150
  26. package/template/.agents/skills/doctor/SKILL.md +23 -16
  27. package/template/.agents/skills/feature/SKILL.md +1 -0
  28. package/template/.agents/skills/grill/SKILL.md +93 -0
  29. package/template/.agents/skills/implement/SKILL.md +2 -2
  30. package/template/.agents/skills/onboard/SKILL.md +18 -17
  31. package/template/.agents/skills/rollback/SKILL.md +1 -1
  32. package/template/.claude/skills/10-define/SKILL.md +3 -3
  33. package/template/.claude/skills/20-spec/SKILL.md +1 -2
  34. package/template/.claude/skills/30-plan/SKILL.md +1 -2
  35. package/template/.claude/skills/40-execute/SKILL.md +2 -2
  36. package/template/.claude/skills/50-verify/SKILL.md +2 -2
  37. package/template/.claude/skills/60-report/SKILL.md +2 -2
  38. package/template/.claude/skills/70-deliver/SKILL.md +2 -2
  39. package/template/.claude/skills/adopt/SKILL.md +191 -75
  40. package/template/.claude/skills/audit/SKILL.md +267 -133
  41. package/template/.claude/skills/autopilot/SKILL.md +226 -167
  42. package/template/.claude/skills/brainstorm/SKILL.md +62 -0
  43. package/template/.claude/skills/brief/SKILL.md +93 -92
  44. package/template/.claude/skills/check/SKILL.md +96 -76
  45. package/template/.claude/skills/ci/SKILL.md +140 -61
  46. package/template/.claude/skills/complete/SKILL.md +156 -101
  47. package/template/.claude/skills/convert-any-to-md/SKILL.md +2 -2
  48. package/template/.claude/skills/convert-any-to-md/references/setup.md +29 -0
  49. package/template/.claude/skills/convert-any-to-md/scripts/convert_any_to_md.py +487 -0
  50. package/template/.claude/skills/convert-any-to-md/scripts/requirements.txt +3 -0
  51. package/template/.claude/skills/debug/SKILL.md +124 -49
  52. package/template/.claude/skills/devflow/SKILL.md +18 -10
  53. package/template/.claude/skills/discovery/SKILL.md +65 -119
  54. package/template/.claude/skills/doctor/SKILL.md +195 -72
  55. package/template/.claude/skills/feature/SKILL.md +197 -152
  56. package/template/.claude/skills/fix/SKILL.md +41 -90
  57. package/template/.claude/skills/grill/SKILL.md +93 -0
  58. package/template/.claude/skills/idea/SKILL.md +2 -2
  59. package/template/.claude/skills/implement/SKILL.md +189 -46
  60. package/template/.claude/skills/onboard/SKILL.md +216 -85
  61. package/template/.claude/skills/overview/SKILL.md +44 -29
  62. package/template/.claude/skills/prototype/SKILL.md +82 -27
  63. package/template/.claude/skills/release/SKILL.md +119 -130
  64. package/template/.claude/skills/report-html/SKILL.md +2 -2
  65. package/template/.claude/skills/rollback/SKILL.md +123 -77
  66. package/template/.claude/skills/status/SKILL.md +109 -0
  67. package/template/.claude/skills/test/SKILL.md +2 -2
  68. package/template/.claude/skills/tests/SKILL.md +126 -0
  69. package/template/.claude/skills/try/SKILL.md +77 -65
  70. package/template/AGENTS.md +8 -7
  71. package/template/devflow/build-plan.md +8 -0
  72. package/template/devflow/context/ai-interaction.md +11 -0
  73. package/template/devflow/context/coding-standards.md +15 -1
  74. package/template/devflow/context/current-stage.md +1 -1
  75. package/template/devflow/decisions/.gitkeep +0 -0
  76. package/template/devflow/decisions/README.md +24 -0
  77. package/template/devflow/history/HISTORY.md +1 -1
  78. package/template/devflow/history/features/README.md +5 -0
  79. package/template/devflow/history/fixes/README.md +5 -0
  80. package/template/devflow/history/rollbacks/README.md +5 -0
  81. package/template/.agents/skills/00-explore/SKILL.md +0 -84
  82. package/template/.claude/skills/00-explore/SKILL.md +0 -84
@@ -1,10 +1,16 @@
1
1
  ---
2
2
  name: devflow
3
- description: "[Devflow] Flagship interactive guide, state inspector, and intent router for DevFlow workflows."
3
+ description: "[devflow][B] Flagship interactive guide, state inspector, and intent router for DevFlow workflows."
4
4
  ---
5
5
 
6
6
  # devflow - Interactive Workflow Guide & Intent Router for Nexus-DevFlow
7
7
 
8
+ ## Command Track Policy
9
+ - [F] Fast-Track only
10
+ - [D] Deep-Track only
11
+ - [B] Available in both tracks (Track-agnostic)
12
+
13
+
8
14
  Use this skill to guide the user on what to do next, inspect current workspace state, map their natural language intent to the right Nexus-DevFlow track (Fast-Track or Deep-Track) or companion command, or display a sitemap of available DevFlow skills.
9
15
 
10
16
  ## Input
@@ -17,7 +23,7 @@ Use this skill to guide the user on what to do next, inspect current workspace s
17
23
  Nexus-DevFlow supports two seamless workflow tracks:
18
24
  1. **🏎️ Fast-Track (Blueprint Mode - 4 Steps)**: `/spec` ➔ `/implement` ➔ `/check` ➔ `/complete`
19
25
  *Driven by a **Single Living Spec (`current-feature.md`)** for fast, high-velocity daily development and bugfixes (85% of tasks).*
20
- 2. **🏗️ Deep-Track (Architect Mode - 8 Steps)**: `00-explore` ➔ `10-define` ➔ `20-spec` ➔ `30-plan` ➔ `40-execute` ➔ `50-verify` ➔ `60-report` ➔ `70-deliver`
26
+ 2. **🏗️ Deep-Track (Architect Mode - 8 Steps)**: `discovery` ➔ `10-define` ➔ `20-spec` ➔ `30-plan` ➔ `40-execute` ➔ `50-verify` ➔ `60-report` ➔ `70-deliver`
21
27
  *Driven by modular separate stage files for large, high-stakes architectural epics and multi-agent coordination.*
22
28
 
23
29
  ---
@@ -39,14 +45,14 @@ When invoked without an argument (or when determining the next step), inspect:
39
45
  - If at `40-execute.md` with all tasks done -> Recommend `50-verify {RUNNING_ID}`.
40
46
  - If passed `50-verify.md` -> Recommend `60-report {RUNNING_ID}` then `70-deliver {RUNNING_ID}`.
41
47
  3. **Active Discovery**: Check `devflow/discoveries/` for open discovery notes.
42
- 4. **Pending Ideas Inbox**: Check `devflow/ideas.md`. If items exist under `## 📌 Pending Ideas`, summarize them in a **💡 Pending Ideas (Inbox)** list with their IDs (`[IDEA-xxx]`), feasibility, and mention that they can be started with `/spec IDEA-xxx`.
48
+ 4. **Pending Ideas Inbox**: Check `devflow/ideas.md`. If items exist under `## 📌 Pending Ideas`, summarize them in a **💡 Pending Ideas (Inbox)** list with their IDs (`[IDEA-xxx]`), feasibility, and mention that they can be started with `/spec IDEA-xxx` or `/discovery IDEA-xxx`.
43
49
  5. **Audit Findings Ledger**: Check `devflow/context/findings.md` for open high-severity findings.
44
50
 
45
51
  ### Default State Recommendations
46
- - If no run is active and user wants to start a feature -> Recommend `/spec <name>` (or `/feature <name>`).
52
+ - if no run is active and user wants to start a feature -> Recommend `/feature <name>`.
47
53
  - If no run is active and user wants to fix a bug -> Recommend `/fix <bug>`.
48
- - If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/spec IDEA-xxx`.
49
- - If no run is active and user wants deep architectural exploration -> Recommend `00-explore`.
54
+ - If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/spec IDEA-xxx` or `/discovery IDEA-xxx`.
55
+ - If no run is active and user wants deep architectural exploration -> Recommend `discovery`.
50
56
  - If user asks to check system health -> Recommend `doctor`.
51
57
 
52
58
  ---
@@ -65,7 +71,7 @@ When invoked without an argument (or when determining the next step), inspect:
65
71
  | "Setup DevFlow on fresh/new project" | `onboard` | `onboard` / `setup` | `onboard` -> `/spec` or `10-define` |
66
72
  | "Adopt DevFlow on existing codebase" | `adopt` | `adopt` / `bootstrap` | `adopt` -> `/spec` or `10-define` |
67
73
  | "Check setup health & diagnostics" | `doctor` | `doctor` / `health` | `doctor` |
68
- | "Explore a new request / deep idea" | `00-explore` | `discover` | **Deep-Track**: `00` -> `10` -> `20` -> ... |
74
+ | "Explore a new request / deep idea" | `discovery` | `discovery` / `/discovery` | **Deep-Track**: `discovery` -> `10` -> `20` -> ... |
69
75
  | "Define delivery boundaries and ID" | `10-define` | `define` | **Deep-Track**: `10` -> `20` -> `30` |
70
76
  | "Break down spec into plan (Deep)" | `30-plan` | `plan` | **Deep-Track**: `30` -> `40` -> `50` |
71
77
  | "Deep code implementation" | `40-execute` | `implement` | **Deep-Track**: `40` -> `50` |
@@ -78,6 +84,7 @@ When invoked without an argument (or when determining the next step), inspect:
78
84
  | "Pre-check scope & risks before spec" | `brief` | `brief` | Companion |
79
85
  | "Run autonomous bounded delivery loop"| `autopilot` | `autopilot` | Companion |
80
86
  | "Brainstorm ideas without ID" | `brainstorm` | `brainstorm` | Companion |
87
+ | "Socratic alignment / ADR / glossary" | `grill` | `/grill` / `align` | Companion (pre-spec / domain modeling) |
81
88
  | "Investigate failure or root cause" | `debug` | `debug` | Companion |
82
89
 
83
90
  ---
@@ -91,7 +98,7 @@ When invoked without an argument (or when determining the next step), inspect:
91
98
  - `complete` (`/complete`, `$complete`) - Safety pass, release digest, git merge, close run
92
99
 
93
100
  ### 2. Deep-Track (Architect Mode - 8 Steps)
94
- - `00-explore` - Explore request and decide Proceed/Defer/Reject
101
+ - `discovery` - Project roadmap planning or feature exploration before delivery commitment
95
102
  - `10-define` - Lock delivery boundaries and allocate Running ID
96
103
  - `20-spec` - Formalize markdown delivery contract
97
104
  - `30-plan` - Breakdown spec into phased tasks with test decisions
@@ -103,6 +110,8 @@ When invoked without an argument (or when determining the next step), inspect:
103
110
  ### 3. Public Companion Commands
104
111
  - `devflow` (`status`, `/devflow`) - Interactive guide, state inspector, and router
105
112
  - `idea` (`/idea`) - Quick idea capture and AI feasibility enrichment into `devflow/ideas.md`
113
+ - `grill` (`/grill`, `align`) - Codebase-grounded Socratic alignment, domain glossary, and ADR recorder
114
+ - `brainstorm` - Ideate and compare trade-off options without allocating running IDs
106
115
  - `report-html` (`/report:html`) - Standalone interactive HTML report dashboard generator
107
116
  - `onboard` - Baseline stack setup for freshly scaffolded projects
108
117
  - `adopt` - Bootstrap DevFlow into existing brownfield projects
@@ -112,6 +121,5 @@ When invoked without an argument (or when determining the next step), inspect:
112
121
  - `ci` - Automatic GitHub Actions workflow setup
113
122
  - `brief` - Read-only scope and risk pre-briefing
114
123
  - `autopilot` - Autonomous bounded delivery loop
115
- - `brainstorm` - Ideate without allocating running IDs
116
124
  - `debug` - Root cause investigation before or during implementation
117
- - `overview` - Living context synchronization into project-overview.md
125
+ - `overview` - Living context synchronization into project-overview.md
@@ -1,145 +1,91 @@
1
1
  ---
2
2
  name: discovery
3
- description: "[Devflow] Deep multi-turn guided project discovery interview that develops detailed project-plan.md and build-plan.md files through an adaptive conversation, drafting only after user approval."
4
- argument-hint: "[optional product idea or context]"
3
+ description: "[devflow][D] Unified discovery and exploration stage in DevFlow 2.0 - conducts project-level roadmap discovery (project-plan.md/build-plan.md) or feature-level exploration (Stage 00) before delivery commitment."
4
+ argument-hint: "[{title, request, IDEA-xxx, or discovery-id}]"
5
5
  ---
6
6
 
7
- # discovery - Guided Multi-Turn Project Discovery & Architecture Interview
7
+ # discovery - Unified Discovery & Pre-Delivery Exploration
8
8
 
9
- Where this sits in the workflow:
9
+ $ARGUMENTS
10
10
 
11
- ```text
12
- [Product Idea / Concept] -> [discovery] -> devflow/project-plan.md -> /overview -> project-overview.md
13
- (rough thoughts from user) (deep adaptive devflow/build-plan.md (distill) (living source of truth)
14
- interview) (user-owned plans)
15
- ```
16
-
17
- `discovery` is an optional, high-depth conversational planning assistant. It guides the user through an adaptive, multi-turn interview to think through product vision, technical architecture, constraints, and phased delivery roadmap — drafting the two user-owned planning documents (`devflow/project-plan.md` and `devflow/build-plan.md`) only after explicit user review and approval.
18
-
19
- It is **never mandatory**: users who already have clear requirements can write both planning files directly or run `/overview` straight away.
11
+ `/discovery` is the central discovery entry point in Nexus-DevFlow. It operates in two adaptive modes based on input scope:
12
+ 1. **🗺️ Macro Project Discovery**: Develops high-level product and build roadmap plans (`devflow/project-plan.md` & `devflow/build-plan.md`) through an adaptive conversation before `/overview`.
13
+ 2. **🔍 Micro Feature Exploration (Stage 00)**: Explores a specific feature, request, or idea before committing to delivery, routes through supporting lenses, and finishes with a visible `Proceed`, `Defer`, or `Reject` decision before `10-define`.
20
14
 
21
15
  ---
22
16
 
23
- ## Usage & Invocations
17
+ ## Invocations & Usage
24
18
 
25
19
  ```text
26
- /discovery # Start interactive discovery interview
27
- /discovery "AI-powered CRM for SMB" # Start discovery seeded with an initial product concept
28
- $discovery # Codex CLI invocation
20
+ # 1. Macro Project Planning Mode (No arguments or project scope)
21
+ /discovery
22
+ /discovery --project
23
+
24
+ # 2. Micro Feature Exploration Mode (Stage 00 of Deep-Track)
25
+ /discovery {title or request}
26
+ /discovery IDEA-xxx
27
+ /discovery {discovery-id}
29
28
  ```
30
29
 
31
30
  ---
32
31
 
33
- ## The Adaptive Interview Protocol
34
-
35
- Run discovery as an **engaging pair-programming conversation**:
36
- - 🚫 **Do NOT dump 10-20 questions at once.**
37
- - ✅ **Ask 1-2 focused questions at a time.**
38
- - ✅ **Adapt follow-up questions based on previous answers.**
39
- - ✅ **Offer proactive suggestions, sensible defaults, and architectural trade-offs.**
40
-
41
- ---
42
-
43
- ### Step 1 - Check Existing Planning State
44
-
45
- 1. Inspect `devflow/project-plan.md` and `devflow/build-plan.md` (or `blueprint/` equivalents).
46
- 2. If detailed plans already exist:
47
- - Ask the user whether they want to **deepen/refine** the existing plan or **start fresh**.
48
- - Never overwrite existing user-authored content without confirmation.
32
+ ## Mode 1: Macro Project Discovery (Roadmap & System Planning)
49
33
 
50
- ---
34
+ Use when:
35
+ - Starting a new product or shaping high-level architecture across the entire repository.
36
+ - Revisiting the overall project vision, major milestones, or tech stack before generating `/overview`.
51
37
 
52
- ### Step 2 - Conduct Multi-Turn Discovery Interview
53
-
54
- Guide the user through 4 core discovery pillars:
55
-
56
- #### Pillar 1: Product Vision & User Persona
57
- - **Problem Statement**: What core problem does this application solve?
58
- - **Target Audience**: Who is the primary user persona?
59
- - **Core Value & Success Metric**: What is the single most important workflow that delivers value?
60
-
61
- #### Pillar 2: Technical Architecture & Stack
62
- - **Frontend & UI**: Framework (Next.js, Vite, React, Svelte, Vue), Styling (Tailwind, CSS Modules, Vanilla CSS).
63
- - **Backend & APIs**: REST, GraphQL, tRPC, Server Actions, Node.js, Go, Python.
64
- - **Data Layer**: Database (PostgreSQL, SQLite, MongoDB), ORM/Query Builder (Prisma, Drizzle, Kysely), Migrations.
65
- - **Authentication & Security**: Auth provider (NextAuth, Supabase Auth, Clerk, JWT, Session cookies).
66
- - **Integrations & Third-party Services**: Payments (Stripe), Emails (Resend), Cloud storage (S3/R2).
67
-
68
- #### Pillar 3: Constraints & Non-Goals (Scope Boundaries)
69
- - **Non-Goals (Out of Scope)**: What features are explicitly postponed for later phases?
70
- - **Technical & Operational Constraints**: Budget, latency targets, deployment platform (Vercel, Render, AWS, VPS).
71
-
72
- #### Pillar 4: Phased Roadmap & Feature Sizing
73
- - Break down the delivery into sequential phases:
74
- - **Phase 1: MVP Baseline** (Core database models, auth, primary happy path)
75
- - **Phase 2: Core Experience** (Main features, workflows, dashboard, notifications)
76
- - **Phase 3: Polish & Scale** (Edge cases, performance optimizations, exports, settings)
77
- - Assign a **Size** to every feature:
78
- - `XS`: Small tweak / config (~10-30 mins)
79
- - `S`: Single component or route (~1-2 hours)
80
- - `M`: Full CRUD feature or API integration (~ครึ่งวัน)
81
- - `L`: Complex multi-component subsystem (1 วัน)
82
- - `XL`: Major epic (ควรแบ่งย่อยเป็น L หรือ M)
83
- - Define **Dependencies** for sequential execution.
38
+ ### Process:
39
+ 1. **Establish Baseline**: Read `devflow/project-plan.md` and `devflow/build-plan.md` (if present).
40
+ 2. **Adaptive Conversation**: Ask 1-2 focused questions at a time covering problem space, user workflows, MVP boundaries, non-goals, data models, and stack constraints.
41
+ 3. **Periodic Snapshots**: Provide compact summaries of confirmed decisions, working assumptions, and open TODOs.
42
+ 4. **Draft Plans Behind Approval Gate**: Draft proposed `project-plan.md` and `build-plan.md` only when the user explicitly requests drafts.
43
+ 5. **Write on Approval**: Write approved files and recommend `/overview` as the next step.
84
44
 
85
45
  ---
86
46
 
87
- ### Step 3 - Draft Plan Preview & Confirmation Gate
88
-
89
- Once all pillars are sufficiently explored:
90
-
91
- 1. Synthesize the findings into Markdown drafts for both files.
92
- 2. Present the draft summary directly in the chat to the user in **Thai (`th`)**:
93
- - High-level Architectural Summary
94
- - Proposed Feature List by Phase with Sizing and Dependencies
95
- 3. **STOP and ask for user confirmation**:
96
- > *"นี่คือร่างแผนงาน Project Plan และ Build Plan ทั้งหมด คุณต้องการปรับแก้ส่วนไหนเพิ่มเติม หรือยืนยันให้บันทึกลงไฟล์เลยครับ?"*
97
-
98
- ---
47
+ ## Mode 2: Micro Feature Exploration (Stage 00 of Deep-Track)
99
48
 
100
- ### Step 4 - Write User-Owned Planning Documents
49
+ Use when:
50
+ - Exploring a specific feature, complex architectural change, or pending idea (`/discovery IDEA-xxx`).
51
+ - The team needs to evaluate feasibility, options, domain glossary, or root causes before locking delivery scope.
101
52
 
102
- Upon user approval, write to:
103
-
104
- 1. **`devflow/project-plan.md`**:
105
- ```markdown
106
- # 🗺️ Project Plan (User-Owned Architectural Vision)
107
-
108
- ## 1. Product Vision & Problem Statement
109
- ...
110
-
111
- ## 2. Target Users & Core Personas
112
- ...
113
-
114
- ## 3. Technical Architecture & Tech Stack
115
- ...
116
-
117
- ## 4. Key Constraints & Non-Goals
118
- ...
119
- ```
120
-
121
- 2. **`devflow/build-plan.md`**:
122
- ```markdown
123
- # 🏗️ Build Plan (Phased Sequential Feature Queue)
124
-
125
- ## Phase 1: MVP Baseline
126
- - [ ] 1. Project Initialization & Base Tooling (Size: S)
127
- - [ ] 2. Database Schema & Auth Setup (Size: M, Depends on: 1)
128
-
129
- ## Phase 2: Core Workflows
130
- - [ ] 3. Main Dashboard & Data Grid (Size: M, Depends on: 2)
131
- ```
53
+ ### Markdown-First Contract:
54
+ Write the primary discovery artifact to:
55
+ ```text
56
+ devflow/discoveries/{DISCOVERY_ID}-{slug}/discovery.md
57
+ ```
58
+ *(A Discovery ID uses the namespace `DISC-YYYYMMDD-NNN`. It is not a Running ID and does not reserve a numeric delivery run.)*
59
+
60
+ ### 5 Supporting Routes & Built-in Lenses:
61
+
62
+ 1. **Brainstorming Lens (Divergent & Convergent)**:
63
+ - Formulate 2-3 viable options with trade-offs.
64
+ - Construct a **Trade-off Comparison Table** (Pros, Cons, Recommendation).
65
+ 2. **Research & Empirical Proof Lens**:
66
+ - Inspect existing codebase patterns with search tools (`grep_search`, `rg`).
67
+ - Conduct external web search if library feasibility or API contracts are uncertain.
68
+ 3. **PRD & Scoping Lens**:
69
+ - Problem Statement, Target Persona, Core User Stories, and In-Scope vs. Out-of-Scope boundaries.
70
+ 4. **Issue & Bug Triage Lens**:
71
+ - Classify severity (`Critical/Blocker`, `Major`, `Minor`) and determine whether root-cause analysis (`debug`) is required.
72
+ 5. **Socratic Grilling & Domain Alignment Lens (`grill`)**:
73
+ - Codebase-grounded interactive inquiry to clarify entity boundaries, data flows, and edge cases.
74
+ - Record agreed terminology in `devflow/context/glossary.md` and major architecture decisions in `devflow/decisions/ADR-xxx-{slug}.md`.
75
+
76
+ ### Decision & Approval Gate:
77
+ Set one visible decision:
78
+ - `Proceed`: Enough value and evidence exist to define delivery work:
79
+ - **🏎️ Fast-Track (Recommended for 85% of standard features/fixes)**: Handoff to `/feature {discovery_id}` or `/fix {discovery_id}` (writes `devflow/context/current-feature.md`).
80
+ - **🏗️ Deep-Track (For large architectural epics/migrations)**: Handoff to `10-define {discovery_id}` (writes `devflow/context/current-run/10-define.md`).
81
+ - `Defer`: The idea remains relevant but timing or evidence is not ready.
82
+ - `Reject`: The idea should not proceed under current framing.
132
83
 
133
84
  ---
134
85
 
135
- ### Step 5 - Handoff to `/overview`
86
+ ## Next Workflow Recommendations
136
87
 
137
- After writing the planning files, prompt the user with the next recommended action:
138
-
139
- ```markdown
140
- **บันทึกแผนงานลง `devflow/project-plan.md` และ `devflow/build-plan.md` เรียบร้อยแล้ว!**
141
-
142
- 👉 **ขั้นตอนถัดไป**: เรียกคำสั่ง:
143
- `/overview`
144
- เพื่อกลั่นกรองแผนงานทั้งหมดลงสู่ `devflow/context/project-overview.md` ซึ่งจะเป็น Living Source of Truth สำหรับ AI Agent ในทุกๆ Session ครับ
145
- ```
88
+ - **From Macro Project Mode**: Run `/overview` to compile context into `devflow/context/project-overview.md`.
89
+ - **From Micro Stage 00 (Approved Proceed ➔ Fast-Track)**: Run `/feature {discovery_id}` to start lean living spec.
90
+ - **From Micro Stage 00 (Approved Proceed ➔ Deep-Track)**: Run `10-define {discovery_id}` to allocate a Running ID.
91
+ - **From Micro Stage 00 (Defer / Reject)**: No next command needed.
@@ -1,84 +1,207 @@
1
1
  ---
2
2
  name: doctor
3
- description: "[Devflow] Read-only DevFlow health check and diagnostics for context files, adapters, commands, and workflow drift."
3
+ description: "[devflow][B] Run a read-only Blueprint health check for setup, onboarding, required files, tool adapters, commands, optional verification and CI, Blueprint visibility, ignore rules, planning readiness, overview freshness, and workflow drift. Use when the user runs /doctor, asks whether the Blueprint is installed correctly, wants a health check, setup check, doctor pass, or says something feels off before starting or resuming work."
4
4
  ---
5
5
 
6
- # doctor - Read-Only DevFlow Health Check & Diagnostics
6
+ # doctor - Blueprint health check
7
7
 
8
8
  Where this sits in the workflow:
9
9
 
10
- ```text
11
- Any time during development -> [doctor] -> Health Report & Actionable Fixes
12
- (read-only inspection) (diagnostics) (remediation recommendations)
13
- ```
10
+ any time -> [doctor] -> reads setup + plans + workflow state + git
11
+ (read-only) prints health, warnings, and repair order
14
12
 
15
- `doctor` is a safe, read-only diagnostic skill that verifies whether your repository's Nexus-DevFlow configuration, context files, tool adapters, commands, and active runs are healthy and aligned.
13
+ This skill answers one question: *is this Blueprint project ready to use?* It is
14
+ the diagnostic pass for setup drift, incomplete onboarding, missing files,
15
+ placeholder plans, stale generated context, Blueprint visibility, and confusing
16
+ workflow state. It never changes anything: no edits, no commits, no installs, no
17
+ builds, no branch changes.
16
18
 
17
- ---
19
+ Use `/status` when the user mainly wants progress and the next build action. Use
20
+ `/doctor` when the user wants to know whether the workflow itself is healthy.
18
21
 
19
22
  ## Input
20
23
 
21
- No argument is required.
22
-
23
- ---
24
-
25
- ## Diagnostics Checklist
26
-
27
- Run through these 5 health checks:
28
-
29
- ### Check 1: Core Framework & Context Files Integrity
30
- - Check if [AGENTS.md](AGENTS.md) and [CLAUDE.md](CLAUDE.md) exist and are populated.
31
- - Check required context files under `devflow/context/`:
32
- - `project-overview.md` (Check if still empty/placeholder -> recommend `onboard` or `adopt`)
33
- - `coding-standards.md` (Check if customized for stack)
34
- - `ai-interaction.md` (Check if rules are configured)
35
- - `current-stage.md` (Check if active run matches filesystem)
36
- - `findings.md` (Check if ledger exists)
37
-
38
- ### Check 2: Tool Adapters Parity
39
- - Check if `.agents/skills/` exists and contains core lifecycle skills (`00-explore` through `70-deliver`, `devflow`, `onboard`, `adopt`, `doctor`).
40
- - Check if `.claude/skills/` is in sync with `.agents/skills/`.
41
-
42
- ### Check 3: Commands & Script Verification
43
- - Inspect the Commands section in `AGENTS.md`.
44
- - Cross-reference with project manifest (`package.json`, `pyproject.toml`, `Cargo.toml`, etc.):
45
- - Does the `Dev` command exist in scripts?
46
- - Does the `Build` command exist in scripts?
47
- - Does the `Test` command exist in scripts?
48
- - Does the `Verify` command exist in scripts?
49
-
50
- ### Check 4: Active Runs & Workflow Drift Detection
51
- - Inspect `devflow/runs/`:
52
- - Are there active runs?
53
- - Is `current-stage.md` consistent with the latest stage artifact in the active run?
54
- - Are checklists (`checklists/implementation-checklist.md`, `checklists/verification-checklist.md`) properly tracked?
55
- - Detect stage skips or workflow drift (e.g. jumping from `10-define` directly to `40-execute` without `20-spec` and `30-plan`).
56
-
57
- ### Check 5: Findings Ledger Inspection
58
- - Inspect `devflow/context/findings.md`:
59
- - Are there open P0 or P1 findings that block release?
60
- - Are resolved findings properly closed?
61
-
62
- ---
63
-
64
- ## Output Format
65
-
66
- Present a clean, scannable diagnostic report:
67
-
68
- ```markdown
69
- # 🩺 Nexus-DevFlow Health Report
70
-
71
- ## Overall Status: [HEALTHY | WARNING | ACTION REQUIRED]
72
-
73
- | Component | Status | Details |
74
- | :--- | :--- | :--- |
75
- | **Context Files** | [PASS / WARN] | project-overview.md, coding-standards.md status |
76
- | **Tool Adapters** | [PASS / WARN] | .agents and .claude parity |
77
- | **Configured Commands**| [PASS / WARN] | dev, build, test, verify alignment |
78
- | **Active Runs & Drift**| [PASS / WARN] | active run status, stage progression |
79
- | **Findings Ledger** | [PASS / WARN] | open P0/P1 issues count |
80
-
81
- ### Recommended Remediation Actions:
82
- 1. [Action item if any warning or failure detected]
83
- 2. [Suggested next command, e.g. devflow, onboard, adopt, etc.]
84
- ```
24
+ None. `/doctor` takes no argument.
25
+
26
+ ## What it checks
27
+
28
+ Gather these, then summarize. Do not dump file contents.
29
+
30
+ 1. **Required DevFlow files**
31
+ - Confirm `AGENTS.md`, `devflow/project-plan.md`,
32
+ `devflow/build-plan.md`, and `devflow/context/` exist.
33
+ - Confirm `devflow/context/coding-standards.md`,
34
+ `devflow/context/ai-interaction.md`,
35
+ `devflow/context/current-feature.md`, and
36
+ `devflow/context/project-overview.md` exist.
37
+ - Confirm `devflow/history/features/` and `devflow/history/fixes/` exist.
38
+ When the rollback skill is installed, also check
39
+ `devflow/history/rollbacks/`. A missing rollback folder on a legacy
40
+ installation is a warning, not a blocker; `/complete` creates it on the
41
+ first rollback.
42
+ - Check `devflow/context/findings.md`. Missing on a legacy installation is
43
+ a warning, not a blocker; `/audit` and `/complete` create it on first use.
44
+ When present, confirm its entry headers still match
45
+ `### <id> [<severity>] <status> - <title>` and warn on a malformed ledger.
46
+ Report any P0 or P1 finding still `open` or `fixed` by ID, since it will
47
+ block `/complete`. Never block on the ledger yourself.
48
+ - If `.gitignore` marks DevFlow workflow files as local-only, still require
49
+ the files to exist on disk. Ignored but present is healthy; ignored and
50
+ missing means the local workflow needs to be restored.
51
+ 2. **Tool adapters**
52
+ - Read `.nexus/nexus-devflow.json` when present and report its exact
53
+ logical adapters: Codex, Claude Code, GitHub Copilot, Antigravity, and OpenCode.
54
+ - Confirm at least one compatible skill tree exists. Codex, Antigravity, and
55
+ GitHub Copilot use `.agents/skills/`. Claude Code uses `.claude/skills/`.
56
+ OpenCode can use either tree.
57
+ - If both skill trees are present, say that is healthy when the selected
58
+ tools require both. Compare their skill folder names and warn about missing
59
+ skills on either side.
60
+ - If OpenCode is selected, do not require `.opencode/skills/`. If it contains
61
+ duplicate DevFlow skills alongside `.agents/skills/` or `.claude/skills/`,
62
+ warn that OpenCode discovers all of those locations and the duplicate tree
63
+ should be reviewed.
64
+ - If git shows changes under `.agents/skills/` or `.claude/skills/`, check
65
+ the matching adapter file too. Warn when workflow behavior was updated in
66
+ one adapter but not the other.
67
+ - If only one tool is used, mention the unused adapter can be deleted. Do not
68
+ treat extra adapters as an error.
69
+ - If `CLAUDE.md` exists and still starts with `# Project Name`, flag that
70
+ `/onboard` probably has not finished.
71
+ 3. **Commands and project setup**
72
+ - Check whether root `README.md` is still the copied DevFlow workflow doc
73
+ by looking for `# AI Coding Blueprint` or opening text that describes the
74
+ workflow instead of the app. If so, warn that `/onboard` should
75
+ replace it with a project README before publishing.
76
+ - If `devflow/README.md` clearly contains copied workflow docs,
77
+ report it as an obsolete installer artifact. Its absence is healthy. An
78
+ unchanged managed copy can be removed by the updater; a modified copy needs
79
+ user review.
80
+ - Check whether `AGENTS.md` has a `## Commands` section with dev and build
81
+ commands.
82
+ - Report missing lint or test commands as informational unless the project has
83
+ real lint or test scripts elsewhere that are not reflected in `AGENTS.md`.
84
+ - If `package.json` exists, compare its scripts against `AGENTS.md` at a high
85
+ level. Do not require every script to be documented.
86
+ - If `AGENTS.md` declares a `Verify` command, confirm it resolves to real
87
+ project commands in the expected order: typecheck, tests when configured,
88
+ then build. Do not require checks the project does not have.
89
+ - If `.github/workflows/verify.yml` exists, confirm it runs the exact documented
90
+ `Verify` command for pull requests and pushes to the default branch, uses the
91
+ detected runtime and package manager, and starts with read-only contents
92
+ permission. Preserve other workflows and report overlap for review.
93
+ - A missing `Verify` command or GitHub workflow is informational. It means the
94
+ optional automatic-check setup was not selected, not that DevFlow is
95
+ unhealthy.
96
+ 4. **Ignore rules**
97
+ - Check obvious ignore patterns for the detected stack. For Node or Astro,
98
+ look for `node_modules`, `.env`, `dist`, and framework cache folders such as
99
+ `.astro` or `.next` when relevant.
100
+ - Detect local-only DevFlow mode if `.gitignore` ignores `.agents/`,
101
+ `.claude/`, `devflow/`, or `CLAUDE.md`. Report it as a visibility choice,
102
+ not a failure, when the local files exist.
103
+ - In local-only mode, check whether tracked `AGENTS.md` still describes the
104
+ Blueprint workflow, lists hidden adapter paths, or exposes the core skill
105
+ list. If so, warn that `/onboard` should make `AGENTS.md` public-safe.
106
+ - If local-only mode is active but those paths are already tracked by git,
107
+ warn that `.gitignore` does not hide tracked files and the user must approve
108
+ any `git rm --cached` cleanup separately.
109
+ - Keep this conservative. If uncertain, report "review" instead of failure.
110
+ 5. **Planning readiness**
111
+ - Check whether `devflow/project-plan.md` and `devflow/build-plan.md` look
112
+ filled in or still template-like. Treat obvious TODO, TBD, example-only text,
113
+ or empty required sections as not ready.
114
+ - Check whether `devflow/build-plan.md` is a numbered checkbox list. Raw
115
+ bullets are allowed as a first draft, but they should be normalized by
116
+ `/overview` before the build loop starts.
117
+ - Count checked and unchecked leaf items in `devflow/build-plan.md`.
118
+ 6. **Overview freshness**
119
+ - Check whether `devflow/context/project-overview.md` exists and looks
120
+ generated from the current plans.
121
+ - If either planning file appears newer than the overview by filesystem time,
122
+ call the overview possibly stale and suggest `/overview` before feature work.
123
+ 7. **Current workflow state**
124
+ - Check whether `devflow/context/current-feature.md` is the reset stub or an
125
+ active feature, fix, or rollback spec.
126
+ - If a spec is active, report checked and unchecked implementation steps.
127
+ - If `current-feature.md` is the reset stub but git has source or workflow
128
+ changes, warn that work is happening without an active spec.
129
+ - Flag active spec on `main`, all spec steps checked but no completion, or a
130
+ branch that does not match `feature/`, `fix/`, or `rollback/` for the spec
131
+ type. For a feature, also flag a mismatch with the next unchecked
132
+ build-plan item. For a rollback, confirm its target is a checked item and do
133
+ not compare it to the next unchecked item.
134
+ 8. **Git**
135
+ - Report current branch, clean vs dirty working tree, rough changed-file count,
136
+ last commit subject, and whether the branch is ahead of upstream.
137
+ - If the directory is not a git repo, report that as a setup issue and keep
138
+ going.
139
+
140
+ ## Output
141
+
142
+ Print a compact health report with these labels:
143
+
144
+ Health: Pass | Needs attention | Blocked
145
+ Setup: ...
146
+ Verification: ...
147
+ Adapters: ...
148
+ Visibility: ...
149
+ Plans: ...
150
+ Workflow: ...
151
+ Git: ...
152
+ Watch: ...
153
+ Repair order: ...
154
+
155
+ Use `Watch:` only when there are warnings. Use `Repair order:` for the exact next
156
+ steps, in order. Keep it short and practical.
157
+
158
+ Choose the repair order in this priority:
159
+
160
+ - Required Blueprint files missing -> overlay the Blueprint again, or use
161
+ `/adopt` for a brownfield app.
162
+ - No git repo -> initialize git before using the build loop.
163
+ - No tool adapter -> restore `.agents/skills/` or `.claude/skills/` for the
164
+ selected tool. OpenCode can use either compatible tree.
165
+ - Onboarding incomplete -> run `/onboard`.
166
+ - Root README is still the Blueprint workflow doc -> run `/onboard` to replace
167
+ it with a project README before publishing.
168
+ - Local-only visibility selected but ignored Blueprint files are missing ->
169
+ reinstall or restore the Blueprint files locally.
170
+ - Local-only visibility selected but Blueprint paths are tracked -> ask whether
171
+ to untrack them with `git rm --cached` while keeping local files.
172
+ - Local-only visibility selected but `AGENTS.md` still exposes the workflow ->
173
+ run `/onboard` to make `AGENTS.md` a lightweight public project guide.
174
+ - A documented `Verify` command, project script, and GitHub workflow disagree ->
175
+ run `/ci` to review and align them. Missing optional CI alone does not need
176
+ repair.
177
+ - Commands or ignore rules need review -> update the files or run `/onboard` if
178
+ this is an early project.
179
+ - Plans are placeholders -> fill `devflow/project-plan.md` and
180
+ `devflow/build-plan.md`.
181
+ - Overview missing or stale -> run `/overview`.
182
+ - Active spec has unchecked steps -> run `/status` or `/implement`, depending on
183
+ whether the user wants orientation or action.
184
+ - A P0 or P1 finding is `open` -> repair it through `/implement` while a spec
185
+ is active, or `/fix <finding id>` between work items. One that is `fixed` ->
186
+ `/audit` to re-review and close it. Both come before suggesting `/complete`.
187
+ - Active spec is done but not closed -> run `/check`, then `/complete`.
188
+ - Everything is healthy -> say so, then suggest `/status` for progress or
189
+ `/feature` for the next planned feature.
190
+
191
+ ## Rules
192
+
193
+ - **Read-only, always.** This skill never writes files, never commits, never runs
194
+ installs, never runs builds or tests, and never switches branches.
195
+ - **Diagnose, then order repairs.** Do not just list problems. End with the
196
+ smallest ordered sequence that gets the project back to a healthy state.
197
+ - **Do not over-police adapters.** Extra adapters are optional clutter, not a
198
+ failure.
199
+ - **Be conservative with stack-specific checks.** If a command or ignore pattern
200
+ is uncertain, mark it for review instead of inventing a hard failure.
201
+ - **Stay concise.** A doctor pass should feel like a checklist, not an audit.
202
+
203
+ ## Formatting
204
+
205
+ Format the output to match the project's conventions in
206
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
207
+ enumerations and tables for matrices rather than dense paragraphs.