@jakkrichm/create-nexus-devflow 2.17.1 → 2.17.3

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 (67) hide show
  1. package/dist/bin/create-nexus-devflow.d.ts +1 -1
  2. package/dist/bin/create-nexus-devflow.js +3 -74
  3. package/dist/bin/create-nexus-devflow.js.map +1 -1
  4. package/dist/lib/doctor.js +1 -2
  5. package/dist/lib/doctor.js.map +1 -1
  6. package/dist/lib/project-config.js +1 -2
  7. package/dist/lib/project-config.js.map +1 -1
  8. package/dist/lib/tooling/commands/summarize-run-status.js +1 -3
  9. package/dist/lib/tooling/commands/summarize-run-status.js.map +1 -1
  10. package/dist/lib/tooling/registry.js +0 -2
  11. package/dist/lib/tooling/registry.js.map +1 -1
  12. package/dist/lib/update.d.ts +3 -13
  13. package/dist/lib/update.js +1 -66
  14. package/dist/lib/update.js.map +1 -1
  15. package/dist/scripts/prepare-template.js +15 -75
  16. package/dist/scripts/prepare-template.js.map +1 -1
  17. package/package.json +1 -1
  18. package/template/AGENTS.md +9 -10
  19. package/template/devflow/build-plan.md +45 -0
  20. package/template/devflow/config.json +0 -1
  21. package/template/devflow/project-plan.md +52 -0
  22. package/template/devflow/runs/.gitkeep +1 -0
  23. package/dist/lib/tooling/commands/migrate-structure.d.ts +0 -8
  24. package/dist/lib/tooling/commands/migrate-structure.js +0 -200
  25. package/dist/lib/tooling/commands/migrate-structure.js.map +0 -1
  26. package/dist/lib/workspace-paths.d.ts +0 -16
  27. package/dist/lib/workspace-paths.js +0 -85
  28. package/dist/lib/workspace-paths.js.map +0 -1
  29. package/template/devflow/30-planning/build-plan.md +0 -302
  30. package/template/devflow/30-planning/project-plan.md +0 -79
  31. package/template/devflow/40-tasks/.gitkeep +0 -0
  32. package/template/devflow/40-tasks/README.md +0 -11
  33. package/template/devflow/60-docs/migration-guide-decade-numbered.md +0 -93
  34. /package/template/devflow/{00-context → context}/ai-interaction.md +0 -0
  35. /package/template/devflow/{00-context → context}/coding-standards.md +0 -0
  36. /package/template/devflow/{00-context → context}/glossary.md +0 -0
  37. /package/template/devflow/{00-context → context}/project-overview.md +0 -0
  38. /package/template/devflow/{20-discovery/decisions → decisions}/.gitkeep +0 -0
  39. /package/template/devflow/{20-discovery/decisions → decisions}/README.md +0 -0
  40. /package/template/devflow/{20-discovery/discoveries → discoveries}/.gitkeep +0 -0
  41. /package/template/devflow/{60-docs → docs}/USAGE.md +0 -0
  42. /package/template/devflow/{60-docs → docs}/diagrams/nexus-devflow-architecture.html +0 -0
  43. /package/template/devflow/{60-docs → docs}/diagrams/nexus-devflow-architecture.json +0 -0
  44. /package/template/devflow/{60-docs → docs}/diagrams/nexus-devflow-lifecycle.html +0 -0
  45. /package/template/devflow/{60-docs → docs}/diagrams/nexus-devflow-lifecycle.json +0 -0
  46. /package/template/devflow/{60-docs → docs}/examples/living-spec/adr.example.md +0 -0
  47. /package/template/devflow/{60-docs → docs}/examples/living-spec/current-feature.example.md +0 -0
  48. /package/template/devflow/{60-docs → docs}/examples/living-spec/discovery.example.md +0 -0
  49. /package/template/devflow/{60-docs → docs}/examples/living-spec/ideas.example.md +0 -0
  50. /package/template/devflow/{60-docs → docs}/governance-rules.md +0 -0
  51. /package/template/devflow/{60-docs → docs}/manual-review-workflow-spec.md +0 -0
  52. /package/template/devflow/{60-docs → docs}/markdown-metadata-contract.md +0 -0
  53. /package/template/devflow/{60-docs → docs}/quickstart.md +0 -0
  54. /package/template/devflow/{60-docs → docs}/release-process.md +0 -0
  55. /package/template/devflow/{60-docs → docs}/skill-selection-policy.md +0 -0
  56. /package/template/devflow/{60-docs → docs}/workflow-surface-map.md +0 -0
  57. /package/template/devflow/{50-history → history}/HISTORY.md +0 -0
  58. /package/template/devflow/{50-history → history}/features/README.md +0 -0
  59. /package/template/devflow/{50-history → history}/fixes/README.md +0 -0
  60. /package/template/devflow/{50-history → history}/rollbacks/README.md +0 -0
  61. /package/template/devflow/{10-ideation/ideas.md → ideas.md} +0 -0
  62. /package/template/devflow/{10-ideation/reference → reference}/build-plan-template.md +0 -0
  63. /package/template/devflow/{10-ideation/reference → reference}/feature-spec-template.md +0 -0
  64. /package/template/devflow/{10-ideation/reference → reference}/mockup.html +0 -0
  65. /package/template/devflow/{10-ideation/reference → reference}/project-overview-template.md +0 -0
  66. /package/template/devflow/{10-ideation/reference → reference}/project-plan-template.md +0 -0
  67. /package/template/devflow/{10-ideation/reference → reference}/running-id-contract.md +0 -0
