@educa-corp/sdd-framework 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/build.js +9 -0
- package/bin/index.js +115 -4
- package/bin/self-check.js +354 -0
- package/bin/trace-schema.json +1199 -0
- package/commands/debug.md +19 -12
- package/commands/define-product.md +19 -12
- package/commands/dev-gen-test.md +53 -19
- package/commands/dev-run-test.md +55 -20
- package/commands/dev-run-test.tmpl +2 -1
- package/commands/dev-smoke-test.md +19 -12
- package/commands/extend-prd.md +907 -0
- package/commands/extend-prd.tmpl +270 -0
- package/commands/fix-bug.md +101 -15
- package/commands/fix-bug.tmpl +29 -3
- package/commands/generate-architecture.md +19 -12
- package/commands/generate-bdd.md +174 -48
- package/commands/generate-bdd.tmpl +107 -18
- package/commands/generate-code.md +122 -29
- package/commands/generate-code.tmpl +69 -10
- package/commands/generate-design-spec.md +19 -12
- package/commands/generate-prd.md +44 -12
- package/commands/generate-prd.tmpl +25 -0
- package/commands/generate-spec-manifest.md +19 -12
- package/commands/generate-tech-docs.md +22 -15
- package/commands/generate-tech-docs.tmpl +2 -2
- package/commands/learn.md +19 -12
- package/commands/map-testids.md +19 -12
- package/commands/propose-scenario.md +91 -15
- package/commands/propose-scenario.tmpl +72 -3
- package/commands/qc-analyze.md +19 -12
- package/commands/qc-design-test.md +20 -12
- package/commands/qc-design-test.tmpl +1 -0
- package/commands/qc-plan.md +19 -12
- package/commands/qc-report.md +19 -12
- package/commands/qc-review.md +19 -12
- package/commands/qc-run-test.md +88 -22
- package/commands/qc-run-test.tmpl +35 -3
- package/commands/refine-prd.md +19 -12
- package/commands/report-bug.md +19 -12
- package/commands/review-code.md +60 -14
- package/commands/review-code.tmpl +41 -2
- package/commands/review-context.md +62 -16
- package/commands/review-context.tmpl +43 -4
- package/commands/review-tech-docs.md +50 -14
- package/commands/review-tech-docs.tmpl +31 -2
- package/commands/setup-ai-first.md +26 -16
- package/commands/setup-ai-first.tmpl +7 -4
- package/commands/sync.md +43 -18
- package/commands/sync.tmpl +37 -14
- package/commands/update-framework.md +43 -4
- package/commands/update-framework.tmpl +37 -0
- package/commands/validate-traces.md +481 -49
- package/commands/validate-traces.tmpl +462 -37
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/README.md +56 -0
- package/core/commands/debug.md +19 -12
- package/core/commands/define-product.md +19 -12
- package/core/commands/dev-gen-test.md +53 -19
- package/core/commands/dev-run-test.md +55 -20
- package/core/commands/dev-smoke-test.md +19 -12
- package/core/commands/extend-prd.md +907 -0
- package/core/commands/fix-bug.md +101 -15
- package/core/commands/generate-architecture.md +19 -12
- package/core/commands/generate-bdd.md +174 -48
- package/core/commands/generate-code.md +122 -29
- package/core/commands/generate-design-spec.md +19 -12
- package/core/commands/generate-prd.md +44 -12
- package/core/commands/generate-spec-manifest.md +19 -12
- package/core/commands/generate-tech-docs.md +22 -15
- package/core/commands/learn.md +19 -12
- package/core/commands/map-testids.md +19 -12
- package/core/commands/propose-scenario.md +91 -15
- package/core/commands/qc-analyze.md +19 -12
- package/core/commands/qc-design-test.md +20 -12
- package/core/commands/qc-plan.md +19 -12
- package/core/commands/qc-report.md +19 -12
- package/core/commands/qc-review.md +19 -12
- package/core/commands/qc-run-test.md +88 -22
- package/core/commands/refine-prd.md +19 -12
- package/core/commands/report-bug.md +19 -12
- package/core/commands/review-code.md +60 -14
- package/core/commands/review-context.md +62 -16
- package/core/commands/review-tech-docs.md +50 -14
- package/core/commands/setup-ai-first.md +26 -16
- package/core/commands/sync.md +43 -18
- package/core/commands/update-framework.md +43 -4
- package/core/commands/validate-traces.md +481 -49
- 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 +29 -0
- package/core/steps/gate.md +13 -8
- package/core/steps/report-footer.md +6 -4
- package/core/steps/trace-mirror.md +34 -7
- package/core/templates/README.md +47 -0
- package/core/templates/feature.template +14 -11
- package/core/templates/project-context.yaml +26 -14
- package/core/templates/tech-design.template.md +1 -1
- package/docs/01-getting-started/installation.md +18 -1
- package/docs/01-getting-started/what-is-sdd.md +4 -2
- package/docs/02-concepts/architecture.md +27 -3
- package/docs/02-concepts/pipeline-steps/02-specification.md +39 -3
- package/docs/02-concepts/pipeline-steps/04-bdd.md +24 -2
- package/docs/02-concepts/pipeline-steps/05-tech-docs.md +18 -1
- package/docs/02-concepts/pipeline-steps/06-code.md +35 -4
- package/docs/02-concepts/pipeline-steps/09-validate-traces.md +137 -12
- package/docs/02-concepts/pipeline-steps/10-feedback-loop.md +59 -3
- package/docs/02-concepts/roles-and-hitl.md +1 -1
- package/docs/02-concepts/traceability.md +126 -94
- package/docs/03-guides/developer.md +20 -4
- package/docs/03-guides/product-owner.md +72 -68
- package/docs/03-guides/tester-qa.md +81 -70
- package/docs/04-reference/commands.md +134 -105
- package/docs/04-reference/configuration.md +146 -94
- package/docs/04-reference/trace-schema.md +145 -37
- package/docs/explain/02-generate-prd.md +80 -78
- package/docs/explain/02b-extend-prd.md +125 -0
- package/docs/explain/03-refine-prd.md +86 -86
- package/docs/explain/04-review-context.md +18 -1
- package/docs/explain/06-generate-bdd.md +23 -0
- package/docs/explain/08-review-tech-docs.md +20 -5
- package/docs/explain/10-review-code.md +36 -2
- package/docs/explain/19-qc-run-test.md +87 -67
- package/docs/explain/21-validate-traces.md +74 -68
- package/docs/explain/23-fix-bug.md +19 -3
- package/docs/explain/26-propose-scenario.md +70 -63
- package/docs/explain/README.md +135 -134
- 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 +5 -4
- package/rules/workflow.md +29 -0
- package/scripts/migrate-bdd-platform.js +286 -0
- package/steps/gate.md +13 -8
- package/steps/report-footer.md +6 -4
- package/steps/trace-mirror.md +34 -7
- package/templates/README.md +47 -0
- package/templates/feature.template +14 -11
- package/templates/project-context.yaml +26 -14
- package/templates/tech-design.template.md +1 -1
|
@@ -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
|
|
@@ -161,7 +198,7 @@ Tìm lệnh hiện tại trong bảng phase dưới đây và đánh dấu **pha
|
|
|
161
198
|
| Phase | Commands |
|
|
162
199
|
|-------|----------|
|
|
163
200
|
| Discovery | `/define-product` |
|
|
164
|
-
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
201
|
+
| PRD | `/generate-prd` · `/extend-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
165
202
|
| Design Spec | `/generate-design-spec` |
|
|
166
203
|
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
167
204
|
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
@@ -186,6 +223,7 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
186
223
|
| /setup-ai-first | `/define-product` để bắt đầu feature đầu tiên |
|
|
187
224
|
| /define-product | `/generate-prd {product-definition-file}` |
|
|
188
225
|
| /generate-prd | `/refine-prd {prd-file}` rồi `/review-context {prd-file}` |
|
|
226
|
+
| /extend-prd | `/refine-prd {prd-file}` (soi phần vừa thêm) rồi `/review-context {prd-file}` → PO duyệt → `/generate-bdd` **chỉ cho UC MỚI**; UC cũ dùng `/validate-traces --realign-prd-version {UC-ID}` |
|
|
189
227
|
| /refine-prd | Mở Review Board → cập nhật PRD → `/review-context {prd-file}` |
|
|
190
228
|
| /review-context (PRD) | Khi 0 critical → PO đặt `Status: approved`, rồi FE/App: `/generate-design-spec {prd-file}` (→ design sign-off → BDD); BE: `/generate-bdd {prd-file}`. Còn critical/NEEDS_FIX → sửa PRD (giữ draft) |
|
|
191
229
|
| /generate-design-spec | Designer review → xác nhận link Figma → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
@@ -198,6 +236,7 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
198
236
|
| /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
|
|
199
237
|
| /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
|
|
200
238
|
| /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
|
|
239
|
+
| /map-testids | `/qc-design-test {UC-ID}` (QC dựng Page Object từ contract §4.5.6 vừa ghi) |
|
|
201
240
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
202
241
|
| /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
|
|
203
242
|
| /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
|
|
@@ -206,11 +245,11 @@ Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
|
206
245
|
| /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
|
|
207
246
|
| /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
|
|
208
247
|
| /dev-smoke-test | Tạo PR và link tới ticket |
|
|
209
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}
|
|
210
|
-
| /fix-bug |
|
|
248
|
+
| /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** |
|
|
249
|
+
| /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
250
|
| /debug | `/fix-bug {ticket-id}` nếu cần sửa |
|
|
212
251
|
| /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
|
|
213
|
-
| /propose-scenario |
|
|
252
|
+
| /propose-scenario | **Case A** (thiếu scenario cho AC có sẵn) → báo PO/Dev review trong `feedback/bdd-proposals/`; `/generate-bdd` tự chèn khi `Status: accepted`. **Case B** (requirement mới) → `feedback/prd-change-requests/` — PO phải đưa vào PRD trước, KHÔNG tự vào BDD được; `/validate-traces` nhắc lại kèm số ngày chờ chừng nào `Status: Open` |
|
|
214
253
|
| /learn | Tiếp tục làm việc — lesson áp dụng ở lệnh kế tiếp |
|
|
215
254
|
| /sync | `/validate-traces` để xem độ phủ đầy đủ; xử lý mọi `📥 tester feedback` được nêu |
|
|
216
255
|
| /update-framework | Review `git diff .agent/`, commit; `/sync` để đồng bộ nội dung dự án |
|
|
@@ -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
|