@jakkrichm/create-nexus-devflow 2.1.0 → 2.2.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 (56) hide show
  1. package/dist/bin/create-nexus-devflow.js +28 -4
  2. package/dist/bin/create-nexus-devflow.js.map +1 -1
  3. package/dist/lib/project-metadata.d.ts +1 -1
  4. package/dist/lib/project-metadata.js +3 -2
  5. package/dist/lib/project-metadata.js.map +1 -1
  6. package/dist/lib/update.js +7 -3
  7. package/dist/lib/update.js.map +1 -1
  8. package/package.json +1 -1
  9. package/template/.agents/skills/adopt/SKILL.md +58 -5
  10. package/template/.agents/skills/doctor/SKILL.md +23 -16
  11. package/template/.agents/skills/implement/SKILL.md +2 -2
  12. package/template/.agents/skills/onboard/SKILL.md +18 -17
  13. package/template/.agents/skills/rollback/SKILL.md +1 -1
  14. package/template/.claude/skills/00-explore/SKILL.md +2 -2
  15. package/template/.claude/skills/10-define/SKILL.md +2 -2
  16. package/template/.claude/skills/20-spec/SKILL.md +1 -2
  17. package/template/.claude/skills/30-plan/SKILL.md +1 -2
  18. package/template/.claude/skills/40-execute/SKILL.md +2 -2
  19. package/template/.claude/skills/50-verify/SKILL.md +2 -2
  20. package/template/.claude/skills/60-report/SKILL.md +2 -2
  21. package/template/.claude/skills/70-deliver/SKILL.md +2 -2
  22. package/template/.claude/skills/adopt/SKILL.md +191 -75
  23. package/template/.claude/skills/audit/SKILL.md +267 -133
  24. package/template/.claude/skills/autopilot/SKILL.md +226 -167
  25. package/template/.claude/skills/brainstorm/SKILL.md +62 -0
  26. package/template/.claude/skills/brief/SKILL.md +93 -92
  27. package/template/.claude/skills/check/SKILL.md +96 -76
  28. package/template/.claude/skills/ci/SKILL.md +140 -61
  29. package/template/.claude/skills/complete/SKILL.md +156 -101
  30. package/template/.claude/skills/convert-any-to-md/SKILL.md +2 -2
  31. package/template/.claude/skills/convert-any-to-md/references/setup.md +29 -0
  32. package/template/.claude/skills/convert-any-to-md/scripts/convert_any_to_md.py +487 -0
  33. package/template/.claude/skills/convert-any-to-md/scripts/requirements.txt +3 -0
  34. package/template/.claude/skills/debug/SKILL.md +124 -49
  35. package/template/.claude/skills/devflow/SKILL.md +9 -3
  36. package/template/.claude/skills/discovery/SKILL.md +150 -129
  37. package/template/.claude/skills/doctor/SKILL.md +195 -72
  38. package/template/.claude/skills/feature/SKILL.md +195 -151
  39. package/template/.claude/skills/fix/SKILL.md +41 -90
  40. package/template/.claude/skills/idea/SKILL.md +2 -2
  41. package/template/.claude/skills/implement/SKILL.md +189 -46
  42. package/template/.claude/skills/onboard/SKILL.md +216 -85
  43. package/template/.claude/skills/overview/SKILL.md +44 -29
  44. package/template/.claude/skills/prototype/SKILL.md +82 -27
  45. package/template/.claude/skills/release/SKILL.md +119 -130
  46. package/template/.claude/skills/report-html/SKILL.md +2 -2
  47. package/template/.claude/skills/rollback/SKILL.md +123 -77
  48. package/template/.claude/skills/status/SKILL.md +109 -0
  49. package/template/.claude/skills/test/SKILL.md +2 -2
  50. package/template/.claude/skills/tests/SKILL.md +126 -0
  51. package/template/.claude/skills/try/SKILL.md +77 -65
  52. package/template/AGENTS.md +2 -1
  53. package/template/devflow/build-plan.md +8 -0
  54. package/template/devflow/history/features/README.md +5 -0
  55. package/template/devflow/history/fixes/README.md +5 -0
  56. package/template/devflow/history/rollbacks/README.md +5 -0
@@ -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
@@ -43,7 +49,7 @@ When invoked without an argument (or when determining the next step), inspect:
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
54
  - If no run is active and user has pending ideas in `devflow/ideas.md` -> Highlight `/spec IDEA-xxx`.
49
55
  - If no run is active and user wants deep architectural exploration -> Recommend `00-explore`.
@@ -114,4 +120,4 @@ When invoked without an argument (or when determining the next step), inspect:
114
120
  - `autopilot` - Autonomous bounded delivery loop
115
121
  - `brainstorm` - Ideate without allocating running IDs
116
122
  - `debug` - Root cause investigation before or during implementation
