@educa-corp/sdd-framework 0.1.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 +230 -0
- package/bin/index.js +609 -0
- package/commands/debug.md +835 -0
- package/commands/debug.tmpl +257 -0
- package/commands/define-product.md +746 -0
- package/commands/define-product.tmpl +191 -0
- package/commands/dev-gen-test.md +1015 -0
- package/commands/dev-gen-test.tmpl +490 -0
- package/commands/dev-run-test.md +749 -0
- package/commands/dev-run-test.tmpl +224 -0
- package/commands/dev-smoke-test.md +716 -0
- package/commands/dev-smoke-test.tmpl +217 -0
- package/commands/fix-bug.md +749 -0
- package/commands/fix-bug.tmpl +171 -0
- package/commands/generate-bdd.md +1144 -0
- package/commands/generate-bdd.tmpl +499 -0
- package/commands/generate-code.md +1038 -0
- package/commands/generate-code.tmpl +513 -0
- package/commands/generate-design-spec.md +1079 -0
- package/commands/generate-design-spec.tmpl +524 -0
- package/commands/generate-prd.md +945 -0
- package/commands/generate-prd.tmpl +166 -0
- package/commands/generate-spec-manifest.md +663 -0
- package/commands/generate-spec-manifest.tmpl +164 -0
- package/commands/generate-tech-docs.md +1249 -0
- package/commands/generate-tech-docs.tmpl +252 -0
- package/commands/learn.md +641 -0
- package/commands/learn.tmpl +63 -0
- package/commands/map-testids.md +580 -0
- package/commands/map-testids.tmpl +81 -0
- package/commands/propose-scenario.md +632 -0
- package/commands/propose-scenario.tmpl +133 -0
- package/commands/qc-analyze.md +611 -0
- package/commands/qc-analyze.tmpl +112 -0
- package/commands/qc-design-test.md +567 -0
- package/commands/qc-design-test.tmpl +68 -0
- package/commands/qc-plan.md +548 -0
- package/commands/qc-plan.tmpl +49 -0
- package/commands/qc-report.md +559 -0
- package/commands/qc-report.tmpl +60 -0
- package/commands/qc-review.md +552 -0
- package/commands/qc-review.tmpl +53 -0
- package/commands/qc-run-test.md +609 -0
- package/commands/qc-run-test.tmpl +84 -0
- package/commands/refine-prd.md +992 -0
- package/commands/refine-prd.tmpl +278 -0
- package/commands/report-bug.md +647 -0
- package/commands/report-bug.tmpl +148 -0
- package/commands/review-code.md +682 -0
- package/commands/review-code.tmpl +104 -0
- package/commands/review-context.md +1202 -0
- package/commands/review-context.tmpl +488 -0
- package/commands/review-tech-docs.md +871 -0
- package/commands/review-tech-docs.tmpl +372 -0
- package/commands/setup-ai-first.md +546 -0
- package/commands/setup-ai-first.tmpl +358 -0
- package/commands/sync.md +451 -0
- package/commands/sync.tmpl +351 -0
- package/commands/update-framework.md +251 -0
- package/commands/update-framework.tmpl +151 -0
- package/commands/validate-traces.md +928 -0
- package/commands/validate-traces.tmpl +429 -0
- package/core/FRAMEWORK_VERSION +1 -0
- package/core/commands/debug.md +835 -0
- package/core/commands/define-product.md +746 -0
- package/core/commands/dev-gen-test.md +1015 -0
- package/core/commands/dev-run-test.md +749 -0
- package/core/commands/dev-smoke-test.md +716 -0
- package/core/commands/fix-bug.md +749 -0
- package/core/commands/generate-bdd.md +1144 -0
- package/core/commands/generate-code.md +1038 -0
- package/core/commands/generate-design-spec.md +1079 -0
- package/core/commands/generate-prd.md +945 -0
- package/core/commands/generate-spec-manifest.md +663 -0
- package/core/commands/generate-tech-docs.md +1249 -0
- package/core/commands/learn.md +641 -0
- package/core/commands/map-testids.md +580 -0
- package/core/commands/propose-scenario.md +632 -0
- package/core/commands/qc-analyze.md +611 -0
- package/core/commands/qc-design-test.md +567 -0
- package/core/commands/qc-plan.md +548 -0
- package/core/commands/qc-report.md +559 -0
- package/core/commands/qc-review.md +552 -0
- package/core/commands/qc-run-test.md +609 -0
- package/core/commands/refine-prd.md +992 -0
- package/core/commands/report-bug.md +647 -0
- package/core/commands/review-code.md +682 -0
- package/core/commands/review-context.md +1202 -0
- package/core/commands/review-tech-docs.md +871 -0
- package/core/commands/setup-ai-first.md +546 -0
- package/core/commands/sync.md +451 -0
- package/core/commands/update-framework.md +251 -0
- package/core/commands/validate-traces.md +928 -0
- package/core/hooks/data-guard.js +141 -0
- package/core/hooks/settings.json +18 -0
- package/core/modules/android-compose/module.yaml +13 -0
- package/core/modules/android-compose/stack-profile.yaml +57 -0
- package/core/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/core/modules/angular/module.yaml +6 -0
- package/core/modules/angular/stack-profile.yaml +38 -0
- package/core/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/core/modules/context-engineering/module.yaml +9 -0
- package/core/modules/context-engineering/stack-profile.yaml +61 -0
- package/core/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/core/modules/dotnet/module.yaml +6 -0
- package/core/modules/dotnet/stack-profile.yaml +50 -0
- package/core/modules/flutter/module.yaml +14 -0
- package/core/modules/flutter/stack-profile.yaml +59 -0
- package/core/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/core/modules/golang/module.yaml +6 -0
- package/core/modules/golang/stack-profile.yaml +40 -0
- package/core/modules/ios-swiftui/module.yaml +13 -0
- package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/core/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/core/modules/java-spring/module.yaml +15 -0
- package/core/modules/java-spring/stack-profile.yaml +28 -0
- package/core/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/core/modules/nextjs/module.yaml +14 -0
- package/core/modules/nextjs/stack-profile.yaml +74 -0
- package/core/modules/nuxt/module.yaml +14 -0
- package/core/modules/nuxt/stack-profile.yaml +58 -0
- package/core/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/core/modules/php-laravel/module.yaml +15 -0
- package/core/modules/php-laravel/stack-profile.yaml +56 -0
- package/core/modules/qc-playwright/stack-profile.yaml +66 -0
- package/core/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/core/modules/react/module.yaml +14 -0
- package/core/modules/react/stack-profile.yaml +63 -0
- package/core/modules/react-native/module.yaml +14 -0
- package/core/modules/react-native/stack-profile.yaml +56 -0
- package/core/modules/vue/module.yaml +14 -0
- package/core/modules/vue/stack-profile.yaml +65 -0
- package/core/rules/data-protection.md +80 -0
- package/core/rules/workflow.md +44 -0
- package/core/skills/code/SKILL.md +19 -0
- package/core/skills/debug/SKILL.md +19 -0
- package/core/skills/design-spec/SKILL.md +11 -0
- package/core/skills/discovery/SKILL.md +14 -0
- package/core/skills/prd/SKILL.md +19 -0
- package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/core/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
- package/core/skills/qc/qa-analyst/business-rules.md +59 -0
- package/core/skills/qc/qa-analyst/data-flow.md +64 -0
- package/core/skills/qc/qa-analyst/spec-breakdown.md +61 -0
- package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
- package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
- package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
- package/core/skills/qc/qa-designer/functional/api.md +45 -0
- package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
- package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
- package/core/skills/qc/qa-designer/integration/api.md +42 -0
- package/core/skills/qc/qa-designer/integration/db.md +39 -0
- package/core/skills/qc/qa-designer/integration/gui.md +40 -0
- package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
- package/core/skills/qc/qa-designer/non-functional.md +40 -0
- package/core/skills/qc/qa-planner/test-plan.md +120 -0
- package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
- package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
- package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
- package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
- package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
- package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
- package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
- package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
- package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
- package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
- package/core/skills/qc/qa-runner/e2e.md +49 -0
- package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
- package/core/skills/qc/qa-runner/functional/api.md +35 -0
- package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
- package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
- package/core/skills/qc/qa-runner/integration.md +47 -0
- package/core/skills/qc/qa-runner/non-functional.md +49 -0
- package/core/skills/qc/qa-runner/report/report.md +37 -0
- package/core/skills/setup-ai-first/SKILL.md +11 -0
- package/core/skills/spec/SKILL.md +19 -0
- package/core/skills/test/SKILL.md +18 -0
- package/core/steps/business-language.md +56 -0
- package/core/steps/capture-lesson.md +79 -0
- package/core/steps/context-loader.md +311 -0
- package/core/steps/gate.md +88 -0
- package/core/steps/report-footer.md +100 -0
- package/core/steps/review-fanout.md +159 -0
- package/core/steps/spawn-agent.md +129 -0
- package/core/steps/trace-mirror.md +26 -0
- package/core/templates/architecture.template.md +113 -0
- package/core/templates/design-spec.template.md +217 -0
- package/core/templates/feature.template +120 -0
- package/core/templates/platform-guide.template.md +145 -0
- package/core/templates/prd.template.md +224 -0
- package/core/templates/product-definition.template.md +188 -0
- package/core/templates/project-context.yaml +161 -0
- package/core/templates/tech-design.template.md +498 -0
- package/docs/01-getting-started/README.md +19 -0
- package/docs/01-getting-started/core-concepts.md +102 -0
- package/docs/01-getting-started/installation.md +156 -0
- package/docs/01-getting-started/quickstart.md +86 -0
- package/docs/02-guides/README.md +26 -0
- package/docs/02-guides/bdd-input-checklist.md +68 -0
- package/docs/02-guides/developer/README.md +49 -0
- package/docs/02-guides/developer/bdd-and-trace.md +126 -0
- package/docs/02-guides/developer/commands.md +76 -0
- package/docs/02-guides/developer/pr-checklist.md +16 -0
- package/docs/02-guides/developer/scenarios.md +460 -0
- package/docs/02-guides/developer/workflow.md +121 -0
- package/docs/02-guides/prd-input-checklist.md +94 -0
- package/docs/02-guides/product-owner/README.md +81 -0
- package/docs/02-guides/product-owner/commands.md +30 -0
- package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
- package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
- package/docs/02-guides/product-owner/scenarios.md +438 -0
- package/docs/02-guides/tech-docs-input-checklist.md +109 -0
- package/docs/02-guides/tester/README.md +75 -0
- package/docs/02-guides/tester/bug-reporting.md +117 -0
- package/docs/02-guides/tester/qc-automation.md +165 -0
- package/docs/02-guides/tester/reading-specs.md +79 -0
- package/docs/02-guides/tester/scenarios.md +186 -0
- package/docs/02-guides/tester/spec-manifest.md +130 -0
- package/docs/02-guides/tester/test-checklist.md +31 -0
- package/docs/02-guides/tester/workflow.md +77 -0
- package/docs/03-concepts/README.md +20 -0
- package/docs/03-concepts/architecture.md +248 -0
- package/docs/03-concepts/mechanisms-explained.md +124 -0
- package/docs/03-concepts/pipeline.md +278 -0
- package/docs/03-concepts/traceability.md +152 -0
- package/docs/04-operations/README.md +33 -0
- package/docs/04-operations/bug-flow.md +364 -0
- package/docs/04-operations/publishing.md +154 -0
- package/docs/04-operations/sync-and-update.md +522 -0
- package/docs/05-reference/README.md +34 -0
- package/docs/05-reference/command-cheatsheet.md +147 -0
- package/docs/05-reference/commands.md +234 -0
- package/docs/05-reference/model-selection.md +74 -0
- package/docs/05-reference/modules.md +110 -0
- package/docs/05-reference/trace-schema.md +154 -0
- package/docs/06-commands/README.md +75 -0
- package/docs/06-commands/explain-debug.md +32 -0
- package/docs/06-commands/explain-define-product.md +43 -0
- package/docs/06-commands/explain-dev-gen-test.md +28 -0
- package/docs/06-commands/explain-dev-run-test.md +24 -0
- package/docs/06-commands/explain-dev-smoke-test.md +25 -0
- package/docs/06-commands/explain-fix-bug.md +28 -0
- package/docs/06-commands/explain-generate-bdd.md +45 -0
- package/docs/06-commands/explain-generate-code.md +53 -0
- package/docs/06-commands/explain-generate-design-spec.md +54 -0
- package/docs/06-commands/explain-generate-prd.md +45 -0
- package/docs/06-commands/explain-generate-spec-manifest.md +20 -0
- package/docs/06-commands/explain-generate-tech-docs.md +56 -0
- package/docs/06-commands/explain-learn.md +21 -0
- package/docs/06-commands/explain-map-testids.md +28 -0
- package/docs/06-commands/explain-propose-scenario.md +24 -0
- package/docs/06-commands/explain-qc-analyze.md +22 -0
- package/docs/06-commands/explain-qc-design-test.md +20 -0
- package/docs/06-commands/explain-qc-plan.md +21 -0
- package/docs/06-commands/explain-qc-report.md +23 -0
- package/docs/06-commands/explain-qc-review.md +24 -0
- package/docs/06-commands/explain-qc-run-test.md +27 -0
- package/docs/06-commands/explain-refine-prd.md +51 -0
- package/docs/06-commands/explain-report-bug.md +24 -0
- package/docs/06-commands/explain-review-code.md +45 -0
- package/docs/06-commands/explain-review-context.md +68 -0
- package/docs/06-commands/explain-review-tech-docs.md +45 -0
- package/docs/06-commands/explain-setup-ai-first.md +25 -0
- package/docs/06-commands/explain-sync.md +24 -0
- package/docs/06-commands/explain-update-framework.md +22 -0
- package/docs/06-commands/explain-validate-traces.md +25 -0
- package/docs/README.md +53 -0
- package/docs/t-sample.md +826 -0
- package/hooks/data-guard.js +141 -0
- package/hooks/settings.json +18 -0
- package/modules/android-compose/module.yaml +13 -0
- package/modules/android-compose/stack-profile.yaml +57 -0
- package/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/modules/angular/module.yaml +6 -0
- package/modules/angular/stack-profile.yaml +38 -0
- package/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/modules/context-engineering/module.yaml +9 -0
- package/modules/context-engineering/stack-profile.yaml +61 -0
- package/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/modules/dotnet/module.yaml +6 -0
- package/modules/dotnet/stack-profile.yaml +50 -0
- package/modules/flutter/module.yaml +14 -0
- package/modules/flutter/stack-profile.yaml +59 -0
- package/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/modules/golang/module.yaml +6 -0
- package/modules/golang/stack-profile.yaml +40 -0
- package/modules/ios-swiftui/module.yaml +13 -0
- package/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/modules/java-spring/module.yaml +15 -0
- package/modules/java-spring/stack-profile.yaml +28 -0
- package/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/modules/nextjs/module.yaml +14 -0
- package/modules/nextjs/stack-profile.yaml +74 -0
- package/modules/nuxt/module.yaml +14 -0
- package/modules/nuxt/stack-profile.yaml +58 -0
- package/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/modules/php-laravel/module.yaml +15 -0
- package/modules/php-laravel/stack-profile.yaml +56 -0
- package/modules/qc-playwright/stack-profile.yaml +66 -0
- package/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/modules/react/module.yaml +14 -0
- package/modules/react/stack-profile.yaml +63 -0
- package/modules/react-native/module.yaml +14 -0
- package/modules/react-native/stack-profile.yaml +56 -0
- package/modules/vue/module.yaml +14 -0
- package/modules/vue/stack-profile.yaml +65 -0
- package/package.json +49 -0
- package/readme.txt +1 -0
- package/rules/data-protection.md +80 -0
- package/rules/workflow.md +44 -0
- package/scripts/init.sh +49 -0
- package/scripts/migrate-specs.js +258 -0
- package/scripts/rename-prd-files.js +174 -0
- package/scripts/upgrade.sh +94 -0
- package/skills/code/SKILL.md +19 -0
- package/skills/code/SKILL.tmpl +19 -0
- package/skills/debug/SKILL.md +19 -0
- package/skills/debug/SKILL.tmpl +19 -0
- package/skills/design-spec/SKILL.md +11 -0
- package/skills/design-spec/SKILL.tmpl +11 -0
- package/skills/discovery/SKILL.md +14 -0
- package/skills/discovery/SKILL.tmpl +14 -0
- package/skills/prd/SKILL.md +19 -0
- package/skills/prd/SKILL.tmpl +19 -0
- package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
- package/skills/qc/qa-analyst/business-rules.md +59 -0
- package/skills/qc/qa-analyst/data-flow.md +64 -0
- package/skills/qc/qa-analyst/spec-breakdown.md +61 -0
- package/skills/qc/qa-designer/e2e/journey.md +41 -0
- package/skills/qc/qa-designer/exploratory/charter.md +68 -0
- package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
- package/skills/qc/qa-designer/functional/api.md +45 -0
- package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
- package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
- package/skills/qc/qa-designer/integration/api.md +42 -0
- package/skills/qc/qa-designer/integration/db.md +39 -0
- package/skills/qc/qa-designer/integration/gui.md +40 -0
- package/skills/qc/qa-designer/integration/kafka.md +40 -0
- package/skills/qc/qa-designer/non-functional.md +40 -0
- package/skills/qc/qa-planner/test-plan.md +120 -0
- package/skills/qc/qa-reviewer/script/e2e.md +87 -0
- package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
- package/skills/qc/qa-reviewer/script/functional.md +101 -0
- package/skills/qc/qa-reviewer/script/integration.md +91 -0
- package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
- package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
- package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
- package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
- package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
- package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
- package/skills/qc/qa-runner/e2e.md +49 -0
- package/skills/qc/qa-runner/exploratory/session.md +36 -0
- package/skills/qc/qa-runner/functional/api.md +35 -0
- package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
- package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
- package/skills/qc/qa-runner/integration.md +47 -0
- package/skills/qc/qa-runner/non-functional.md +49 -0
- package/skills/qc/qa-runner/report/report.md +37 -0
- package/skills/setup-ai-first/SKILL.md +11 -0
- package/skills/setup-ai-first/SKILL.tmpl +11 -0
- package/skills/spec/SKILL.md +19 -0
- package/skills/spec/SKILL.tmpl +19 -0
- package/skills/test/SKILL.md +18 -0
- package/skills/test/SKILL.tmpl +18 -0
- package/steps/business-language.md +56 -0
- package/steps/capture-lesson.md +79 -0
- package/steps/context-loader.md +311 -0
- package/steps/gate.md +88 -0
- package/steps/report-footer.md +100 -0
- package/steps/review-fanout.md +159 -0
- package/steps/spawn-agent.md +129 -0
- package/steps/trace-mirror.md +26 -0
- package/templates/architecture.template.md +113 -0
- package/templates/design-spec.template.md +217 -0
- package/templates/feature.template +120 -0
- package/templates/platform-guide.template.md +145 -0
- package/templates/prd.template.md +224 -0
- package/templates/product-definition.template.md +188 -0
- package/templates/project-context.yaml +161 -0
- package/templates/tech-design.template.md +498 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# {TICKET}-{N} {Feature Name}
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
Template này được sử dụng bởi workflow /generate-prd.
|
|
5
|
+
AI Agent sẽ điền các section dựa trên input từ PO.
|
|
6
|
+
Các placeholder {…} cần được thay thế bằng nội dung thực tế.
|
|
7
|
+
|
|
8
|
+
FORMAT CHUẨN: Business Rule = bảng 3 cột
|
|
9
|
+
ID | Business Rule | Business Logic (KHÔNG tách Business Logic ra khối riêng).
|
|
10
|
+
|
|
11
|
+
TERMINOLOGY:
|
|
12
|
+
- Tuân thủ 100% từ điển project: specs/domain-knowledge/business-dictionary.md
|
|
13
|
+
(KHÔNG dùng từ điển của project khác). Thay banned term bằng canonical term;
|
|
14
|
+
nếu phát hiện banned term trong input PO → thay + ghi chú trong "Giả định AI".
|
|
15
|
+
- Status/Enum values → tham chiếu core-entities.md (Enum Registry).
|
|
16
|
+
|
|
17
|
+
CROSS-REFERENCE (BẮT BUỘC): Bất kỳ chỗ nào nhắc đến một tính năng/ticket khác
|
|
18
|
+
(pre-condition, business rule, giả định, AC, hay bất kỳ section nào) → PHẢI gắn inline link:
|
|
19
|
+
[TICKET-ID khác](../{prd-slug-khác}/{TICKET-ID-khác}-{prd-slug-khác}.md)
|
|
20
|
+
Không để TICKET-ID dạng plain text nếu tồn tại file PRD tương ứng. (Mỗi PRD nằm trong feature-package riêng nên link trỏ sang folder anh em `../{prd-slug-khác}/`.)
|
|
21
|
+
Ngoài ra, ghi rõ quan hệ phụ thuộc trong "Tài liệu tham khảo" ở Appendix.
|
|
22
|
+
|
|
23
|
+
NEW TERM DETECTION: Nếu input PO xuất hiện thuật ngữ CHƯA CÓ trong business-dictionary.md
|
|
24
|
+
và lặp lại ≥ 2 lần → DỪNG lại, hỏi PO confirm trước khi tiếp tục:
|
|
25
|
+
+ Thuật ngữ đó nghĩa gì trong ngữ cảnh hệ thống?
|
|
26
|
+
+ English term chuẩn nên dùng là gì?
|
|
27
|
+
+ Có cần bổ sung vào business-dictionary.md không?
|
|
28
|
+
Sau khi PO confirm → cập nhật business-dictionary.md (nếu PO đồng ý) rồi mới tiếp tục.
|
|
29
|
+
|
|
30
|
+
NUMBERING:
|
|
31
|
+
- UC ID: {TICKET}-{N}-UC{n} (n bắt đầu từ 1, tăng theo từng use case)
|
|
32
|
+
- BR ID: {TICKET}-{N}-UC{n}-BR{m} (m tăng LIÊN TỤC xuyên suốt PRD, KHÔNG reset mỗi UC)
|
|
33
|
+
-->
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Metadata
|
|
38
|
+
|
|
39
|
+
| Field | Value |
|
|
40
|
+
|---------------|------------------------------------------|
|
|
41
|
+
| **PRD ID** | {TICKET}-{N} |
|
|
42
|
+
| **Version** | 1.0 |
|
|
43
|
+
| **Status** | draft |
|
|
44
|
+
| **Author** | AI-assisted |
|
|
45
|
+
| **PO** | {tên PO} |
|
|
46
|
+
| **Domain** | {domain} |
|
|
47
|
+
| **Created** | {date} |
|
|
48
|
+
| **Updated** | {date} |
|
|
49
|
+
| **Ticket** | {TICKET}-{N}{ — nếu PO có link tracker thật, thêm bên cạnh: `{TICKET}-{N} ([Jira]({tracker_url}))`} |
|
|
50
|
+
| **API Source** | *(để trống nếu greenfield — chỉ điền `existing` khi PRD bọc một API đã chạy production)* |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
# Feature
|
|
55
|
+
|
|
56
|
+
**{Feature Name}**
|
|
57
|
+
|
|
58
|
+
{Đoạn mô tả tổng quan: feature làm gì, cho ai, giải quyết vấn đề gì — lấy từ product-definition.}
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# 1. Tổng quan
|
|
63
|
+
|
|
64
|
+
## a. User Story
|
|
65
|
+
|
|
66
|
+
- **Là một (As a)** {persona}
|
|
67
|
+
- **Tôi muốn (I want to)** {action}
|
|
68
|
+
- **Để (So that)** {benefit}
|
|
69
|
+
|
|
70
|
+
## b. Phạm vi
|
|
71
|
+
|
|
72
|
+
> **Scope = ranh giới, KHÔNG phải đặc tả.** Mỗi mục một dòng ngắn "làm gì / không làm gì". Đừng nhét **cơ chế** (retry/timeout/nhánh lỗi → BR/BL) hay **định nghĩa thuật ngữ** (vd "điểm khởi tạo = …" → Business Definition / business-dictionary) vào đây.
|
|
73
|
+
|
|
74
|
+
**In Scope**
|
|
75
|
+
- {hạng mục trong phạm vi 1}
|
|
76
|
+
- {hạng mục trong phạm vi 2}
|
|
77
|
+
|
|
78
|
+
**Out of Scope** *(chỉ thêm khi có ranh giới cần nói rõ)*
|
|
79
|
+
- {hạng mục ngoài phạm vi + lý do / chủ sở hữu}
|
|
80
|
+
|
|
81
|
+
## c. Phụ thuộc liên service *(mức nghiệp vụ — KHÔNG mô tả API/event/kỹ thuật)*
|
|
82
|
+
|
|
83
|
+
> Kế thừa từ Product Definition Phase 1 ("Phụ thuộc liên service"). Nếu contract do đối tác phát triển song song (xem `API Source`), ghi phụ thuộc partner vào đây.
|
|
84
|
+
|
|
85
|
+
- {Cần {dữ liệu/năng lực} từ {feature/team/partner} — vì {lý do nghiệp vụ}} — hoặc "Không có"
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
# 2. Acceptance Criteria
|
|
90
|
+
|
|
91
|
+
> Mỗi AC kế thừa liên kết "Bắt nguồn từ BR" của Product Definition (Phase 6), remap sang BR ID của PRD. Vì BR ID đã chứa số UC nên ref BR truy ngược được tới đúng UC.
|
|
92
|
+
>
|
|
93
|
+
> **1 AC = 1 tiêu chí NGHIỆM THU (outcome quan sát/kiểm được) + ref BR.** KHÔNG viết cơ chế trong AC (số lần retry, timeout, tên/chủ cờ, nhánh lỗi chi tiết) — cái đó thuộc **BR/BL** ở §3, AC chỉ trỏ tới. Nếu tiêu chí có **nhiều nhánh** → tách **bullet con** (mỗi ý một dòng), đừng dồn thành câu dài. Khi `/refine-prd` làm rõ thêm: chi tiết cơ chế → đẩy sang BR/BL; ở tầng AC thì tách bullet/AC mới — KHÔNG nối mệnh đề vào câu cũ (tránh AC thành "đoạn văn" và trùng BR).
|
|
94
|
+
|
|
95
|
+
**AC1:** {Tiêu chí nghiệm thu, văn xuôi, kiểm chứng được.} _(BR: {TICKET}-{N}-UC{n}-BR{m})_
|
|
96
|
+
|
|
97
|
+
**AC2:** {Tiêu chí có nhiều nhánh — tách bullet:} _(BR: {TICKET}-{N}-UC{n}-BR{m})_
|
|
98
|
+
- {nhánh/điều kiện 1 → kết quả kỳ vọng}
|
|
99
|
+
- {nhánh/điều kiện 2 → kết quả kỳ vọng}
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
# 3. Use Case
|
|
104
|
+
|
|
105
|
+
#### {TICKET}-{N}-UC1: {Tên use case}
|
|
106
|
+
|
|
107
|
+
**Actor:** {actor}
|
|
108
|
+
|
|
109
|
+
**Description:** {mô tả luồng}
|
|
110
|
+
|
|
111
|
+
**Pre-condition:**
|
|
112
|
+
- {điều kiện trước 1}
|
|
113
|
+
|
|
114
|
+
**Post-condition:**
|
|
115
|
+
- {kết quả sau 1}
|
|
116
|
+
|
|
117
|
+
**AC liên quan:** AC{x}, AC{y} *(các AC mà UC này thoả — phải đúng bằng tập AC có ref BR trỏ về UC này ở §2)*
|
|
118
|
+
|
|
119
|
+
**Business Rule**
|
|
120
|
+
|
|
121
|
+
| ID | Business Rule | Business Logic |
|
|
122
|
+
|----|---------------|----------------|
|
|
123
|
+
| {TICKET}-{N}-UC1-BR1 | {luật ngắn gọn} | - {logic chi tiết, xuống dòng bằng `<br/>`}<br/>- {…} |
|
|
124
|
+
| {TICKET}-{N}-UC1-BR2 | {…} | - {…} |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
#### {TICKET}-{N}-UC2: {Tên use case}
|
|
129
|
+
|
|
130
|
+
{lặp cấu trúc UC như trên; BR đánh số tiếp tục BR3, BR4…}
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# 4. UI/UX Guidelines
|
|
135
|
+
|
|
136
|
+
## a. User Flow
|
|
137
|
+
|
|
138
|
+
```mermaid
|
|
139
|
+
flowchart TD
|
|
140
|
+
START(["{điểm bắt đầu}"]) --> A{"{điểm quyết định}"}
|
|
141
|
+
A -->|{nhánh}| B["{bước}"]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## b. Wireframe
|
|
145
|
+
|
|
146
|
+
### Screen 1: {Tên màn}
|
|
147
|
+
|
|
148
|
+
| Thành phần | Chi tiết |
|
|
149
|
+
|------------|----------|
|
|
150
|
+
| **Screen** | {tên/ngữ cảnh màn} |
|
|
151
|
+
| **Components** | - {thành phần 1}<br/>- {thành phần 2} |
|
|
152
|
+
| **Actions** | - {hành động 1 → kết quả}<br/>- {hành động 2 → kết quả} |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Screen 2: {Tên màn}
|
|
157
|
+
|
|
158
|
+
{lặp bảng như trên cho từng màn}
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
# Appendix
|
|
163
|
+
|
|
164
|
+
## Input gốc từ PO
|
|
165
|
+
|
|
166
|
+
> {Trích nguyên văn input/ghi chú gốc của PO + đường dẫn product-definition nguồn.}
|
|
167
|
+
|
|
168
|
+
## Tài liệu tham khảo
|
|
169
|
+
|
|
170
|
+
- [{TICKET liên quan}](../{prd-slug-khác}/{TICKET-ID-khác}-{prd-slug-khác}.md) — {quan hệ: pre-condition / overlapping / related…}
|
|
171
|
+
- BDD: [`./bdd/`](./bdd/)
|
|
172
|
+
- Design spec: [`./design-spec/`](./design-spec/) — không áp dụng với feature thuần backend (không có màn hình)
|
|
173
|
+
- Từ điển nghiệp vụ: [`specs/domain-knowledge/business-dictionary.md`](../../domain-knowledge/business-dictionary.md)
|
|
174
|
+
- Domain knowledge: [`specs/domain-knowledge/{domain}.md`](../../domain-knowledge/{domain}.md)
|
|
175
|
+
|
|
176
|
+
## Existing API Contract *(CHỈ brownfield — điền khi API Source = existing; greenfield BỎ QUA cả section này)*
|
|
177
|
+
|
|
178
|
+
<!--
|
|
179
|
+
Chỉ dùng khi PRD bọc một API đã tồn tại trên hệ thống. PO ghi lại contract để:
|
|
180
|
+
- /generate-bdd (system) dùng trực tiếp làm input — không cần tổng hợp từ FE/App BDD;
|
|
181
|
+
- /generate-tech-docs chạy mode reverse-document (mô tả lại as-is, không design mới);
|
|
182
|
+
- /review-tech-docs bỏ qua cổng T7 cross-team sign-off (contract đã cố định).
|
|
183
|
+
Nếu greenfield (thiết kế mới) → xoá toàn bộ section này.
|
|
184
|
+
-->
|
|
185
|
+
|
|
186
|
+
| Method | Path | Auth | Request | Response |
|
|
187
|
+
|--------|------|------|---------|----------|
|
|
188
|
+
| {GET/POST/PUT/DELETE} | {/api/v1/path} | {Bearer / none} | `{ field: type }` | `{ field: type }` |
|
|
189
|
+
|
|
190
|
+
**Error responses:**
|
|
191
|
+
|
|
192
|
+
| HTTP Status | Error Code | Khi nào xảy ra |
|
|
193
|
+
|-------------|------------|----------------|
|
|
194
|
+
| {4xx/5xx} | {ERR_CODE} | {condition} |
|
|
195
|
+
|
|
196
|
+
## Giả định AI
|
|
197
|
+
|
|
198
|
+
> {Giả định / độ vênh AI phát hiện khi đối chiếu product-definition với domain-knowledge — cần PO review. AI KHÔNG tự hoà giải.}
|
|
199
|
+
|
|
200
|
+
- **Q1 — [AI DRAFT] {tiêu đề}:** {mô tả độ vênh + nguồn}. **Cần PO chốt {điều gì}.**
|
|
201
|
+
|
|
202
|
+
_(Nếu không có độ vênh: ghi "Không có — toàn bộ nội dung đã được PO xác nhận qua Product Definition.")_
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
# Change Log
|
|
207
|
+
|
|
208
|
+
> Hiện tại: **v1.0** ({date}) · Lịch sử đầy đủ → [changelog](./changelog/{TICKET}-{N}-{slug}.changelog.md) *(file kho chỉ tạo khi changelog vượt 5 version)*
|
|
209
|
+
|
|
210
|
+
<!-- Bảng phẳng, MỘT dòng/version, MỚI NHẤT TRÊN CÙNG. Chỉ giữ tối đa 5 version gần nhất ở đây;
|
|
211
|
+
cũ hơn → /refine-prd & /review-context tự dồn (rollover) sang file changelog/ ở link trên. -->
|
|
212
|
+
|
|
213
|
+
| Version | Date | Changes (UC/AC/BR bị ảnh hưởng) |
|
|
214
|
+
|---------|------|---------------------------------|
|
|
215
|
+
| 1.0 | {date} | Bản đầu — sinh từ product-definition. |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
<!--
|
|
220
|
+
NEXT STEPS:
|
|
221
|
+
Khi PRD được approve (status: approved), chạy:
|
|
222
|
+
/generate-bdd "specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md"
|
|
223
|
+
để sinh BDD feature specs từ PRD này.
|
|
224
|
+
-->
|
|
@@ -0,0 +1,188 @@
|
|
|
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
|
+
-->
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# =============================================================
|
|
2
|
+
# Project Context — AI-First Spec-Driven Development
|
|
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/ — BDD .feature files
|
|
30
|
+
# specs/{domain}/{prd-slug}/tech-docs/ — Technical design docs
|
|
31
|
+
# specs/{domain}/{prd-slug}/design-spec/ — Design specs (FE/App only)
|
|
32
|
+
# .trace/{domain}/{prd-slug}/{UC-ID}.tsv — Trace state
|
|
33
|
+
#
|
|
34
|
+
# specs_dir is the unified root for all spec artifact types (PRD, BDD, tech-docs, design-spec).
|
|
35
|
+
# prd-slug is derived from the PRD folder path — not a separate config variable.
|
|
36
|
+
specs_dir: "specs"
|
|
37
|
+
templates_dir: "specs/templates"
|
|
38
|
+
feature_template: ".agent/templates/feature.template" # SoT skeleton .feature (dùng bởi /generate-bdd qua {{include}})
|
|
39
|
+
bdd_writing_guide: "specs/templates/bdd-writing-guide.md"
|
|
40
|
+
trace_report: "specs/.trace/trace-report.md"
|
|
41
|
+
|
|
42
|
+
# PRD template (PRDs are at specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md)
|
|
43
|
+
prd_template: "specs/templates/prd.template.md"
|
|
44
|
+
refinement_dir: ".agent/review"
|
|
45
|
+
|
|
46
|
+
# QC's OWN analysis/design working docs (qc-analyze/plan/design-test outputs:
|
|
47
|
+
# REQUIREMENT_ANALYSIS.md, DOC_GAPS.md, TEST_PLAN.md, test-cases/*.Test.md).
|
|
48
|
+
# One subfolder per UC: {qc_dir}/{UC-ID}/. Default "docs" (the QC team's own
|
|
49
|
+
# convention), VISIBLE — not hidden under .agent/. NOTE: specs (PRD / .feature /
|
|
50
|
+
# design-spec) are NOT here — they come from the PO spec submodule (spec_source).
|
|
51
|
+
qc_dir: "docs"
|
|
52
|
+
|
|
53
|
+
# WHERE the qc-* commands LOAD their skills from (qa-analyst / qa-designer / qa-planner
|
|
54
|
+
# / qa-reviewer / qa-runner + DOC_GAPS.template.md). Default = the framework-bundled
|
|
55
|
+
# copy at .agent/skills/qc (works standalone). The QC team OWNS these skills in their
|
|
56
|
+
# canonical repo (ai-automation-qc-base) — point this at that repo/submodule (e.g.
|
|
57
|
+
# "qc-base/.claude/skills") so the skills evolve INDEPENDENTLY and are NOT overwritten
|
|
58
|
+
# by framework upgrade (--init / upgrade.sh rewrite only .agent/, never this path).
|
|
59
|
+
qc_skills_dir: ".agent/skills/qc"
|
|
60
|
+
|
|
61
|
+
# Product Definitions
|
|
62
|
+
product_definitions_dir: "specs/product-definition"
|
|
63
|
+
product_definition_template: "specs/templates/product-definition.template.md"
|
|
64
|
+
|
|
65
|
+
# Domain Knowledge
|
|
66
|
+
domain_knowledge_dir: "specs/domain-knowledge"
|
|
67
|
+
business_dictionary: "specs/domain-knowledge/business-dictionary.md"
|
|
68
|
+
core_entities: "specs/domain-knowledge/core-entities.md"
|
|
69
|
+
|
|
70
|
+
# Project Lessons (guardrails accumulated via /learn — loaded by context-loader Step 6.7)
|
|
71
|
+
# Single-service default below. In umbrella/service mode, set this in each service's
|
|
72
|
+
# .agent/project-context.yaml to ".agent/project-lessons.md" (resolved per service_root).
|
|
73
|
+
lessons_file: "specs/domain-knowledge/lessons-learned.md"
|
|
74
|
+
|
|
75
|
+
# Tech Docs (BE-authored API contract).
|
|
76
|
+
# Merged into specs_dir in the feature-package layout:
|
|
77
|
+
# tech-docs live at specs/{domain}/{prd-slug}/tech-docs/.
|
|
78
|
+
# In umbrella mode with spec_source set, context-loader auto-routes this to
|
|
79
|
+
# {spec_source}/specs so FE/App read the contract via the spec submodule.
|
|
80
|
+
tech_docs_dir: "specs"
|
|
81
|
+
|
|
82
|
+
# Design Specs (FE/App platforms only — web, app).
|
|
83
|
+
# In the feature-package layout, design-specs live at specs/{domain}/{prd-slug}/design-spec/.
|
|
84
|
+
# This variable is no longer needed as a separate path — derived from specs_dir.
|
|
85
|
+
# design_spec_dir: "specs/design-spec" ← removed; use specs_dir instead
|
|
86
|
+
|
|
87
|
+
# Trace (internal structure: .trace/{domain}/{prd-slug}/{UC-ID}.tsv)
|
|
88
|
+
trace_dir: ".trace"
|
|
89
|
+
|
|
90
|
+
# Tester / QC feedback (written by /report-bug and /propose-scenario).
|
|
91
|
+
# These live in the SHARED spec repo so PO/Dev see them on their next /sync.
|
|
92
|
+
# In umbrella mode, context-loader auto-resolves them under {spec_source}/feedback/.
|
|
93
|
+
bug_reports_dir: "feedback/bug-reports"
|
|
94
|
+
bdd_proposals_dir: "feedback/bdd-proposals"
|
|
95
|
+
# PRD change requests (new requirement found in test, not covered by any AC) —
|
|
96
|
+
# written by /propose-scenario Case B so the PO can add/extend an AC then re-/generate-bdd.
|
|
97
|
+
prd_change_requests_dir: "feedback/prd-change-requests"
|
|
98
|
+
|
|
99
|
+
tech_stack:
|
|
100
|
+
language: "{{LANGUAGE}}" # e.g., Java 17 / TypeScript / C# / Go
|
|
101
|
+
framework: "{{FRAMEWORK}}" # e.g., Spring Boot 3.2 / Angular 17 / .NET 8
|
|
102
|
+
build_tool: "{{BUILD_TOOL}}" # e.g., Maven / npm / dotnet / go
|
|
103
|
+
test_framework: "{{TEST_FRAMEWORK}}" # e.g., JUnit 5 + Mockito / Jest / xUnit
|
|
104
|
+
database: "{{DATABASE}}" # e.g., PostgreSQL / MySQL / MongoDB
|
|
105
|
+
module: "{{MODULE}}" # e.g., java-spring / angular / dotnet / golang / context-engineering
|
|
106
|
+
|
|
107
|
+
conventions:
|
|
108
|
+
build_command: "{{BUILD_COMMAND}}" # e.g., mvn clean install -DskipTests
|
|
109
|
+
test_command: "{{TEST_COMMAND}}" # e.g., mvn test
|
|
110
|
+
service_run: "{{RUN_COMMAND}}" # e.g., mvn spring-boot:run
|
|
111
|
+
ticket_prefix: "{{TICKET_PREFIX}}" # e.g., PROJ / FEAT / UC
|
|
112
|
+
|
|
113
|
+
domains:
|
|
114
|
+
- "{{DOMAIN_1}}"
|
|
115
|
+
# - "{{DOMAIN_2}}"
|
|
116
|
+
|
|
117
|
+
# ----- Multi-Service / Umbrella Setup -----
|
|
118
|
+
# Fill this section ONLY if this is an UMBRELLA repo that contains multiple
|
|
119
|
+
# service submodules. Leave commented out for single-service projects.
|
|
120
|
+
#
|
|
121
|
+
# setup:
|
|
122
|
+
# mode: umbrella # "umbrella" | "single" (default: single)
|
|
123
|
+
# spec_source: "{{SPEC_SUBMODULE_PATH}}" # path to PO spec submodule, e.g. "free-trial-specs"
|
|
124
|
+
#
|
|
125
|
+
# When spec_source is set, context-loader auto-derives (ALL specs live in the spec repo
|
|
126
|
+
# using the feature-package layout; service submodules hold only code):
|
|
127
|
+
# specs_dir → {spec_source}/specs # unified root — PRD/BDD/tech-docs/design-spec
|
|
128
|
+
# tech_docs_dir → {spec_source}/specs # merged into specs_dir
|
|
129
|
+
# domain_knowledge_dir → {spec_source}/specs/domain-knowledge
|
|
130
|
+
# trace_dir → {spec_source}/.trace # structure: .trace/{domain}/{prd-slug}/{UC-ID}.tsv
|
|
131
|
+
# (You can still override these manually in paths: section below.)
|
|
132
|
+
# With spec_source set, only ONE override is needed instead of four separate dir vars.
|
|
133
|
+
#
|
|
134
|
+
# services: # domain → service submodule routing
|
|
135
|
+
# {{DOMAIN_1}}: # must match the PRD's `Domain` (Metadata row) / folder path segment
|
|
136
|
+
# path: "{{SERVICE_SUBMODULE_DIR}}" # relative path to service submodule (code + .trace/)
|
|
137
|
+
# module: "{{STACK_MODULE}}" # e.g., java-spring, nextjs, flutter
|
|
138
|
+
# # NOTE: with spec_source set, BDD + tech-docs are cross-team and live in the spec repo —
|
|
139
|
+
# # do NOT pin per-service specs_dir / tech_docs_dir here (they would be ignored).
|
|
140
|
+
# # Per-service specs_dir / tech_docs_dir apply ONLY when there is no spec_source.
|
|
141
|
+
#
|
|
142
|
+
# IMPORTANT — per-service CLAUDE.md:
|
|
143
|
+
# Each service submodule should have its OWN CLAUDE.md ({path}/CLAUDE.md) defining its
|
|
144
|
+
# architecture + coding standards for ITS stack. context-loader loads CLAUDE.md in two
|
|
145
|
+
# layers: root CLAUDE.md (umbrella-wide shared rules) + {service}/CLAUDE.md (overlay,
|
|
146
|
+
# wins on conflict for architecture/coding-standards). The agent sits at the umbrella
|
|
147
|
+
# root, so without a service CLAUDE.md, code generation falls back to umbrella defaults
|
|
148
|
+
# (likely the wrong stack). Generate one per service via /setup-ai-first inside each.
|
|
149
|
+
# {{DOMAIN_2}}:
|
|
150
|
+
# path: "{{SERVICE_2_DIR}}"
|
|
151
|
+
# module: "{{STACK_MODULE}}"
|
|
152
|
+
# specs_dir: "{{SERVICE_2_DIR}}/specs"
|
|
153
|
+
# tech_docs_dir: "{{SERVICE_2_DIR}}/specs"
|
|
154
|
+
|
|
155
|
+
# ----- Architecture -----
|
|
156
|
+
architecture:
|
|
157
|
+
style: "{{ARCH_STYLE}}" # e.g., Layered / Clean / Hexagonal
|
|
158
|
+
layers: "{{LAYER_STACK}}" # e.g., Controller → Facade → Service → Repository
|
|
159
|
+
key_rules:
|
|
160
|
+
- "{{ARCH_RULE_1}}"
|
|
161
|
+
- "{{ARCH_RULE_2}}"
|