@jakkrichm/create-nexus-devflow 2.17.8 → 2.18.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.
- package/README.md +9 -10
- package/dist/bin/create-nexus-devflow.js +52 -80
- package/dist/bin/create-nexus-devflow.js.map +1 -1
- package/dist/lib/doctor.js +0 -27
- package/dist/lib/doctor.js.map +1 -1
- package/dist/lib/history.js +2 -2
- package/dist/lib/history.js.map +1 -1
- package/dist/lib/skill-registry-engine.js +3 -3
- package/dist/lib/skill-registry-engine.js.map +1 -1
- package/dist/lib/tooling/commands/scan-doc-contract.js +1 -0
- package/dist/lib/tooling/commands/scan-doc-contract.js.map +1 -1
- package/dist/lib/ui.d.ts +0 -23
- package/dist/lib/ui.js +0 -85
- package/dist/lib/ui.js.map +1 -1
- package/dist/lib/update.d.ts +6 -1
- package/dist/lib/update.js +78 -7
- package/dist/lib/update.js.map +1 -1
- package/dist/scripts/prepare-template.js +7 -3
- package/dist/scripts/prepare-template.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/audit/SKILL.md +1 -4
- package/template/.agents/skills/brainstorm/SKILL.md +4 -5
- package/template/.agents/skills/bughunter/SKILL.md +1 -1
- package/template/.agents/skills/check/SKILL.md +116 -26
- package/template/.agents/skills/check/reference/guide.md +17 -53
- package/template/.agents/skills/ci/SKILL.md +13 -35
- package/template/.agents/skills/complete/SKILL.md +0 -2
- package/template/.agents/skills/devflow/SKILL.md +2 -3
- package/template/.agents/skills/discovery/SKILL.md +0 -9
- package/template/.agents/skills/doctor/SKILL.md +6 -6
- package/template/.agents/skills/feature/SKILL.md +1 -4
- package/template/.agents/skills/feature/reference/feature-spec-template.md +16 -16
- package/template/.agents/skills/fix/SKILL.md +3 -3
- package/template/.agents/skills/grill/SKILL.md +1 -6
- package/template/.agents/skills/idea/SKILL.md +6 -6
- package/template/.agents/skills/implement/SKILL.md +119 -45
- package/template/.agents/skills/setup-tests/reference/browser.md +95 -0
- package/template/.agents/skills/test/SKILL.md +0 -26
- package/template/.claude/skills/audit/SKILL.md +1 -4
- package/template/.claude/skills/brainstorm/SKILL.md +4 -5
- package/template/.claude/skills/bughunter/SKILL.md +1 -1
- package/template/.claude/skills/check/SKILL.md +116 -26
- package/template/.claude/skills/check/reference/guide.md +17 -53
- package/template/.claude/skills/ci/SKILL.md +13 -35
- package/template/.claude/skills/complete/SKILL.md +0 -2
- package/template/.claude/skills/devflow/SKILL.md +2 -3
- package/template/.claude/skills/discovery/SKILL.md +3 -11
- package/template/.claude/skills/doctor/SKILL.md +6 -6
- package/template/.claude/skills/feature/SKILL.md +1 -4
- package/template/.claude/skills/feature/reference/feature-spec-template.md +16 -16
- package/template/.claude/skills/fix/SKILL.md +3 -3
- package/template/.claude/skills/grill/SKILL.md +1 -6
- package/template/.claude/skills/idea/SKILL.md +6 -6
- package/template/.claude/skills/implement/SKILL.md +119 -45
- package/template/.claude/skills/setup-tests/reference/browser.md +95 -0
- package/template/.claude/skills/test/SKILL.md +0 -26
- package/template/AGENTS.md +39 -17
- package/template/devflow/build-plan.md +1 -1
- package/template/devflow/context/ai-interaction.md +14 -15
- package/template/devflow/context/coding-standards.md +19 -68
- package/template/devflow/context/glossary.md +6 -26
- package/template/devflow/decisions/README.md +1 -15
- package/template/devflow/docs/USAGE.md +194 -0
- package/template/devflow/docs/diagrams/nexus-devflow-architecture.html +14821 -0
- package/template/devflow/docs/diagrams/nexus-devflow-architecture.json +80 -0
- package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.html +14860 -0
- package/template/devflow/docs/diagrams/nexus-devflow-lifecycle.json +88 -0
- package/template/devflow/docs/examples/living-spec/adr.example.md +43 -0
- package/template/devflow/docs/examples/living-spec/current-feature.example.md +113 -0
- package/template/devflow/docs/examples/living-spec/discovery.example.md +45 -0
- package/template/devflow/docs/examples/living-spec/ideas.example.md +22 -0
- package/template/devflow/docs/governance-rules.md +39 -0
- package/template/devflow/docs/manual-review-workflow-spec.md +116 -0
- package/template/devflow/docs/markdown-metadata-contract.md +140 -0
- package/template/devflow/docs/quickstart.md +124 -0
- package/template/devflow/docs/release-process.md +52 -0
- package/template/devflow/docs/skill-selection-policy.md +64 -0
- package/template/devflow/docs/workflow-surface-map.md +85 -0
- package/template/devflow/reference/feature-spec-template.md +79 -59
- package/template/devflow/runs/.gitkeep +1 -0
- package/template/.agents/skills/check/reference/verify.md +0 -129
- package/template/.agents/skills/explore/SKILL.md +0 -78
- package/template/.claude/skills/check/reference/verify.md +0 -129
- package/template/.claude/skills/explore/SKILL.md +0 -78
- package/template/devflow/reference/help-playbook-protocol.md +0 -33
- package/template/devflow/reference/slicing-archetypes.md +0 -105
package/template/AGENTS.md
CHANGED
|
@@ -11,26 +11,18 @@ This project uses **Nexus-DevFlow**, an agentic workflow layer supporting **The
|
|
|
11
11
|
|
|
12
12
|
To start a new project, scaffold the application first in an empty folder, then run `npx nexus-devflow` (or `npm create @jakkrichm/nexus-devflow`) to overlay DevFlow onto your codebase.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Read these for full context
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- `devflow/
|
|
19
|
-
- `devflow/context/
|
|
20
|
-
- `devflow/context/
|
|
21
|
-
- `devflow/context/
|
|
22
|
-
- `devflow/context/glossary.md` when domain terminology matters.
|
|
23
|
-
- `devflow/context/{xxx-slug}/` for the selected run's spec, stage, findings, and review receipt.
|
|
24
|
-
|
|
25
|
-
## Task intent and authorization
|
|
26
|
-
|
|
27
|
-
Explicit user scope takes precedence over skill guidance, within runtime permissions and safety constraints. A request to draft a spec ends at the spec; a request to implement and verify continues through those authorized steps. A skill transition is not a new approval requirement. Ask when a material decision or authorization is missing, reuse existing authorization, and identify the exact instruction if it requires a pause. Preserve separate authorization for commit, merge, push, and deployment.
|
|
28
|
-
|
|
29
|
-
Use focused checks during edits, and run the documented required gates before handoff. Repeat passing checks only after relevant changes, failures, or unresolved concerns. Apply TDD to logic and behavior changes; documentation-only edits need appropriate structural or review evidence.
|
|
16
|
+
- `devflow/config.json` - deterministic project workflow settings
|
|
17
|
+
- `devflow/context/project-overview.md` - the project's source of truth
|
|
18
|
+
- `devflow/context/coding-standards.md` - engineering conventions & rules to follow
|
|
19
|
+
- `devflow/context/ai-interaction.md` - how to interact with the user on this project
|
|
20
|
+
- `devflow/context/glossary.md` - domain terms & architecture definitions
|
|
21
|
+
- `devflow/context/{xxx-slug}/` - active task living spec, stage, findings ledger, and independent review receipt
|
|
30
22
|
|
|
31
23
|
## Proportional engineering
|
|
32
24
|
|
|
33
|
-
Build for established requirements, not hypothetical scale, threats, or future flexibility. Reuse existing code, the standard library, native platform features, and installed dependencies before adding machinery.
|
|
25
|
+
Build for established requirements, not hypothetical scale, threats, or future flexibility. Reuse existing code, the standard library, native platform features, and installed dependencies before adding machinery. Harmonize with DevFlow's `ponytail` skill for operational bloat reduction and YAGNI discipline.
|
|
34
26
|
|
|
35
27
|
- Unknown scale or extensibility defaults to the smaller reversible design. Do not infer enterprise, multi-tenant, hostile-user, or compliance requirements.
|
|
36
28
|
- Derive trust and data-integrity boundaries from actual reachability: untrusted input, auth/session/ownership, shared persisted data, destructive operations, payments, secrets, and sensitive data.
|
|
@@ -69,7 +61,37 @@ Unused adapter families can be removed. Codex, Antigravity, GitHub Copilot, and
|
|
|
69
61
|
3. **Google Antigravity & Claude Code**: Native skill engines automatically discover and surface `.agents/skills/` and `.claude/skills/`.
|
|
70
62
|
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
63
|
5. **Default Artifact & Communication Language (Thai)**: All generated markdown stage artifacts (`spec.md`, `discovery.md`, etc.) and user communication MUST default to **Thai (`th`)**, while code, technical terms, file paths, and identifiers remain in English.
|
|
72
|
-
6. **Contextual Help
|
|
64
|
+
6. **Universal Contextual Help & Playbook Protocol (`help`, `--help`, `-h`, `?`)**:
|
|
65
|
+
Whenever any skill or command is invoked with a help keyword or flag (e.g., `/bughunter help`, `bughunter --help`, `/archify -h`, `/check ?`, `/feature help`):
|
|
66
|
+
- **Execution Safety Gate**: DO NOT execute the skill's primary or mutating actions (do not launch scans/attacks, do not modify source code, and do not initialize new task runs).
|
|
67
|
+
- **Dynamic Workspace Inspection**: Read the target skill definition (`.agents/skills/<skill>/SKILL.md`, `.claude/skills/<skill>/SKILL.md`, and any vendored resources such as `devflow/.vendor/<skill>/`), then scan the active workspace (`devflow/context/project-overview.md`, `package.json`, tech stack, active tasks, endpoints, and file hierarchy).
|
|
68
|
+
- **Persistent HTML Playbook & Token-Saving Cache**:
|
|
69
|
+
- **Output Location & Light Theme Mandate**: Compile and persist the tailored playbook as a standalone, styled HTML report at `devflow/docs/playbooks/{skill}.html` adhering to the **Paper/Ink Light Theme Standard** (`data-theme="light"`, teal accent, ruler corner, terminal mockup UI, and diagram slot per `devflow/docs/playbooks/template.html`). Never generate dark-mode-first documentation.
|
|
70
|
+
- **First Run**: Render the comprehensive 5W1H playbook in chat and write the complete HTML report to `devflow/docs/playbooks/{skill}.html`.
|
|
71
|
+
- **Subsequent Invocations (Delta Updates & Zero Token Bloat)**: If `devflow/docs/playbooks/{skill}.html` already exists:
|
|
72
|
+
- Inspect the existing HTML file and compute the diff/delta against the current repository state (e.g., new file paths, modified endpoints, or newly installed vendor assets).
|
|
73
|
+
- DO NOT repeat unchanged boilerplate or full static content in chat.
|
|
74
|
+
- Provide a concise **Delta Summary** in chat (highlighting what changed, new recommendations, or newly available commands).
|
|
75
|
+
- In-place update `devflow/docs/playbooks/{skill}.html` with the fresh timestamp and state.
|
|
76
|
+
- Provide a direct clickable link to [devflow/docs/playbooks/{skill}.html](file:///d:/devtools/nexus-devflow/devflow/docs/playbooks/{skill}.html) for browser viewing.
|
|
77
|
+
- **Render the User-Friendly 5W1H Playbook**: Emit an easy-to-read, practical guide organized around the **5W 1H Framework** (rendered on initial run or updated in the HTML playbook):
|
|
78
|
+
1. **What (Concept & Capabilities)**: Clear, jargon-free summary of what this skill does, its core concept, and its bundled tools/capabilities.
|
|
79
|
+
2. **Why (Problems Solved & Key Benefits)**: The problems it solves, key advantages, and why you should use it instead of ad-hoc manual work.
|
|
80
|
+
3. **Who (Target Roles & Personas)**: Target audience or engineering role (e.g., Feature Developer, Senior QA, Security Auditor, Solo Dev, or Tech Lead).
|
|
81
|
+
4. **Where (Boundaries & Artifact Locations)**: Target workspace boundaries, affected directories, and generated artifact locations (e.g., `devflow/context/`, `devflow/discoveries/`, `findings.md`).
|
|
82
|
+
5. **When (Timing & Prerequisites/Next Steps)**:
|
|
83
|
+
- **Timing & Triggers**: Practical situations or milestones when this skill should be invoked.
|
|
84
|
+
- **Run Before (Prerequisites)**: What to check, prepare, or run beforehand to get the best result.
|
|
85
|
+
- **Run After (Next Steps)**: What DevFlow command or lifecycle stage should follow next (e.g., handing off to `/fix`, `/feature`, or `/complete`).
|
|
86
|
+
6. **How (Execution Lifecycle & Real Command Examples)**:
|
|
87
|
+
- **How It Works (Lifecycle)**: Simple, plain-language breakdown of the execution steps or phases.
|
|
88
|
+
- **Available Commands & Options**: Common sub-commands, arguments, and flags with brief explanations.
|
|
89
|
+
- **Safety, Guardrails & Precautions**: Operational boundaries, credential hygiene, read-only vs. mutating constraints, and explicit special safety constraints / precautions.
|
|
90
|
+
7. **Diagram Slot & Architecture Flow**:
|
|
91
|
+
- **Real Diagram Mandate**: MUST embed a real, verified vector SVG or interactive diagram reflecting actual skill lifecycle, state transitions, or threat models in Light Theme (`data-theme="light"`).
|
|
92
|
+
- **Thai Language & Legible Typography**: Architecture and flow diagrams must describe workflows and nodes in Thai language while preserving technical identifiers, paths, and commands in English. Typography must be sufficiently sized and legible for Thai script (Headers 13–14px, box content/descriptions 11–12px, line spacing 18–22px) to prevent tone marks and vowels from clipping or overlapping.
|
|
93
|
+
- **Strictly No Placeholders**: NEVER output empty placeholder cards, generic instruction text, or phrases like *"when invoking archify..."*. Every playbook must ship with a real visual architectural diagram.
|
|
94
|
+
- Always conclude the response with: `"Help menu displayed successfully"`.
|
|
73
95
|
|
|
74
96
|
---
|
|
75
97
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## 🚀 Phase 1: Core Foundation & Data Layer
|
|
10
10
|
|
|
11
|
-
- [
|
|
11
|
+
- [x] 1. **Upstream AI Blueprint Synchronization & Zero-Regression Fusion** - ผสานฟีเจอร์เด่นจาก Upstream (explore skill, proportional engineering, update adapter switcher, CI pre-push hook) ตัด dark mode ออก และปกป้องสถาปัตยกรรมของ DevFlow (Ref: DISC-20260929-001)
|
|
12
12
|
- [ ] 2. **Base Layout & Main UI Shell** - วางโครงสร้างหน้าจอหลัก, Navigation Shell และ Design Tokens
|
|
13
13
|
- [ ] 3. **Primary Feature Flow** - พัฒนาฟังก์ชันการทำงานหลัก พร้อม Input Form และ Validation
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- **Be Concise and Direct**: State conclusions, status, and findings first; provide supporting context afterward.
|
|
10
10
|
- **Explain Non-Obvious Decisions Briefly**: Highlight architectural trade-offs, edge-case rationale, or safety considerations in 1–2 sentences.
|
|
11
|
-
- **
|
|
11
|
+
- **Ask Before Destructive or Architectural Changes**: Always obtain explicit confirmation before deleting files, executing major refactors, or altering public interfaces.
|
|
12
12
|
- **Don't Add Unplanned Scope**: Stick strictly to the Acceptance Criteria defined in the spec. Avoid adding "nice-to-have" features that were not requested.
|
|
13
13
|
- **Preserve Existing Codebase Patterns**: Respect existing file structure, typing patterns, naming conventions, and deep module boundaries.
|
|
14
14
|
|
|
@@ -21,8 +21,8 @@ Format every response for fast scanning and readability:
|
|
|
21
21
|
- **Real Markdown, Not Prose Walls**: Use bold labels, concise bullet points, and blank lines between blocks.
|
|
22
22
|
- **Enumerations Are Lists**: Numbered or bulleted lists for sequential steps or findings, never inline runs crammed into paragraphs.
|
|
23
23
|
- **Tables for Comparative Matrices**: Use markdown tables when comparing status, options, test results, or trade-offs.
|
|
24
|
-
- **Backticks for Code References**: Wrap file paths, variable names, functions, CLI flags, and commands in backticks (e.g. `
|
|
25
|
-
- **Clickable File Links**: Use
|
|
24
|
+
- **Backticks for Code References**: Wrap file paths, variable names, functions, CLI flags, and commands in backticks (e.g. `current-feature.md`, `npm run check`).
|
|
25
|
+
- **Clickable File Links**: Use GitHub-style markdown links with `file://` scheme (e.g. `[current-feature.md](file:///d:/path/to/current-feature.md)`).
|
|
26
26
|
- **Lead With the Result**: State pass/fail status or completed action before presenting logs.
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -97,7 +97,7 @@ After the first successful `/overview`, DevFlow offers a reviewed local commit f
|
|
|
97
97
|
## 4. Strict TDD & Two-Stage Review Interaction Rules
|
|
98
98
|
|
|
99
99
|
### 🔴🟢 Strict TDD Execution Discipline
|
|
100
|
-
|
|
100
|
+
During implementation in `/implement`:
|
|
101
101
|
- **Show Red Phase**: First execute tests to demonstrate expected failure *before* adding production code.
|
|
102
102
|
- **Show Green Phase**: Add minimal production code, re-run tests, and report pass rate.
|
|
103
103
|
- **Show Refactor Phase**: Polish and clean up with zero test regression.
|
|
@@ -111,10 +111,10 @@ During `/check`:
|
|
|
111
111
|
|
|
112
112
|
### ⚡ Review Cadence & Implementation Loop
|
|
113
113
|
- **Efficient Default (`stepReview: "feature"`)**: Presents one comprehensive review packet after all implementation steps of the feature complete, with step checkpoint commits disabled (`checkpointCommits: "disabled"`). This minimizes review fatigue and saves context window tokens.
|
|
114
|
-
- **Guided Review (`stepReview: "every"`)**: Available for high-risk changes, pair programming, or instructional sessions. Pauses for user approval after each small step
|
|
114
|
+
- **Guided Review (`stepReview: "every"`)**: Available for high-risk changes, pair programming, or instructional sessions. Pauses for user approval after each small step and offers checkpoint commits (`checkpointCommits: "enabled"`).
|
|
115
115
|
- **Post-Implementation Walkthrough**: After the final review packet, `/implement` always offers an optional read-only walkthrough of the finished code, regardless of review cadence or checkpoint settings.
|
|
116
116
|
- **Independent Review Execution**: Regular and Continuous independent review default to `when-sensitive`, while `review.independentExecution` defaults to `automatic` (spawning an isolated reviewer child when the active adapter supports it). Setting `review.independentExecution: "manual"` produces the fresh-session handoff.
|
|
117
|
-
- **Configuration**: Managed directly in `devflow/config.json`.
|
|
117
|
+
- **Configuration**: Managed directly in `devflow/config.json`.
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
@@ -131,17 +131,16 @@ During `/check`:
|
|
|
131
131
|
|
|
132
132
|
Progress lives in persistent files, not in transient chat history:
|
|
133
133
|
|
|
134
|
-
- In
|
|
134
|
+
- In Fast-Track: `devflow/context/current-feature.md` maintains ticked checklist boxes `- [x]`.
|
|
135
135
|
- In Git: Commits, branches, and working tree maintain the code history.
|
|
136
|
-
- When starting a fresh session after a context clear,
|
|
136
|
+
- When starting a fresh session after a context clear, run `devflow` or inspect `current-stage.md` to pick up immediately from the next pending step.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
|
-
## 6.
|
|
140
|
+
## 6. Single Active Run Guardrail (One Thing at a Time)
|
|
141
141
|
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
- Keep each run's spec, stage, findings, and branch separate. Protect unrelated working-tree changes before switching; use an isolated worktree when concurrent implementation requires it.
|
|
142
|
+
- Only one active Single Living Spec run is allowed at a time.
|
|
143
|
+
- The AI will actively block opening a new feature or fix until the current one is completed with `/complete` (or explicitly rolled back/cancelled).
|
|
145
144
|
|
|
146
145
|
---
|
|
147
146
|
|
|
@@ -178,14 +177,14 @@ Progress lives in persistent files, not in transient chat history:
|
|
|
178
177
|
Nexus-DevFlow natively supports extending workflow capabilities with **Third-Party Skills** (installed via `nexus-devflow skill add <repo-or-path>`):
|
|
179
178
|
|
|
180
179
|
### 🧩 1. Discovery & Inventory
|
|
181
|
-
-
|
|
180
|
+
- Core workflow commands and AI agents automatically inspect `.agents/skills/` (and `.claude/skills/`) or run `nexus-devflow skill list` to discover installed third-party capabilities.
|
|
182
181
|
- Installed third-party skills maintain their exact original directory structure, references, assets, scripts, and `SKILL.md`.
|
|
183
182
|
|
|
184
183
|
### 🎯 2. Cross-Command Delegation & Genuine Execution
|
|
185
|
-
- **Verbatim & Original Prompt Fidelity**: When a DevFlow stage requires specialized domain expertise (e.g., editorial diagramming, system mapping, domain modeling, cloud provisioning, UI benchmarking), the AI agent must read the third-party skill's `SKILL.md` (e.g. `.agents/skills/archify/SKILL.md` or `.agents/skills/diagram-design/SKILL.md`) and
|
|
184
|
+
- **Verbatim & Original Prompt Fidelity**: When a DevFlow stage requires specialized domain expertise (e.g., editorial diagramming, system mapping, domain modeling, cloud provisioning, UI benchmarking), the AI agent must read the third-party skill's `SKILL.md` (e.g. `.agents/skills/archify/SKILL.md` or `.agents/skills/diagram-design/SKILL.md`) and strictly follow its original instructions, philosophy, style guide gates, and complexity constraints.
|
|
186
185
|
- **Workflow Command Integration Map**:
|
|
187
186
|
- **`/discovery`**: When macro roadmap planning or micro pre-flight exploration involves system architecture, IT landscape, data pipelines, sequence flows, or user journeys, check for `archify` (for interactive system maps, data flows, and sequence traces) or `diagram-design` (for editorial and business layouts).
|
|
188
|
-
- **`/feature` & `/fix`**:
|
|
187
|
+
- **`/feature` & `/fix`**: In Section 2 (`## 📐 2. Technical Spec & Contracts`), invoke `archify` for interactive component diagrams, state machines, and sequence traces, or `diagram-design` for database ER models.
|
|
189
188
|
- **`/implement`**: Seamlessly consumes Tracer-Bullet Tickets generated by Matt Pocock's `/to-tickets` (`.scratch/<feature>/issues/`, `devflow/context/{xxx-slug}/tickets/`), resolving the unblocked Frontier and executing with Strict TDD.
|
|
190
189
|
- **`/brainstorm` & `/grill`**: Leverage visual trade-off matrices (Quadrant, Radar spider) or domain models (UML class, ER).
|
|
191
190
|
- **`/prototype` & `/report-html`**: Embed standalone HTML/SVG assets seamlessly.
|
|
@@ -62,7 +62,19 @@
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
-
## 3.
|
|
65
|
+
## 3. Proportional Engineering & YAGNI Standards
|
|
66
|
+
|
|
67
|
+
Build for established requirements, not hypothetical scale, threats, or future flexibility. Reuse existing code, the standard library, native platform features, and installed dependencies before adding machinery. Harmonize with DevFlow's `ponytail` skill for operational bloat reduction and YAGNI discipline.
|
|
68
|
+
|
|
69
|
+
- **Proportional Scope**: Build for the immediate task. Unknown scale or extensibility defaults to the smaller reversible design. Do not infer enterprise, multi-tenant, hostile-user, or compliance requirements.
|
|
70
|
+
- **Reachability-Derived Boundaries**: Derive trust and data-integrity boundaries from actual reachability: untrusted input, auth/session/ownership, shared persisted data, destructive operations, payments, secrets, and sensitive data.
|
|
71
|
+
- **Material Unknowns Only**: Ask questions only when an unknown materially changes behavior, architecture, persisted data, interoperability, a real security boundary, or cost. Otherwise choose the simplest repository-native implementation.
|
|
72
|
+
- **Just-In-Time Abstractions**: Add an abstraction, dependency, service, configuration surface, compatibility layer, or security mechanism only for a current requirement.
|
|
73
|
+
- **Non-Negotiable Boundaries**: Simplicity never removes real trust-boundary validation, data-loss prevention, accessibility, explicit security requirements, configured tests, or project rules.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 4. Stable API & Interface Design Standards
|
|
66
78
|
|
|
67
79
|
- **Contract Stability**: Public exports, CLI options, and stage artifact schemas form immutable delivery contracts. Never break contracts without a major version bump.
|
|
68
80
|
- **Explicit Parameter Objects**: For functions with more than 2 arguments, use an options object interface with descriptive property names.
|
|
@@ -119,13 +131,12 @@ nexus-devflow/
|
|
|
119
131
|
|
|
120
132
|
Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
|
|
121
133
|
|
|
122
|
-
- **Unit Test Mandate**:
|
|
134
|
+
- **Unit Test Mandate**: Any new feature, modified logic, parser improvement, or bug fix **MUST ship with automated unit tests** in the same diff.
|
|
123
135
|
- **Strict TDD (Red-Green-Refactor) Protocol**:
|
|
124
136
|
1. **🔴 RED (Test First)**: Always write automated tests *before* writing or modifying functional logic. Run the test command and verify that it fails for the expected reason.
|
|
125
137
|
2. **🟢 GREEN (Minimal Code)**: Write only the minimal production code necessary to make the failing test pass. Run the test command and verify 100% green pass.
|
|
126
138
|
3. **🔵 REFACTOR (Clean & Robust)**: Refactor code for readability, performance, and DRY/YAGNI discipline while ensuring all tests stay green.
|
|
127
139
|
- *Code Deletion / Reversion Rule*: If functional code is created without a prior failing test for behavior changes, it must be reverted or immediately backed by tests before continuing.
|
|
128
|
-
- **Verification Scope**: Run focused checks during edits and required project gates before handoff. Repeat passing checks only after relevant changes, new failures, or unresolved risk.
|
|
129
140
|
- **Test Framework**: Use Node.js native test runner executed via `tsx --test test/*.test.ts` under `packages/create-nexus-devflow/`.
|
|
130
141
|
- **Test Design (AAA Pattern)**:
|
|
131
142
|
- Structure each test case cleanly: **Arrange** (setup fixtures/mock directories), **Act** (execute function), **Assert** (verify invariants).
|
|
@@ -138,7 +149,7 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
|
|
|
138
149
|
2. *Interactive AI Visual QA (MCP)*: Live DOM and styling inspection via MCP `browseros-neo` (`http://127.0.0.1:9010/mcp`) during `/check` and `/try`.
|
|
139
150
|
- **Two-Stage Review Pattern (Verification Gate)**:
|
|
140
151
|
- **Stage 1: Spec Fidelity & Acceptance Gate**:
|
|
141
|
-
- Verify 100% conformance against the Single Living Spec (`
|
|
152
|
+
- Verify 100% conformance against the Single Living Spec (`current-feature.md`).
|
|
142
153
|
- Validate all Acceptance Criteria (ACs) and "Done When" observables without missing requirements or scope creep.
|
|
143
154
|
- Test edge cases and boundary conditions defined in the specification.
|
|
144
155
|
- **Stage 2: Code Quality, Security & Architecture Gate**:
|
|
@@ -146,13 +157,13 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
|
|
|
146
157
|
- **Lane 2 (Automated Test Suites & Evals)**: `npm test` (Unit tests 100% pass) + `npm run test:routing` (Skill routing accuracy).
|
|
147
158
|
- **Lane 3 (Scrutinize & Security Audit)**: Edge cases, null-safety, 0 secrets, safe inputs.
|
|
148
159
|
- **Lane 4 (Manual / Scenario Proof)**: Concrete walkthrough steps ("Where to go", "What to run", "What to expect").
|
|
149
|
-
- **Findings Ledger State**: 0 blockers (P0/P1) in `devflow/context/
|
|
160
|
+
- **Findings Ledger State**: 0 blockers (P0/P1) in `devflow/context/findings.md`.
|
|
150
161
|
|
|
151
162
|
---
|
|
152
163
|
|
|
153
164
|
## 8. Findings Ledger & Quality Gates (`findings.md`, `review.md`)
|
|
154
165
|
|
|
155
|
-
- All quality defects, security findings, or regression issues identified during review must be logged in `devflow/context/
|
|
166
|
+
- All quality defects, security findings, or regression issues identified during review must be logged in `devflow/context/findings.md`.
|
|
156
167
|
- **Finding State Machine**:
|
|
157
168
|
- `open`: Confirmed issue waiting to be fixed.
|
|
158
169
|
- `fixed`: Repaired in code, pending QA re-verification.
|
|
@@ -203,7 +214,7 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
|
|
|
203
214
|
|
|
204
215
|
## 12. HTML Documentation & Theming Standards (Light Theme Mandate)
|
|
205
216
|
|
|
206
|
-
All generated HTML artifacts across the framework (Contextual Help Playbooks `devflow/
|
|
217
|
+
All generated HTML artifacts across the framework (Contextual Help Playbooks `devflow/docs/playbooks/{skill}.html`, Standalone Reports `report-html`, Architecture & Workflow Diagrams `archify` / `diagram-design`, and UI Prototypes/Mockups) MUST strictly adhere to the **Paper/Ink Light Theme Design System**:
|
|
207
218
|
|
|
208
219
|
- **Mandatory Default `data-theme="light"`**:
|
|
209
220
|
- All HTML documents must start with `<html lang="th" data-theme="light">`.
|
|
@@ -245,66 +256,6 @@ All generated HTML artifacts across the framework (Contextual Help Playbooks `de
|
|
|
245
256
|
- Fonts: Google Sans (`'Google Sans'`, `'Google Sans Text'`) for display headers and body text, `'JetBrains Mono'` for code and monospaced data.
|
|
246
257
|
- Full support for `prefers-reduced-motion: reduce` and clear `:focus-visible` outlines.
|
|
247
258
|
- **Master Reference Template**:
|
|
248
|
-
- Refer to `devflow/
|
|
259
|
+
- Refer to `devflow/docs/playbooks/template.html` as the authoritative, reusable component reference for all playbook and HTML documentation generation.
|
|
249
260
|
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## 13. Prompt Token Economy & Mechanical Input Coverage Standards
|
|
253
|
-
|
|
254
|
-
- **Skill Byte Budgets & Prompt Hygiene**:
|
|
255
|
-
- **Size Ceilings**: `SKILL.md` must not exceed **32 KB**, support/reference markdown files must not exceed **24 KB**, and frontmatter `description` must not exceed **400 characters**.
|
|
256
|
-
- **Every Line Must Earn Its Keep**: If an agent naturally behaves correctly by default, avoid adding redundant prose. Instruct directly without philosophical justification.
|
|
257
|
-
- **Completion Summaries (Lead with Essentials)**:
|
|
258
|
-
- **Headline**: One-line summary of what was accomplished.
|
|
259
|
-
- **Next**: Exactly one next recommended command or action.
|
|
260
|
-
- **Heads up**: Active blockers, decision debt, or critical items needing user attention (omitted when empty).
|
|
261
|
-
- **Pointer**: Link to the detailed artifact rather than repeating large text blocks.
|
|
262
|
-
- **No Checklist Spam**: Avoid dumping lists of obvious successes (`Semantic HTML: OK`, `Keyboard: OK`).
|
|
263
|
-
- **Mechanical Input Coverage Principle (Anti-Hallucination Gate)**:
|
|
264
|
-
- Before implementation, enumerate all values and states that the code must produce or display.
|
|
265
|
-
- Each value must have an explicitly named source (Database column, Input argument, Calculated derivation, or Settled architectural decision).
|
|
266
|
-
- Any required value lacking a named source represents an **Owed Decision**; agents are prohibited from making unrecorded architectural choices or guessing implementations under the guise of "just wiring". Stop and route to `/grill` or request user clarification.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## 14. Architectural Slicing & Assumed Decision Governance
|
|
271
|
-
|
|
272
|
-
- **4 Slicing Archetypes Framework (`devflow/reference/slicing-archetypes.md`)**:
|
|
273
|
-
- When decomposing large roadmaps or splitting oversized features, select from the 4 standard archetypes:
|
|
274
|
-
- **Skateboard**: Minimal functional loop (prove core logic end-to-end with minimal UI).
|
|
275
|
-
- **Facade**: Rich UI/DX with mock backend (validate user flow & interaction first).
|
|
276
|
-
- **Tracer Bullet**: Deep vertical slice across all layers (DB -> API -> UI) for 1 happy path.
|
|
277
|
-
- **Journey**: Slice along natural user workflow milestones.
|
|
278
|
-
- Avoid purely technical layer slicing (e.g. DB only or backend only) that leaves work unverifiable in a single delivery run.
|
|
279
|
-
- **Assumed Decision Debt Lifecycle (`Status: Assumed`)**:
|
|
280
|
-
- For fast-tracking development when user confirmation is pending, record decisions in ADRs (`devflow/decisions/`) with `Status: Assumed`.
|
|
281
|
-
- Every assumed decision MUST specify `Assumption`, `Risk Level & Blast Radius`, and `Ratification Plan`.
|
|
282
|
-
- Untracked architectural assumptions are strictly prohibited.
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## 15. Test File Classification & AC Traceability Standards
|
|
287
|
-
|
|
288
|
-
- **5-Tier Test Classification**:
|
|
289
|
-
- **Tier 1: Pure Logic & Algorithms** (`src/utils/`, `services/`, `lib/`): Fast in-memory Unit Tests, 100% boundary & edge cases coverage. Use TDD.
|
|
290
|
-
- **Tier 2: UI Components** (`src/components/`, `src/pages/`): Component mounting & event interaction, visual verification via Playwright / BrowserOS Neo. Prohibit trivial unit tests for static HTML markup.
|
|
291
|
-
- **Tier 3: API & Data Integration** (`src/api/`, route handlers, DB models): Contract tests, schema validation (Zod), status codes, payload shapes.
|
|
292
|
-
- **Tier 4: Config & Build Tooling** (`*.json`, `*.yaml`, `scripts/`): Static contract validation (`npm run check:static`), budget linters (`npm run check:budgets`), smoke tests.
|
|
293
|
-
- **Tier 5: Documentation & Prose** (`*.md`, `docs/`, `scripts/data/`): Structural checks, markdown contract scans, link integrity verification.
|
|
294
|
-
- **Acceptance Criteria (`AC-N`) Traceability**:
|
|
295
|
-
- All automated test suites and assertion descriptions must explicitly include the target Acceptance Criterion tag (e.g. `it('AC-1: ...')`).
|
|
296
|
-
- During `/check`, verify that 100% of defined acceptance criteria in the active living spec have matching passing empirical proof.
|
|
297
|
-
|
|
298
|
-
---
|
|
299
261
|
|
|
300
|
-
## 16. Token Economy & Cost Optimization Standards
|
|
301
|
-
|
|
302
|
-
- **Token Economics Visibility**:
|
|
303
|
-
- Leverage `npm run analyze:tokens` (or `scripts/analyze-token-usage.ts`) to audit session token usage across Main Thread vs Subagents.
|
|
304
|
-
- Track the 4 token dimensions: **Fresh Input Tokens**, **Prompt Cache Write Tokens**, **Prompt Cache Read Tokens (Hits)**, and **Output Tokens**.
|
|
305
|
-
- **Prompt Caching Optimization**:
|
|
306
|
-
- Structure documentation and context files with immutable headers first so LLM providers can achieve high prompt cache hit rates (>60%).
|
|
307
|
-
- Ensure living specs and references stay compact (under byte budgets) to prevent prompt cache misses and unnecessary token churn.
|
|
308
|
-
- **Cost Metrics & Savings**:
|
|
309
|
-
- Track estimated model costs (USD) against model pricing catalogs (Claude 3.7/3.5 Sonnet, Gemini 2.5 Pro/Flash, GPT-4o).
|
|
310
|
-
- Aim for >50% cost savings through effective prompt caching reuse.
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
###
|
|
8
|
-
- **Definition**: เอกสาร Markdown
|
|
9
|
-
- **Constraints**:
|
|
7
|
+
### Single Living Spec (`current-feature.md`)
|
|
8
|
+
- **Definition**: เอกสาร Markdown กลางเพียงฉบับเดียวที่ใช้ขับเคลื่อนและบันทึกวงจรชีวิตของงานพัฒนาตั้งแต่ต้นจนจบ (Single Source of Truth during active delivery)
|
|
9
|
+
- **Constraints**: มีได้เพียง 1 งานที่ active ในช่วงเวลาหนึ่งตามหลักการ Single Active Run Guardrail
|
|
10
10
|
- **Structure**: ครอบคลุม 6 ส่วนหลัก: (1) Define & Boundaries, (2) Technical Spec & Contracts, (3) Execution Plan & TDD Tasks, (4) Implementation Log & Evidence, (5) Multi-Lane Verification Matrix, (6) Release Digest & Retrospective
|
|
11
|
-
- **Aliases / Related**: `
|
|
11
|
+
- **Aliases / Related**: `current-feature.md`, Living Spec, Feature Spec
|
|
12
12
|
|
|
13
13
|
### Unified Fast-Track
|
|
14
14
|
- **Definition**: รูปแบบการพัฒนาหลักแบบ Single-Track ของ Nexus-DevFlow ที่รวมความสามารถเชิงสถาปัตยกรรมระดับลึก (Deep) และความคล่องตัว (Fast) เข้าด้วยกันผ่าน 4 คำสั่งหลัก: `/feature` (หรือ `/fix`), `/implement`, `/check`, และ `/complete`
|
|
15
|
-
- **Constraints**: ขับเคลื่อนผ่านไฟล์ `
|
|
15
|
+
- **Constraints**: ขับเคลื่อนผ่านไฟล์ `current-feature.md` และเมื่อเสร็จสิ้นจะถูก Archive เป็นไฟล์ Markdown เดี่ยวใน `devflow/history/`
|
|
16
16
|
- **Aliases / Related**: Fast-Track, Unified Track
|
|
17
17
|
|
|
18
18
|
### Pre-Flight Discovery
|
|
@@ -22,30 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
### Multi-Lane Verification Matrix
|
|
24
24
|
- **Definition**: ตารางตรวจสอบคุณภาพแบบหลายมิติที่ครอบคลุม Typecheck, Linter, Automated Unit/Integration Tests, และ Manual Proof Evidence ในคำสั่ง `/check`
|
|
25
|
-
- **Constraints**:
|
|
25
|
+
- **Constraints**: ต้องมีผลลัพธ์ผ่าน (PASS) ครบทุก Lane และไม่มี P0/P1 Finding ที่ยังค้างอยู่ก่อนที่จะส่งต่อไปยัง `/complete`
|
|
26
26
|
- **Aliases / Related**: QA Matrix, Lane Verification
|
|
27
27
|
|
|
28
28
|
### Release Digest & Retrospective
|
|
29
29
|
- **Definition**: สรุปผลการเปลี่ยนแปลง, บทเรียนที่ได้รับ (Lessons Learned), และการตัดสินใจสำคัญที่บันทึกไว้ในตอนปิดรอบการพัฒนา
|
|
30
30
|
- **Constraints**: บันทึกอัตโนมัติใน Living Spec ก่อนที่จะทำการ Squash Merge และ Archive
|
|
31
31
|
- **Aliases / Related**: Delivery Digest, Retrospective Log
|
|
32
|
-
|
|
33
|
-
### 4 Slicing Archetypes
|
|
34
|
-
- **Definition**: รูปแบบมาตรฐาน 4 ประการในการแบ่งย่อยฟีเจอร์ (Skateboard, Facade, Tracer Bullet, Journey) เพื่อให้ได้รอบการส่งมอบที่เล็ก ทดสอบได้จริง และไม่ติดขัด Technical Layer Dependency
|
|
35
|
-
- **Constraints**: ใช้งานใน `/discovery`, `/brainstorm`, และ `/feature` (Step 2)
|
|
36
|
-
- **Aliases / Related**: `slicing-archetypes.md`, Feature Decomposition, Slicing Strategy
|
|
37
|
-
|
|
38
|
-
### Assumed Decision Debt
|
|
39
|
-
- **Definition**: หนี้การตัดสินใจที่เกิดขึ้นจากการตั้งสมมติฐานทางสถาปัตยกรรมชั่วคราว (`Status: Assumed` ใน ADR) เพื่อให้การพัฒนาเดินหน้าได้อย่างรวดเร็ว (Fast-track) โดยไม่สะดุด
|
|
40
|
-
- **Constraints**: ต้องระบุ Assumption, Risk Level, และ Ratification Plan กำกับเสมอ และต้องได้รับการตรวจทาน/ยืนยัน (Ratified) ก่อนปล่อยสู่ Production
|
|
41
|
-
- **Aliases / Related**: Assumed ADR, Decision Debt, Fast-track Assumption
|
|
42
|
-
|
|
43
|
-
### AC-to-Test Traceability Matrix
|
|
44
|
-
- **Definition**: ตารางเชื่อมโยงระหว่างข้อกำหนด Acceptance Criteria (`AC-N`) ใน Living Spec กับ Automated Test Cases และหลักฐานเชิงประจักษ์ เพื่อให้มั่นใจว่าทุกข้อกำหนดได้รับการทดสอบและพิสูจน์จริงแบบ 1-to-1
|
|
45
|
-
- **Constraints**: ใช้ระบุใน Living Spec (`spec.md`), ตรวจทานใน `/check`, และกำกับด้วย `AC-N` Tag ในโค้ดทดสอบ
|
|
46
|
-
- **Aliases / Related**: Traceability Matrix, AC Mapping, Spec Verification Trace
|
|
47
|
-
|
|
48
|
-
### Prompt Caching Rate & Billed-Equivalent Cost
|
|
49
|
-
- **Definition**: ดัชนีวัดประสิทธิภาพการใช้ Token ของ AI Coding Agent โดยแยกแยะระหว่าง Fresh Input Tokens, Cache Creation (Write), Cache Read (Prompt Caching Hits), และ Output Tokens เพื่อคำนวณต้นทุนจริง (USD) และ % ส่วนลดที่ประหยัดได้จาก Prompt Caching
|
|
50
|
-
- **Constraints**: วิเคราะห์ผ่าน `scripts/analyze-token-usage.ts` และคำสั่ง `npm run analyze:tokens`
|
|
51
|
-
- **Aliases / Related**: Token Economics, Cost Units, Cache Hit Rate
|
|
@@ -11,14 +11,10 @@ Each ADR is named `ADR-xxx-{slug}.md` (e.g. `ADR-001-database-schema-migration.m
|
|
|
11
11
|
```markdown
|
|
12
12
|
# ADR-xxx: {Title}
|
|
13
13
|
|
|
14
|
-
- **Status**:
|
|
14
|
+
- **Status**: Accepted | Proposed | Deprecated | Superseded by ADR-yyy
|
|
15
15
|
- **Date**: YYYY-MM-DD
|
|
16
16
|
- **Context**: Problem statement, background, and why this decision was needed.
|
|
17
17
|
- **Decision**: The selected architectural approach or invariant.
|
|
18
|
-
- **Assumption Metadata** *(Mandatory when Status is `Assumed`)*:
|
|
19
|
-
- **Assumption**: ข้อสมมติฐานทางเทคนิคที่ตั้งขึ้นเพื่อปลดบล็อกการทำงานชั่วคราว
|
|
20
|
-
- **Risk Level & Blast Radius**: ระดับความเสี่ยงและขอบเขตผลกระทบหากข้อสมมติไม่ถูกต้อง
|
|
21
|
-
- **Ratification Plan**: เงื่อนไข, วันที่ หรือเหตุการณ์ที่จะทำการทวนสอบ (Ratify) เพื่อเปลี่ยนสถานะเป็น `Accepted` หรือ `Rejected`
|
|
22
18
|
- **Alternatives Considered**:
|
|
23
19
|
- *Option 1*: Pros / Cons
|
|
24
20
|
- *Option 2*: Pros / Cons
|
|
@@ -26,13 +22,3 @@ Each ADR is named `ADR-xxx-{slug}.md` (e.g. `ADR-001-database-schema-migration.m
|
|
|
26
22
|
- *Positive*: Benefits and capabilities unlocked
|
|
27
23
|
- *Trade-offs / Risks*: Costs, complexity, or constraints
|
|
28
24
|
```
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## ⚡ Assumed Decision Debt Policy
|
|
33
|
-
|
|
34
|
-
เมื่อทีมหรือ Agent จำเป็นต้องเดินหน้าพัฒนาอย่างรวดเร็ว (Fast-track) โดยที่ข้อสรุปทางสถาปัตยกรรมยังไม่ได้รับการยืนยัน 100% จากผู้ใช้ ให้บันทึก ADR ด้วย `Status: Assumed` พร้อมกรอก **Assumption Metadata** ให้ครบถ้วน
|
|
35
|
-
|
|
36
|
-
> [!WARNING]
|
|
37
|
-
> **Zero Untracked Decision Debt**: ทุก ADR ที่มีสถานะ `Assumed` จะถูกตรวจสอบโดย `/audit` และ `/complete` เพื่อแจ้งเตือนให้ทีมยืนยัน (Ratify) หรือปรับแก้ก่อนส่งมอบขึ้น Production เสมอ
|
|
38
|
-
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Nexus-DevFlow 2.13.0 Comprehensive Usage Guide
|
|
2
|
+
|
|
3
|
+
This guide provides full operating instructions for **Nexus-DevFlow 2.13.0 (The 3-Pillars Workspace Architecture & Pure Task-Isolated Living Spec Model)** across Google Antigravity, OpenAI Codex, Claude Code, Cursor, GitHub Copilot, and related AI development environments.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Core Architecture: The 3-Pillars Model
|
|
8
|
+
|
|
9
|
+
Nexus-DevFlow structures development history and active context into three distinct temporal pillars:
|
|
10
|
+
|
|
11
|
+
1. **🔮 Future (Backlog)**: [`devflow/ideas.md`](../ideas.md), [`devflow/project-plan.md`](../project-plan.md), [`devflow/build-plan.md`](../build-plan.md)
|
|
12
|
+
- Centralized Idea Inbox with AI feasibility, value scoring, and priority tagging (`[IDEA-xxx]`).
|
|
13
|
+
- Product vision and master build-plan sequencing.
|
|
14
|
+
- Quick idea capture via `/idea {description}`.
|
|
15
|
+
2. **⚡ Present (Active Context)**: `devflow/context/`
|
|
16
|
+
- Global Shared Source of Truth: `project-overview.md`, `coding-standards.md`, `ai-interaction.md`, `glossary.md`.
|
|
17
|
+
- **Task-Isolated Workspaces**: `devflow/context/{xxx-slug}/`
|
|
18
|
+
- `spec.md`: The Living Spec, task checklist, and empirical proof.
|
|
19
|
+
- `stage.md`: Stage pointer and transition state.
|
|
20
|
+
- `findings.md`: Dedicated quality, security, and Fowler smell findings ledger.
|
|
21
|
+
3. **📦 Past (History Archive)**: `devflow/history/`
|
|
22
|
+
- Categorized delivery archives: `features/`, `fixes/`, `rollbacks/`.
|
|
23
|
+
- Master Release Ledger: `HISTORY.md`.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. The Unified 4-Stage Living Spec Lifecycle
|
|
28
|
+
|
|
29
|
+
All development tasks execute through the progressive 4-stage task-isolated living spec lifecycle:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
/feature (or /fix) ──▶ /implement ──▶ /check ──▶ /complete
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Step | Command | Artifact | Description |
|
|
36
|
+
| :--- | :--- | :--- | :--- |
|
|
37
|
+
| **1. Spec** | `/feature {title}`<br>`/fix {bug}` | `context/{xxx-slug}/spec.md` | Allocates sequential ID (`xxx-slug`), initializes task workspace, writes living spec behind review gate. |
|
|
38
|
+
| **2. Build** | `/implement [id]` | `context/{xxx-slug}/spec.md` | Executes tasks incrementally with strict TDD discipline (Red-Green-Refactor) and evidence recording. |
|
|
39
|
+
| **3. Verify**| `/check [id]` | `context/{xxx-slug}/spec.md` | Dual-Axis review: empirical spec fidelity plus independent standards, architecture, and quality gates. |
|
|
40
|
+
| **4. Deliver** | `/complete [id]` | `history/{cat}/{xxx-slug}.md` | Final safety audit, records Release Digest, archives living spec, cleans active task folder, squash-merges branch. |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 3. Pre-Flight Discovery, SA & Architectural Alignment Suite
|
|
45
|
+
|
|
46
|
+
Before committing to delivery, use specialized companion skills:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
/analyze ──▶ /idea (Inbox) ──▶ /grill (Socratic ADR) ──▶ /discovery (Explore) ──▶ /feature (Deliver)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- **`/analyze`**: Multi-format requirement ingestion (PDF, Word, Excel, Images), Codebase Impact scan & Socratic Gap checklist.
|
|
53
|
+
- **`/idea`**: Capture raw ideas in `devflow/ideas.md` with instant AI feasibility scoring.
|
|
54
|
+
- **`/grill`** (or **`/align`**): Socratic alignment & domain modeling; records Architecture Decision Records (`devflow/decisions/ADR-xxx.md`).
|
|
55
|
+
- **`/brainstorm`**: Structured ideation with trade-off analysis.
|
|
56
|
+
- **`/discovery`**: Deep inception and exploratory discovery (`devflow/discoveries/DISC-xxx.md`).
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 4. Core Skills Inventory (32 Skills)
|
|
61
|
+
|
|
62
|
+
DevFlow ships **32 bundled Core Skills** from the ordered `core_skills` inventory
|
|
63
|
+
in `agent-bundle.manifest.json`, synchronized 1:1 across `.agents/skills/`
|
|
64
|
+
(Codex / Antigravity / Copilot) and `.claude/skills/` (Claude Code). Local or
|
|
65
|
+
Personal Skills may coexist in a workspace, but are excluded from the Core count
|
|
66
|
+
and package template until explicitly promoted.
|
|
67
|
+
|
|
68
|
+
### A. Lifecycle Delivery Skills (8 Skills)
|
|
69
|
+
- `feature`: Turn a build-plan item or new idea into a task-isolated living spec (`devflow/context/{xxx-slug}/spec.md`).
|
|
70
|
+
- `fix`: Document and spec an ad-hoc bug or issue into `devflow/context/{xxx-slug}/spec.md`.
|
|
71
|
+
- `implement`: Step-by-step TDD implementation behind review gates.
|
|
72
|
+
- `check`: Dual-Axis verification of observable spec behavior and independent architecture/standards quality.
|
|
73
|
+
- `complete`: Final safety audit, Conventional Commit, archiving, and branch delivery gate.
|
|
74
|
+
- `autopilot`: Bounded single-pass delivery loop with self-review and safe repair.
|
|
75
|
+
- `continuous`: Autonomous serial multi-feature delivery loop completing build-plan items with quality gates.
|
|
76
|
+
- `rollback`: Plan a safe reversal of a completed feature preserving history.
|
|
77
|
+
|
|
78
|
+
### B. Pre-Flight Discovery, SA & Alignment Skills (5 Skills)
|
|
79
|
+
- `analyze`: Multi-format requirement ingestion (PDF, Word, Excel, Images), Codebase Impact scan & Socratic Gap checklist.
|
|
80
|
+
- `discovery`: Inception exploration and deep multi-turn planning (`devflow/discoveries/`).
|
|
81
|
+
- `idea`: Quick idea capture and AI feasibility scoring (`devflow/ideas.md`).
|
|
82
|
+
- `grill` / `align`: Socratic alignment, domain modeling, and ADR recording (`devflow/decisions/`).
|
|
83
|
+
- `brainstorm`: Structured divergent & convergent ideation with trade-off matrices.
|
|
84
|
+
|
|
85
|
+
### C. Workspace & Governance Skills (19 Skills)
|
|
86
|
+
- `devflow`: Interactive workspace inspector and intent router.
|
|
87
|
+
- `doctor`: Read-only health check for setup, adapters, and workflow drift.
|
|
88
|
+
- `onboard`: Configure freshly scaffolded projects.
|
|
89
|
+
- `adopt`: Bootstrap DevFlow into existing brownfield codebases.
|
|
90
|
+
- `overview`: Compile living source of truth from planning docs.
|
|
91
|
+
- `brief`: Feature scope and dependency briefing before speccing.
|
|
92
|
+
- `audit`: Branch-aware or full-project code and security audit.
|
|
93
|
+
- `bughunter`: Offensive security orchestrator, 83 vulnerability patterns & CVE payloads.
|
|
94
|
+
- `ci`: Set up single Verify command and GitHub Actions.
|
|
95
|
+
- `test`: Test suite runner and coverage analyzer.
|
|
96
|
+
- `setup-tests`: Add or normalize unit test suite.
|
|
97
|
+
- `browser-tests`: Add or normalize Playwright browser test harness & connect with MCP browseros-neo.
|
|
98
|
+
- `release`: Cloud deployment readiness check (Render / Vercel).
|
|
99
|
+
- `prototype`: Static HTML/CSS prototype mockups.
|
|
100
|
+
- `status`: Progress summary and next action inspector.
|
|
101
|
+
- `try`: Manual review testing guide.
|
|
102
|
+
- `debug`: Scientific six-phase diagnosis built around a deterministic red-capable feedback loop.
|
|
103
|
+
- `report-html`: Generate interactive standalone HTML report dashboard.
|
|
104
|
+
- `convert-any-to-md`: Document conversion utility into markdown.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 5. Quality, Governance & Authoring Contracts
|
|
109
|
+
|
|
110
|
+
- [Workflow surface map](workflow-surface-map.md): canonical command taxonomy and artifacts.
|
|
111
|
+
- [Skill selection policy](skill-selection-policy.md): choose the smallest suitable workflow surface.
|
|
112
|
+
- [Governance rules](governance-rules.md): public-surface and documentation placement rules.
|
|
113
|
+
- [Markdown metadata contract](markdown-metadata-contract.md): frontmatter and semantic heading requirements.
|
|
114
|
+
- [Manual review workflow](manual-review-workflow-spec.md): review gates from spec through delivery.
|
|
115
|
+
- [Living Spec examples](examples/living-spec/): reference specs, discoveries, ADRs, and ideas.
|
|
116
|
+
|
|
117
|
+
`/check` applies the Deep Modules standard independently from spec fidelity:
|
|
118
|
+
small public interfaces, hidden complexity, stable seams, and no speculative
|
|
119
|
+
abstraction. `/debug` diagnoses first and hands confirmed repairs to `/fix` or
|
|
120
|
+
`/implement`; it does not edit source during diagnosis.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### Debugging, TDD & Review Reference Guides
|
|
125
|
+
|
|
126
|
+
The `debug`, `implement`, and `audit` skills include five English reference guides.
|
|
127
|
+
They are supporting files read when needed, not additional commands. Both
|
|
128
|
+
`.agents/skills/` and `.claude/skills/` contain matching copies; no separate
|
|
129
|
+
Superpowers plugin installation is required.
|
|
130
|
+
|
|
131
|
+
| Situation | Entry point | Reference guide |
|
|
132
|
+
| :--- | :--- | :--- |
|
|
133
|
+
| Error deep in a call stack or unclear input origin | `/debug` Phase 4 | [Root-cause tracing](../../.agents/skills/debug/root-cause-tracing.md) |
|
|
134
|
+
| Confirmed root cause needs protective checks | `/debug` repair planning → `/fix` → `/implement` | [Defense-in-depth](../../.agents/skills/debug/defense-in-depth.md) |
|
|
135
|
+
| Flaky async tests or guessed sleep delays | `/debug` Phase 4 | [Condition-based waiting](../../.agents/skills/debug/condition-based-waiting.md) |
|
|
136
|
+
| Planning RED/GREEN or inspecting test quality | `/implement [id]` | [TDD anti-patterns](../../.agents/skills/implement/tdd-anti-patterns.md) |
|
|
137
|
+
| Preparing an independent review | `/audit independent current` | [Two-stage review template](../../.agents/skills/audit/two-stage-review-template.md) |
|
|
138
|
+
|
|
139
|
+
**Debugging:** Trace the trigger before planning a repair. Use validation layers
|
|
140
|
+
according to actual invariants and risks, and keep diagnostic output redacted.
|
|
141
|
+
The waiting example accepts synchronous predicates only; async I/O needs an
|
|
142
|
+
appropriate async helper with cancellation or timeout. `/debug` remains a
|
|
143
|
+
diagnostic stage. After three unsuccessful repair attempts in the supplied
|
|
144
|
+
history, stop and discuss the architecture before attempting another fix.
|
|
145
|
+
|
|
146
|
+
**Implementation:** Apply the Iron Law to behavior changes according to the
|
|
147
|
+
spec's test decision: observe the intended failing test before production code.
|
|
148
|
+
Confirm that RED reflects missing behavior rather than broken setup, implement
|
|
149
|
+
the minimum change for GREEN, then refactor with tests passing. Preserve existing
|
|
150
|
+
user work; verify documentation or configuration without logic as the spec directs.
|
|
151
|
+
|
|
152
|
+
**Review:** Check spec compliance first, then code quality only after Stage 1
|
|
153
|
+
passes. Use the template alongside the canonical
|
|
154
|
+
[independent-review contract](../../.agents/skills/audit/reference/independent-review.md).
|
|
155
|
+
The configured gate still determines whether review runs, and its request,
|
|
156
|
+
immutable checkpoint, reviewer identity, and receipt requirements remain in force.
|
|
157
|
+
Open or fixed P0/P1 findings continue to block completion.
|
|
158
|
+
|
|
159
|
+
Example prompts (use `$debug` and `$implement` in Codex where appropriate):
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
/debug "This async test passes locally but times out in CI; inspect its waiting conditions"
|
|
163
|
+
/implement 085
|
|
164
|
+
/audit independent current
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Replace `085` with your active task ID. For the review prompt, ask the reviewer
|
|
168
|
+
to use `audit/two-stage-review-template.md` with the canonical receipt contract;
|
|
169
|
+
the template does not launch a reviewer or authorize a checkpoint commit itself.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 6. Web Dashboard & CLI Management
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Launch interactive Local Dashboard (0ms SSR Hydration & Git Cache)
|
|
177
|
+
npx @jakkrichm/create-nexus-devflow dashboard
|
|
178
|
+
|
|
179
|
+
# Check active project status across 3-Pillars
|
|
180
|
+
npx @jakkrichm/create-nexus-devflow status
|
|
181
|
+
|
|
182
|
+
# Automated Quality Gatekeeper
|
|
183
|
+
npx @jakkrichm/create-nexus-devflow gate [--strict]
|
|
184
|
+
|
|
185
|
+
# Model Context Protocol (MCP) Server Hub
|
|
186
|
+
npx @jakkrichm/create-nexus-devflow mcp
|
|
187
|
+
|
|
188
|
+
# Just-In-Time (JIT) Dynamic Context Slicing
|
|
189
|
+
npx @jakkrichm/create-nexus-devflow slice --stage implement
|
|
190
|
+
|
|
191
|
+
# Multi-Agent Swarm & Code Graph RAG
|
|
192
|
+
npx @jakkrichm/create-nexus-devflow swarm
|
|
193
|
+
npx @jakkrichm/create-nexus-devflow graph --file src/index.ts
|
|
194
|
+
```
|