117
- - `overview` - Living context synchronization into project-overview.md
123
+ - `overview` - Living context synchronization into project-overview.md
@@ -1,145 +1,166 @@
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][B] Optional deep, multi-turn project discovery that helps the user develop detailed Blueprint project-plan.md and build-plan.md files through an adaptive conversation, then drafts them only after the user says they are ready. Use when the user explicitly runs /discovery or $discovery, asks for a guided planning interview, wants to think through a new product before writing the plans, or wants help deepening existing plans. Do not use merely because planning files are empty, after /onboard, or before /overview; users may always write the plans directly or create them through any conversation they prefer."
5
4
  ---
6
5
 
7
- # discovery - Guided Multi-Turn Project Discovery & Architecture Interview
6
+ # discovery - develop the plans through a deep conversation
8
7
 
9
- Where this sits in the workflow:
8
+ Where this can sit in the workflow:
10
9
 
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
- ```
10
+ /onboard -> write the plans directly -> /overview
11
+ \
12
+ -> [discovery] -> review and approve plan drafts -> /overview
16
13
 
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.
14
+ `/discovery` is an optional planning partner, not a required workflow gate and
15
+ not a quick questionnaire. It can span as many turns as the project needs. Its
16
+ job is to help the user think through the product, preserve the depth and nuance
17
+ of that conversation, and draft the two user-owned planning files only when the
18
+ user asks for drafts.
18
19
 
19
- It is **never mandatory**: users who already have clear requirements can write both planning files directly or run `/overview` straight away.
20
+ Running `/onboard` never starts this skill. Empty plans never require it. A user
21
+ who writes detailed plans manually, has another AI conversation, or arrives with
22
+ finished plans continues directly to `/overview` exactly as before.
20
23
 
21
- ---
22
-
23
- ## Usage & Invocations
24
-
25
- ```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
29
- ```
30
-
31
- ---
32
-
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.
49
-
50
- ---
51
-
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.
84
-
85
- ---
86
-
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
- ---
99
-
100
- ### Step 4 - Write User-Owned Planning Documents
101
-
102
- Upon user approval, write to:
24
+ ## Step 1 - establish the starting point
103
25
 
104
- 1. **`devflow/project-plan.md`**:
105
- ```markdown
106
- # 🗺️ Project Plan (User-Owned Architectural Vision)
26
+ Read only the planning and project facts needed for the conversation:
107
27
 
108
- ## 1. Product Vision & Problem Statement
109
- ...
28
+ - `devflow/project-plan.md`
29
+ - `devflow/build-plan.md`
30
+ - the root project manifest, README, and framework configuration when they
31
+ already contain relevant facts
32
+ - `devflow/context/project-overview.md` only when the user is revisiting an
33
+ established project's direction
110
34
 
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
- ```
132
-
133
- ---
35
+ Classify each planning file as a template, partial draft, or substantive plan.
36
+ Never treat existing user content as disposable. When either plan has real
37
+ content, summarize what it already establishes and ask whether the user wants to
38
+ deepen it, revise a specific direction, or use it unchanged as conversation
39
+ context. Do not replace it with a fresh generic plan.
134
40
 
135
- ### Step 5 - Handoff to `/overview`
41
+ Start with a short working hypothesis about the project and name the most
42
+ important unknown. Then ask one focused question. Do not draft either plan yet.
136
43
 
137
- After writing the planning files, prompt the user with the next recommended action:
44
+ ## Step 2 - run adaptive discovery
138
45
 
139
- ```markdown
140
- **บันทึกแผนงานลง `devflow/project-plan.md` และ `devflow/build-plan.md` เรียบร้อยแล้ว!**
46
+ Ask one meaningful question at a time and let each answer shape the next one.
47
+ Prefer a likely interpretation the user can correct over a vague request for
48
+ more detail. Explain a tradeoff when the answer would materially change scope,
49
+ architecture, cost, or build order.
141
50
 
