@educa-corp/sdd-framework 0.3.0 → 0.4.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/build.js +9 -0
- package/bin/index.js +115 -4
- package/bin/self-check.js +236 -0
- package/bin/trace-schema.json +692 -0
- package/commands/debug.md +82 -17
- package/commands/define-product.md +82 -17
- package/commands/dev-gen-test.md +82 -17
- package/commands/dev-run-test.md +84 -18
- package/commands/dev-run-test.tmpl +2 -1
- package/commands/dev-smoke-test.md +82 -17
- package/commands/fix-bug.md +137 -20
- package/commands/fix-bug.tmpl +29 -3
- package/commands/generate-architecture.md +82 -17
- package/commands/generate-bdd.md +187 -44
- package/commands/generate-bdd.tmpl +92 -17
- package/commands/generate-code.md +115 -20
- package/commands/generate-code.tmpl +33 -3
- package/commands/generate-design-spec.md +82 -17
- package/commands/generate-prd.md +82 -17
- package/commands/generate-spec-manifest.md +82 -17
- package/commands/generate-tech-docs.md +85 -20
- package/commands/generate-tech-docs.tmpl +2 -2
- package/commands/learn.md +82 -17
- package/commands/map-testids.md +82 -17
- package/commands/propose-scenario.md +102 -19
- package/commands/propose-scenario.tmpl +20 -2
- package/commands/qc-analyze.md +82 -17
- package/commands/qc-design-test.md +82 -17
- package/commands/qc-plan.md +82 -17
- package/commands/qc-report.md +82 -17
- package/commands/qc-review.md +82 -17
- package/commands/qc-run-test.md +104 -19
- package/commands/qc-run-test.tmpl +22 -2
- package/commands/refine-prd.md +82 -17
- package/commands/report-bug.md +82 -17
- package/commands/review-code.md +122 -19
- package/commands/review-code.tmpl +40 -2
- package/commands/review-context.md +124 -21
- package/commands/review-context.tmpl +42 -4
- package/commands/review-tech-docs.md +113 -19
- package/commands/review-tech-docs.tmpl +31 -2
- package/commands/setup-ai-first.md +35 -16
- package/commands/setup-ai-first.tmpl +19 -6
- package/commands/sync.md +15 -4
- package/commands/sync.tmpl +12 -2
- package/commands/update-framework.md +40 -2
- package/commands/update-framework.tmpl +37 -0
- package/commands/validate-traces.md +231 -25
- package/commands/validate-traces.tmpl +149 -8
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/README.md +56 -0
- package/core/commands/debug.md +82 -17
- package/core/commands/define-product.md +82 -17
- package/core/commands/dev-gen-test.md +82 -17
- package/core/commands/dev-run-test.md +84 -18
- package/core/commands/dev-smoke-test.md +82 -17
- package/core/commands/fix-bug.md +137 -20
- package/core/commands/generate-architecture.md +82 -17
- package/core/commands/generate-bdd.md +187 -44
- package/core/commands/generate-code.md +115 -20
- package/core/commands/generate-design-spec.md +82 -17
- package/core/commands/generate-prd.md +82 -17
- package/core/commands/generate-spec-manifest.md +82 -17
- package/core/commands/generate-tech-docs.md +85 -20
- package/core/commands/learn.md +82 -17
- package/core/commands/map-testids.md +82 -17
- package/core/commands/propose-scenario.md +102 -19
- package/core/commands/qc-analyze.md +82 -17
- package/core/commands/qc-design-test.md +82 -17
- package/core/commands/qc-plan.md +82 -17
- package/core/commands/qc-report.md +82 -17
- package/core/commands/qc-review.md +82 -17
- package/core/commands/qc-run-test.md +104 -19
- package/core/commands/refine-prd.md +82 -17
- package/core/commands/report-bug.md +82 -17
- package/core/commands/review-code.md +122 -19
- package/core/commands/review-context.md +124 -21
- package/core/commands/review-tech-docs.md +113 -19
- package/core/commands/setup-ai-first.md +35 -16
- package/core/commands/sync.md +15 -4
- package/core/commands/update-framework.md +40 -2
- package/core/commands/validate-traces.md +231 -25
- package/core/modules/android-compose/stack-profile.yaml +1 -1
- package/core/modules/flutter/stack-profile.yaml +1 -1
- package/core/modules/ios-swiftui/stack-profile.yaml +1 -1
- package/core/modules/java-spring/stack-profile.yaml +1 -1
- package/core/modules/nextjs/stack-profile.yaml +1 -1
- package/core/modules/nuxt/stack-profile.yaml +1 -1
- package/core/modules/phaser-game/stack-profile.yaml +1 -1
- package/core/modules/php-laravel/stack-profile.yaml +1 -1
- package/core/modules/qc-playwright/stack-profile.yaml +1 -1
- package/core/modules/react/stack-profile.yaml +1 -1
- package/core/modules/react-native/stack-profile.yaml +1 -1
- package/core/modules/vue/stack-profile.yaml +1 -1
- package/core/rules/workflow.md +11 -0
- package/core/steps/context-loader.md +66 -7
- package/core/steps/gate.md +13 -8
- package/core/steps/report-footer.md +3 -2
- package/core/templates/README.md +47 -0
- package/core/templates/feature.template +13 -10
- package/core/templates/project-context.yaml +49 -17
- package/core/templates/tech-design.template.md +1 -1
- package/docs/02-concepts/traceability.md +29 -6
- package/docs/04-reference/trace-schema.md +128 -37
- package/modules/android-compose/stack-profile.yaml +1 -1
- package/modules/flutter/stack-profile.yaml +1 -1
- package/modules/ios-swiftui/stack-profile.yaml +1 -1
- package/modules/java-spring/stack-profile.yaml +1 -1
- package/modules/nextjs/stack-profile.yaml +1 -1
- package/modules/nuxt/stack-profile.yaml +1 -1
- package/modules/phaser-game/stack-profile.yaml +1 -1
- package/modules/php-laravel/stack-profile.yaml +1 -1
- package/modules/qc-playwright/stack-profile.yaml +1 -1
- package/modules/react/stack-profile.yaml +1 -1
- package/modules/react-native/stack-profile.yaml +1 -1
- package/modules/vue/stack-profile.yaml +1 -1
- package/package.json +50 -49
- package/rules/workflow.md +11 -0
- package/scripts/migrate-bdd-platform.js +286 -0
- package/steps/context-loader.md +66 -7
- package/steps/gate.md +13 -8
- package/steps/report-footer.md +3 -2
- package/templates/README.md +47 -0
- package/templates/feature.template +13 -10
- package/templates/project-context.yaml +49 -17
- package/templates/tech-design.template.md +1 -1
package/commands/sync.md
CHANGED
|
@@ -198,7 +198,17 @@ Nếu không có thay đổi → `✅ Umbrella state clean — no commit needed`
|
|
|
198
198
|
|
|
199
199
|
*Skip nếu `services` rỗng.*
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
**Trước tiên — làm phẳng `services` thành danh sách submodule.** Một giá trị trong `services` có thể lồng tới ba tầng (xem `context-loader.md` Bước 1.5), nên duyệt nông sẽ **bỏ sót** submodule:
|
|
202
|
+
|
|
203
|
+
| Dạng | Cách lấy submodule |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `services.{domain}.path` (2a) | một entry |
|
|
206
|
+
| `services.{domain}.{platform}.path` (2b) | một entry mỗi platform |
|
|
207
|
+
| `…by_prd_slug.{slug}.path` (2c) | một entry mỗi `slug` — ở cấp domain hoặc cấp platform |
|
|
208
|
+
|
|
209
|
+
Kết quả là tập các cặp `{path, module}` **duy nhất theo `path`** (nhiều domain/platform/slug có thể trỏ chung một submodule — chỉ xử lý một lần). Mọi bước dưới đây chạy trên danh sách đã làm phẳng này.
|
|
210
|
+
|
|
211
|
+
Với mỗi entry trong danh sách đó:
|
|
202
212
|
|
|
203
213
|
**A. Nếu `{service.path}/.agent/project-context.yaml` đã tồn tại:**
|
|
204
214
|
- Đọc `conventions.test_command` và `conventions.build_command`
|
|
@@ -272,7 +282,7 @@ Nếu thiếu cái nào:
|
|
|
272
282
|
- `living_docs_dir` = `{spec_source}/.living-docs` nếu `setup.spec_source` được set, else `.living-docs` ở umbrella root. *(Specs module được mount trong mọi service workspace, nên panel phân giải nó kể cả khi dev mở một service submodule đơn.)*
|
|
273
283
|
- `panel_mirror` = `./.trace` ở gốc workspace hiện tại.
|
|
274
284
|
|
|
275
|
-
1. Với mỗi service trong `
|
|
285
|
+
1. Với mỗi service trong danh sách **đã làm phẳng** ở Step 3 (gồm cả các submodule nằm dưới `by_prd_slug` — bỏ sót chúng là mất trace của các repo chia theo feature): nếu `{service.path}/.trace/` có file `.tsv` → copy chúng vào `{living_docs_dir}/{service-name}/` (tạo dir nếu cần).
|
|
276
286
|
2. Ghi merged `{living_docs_dir}/trace-report.json`:
|
|
277
287
|
- Tổng hợp TSV `.trace/` của mỗi service, thêm field `"service"` **và `"platform"`** (suy từ tên file `{UC-ID}-{platform}.tsv`) cho mỗi row, tính lại summary totals. **Không dedupe theo `sc_id` giữa các platform** — `web·SC1` và `system·SC1` là 2 row khác nhau; nhờ field `platform` dashboard hiển thị tách bạch coverage từng platform.
|
|
278
288
|
3. **Mirror tới panel location:** copy `{living_docs_dir}/trace-report.json` (+ TSV namespaced) → `{panel_mirror}/` để panel trong repo đang mở không rỗng. Skip nếu `panel_mirror` đã bằng `living_docs_dir`.
|
|
@@ -375,6 +385,7 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
375
385
|
| /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
|
|
376
386
|
| /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
|
|
377
387
|
| /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
|
|
388
|
+
| /map-testids | `/qc-design-test {UC-ID}` (QC dựng Page Object từ contract §4.5.6 vừa ghi) |
|
|
378
389
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
379
390
|
| /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
|
|
380
391
|
| /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
|
|
@@ -383,8 +394,8 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
383
394
|
| /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
|
|
384
395
|
| /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
|
|
385
396
|
| /dev-smoke-test | Tạo PR và link tới ticket |
|
|
386
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}
|
|
387
|
-
| /fix-bug |
|
|
397
|
+
| /validate-traces | **Cờ 🔴 trước (chặn PR):** SEAM_UNWIRED → nối binding sang class thật, xoá/thay stub · STUB_UNRESOLVED → `/generate-code {owner_uc}` (lấp logic tại chỗ + xoá hàm song song) · ORPHANED/TRACE_ORPHAN → quyết định thủ công (xoá code+test, đưa scenario trở lại `.feature`, hoặc sửa `sc_id` của tag). **Rồi:** DRIFT/UNTRACKED → `/generate-code {UC-ID}` · BDD_DRIFT → `/generate-code {feature-file}` · tech-doc lỗi thời vs BDD → `/generate-tech-docs` → `/review-tech-docs` · PRD drift → `/generate-bdd {prd-file}` · GAP → `/dev-gen-test {UC-ID}`. **Chỉ tạo PR khi mọi cờ 🔴 = 0** |
|
|
398
|
+
| /fix-bug | `/dev-run-test {UC-ID}` (dev_selftest vừa reset về not_run) → tạo PR; nếu fix một `{BUG-ID}` → QC chạy `/qc-run-test {UC-ID}` để verify + đóng bug |
|
|
388
399
|
| /debug | `/fix-bug {ticket-id}` nếu cần sửa |
|
|
389
400
|
| /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
|
|
390
401
|
| /propose-scenario | Báo PO/Dev review proposal trong `feedback/bdd-proposals/` |
|
package/commands/sync.tmpl
CHANGED
|
@@ -198,7 +198,17 @@ Nếu không có thay đổi → `✅ Umbrella state clean — no commit needed`
|
|
|
198
198
|
|
|
199
199
|
*Skip nếu `services` rỗng.*
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
**Trước tiên — làm phẳng `services` thành danh sách submodule.** Một giá trị trong `services` có thể lồng tới ba tầng (xem `context-loader.md` Bước 1.5), nên duyệt nông sẽ **bỏ sót** submodule:
|
|
202
|
+
|
|
203
|
+
| Dạng | Cách lấy submodule |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `services.{domain}.path` (2a) | một entry |
|
|
206
|
+
| `services.{domain}.{platform}.path` (2b) | một entry mỗi platform |
|
|
207
|
+
| `…by_prd_slug.{slug}.path` (2c) | một entry mỗi `slug` — ở cấp domain hoặc cấp platform |
|
|
208
|
+
|
|
209
|
+
Kết quả là tập các cặp `{path, module}` **duy nhất theo `path`** (nhiều domain/platform/slug có thể trỏ chung một submodule — chỉ xử lý một lần). Mọi bước dưới đây chạy trên danh sách đã làm phẳng này.
|
|
210
|
+
|
|
211
|
+
Với mỗi entry trong danh sách đó:
|
|
202
212
|
|
|
203
213
|
**A. Nếu `{service.path}/.agent/project-context.yaml` đã tồn tại:**
|
|
204
214
|
- Đọc `conventions.test_command` và `conventions.build_command`
|
|
@@ -272,7 +282,7 @@ Nếu thiếu cái nào:
|
|
|
272
282
|
- `living_docs_dir` = `{spec_source}/.living-docs` nếu `setup.spec_source` được set, else `.living-docs` ở umbrella root. *(Specs module được mount trong mọi service workspace, nên panel phân giải nó kể cả khi dev mở một service submodule đơn.)*
|
|
273
283
|
- `panel_mirror` = `./.trace` ở gốc workspace hiện tại.
|
|
274
284
|
|
|
275
|
-
1. Với mỗi service trong `
|
|
285
|
+
1. Với mỗi service trong danh sách **đã làm phẳng** ở Step 3 (gồm cả các submodule nằm dưới `by_prd_slug` — bỏ sót chúng là mất trace của các repo chia theo feature): nếu `{service.path}/.trace/` có file `.tsv` → copy chúng vào `{living_docs_dir}/{service-name}/` (tạo dir nếu cần).
|
|
276
286
|
2. Ghi merged `{living_docs_dir}/trace-report.json`:
|
|
277
287
|
- Tổng hợp TSV `.trace/` của mỗi service, thêm field `"service"` **và `"platform"`** (suy từ tên file `{UC-ID}-{platform}.tsv`) cho mỗi row, tính lại summary totals. **Không dedupe theo `sc_id` giữa các platform** — `web·SC1` và `system·SC1` là 2 row khác nhau; nhờ field `platform` dashboard hiển thị tách bạch coverage từng platform.
|
|
278
288
|
3. **Mirror tới panel location:** copy `{living_docs_dir}/trace-report.json` (+ TSV namespaced) → `{panel_mirror}/` để panel trong repo đang mở không rỗng. Skip nếu `panel_mirror` đã bằng `living_docs_dir`.
|
|
@@ -121,6 +121,43 @@ Tóm tắt cho người dùng:
|
|
|
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
|
+
**Kiểm file bị ghi đè.** `--init` copy `core/` → `.agent/` **vô điều kiện** — mọi thứ project đã sửa trong `.agent/` (trừ `project-context.yaml`) bị ghi đè. Từ v0.4.2 lệnh cài tự cứu chúng. Kiểm:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
ls -d .agent/.overwritten-*/ 2>/dev/null
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Nếu có → nêu **nổi bật** trong report (đây là thứ dễ trôi nhất trong một diff nâng cấp lớn):
|
|
131
|
+
```
|
|
132
|
+
⚠️ {n} file bạn sửa trong .agent/ đã bị bản nâng cấp ghi đè.
|
|
133
|
+
Bản cũ: .agent/.overwritten-{version}-{date}/
|
|
134
|
+
Xem diff: diff -r .agent/.overwritten-{version}-{date}/ .agent/
|
|
135
|
+
Sửa trực tiếp trong .agent/ KHÔNG bền — nó là mirror sinh ra. Muốn giữ thay đổi:
|
|
136
|
+
chuyển vào repo framework rồi phát hành, hoặc đặt ở CLAUDE.md /
|
|
137
|
+
.agent/project-context.yaml / .agent/project-lessons.md (ba chỗ không bị ghi đè).
|
|
138
|
+
Xử lý xong thì xoá thư mục backup.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Nếu **không** có thư mục nào → không in gì. *(Ranh giới vùng-sửa-được đầy đủ: `.agent/README.md`.)*
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Step 5.5 — Kiểm bố cục spec cần migrate
|
|
146
|
+
|
|
147
|
+
*Chỉ quét, KHÔNG tự chuyển file — di chuyển spec là việc người dùng chốt.*
|
|
148
|
+
|
|
149
|
+
Một số version thay đổi **bố cục** spec, không chỉ nội dung command. Quét nhanh hai dạng cũ và in hướng dẫn nếu gặp:
|
|
150
|
+
|
|
151
|
+
| Phát hiện | Nghĩa | Lệnh migrate (dry-run trước) |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| Có file `.feature` **trực tiếp** dưới `{paths.specs_dir}/*/*/bdd/` (không trong subfolder platform) | Bố cục phẳng trước v0.4.1. `web`/`system` cùng UC va tên nhau; `/validate-traces` không thấy file; System BDD Synthesis luôn rơi về Backend-only. | `npx @educa-corp/sdd-framework --migrate-bdd-platform` → xem plan → thêm `--apply` |
|
|
154
|
+
| Có `{paths.specs_dir}/prd/` hoặc `{paths.specs_dir}/bdd/` ở cấp gốc | Bố cục artifact-type-first (rất cũ) | `npx @educa-corp/sdd-framework --migrate-specs` → `--apply` |
|
|
155
|
+
| Có `{paths.trace_dir}/*.tsv` phẳng (không có `{domain}/{prd-slug}/`) | Trace layout cũ | `--migrate-specs` (xử luôn) |
|
|
156
|
+
|
|
157
|
+
Nếu sạch cả ba → không in gì.
|
|
158
|
+
|
|
159
|
+
Sau migrate, nhắc chạy `/validate-traces` để reconcile sổ trace với bố cục mới.
|
|
160
|
+
|
|
124
161
|
---
|
|
125
162
|
|
|
126
163
|
## Output
|
|
@@ -198,6 +235,7 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
198
235
|
| /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
|
|
199
236
|
| /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
|
|
200
237
|
| /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
|
|
238
|
+
| /map-testids | `/qc-design-test {UC-ID}` (QC dựng Page Object từ contract §4.5.6 vừa ghi) |
|
|
201
239
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
202
240
|
| /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
|
|
203
241
|
| /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
|
|
@@ -206,8 +244,8 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
206
244
|
| /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
|
|
207
245
|
| /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
|
|
208
246
|
| /dev-smoke-test | Tạo PR và link tới ticket |
|
|
209
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}
|
|
210
|
-
| /fix-bug |
|
|
247
|
+
| /validate-traces | **Cờ 🔴 trước (chặn PR):** SEAM_UNWIRED → nối binding sang class thật, xoá/thay stub · STUB_UNRESOLVED → `/generate-code {owner_uc}` (lấp logic tại chỗ + xoá hàm song song) · ORPHANED/TRACE_ORPHAN → quyết định thủ công (xoá code+test, đưa scenario trở lại `.feature`, hoặc sửa `sc_id` của tag). **Rồi:** DRIFT/UNTRACKED → `/generate-code {UC-ID}` · BDD_DRIFT → `/generate-code {feature-file}` · tech-doc lỗi thời vs BDD → `/generate-tech-docs` → `/review-tech-docs` · PRD drift → `/generate-bdd {prd-file}` · GAP → `/dev-gen-test {UC-ID}`. **Chỉ tạo PR khi mọi cờ 🔴 = 0** |
|
|
248
|
+
| /fix-bug | `/dev-run-test {UC-ID}` (dev_selftest vừa reset về not_run) → tạo PR; nếu fix một `{BUG-ID}` → QC chạy `/qc-run-test {UC-ID}` để verify + đóng bug |
|
|
211
249
|
| /debug | `/fix-bug {ticket-id}` nếu cần sửa |
|
|
212
250
|
| /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
|
|
213
251
|
| /propose-scenario | Báo PO/Dev review proposal trong `feedback/bdd-proposals/` |
|
|
@@ -121,6 +121,43 @@ Tóm tắt cho người dùng:
|
|
|
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
|
+
**Kiểm file bị ghi đè.** `--init` copy `core/` → `.agent/` **vô điều kiện** — mọi thứ project đã sửa trong `.agent/` (trừ `project-context.yaml`) bị ghi đè. Từ v0.4.2 lệnh cài tự cứu chúng. Kiểm:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
ls -d .agent/.overwritten-*/ 2>/dev/null
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Nếu có → nêu **nổi bật** trong report (đây là thứ dễ trôi nhất trong một diff nâng cấp lớn):
|
|
131
|
+
```
|
|
132
|
+
⚠️ {n} file bạn sửa trong .agent/ đã bị bản nâng cấp ghi đè.
|
|
133
|
+
Bản cũ: .agent/.overwritten-{version}-{date}/
|
|
134
|
+
Xem diff: diff -r .agent/.overwritten-{version}-{date}/ .agent/
|
|
135
|
+
Sửa trực tiếp trong .agent/ KHÔNG bền — nó là mirror sinh ra. Muốn giữ thay đổi:
|
|
136
|
+
chuyển vào repo framework rồi phát hành, hoặc đặt ở CLAUDE.md /
|
|
137
|
+
.agent/project-context.yaml / .agent/project-lessons.md (ba chỗ không bị ghi đè).
|
|
138
|
+
Xử lý xong thì xoá thư mục backup.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Nếu **không** có thư mục nào → không in gì. *(Ranh giới vùng-sửa-được đầy đủ: `.agent/README.md`.)*
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Step 5.5 — Kiểm bố cục spec cần migrate
|
|
146
|
+
|
|
147
|
+
*Chỉ quét, KHÔNG tự chuyển file — di chuyển spec là việc người dùng chốt.*
|
|
148
|
+
|
|
149
|
+
Một số version thay đổi **bố cục** spec, không chỉ nội dung command. Quét nhanh hai dạng cũ và in hướng dẫn nếu gặp:
|
|
150
|
+
|
|
151
|
+
| Phát hiện | Nghĩa | Lệnh migrate (dry-run trước) |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| Có file `.feature` **trực tiếp** dưới `{paths.specs_dir}/*/*/bdd/` (không trong subfolder platform) | Bố cục phẳng trước v0.4.1. `web`/`system` cùng UC va tên nhau; `/validate-traces` không thấy file; System BDD Synthesis luôn rơi về Backend-only. | `npx @educa-corp/sdd-framework --migrate-bdd-platform` → xem plan → thêm `--apply` |
|
|
154
|
+
| Có `{paths.specs_dir}/prd/` hoặc `{paths.specs_dir}/bdd/` ở cấp gốc | Bố cục artifact-type-first (rất cũ) | `npx @educa-corp/sdd-framework --migrate-specs` → `--apply` |
|
|
155
|
+
| Có `{paths.trace_dir}/*.tsv` phẳng (không có `{domain}/{prd-slug}/`) | Trace layout cũ | `--migrate-specs` (xử luôn) |
|
|
156
|
+
|
|
157
|
+
Nếu sạch cả ba → không in gì.
|
|
158
|
+
|
|
159
|
+
Sau migrate, nhắc chạy `/validate-traces` để reconcile sổ trace với bố cục mới.
|
|
160
|
+
|
|
124
161
|
---
|
|
125
162
|
|
|
126
163
|
## Output
|