@educa-corp/sdd-framework 0.6.0 → 0.7.1
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/gate-trace.js +25 -2
- package/bin/index.js +32 -5
- package/bin/lint-trace.js +41 -0
- package/bin/self-check.js +430 -3
- package/bin/trace-schema.json +418 -31
- package/core/FRAMEWORK_VERSION +1 -1
- package/{commands/extend-prd.md → core/commands/amend-prd.md} +206 -173
- package/core/commands/dev-run-test.md +48 -10
- package/core/commands/extend-prd.md +39 -12
- package/core/commands/generate-bdd.md +52 -10
- package/core/commands/generate-code.md +35 -2
- package/core/commands/generate-tech-docs.md +36 -4
- package/core/commands/map-testids.md +1 -1
- package/core/commands/qc-run-test.md +29 -3
- package/core/commands/refine-prd.md +13 -2
- package/core/commands/review-context.md +43 -8
- package/core/commands/sync.md +105 -1
- package/core/commands/validate-traces.md +289 -16
- package/core/rules/workflow.md +34 -0
- package/core/steps/context-loader.md +27 -6
- package/core/templates/feature.template +1 -1
- package/core/templates/project-context.yaml +3 -3
- package/core/templates/tech-design.template.md +2 -2
- package/docs/02-concepts/architecture.md +37 -1
- package/docs/02-concepts/overview.md +1 -1
- package/docs/02-concepts/pipeline-steps/02-specification.md +13 -7
- package/docs/02-concepts/pipeline-steps/07-dev-selftest.md +2 -0
- package/docs/02-concepts/pipeline-steps/08-qc-automation.md +1 -0
- package/docs/02-concepts/pipeline-steps/09-validate-traces.md +34 -3
- package/docs/02-concepts/pipeline-steps/10-feedback-loop.md +10 -1
- package/docs/02-concepts/traceability.md +187 -183
- package/docs/03-guides/architect.md +13 -4
- package/docs/03-guides/developer.md +1 -0
- package/docs/03-guides/product-owner.md +89 -72
- package/docs/03-guides/tester-qa.md +81 -81
- package/docs/04-reference/commands.md +148 -134
- package/docs/04-reference/trace-schema.md +45 -1
- package/docs/explain/02b-extend-prd.md +1 -1
- package/docs/explain/02c-amend-prd.md +152 -0
- package/docs/explain/06-generate-bdd.md +1 -1
- package/docs/explain/13-dev-run-test.md +15 -1
- package/docs/explain/19-qc-run-test.md +91 -87
- package/docs/explain/21-validate-traces.md +79 -75
- package/docs/explain/28-sync.md +25 -0
- package/docs/explain/README.md +136 -135
- package/package.json +1 -8
- package/commands/debug.md +0 -529
- package/commands/debug.tmpl +0 -260
- package/commands/define-product.md +0 -438
- package/commands/define-product.tmpl +0 -225
- package/commands/dev-gen-test.md +0 -700
- package/commands/dev-gen-test.tmpl +0 -490
- package/commands/dev-run-test.md +0 -435
- package/commands/dev-run-test.tmpl +0 -225
- package/commands/dev-smoke-test.md +0 -374
- package/commands/dev-smoke-test.tmpl +0 -217
- package/commands/extend-prd.tmpl +0 -273
- package/commands/fix-bug.md +0 -519
- package/commands/fix-bug.tmpl +0 -197
- package/commands/generate-architecture.md +0 -354
- package/commands/generate-architecture.tmpl +0 -197
- package/commands/generate-bdd.md +0 -923
- package/commands/generate-bdd.tmpl +0 -590
- package/commands/generate-code.md +0 -859
- package/commands/generate-code.tmpl +0 -649
- package/commands/generate-design-spec.md +0 -737
- package/commands/generate-design-spec.tmpl +0 -524
- package/commands/generate-prd.md +0 -722
- package/commands/generate-prd.tmpl +0 -226
- package/commands/generate-spec-manifest.md +0 -321
- package/commands/generate-spec-manifest.tmpl +0 -164
- package/commands/generate-tech-docs.md +0 -920
- package/commands/generate-tech-docs.tmpl +0 -273
- package/commands/learn.md +0 -399
- package/commands/learn.tmpl +0 -130
- package/commands/map-testids.md +0 -238
- package/commands/map-testids.tmpl +0 -81
- package/commands/propose-scenario.md +0 -359
- package/commands/propose-scenario.tmpl +0 -202
- package/commands/qc-analyze.md +0 -269
- package/commands/qc-analyze.tmpl +0 -112
- package/commands/qc-design-test.md +0 -226
- package/commands/qc-design-test.tmpl +0 -69
- package/commands/qc-plan.md +0 -206
- package/commands/qc-plan.tmpl +0 -49
- package/commands/qc-report.md +0 -217
- package/commands/qc-report.tmpl +0 -60
- package/commands/qc-review.md +0 -210
- package/commands/qc-review.tmpl +0 -53
- package/commands/qc-run-test.md +0 -326
- package/commands/qc-run-test.tmpl +0 -116
- package/commands/refine-prd.md +0 -653
- package/commands/refine-prd.tmpl +0 -281
- package/commands/report-bug.md +0 -305
- package/commands/report-bug.tmpl +0 -148
- package/commands/review-code.md +0 -415
- package/commands/review-code.tmpl +0 -146
- package/commands/review-context.md +0 -902
- package/commands/review-context.tmpl +0 -530
- package/commands/review-tech-docs.md +0 -561
- package/commands/review-tech-docs.tmpl +0 -404
- package/commands/setup-ai-first.md +0 -602
- package/commands/setup-ai-first.tmpl +0 -450
- package/commands/sync.md +0 -430
- package/commands/sync.tmpl +0 -429
- package/commands/update-framework.md +0 -203
- package/commands/update-framework.tmpl +0 -202
- package/commands/validate-traces.md +0 -1077
- package/commands/validate-traces.tmpl +0 -920
- package/hooks/data-guard.js +0 -232
- package/hooks/settings.json +0 -19
- package/modules/android-compose/module.yaml +0 -13
- package/modules/android-compose/stack-profile.yaml +0 -57
- package/modules/angular/architecture-snippets/component-patterns.md +0 -187
- package/modules/angular/module.yaml +0 -6
- package/modules/angular/stack-profile.yaml +0 -38
- package/modules/context-engineering/architecture-snippets/context-design.md +0 -119
- package/modules/context-engineering/module.yaml +0 -9
- package/modules/context-engineering/stack-profile.yaml +0 -61
- package/modules/dotnet/architecture-snippets/clean-arch.md +0 -160
- package/modules/dotnet/module.yaml +0 -6
- package/modules/dotnet/stack-profile.yaml +0 -50
- package/modules/flutter/module.yaml +0 -14
- package/modules/flutter/stack-profile.yaml +0 -59
- package/modules/golang/architecture-snippets/domain-layout.md +0 -283
- package/modules/golang/module.yaml +0 -6
- package/modules/golang/stack-profile.yaml +0 -40
- package/modules/ios-swiftui/module.yaml +0 -13
- package/modules/ios-swiftui/stack-profile.yaml +0 -55
- package/modules/java-spring/architecture-snippets/layered-arch.md +0 -201
- package/modules/java-spring/module.yaml +0 -15
- package/modules/java-spring/stack-profile.yaml +0 -28
- package/modules/nextjs/architecture-snippets/app-router-patterns.md +0 -269
- package/modules/nextjs/module.yaml +0 -14
- package/modules/nextjs/stack-profile.yaml +0 -74
- package/modules/nuxt/module.yaml +0 -14
- package/modules/nuxt/stack-profile.yaml +0 -58
- package/modules/phaser-game/architecture-snippets/phaser-scene-patterns.md +0 -646
- package/modules/phaser-game/module.yaml +0 -15
- package/modules/phaser-game/stack-profile.yaml +0 -90
- package/modules/php-laravel/architecture-snippets/service-repository.md +0 -302
- package/modules/php-laravel/module.yaml +0 -15
- package/modules/php-laravel/stack-profile.yaml +0 -56
- package/modules/qc-playwright/stack-profile.yaml +0 -66
- package/modules/react/architecture-snippets/hooks-query-patterns.md +0 -254
- package/modules/react/module.yaml +0 -14
- package/modules/react/stack-profile.yaml +0 -63
- package/modules/react-native/module.yaml +0 -14
- package/modules/react-native/stack-profile.yaml +0 -56
- package/modules/vue/module.yaml +0 -14
- package/modules/vue/stack-profile.yaml +0 -65
- package/rules/data-protection.md +0 -80
- package/rules/workflow.md +0 -99
- package/skills/code/SKILL.md +0 -19
- package/skills/code/SKILL.tmpl +0 -19
- package/skills/debug/SKILL.md +0 -19
- package/skills/debug/SKILL.tmpl +0 -19
- package/skills/design-spec/SKILL.md +0 -11
- package/skills/design-spec/SKILL.tmpl +0 -11
- package/skills/discovery/SKILL.md +0 -14
- package/skills/discovery/SKILL.tmpl +0 -14
- package/skills/prd/SKILL.md +0 -19
- package/skills/prd/SKILL.tmpl +0 -19
- package/skills/qc/qa-analyst/DOC_GAPS.template.md +0 -63
- package/skills/qc/qa-analyst/acceptance-criteria.md +0 -60
- package/skills/qc/qa-analyst/business-rules.md +0 -59
- package/skills/qc/qa-analyst/data-flow.md +0 -64
- package/skills/qc/qa-analyst/spec-breakdown.md +0 -61
- package/skills/qc/qa-designer/e2e/journey.md +0 -41
- package/skills/qc/qa-designer/exploratory/charter.md +0 -68
- package/skills/qc/qa-designer/exploratory/explore-to-functional.md +0 -43
- package/skills/qc/qa-designer/functional/api.md +0 -45
- package/skills/qc/qa-designer/functional/gui-feature.md +0 -46
- package/skills/qc/qa-designer/functional/gui-screen.md +0 -52
- package/skills/qc/qa-designer/integration/api.md +0 -42
- package/skills/qc/qa-designer/integration/db.md +0 -39
- package/skills/qc/qa-designer/integration/gui.md +0 -40
- package/skills/qc/qa-designer/integration/kafka.md +0 -40
- package/skills/qc/qa-designer/non-functional.md +0 -40
- package/skills/qc/qa-planner/test-plan.md +0 -120
- package/skills/qc/qa-reviewer/script/e2e.md +0 -87
- package/skills/qc/qa-reviewer/script/exploratory.md +0 -45
- package/skills/qc/qa-reviewer/script/functional.md +0 -101
- package/skills/qc/qa-reviewer/script/integration.md +0 -91
- package/skills/qc/qa-reviewer/script/non-functional.md +0 -126
- package/skills/qc/qa-reviewer/test-case/e2e.md +0 -73
- package/skills/qc/qa-reviewer/test-case/exploratory.md +0 -43
- package/skills/qc/qa-reviewer/test-case/functional.md +0 -76
- package/skills/qc/qa-reviewer/test-case/integration.md +0 -69
- package/skills/qc/qa-reviewer/test-case/non-functional.md +0 -73
- package/skills/qc/qa-runner/e2e.md +0 -49
- package/skills/qc/qa-runner/exploratory/session.md +0 -36
- package/skills/qc/qa-runner/functional/api.md +0 -35
- package/skills/qc/qa-runner/functional/gui-feature.md +0 -51
- package/skills/qc/qa-runner/functional/gui-screen.md +0 -55
- package/skills/qc/qa-runner/integration.md +0 -47
- package/skills/qc/qa-runner/non-functional.md +0 -49
- package/skills/qc/qa-runner/report/report.md +0 -37
- package/skills/setup-ai-first/SKILL.md +0 -19
- package/skills/setup-ai-first/SKILL.tmpl +0 -19
- package/skills/spec/SKILL.md +0 -19
- package/skills/spec/SKILL.tmpl +0 -19
- package/skills/test/SKILL.md +0 -18
- package/skills/test/SKILL.tmpl +0 -18
- package/steps/business-language.md +0 -56
- package/steps/capture-lesson.md +0 -112
- package/steps/context-loader.md +0 -406
- package/steps/gate.md +0 -151
- package/steps/report-footer.md +0 -125
- package/steps/review-fanout.md +0 -159
- package/steps/spawn-agent.md +0 -129
- package/steps/trace-mirror.md +0 -53
- package/templates/README.md +0 -70
- package/templates/architecture.template.md +0 -394
- package/templates/ci/trace-gate.yml +0 -146
- package/templates/design-spec.template.md +0 -217
- package/templates/feature.template +0 -123
- package/templates/hooks/pre-push +0 -61
- package/templates/platform-guide.template.md +0 -145
- package/templates/prd.template.md +0 -283
- package/templates/product-definition.template.md +0 -188
- package/templates/project-context.yaml +0 -212
- package/templates/tech-design.template.md +0 -490
package/docs/explain/README.md
CHANGED
|
@@ -1,135 +1,136 @@
|
|
|
1
|
-
# 🔬 Explain — Giải phẫu từng command (Command Deep-Dive)
|
|
2
|
-
|
|
3
|
-
> Tài liệu **đi sâu vào bên trong** từng command của pipeline, theo đúng thứ tự thực thi. Mục tiêu: làm **cơ sở review, phân tích và tối ưu** các bước trong pipeline.
|
|
4
|
-
>
|
|
5
|
-
> Khác với [Pipeline Steps](../02-concepts/pipeline-steps/) (tầng khái niệm, gom theo phase), thư mục này bám **logic thực tế trong command file** (`commands/*.md`) — từng bước command làm gì, giải quyết vấn đề gì, và **điểm nào đáng cân nhắc tối ưu**.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Cách đọc (How to read)
|
|
10
|
-
|
|
11
|
-
Mỗi trang command theo cùng một khuôn:
|
|
12
|
-
|
|
13
|
-
| Mục | Nội dung |
|
|
14
|
-
|-----|----------|
|
|
15
|
-
| **Một câu** | Command làm gì |
|
|
16
|
-
| **Vấn đề giải quyết** | Tại sao command này tồn tại |
|
|
17
|
-
| **Vị trí & tiền đề** | Chạy sau gì, cần gì mở khoá |
|
|
18
|
-
| **Input / Output** | Đầu vào & sản phẩm cụ thể |
|
|
19
|
-
| **Các bước xử lý** | ⭐ Đi từng bước bên trong, dễ hiểu |
|
|
20
|
-
| **Checkpoint & Gate** | Điểm dừng con người |
|
|
21
|
-
| **Cơ chế đặc biệt** | Phần logic riêng đáng chú ý |
|
|
22
|
-
| **👓 Góc nhìn tối ưu** | Điểm review/optimize: chi phí, rủi ro, phụ thuộc |
|
|
23
|
-
| **Kết nối** | Bước trước ← → bước sau |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## ⭐ Bộ khung chung mọi command (Shared Skeleton)
|
|
28
|
-
|
|
29
|
-
**Đọc phần này trước.** Mọi command file được build từ `.tmpl` + `{{include:steps/*.md}}`, nên đều có **cùng một bộ khung** bao quanh logic riêng. Hiểu bộ khung một lần → các trang command chỉ cần nói phần **riêng**.
|
|
30
|
-
|
|
31
|
-
Cấu trúc một command file:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
┌─ Gate (steps/gate) ──────────── chung, giống hệt mọi lệnh
|
|
35
|
-
├─ Context Loader (steps/context-loader) ── chung, 7 bước
|
|
36
|
-
├─ Business Language Guard (steps/business-language) ── chung, chỉ lệnh viết doc nghiệp vụ
|
|
37
|
-
├─ ★ LOGIC RIÊNG CỦA LỆNH ★ ──── phần mỗi trang explain tập trung
|
|
38
|
-
└─ Report Footer (steps/report-footer) ── chung
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 1 · Gate — Cổng vào chuẩn (5 bước con)
|
|
42
|
-
|
|
43
|
-
Chạy **trước** mọi logic riêng:
|
|
44
|
-
|
|
45
|
-
| Bước | Tên | Việc | Ý nghĩa tối ưu |
|
|
46
|
-
|------|-----|------|----------------|
|
|
47
|
-
| 0 | **Sub-agent mode** | Nếu `$ARGUMENTS` là JSON có `_agent_mode` → bỏ Gate 1/2/3, chạy đúng phạm vi orchestrator giao (target_file, uc_id, uc_section, dimension) | Cơ chế fan-out per-UC dùng chính lệnh này làm "worker" |
|
|
48
|
-
| 0-B | **Model check** | Khuyến nghị Opus. `Y`=tiếp · `S`=bỏ qua (⚠️ report) · khác=DỪNG | Checkpoint mềm; sub-agent bỏ qua (orchestrator đã check) |
|
|
49
|
-
| 1 | **Target file** | Phân giải file mục tiêu từ path / UC-ID / ticket bằng glob theo bố cục feature-package; nhiều kết quả → hỏi | Điểm hay tốn 1 vòng hỏi khi `$ARGUMENTS` rỗng |
|
|
50
|
-
| 2 | **Context loader** | Chạy 7 bước nạp context (mục 2 dưới) | Nơi quyết định "đúng-đủ-gọn" — trọng tâm tối ưu |
|
|
51
|
-
| 3 | **CHECKPOINT** | Trình target + scope → chờ `Y` | Read-only command bỏ qua |
|
|
52
|
-
|
|
53
|
-
### 2 · Context Loader — "Thủ thư" (7 bước)
|
|
54
|
-
|
|
55
|
-
Nạp context theo thứ tự chống Lost-in-the-Middle (đầu = "build gì", giữa = ràng buộc, cuối = "follow style này"):
|
|
56
|
-
|
|
57
|
-
| Bước | Nạp gì | Ghi chú |
|
|
58
|
-
|------|--------|---------|
|
|
59
|
-
| 1 | **project-context.yaml** | tech_stack, conventions, domains, paths; trích `domain`/`prd_slug` từ path target |
|
|
60
|
-
| 1.5 | **Service routing** (umbrella) | Khớp domain → service; dạng phẳng (2a) hay map-theo-platform (2b); override paths sang `spec_source` |
|
|
61
|
-
| 1.6 | **Service conventions** (umbrella) | Nạp `build_command`/`test_command` riêng của service; set `service_root` |
|
|
62
|
-
| 2 | **Module stack-profile** | `.agent/modules/{module}/stack-profile.yaml` — layer/test pattern |
|
|
63
|
-
| 3 | **CLAUDE.md phân tầng** | root (BASE) + service overlay (stack) — **overlay thắng**; §2 layer/package, §3 naming, §5 error |
|
|
64
|
-
| 4 | **data-protection** | Pattern file nhạy cảm — cấm truy cập cả phiên |
|
|
65
|
-
| 5 | **Business dictionary** | Canonical + **banned terms** (thực thi chủ động) + enum registry |
|
|
66
|
-
| 6 | **Core entities** | Entity catalog + field registry + relationship map |
|
|
67
|
-
| 6.5 | **platform_type** | Suy `backend`/`web-frontend`/`mobile` từ module |
|
|
68
|
-
| 6.7 | **Project lessons** | Guardrail từ `/learn` — ràng buộc cứng ngang coding standards |
|
|
69
|
-
| 7 | **Recap** | In khối `[CTX LOADED]` — đẩy sự thật quan trọng lên cuối bộ nhớ |
|
|
70
|
-
|
|
71
|
-
> 👓 **Đây là component quyết định 80% chất lượng.** Khi review tối ưu: chú ý `required` vs `optional`, filter theo domain, và budget context (~50% window).
|
|
72
|
-
|
|
73
|
-
### 3 · Business Language Guard (chỉ lệnh viết doc nghiệp vụ)
|
|
74
|
-
|
|
75
|
-
Chặn thuật ngữ kỹ thuật rò vào PRD/BDD/product-definition. 4 nhóm xử lý: (1) tương tác/UI → diễn đạt lại nghiệp vụ · (2) visual thuần → chuyển Design Spec · (3) backend/contract → bỏ về Tech Docs · (4) ẩn dụ dữ liệu → xét ngữ cảnh (không thay máy móc). Áp cho `/define-product`, `/generate-prd`, `/refine-prd`, `/review-context`, `/generate-bdd`.
|
|
76
|
-
|
|
77
|
-
### 4 · Report Footer (mọi lệnh)
|
|
78
|
-
|
|
79
|
-
Kết thúc bằng: **Status badge** (✅/❌/⚠️) · **Output Artifacts** (file tạo/sửa) · **Pipeline Position** (`◀ bạn ở đây`) · **Next command** (gợi ý lệnh kế + tham số).
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Danh sách command theo thứ tự pipeline (Pipeline Order)
|
|
84
|
-
|
|
85
|
-
### Phase Setup & Discovery
|
|
86
|
-
- [00 · `/setup-ai-first`](00-setup-ai-first.md)
|
|
87
|
-
- [00b · `/generate-architecture`](00b-generate-architecture.md)
|
|
88
|
-
- [01 · `/define-product`](01-define-product.md)
|
|
89
|
-
|
|
90
|
-
### Phase Specification (PRD)
|
|
91
|
-
- [02 · `/generate-prd`](02-generate-prd.md)
|
|
92
|
-
- [02b · `/extend-prd`](02b-extend-prd.md) — thêm yêu cầu vào PRD **đã duyệt**
|
|
93
|
-
- [
|
|
94
|
-
- [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- [
|
|
99
|
-
- [
|
|
100
|
-
- [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- [
|
|
105
|
-
- [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- [
|
|
110
|
-
- [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- [
|
|
115
|
-
- [
|
|
116
|
-
- [
|
|
117
|
-
- [
|
|
118
|
-
- [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- [
|
|
127
|
-
- [
|
|
128
|
-
- [
|
|
129
|
-
- [
|
|
130
|
-
- [
|
|
131
|
-
- [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
1
|
+
# 🔬 Explain — Giải phẫu từng command (Command Deep-Dive)
|
|
2
|
+
|
|
3
|
+
> Tài liệu **đi sâu vào bên trong** từng command của pipeline, theo đúng thứ tự thực thi. Mục tiêu: làm **cơ sở review, phân tích và tối ưu** các bước trong pipeline.
|
|
4
|
+
>
|
|
5
|
+
> Khác với [Pipeline Steps](../02-concepts/pipeline-steps/) (tầng khái niệm, gom theo phase), thư mục này bám **logic thực tế trong command file** (`commands/*.md`) — từng bước command làm gì, giải quyết vấn đề gì, và **điểm nào đáng cân nhắc tối ưu**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Cách đọc (How to read)
|
|
10
|
+
|
|
11
|
+
Mỗi trang command theo cùng một khuôn:
|
|
12
|
+
|
|
13
|
+
| Mục | Nội dung |
|
|
14
|
+
|-----|----------|
|
|
15
|
+
| **Một câu** | Command làm gì |
|
|
16
|
+
| **Vấn đề giải quyết** | Tại sao command này tồn tại |
|
|
17
|
+
| **Vị trí & tiền đề** | Chạy sau gì, cần gì mở khoá |
|
|
18
|
+
| **Input / Output** | Đầu vào & sản phẩm cụ thể |
|
|
19
|
+
| **Các bước xử lý** | ⭐ Đi từng bước bên trong, dễ hiểu |
|
|
20
|
+
| **Checkpoint & Gate** | Điểm dừng con người |
|
|
21
|
+
| **Cơ chế đặc biệt** | Phần logic riêng đáng chú ý |
|
|
22
|
+
| **👓 Góc nhìn tối ưu** | Điểm review/optimize: chi phí, rủi ro, phụ thuộc |
|
|
23
|
+
| **Kết nối** | Bước trước ← → bước sau |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ⭐ Bộ khung chung mọi command (Shared Skeleton)
|
|
28
|
+
|
|
29
|
+
**Đọc phần này trước.** Mọi command file được build từ `.tmpl` + `{{include:steps/*.md}}`, nên đều có **cùng một bộ khung** bao quanh logic riêng. Hiểu bộ khung một lần → các trang command chỉ cần nói phần **riêng**.
|
|
30
|
+
|
|
31
|
+
Cấu trúc một command file:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
┌─ Gate (steps/gate) ──────────── chung, giống hệt mọi lệnh
|
|
35
|
+
├─ Context Loader (steps/context-loader) ── chung, 7 bước
|
|
36
|
+
├─ Business Language Guard (steps/business-language) ── chung, chỉ lệnh viết doc nghiệp vụ
|
|
37
|
+
├─ ★ LOGIC RIÊNG CỦA LỆNH ★ ──── phần mỗi trang explain tập trung
|
|
38
|
+
└─ Report Footer (steps/report-footer) ── chung
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 1 · Gate — Cổng vào chuẩn (5 bước con)
|
|
42
|
+
|
|
43
|
+
Chạy **trước** mọi logic riêng:
|
|
44
|
+
|
|
45
|
+
| Bước | Tên | Việc | Ý nghĩa tối ưu |
|
|
46
|
+
|------|-----|------|----------------|
|
|
47
|
+
| 0 | **Sub-agent mode** | Nếu `$ARGUMENTS` là JSON có `_agent_mode` → bỏ Gate 1/2/3, chạy đúng phạm vi orchestrator giao (target_file, uc_id, uc_section, dimension) | Cơ chế fan-out per-UC dùng chính lệnh này làm "worker" |
|
|
48
|
+
| 0-B | **Model check** | Khuyến nghị Opus. `Y`=tiếp · `S`=bỏ qua (⚠️ report) · khác=DỪNG | Checkpoint mềm; sub-agent bỏ qua (orchestrator đã check) |
|
|
49
|
+
| 1 | **Target file** | Phân giải file mục tiêu từ path / UC-ID / ticket bằng glob theo bố cục feature-package; nhiều kết quả → hỏi | Điểm hay tốn 1 vòng hỏi khi `$ARGUMENTS` rỗng |
|
|
50
|
+
| 2 | **Context loader** | Chạy 7 bước nạp context (mục 2 dưới) | Nơi quyết định "đúng-đủ-gọn" — trọng tâm tối ưu |
|
|
51
|
+
| 3 | **CHECKPOINT** | Trình target + scope → chờ `Y` | Read-only command bỏ qua |
|
|
52
|
+
|
|
53
|
+
### 2 · Context Loader — "Thủ thư" (7 bước)
|
|
54
|
+
|
|
55
|
+
Nạp context theo thứ tự chống Lost-in-the-Middle (đầu = "build gì", giữa = ràng buộc, cuối = "follow style này"):
|
|
56
|
+
|
|
57
|
+
| Bước | Nạp gì | Ghi chú |
|
|
58
|
+
|------|--------|---------|
|
|
59
|
+
| 1 | **project-context.yaml** | tech_stack, conventions, domains, paths; trích `domain`/`prd_slug` từ path target |
|
|
60
|
+
| 1.5 | **Service routing** (umbrella) | Khớp domain → service; dạng phẳng (2a) hay map-theo-platform (2b); override paths sang `spec_source` |
|
|
61
|
+
| 1.6 | **Service conventions** (umbrella) | Nạp `build_command`/`test_command` riêng của service; set `service_root` |
|
|
62
|
+
| 2 | **Module stack-profile** | `.agent/modules/{module}/stack-profile.yaml` — layer/test pattern |
|
|
63
|
+
| 3 | **CLAUDE.md phân tầng** | root (BASE) + service overlay (stack) — **overlay thắng**; §2 layer/package, §3 naming, §5 error |
|
|
64
|
+
| 4 | **data-protection** | Pattern file nhạy cảm — cấm truy cập cả phiên |
|
|
65
|
+
| 5 | **Business dictionary** | Canonical + **banned terms** (thực thi chủ động) + enum registry |
|
|
66
|
+
| 6 | **Core entities** | Entity catalog + field registry + relationship map |
|
|
67
|
+
| 6.5 | **platform_type** | Suy `backend`/`web-frontend`/`mobile` từ module |
|
|
68
|
+
| 6.7 | **Project lessons** | Guardrail từ `/learn` — ràng buộc cứng ngang coding standards |
|
|
69
|
+
| 7 | **Recap** | In khối `[CTX LOADED]` — đẩy sự thật quan trọng lên cuối bộ nhớ |
|
|
70
|
+
|
|
71
|
+
> 👓 **Đây là component quyết định 80% chất lượng.** Khi review tối ưu: chú ý `required` vs `optional`, filter theo domain, và budget context (~50% window).
|
|
72
|
+
|
|
73
|
+
### 3 · Business Language Guard (chỉ lệnh viết doc nghiệp vụ)
|
|
74
|
+
|
|
75
|
+
Chặn thuật ngữ kỹ thuật rò vào PRD/BDD/product-definition. 4 nhóm xử lý: (1) tương tác/UI → diễn đạt lại nghiệp vụ · (2) visual thuần → chuyển Design Spec · (3) backend/contract → bỏ về Tech Docs · (4) ẩn dụ dữ liệu → xét ngữ cảnh (không thay máy móc). Áp cho `/define-product`, `/generate-prd`, `/refine-prd`, `/review-context`, `/generate-bdd`.
|
|
76
|
+
|
|
77
|
+
### 4 · Report Footer (mọi lệnh)
|
|
78
|
+
|
|
79
|
+
Kết thúc bằng: **Status badge** (✅/❌/⚠️) · **Output Artifacts** (file tạo/sửa) · **Pipeline Position** (`◀ bạn ở đây`) · **Next command** (gợi ý lệnh kế + tham số).
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Danh sách command theo thứ tự pipeline (Pipeline Order)
|
|
84
|
+
|
|
85
|
+
### Phase Setup & Discovery
|
|
86
|
+
- [00 · `/setup-ai-first`](00-setup-ai-first.md)
|
|
87
|
+
- [00b · `/generate-architecture`](00b-generate-architecture.md)
|
|
88
|
+
- [01 · `/define-product`](01-define-product.md)
|
|
89
|
+
|
|
90
|
+
### Phase Specification (PRD)
|
|
91
|
+
- [02 · `/generate-prd`](02-generate-prd.md)
|
|
92
|
+
- [02b · `/extend-prd`](02b-extend-prd.md) — thêm yêu cầu vào PRD **đã duyệt**
|
|
93
|
+
- [02c · `/amend-prd`](02c-amend-prd.md) — **đổi** một yêu cầu đã duyệt (sửa tại chỗ)
|
|
94
|
+
- [03 · `/refine-prd`](03-refine-prd.md)
|
|
95
|
+
- [04 · `/review-context`](04-review-context.md) *(dùng cho cả PRD & BDD)*
|
|
96
|
+
|
|
97
|
+
### Phase Design
|
|
98
|
+
- [05 · `/generate-design-spec`](05-generate-design-spec.md)
|
|
99
|
+
- [06 · `/generate-bdd`](06-generate-bdd.md)
|
|
100
|
+
- [07 · `/generate-tech-docs`](07-generate-tech-docs.md)
|
|
101
|
+
- [08 · `/review-tech-docs`](08-review-tech-docs.md)
|
|
102
|
+
|
|
103
|
+
### Phase Implementation
|
|
104
|
+
- [09 · `/generate-code`](09-generate-code.md)
|
|
105
|
+
- [10 · `/review-code`](10-review-code.md)
|
|
106
|
+
- [11 · `/map-testids`](11-map-testids.md)
|
|
107
|
+
|
|
108
|
+
### Phase Dev Self-Test
|
|
109
|
+
- [12 · `/dev-gen-test`](12-dev-gen-test.md)
|
|
110
|
+
- [13 · `/dev-run-test`](13-dev-run-test.md)
|
|
111
|
+
- [14 · `/dev-smoke-test`](14-dev-smoke-test.md)
|
|
112
|
+
|
|
113
|
+
### Phase QC Automation
|
|
114
|
+
- [15 · `/qc-analyze`](15-qc-analyze.md)
|
|
115
|
+
- [16 · `/qc-plan`](16-qc-plan.md)
|
|
116
|
+
- [17 · `/qc-design-test`](17-qc-design-test.md)
|
|
117
|
+
- [18 · `/qc-review`](18-qc-review.md)
|
|
118
|
+
- [19 · `/qc-run-test`](19-qc-run-test.md)
|
|
119
|
+
- [20 · `/qc-report`](20-qc-report.md)
|
|
120
|
+
|
|
121
|
+
### Phase Trace & Quality
|
|
122
|
+
- [21 · `/validate-traces`](21-validate-traces.md)
|
|
123
|
+
- [22 · `/generate-spec-manifest`](22-generate-spec-manifest.md)
|
|
124
|
+
|
|
125
|
+
### Lệnh xuyên suốt (Cross-cutting)
|
|
126
|
+
- [23 · `/fix-bug`](23-fix-bug.md)
|
|
127
|
+
- [24 · `/debug`](24-debug.md)
|
|
128
|
+
- [25 · `/report-bug`](25-report-bug.md)
|
|
129
|
+
- [26 · `/propose-scenario`](26-propose-scenario.md)
|
|
130
|
+
- [27 · `/learn`](27-learn.md)
|
|
131
|
+
- [28 · `/sync`](28-sync.md)
|
|
132
|
+
- [29 · `/update-framework`](29-update-framework.md)
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
*Nguồn: `commands/*.md` (build từ `.tmpl` + `steps/`). Khi command đổi, cập nhật trang tương ứng ở đây.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@educa-corp/sdd-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Spec Driven Development workflow framework for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sdd-framework": "./bin/index.js"
|
|
@@ -19,15 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"bin/",
|
|
22
|
-
"commands/",
|
|
23
22
|
"core/",
|
|
24
|
-
"hooks/",
|
|
25
|
-
"modules/",
|
|
26
|
-
"rules/",
|
|
27
23
|
"scripts/",
|
|
28
|
-
"skills/",
|
|
29
|
-
"steps/",
|
|
30
|
-
"templates/",
|
|
31
24
|
"docs/"
|
|
32
25
|
],
|
|
33
26
|
"keywords": [
|