142
- 👉 **ขั้นตอนถัดไป**: เรียกคำสั่ง:
143
- `/overview`
144
- เพื่อกลั่นกรองแผนงานทั้งหมดลงสู่ `devflow/context/project-overview.md` ซึ่งจะเป็น Living Source of Truth สำหรับ AI Agent ในทุกๆ Session ครับ
145
- ```
51
+ Cover the areas that matter to this project, not a fixed questionnaire:
52
+
53
+ - problem, desired outcome, and why the project should exist
54
+ - target users, their context, and their primary workflows
55
+ - MVP capabilities, explicit non-goals, and later possibilities
56
+ - business rules, data, integrations, permissions, and important edge cases
57
+ - stack choices, constraints, dependencies, and technical unknowns
58
+ - UI/UX direction, accessibility needs, and useful references
59
+ - monetization or business model when relevant
60
+ - deployment shape, environments, background work, storage, and operations
61
+ - risks, assumptions, unresolved decisions, and how success will be judged
62
+ - feature boundaries, dependencies, and a sensible build order
63
+
64
+ Depth is the goal. Follow a consequential answer until its implications are
65
+ clear instead of racing to the next category. Do not ask the user to repeat facts
66
+ already established in the conversation or repository. Do not force irrelevant
67
+ topics merely to complete a checklist.
68
+
69
+ Periodically return a compact discovery snapshot with:
70
+
71
+ - confirmed decisions
72
+ - working assumptions that still need confirmation
73
+ - open questions or conflicts
74
+ - ideas explicitly deferred or excluded
75
+
76
+ The snapshot keeps a long conversation coherent. It is not permission to write
77
+ the plans.
78
+
79
+ ## Step 3 - decide whether the plans are ready
80
+
81
+ Do not end discovery because a preset number of questions has been reached. It
82
+ is ready to draft when:
83
+
84
+ - the problem, users, and core workflows are concrete
85
+ - MVP scope and non-goals are distinguishable
86
+ - data and technical choices are detailed enough to expose major dependencies
87
+ - the build order can be expressed as feature-sized outcomes
88
+ - important contradictions are resolved
89
+ - remaining unknowns are either safe to defer or explicitly accepted as TODOs
90
+ - the user says they are ready for the plans to be drafted
91
+
92
+ If the user asks for drafts while a material gap remains, name the gap and ask
93
+ whether to continue discovery or preserve it as an explicit TODO. Respect the
94
+ choice. The user may also stop at any time and write the plans manually.
95
+
96
+ ## Step 4 - draft both planning files
97
+
98
+ When the user asks for drafts, produce complete proposed contents for both files
99
+ without writing them yet.
100
+
101
+ For `devflow/project-plan.md`:
102
+
103
+ - keep the template's main subject areas, adding useful sections when the
104
+ conversation requires them
105
+ - preserve rationale, examples, tradeoffs, constraints, edge cases, and
106
+ exclusions that will matter during later feature work
107
+ - be as detailed as the project needs; never compress a rich discovery into a
108
+ line or two per section
109
+ - distinguish confirmed decisions from assumptions and TODOs
110
+
111
+ For `devflow/build-plan.md`:
112
+
113
+ - use numbered checkboxes and optional milestone headings
114
+ - keep each item a high-level, feature-sized outcome with a concise description
115
+ - order items by dependency and the earliest useful vertical slice
116
+ - keep implementation detail in later `/feature` specs rather than turning the
117
+ roadmap into a task dump
118
+ - include only agreed scope; place deferred ideas outside the MVP or omit them as
119
+ the user directed
120
+
121
+ If substantive plans already exist, preserve their information and completed
122
+ build-plan numbering. Clearly identify proposed additions, removals, or changed
123
+ decisions.
124
+
125
+ End by asking the user to review the full drafts. Do not write either file in the
126
+ same response that first presents them.
127
+
128
+ ## Step 5 - write only after approval
129
+
130
+ Write the approved drafts only after the user explicitly approves them. If the
131
+ user requests changes, revise the drafts and show the affected sections again
132
+ before writing.
133
+
134
+ After writing:
135
+
136
+ - report which files changed
137
+ - list any retained TODOs or unresolved decisions
138
+ - remind the user that both files remain theirs to edit and deepen directly
139
+ - stop before generating `devflow/context/project-overview.md`
140
+ - point to `/overview` or `$overview` as the next optional command when the user
141
+ is satisfied with the plans
142
+
143
+ ## Rules
144
+
145
+ - This skill is always optional. Never make it a prerequisite for `/overview`,
146
+ `/feature`, or any other Blueprint command.
147
+ - Never start it automatically from `/onboard`, because planning files are
148
+ empty, or because a project is new.
149
+ - Never imply that plans created manually or through another conversation are
150
+ inferior or incomplete merely because this skill was not used.
151
+ - Never overwrite substantive planning content without showing the replacement
152
+ and receiving explicit approval.
153
+ - Never write plans during the interview or after a vague signal such as "looks
154
+ good." The user must explicitly approve the proposed file contents.
155
+ - Never scaffold the app, edit product code, generate the overview, create a
156
+ feature spec, commit, merge, push, or deploy.
157
+ - Preserve detailed project reasoning in `project-plan.md`, while keeping
158
+ `build-plan.md` high-level and trackable.
159
+ - Keep the conversation adaptive. Depth comes from relevant follow-up questions,
160
+ not from mechanically asking every possible question.
161
+
162
+ ## Formatting
163
+
164
+ Follow `devflow/context/ai-interaction.md`. During discovery, ask one focused
165
+ question per turn. For snapshots and draft reviews, use concise headings and
166
+ lists so confirmed decisions and remaining gaps are easy to inspect.
@@ -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.