@@ -1,79 +0,0 @@
1
- # 🗺️ Project Plan (User-Owned Architectural Vision)
2
-
3
- > **Document Type**: Project Plan (User-Owned)
4
- > **Purpose**: แหล่งความจริงหลัก (Single Source of Truth) สำหรับวิสัยทัศน์ผลิตภัณฑ์ สถาปัตยกรรมระบบ มาตรการความปลอดภัย กฎเกณฑ์การส่งมอบ และแผนงานพัฒนาต่อยอด ถูกนำไปประมวลผลเป็น `devflow/context/project-overview.md` ผ่านคำสั่ง `/overview`
5
-
6
- ---
7
-
8
- ## 1. Product Vision & Problem Statement
9
-
10
- - **What this is**: **Nexus-DevFlow** คือระบบ **Agentic Workflow Layer & Pair Programming Operating System** ที่เชื่อมต่อระหว่างนักพัฒนา (Human Developer) และปัญญาประดิษฐ์ (AI Coding Agents เช่น Google Antigravity, Claude Code, OpenAI Codex, Cursor, GitHub Copilot) เพื่อยกระดับการพัฒนาซอฟต์แวร์สู่มาตรฐานระดับวิศวกรรมสากล
11
- - **Target Audience**:
12
- - นักพัฒนาเดี่ยว (Solo Developers) ที่ต้องการความเร็วสูงแต่ยังคงมีระเบียบวินัยและหลักฐานการทดสอบที่ชัดเจน
13
- - ทีมพัฒนาและองค์กร (Engineering Teams & Tech Leads) ที่ต้องการมาตรฐานการส่งมอบโค้ดที่ตรวจสอบได้ (Traceable), ตรวจสอบย้อนหลังได้ (Auditable) และไม่มีปัญหาโค้ดตีกัน (Zero Merge Conflict)
14
- - **Core Value Proposition**:
15
- - **The 3-Pillars Model**: จัดระเบียบบริบทเป็น 3 เสาหลักอย่างชัดเจน — *🔮 Future (Inbox `ideas.md`)* ➔ *⚡ Present (Living Context `devflow/context/`)* ➔ *📦 Past (Categorized History `devflow/history/`)*
16
- - **Single Living Spec Delivery Model**: งานทุกขนาดใช้วงจรเดียว `/feature` (หรือ `/fix`) ➔ `/implement` ➔ `/check` ➔ `/complete` โดยเพิ่มความลึกของสเปกและหลักฐานตามความซับซ้อนของงาน
17
- - **Hard Quality Gates**: ระบบปฏิเสธการปล่อยงานเมื่อไม่ผ่านเกณฑ์การทดสอบ หรือมีข้อบกพร่องความปลอดภัยค้างอยู่
18
-
19
- ---
20
-
21
- ## 2. Architecture & Tech Stack
22
-
23
- - **Runtime & Language**: Node.js (>=18.17.0), TypeScript (Strict ESM-First `"type": "module"`)
24
- - **Persistence & State**:
25
- - Markdown-First Architecture พร้อม Type-Safe Schema Validation (Zod)
26
- - Git-Backed History Archive (`devflow/history/features/`, `devflow/history/fixes/`, `devflow/history/rollbacks/`, `HISTORY.md`)
27
- - Local State Management & Backup Snapshots (`.nexus/`)
28
- - **Key Modules & Subsystems**:
29
- - **Distribution CLI & Package**: `packages/create-nexus-devflow` (Scaffolding, Doctor, Status, Update, Gatekeeper)
30
- - **Interactive Web Dashboard**: Embedded Local Webview Dashboard (`/dashboard`) พร้อม Living Spec Visualizer และ Real-time Snapshot
31
- - **Gatekeeper Engine**: ระบบตรวจสอบคุณภาพโค้ดและ Finding Blockers (`nexus-devflow check-gate`)
32
- - **Model Context Protocol (MCP) Server**: JSON-RPC Hub สำหรับเชื่อมต่อ AI Agents แบบ Type-Safe
33
- - **Dynamic Context Slicer**: ระบบจัดสรรและตัดตอนบริบทแบบ Just-In-Time (JIT) เพื่อประหยัด Token
34
- - **Integration Points & AI Adapters**:
35
- - Google Antigravity & OpenAI Codex (`.agents/skills/`)
36
- - Claude Code (`.claude/skills/`)
37
- - Model Context Protocol (`@modelcontextprotocol/sdk`)
38
-
39
- ---
40
-
41
- ## 3. Constraints, Defensive Guardrails & Non-Goals
42
-
43
- - **5 เสาหลักมาตรการป้องกันความเสี่ยง (Hard Defensive Guardrails)**:
44
- 1. *Hard Quality Gates & Git Hooks*: บล็อกการ Commit ทันทีหาก Spec ไม่ครบ หรือมี `P0/P1 Finding` ค้างอยู่ในสถานะ `open`
45
- 2. *Model Context Protocol (MCP)*: บังคับใช้ Typed Function Calling เพื่อป้องกันความเสียหายจากการ Parse ข้อความ Markdown
46
- 3. *Branch-Scoped Context Isolation*: แยกโฟลเดอร์ State ตาม Git Branch ใน `.nexus/branches/<name>/` ป้องกัน Merge Conflict เมื่อทำงานเป็นทีม
47
- 4. *Dynamic Context Slicing*: ส่งเฉพาะบริบทที่จำเป็นต่อ Stage นั้นๆ เข้าสู่ AI ลด Token Bloat 60–70%
48
- 5. *State Drift Reconciler*: ตรวจจับความไม่สอดคล้องระหว่าง Git Diffs กับ Spec Tasks และเสนอทางเลือก Auto-Sync ทันที
49
- - **Non-Goals**:
50
- - ไม่ใช่ Proprietary IDE หรือ Closed Cloud SaaS — DevFlow เป็น Transparent Git-Native Layer ที่ฝังตัวในโปรเจกต์ใดก็ได้
51
- - ไม่ใช่ Auto-GPT ที่ปล่อยให้ AI เขียนโค้ดตามใจโดยไม่มี Human-in-the-Loop Review Gates
52
- - **Delivery Rules**:
53
- - เคร่งครัดใน TDD Mandate: โค้ดที่เพิ่มหรือแก้ไขต้องมี Automated Unit Tests เสมอ
54
- - ห้ามข้ามขั้นตอน Verification: ต้องมีหลักฐานเชิงประจักษ์ (Empirical Proof) ใน `/check` ก่อนอนุมัติ `/complete`
55
-
56
- ---
57
-
58
- ## 4. Key Milestones & Evolution Roadmap
59
-
60
- - **🚀 Milestone 1: Hard Quality Gates & Pre-commit Enforcement**
61
- - ติดตั้ง `check-gate` เข้าสู่ Git Pre-commit Hooks และ CI Pipeline
62
- - บล็อกการส่งมอบเมื่อมี Unchecked Tasks หรือ P0/P1 Blockers
63
- - **⚡ Milestone 2: DevFlow MCP Server Hub & Type-Safe Schemas (`IDEA-004`)**
64
- - พัฒนา MCP Server ผ่าน JSON-RPC สำหรับ Antigravity, Claude, Codex, Cursor
65
- - ใช้ Zod Schema ควบคุมการอัปเดต Task, Findings, และ Stage State 100% Type-safe
66
- - **🌿 Milestone 3: Branch-Scoped Context Isolation & Dynamic Router**
67
- - รองรับการเก็บ State แยกตาม Git Branch ป้องกัน Merge Conflict ในทีม
68
- - ระบบ Auto-Cleanup ลบ Branch State หลังจบ `/complete` และย้ายเข้าสู่ History
69
- - **✂️ Milestone 4: JIT Context Slicing & Token Budgeting Engine**
70
- - ปรับระบบส่ง Context ให้ AI ตาม Stage แบบไดนามิก ประหยัด Token 70%
71
- - ควบคุมขนาด `project-overview.md` ไม่ให้เกินงบประมาณ Token
72
- - **🔄 Milestone 5: Git Diff Reconciler & Self-Healing State**
73
- - ตรวจจับความคลาดเคลื่อนระหว่างการแก้โค้ดของมนุษย์กับ Living Spec
74
- - ระบบ Smart Reconciliation แจ้งเตือนและซิงค์สเปกอัตโนมัติ
75
- - **🖥️ Milestone 6: IDE Native Extension & Visual Kanban Studio**
76
- - ส่วนขยายบน VS Code / Antigravity Webview สำหรับควบคุม DevFlow ครบวงจรใน IDE
77
- - **🤖 Milestone 7: Multi-Agent Swarm Orchestration & Semantic Code RAG**
78
- - ระบบประสานงาน Subagents หลายตัว (Coder, QA, Auditor) ทำงานขนานกัน
79
- - Local Dependency Graph & Semantic Code Search เพื่อดึงบริบทที่แม่นยำสูงสุด
File without changes
@@ -1,11 +0,0 @@
1
- # ⚡ 40-tasks: Active Living Spec Workspaces
2
-
3
- This directory contains active, isolated task workspaces (`{xxx-slug}/`) during development.
4
-
5
- Each active task folder contains:
6
- - `spec.md` - Task-isolated living specification and implementation checklist
7
- - `stage.md` - Lifecycle stage tracker (`defined`, `in-progress`, `checked`, `verified`)
8
- - `findings.md` - Dedicated findings ledger for audit and verification proof
9
- - `review.md` - Optional independent review request and receipt
10
-
11
- When a task is completed via `/complete`, its spec is archived to `devflow/50-history/features/` (or `fixes/`, `rollbacks/`) and the active folder in `40-tasks/` is cleanly removed.
@@ -1,93 +0,0 @@
1
- # คู่มือการย้ายโครงสร้างโฟลเดอร์สู่ Decade-Numbered Stages (Migration Guide)
2
-
3
- > **DevFlow Version**: 2.16.5+
4
- > **Topic**: การจัดระเบียบโฟลเดอร์ `devflow/` ตามลำดับขั้นตอนด้วย Decade-Numbered Stages และการอัปเกรดจากโครงสร้างเดิม
5
-
6
- ---
7
-
8
- ## 🌟 1. สถาปัตยกรรมโฟลเดอร์ Decade-Numbered Stages
9
-
10
- เพื่อแก้ปัญหาโฟลเดอร์ใน `devflow/` กระจัดกระจายและไม่มีตัวเลขจัดเรียงสายตาใน IDE ทาง DevFlow ได้แนะนำโครงสร้าง **Decade-Numbered Stages Structure** (`00-`, `10-`, `20-`, ...) ที่ช่วยให้ทั้งผู้ใช้งานและ AI Agent ไล่ลำดับขั้นตอนการพัฒนาได้อย่างเป็นธรรมชาติ:
11
-
12
- ```text
13
- devflow/
14
- ├── config.json # Root configuration
15
- ├── .state/ # Runtime state (run.json - Git ignored)
16
- ├── .vendor/ # External vendor skills (bughunter, ponytail, ฯลฯ)
17
- │
18
- ├── 00-context/ # [Foundation & Source of Truth]
19
- │ ├── project-overview.md # Living overview (สถาปัตยกรรม & tech stack ล่าสุด)
20
- │ ├── coding-standards.md # กฎระเบียบและมาตรฐานการเขียนโค้ด
21
- │ ├── ai-interaction.md # ข้อกำหนดการทำงานร่วมกับ AI Agent
22
- │ └── glossary.md # พจนานุกรมศัพท์เฉพาะของระบบ
23
- │
24
- ├── 10-ideation/ # [Input & Reference Ingestion]
25
- │ ├── ideas.md # บันทึกไอเดียใหม่ (Idea Inbox)
26
- │ ├── inbox/ # ไฟล์ดิบจากภายนอก (PDF, Excel, Word, ภาพ)
27
- │ └── reference/ # เอกสารที่แปลงเป็น Markdown สะอาดพร้อมใช้งาน
28
- │
29
- ├── 20-discovery/ # [Analysis, Exploration & Architecture]
30
- │ ├── analysis/ # ผลการวิเคราะห์ System Analyst (/analyze)
31
- │ ├── discoveries/ # Pre-flight Spikes & Research (/discovery)
32
- │ ├── decisions/ # บันทึกการตัดสินใจ ADRs (/grill)
33
- │ ├── research/ # เอกสารวิจัยเชิงลึกและ Benchmark
34
- │ ├── 21-prototype/ # (Optional: Static UI mockups / prototype)
35
- │ └── 22-diagrams/ # (Optional: System & Architecture Diagrams)
36
- │
37
- ├── 30-planning/ # [Roadmap & Master Plans]
38
- │ ├── project-plan.md # Master Roadmap & Milestones
39
- │ └── build-plan.md # Master Delivery Checklist
40
- │
41
- ├── 40-tasks/ # [Active Living Spec Workspaces]
42
- │ └── {xxx-slug}/ # Active task workspace (สร้างตอนทำฟีเจอร์/แก้บั๊ก)
43
- │ ├── spec.md # Task-Isolated Living Spec
44
- │ ├── stage.md # ตัวชี้สถานะ Stage
45
- │ ├── findings.md # บันทึกบั๊ก/Audit ประจำงาน
46
- │ └── tickets/ # Tracer-bullet tickets ย่อย
47
- │
48
- ├── 50-history/ # [Shipped & Delivered Archives]
49
- │ ├── HISTORY.md # Release Ledger สรุปภาพรวมประวัติ
50
- │ ├── features/ # ฟีเจอร์ที่ส่งมอบแล้ว
51
- │ ├── fixes/ # บั๊กที่แก้แล้ว
52
- │ └── rollbacks/ # ฟีเจอร์ที่ถูก rollback
53
- │
54
- └── 60-docs/ # [Documentation & System Playbooks]
55
- └── playbooks/ # Interactive HTML Playbooks (5W1H)
56
- ```
57
-
58
- ---
59
-
60
- ## ⚡ 2. จุดเด่นของการใช้เลขทศวรรษ (Decade Convention: `00-`, `10-`, `20-`)
61
-
62
- 1. **ลำดับสายตาใน Editor สวยงาม**: เรียงตามลำดับความก้าวหน้าของโครงการ
63
- 2. **ขยาย Sub-stages ในอนาคตได้ง่าย (Future-Proof)**: สามารถสร้างโฟลเดอร์แทรก เช่น `21-prototype`, `22-diagrams` ได้โดยไม่ต้องแก้เลขนำหน้าของโฟลเดอร์อื่น
64
- 3. **ตัดโฟลเดอร์ Legacy ออก 100%**: ลบโฟลเดอร์ `devflow/runs/` ที่ไม่ได้ใช้งานตั้งแต่ v1.x ออกอย่างปลอดภัย
65
-
66
- ---
67
-
68
- ## 🚀 3. วิธีการ Migrate อัตโนมัติ
69
-
70
- ### 1) รันอัตโนมัติผ่านคำสั่ง `update` (แนะนำที่สุด):
71
- เมื่อโปรเจกต์ Client สั่งอัปเดตเวอร์ชัน DevFlow ด้วยคำสั่ง:
72
- ```bash
73
- npx nexus-devflow update
74
- ```
75
- ระบบจะตรวจจับโครงสร้างโฟลเดอร์อัตโนมัติ:
76
- * **หากยังเป็นโครงสร้างเดิม (Legacy)**: ระบบจะรันกระบวนการ `migrate-structure` ให้อัตโนมัติทันที พร้อมย้ายไฟล์เข้า `00-`, `10-`, `20-`, `30-`, `40-`, `50-`, `60-` และลบ `devflow/runs/`
77
- * **หากเป็นโครงสร้าง Decade-Numbered อยู่แล้ว**: ระบบจะไม่ทำอะไรกับโฟลเดอร์ (No-op) และดำเนินการอัปเดตโค้ดต่อไปอย่างปลอดภัย
78
-
79
- ### 2) สั่ง Migrate ด้วยตัวเองโดยตรง:
80
- หากต้องการย้ายโครงสร้างทันทีโดยไม่อัปเดตส่วนอื่น สามารถสั่งได้ผ่านคำสั่ง:
81
- ```bash
82
- npx nexus-devflow migrate-structure
83
- ```
84
-
85
-
86
- ---
87
-
88
- ## 🛡️ 4. การรองรับ Client เวอร์ชันเก่า (Zero-Breaking Compatibility)
89
-
90
- ระบบ DevFlow มีกลไก **Dynamic Workspace Path Resolver** (`resolveWorkspacePaths`) ที่จะ:
91
- 1. ตรวจสอบว่าโปรเจกต์ใช้โครงสร้าง Decade-Numbered หรือไม่ (มี `devflow/00-context` หรือไม่)
92
- 2. หากไม่พบ จะ **Fallback กลับไปหา Path เดิม (`devflow/context/`, `devflow/history/`) อัตโนมัติ 100%**
93
- 3. โปรเจกต์เก่าที่ยังไม่ได้ Migrate จึงยังคงรันคำสั่งสถานะ, ตรวจสอบคุณภาพ, และบิวด์ได้ตามปกติโดยไม่มีข้อผิดพลาด
File without changes