@educa-corp/sdd-framework 0.5.0 → 0.7.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 +113 -19
- package/bin/gate-trace.js +487 -0
- package/bin/index.js +445 -146
- package/bin/lint-trace.js +643 -0
- package/bin/self-check.js +804 -2
- package/bin/trace-schema.json +621 -10
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/README.md +20 -0
- package/core/commands/amend-prd.md +518 -0
- package/core/commands/debug.md +123 -511
- package/core/commands/define-product.md +86 -510
- package/core/commands/dev-gen-test.md +86 -510
- package/core/commands/dev-run-test.md +133 -519
- package/core/commands/dev-smoke-test.md +86 -510
- package/core/commands/extend-prd.md +128 -522
- package/core/commands/fix-bug.md +118 -509
- package/core/commands/generate-architecture.md +94 -515
- package/core/commands/generate-bdd.md +128 -513
- package/core/commands/generate-code.md +119 -510
- package/core/commands/generate-design-spec.md +86 -510
- package/core/commands/generate-prd.md +89 -510
- package/core/commands/generate-spec-manifest.md +86 -510
- package/core/commands/generate-tech-docs.md +120 -512
- package/core/commands/learn.md +172 -496
- package/core/commands/map-testids.md +86 -510
- package/core/commands/propose-scenario.md +86 -510
- package/core/commands/qc-analyze.md +86 -510
- package/core/commands/qc-design-test.md +86 -510
- package/core/commands/qc-plan.md +86 -510
- package/core/commands/qc-report.md +86 -510
- package/core/commands/qc-review.md +86 -510
- package/core/commands/qc-run-test.md +115 -513
- package/core/commands/refine-prd.md +112 -522
- package/core/commands/report-bug.md +86 -510
- package/core/commands/review-code.md +123 -511
- package/core/commands/review-context.md +136 -522
- package/core/commands/review-tech-docs.md +90 -511
- package/core/commands/setup-ai-first.md +166 -138
- package/core/commands/sync.md +155 -107
- package/core/commands/update-framework.md +16 -103
- package/core/commands/validate-traces.md +426 -511
- package/core/hooks/data-guard.js +174 -83
- package/core/hooks/settings.json +2 -1
- package/core/rules/workflow.md +64 -4
- package/core/steps/capture-lesson.md +34 -1
- package/core/steps/context-loader.md +50 -8
- package/core/steps/gate.md +92 -35
- package/core/steps/report-footer.md +23 -0
- package/core/templates/README.md +24 -1
- package/core/templates/ci/trace-gate.yml +146 -0
- package/core/templates/feature.template +1 -1
- package/core/templates/hooks/pre-push +61 -0
- package/docs/02-concepts/architecture.md +61 -6
- package/docs/02-concepts/traceability.md +57 -0
- package/docs/03-guides/architect.md +63 -0
- package/docs/04-reference/commands.md +148 -134
- package/docs/04-reference/model-selection.md +32 -19
- package/docs/04-reference/trace-schema.md +39 -0
- package/docs/explain/02b-extend-prd.md +1 -1
- package/docs/explain/02c-amend-prd.md +152 -0
- package/docs/explain/21-validate-traces.md +2 -1
- package/docs/explain/27-learn.md +5 -3
- package/docs/explain/28-sync.md +25 -0
- package/docs/explain/README.md +136 -135
- package/package.json +5 -9
- package/commands/debug.md +0 -917
- package/commands/debug.tmpl +0 -257
- package/commands/define-product.md +0 -862
- package/commands/define-product.tmpl +0 -225
- package/commands/dev-gen-test.md +0 -1124
- package/commands/dev-gen-test.tmpl +0 -490
- package/commands/dev-run-test.md +0 -859
- package/commands/dev-run-test.tmpl +0 -225
- package/commands/dev-smoke-test.md +0 -798
- package/commands/dev-smoke-test.tmpl +0 -217
- package/commands/extend-prd.md +0 -907
- package/commands/extend-prd.tmpl +0 -270
- package/commands/fix-bug.md +0 -910
- package/commands/fix-bug.tmpl +0 -197
- package/commands/generate-architecture.md +0 -775
- package/commands/generate-architecture.tmpl +0 -194
- package/commands/generate-bdd.md +0 -1347
- package/commands/generate-bdd.tmpl +0 -590
- package/commands/generate-code.md +0 -1283
- package/commands/generate-code.tmpl +0 -649
- package/commands/generate-design-spec.md +0 -1161
- package/commands/generate-design-spec.tmpl +0 -524
- package/commands/generate-prd.md +0 -1143
- package/commands/generate-prd.tmpl +0 -223
- package/commands/generate-spec-manifest.md +0 -745
- package/commands/generate-spec-manifest.tmpl +0 -164
- package/commands/generate-tech-docs.md +0 -1344
- package/commands/generate-tech-docs.tmpl +0 -273
- package/commands/learn.md +0 -723
- package/commands/learn.tmpl +0 -63
- package/commands/map-testids.md +0 -662
- package/commands/map-testids.tmpl +0 -81
- package/commands/propose-scenario.md +0 -783
- package/commands/propose-scenario.tmpl +0 -202
- package/commands/qc-analyze.md +0 -693
- package/commands/qc-analyze.tmpl +0 -112
- package/commands/qc-design-test.md +0 -650
- package/commands/qc-design-test.tmpl +0 -69
- package/commands/qc-plan.md +0 -630
- package/commands/qc-plan.tmpl +0 -49
- package/commands/qc-report.md +0 -641
- package/commands/qc-report.tmpl +0 -60
- package/commands/qc-review.md +0 -634
- package/commands/qc-review.tmpl +0 -53
- package/commands/qc-run-test.md +0 -750
- package/commands/qc-run-test.tmpl +0 -116
- package/commands/refine-prd.md +0 -1074
- package/commands/refine-prd.tmpl +0 -278
- package/commands/report-bug.md +0 -729
- package/commands/report-bug.tmpl +0 -148
- package/commands/review-code.md +0 -803
- package/commands/review-code.tmpl +0 -143
- package/commands/review-context.md +0 -1323
- package/commands/review-context.tmpl +0 -527
- package/commands/review-tech-docs.md +0 -982
- package/commands/review-tech-docs.tmpl +0 -401
- package/commands/setup-ai-first.md +0 -574
- package/commands/setup-ai-first.tmpl +0 -378
- package/commands/sync.md +0 -486
- package/commands/sync.tmpl +0 -384
- package/commands/update-framework.md +0 -290
- package/commands/update-framework.tmpl +0 -188
- package/commands/validate-traces.md +0 -1435
- package/commands/validate-traces.tmpl +0 -854
- package/hooks/data-guard.js +0 -141
- package/hooks/settings.json +0 -18
- 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 -73
- package/scripts/init.sh +0 -49
- package/scripts/upgrade.sh +0 -94
- 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 -79
- package/steps/context-loader.md +0 -385
- package/steps/gate.md +0 -94
- package/steps/report-footer.md +0 -102
- 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 -47
- package/templates/architecture.template.md +0 -394
- package/templates/design-spec.template.md +0 -217
- package/templates/feature.template +0 -123
- 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
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# {TICKET-ID} Product Definition — {Feature Name}
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
Template này được dùng bởi workflow /define-product.
|
|
5
|
-
AI Agent điền từng section qua Q&A theo từng phase với PO.
|
|
6
|
-
Output là input có cấu trúc cho /generate-prd.
|
|
7
|
-
|
|
8
|
-
QUY TẮC:
|
|
9
|
-
- Mỗi section tương ứng với 1 phase trong workflow
|
|
10
|
-
- Section chưa đủ → giữ placeholder, KHÔNG được sang phase tiếp theo
|
|
11
|
-
- Trạng thái xác nhận của PO được ghi trong mỗi section
|
|
12
|
-
-->
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Metadata
|
|
17
|
-
|
|
18
|
-
| Field | Value |
|
|
19
|
-
|--------------------|--------------------------------|
|
|
20
|
-
| **Ticket** | {TICKET-ID} |
|
|
21
|
-
| **Feature** | {tên tính năng} |
|
|
22
|
-
| **Domain** | {domain} |
|
|
23
|
-
| **PO** | {tên PO} |
|
|
24
|
-
| **Created** | {YYYY-MM-DD} |
|
|
25
|
-
| **Status** | in-progress / completed |
|
|
26
|
-
| **Completed Phase**| {số phase hoàn thành gần nhất} |
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Phase 0: Đồng bộ tri thức (Knowledge Sync)
|
|
31
|
-
|
|
32
|
-
> ⚙️ AI tự thu thập — đây là **bối cảnh hệ thống**, KHÔNG phải yêu cầu nghiệp vụ do PO viết. Mục đích: chuẩn hoá thuật ngữ và nhận biết phần đã có để tái sử dụng. Không cần input từ PO.
|
|
33
|
-
|
|
34
|
-
### Khái niệm / dữ liệu nghiệp vụ liên quan
|
|
35
|
-
- {Khái niệm 1} — {mô tả ngắn}
|
|
36
|
-
- {Khái niệm 2} — {mô tả ngắn}
|
|
37
|
-
|
|
38
|
-
### Phần hệ thống / feature liên quan
|
|
39
|
-
- {Phần 1}
|
|
40
|
-
- {Phần 2}
|
|
41
|
-
|
|
42
|
-
### Rule / Logic có sẵn
|
|
43
|
-
- {Rule/logic từ các PRD có sẵn hoặc domain knowledge}
|
|
44
|
-
|
|
45
|
-
### Chuẩn hoá thuật ngữ
|
|
46
|
-
| Thuật ngữ trong input PO | Thuật ngữ chuẩn (business-dictionary) |
|
|
47
|
-
|--------------------------|---------------------------------------|
|
|
48
|
-
| {thuật ngữ gốc} | {thuật ngữ chuẩn} |
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Phase 1: Định nghĩa tính năng (Feature Definition)
|
|
53
|
-
|
|
54
|
-
> ✅ PO xác nhận: {Có/Không}
|
|
55
|
-
|
|
56
|
-
### Bối cảnh (Context)
|
|
57
|
-
{Bối cảnh nghiệp vụ dẫn đến tính năng này}
|
|
58
|
-
|
|
59
|
-
### Tuyên bố vấn đề (Problem Statement)
|
|
60
|
-
{Vấn đề cần giải quyết}
|
|
61
|
-
|
|
62
|
-
### Mục tiêu (Goal)
|
|
63
|
-
{Mục tiêu của tính năng}
|
|
64
|
-
|
|
65
|
-
### Actor
|
|
66
|
-
| Actor | Vai trò | Chính/Phụ |
|
|
67
|
-
|----------|--------------------|-----------|
|
|
68
|
-
| {Actor} | {mô tả vai trò} | Primary |
|
|
69
|
-
|
|
70
|
-
### Phạm vi (In Scope)
|
|
71
|
-
- {Chức năng 1}
|
|
72
|
-
- {Chức năng 2}
|
|
73
|
-
|
|
74
|
-
### Ngoài phạm vi (Out of Scope)
|
|
75
|
-
- {Hạng mục KHÔNG làm trong ticket này — kèm lý do / để dành pha sau}
|
|
76
|
-
|
|
77
|
-
### User Story
|
|
78
|
-
- **Là một (As a)** {vai trò}
|
|
79
|
-
- **Tôi muốn (I want to)** {mục tiêu}
|
|
80
|
-
- **Để (So that)** {giá trị nghiệp vụ}
|
|
81
|
-
|
|
82
|
-
### Phụ thuộc liên service *(mức nghiệp vụ)*
|
|
83
|
-
|
|
84
|
-
> Feature này cần **dữ liệu/năng lực** gì từ feature/team khác — KHÔNG mô tả API/event/callback (đó là kỹ thuật, thuộc Tech-docs).
|
|
85
|
-
|
|
86
|
-
- {Cần {dữ liệu/năng lực} từ {feature/team} — vì {lý do nghiệp vụ}} — hoặc "Không có"
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Phase 2: Định nghĩa User Flow
|
|
91
|
-
|
|
92
|
-
> ✅ PO xác nhận: {Có/Không}
|
|
93
|
-
|
|
94
|
-
### Điểm vào (Entry Point)
|
|
95
|
-
{Người dùng bắt đầu tương tác với tính năng như thế nào}
|
|
96
|
-
|
|
97
|
-
### Các bước của Flow
|
|
98
|
-
| Bước | Hành động | Trạng thái/Kết quả nghiệp vụ | Ghi chú |
|
|
99
|
-
|------|-----------------|------------------------------|------------|
|
|
100
|
-
| 1 | {hành động} | {trạng thái/kết quả nghiệp vụ} | {ghi chú} |
|
|
101
|
-
| 2 | {hành động} | {trạng thái/kết quả nghiệp vụ} | {ghi chú} |
|
|
102
|
-
|
|
103
|
-
### Màn hình & thành phần chính
|
|
104
|
-
> Mức nghiệp vụ — nguồn cho Wireframe PRD (§4b) và độ phủ BDD (C.1). KHÔNG pixel/layout/màu.
|
|
105
|
-
|
|
106
|
-
| Màn hình | Thành phần chính | Hành động → kết quả nghiệp vụ |
|
|
107
|
-
|----------|------------------|-------------------------------|
|
|
108
|
-
| {màn 1} | {thành phần} | {hành động → kết quả} |
|
|
109
|
-
|
|
110
|
-
### Điểm ra (Exit Point)
|
|
111
|
-
{Kết quả cuối khi flow hoàn thành}
|
|
112
|
-
|
|
113
|
-
### Edge Cases / Luồng lỗi & ngoại lệ
|
|
114
|
-
> Các kịch bản thất bại nghiệp vụ ngoài happy path — input thiếu, điều kiện không thoả, thao tác đồng thời, phụ thuộc không sẵn sàng.
|
|
115
|
-
- {Kịch bản: khi {điều kiện bất thường} → {kết quả nghiệp vụ kỳ vọng}}
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Phase 3: Nhật ký làm rõ (Clarification Log)
|
|
120
|
-
|
|
121
|
-
> Ghi lại mọi câu hỏi và câu trả lời qua các vòng.
|
|
122
|
-
|
|
123
|
-
### Vòng {N}
|
|
124
|
-
| # | Nhóm | Câu hỏi | PO trả lời |
|
|
125
|
-
|---|----------|------------|------------|
|
|
126
|
-
| 1 | Context | {câu hỏi} | {trả lời} |
|
|
127
|
-
| 2 | Flow | {câu hỏi} | {trả lời} |
|
|
128
|
-
| 3 | Logic | {câu hỏi} | {trả lời} |
|
|
129
|
-
|
|
130
|
-
### Mục chưa giải quyết
|
|
131
|
-
- {Mục chưa giải quyết — nếu còn tồn đọng, KHÔNG được sang Phase 4}
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## Phase 4: Business Rules
|
|
136
|
-
|
|
137
|
-
> ✅ PO xác nhận: {Có/Không}
|
|
138
|
-
|
|
139
|
-
| Rule ID | Hành động/Trigger | Quy tắc | Điều kiện |
|
|
140
|
-
|---------|---------------------|---------------------|------------------------|
|
|
141
|
-
| BR-1 | {hành động từ flow} | {business rule} | {điều kiện áp dụng} |
|
|
142
|
-
| BR-2 | {hành động từ flow} | {business rule} | {điều kiện áp dụng} |
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Phase 5: Business Logic
|
|
147
|
-
|
|
148
|
-
> ✅ PO xác nhận: {Có/Không}
|
|
149
|
-
|
|
150
|
-
| Rule ID | Logic nghiệp vụ (rẽ nhánh / công thức / điều kiện) | Thông báo/kết quả nghiệp vụ khi lỗi |
|
|
151
|
-
|---------|---------------------------------------------------|-------------------------------------|
|
|
152
|
-
| BR-1 | {logic nghiệp vụ khi rule kích hoạt} | {vd: báo "Số dư không đủ"} |
|
|
153
|
-
| BR-2 | {logic nghiệp vụ khi rule kích hoạt} | {…} |
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Phase 6: Acceptance Criteria
|
|
158
|
-
|
|
159
|
-
> ✅ PO xác nhận: {Có/Không}
|
|
160
|
-
|
|
161
|
-
| AC ID | Mô tả | Hành vi kỳ vọng | Bắt nguồn từ |
|
|
162
|
-
|-------|------------------------|---------------------------|--------------|
|
|
163
|
-
| AC-1 | {mô tả tiêu chí} | {hành vi kỳ vọng} | BR-{N} |
|
|
164
|
-
| AC-2 | {mô tả tiêu chí} | {hành vi kỳ vọng} | BR-{N} |
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Phase 7: Báo cáo kiểm chứng (Validation Report)
|
|
169
|
-
|
|
170
|
-
### Ma trận độ phủ (Coverage Matrix)
|
|
171
|
-
| Hành động Flow | Có Rule? | Có Logic? | Có AC? | Status |
|
|
172
|
-
|----------------|----------|-----------|--------|--------|
|
|
173
|
-
| {Hành động 1} | ✅/❌ | ✅/❌ | ✅/❌ | OK/GAP |
|
|
174
|
-
|
|
175
|
-
### Xung đột phát hiện
|
|
176
|
-
- {Mô tả xung đột — hoặc "None"}
|
|
177
|
-
|
|
178
|
-
### Mục còn thiếu
|
|
179
|
-
- {Rule/AC/logic còn thiếu — hoặc "None"}
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
<!--
|
|
184
|
-
NEXT STEPS:
|
|
185
|
-
Khi Product Definition hoàn tất (Status: completed), chạy:
|
|
186
|
-
/generate-prd {path-to-this-file}
|
|
187
|
-
để sinh PRD từ Product Definition này.
|
|
188
|
-
-->
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
# =============================================================
|
|
2
|
-
# Project Context — SDD Framework
|
|
3
|
-
# =============================================================
|
|
4
|
-
# This is the SINGLE SOURCE OF TRUTH for project-specific
|
|
5
|
-
# paths, tools, and routing used by all workflows.
|
|
6
|
-
#
|
|
7
|
-
# Workflows reference this file for WHERE to find things.
|
|
8
|
-
# Workflow steps define WHAT to do (universal best practices).
|
|
9
|
-
# =============================================================
|
|
10
|
-
#
|
|
11
|
-
# HOW AI AGENTS USE THIS FILE:
|
|
12
|
-
# 1. Open this file at the start of any workflow
|
|
13
|
-
# 2. Parse the YAML structure
|
|
14
|
-
# 3. When a workflow says "→ key.subkey", look up that key
|
|
15
|
-
# and use the resolved value as the actual path
|
|
16
|
-
# 4. All paths are RELATIVE to workspace root
|
|
17
|
-
# 5. For "{domain}", substitute the feature's domain (PRD: row `Domain` in Metadata / folder path; .feature: @trace.domain)
|
|
18
|
-
# =============================================================
|
|
19
|
-
|
|
20
|
-
project:
|
|
21
|
-
name: "{{PROJECT_NAME}}"
|
|
22
|
-
description: "{{PROJECT_DESCRIPTION}}"
|
|
23
|
-
|
|
24
|
-
# ----- File Paths -----
|
|
25
|
-
# All paths are relative to workspace root.
|
|
26
|
-
paths:
|
|
27
|
-
# Feature-Package Layout:
|
|
28
|
-
# specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md — PRD document
|
|
29
|
-
# specs/{domain}/{prd-slug}/bdd/{platform}/ — BDD .feature ({platform} = web | app | system)
|
|
30
|
-
# specs/{domain}/{prd-slug}/tech-docs/ — Technical design (ONE merged doc per PRD: {TICKET-ID}-tech-design.md)
|
|
31
|
-
# specs/{domain}/{prd-slug}/design-spec/ — Design specs (FE/App only)
|
|
32
|
-
# specs/{domain}/{prd-slug}/changelog/ — PRD changelog overflow (created once history exceeds 5 versions)
|
|
33
|
-
# .trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv — Trace state (ONE book per UC × platform)
|
|
34
|
-
#
|
|
35
|
-
# The {platform} segment is NOT optional — in any mode, including umbrella.
|
|
36
|
-
# A UC's `web` and `system` features are two different files; without the segment they
|
|
37
|
-
# collide on one filename and overwrite each other. Trace is split the same way, so the
|
|
38
|
-
# spec layout has to match it. Every .feature also carries `@trace.platform` matching
|
|
39
|
-
# its own {platform} segment. (Projects still on the old flat bdd/ layout:
|
|
40
|
-
# run `npx @educa-corp/sdd-framework --migrate-bdd-platform` — dry-run by default.)
|
|
41
|
-
#
|
|
42
|
-
# specs_dir is the unified root for all spec artifact types (PRD, BDD, tech-docs, design-spec).
|
|
43
|
-
# prd-slug is derived from the PRD folder path — not a separate config variable.
|
|
44
|
-
specs_dir: "specs"
|
|
45
|
-
|
|
46
|
-
# Source code root — gốc mã nguồn của service/app này (nơi generate-code đặt & quét code).
|
|
47
|
-
# BE thường suy vị trí từ CLAUDE.md §2 (code_base_package + layer); src_dir là gốc chung,
|
|
48
|
-
# và là NGUỒN CHÍNH cho FE (component/hook/service/adapter) + phạm vi quét reuse (DS5).
|
|
49
|
-
# Ví dụ: "src" (mono FE), "app/src", "src/main/java" (BE). Chỉnh theo layout thật của repo.
|
|
50
|
-
src_dir: "src"
|
|
51
|
-
|
|
52
|
-
# ── Template artifact — KHÔNG cấu hình được ──
|
|
53
|
-
# Đã bỏ 6 key chết (không lệnh nào đọc): feature_template · prd_template ·
|
|
54
|
-
# templates_dir · bdd_writing_guide · product_definition_template · trace_report.
|
|
55
|
-
# Các skeleton được {{include}} NƯỚNG CỨNG vào file lệnh lúc `npm run build`,
|
|
56
|
-
# nên lệnh không bao giờ đọc một path template lúc chạy.
|
|
57
|
-
# (trace_report còn trỏ sai hẳn: report thật là {trace_dir}/trace-report.json.)
|
|
58
|
-
#
|
|
59
|
-
# Đổi cấu trúc .feature / PRD sinh ra = sửa templates/*.template* TRONG REPO
|
|
60
|
-
# FRAMEWORK rồi build lại. Sửa .agent/templates/* trong project KHÔNG có tác
|
|
61
|
-
# dụng, và sẽ bị GHI ĐÈ IM LẶNG ở lần /update-framework kế tiếp (--init copy
|
|
62
|
-
# core/ → .agent/ vô điều kiện; file duy nhất được giữ là .agent/project-context.yaml).
|
|
63
|
-
refinement_dir: ".agent/review"
|
|
64
|
-
|
|
65
|
-
# QC's OWN analysis/design working docs (qc-analyze/plan/design-test outputs:
|
|
66
|
-
# REQUIREMENT_ANALYSIS.md, DOC_GAPS.md, TEST_PLAN.md, test-cases/*.Test.md).
|
|
67
|
-
# One subfolder per UC: {qc_dir}/{UC-ID}/. Default "docs" (the QC team's own
|
|
68
|
-
# convention), VISIBLE — not hidden under .agent/. NOTE: specs (PRD / .feature /
|
|
69
|
-
# design-spec) are NOT here — they come from the PO spec submodule (spec_source).
|
|
70
|
-
qc_dir: "docs"
|
|
71
|
-
|
|
72
|
-
# WHERE the qc-* commands LOAD their skills from (qa-analyst / qa-designer / qa-planner
|
|
73
|
-
# / qa-reviewer / qa-runner + DOC_GAPS.template.md). Default = the framework-bundled
|
|
74
|
-
# copy at .agent/skills/qc (works standalone). The QC team OWNS these skills in their
|
|
75
|
-
# canonical repo (ai-automation-qc-base) — point this at that repo/submodule (e.g.
|
|
76
|
-
# "qc-base/.claude/skills") so the skills evolve INDEPENDENTLY and are NOT overwritten
|
|
77
|
-
# by framework upgrade (--init / upgrade.sh rewrite only .agent/, never this path).
|
|
78
|
-
qc_skills_dir: ".agent/skills/qc"
|
|
79
|
-
|
|
80
|
-
# Product Definitions
|
|
81
|
-
product_definitions_dir: "specs/product-definition"
|
|
82
|
-
|
|
83
|
-
# Domain Knowledge
|
|
84
|
-
domain_knowledge_dir: "specs/domain-knowledge"
|
|
85
|
-
business_dictionary: "specs/domain-knowledge/business-dictionary.md"
|
|
86
|
-
core_entities: "specs/domain-knowledge/core-entities.md"
|
|
87
|
-
|
|
88
|
-
# Project Lessons (guardrails accumulated via /learn — loaded by context-loader Step 6.7)
|
|
89
|
-
# Single-service default below. In umbrella/service mode, set this in each service's
|
|
90
|
-
# .agent/project-context.yaml to ".agent/project-lessons.md" (resolved per service_root).
|
|
91
|
-
lessons_file: "specs/domain-knowledge/lessons-learned.md"
|
|
92
|
-
|
|
93
|
-
# Tech Docs (BE-authored API contract).
|
|
94
|
-
# Merged into specs_dir in the feature-package layout:
|
|
95
|
-
# tech-docs live at specs/{domain}/{prd-slug}/tech-docs/.
|
|
96
|
-
# In umbrella mode with spec_source set, context-loader auto-routes this to
|
|
97
|
-
# {spec_source}/specs so FE/App read the contract via the spec submodule.
|
|
98
|
-
tech_docs_dir: "specs"
|
|
99
|
-
|
|
100
|
-
# Design Specs (FE/App platforms only — web, app).
|
|
101
|
-
# In the feature-package layout, design-specs live at specs/{domain}/{prd-slug}/design-spec/.
|
|
102
|
-
# This variable is no longer needed as a separate path — derived from specs_dir.
|
|
103
|
-
# design_spec_dir: "specs/design-spec" ← removed; use specs_dir instead
|
|
104
|
-
|
|
105
|
-
# Trace (internal structure: .trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv — one book per UC × platform)
|
|
106
|
-
trace_dir: ".trace"
|
|
107
|
-
|
|
108
|
-
# Tester / QC feedback (written by /report-bug and /propose-scenario).
|
|
109
|
-
# These live in the SHARED spec repo so PO/Dev see them on their next /sync.
|
|
110
|
-
# In umbrella mode, context-loader auto-resolves them under {spec_source}/feedback/.
|
|
111
|
-
bug_reports_dir: "feedback/bug-reports"
|
|
112
|
-
bdd_proposals_dir: "feedback/bdd-proposals"
|
|
113
|
-
# PRD change requests (new requirement found in test, not covered by any AC) —
|
|
114
|
-
# written by /propose-scenario Case B so the PO can add/extend an AC then re-/generate-bdd.
|
|
115
|
-
prd_change_requests_dir: "feedback/prd-change-requests"
|
|
116
|
-
|
|
117
|
-
tech_stack:
|
|
118
|
-
language: "{{LANGUAGE}}" # e.g., Java 17 / TypeScript / C# / Go
|
|
119
|
-
framework: "{{FRAMEWORK}}" # e.g., Spring Boot 3.2 / Angular 17 / .NET 8
|
|
120
|
-
build_tool: "{{BUILD_TOOL}}" # e.g., Maven / npm / dotnet / go
|
|
121
|
-
test_framework: "{{TEST_FRAMEWORK}}" # e.g., JUnit 5 + Mockito / Jest / xUnit
|
|
122
|
-
database: "{{DATABASE}}" # e.g., PostgreSQL / MySQL / MongoDB
|
|
123
|
-
module: "{{MODULE}}" # e.g., java-spring / angular / dotnet / golang / context-engineering
|
|
124
|
-
|
|
125
|
-
conventions:
|
|
126
|
-
build_command: "{{BUILD_COMMAND}}" # e.g., mvn clean install -DskipTests
|
|
127
|
-
test_command: "{{TEST_COMMAND}}" # e.g., mvn test
|
|
128
|
-
service_run: "{{RUN_COMMAND}}" # e.g., mvn spring-boot:run
|
|
129
|
-
ticket_prefix: "{{TICKET_PREFIX}}" # e.g., PROJ / FEAT / UC
|
|
130
|
-
|
|
131
|
-
domains:
|
|
132
|
-
- "{{DOMAIN_1}}"
|
|
133
|
-
# - "{{DOMAIN_2}}"
|
|
134
|
-
|
|
135
|
-
# ----- Multi-Service / Umbrella Setup -----
|
|
136
|
-
# Fill this section ONLY if this is an UMBRELLA repo that contains multiple
|
|
137
|
-
# service submodules. Leave commented out for single-service projects.
|
|
138
|
-
#
|
|
139
|
-
# setup:
|
|
140
|
-
# mode: umbrella # "umbrella" | "single" (default: single)
|
|
141
|
-
# spec_source: "{{SPEC_SUBMODULE_PATH}}" # path to PO spec submodule, e.g. "free-trial-specs"
|
|
142
|
-
#
|
|
143
|
-
# When spec_source is set, context-loader auto-derives (ALL specs live in the spec repo
|
|
144
|
-
# using the feature-package layout; service submodules hold only code):
|
|
145
|
-
# specs_dir → {spec_source}/specs # unified root — PRD/BDD/tech-docs/design-spec
|
|
146
|
-
# tech_docs_dir → {spec_source}/specs # merged into specs_dir
|
|
147
|
-
# domain_knowledge_dir → {spec_source}/specs/domain-knowledge
|
|
148
|
-
# trace_dir → {spec_source}/.trace # structure: .trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv
|
|
149
|
-
# (You can still override these manually in paths: section below.)
|
|
150
|
-
# With spec_source set, only ONE override is needed instead of four separate dir vars.
|
|
151
|
-
#
|
|
152
|
-
# services: # domain → service submodule routing
|
|
153
|
-
# # Each domain key MUST match the PRD's `Domain` (Metadata row) / folder path segment.
|
|
154
|
-
# # A domain value has THREE forms — context-loader (Step 1.5) auto-detects in this order:
|
|
155
|
-
# # has `path` → FORM A (resolved)
|
|
156
|
-
# # has `by_prd_slug` → FORM C (look up one more level)
|
|
157
|
-
# # otherwise → FORM B (per-platform map)
|
|
158
|
-
# #
|
|
159
|
-
# # FORM A — FLAT (one domain ↔ one submodule, all platforms):
|
|
160
|
-
# {{DOMAIN_1}}:
|
|
161
|
-
# path: "{{SERVICE_SUBMODULE_DIR}}" # relative path to service submodule (code + .trace/)
|
|
162
|
-
# module: "{{STACK_MODULE}}" # e.g., java-spring, nextjs, flutter
|
|
163
|
-
# #
|
|
164
|
-
# # FORM B — PER-PLATFORM MAP (one business-domain implemented on several platforms /
|
|
165
|
-
# # submodules — a merged monorepo/workspace). No direct `path`; instead one
|
|
166
|
-
# # sub-key per platform (system | web | app). context-loader routes by the
|
|
167
|
-
# # target .feature's @trace.platform → picks {path, module} for that platform.
|
|
168
|
-
# # The PRD keeps a SINGLE business @trace.domain (do NOT invent onboarding-web).
|
|
169
|
-
# {{DOMAIN_2}}:
|
|
170
|
-
# system: { path: "{{BE_SUBMODULE_DIR}}", module: "java-spring" }
|
|
171
|
-
# web: { path: "{{WEB_SUBMODULE_DIR}}", module: "nextjs" }
|
|
172
|
-
# app: { path: "{{APP_SUBMODULE_DIR}}", module: "flutter" }
|
|
173
|
-
# #
|
|
174
|
-
# # FORM C — PER-PRD_SLUG MAP (one routing cell ↔ MANY submodules, one per feature-package).
|
|
175
|
-
# # Use when a platform — or a whole domain — is split into one repo per feature,
|
|
176
|
-
# # e.g. each webview mini-game lives in its own repo. No `path`; instead a
|
|
177
|
-
# # `by_prd_slug` table keyed by the feature-package folder name. context-loader
|
|
178
|
-
# # already extracted prd_slug in Step 1, so no extra detection is needed.
|
|
179
|
-
# # Valid at BOTH levels: directly under the domain, or nested under a platform.
|
|
180
|
-
# {{DOMAIN_3}}:
|
|
181
|
-
# system: { path: "{{BE_SUBMODULE_DIR}}", module: "java-spring" } # normal entry
|
|
182
|
-
# webview: # this cell → many repos
|
|
183
|
-
# by_prd_slug:
|
|
184
|
-
# {{PRD_SLUG_1}}: { path: "games/{{GAME_1}}", module: "phaser-game" }
|
|
185
|
-
# {{PRD_SLUG_2}}: { path: "games/{{GAME_2}}", module: "phaser-game" }
|
|
186
|
-
# # A prd_slug with no entry → active_service = unresolved (the command STOPS rather than
|
|
187
|
-
# # guessing a lookalike repo). An entry with BOTH `path` and `by_prd_slug` is a config
|
|
188
|
-
# # error, as is nesting `by_prd_slug` inside `by_prd_slug`.
|
|
189
|
-
# #
|
|
190
|
-
# # NOTE: with spec_source set, BDD + tech-docs are cross-team and live in the spec repo —
|
|
191
|
-
# # do NOT pin per-service specs_dir / tech_docs_dir here (they would be ignored).
|
|
192
|
-
# # Per-service specs_dir / tech_docs_dir apply ONLY when there is no spec_source.
|
|
193
|
-
#
|
|
194
|
-
# IMPORTANT — per-service CLAUDE.md:
|
|
195
|
-
# Each service submodule should have its OWN CLAUDE.md ({path}/CLAUDE.md) defining its
|
|
196
|
-
# architecture + coding standards for ITS stack. context-loader loads CLAUDE.md in two
|
|
197
|
-
# layers: root CLAUDE.md (umbrella-wide shared rules) + {service}/CLAUDE.md (overlay,
|
|
198
|
-
# wins on conflict for architecture/coding-standards). The agent sits at the umbrella
|
|
199
|
-
# root, so without a service CLAUDE.md, code generation falls back to umbrella defaults
|
|
200
|
-
# + the module stack-profile (a ⚠️ is flagged in the context recap). Generate one per
|
|
201
|
-
# service via /setup-ai-first inside each. For FORM B, add one CLAUDE.md per platform
|
|
202
|
-
# submodule ({system|web|app}.path/CLAUDE.md). For FORM C, one per feature repo
|
|
203
|
-
# (by_prd_slug.{slug}.path/CLAUDE.md) — these repos usually share a stack, so the fastest
|
|
204
|
-
# route is to write one and copy it, adjusting the parts that actually differ.
|
|
205
|
-
|
|
206
|
-
# ----- Architecture -----
|
|
207
|
-
architecture:
|
|
208
|
-
style: "{{ARCH_STYLE}}" # e.g., Layered / Clean / Hexagonal
|
|
209
|
-
layers: "{{LAYER_STACK}}" # e.g., Controller → Facade → Service → Repository
|
|
210
|
-
key_rules:
|
|
211
|
-
- "{{ARCH_RULE_1}}"
|
|
212
|
-
- "{{ARCH_RULE_2}}"
|