@edupia-tutor/spec-driven-docs 0.14.0 → 0.14.2
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/bin/index.js +12 -1
- package/commands/debug.md +436 -436
- package/commands/debug.tmpl +111 -111
- package/commands/define-product.md +350 -345
- package/commands/define-product.tmpl +69 -64
- package/commands/dev-gen-test.md +365 -365
- package/commands/dev-gen-test.tmpl +63 -63
- package/commands/dev-run-test.md +376 -376
- package/commands/dev-run-test.tmpl +74 -74
- package/commands/dev-smoke-test.md +341 -341
- package/commands/dev-smoke-test.tmpl +60 -60
- package/commands/fix-bug.md +403 -403
- package/commands/fix-bug.tmpl +78 -78
- package/commands/generate-bdd.md +513 -513
- package/commands/generate-bdd.tmpl +211 -211
- package/commands/generate-code.md +481 -483
- package/commands/generate-code.tmpl +179 -181
- package/commands/generate-design-spec.md +497 -497
- package/commands/generate-design-spec.tmpl +220 -220
- package/commands/generate-prd.md +452 -400
- package/commands/generate-prd.tmpl +50 -200
- package/commands/generate-spec-manifest.md +340 -340
- package/commands/generate-spec-manifest.tmpl +59 -59
- package/commands/generate-tech-docs.md +365 -365
- package/commands/generate-tech-docs.tmpl +84 -84
- package/commands/learn.md +347 -347
- package/commands/learn.tmpl +22 -22
- package/commands/map-testids.md +322 -322
- package/commands/map-testids.tmpl +41 -41
- package/commands/propose-scenario.md +335 -335
- package/commands/propose-scenario.tmpl +54 -54
- package/commands/qc-analyze.md +323 -324
- package/commands/qc-analyze.tmpl +42 -43
- package/commands/qc-design-test.md +304 -304
- package/commands/qc-design-test.tmpl +23 -23
- package/commands/qc-plan.md +297 -297
- package/commands/qc-plan.tmpl +16 -16
- package/commands/qc-report.md +302 -302
- package/commands/qc-report.tmpl +21 -21
- package/commands/qc-review.md +298 -298
- package/commands/qc-review.tmpl +17 -17
- package/commands/qc-run-test.md +337 -337
- package/commands/qc-run-test.tmpl +35 -35
- package/commands/refine-prd.md +428 -430
- package/commands/refine-prd.tmpl +62 -62
- package/commands/report-bug.md +351 -351
- package/commands/report-bug.tmpl +70 -70
- package/commands/review-code.md +364 -364
- package/commands/review-code.tmpl +39 -39
- package/commands/review-context.md +578 -580
- package/commands/review-context.tmpl +212 -212
- package/commands/review-tech-docs.md +427 -427
- package/commands/review-tech-docs.tmpl +146 -146
- package/commands/setup-ai-first.md +239 -239
- package/commands/setup-ai-first.tmpl +133 -133
- package/commands/sync.md +145 -145
- package/commands/sync.tmpl +93 -93
- package/commands/update-framework.md +88 -88
- package/commands/update-framework.tmpl +36 -36
- package/commands/validate-traces.md +381 -381
- package/commands/validate-traces.tmpl +100 -100
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +436 -436
- package/core/commands/define-product.md +350 -345
- package/core/commands/dev-gen-test.md +365 -365
- package/core/commands/dev-run-test.md +376 -376
- package/core/commands/dev-smoke-test.md +341 -341
- package/core/commands/fix-bug.md +403 -403
- package/core/commands/generate-bdd.md +513 -513
- package/core/commands/generate-code.md +481 -483
- package/core/commands/generate-design-spec.md +497 -497
- package/core/commands/generate-prd.md +452 -400
- package/core/commands/generate-spec-manifest.md +340 -340
- package/core/commands/generate-tech-docs.md +365 -365
- package/core/commands/learn.md +347 -347
- package/core/commands/map-testids.md +322 -322
- package/core/commands/propose-scenario.md +335 -335
- package/core/commands/qc-analyze.md +323 -324
- package/core/commands/qc-design-test.md +304 -304
- package/core/commands/qc-plan.md +297 -297
- package/core/commands/qc-report.md +302 -302
- package/core/commands/qc-review.md +298 -298
- package/core/commands/qc-run-test.md +337 -337
- package/core/commands/refine-prd.md +428 -430
- package/core/commands/report-bug.md +351 -351
- package/core/commands/review-code.md +364 -364
- package/core/commands/review-context.md +578 -580
- package/core/commands/review-tech-docs.md +427 -427
- package/core/commands/setup-ai-first.md +239 -239
- package/core/commands/sync.md +145 -145
- package/core/commands/update-framework.md +88 -88
- package/core/commands/validate-traces.md +381 -381
- package/core/skills/code/SKILL.md +389 -389
- package/core/skills/debug/SKILL.md +391 -391
- package/core/skills/design-spec/SKILL.md +318 -318
- package/core/skills/discovery/SKILL.md +7 -547
- package/core/skills/prd/SKILL.md +298 -394
- package/core/skills/setup-ai-first/SKILL.md +80 -80
- package/core/skills/spec/SKILL.md +178 -178
- package/core/skills/test/SKILL.md +604 -604
- package/core/steps/capture-lesson.md +44 -44
- package/core/steps/context-loader.md +175 -175
- package/core/steps/gate.md +54 -54
- package/core/steps/report-footer.md +52 -52
- package/core/steps/review-fanout.md +85 -87
- package/core/steps/spawn-agent.md +45 -45
- package/core/steps/trace-mirror.md +21 -21
- package/core/templates/architecture.template.md +37 -37
- package/core/templates/design-spec.template.md +77 -77
- package/core/templates/platform-guide.template.md +47 -47
- package/core/templates/prd.template.md +107 -232
- package/core/templates/product-definition.template.md +101 -88
- package/core/templates/project-context.yaml +2 -2
- package/docs/01-getting-started/core-concepts.md +1 -1
- package/docs/01-getting-started/quickstart.md +7 -7
- package/docs/02-guides/developer/bdd-and-trace.md +1 -1
- package/docs/02-guides/developer/scenarios.md +5 -5
- package/docs/02-guides/product-owner/handoff-checklist.md +1 -1
- package/docs/02-guides/product-owner/scenarios.md +23 -23
- package/docs/02-guides/tester/bug-reporting.md +2 -2
- package/docs/02-guides/tester/reading-specs.md +2 -2
- package/docs/02-guides/tester/scenarios.md +1 -1
- package/docs/02-guides/tester/spec-manifest.md +3 -3
- package/docs/02-guides/tester/workflow.md +1 -1
- package/docs/03-concepts/architecture.md +3 -3
- package/docs/03-concepts/pipeline.md +3 -3
- package/docs/04-operations/publishing.md +20 -3
- package/docs/04-operations/sync-and-update.md +5 -5
- package/docs/05-reference/command-cheatsheet.md +2 -2
- package/docs/05-reference/commands.md +8 -8
- package/package.json +1 -1
- package/scripts/migrate-specs.js +5 -3
- package/scripts/rename-prd-files.js +174 -0
- package/skills/code/SKILL.md +389 -389
- package/skills/code/SKILL.tmpl +56 -56
- package/skills/debug/SKILL.md +391 -391
- package/skills/debug/SKILL.tmpl +60 -60
- package/skills/design-spec/SKILL.md +318 -318
- package/skills/design-spec/SKILL.tmpl +37 -37
- package/skills/discovery/SKILL.md +7 -547
- package/skills/discovery/SKILL.tmpl +7 -140
- package/skills/prd/SKILL.md +298 -394
- package/skills/prd/SKILL.tmpl +40 -151
- package/skills/setup-ai-first/SKILL.md +80 -80
- package/skills/setup-ai-first/SKILL.tmpl +28 -28
- package/skills/spec/SKILL.md +178 -178
- package/skills/spec/SKILL.tmpl +20 -20
- package/skills/test/SKILL.md +604 -604
- package/skills/test/SKILL.tmpl +44 -44
- package/steps/capture-lesson.md +44 -44
- package/steps/context-loader.md +175 -175
- package/steps/gate.md +54 -54
- package/steps/report-footer.md +52 -52
- package/steps/review-fanout.md +85 -87
- package/steps/spawn-agent.md +45 -45
- package/steps/trace-mirror.md +21 -21
- package/templates/architecture.template.md +37 -37
- package/templates/design-spec.template.md +77 -77
- package/templates/platform-guide.template.md +47 -47
- package/templates/prd.template.md +107 -232
- package/templates/product-definition.template.md +101 -88
- package/templates/project-context.yaml +2 -2
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# /update-framework —
|
|
1
|
+
# /update-framework — Cập nhật Spec-Driven Docs Framework
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nâng cấp **framework tooling** (`.agent/commands/`, `steps/`, `modules/`, `hooks/`, `rules/`, `templates/`, `skills/`) lên version mới nhất publish trên npm.
|
|
4
4
|
|
|
5
|
-
> **
|
|
6
|
-
> - `/sync` →
|
|
7
|
-
> - `/update-framework` →
|
|
5
|
+
> **Không giống `/sync`.**
|
|
6
|
+
> - `/sync` → pull **nội dung dự án** (code/specs submodule) + làm mới Living Docs. Chạy hằng ngày.
|
|
7
|
+
> - `/update-framework` → nâng cấp **chính các file command của framework**. Chạy thỉnh thoảng, khi có version framework mới.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Lệnh này wrap `npx @edupia-tutor/spec-driven-docs@latest --init`. Cần network + npm access.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## Step 0 —
|
|
13
|
+
## Step 0 — Phát hiện trạng thái hiện tại
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
-
|
|
15
|
+
1. Đọc `.agent/FRAMEWORK_VERSION` → version đang cài.
|
|
16
|
+
- Nếu thiếu → dự án này không được cài qua `--init`. Dừng:
|
|
17
17
|
```
|
|
18
18
|
❌ .agent/FRAMEWORK_VERSION not found.
|
|
19
19
|
This project was not set up with the framework installer.
|
|
20
20
|
Run: npx @edupia-tutor/spec-driven-docs --init
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
2.
|
|
23
|
+
2. Đọc `.agent/project-context.yaml` → trích `setup.mode` (`umbrella` / vắng = single) và `services`.
|
|
24
24
|
|
|
25
|
-
3.
|
|
25
|
+
3. Liệt kê `.agent/modules/` → ghi tên các module đã cài (phải truyền lại khi nâng cấp để chúng cũng update).
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
In:
|
|
28
28
|
```
|
|
29
29
|
Current framework : v{current}
|
|
30
30
|
Mode : {umbrella | single-service}
|
|
@@ -33,28 +33,28 @@ Installed modules : {list or "none"}
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
## Step 1 —
|
|
36
|
+
## Step 1 — Kiểm tra version mới nhất
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Chạy:
|
|
39
39
|
```bash
|
|
40
40
|
npm view @edupia-tutor/spec-driven-docs version
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
So `current` vs `latest`:
|
|
44
44
|
|
|
45
|
-
|
|
|
45
|
+
| Kết quả | Hành động |
|
|
46
46
|
|--------|--------|
|
|
47
|
-
| Network/registry
|
|
48
|
-
| `current == latest` |
|
|
49
|
-
| `latest > current` |
|
|
47
|
+
| Network/registry không tới được | Cảnh báo `⚠️ Could not reach npm registry — check connection.` và dừng |
|
|
48
|
+
| `current == latest` | In `✅ Already up to date (v{current}). Nothing to do.` và dừng |
|
|
49
|
+
| `latest > current` | In `Update available: v{current} → v{latest}` và tiếp tục |
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Hỏi: `Proceed with upgrade? (Y/N)` — chờ `Y`.
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Step 2 — Umbrella Awareness *(umbrella mode
|
|
55
|
+
## Step 2 — Umbrella Awareness *(chỉ umbrella mode)*
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Nếu `setup.mode == umbrella`, in note này trước khi nâng cấp:
|
|
58
58
|
|
|
59
59
|
```
|
|
60
60
|
ℹ️ Umbrella mode — framework tooling lives ONLY at this umbrella root.
|
|
@@ -71,92 +71,92 @@ If `setup.mode == umbrella`, print this note before upgrading:
|
|
|
71
71
|
|
|
72
72
|
## Step 3 — Pre-flight Git Check
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Chạy `git status --short .agent/ .claude/commands/`.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Nếu có thay đổi chưa commit trong các path đó:
|
|
77
77
|
```
|
|
78
78
|
⚠️ Uncommitted changes in .agent/ or .claude/commands/.
|
|
79
79
|
The upgrade overwrites framework files. Commit or stash first so you can
|
|
80
80
|
cleanly review the upgrade diff:
|
|
81
81
|
git add .agent/ .claude/commands/ && git commit -m "wip" (or git stash)
|
|
82
82
|
```
|
|
83
|
-
|
|
83
|
+
Hỏi có tiếp tục không `(Y/N)`. Mặc định dừng.
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
-
## Step 4 —
|
|
87
|
+
## Step 4 — Chạy nâng cấp
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Dựng module flag từ Step 0 (một `--module {name}` cho mỗi module đã cài), rồi chạy:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
npx -y @edupia-tutor/spec-driven-docs@latest --init {--module X ...}
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Cái này **ghi đè** (làm mới về version mới):
|
|
96
96
|
- `.agent/commands/`, `.agent/steps/`, `.agent/hooks/`, `.agent/rules/`, `.agent/templates/`, `.agent/skills/`, `.agent/modules/{installed}/`
|
|
97
97
|
- `.agent/FRAMEWORK_VERSION`
|
|
98
98
|
- `.claude/commands/` shortcuts
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Cái này **KHÔNG đụng tới** (nội dung của bạn an toàn):
|
|
101
101
|
- `.agent/project-context.yaml`
|
|
102
102
|
- `CLAUDE.md`
|
|
103
103
|
- `specs/domain-knowledge/` (business-dictionary, core-entities)
|
|
104
104
|
- `.trace/`
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
Nếu lệnh npx exit khác 0 → in lỗi và dừng với `❌`.
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
110
|
## Step 5 — Review Changes
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
Chạy:
|
|
113
113
|
```bash
|
|
114
114
|
git diff --stat .agent/ .claude/commands/
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
- **New commands** — `.md`
|
|
119
|
-
- **Updated commands** —
|
|
120
|
-
- **Removed commands** —
|
|
117
|
+
Tóm tắt cho người dùng:
|
|
118
|
+
- **New commands** — file `.md` giờ có mà trước không
|
|
119
|
+
- **Updated commands** — file có nội dung thay đổi
|
|
120
|
+
- **Removed commands** — file bị xoá trong version mới
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
Nếu có command mới xuất hiện (vd một slash command mới), nêu rõ để user biết nó giờ đã có.
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
126
|
## Output
|
|
127
127
|
|
|
128
|
-
# Report Footer —
|
|
128
|
+
# Report Footer — Định dạng output chuẩn cho mọi lệnh
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
Mọi report của lệnh phải kết thúc bằng section footer chuẩn này.
|
|
131
131
|
|
|
132
132
|
## Status Badge
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
- `✅ Complete` —
|
|
136
|
-
- `❌ Failed` —
|
|
137
|
-
- `⚠️ Warnings` —
|
|
134
|
+
Chọn một theo kết quả:
|
|
135
|
+
- `✅ Complete` — mọi bước thành công, không có vấn đề
|
|
136
|
+
- `❌ Failed` — lệnh không hoàn thành được do lỗi chặn
|
|
137
|
+
- `⚠️ Warnings` — hoàn thành nhưng có vấn đề không chặn, nên review lại
|
|
138
138
|
|
|
139
139
|
## Output Artifacts
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
Liệt kê mọi file được tạo hoặc sửa bởi lệnh này:
|
|
142
142
|
```
|
|
143
143
|
Output Artifacts:
|
|
144
|
-
{created|updated} {file-path} ({
|
|
145
|
-
{created|updated} {file-path} ({
|
|
144
|
+
{created|updated} {file-path} ({mô tả ngắn})
|
|
145
|
+
{created|updated} {file-path} ({mô tả ngắn})
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
Nếu không ghi file nào (vd: lệnh review hoặc phân tích) → ghi `Output Artifacts: none (read-only)`.
|
|
149
149
|
|
|
150
150
|
## Pipeline Position
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
In một sơ đồ pipeline một dòng, đánh dấu phase của lệnh HIỆN TẠI bằng `◀ bạn ở đây`,
|
|
153
|
+
để người dùng luôn thấy lệnh này nằm ở đâu trong luồng end-to-end:
|
|
154
154
|
|
|
155
155
|
```
|
|
156
156
|
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
Tìm lệnh hiện tại trong bảng phase dưới đây và đánh dấu **phase của nó** trong sơ đồ trên:
|
|
160
160
|
|
|
161
161
|
| Phase | Commands |
|
|
162
162
|
|-------|----------|
|
|
@@ -170,61 +170,61 @@ Find the current command in this phase legend and mark **its** phase in the map
|
|
|
170
170
|
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
171
171
|
| Trace Audit | `/validate-traces` |
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
Với **lệnh review**, thêm vòng review 3 bước và đánh dấu bước hiện tại, vd:
|
|
174
174
|
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
175
175
|
|
|
176
|
-
**
|
|
177
|
-
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`)
|
|
178
|
-
**
|
|
176
|
+
**Lệnh xuyên suốt** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
177
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) nằm ngoài pipeline tuyến tính —
|
|
178
|
+
**bỏ hẳn dòng Pipeline** cho các lệnh này (đừng cố nhét chúng vào sơ đồ).
|
|
179
179
|
|
|
180
|
-
##
|
|
180
|
+
## Gợi ý lệnh tiếp theo
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
183
183
|
|
|
184
|
-
|
|
|
184
|
+
| Lệnh hiện tại | Gợi ý lệnh tiếp theo |
|
|
185
185
|
|-------------------------|-----------------------------------------------|
|
|
186
|
-
| /setup-ai-first | `/define-product`
|
|
186
|
+
| /setup-ai-first | `/define-product` để bắt đầu feature đầu tiên |
|
|
187
187
|
| /define-product | `/generate-prd {product-definition-file}` |
|
|
188
|
-
| /generate-prd | `/refine-prd {prd-file}`
|
|
189
|
-
| /refine-prd |
|
|
190
|
-
| /review-context (PRD) | FE/App: `/generate-design-spec {prd-file}` (
|
|
191
|
-
| /generate-design-spec | Designer review →
|
|
192
|
-
| /generate-bdd | `/review-context {feature-file}`
|
|
193
|
-
| /review-context (BDD) | `/generate-tech-docs {UC-ID}`
|
|
194
|
-
| /qc-analyze | `/qc-plan {UC-ID}` (
|
|
188
|
+
| /generate-prd | `/refine-prd {prd-file}` rồi `/review-context {prd-file}` |
|
|
189
|
+
| /refine-prd | Mở Review Board → cập nhật PRD → `/review-context {prd-file}` |
|
|
190
|
+
| /review-context (PRD) | FE/App: `/generate-design-spec {prd-file}` (rồi BDD sau khi sign-off); BE: `/generate-bdd {prd-file}` trực tiếp; sửa PRD nếu NEEDS_FIX |
|
|
191
|
+
| /generate-design-spec | Designer review → xác nhận link Figma → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
192
|
+
| /generate-bdd | `/review-context {feature-file}` để kiểm tra độ phủ |
|
|
193
|
+
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` nếu APPROVED; sinh lại nếu NEEDS_FIX |
|
|
194
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (xử lý các gap blocker 🔴 trước) |
|
|
195
195
|
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
196
|
-
| /qc-design-test | `/qc-review {UC-ID}` (test-case
|
|
197
|
-
| /qc-review (test-case) | `/qc-run-test {UC-ID}`
|
|
198
|
-
| /qc-run-test | `/qc-report {UC-ID}`
|
|
199
|
-
| /qc-review (script) | `/qc-report {UC-ID}`
|
|
200
|
-
| /qc-report | `/validate-traces {UC-ID}`
|
|
196
|
+
| /qc-design-test | `/qc-review {UC-ID}` (review test-case) |
|
|
197
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` nếu APPROVED; sửa TC nếu NEEDS_FIX |
|
|
198
|
+
| /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
|
|
199
|
+
| /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
|
|
200
|
+
| /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
|
|
201
201
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
202
|
-
| /review-tech-docs | `/generate-code {feature-file}`
|
|
203
|
-
| /generate-code |
|
|
202
|
+
| /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
|
|
203
|
+
| /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
|
|
204
204
|
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
205
205
|
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
206
|
-
| /dev-run-test (failing) | `/fix-bug {ticket-id}`
|
|
207
|
-
| /review-code | `/dev-smoke-test {UC-ID}`
|
|
208
|
-
| /dev-smoke-test |
|
|
209
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`;
|
|
210
|
-
| /fix-bug |
|
|
211
|
-
| /debug | `/fix-bug {ticket-id}`
|
|
212
|
-
| /report-bug |
|
|
213
|
-
| /propose-scenario |
|
|
214
|
-
| /learn |
|
|
215
|
-
| /sync | `/validate-traces`
|
|
216
|
-
| /update-framework | Review `git diff .agent/`, commit; `/sync`
|
|
217
|
-
|
|
218
|
-
|
|
206
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
|
|
207
|
+
| /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
|
|
208
|
+
| /dev-smoke-test | Tạo PR và link tới ticket |
|
|
209
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; tất cả OK → tạo PR |
|
|
210
|
+
| /fix-bug | Tạo PR và link tới ticket |
|
|
211
|
+
| /debug | `/fix-bug {ticket-id}` nếu cần sửa |
|
|
212
|
+
| /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
|
|
213
|
+
| /propose-scenario | Báo PO/Dev review proposal trong `feedback/bdd-proposals/` |
|
|
214
|
+
| /learn | Tiếp tục làm việc — lesson áp dụng ở lệnh kế tiếp |
|
|
215
|
+
| /sync | `/validate-traces` để xem độ phủ đầy đủ; xử lý mọi `📥 tester feedback` được nêu |
|
|
216
|
+
| /update-framework | Review `git diff .agent/`, commit; `/sync` để đồng bộ nội dung dự án |
|
|
217
|
+
|
|
218
|
+
Định dạng footer như sau:
|
|
219
219
|
```
|
|
220
220
|
---
|
|
221
221
|
Status : {badge}
|
|
222
|
-
{Output Artifacts
|
|
222
|
+
{khối Output Artifacts}
|
|
223
223
|
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
224
|
-
(review
|
|
225
|
-
Next : {
|
|
224
|
+
(lệnh review) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
225
|
+
Next : {lệnh gợi ý kèm ví dụ tham số}
|
|
226
226
|
```
|
|
227
|
-
*(
|
|
227
|
+
*(Bỏ dòng `Pipeline` cho các lệnh xuyên suốt liệt kê ở trên.)*
|
|
228
228
|
|
|
229
229
|
|
|
230
230
|
```
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# /update-framework —
|
|
1
|
+
# /update-framework — Cập nhật Spec-Driven Docs Framework
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nâng cấp **framework tooling** (`.agent/commands/`, `steps/`, `modules/`, `hooks/`, `rules/`, `templates/`, `skills/`) lên version mới nhất publish trên npm.
|
|
4
4
|
|
|
5
|
-
> **
|
|
6
|
-
> - `/sync` →
|
|
7
|
-
> - `/update-framework` →
|
|
5
|
+
> **Không giống `/sync`.**
|
|
6
|
+
> - `/sync` → pull **nội dung dự án** (code/specs submodule) + làm mới Living Docs. Chạy hằng ngày.
|
|
7
|
+
> - `/update-framework` → nâng cấp **chính các file command của framework**. Chạy thỉnh thoảng, khi có version framework mới.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Lệnh này wrap `npx @edupia-tutor/spec-driven-docs@latest --init`. Cần network + npm access.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## Step 0 —
|
|
13
|
+
## Step 0 — Phát hiện trạng thái hiện tại
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
-
|
|
15
|
+
1. Đọc `.agent/FRAMEWORK_VERSION` → version đang cài.
|
|
16
|
+
- Nếu thiếu → dự án này không được cài qua `--init`. Dừng:
|
|
17
17
|
```
|
|
18
18
|
❌ .agent/FRAMEWORK_VERSION not found.
|
|
19
19
|
This project was not set up with the framework installer.
|
|
20
20
|
Run: npx @edupia-tutor/spec-driven-docs --init
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
2.
|
|
23
|
+
2. Đọc `.agent/project-context.yaml` → trích `setup.mode` (`umbrella` / vắng = single) và `services`.
|
|
24
24
|
|
|
25
|
-
3.
|
|
25
|
+
3. Liệt kê `.agent/modules/` → ghi tên các module đã cài (phải truyền lại khi nâng cấp để chúng cũng update).
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
In:
|
|
28
28
|
```
|
|
29
29
|
Current framework : v{current}
|
|
30
30
|
Mode : {umbrella | single-service}
|
|
@@ -33,28 +33,28 @@ Installed modules : {list or "none"}
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
## Step 1 —
|
|
36
|
+
## Step 1 — Kiểm tra version mới nhất
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Chạy:
|
|
39
39
|
```bash
|
|
40
40
|
npm view @edupia-tutor/spec-driven-docs version
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
So `current` vs `latest`:
|
|
44
44
|
|
|
45
|
-
|
|
|
45
|
+
| Kết quả | Hành động |
|
|
46
46
|
|--------|--------|
|
|
47
|
-
| Network/registry
|
|
48
|
-
| `current == latest` |
|
|
49
|
-
| `latest > current` |
|
|
47
|
+
| Network/registry không tới được | Cảnh báo `⚠️ Could not reach npm registry — check connection.` và dừng |
|
|
48
|
+
| `current == latest` | In `✅ Already up to date (v{current}). Nothing to do.` và dừng |
|
|
49
|
+
| `latest > current` | In `Update available: v{current} → v{latest}` và tiếp tục |
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Hỏi: `Proceed with upgrade? (Y/N)` — chờ `Y`.
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Step 2 — Umbrella Awareness *(umbrella mode
|
|
55
|
+
## Step 2 — Umbrella Awareness *(chỉ umbrella mode)*
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Nếu `setup.mode == umbrella`, in note này trước khi nâng cấp:
|
|
58
58
|
|
|
59
59
|
```
|
|
60
60
|
ℹ️ Umbrella mode — framework tooling lives ONLY at this umbrella root.
|
|
@@ -71,55 +71,55 @@ If `setup.mode == umbrella`, print this note before upgrading:
|
|
|
71
71
|
|
|
72
72
|
## Step 3 — Pre-flight Git Check
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Chạy `git status --short .agent/ .claude/commands/`.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Nếu có thay đổi chưa commit trong các path đó:
|
|
77
77
|
```
|
|
78
78
|
⚠️ Uncommitted changes in .agent/ or .claude/commands/.
|
|
79
79
|
The upgrade overwrites framework files. Commit or stash first so you can
|
|
80
80
|
cleanly review the upgrade diff:
|
|
81
81
|
git add .agent/ .claude/commands/ && git commit -m "wip" (or git stash)
|
|
82
82
|
```
|
|
83
|
-
|
|
83
|
+
Hỏi có tiếp tục không `(Y/N)`. Mặc định dừng.
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
-
## Step 4 —
|
|
87
|
+
## Step 4 — Chạy nâng cấp
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Dựng module flag từ Step 0 (một `--module {name}` cho mỗi module đã cài), rồi chạy:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
npx -y @edupia-tutor/spec-driven-docs@latest --init {--module X ...}
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Cái này **ghi đè** (làm mới về version mới):
|
|
96
96
|
- `.agent/commands/`, `.agent/steps/`, `.agent/hooks/`, `.agent/rules/`, `.agent/templates/`, `.agent/skills/`, `.agent/modules/{installed}/`
|
|
97
97
|
- `.agent/FRAMEWORK_VERSION`
|
|
98
98
|
- `.claude/commands/` shortcuts
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Cái này **KHÔNG đụng tới** (nội dung của bạn an toàn):
|
|
101
101
|
- `.agent/project-context.yaml`
|
|
102
102
|
- `CLAUDE.md`
|
|
103
103
|
- `specs/domain-knowledge/` (business-dictionary, core-entities)
|
|
104
104
|
- `.trace/`
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
Nếu lệnh npx exit khác 0 → in lỗi và dừng với `❌`.
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
110
|
## Step 5 — Review Changes
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
Chạy:
|
|
113
113
|
```bash
|
|
114
114
|
git diff --stat .agent/ .claude/commands/
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
- **New commands** — `.md`
|
|
119
|
-
- **Updated commands** —
|
|
120
|
-
- **Removed commands** —
|
|
117
|
+
Tóm tắt cho người dùng:
|
|
118
|
+
- **New commands** — file `.md` giờ có mà trước không
|
|
119
|
+
- **Updated commands** — file có nội dung thay đổi
|
|
120
|
+
- **Removed commands** — file bị xoá trong version mới
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
Nếu có command mới xuất hiện (vd một slash command mới), nêu rõ để user biết nó giờ đã có.
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|