@educa-corp/sdd-framework 0.2.4 → 0.2.6

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 (152) hide show
  1. package/commands/generate-architecture.md +706 -0
  2. package/commands/generate-architecture.tmpl +194 -0
  3. package/commands/generate-code.md +35 -9
  4. package/commands/generate-code.tmpl +35 -9
  5. package/commands/generate-tech-docs.md +259 -246
  6. package/commands/generate-tech-docs.tmpl +21 -0
  7. package/core/FRAMEWORK_VERSION +1 -1
  8. package/core/commands/generate-architecture.md +706 -0
  9. package/core/commands/generate-code.md +35 -9
  10. package/core/commands/generate-tech-docs.md +259 -246
  11. package/core/skills/setup-ai-first/SKILL.md +12 -4
  12. package/core/templates/architecture.template.md +392 -111
  13. package/core/templates/tech-design.template.md +238 -246
  14. package/docs/01-getting-started/installation.md +47 -112
  15. package/docs/01-getting-started/quickstart.md +58 -72
  16. package/docs/01-getting-started/what-is-sdd.md +75 -0
  17. package/docs/02-concepts/architecture.md +109 -0
  18. package/docs/02-concepts/glossary.md +87 -0
  19. package/docs/02-concepts/overview.md +93 -0
  20. package/docs/02-concepts/pipeline-steps/00-setup.md +102 -0
  21. package/docs/02-concepts/pipeline-steps/01-discovery.md +129 -0
  22. package/docs/02-concepts/pipeline-steps/02-specification.md +130 -0
  23. package/docs/02-concepts/pipeline-steps/03-design-spec.md +90 -0
  24. package/docs/02-concepts/pipeline-steps/04-bdd.md +120 -0
  25. package/docs/02-concepts/pipeline-steps/05-tech-docs.md +101 -0
  26. package/docs/02-concepts/pipeline-steps/06-code.md +119 -0
  27. package/docs/02-concepts/pipeline-steps/07-dev-selftest.md +92 -0
  28. package/docs/02-concepts/pipeline-steps/08-qc-automation.md +102 -0
  29. package/docs/02-concepts/pipeline-steps/09-validate-traces.md +104 -0
  30. package/docs/02-concepts/pipeline-steps/10-feedback-loop.md +105 -0
  31. package/docs/02-concepts/pipeline-steps/README.md +92 -0
  32. package/docs/02-concepts/roles-and-hitl.md +73 -0
  33. package/docs/02-concepts/traceability.md +94 -0
  34. package/docs/03-guides/architect.md +98 -0
  35. package/docs/03-guides/developer.md +76 -0
  36. package/docs/03-guides/product-owner.md +68 -0
  37. package/docs/03-guides/tester-qa.md +70 -0
  38. package/docs/04-reference/commands.md +105 -0
  39. package/docs/04-reference/configuration.md +94 -0
  40. package/docs/04-reference/model-selection.md +68 -0
  41. package/docs/04-reference/modules.md +74 -0
  42. package/docs/04-reference/trace-schema.md +93 -0
  43. package/docs/README.md +29 -40
  44. package/docs/explain/00-setup-ai-first.md +77 -0
  45. package/docs/explain/00b-generate-architecture.md +76 -0
  46. package/docs/explain/01-define-product.md +79 -0
  47. package/docs/explain/02-generate-prd.md +78 -0
  48. package/docs/explain/03-refine-prd.md +86 -0
  49. package/docs/explain/04-review-context.md +100 -0
  50. package/docs/explain/05-generate-design-spec.md +73 -0
  51. package/docs/explain/06-generate-bdd.md +77 -0
  52. package/docs/explain/07-generate-tech-docs.md +71 -0
  53. package/docs/explain/08-review-tech-docs.md +79 -0
  54. package/docs/explain/09-generate-code.md +78 -0
  55. package/docs/explain/10-review-code.md +70 -0
  56. package/docs/explain/11-map-testids.md +69 -0
  57. package/docs/explain/12-dev-gen-test.md +66 -0
  58. package/docs/explain/13-dev-run-test.md +69 -0
  59. package/docs/explain/14-dev-smoke-test.md +67 -0
  60. package/docs/explain/15-qc-analyze.md +68 -0
  61. package/docs/explain/16-qc-plan.md +61 -0
  62. package/docs/explain/17-qc-design-test.md +61 -0
  63. package/docs/explain/18-qc-review.md +59 -0
  64. package/docs/explain/19-qc-run-test.md +67 -0
  65. package/docs/explain/20-qc-report.md +61 -0
  66. package/docs/explain/21-validate-traces.md +68 -0
  67. package/docs/explain/22-generate-spec-manifest.md +60 -0
  68. package/docs/explain/23-fix-bug.md +69 -0
  69. package/docs/explain/24-debug.md +61 -0
  70. package/docs/explain/25-report-bug.md +65 -0
  71. package/docs/explain/26-propose-scenario.md +63 -0
  72. package/docs/explain/27-learn.md +65 -0
  73. package/docs/explain/28-sync.md +70 -0
  74. package/docs/explain/29-update-framework.md +65 -0
  75. package/docs/explain/README.md +134 -0
  76. package/package.json +1 -1
  77. package/skills/setup-ai-first/SKILL.md +12 -4
  78. package/skills/setup-ai-first/SKILL.tmpl +12 -4
  79. package/templates/architecture.template.md +392 -111
  80. package/templates/tech-design.template.md +238 -246
  81. package/docs/01-getting-started/README.md +0 -19
  82. package/docs/01-getting-started/core-concepts.md +0 -102
  83. package/docs/02-guides/README.md +0 -26
  84. package/docs/02-guides/bdd-input-checklist.md +0 -68
  85. package/docs/02-guides/developer/README.md +0 -49
  86. package/docs/02-guides/developer/bdd-and-trace.md +0 -126
  87. package/docs/02-guides/developer/commands.md +0 -76
  88. package/docs/02-guides/developer/pr-checklist.md +0 -16
  89. package/docs/02-guides/developer/scenarios.md +0 -460
  90. package/docs/02-guides/developer/workflow.md +0 -121
  91. package/docs/02-guides/prd-input-checklist.md +0 -94
  92. package/docs/02-guides/product-owner/README.md +0 -81
  93. package/docs/02-guides/product-owner/commands.md +0 -30
  94. package/docs/02-guides/product-owner/handoff-checklist.md +0 -42
  95. package/docs/02-guides/product-owner/prd-writing-rules.md +0 -45
  96. package/docs/02-guides/product-owner/scenarios.md +0 -438
  97. package/docs/02-guides/tech-docs-input-checklist.md +0 -109
  98. package/docs/02-guides/tester/README.md +0 -75
  99. package/docs/02-guides/tester/bug-reporting.md +0 -117
  100. package/docs/02-guides/tester/qc-automation.md +0 -165
  101. package/docs/02-guides/tester/reading-specs.md +0 -79
  102. package/docs/02-guides/tester/scenarios.md +0 -186
  103. package/docs/02-guides/tester/spec-manifest.md +0 -130
  104. package/docs/02-guides/tester/test-checklist.md +0 -31
  105. package/docs/02-guides/tester/workflow.md +0 -77
  106. package/docs/03-concepts/README.md +0 -20
  107. package/docs/03-concepts/architecture.md +0 -248
  108. package/docs/03-concepts/mechanisms-explained.md +0 -124
  109. package/docs/03-concepts/pipeline.md +0 -278
  110. package/docs/03-concepts/traceability.md +0 -152
  111. package/docs/04-operations/README.md +0 -33
  112. package/docs/04-operations/bug-flow.md +0 -364
  113. package/docs/04-operations/publishing.md +0 -154
  114. package/docs/04-operations/sync-and-update.md +0 -522
  115. package/docs/05-reference/README.md +0 -34
  116. package/docs/05-reference/command-cheatsheet.md +0 -147
  117. package/docs/05-reference/commands.md +0 -234
  118. package/docs/05-reference/model-selection.md +0 -74
  119. package/docs/05-reference/modules.md +0 -110
  120. package/docs/05-reference/trace-schema.md +0 -154
  121. package/docs/06-commands/README.md +0 -75
  122. package/docs/06-commands/explain-debug.md +0 -32
  123. package/docs/06-commands/explain-define-product.md +0 -43
  124. package/docs/06-commands/explain-dev-gen-test.md +0 -28
  125. package/docs/06-commands/explain-dev-run-test.md +0 -24
  126. package/docs/06-commands/explain-dev-smoke-test.md +0 -25
  127. package/docs/06-commands/explain-fix-bug.md +0 -28
  128. package/docs/06-commands/explain-generate-bdd.md +0 -45
  129. package/docs/06-commands/explain-generate-code.md +0 -53
  130. package/docs/06-commands/explain-generate-design-spec.md +0 -54
  131. package/docs/06-commands/explain-generate-prd.md +0 -45
  132. package/docs/06-commands/explain-generate-spec-manifest.md +0 -20
  133. package/docs/06-commands/explain-generate-tech-docs.md +0 -56
  134. package/docs/06-commands/explain-learn.md +0 -21
  135. package/docs/06-commands/explain-map-testids.md +0 -28
  136. package/docs/06-commands/explain-propose-scenario.md +0 -24
  137. package/docs/06-commands/explain-qc-analyze.md +0 -22
  138. package/docs/06-commands/explain-qc-design-test.md +0 -20
  139. package/docs/06-commands/explain-qc-plan.md +0 -21
  140. package/docs/06-commands/explain-qc-report.md +0 -23
  141. package/docs/06-commands/explain-qc-review.md +0 -24
  142. package/docs/06-commands/explain-qc-run-test.md +0 -27
  143. package/docs/06-commands/explain-refine-prd.md +0 -51
  144. package/docs/06-commands/explain-report-bug.md +0 -24
  145. package/docs/06-commands/explain-review-code.md +0 -45
  146. package/docs/06-commands/explain-review-context.md +0 -68
  147. package/docs/06-commands/explain-review-tech-docs.md +0 -45
  148. package/docs/06-commands/explain-setup-ai-first.md +0 -25
  149. package/docs/06-commands/explain-sync.md +0 -24
  150. package/docs/06-commands/explain-update-framework.md +0 -22
  151. package/docs/06-commands/explain-validate-traces.md +0 -25
  152. package/docs/t-sample.md +0 -826
@@ -1,156 +1,91 @@
1
- [📚 Docs](../README.md) [Getting Started](README.md) Installation
1
+ [ What is SDD](what-is-sdd.md) · [Getting Started](../README.md) · [Next: Quick Start →](quickstart.md)
2
2
 
3
- # Installation
3
+ # Installation — Cài đặt & khởi tạo
4
4
 
5
- Cài đặt framework vào project (tùy chọn) VS Code extension.
5
+ > Yêu cầu: [Node.js](https://nodejs.org) (kiểm tra `node -v`) [Claude Code](https://claude.com/claude-code).
6
6
 
7
- ## Mục lục
8
-
9
- - [Prerequisites](#prerequisites)
10
- - [Cài framework](#cài-framework)
11
- - [Kiểm tra cài đặt](#kiểm-tra-cài-đặt)
12
- - [Upgrade](#upgrade)
13
- - [QC automation stack (tùy chọn)](#qc-automation-stack-tùy-chọn)
14
- - [VS Code extension (khuyến nghị)](#vs-code-extension-khuyến-nghị)
15
- - [Uninstall](#uninstall)
16
-
17
- ## Prerequisites
18
-
19
- | Tool | Version | Link |
20
- |------|---------|------|
21
- | Node.js | bất kỳ (check: `node -v`) | [nodejs.org](https://nodejs.org) |
22
- | Claude Code CLI | Latest | [claude.ai/code](https://claude.ai/code) |
23
- | VS Code | ≥ 1.85 | [code.visualstudio.com](https://code.visualstudio.com) |
24
- | Git | bất kỳ | |
25
-
26
- > Claude Code cần subscription (Claude Pro / Team / API key).
7
+ ---
27
8
 
28
- ## Cài framework
9
+ ## 1. Khởi tạo dự án (Init)
29
10
 
30
- Chạy từ **thư mục root của project**. Cách khuyến nghị là `--init` — cài framework vào `.agent/` (commit vào git, cả team dùng chung) và tạo shortcut trong `.claude/commands/`.
11
+ **Single-service** (một repo, một stack):
31
12
 
32
13
  ```bash
33
- # Single-service project:
34
14
  npx @educa-corp/sdd-framework --init --module java-spring
15
+ ```
16
+
17
+ **Multi-service monorepo** (nhiều service, nhiều stack):
35
18
 
36
- # Multi-service monorepo (cài vào từng subfolder trong 1 lệnh):
19
+ ```bash
37
20
  npx @educa-corp/sdd-framework --init \
38
21
  --services backend:java-spring,web-admin:react,app-mobile:flutter
39
22
  ```
40
23
 
41
- Kết quả:
42
- - `.agent/` — toàn bộ framework files (commit vào git, shared với team)
43
- - `.claude/commands/` — shortcut trỏ về `.agent/commands/`
44
- - `.agent/FRAMEWORK_VERSION` — tracking version để upgrade
24
+ **Umbrella** (nhiều service submodule + một spec repo dùng chung):
45
25
 
46
26
  ```bash
47
- git add .agent/ .claude/commands/
48
- git commit -m "chore: init spec-driven-docs"
27
+ npx @educa-corp/sdd-framework --init --umbrella
49
28
  ```
50
29
 
51
- > **Multi-repo / umbrella?** Xem hướng dẫn umbrella setup chi tiết trong [Operations › Sync & Update §4 Umbrella mode](../04-operations/sync-and-update.md#4-umbrella-mode--git-submodule).
30
+ Lệnh init sẽ:
31
+ 1. Copy framework vào `.agent/` (`commands|steps|rules|hooks|templates|skills|modules`).
32
+ 2. Deploy cấu hình Claude Code vào `.claude/`.
33
+ 3. Sinh `.agent/project-context.yaml` từ template (single/umbrella).
34
+ 4. Cài các **module stack** đã chọn.
35
+ 5. Tạo `CLAUDE.md` (root; thêm overlay theo service khi umbrella).
52
36
 
53
- ### Legacy install (global / per-project)
54
-
55
- ```bash
56
- npx @educa-corp/sdd-framework # global: ~/.claude/commands/
57
- npx @educa-corp/sdd-framework --project # project: ./.claude/commands/
58
- ```
37
+ ---
59
38
 
60
- ## Kiểm tra cài đặt
39
+ ## 2. Setup trong Claude Code
61
40
 
62
- Mở Claude Code tại project, `/` — bạn sẽ thấy các lệnh:
41
+ Mở dự án trong Claude Code rồi chạy:
63
42
 
64
43
  ```
65
44
  /setup-ai-first
66
- /define-product
67
- /generate-prd
68
- /generate-bdd
69
- ...
70
45
  ```
71
46
 
72
- > Không thấy lệnh? Chạy lại lệnh cài (global lưu tại `~/.claude/commands/`, trên Windows: `ls "$env:USERPROFILE\.claude\commands\"`).
73
-
74
- ## Upgrade
75
-
76
- Từ **trong Claude Code** (khuyến nghị — check version, xử lý umbrella mode, review diff):
47
+ Lệnh này dẫn qua setup một-lần: tạo thư mục, cài `CLAUDE.md`, verify môi trường, chọn mode & module. Xem chi tiết cơ chế ở [Pipeline › Setup](../02-concepts/pipeline-steps/00-setup.md).
77
48
 
78
- ```
79
- /update-framework
80
- ```
49
+ ---
81
50
 
82
- Hoặc từ terminal:
51
+ ## 3. Điền config (bắt buộc trước feature đầu tiên)
83
52
 
84
- ```bash
85
- bash scripts/upgrade.sh
86
- # hoặc:
87
- npx @educa-corp/sdd-framework@latest --init
88
- git diff .agent/ && git add .agent/ && git commit -m "chore: upgrade framework"
89
- ```
53
+ AI *follow* các file này — để trống thì nó *đoán*:
90
54
 
91
- > Chỉ upgrade framework command files. `project-context.yaml`, `CLAUDE.md`, domain-knowledge, và `.trace/` không bao giờ bị ghi đè. Để sync *content* của project (submodule code/specs) dùng `/sync`.
92
- >
93
- > ⚠️ **QC skills & upgrade:** `--init` / `upgrade.sh` ghi đè **toàn bộ** `.agent/` — **gồm cả** `.agent/skills/qc/`. Nếu QC chỉnh skills trực tiếp trong `.agent/skills/qc/`, các thay đổi đó **mất** khi upgrade. Để giữ an toàn, trỏ `paths.qc_skills_dir` ra một repo/submodule QC **ngoài** `.agent/` (vd `qc-base/.claude/skills`) upgrade không bao giờ chạm tới đó. Chi tiết: [../02-guides/tester/qc-automation.md#skill-sourcing--upgrade-safety](../02-guides/tester/qc-automation.md#skill-sourcing--upgrade-safety).
55
+ | File | Điền |
56
+ |------|---------|
57
+ | `CLAUDE.md` (root) | Luật chung dự án |
58
+ | `{service}/CLAUDE.md` (overlay) | §2 kiến trúc & thứ tự layer · §3 coding standards · §5 error handling |
59
+ | `.agent/project-context.yaml` | paths, mode, services, `conventions.build_command`, tech_stack |
60
+ | `specs/domain-knowledge/` | Business dictionary, entity catalog, tri thức miền |
94
61
 
95
- ## QC automation stack (tùy chọn)
62
+ Chi tiết: [Reference › Configuration](../04-reference/configuration.md).
96
63
 
97
- Bộ QC suite chính thức (`/qc-*`) là **native** trong framework. Hai lệnh cuối — `/qc-run-test` và `/qc-report` — dùng stack module **`qc-playwright`**, **độc lập với dev module**. Cài riêng:
64
+ ---
98
65
 
99
- ```bash
100
- # 1. Python 3 + pytest-playwright
101
- pip install pytest-playwright
66
+ ## 4. Bắt đầu feature đầu tiên
102
67
 
103
- # 2. Cài browsers
104
- python3 -m playwright install
105
68
  ```
106
-
107
- `qc-playwright` = Python + pytest-playwright + Page Object (output: Playwright Trace + pytest-html). Chi tiết pipeline: [../02-guides/tester/qc-automation.md](../02-guides/tester/qc-automation.md).
108
-
109
- ## VS Code extension (khuyến nghị)
110
-
111
- **Spec Driven Docs Tools** là VS Code extension với 2 panels. Không bắt buộc nhưng khuyến nghị. VS Code tự cập nhật khi có version mới.
112
-
113
- ```bash
114
- code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
69
+ /define-product
115
70
  ```
116
71
 
117
- Hoặc: `Ctrl+Shift+P` **"Extensions: Install from Marketplace"** → search **Spec Driven Docs Tools**.
118
-
119
- ### Panel 1 — Review Board
120
-
121
- Đọc `*-findings.yaml` từ `.agent/review/` — hỗ trợ findings từ mọi review command (`/refine-prd`, `/review-context`, `/review-tech-docs`).
72
+ Theo [Quick Start](quickstart.md).
122
73
 
123
- - Lens tabs: All / QA / DEV / SA / PO hoặc PRD / BDD / TECH.
124
- - Mỗi finding có badge `⚡ auto-fix` / `👤 human`.
125
- - 4 actions: Accept · Modify (có note) · Defer · Reject — kèm progress bar, full-text search.
126
- - **Smart Apply** spawn terminal chạy đúng lệnh `--resume`.
127
-
128
- Mở Review Board: sidebar panel (Activity Bar), hoặc right-click file `*-findings.yaml` → "Open Review Board", hoặc Command Palette. Nếu panel trống: file phải có đuôi `-findings.yaml`, nằm trong `.agent/review/`, và đóng hẳn rồi mở lại VS Code.
129
-
130
- ### Panel 2 — Living Documentation
131
-
132
- Đọc `.trace/*.tsv` — dashboard traceability health toàn project.
133
-
134
- - Stat cards: PRDs, Use Cases, Scenarios, Code Cov%, Test Cov%, Drift, Gap.
135
- - Drill-down: PRD → UC → per-scenario table (Spec ver, Gen ver, Code, Tests, `dev_selftest`, `qc_status`, Waiting on, Status). *Waiting on* = `qc_owner` + `qc_blocked_by` (chờ dev → `BUG-{id}` / chờ PO → `GAP-{id}`).
136
- - Status badges: ✅ OK · ⚠️ DRIFT · 🔴 GAP · — UNTRACKED. Filter + search + live reload.
137
-
138
- Mở: `Ctrl+Shift+P` → **"Spec Driven Docs Tools: Open Living Documentation"**. Mở được cả ở umbrella root lẫn trong một service submodule riêng lẻ. Nếu trống, chạy `/generate-bdd` cho ≥1 feature để tạo file `.trace/{UC-ID}-{platform}.tsv` đầu tiên.
74
+ ---
139
75
 
140
- > Report canonical sinh vào spec module tại `{spec_source}/.living-docs/` (gitignored); bản mirror cục bộ ở `./.trace`. Chi tiết traceability: [core-concepts.md](core-concepts.md) [../03-concepts/traceability.md](../03-concepts/traceability.md).
76
+ ## Nâng cấp & đồng bộ (Upgrade & Sync)
141
77
 
142
- ## Uninstall
78
+ | Lệnh | Việc | Ghi đè | KHÔNG đụng |
79
+ |------|------|--------|-----------|
80
+ | `/update-framework` | Sync bản npm mới | `.agent/commands\|steps\|hooks\|rules\|templates\|skills\|modules` | `CLAUDE.md`, `project-context.yaml`, `domain-knowledge/`, `.trace/` |
81
+ | `/sync` (umbrella) | Pull + init submodule + nổi feedback + Living Docs | — | — |
143
82
 
144
- **Mac/Linux:**
145
- ```bash
146
- rm -rf .agent/ .claude/commands/
147
- ```
83
+ Kiểm tra version mới nhất: `npm view @educa-corp/sdd-framework version`.
148
84
 
149
- **Windows (PowerShell):**
150
- ```powershell
151
- Remove-Item -Recurse -Force .agent, .claude\commands
152
- ```
85
+ > **Quy tắc edit (critical):** `.tmpl` + `steps/` là source of truth. Sửa framework artifact phải sửa `.tmpl`/`steps` rồi `node bin/build.js`. Sửa thẳng `.agent/commands/*.md` sẽ **mất** khi rebuild/update.
153
86
 
154
87
  ---
155
88
 
156
- Cài xong? [quickstart.md](quickstart.md) để chạy feature đầu tiên.
89
+ ## Đọc tiếp (Next)
90
+
91
+ ➡️ [Quick Start — feature đầu tiên end-to-end](quickstart.md)
@@ -1,86 +1,72 @@
1
- [📚 Docs](../README.md) [Getting Started](README.md) › Quick Start
2
-
3
- # Quick Start
4
-
5
- Chạy feature đầu tiên end-to-end theo happy path. Mở Claude Code tại root project làm theo thứ tự.
1
+ [ Installation](installation.md) · [Getting Started](../README.md)
2
+
3
+ # Quick Start — Feature đầu tiên end-to-end
4
+
5
+ > Golden path: từ ý tưởng tới code test & trace. Mỗi bước trang chi tiết trong [Pipeline Steps](../02-concepts/pipeline-steps/).
6
+
7
+ Giả định đã [cài đặt](installation.md) và điền `CLAUDE.md` + `domain-knowledge/`.
8
+
9
+ ---
10
+
11
+ ## Golden path (12 bước)
12
+
13
+ | # | Lệnh | Output | Ghi chú |
14
+ |---|------|--------|---------|
15
+ | 1 | `/define-product` | `product-definition/*.md` | Q&A 8 chặng, PO chốt từng chặng |
16
+ | 2 | `/generate-prd` | PRD draft | Thuần ngôn ngữ nghiệp vụ |
17
+ | 3 | `/refine-prd` | PRD refined | 3 lăng kính DEV/SA/PO → PO accept findings |
18
+ | 4 | `/review-context <PRD>` | findings P0–P5 | 🔒 sạch critical → PO đặt `Status: approved` |
19
+ | 5 | `/generate-design-spec` | `design-spec/` | **Chỉ FE/App** — bám Figma |
20
+ | 6 | `/generate-bdd` | `bdd/*.feature` | 🛑 UC outline; PRD lớn → sub-agent per-UC |
21
+ | 7 | `/review-context <feature>` | findings B1–B6 | Sạch critical → `@trace.status: approved` |
22
+ | 8 | `/generate-tech-docs` → `/review-tech-docs` | `tech-docs/*.md` | SA review + cổng ký T7 |
23
+ | 9 | `/generate-code` | code + `.trace/*.tsv` | 🛑 comprehension checkpoint + build verify |
24
+ | 10 | `/dev-gen-test` → `/dev-run-test` | dev smoke | Set `dev_selftest` |
25
+ | 11 | `/qc-analyze` … `/qc-report` | QC report + evidence | Set `qc_status` (Playwright) |
26
+ | 12 | `/validate-traces` | coverage matrix | spec ↔ code ↔ test |
27
+
28
+ ```mermaid
29
+ flowchart LR
30
+ A["1-4 · Idea → PRD approved"] --> B["5-7 · Design-Spec + BDD"]
31
+ B --> C["8 · Tech-Docs"] --> D["9 · Code"]
32
+ D --> E["10 · Dev smoke"] --> F["11 · QC"] --> G["12 · Validate"]
33
+ ```
6
34
 
7
- ## Mục lục
35
+ ---
8
36
 
9
- - [Bước 0 Setup project (một lần)](#bước-0--setup-project-một-lần)
10
- - [Happy-path command sequence](#happy-path-command-sequence)
11
- - [Bước tiếp theo](#bước-tiếp-theo)
37
+ ## Sửa spec hiện hữu (Drift handling)
12
38
 
13
- ## Bước 0 Setup project (một lần)
39
+ Khi PO sửa `.feature`/PRD (bump version):
14
40
 
15
- ```bash
16
- # 1. Cài framework (nếu chưa) xem installation.md
17
- npx @educa-corp/sdd-framework --init
41
+ 1. `/generate-code <feature>` — so `spec ↔ .trace/*.tsv`.
42
+ 2. Phân loại OK / DRIFT / UNTRACKED.
43
+ 3. 🛑 Comprehension checkpoint — *"{N} SC drifted/new. Proceed?"*.
44
+ 4. Regen phần lệch → cập nhật `.tsv`.
18
45
 
19
- # 2. Mở project trong Claude Code, tạo cấu trúc + config files:
20
- /setup-ai-first
21
- ```
46
+ ---
22
47
 
23
- `/setup-ai-first` tạo cấu trúc thư mục (`specs/`, `tech-docs/`, `.trace/`, `.agent/`, `CLAUDE.md`). Sau đó điền thông tin thực tế vào 4 file config:
48
+ ## Bug fix
24
49
 
25
- | File | Nội dung |
26
- |------|----------|
27
- | `CLAUDE.md` | Architecture layers, coding standards, git conventions |
28
- | `.agent/project-context.yaml` | Tech stack, services, paths, ticket prefix |
29
- | `specs/domain-knowledge/business-dictionary.md` | Canonical terms, banned terms |
30
- | `specs/domain-knowledge/core-entities.md` | Entity glossary (fields, relationships) |
50
+ `/fix-bug {TICKET}` đọc bug spec-anchored → tạo branch `fix/{TICKET}-<slug>` → root cause → sửa (tag `@trace.fixes`) → regression test + build verify → commit sau khi duyệt.
31
51
 
32
- > Project đã có sẵn `specs/`, `CLAUDE.md`, `.agent/project-context.yaml`? Bỏ qua bước này, vào thẳng happy path bên dưới. Chi tiết điền config + Figma setup: xem [../02-guides](../02-guides) và [../03-concepts](../03-concepts).
52
+ ---
33
53
 
34
- ## Happy-path command sequence
54
+ ## Nếu AI ra output sai (Troubleshooting)
35
55
 
36
- Discovery PRD BDD → Tech Design → Code → Dev self-check:
37
-
38
- ```
39
- # PHASE 1 — DISCOVERY
40
- /define-product
41
- → specs/product-definition/{slug}.md
42
-
43
- # PHASE 2 — PRD
44
- /generate-prd specs/product-definition/{slug}.md
45
- → specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md
46
- /refine-prd specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md # AI suggestions → Review Board
47
- /refine-prd --resume specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md # apply + bump version
48
- /review-context specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md # quality gate (P0–P5)
49
- /review-context --resume specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md
50
- → ✅ 0 critical → PO đặt | **Status** | approved | trong Metadata → tiếp Phase 3
51
-
52
- # PHASE 3 — SPEC & DESIGN
53
- # (FE/App only) /generate-design-spec specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md → designer + PO sign-off
54
- /generate-bdd specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md
55
- → specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature
56
- /review-context specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature
57
- /review-context --resume specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature # apply + bump bdd_version + reset @trace.status draft
58
- → ✅ 0 critical → đặt # @trace.status: approved trong .feature → tiếp Tech Design
59
- /generate-tech-docs specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature
60
- → specs/{domain}/{prd-slug}/tech-docs/{TICKET-ID}-tech-design.md (1 doc full-stack/PRD)
61
- /review-tech-docs specs/{domain}/{prd-slug}/tech-docs/{TICKET-ID}-tech-design.md
62
- /review-tech-docs --resume specs/{domain}/{prd-slug}/tech-docs/{TICKET-ID}-tech-design.md
63
-
64
- # PHASE 4 — CODE
65
- /generate-code specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature
66
- → src/... (@trace.implements tags)
67
- /review-code # fix CRITICAL / MAJOR
68
-
69
- # PHASE 5 — DEV SELF-CHECK (dev verify code của mình — KHÔNG phải QC suite chính thức)
70
- /dev-gen-test specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature
71
- → src/test/... (@trace.verifies tags)
72
- /dev-run-test # sets dev_selftest in trace
73
- /dev-smoke-test # optional — live endpoint check
74
- /validate-traces {domain} # coverage & drift
75
- ```
56
+ 95% nguyên nhân **context**:
76
57
 
77
- Mỗi review command ghi findings vào `.agent/review/*-findings.yaml`. Mở **Review Board** (VS Code panel) → Accept / Modify / Defer / Reject từng finding → chạy `--resume` để apply. Quick-fix không qua Review Board: `/review-context --fix {file}` (chỉ apply auto-fixable).
58
+ | Triệu chứng | Kiểm tra |
59
+ |-------------|----------|
60
+ | Sinh code sai entity field | Entity catalog có load + filter đúng domain? |
61
+ | Sai naming/convention | `CLAUDE.md` (root+overlay) có ở cuối context? |
62
+ | Bỏ qua rule X | Rule X có trong `required[]`? |
63
+ | Sinh sai stack (umbrella) | Service overlay `CLAUDE.md` được nạp? |
64
+ | Output khác nhau mỗi lần | Có tool ad-hoc đọc file? Phải qua context-loader |
78
65
 
79
- > **FE/App:** `/generate-code --phase=ui` (UI + mock adapter, tester test ngay) rồi `--phase=integration` (wire API thật sau sign-off).
66
+ ---
80
67
 
81
- ## Bước tiếp theo
68
+ ## Đọc tiếp (Next)
82
69
 
83
- - Hiểu khái niệm phía sau pipeline → [core-concepts.md](core-concepts.md).
84
- - QC suite chính thức (`/qc-analyze/qc-plan → /qc-design-test → /qc-review → /qc-run-test → /qc-report`) → [../02-guides/tester/qc-automation.md](../02-guides/tester/qc-automation.md).
85
- - Role guides, scenarios thực tế, multi-repo/umbrella → [../02-guides](../02-guides) [../03-concepts](../03-concepts).
86
- - Full command reference → [../05-reference](../05-reference).
70
+ - Hiểu từng bước sâu hơn → [Pipeline Steps](../02-concepts/pipeline-steps/)
71
+ - Theo vai trò của bạn → [Guides](../03-guides/)
72
+ - Tra cứu lệnh → [Reference Commands](../04-reference/commands.md)
@@ -0,0 +1,75 @@
1
+ [← Docs Home](../README.md) · [Next: Installation →](installation.md)
2
+
3
+ # What is SDD — Framework là gì? (5 phút)
4
+
5
+ > **SDD Framework** (`@educa-corp/sdd-framework`) là một **spec-driven development framework** đóng vai trò **đường ray** điều phối AI agent (Claude Code) đi từ **ý tưởng sản phẩm → PRD → Design-Spec → BDD → Tech-Docs → Code → Dev self-test → QC**, theo một **pipeline một chiều, có gate kiểm soát chất lượng và truy vết đầy đủ**.
6
+
7
+ ---
8
+
9
+ ## Khác gì với "dùng AI để code"?
10
+
11
+ Dùng AI tự do (mở chat, gõ prompt, copy-paste) → AI suy diễn theo trực giác, output không bám requirement, sửa code làm spec lệch, lần sau AI hiểu sai. Framework này **áp đặt cấu trúc**:
12
+
13
+ | | Dùng AI tự do | SDD Framework |
14
+ |---|---|---|
15
+ | **Nguồn chân lý** | Code (và trí nhớ vài senior) | **Spec** (PRD + BDD) — code là *hệ quả* |
16
+ | **Truy vết** | Không | Mọi dòng code link `@trace` về scenario |
17
+ | **Kiểm soát chất lượng** | Tuỳ người | **Gate bằng findings + approval** trước downstream |
18
+ | **Điểm dừng con người** | Ngẫu nhiên | **HITL có chủ đích** — dày ở spec, mỏng ở code |
19
+ | **Đổi requirement** | Đập đi làm lại | **Drift per-UC** — chỉ regen phần lệch |
20
+ | **Trí nhớ dự án** | Trong đầu người | `/learn` + `domain-knowledge/` |
21
+
22
+ ---
23
+
24
+ ## Vấn đề framework giải quyết
25
+
26
+ | Vấn đề | Cách giải |
27
+ |--------|-----------|
28
+ | AI viết lung tung, không bám requirement | Spec là **anchor cứng**; code link `@trace.source` về scenario |
29
+ | Sửa code → spec lệch → AI hiểu sai lần sau | **Spec là single source of truth**; code không lưu version riêng |
30
+ | Sửa spec → không biết code nào cần regen | **Trace state `.tsv` per-UC** → phát hiện OK/GAP/DRIFT/UNTRACKED |
31
+ | PRD/BDD kém → code rác hàng loạt | **Quality gate** (`/review-context`) phải sạch critical + PO approve |
32
+ | Lỗi/định hướng sai lặp lại | **`/learn`** ghi lesson, nạp lại vào context |
33
+ | Đổi tech stack → viết lại workflow | **Module overlay** — skill đọc `stack-profile.yaml`, không hardcode |
34
+ | Nhiều team, một nguồn spec | **Umbrella** — spec repo dùng chung + `/sync` |
35
+
36
+ ---
37
+
38
+ ## Triết lý cốt lõi (Core Philosophy)
39
+
40
+ > **Viết spec trước. Sinh code từ spec. Truy vết mọi thứ.**
41
+ > *(Write the spec first. Generate the code from the spec. Trace everything.)*
42
+
43
+ - **Con người định nghĩa *cái gì*** — acceptance criteria, business rule, yêu cầu nền tảng.
44
+ - **AI sinh ra *như thế nào*** — BDD, tech design, code, test — thích ứng theo platform.
45
+ - **Mỗi artifact được review** trước khi sang phase sau.
46
+ - **Mỗi dòng code truy vết** về một scenario trong `.feature`.
47
+ - **Đa service**: mỗi service tiến hoá độc lập nhưng chung một workflow.
48
+
49
+ ---
50
+
51
+ ## Ba "trái tim" của hệ thống
52
+
53
+ Bỏ một trong ba là hỏng:
54
+
55
+ 1. **HITL (điểm dừng con người)** — sai ở thượng nguồn nhân lên cấp số nhân. Bỏ = "tàu lao xuống vực".
56
+ 2. **Traceability (truy vết)** — biết mỗi dòng code thuộc scenario nào. Bỏ = "lạc rừng".
57
+ 3. **Context-loader (nạp đúng context)** — AI nhận đúng-đủ-gọn thông tin. Bỏ = "lái tàu trong sương mù".
58
+
59
+ ---
60
+
61
+ ## Framework KHÔNG giải quyết (Scope boundary)
62
+
63
+ - Không thay **product judgment** (PO quyết cái gì đáng làm).
64
+ - Không thay **architecture judgment** (SA quyết trade-off).
65
+ - Không **debug runtime production**, không **CI/CD deploy**.
66
+ - Không **ràng buộc AI model cứng** — chỉ khuyến nghị (model check mềm).
67
+
68
+ ---
69
+
70
+ ## Đọc tiếp (Next)
71
+
72
+ - [Installation](installation.md) — cài đặt & khởi tạo dự án
73
+ - [Quick Start](quickstart.md) — feature đầu tiên end-to-end
74
+ - [Concepts › Overview](../02-concepts/overview.md) — mô hình toàn trình chi tiết
75
+ - [Glossary](../02-concepts/glossary.md) — thuật ngữ
@@ -0,0 +1,109 @@
1
+ [← Traceability](traceability.md) · [Concepts](./) · [Pipeline Steps →](pipeline-steps/)
2
+
3
+ # Architecture — Kiến trúc kỹ thuật (Internals)
4
+
5
+ > Cách framework được tổ chức bên trong: 3 lớp, context-loader, template pipeline, module, hook. Đủ để hiểu *tại sao* framework hành xử như vậy.
6
+
7
+ ---
8
+
9
+ ## Mô hình 3 lớp (3-layer)
10
+
11
+ ```
12
+ Command (orchestrator) commands/*.md ← build từ .tmpl
13
+ ├── Skill skills/{discovery,prd,spec,design-spec,code,test,qc,debug,setup-ai-first}
14
+ └── Step steps/*.md
15
+ ```
16
+
17
+ | Lớp | Là gì | Ví dụ |
18
+ |-----|-------|-------|
19
+ | **Command** | Điều phối các phase của một workflow | `/generate-prd`, `/generate-code` |
20
+ | **Skill** | Domain logic, **stateless**, chỉ consume context | write-prd, write-bdd |
21
+ | **Step** | Infra tái dùng | `context-loader`, `gate`, `spawn-agent`, `review-fanout`, `business-language`, `capture-lesson`, `trace-mirror`, `report-footer` |
22
+
23
+ **Tại sao tách:** đổi pipeline không đụng skill; tái dùng skill không kéo infra; đổi infra không đụng domain. **Skill không gọi Step** — orchestrator ghép cả hai.
24
+
25
+ ---
26
+
27
+ ## Phase chuẩn của một Command
28
+
29
+ | Phase | Tên | Trách nhiệm |
30
+ |-------|-----|-------------|
31
+ | 0 | **Gate** | Validate input, model check mềm, service routing, nạp CLAUDE.md phân tầng |
32
+ | 1 | **Context** | `context-loader` nạp file theo thứ tự ưu tiên |
33
+ | 2 | **Execute** | Gọi skill — sinh artifact |
34
+ | 3 | **Reflect** | (review workflow) fan-out + completeness-critic |
35
+ | 4 | **Finalize** | Doc-sync, cập nhật trace, version bump |
36
+ | 5 | **Verify & Report** | Build verify (≤3 retry), report, gợi ý workflow kế |
37
+ | 6 | **Commit** | Commit theo convention (sau khi user duyệt) |
38
+
39
+ > Workflow read-only (`/review-*`, `/validate-traces`, `/debug`) bỏ qua Execute-write / Verify / Commit.
40
+
41
+ ---
42
+
43
+ ## Context-loader — "trái tim" của framework
44
+
45
+ Spec-driven thành/bại phụ thuộc **~80%** vào việc context được nạp **đúng — đủ — gọn — theo thứ tự**. Skill **không tự đọc file**; nó nhận một bundle đã sắp xếp từ `context-loader`.
46
+
47
+ **Lost-in-the-Middle** — LLM recall **đầu** và **cuối** tốt hơn **giữa**:
48
+
49
+ | Vị trí | Nội dung | Ý |
50
+ |--------|----------|---|
51
+ | **ĐẦU** | Input file (`.feature`/PRD), core entities (filtered), tech-doc section | "Build cái gì" |
52
+ | **GIỮA** | project-context, rules, business dictionary, domain knowledge, lessons | Constraints |
53
+ | **CUỐI** | CLAUDE.md (kiến trúc + coding standards), design-spec/UI | "Follow style này" |
54
+
55
+ **Nguyên tắc quản lý size:** Required vs Optional rõ ràng (thiếu Required → halt) · filter theo domain/scope · trim section không load file thô · service overlay (umbrella) · budget có ngưỡng · lazy-load qua subagent.
56
+
57
+ > Kim chỉ nam khi AI ra output lạ (sai pattern, lẫn UC khác, quên rule): **95% nguyên nhân ở context** — xem [Quick Start › Troubleshooting](../01-getting-started/quickstart.md#nếu-ai-ra-output-sai-troubleshooting).
58
+
59
+ ---
60
+
61
+ ## Template Pipeline
62
+
63
+ ```
64
+ .tmpl (source) + steps/*.md --[node bin/build.js, {{include:...}}]--> commands/*.md + core/
65
+
66
+
67
+ .agent/commands/*.md (runtime)
68
+ ```
69
+
70
+ - Cơ chế `{{include:steps/...}}` ghép phẳng → single source of truth ở `.tmpl` + `steps/`.
71
+ - **Không sửa tay** `commands/*.md` / `.agent/` — sửa `.tmpl`/`steps` rồi `node bin/build.js`. *(Quy ước + memory bảo vệ, không phải hook.)*
72
+
73
+ ---
74
+
75
+ ## Configuration (2 file)
76
+
77
+ | File | Vai trò |
78
+ |------|---------|
79
+ | `.agent/project-context.yaml` | Runtime config — paths, mode (single/umbrella), services, conventions, tech_stack |
80
+ | `CLAUDE.md` | root (luật chung) + `{service}/CLAUDE.md` overlay (kiến trúc + coding standards theo stack) |
81
+
82
+ → [Reference › Configuration](../04-reference/configuration.md).
83
+
84
+ ---
85
+
86
+ ## Module System
87
+
88
+ Module = overlay tuỳ chọn mở rộng base. Mỗi module khai báo `module.yaml` + **`stack-profile.yaml`** (`artifact_types[]`, `generation_layers[]`, `build_verify`, `test_types{}`). Skill **đọc profile** thay vì hardcode → đổi stack chỉ cần thêm module.
89
+
90
+ → Danh sách 15 module: [Reference › Modules](../04-reference/modules.md).
91
+
92
+ ---
93
+
94
+ ## Hook System
95
+
96
+ Bản hiện tại có **một hook**:
97
+
98
+ | Event | Hook | Mục đích |
99
+ |-------|------|----------|
100
+ | PreToolUse (Read/Write/Edit/Bash) | `data-guard.js` | Chặn đọc/ghi/execute file nhạy cảm (secret, private key, `.env`) — exit 2 = hard block |
101
+
102
+ Bổ trợ bằng **rules** nạp vào context (`rules/data-protection.md`, `rules/workflow.md`), không phải hook.
103
+
104
+ ---
105
+
106
+ ## Đọc tiếp (Next)
107
+
108
+ - [Pipeline Steps](pipeline-steps/) — từng bước dùng các cơ chế này
109
+ - [Reference](../04-reference/) — schema, module, config chi tiết
@@ -0,0 +1,87 @@
1
+ [← Overview](overview.md) · [Concepts](./) · [Roles & HITL →](roles-and-hitl.md)
2
+
3
+ # Glossary — Thuật ngữ (Terminology)
4
+
5
+ > Định nghĩa ngắn gọn các thuật ngữ dùng xuyên suốt framework. Sắp theo nhóm.
6
+
7
+ ---
8
+
9
+ ## Artifact (Sản phẩm của pipeline)
10
+
11
+ | Thuật ngữ | Nghĩa |
12
+ |-----------|-------|
13
+ | **Product Definition** | Khung intent 8 chặng từ `/define-product` — *chưa phải PRD* |
14
+ | **PRD** (Product Requirements Document) | Đặc tả nghiệp vụ: Metadata · AC · UC · BR · Wireframe · Change Log |
15
+ | **Design-Spec** | Đặc tả visual bám Figma (chỉ FE/App), 2 tầng ngôn ngữ |
16
+ | **BDD** (`.feature`) | Kịch bản hành vi viết bằng Gherkin, mang `@trace.*` |
17
+ | **Tech-Docs / Tech-Design** | Thiết kế kỹ thuật full-stack: API contract, entity, data, dependency |
18
+ | **Living Docs** | Tài liệu tự cập nhật qua `/sync` (umbrella) |
19
+
20
+ ---
21
+
22
+ ## Đơn vị nghiệp vụ (Business units)
23
+
24
+ | Thuật ngữ | Nghĩa |
25
+ |-----------|-------|
26
+ | **UC** (Use Case) | Một tính năng/luồng nghiệp vụ; đơn vị phân rã chính |
27
+ | **SC** (Scenario) | Một kịch bản hành vi kiểm chứng được, thuộc một UC |
28
+ | **BR** (Business Rule) | Ràng buộc nghiệp vụ (vd: link hết hạn 15 phút) |
29
+ | **BL** (Business Logic) | Cơ chế nghiệp vụ, cùng ngăn altitude với BR |
30
+ | **AC** (Acceptance Criteria) | Tiêu chí nghiệm thu — "thế nào là làm xong đúng" |
31
+ | **Altitude** | 4 ngăn không lộn: AC (nghiệm thu) · BR/BL (cơ chế) · Scope (ranh giới) · Dictionary (định nghĩa) |
32
+
33
+ ---
34
+
35
+ ## Traceability
36
+
37
+ | Thuật ngữ | Nghĩa |
38
+ |-----------|-------|
39
+ | **@trace.\*** | Tag metadata gắn artifact về nguồn (id/scenario/source/business_rules…) |
40
+ | **Boundary-only tagging** | Chỉ tag `@trace` ở boundary (controller/handler); shared code dò qua import chain |
41
+ | **`.tsv` (trace state)** | Sổ trạng thái per-UC×platform: `.trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv` |
42
+ | **Drift** | Spec đổi sau khi sinh code (`spec_ver != gen_ver`) → cần regen |
43
+ | **Coverage status** | UNTRACKED · GAP · DRIFT · OK (xem [Traceability](traceability.md)) |
44
+ | **`dev_selftest`** | Kết quả smoke của **dev** (cột `.tsv`) |
45
+ | **`qc_status`** | Kết quả QC **chính thức** (Playwright, có evidence) — độc lập `dev_selftest` |
46
+
47
+ ---
48
+
49
+ ## Kiểm soát & quy trình (Control)
50
+
51
+ | Thuật ngữ | Nghĩa |
52
+ |-----------|-------|
53
+ | **HITL** (Human-in-the-Loop) | Điểm dừng để con người duyệt — dày ở thượng nguồn |
54
+ | **Checkpoint** (🛑) | Điểm AI dừng, trình output, chờ `Y` |
55
+ | **Gate** (🔒) | Trạng thái (`Status`/`@trace.status`) do người đặt, chặn downstream tới khi `approved` |
56
+ | **Findings** | Danh sách lỗi có mã: PRD **P0–P5**, BDD **B1–B6**; sạch *critical* mới qua |
57
+ | **Comprehension checkpoint** | AI báo "{X} new, {Y} drifted — Proceed?" trước khi sinh code |
58
+ | **Model check** | Gate mềm khuyến nghị model Opus (Y/S/N) |
59
+ | **Business Language Guard** | Chặn thuật ngữ kỹ thuật lọt vào PRD/BDD |
60
+ | **Scope Lock** | Cấm implement/xoá UC khác trong file dùng chung |
61
+ | **Completeness-critic** | Vòng critic "đã đủ chưa / có lộn tầng không" sau fan-out |
62
+ | **Fan-out** | Spawn mỗi UC/dimension một sub-agent chạy song song |
63
+
64
+ ---
65
+
66
+ ## Kiến trúc & vận hành (Architecture & Ops)
67
+
68
+ | Thuật ngữ | Nghĩa |
69
+ |-----------|-------|
70
+ | **Command / Skill / Step** | 3 lớp: orchestrator / domain logic / infra |
71
+ | **context-loader** | "Thủ thư" chọn đúng-đủ-gọn context cho mỗi workflow |
72
+ | **Module** | Overlay theo stack (java-spring, react, qc-playwright…), khai báo `stack-profile.yaml` |
73
+ | **`project-context.yaml`** | Config runtime: paths, mode, services, conventions, tech_stack |
74
+ | **`CLAUDE.md`** | Instruction cho agent: root (chung) + service overlay (stack) |
75
+ | **Domain** | Nhóm nghiệp vụ; segment đầu trong `specs/{domain}/…` |
76
+ | **prd-slug** | Tên folder feature-package (segment sau `{domain}`) |
77
+ | **Single vs Umbrella** | Một repo · vs · nhiều service submodule + spec repo dùng chung (`spec_source`) |
78
+ | **T7 sign-off** | Cổng ký liên team cho contract cross-service |
79
+ | **`/learn` lesson** | Guardrail ghi vào `project-lessons.md`, nạp lại vào context |
80
+ | **data-guard** | Hook chặn đọc/ghi file nhạy cảm (secret/.env) |
81
+
82
+ ---
83
+
84
+ ## Đọc tiếp (Next)
85
+
86
+ - [Roles & HITL](roles-and-hitl.md) · [Traceability](traceability.md) · [Architecture](architecture.md)
87
+ - [Pipeline Steps](pipeline-steps/) — thuật ngữ trong ngữ cảnh