@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,498 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
════════════════════════════════════════════════════════════════════════════
|
|
3
|
+
TEMPLATE: Technical Design Document (per-PRD, full-stack, merged)
|
|
4
|
+
Used by: /generate-tech-docs
|
|
5
|
+
════════════════════════════════════════════════════════════════════════════
|
|
6
|
+
|
|
7
|
+
SCOPE MODEL
|
|
8
|
+
- ONE document per PRD (not per UC). It covers EVERY use case of the PRD in a
|
|
9
|
+
single merged, full-stack design: backend (API, data model, DB) AND client
|
|
10
|
+
(components, state, API-integration) side by side, joined by cross-tier
|
|
11
|
+
sequence diagrams. This is the "construction blueprint" any developer opens
|
|
12
|
+
to implement the whole feature.
|
|
13
|
+
- INPUT is the BDD feature files of the PRD (web/ · app/ · system/), NOT the
|
|
14
|
+
PRD prose. The PRD is loaded only for Overview/Goals/Actors context.
|
|
15
|
+
|
|
16
|
+
INCREMENTAL / APPEND
|
|
17
|
+
- When new BDD is added to the same PRD later, this document is EXTENDED, not
|
|
18
|
+
regenerated: add the new UC's sections + sequence diagrams, update the
|
|
19
|
+
UC Coverage matrix (§10) and the Changelog. Never clobber existing content
|
|
20
|
+
or hand edits.
|
|
21
|
+
|
|
22
|
+
FILLING RULES
|
|
23
|
+
- Replace every {…} placeholder with real content. Delete guidance comments.
|
|
24
|
+
- TERMINOLOGY: obey the project dictionary 100%
|
|
25
|
+
(specs/domain-knowledge/business-dictionary.md). Status/enum values →
|
|
26
|
+
core-entities.md (Enum Registry). Entities → core-entities.md.
|
|
27
|
+
- Keep code/DTO/DB samples in the project's stack idiom (see the active module
|
|
28
|
+
stack-profile). The C#/Angular snippets below are ILLUSTRATIVE — swap for
|
|
29
|
+
the real stack.
|
|
30
|
+
- A section that does not apply to this PRD: keep the heading and write
|
|
31
|
+
"N/A — {reason}" rather than deleting it, so the shape stays predictable.
|
|
32
|
+
- Every sequence diagram / API / rule should be traceable back to a scenario:
|
|
33
|
+
reference the SC id (e.g. UC1-SC3) it serves.
|
|
34
|
+
-->
|
|
35
|
+
|
|
36
|
+
# {Feature Area} — {PRD Title} Technical Design Document
|
|
37
|
+
|
|
38
|
+
<!-- @trace block (PRD-level). ucs = every UC covered by this doc; append ids as UCs are added. -->
|
|
39
|
+
---
|
|
40
|
+
@trace.id: {TICKET-ID}
|
|
41
|
+
@trace.domain: {domain}
|
|
42
|
+
@trace.prd: {TICKET-ID}
|
|
43
|
+
@trace.ucs: {TICKET-ID}-UC1, {TICKET-ID}-UC2{, …}
|
|
44
|
+
@trace.service: {service — from BDD header @trace.service}
|
|
45
|
+
@trace.module: {module(s) involved — e.g. dotnet, angular}
|
|
46
|
+
@trace.platforms: {system | web | app — whichever BDD folders exist}
|
|
47
|
+
@trace.bdd_version: {per-platform map — e.g. system=1.5, web=1.9, app=1.7; only platforms present. Each feature carries its own bdd_version; do not flatten to one number.}
|
|
48
|
+
@trace.api_source: {existing | —}
|
|
49
|
+
@trace.revision: 1
|
|
50
|
+
@trace.status: draft
|
|
51
|
+
@trace.generated_at: {YYYY-MM-DD}
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
> **Related docs:** {link sibling PRDs / tech-designs this depends on, e.g. [OTHER-TICKET](../{other-slug}/tech-docs/{OTHER-TICKET}-tech-design.md)}. Delete if none.
|
|
55
|
+
|
|
56
|
+
## 1. Overview
|
|
57
|
+
|
|
58
|
+
<!-- 2–4 sentences: what this feature does, who uses it, the key technical shape
|
|
59
|
+
(data sources, primary side effects). Name where data comes from (DB vs
|
|
60
|
+
external API) and the main write. Source: PRD + system BDD. -->
|
|
61
|
+
|
|
62
|
+
{What the feature does, its main actor, and the core technical mechanism. State
|
|
63
|
+
which data is owned (DB) vs sourced live (external API), and the primary write.}
|
|
64
|
+
|
|
65
|
+
### Goals
|
|
66
|
+
|
|
67
|
+
<!-- Bullet the technical goals — derived from PRD goals, phrased as what the
|
|
68
|
+
system must guarantee. -->
|
|
69
|
+
|
|
70
|
+
- {Goal 1}
|
|
71
|
+
- {Goal 2}
|
|
72
|
+
|
|
73
|
+
### Business Actors
|
|
74
|
+
|
|
75
|
+
| Actor | Description | Channel |
|
|
76
|
+
|-------|-------------|---------|
|
|
77
|
+
| {Actor} | {role & permission} | {entry path, e.g. App → Widget → Portal → API} |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 2. Architecture Overview
|
|
82
|
+
|
|
83
|
+
### 2.1 High-level Architecture
|
|
84
|
+
|
|
85
|
+
<!-- ASCII (or mermaid) topology showing the systems this feature touches:
|
|
86
|
+
client → gateway → service(s) → data stores / external APIs. Keep it to the
|
|
87
|
+
components THIS PRD actually exercises. Source: architecture.md /
|
|
88
|
+
project-context.yaml (services, stack). -->
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
{ASCII or mermaid diagram of the components this feature touches}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **Note:** {call out which data is fetched live from an external API vs stored in the owned DB, and any cache layer + TTL.}
|
|
95
|
+
|
|
96
|
+
### 2.2 Communication Patterns
|
|
97
|
+
|
|
98
|
+
| Pattern | Usage | Scope (UC/SC) |
|
|
99
|
+
|---------|-------|---------------|
|
|
100
|
+
| {Client → Gateway → API} | {auth / action} | {UC1} |
|
|
101
|
+
| {API → External API} | {what it fetches, cache TTL} | {UC1-SC…} |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 3. Data Model
|
|
106
|
+
|
|
107
|
+
<!-- Source: core-entities.md (owned entities) + BDD Then-clauses (state) + PRD.
|
|
108
|
+
Distinguish OWNED entities (in the DB) from API-SOURCED models (fetched
|
|
109
|
+
live, not persisted). List only fields this PRD reads or writes. -->
|
|
110
|
+
|
|
111
|
+
### 3.1 Entity Design
|
|
112
|
+
|
|
113
|
+
#### {EntityName} ({DB entity | API-sourced POCO})
|
|
114
|
+
|
|
115
|
+
{One line: what it represents, and whether it is persisted or fetched live.}
|
|
116
|
+
|
|
117
|
+
| Field | Type | Usage in {TICKET-ID} |
|
|
118
|
+
|-------|------|----------------------|
|
|
119
|
+
| `{field}` | `{type}` | {how this feature uses it — read/write, which SC} |
|
|
120
|
+
|
|
121
|
+
<!-- Repeat per entity. If the feature has meaningful state transitions, add a
|
|
122
|
+
small state table/diagram like below. -->
|
|
123
|
+
|
|
124
|
+
**State transitions (if any):**
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
{state A}: {condition} → {outcome / UI signal}
|
|
128
|
+
{state B}: {condition} → {outcome}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Constraints:**
|
|
132
|
+
- {invariant enforced in application/DB logic, e.g. exactly one primary per tenant}
|
|
133
|
+
|
|
134
|
+
### 3.2 Entity Relationships
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
{relationship diagram — cardinalities, join keys, which fields are read-only vs owned}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 3.3 Data Source Boundaries
|
|
141
|
+
|
|
142
|
+
<!-- Crisp statement of what THIS PRD reads vs writes, and what is delegated
|
|
143
|
+
elsewhere. Prevents scope bleed. -->
|
|
144
|
+
|
|
145
|
+
**{TICKET-ID} scope: {READ … / WRITE …}.**
|
|
146
|
+
|
|
147
|
+
| Responsibility | In scope? | Handled by |
|
|
148
|
+
|----------------|-----------|-----------|
|
|
149
|
+
| {read merged list} | ✅ Yes | {endpoint / service} |
|
|
150
|
+
| {write X flag} | ✅ Yes | {service} |
|
|
151
|
+
| {base data} | ❌ Read-only | {external API + cache} |
|
|
152
|
+
| {other module concern} | ❌ No | {module/team} |
|
|
153
|
+
|
|
154
|
+
### 3.4 Multi-tenant & Sharding
|
|
155
|
+
|
|
156
|
+
<!-- Only if the project is multi-tenant. Else write "N/A — single tenant". -->
|
|
157
|
+
|
|
158
|
+
- {tenant key on entities, query-filter isolation, shard resolution — from architecture.md}
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 4. API Contracts
|
|
163
|
+
|
|
164
|
+
<!-- Backend contract. For greenfield: design endpoints from BDD scenarios. For
|
|
165
|
+
brownfield (@trace.api_source = existing): reverse-document the live API
|
|
166
|
+
as-is and note gaps vs BDD expectations. Mark REUSE vs NEW explicitly.
|
|
167
|
+
CLIENT-ONLY PRD (no system/ BDD — this feature owns no backend): do NOT
|
|
168
|
+
fabricate a BE contract. §4.1 then lists the endpoints the client CONSUMES
|
|
169
|
+
(external / third-party / another team's / existing), marked "consumed
|
|
170
|
+
(external)", reverse-documented from the client BDD Then-clauses + PRD;
|
|
171
|
+
fill §4.2/§4.3 only if the shape is known. If the feature makes no network
|
|
172
|
+
calls at all → write "N/A — client-only, no backend". §4.5.4 maps client
|
|
173
|
+
methods to whatever §4.1 lists (or none). -->
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### 4.1 Endpoints
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
{METHOD} {/path} # NEW | REUSE ({source}) — {one-line purpose}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 4.2 Request/Response Models
|
|
183
|
+
|
|
184
|
+
<!-- Show DTO shapes in the stack's idiom. Note which fields come from DB vs
|
|
185
|
+
external API. -->
|
|
186
|
+
|
|
187
|
+
```{lang}
|
|
188
|
+
{DTO definitions with per-field source comments}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 4.3 Validation & Error Codes
|
|
192
|
+
|
|
193
|
+
**Validation rules:**
|
|
194
|
+
|
|
195
|
+
```{lang}
|
|
196
|
+
{validation rules, in the stack's idiom (e.g. FluentValidation / class-validator)}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
| Code | HTTP Status | Description | Trace |
|
|
200
|
+
|------|-------------|-------------|-------|
|
|
201
|
+
| `{ERROR_CODE}` | {4xx/5xx} | {when it fires} | {UC1-SC…} |
|
|
202
|
+
|
|
203
|
+
### 4.4 Handler Logic (key endpoints)
|
|
204
|
+
|
|
205
|
+
<!-- For non-trivial writes, spell out the ordered steps (validation →
|
|
206
|
+
transaction → commit/rollback → return). Keeps the sequence diagram and
|
|
207
|
+
the code aligned. -->
|
|
208
|
+
|
|
209
|
+
**{HandlerName}:**
|
|
210
|
+
1. {step}
|
|
211
|
+
2. {step — transaction boundary if any}
|
|
212
|
+
|
|
213
|
+
### 4.5 UI Component Mapping — {platform} ({framework})
|
|
214
|
+
|
|
215
|
+
<!-- CLIENT design, GROUPED BY PLATFORM: one "### 4.5 … — {platform}" section per
|
|
216
|
+
client platform present in the BDD (a web group, an app group). Do NOT title
|
|
217
|
+
this heading by screen — screens/UCs live in the sub-blocks below.
|
|
218
|
+
Inside a platform group:
|
|
219
|
+
• §4.5.1 Component Hierarchy — repeat the sub-block per screen/UC:
|
|
220
|
+
"#### 4.5.1.x {Screen} — {UC}". A PRD with many screens/UCs → many sub-blocks
|
|
221
|
+
in the SAME platform group (never a second 4.5 group for the same platform).
|
|
222
|
+
• §4.5.2–§4.5.5 — likewise per screen/UC where they differ.
|
|
223
|
+
• §4.5.6 Test Selectors — ONE shared table for the whole platform group; its
|
|
224
|
+
"Serves SC" column carries (UC · SC) so per-UC consumers filter their rows.
|
|
225
|
+
Append: new platform → new "### 4.5 — {platform}" group; new screen/UC in an
|
|
226
|
+
existing platform → add a sub-block + rows to §4.5.6 (don't duplicate the group).
|
|
227
|
+
Omit §4.5 entirely for a backend-only PRD. -->
|
|
228
|
+
|
|
229
|
+
> **Source:** {Figma file + node id, from design-spec}
|
|
230
|
+
> **Stack:** {framework, state primitive, component library}
|
|
231
|
+
> <!-- @figma.url: {node-level figma url} -->
|
|
232
|
+
|
|
233
|
+
#### 4.5.1 Component Hierarchy — {Screen} ({UC})
|
|
234
|
+
|
|
235
|
+
<!-- Repeat this sub-block per screen/UC in this platform group (4.5.1.a, 4.5.1.b …). -->
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
{component tree — container vs presentational, conditional children}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
#### 4.5.2 Component File Mapping
|
|
242
|
+
|
|
243
|
+
| Component | Path | Type | Purpose |
|
|
244
|
+
|-----------|------|------|---------|
|
|
245
|
+
| `{Component}` | `{path}` | {Feature/Child} | {responsibility} |
|
|
246
|
+
|
|
247
|
+
#### 4.5.3 State Management ({state primitive})
|
|
248
|
+
|
|
249
|
+
<!-- State shape derived from System BDD Then-clauses + response shapes from §4.2.
|
|
250
|
+
Show derived/computed values and their inputs. -->
|
|
251
|
+
|
|
252
|
+
```{lang}
|
|
253
|
+
{state declarations with source comments (which BDD field / BE field each maps to)}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### 4.5.4 API Integration Layer (port/adapter)
|
|
257
|
+
|
|
258
|
+
<!-- Modal/route config + API-integration map: each client service method → a
|
|
259
|
+
REAL endpoint from §4.1 (do not invent endpoints). Error → UI state per SC.
|
|
260
|
+
This table is what /generate-code --phase=integration reads to wire the real adapter. -->
|
|
261
|
+
|
|
262
|
+
| Client method | Endpoint (§4.1) | Request map | Response → model | Error → UI |
|
|
263
|
+
|---------------|-----------------|-------------|------------------|-----------|
|
|
264
|
+
| {svc.getX()} | {GET /…} | {params} | {DTO → ViewModel} | {4xx → state/toast} |
|
|
265
|
+
|
|
266
|
+
#### 4.5.5 Figma → Design System Mapping
|
|
267
|
+
|
|
268
|
+
| Figma element | Design system class/token | Notes |
|
|
269
|
+
|---------------|---------------------------|-------|
|
|
270
|
+
| {element} | {class / token} | {size, color, state} |
|
|
271
|
+
|
|
272
|
+
#### 4.5.6 Test Selectors — element IDs for actionable elements (QC contract)
|
|
273
|
+
|
|
274
|
+
<!-- Stable test-id per interactive element so QC locates directly (no runtime
|
|
275
|
+
scan). Convention: {uc-lower}-{screen}-{element}-{type}; DO NOT embed
|
|
276
|
+
scenario numbers. Attribute per platform: web data-testid · RN testID ·
|
|
277
|
+
Flutter Key/Semantics · iOS accessibilityIdentifier. Reuse the same id
|
|
278
|
+
VALUE across web/app for the same logical element.
|
|
279
|
+
ONE shared table for the whole platform group (covers every screen/UC of this
|
|
280
|
+
platform). The "Serves SC" column carries (UC · SC) so a per-UC consumer
|
|
281
|
+
(generate-code / qc) filters to its own rows via §10. This §4.5 group is
|
|
282
|
+
already platform-scoped, so the platform is implicit (web block → web · SC). -->
|
|
283
|
+
|
|
284
|
+
| Test-ID | Element | Component (§4.5.1.x) | Action | Serves SC (UC · SC) |
|
|
285
|
+
|---------|---------|----------------------|--------|---------------------|
|
|
286
|
+
| `{uc}-{screen}-{element}-{type}` | {Submit button} | {Component} | {submit} | {UC1 · SC1, UC1 · SC3} |
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 5. Key Flows (Sequence Diagrams)
|
|
291
|
+
|
|
292
|
+
<!-- ONE mermaid sequence diagram per meaningful scenario. Participants span tiers:
|
|
293
|
+
client component → service → API → external API → DB.
|
|
294
|
+
⚠ SC ids are unique only within (UC × platform): `{UC}-SC1` on `system` and
|
|
295
|
+
`{UC}-SC1` on `web` are DIFFERENT scenarios. So group flows into PLATFORM LANES
|
|
296
|
+
(5.A system · 5.B web · 5.C app) and ALWAYS pair the SC with its platform,
|
|
297
|
+
e.g. "(web · UC1-SC1)". Never write a bare "UC1-SC1" here — it is ambiguous.
|
|
298
|
+
Only include the lanes whose BDD exists in this PRD. -->
|
|
299
|
+
|
|
300
|
+
### 5.A System flows
|
|
301
|
+
|
|
302
|
+
<!-- One diagram per system-BDD scenario. Skip this lane if no system/ BDD. -->
|
|
303
|
+
|
|
304
|
+
#### 5.A.1 {name} (system · {UC}-SC…)
|
|
305
|
+
|
|
306
|
+
```mermaid
|
|
307
|
+
sequenceDiagram
|
|
308
|
+
participant {A} as {Actor}
|
|
309
|
+
{…}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### 5.B Web flows
|
|
313
|
+
|
|
314
|
+
<!-- One diagram per web-BDD scenario. Skip this lane if no web/ BDD. -->
|
|
315
|
+
|
|
316
|
+
#### 5.B.1 {name} (web · {UC}-SC…)
|
|
317
|
+
|
|
318
|
+
```mermaid
|
|
319
|
+
sequenceDiagram
|
|
320
|
+
{…}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### 5.C App flows
|
|
324
|
+
|
|
325
|
+
<!-- One diagram per app-BDD scenario. Skip this lane if no app/ BDD. -->
|
|
326
|
+
|
|
327
|
+
#### 5.C.1 {name} (app · {UC}-SC…)
|
|
328
|
+
|
|
329
|
+
```mermaid
|
|
330
|
+
sequenceDiagram
|
|
331
|
+
{…}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
<!-- Number within each lane: 5.A.1, 5.A.2 … / 5.B.1 … / 5.C.1 …. For a scenario
|
|
335
|
+
whose effect crosses into another module, note "(covered by {OTHER-UC})". -->
|
|
336
|
+
|
|
337
|
+
**Key integration points (optional table per flow):**
|
|
338
|
+
|
|
339
|
+
| Step | State transition | Verified by (platform · SC) |
|
|
340
|
+
|------|------------------|-----------------------------|
|
|
341
|
+
| {step} | {before → after} | {web · UC1-SC…} |
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 6. Integration Points
|
|
346
|
+
|
|
347
|
+
| Integration | Direction | Method | Description |
|
|
348
|
+
|-------------|-----------|--------|-------------|
|
|
349
|
+
| {Client → API} | Outbound (client) | {REST/Bearer} | {what} |
|
|
350
|
+
| {API → External} | Outbound (server) | {REST + header} | {what, cache TTL} |
|
|
351
|
+
|
|
352
|
+
### 6.1 Event Bus / Messaging
|
|
353
|
+
|
|
354
|
+
<!-- Kafka/queue events produced/consumed by this feature. "N/A — no events" if none. -->
|
|
355
|
+
|
|
356
|
+
{events, or N/A}
|
|
357
|
+
|
|
358
|
+
### 6.2 Cross-Service Dependencies
|
|
359
|
+
|
|
360
|
+
| Dependent service | What's needed | Contract | Status |
|
|
361
|
+
|-------------------|---------------|----------|--------|
|
|
362
|
+
| {service} | {need} | {endpoint} | {✅ Exists / ⚠️ pending} |
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## 7. Security & Authorization
|
|
367
|
+
|
|
368
|
+
### 7.1 Authentication
|
|
369
|
+
|
|
370
|
+
{Auth flow + token type/TTL. Source: PRD auth + project rules.}
|
|
371
|
+
|
|
372
|
+
### 7.2 Authorization Rules
|
|
373
|
+
|
|
374
|
+
| Action | Required role/permission | Description | Trace |
|
|
375
|
+
|--------|--------------------------|-------------|-------|
|
|
376
|
+
| {action} | {role} | {how enforced, where} | {UC1-SC… / out of scope} |
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## 8. Error Handling & Edge Cases
|
|
381
|
+
|
|
382
|
+
<!-- One row per error / edge / negative scenario in the BDD. This must line up
|
|
383
|
+
with §4.3 error codes and the §5 error sequence diagrams. -->
|
|
384
|
+
|
|
385
|
+
| Scenario | Strategy | Details | Trace |
|
|
386
|
+
|----------|----------|---------|-------|
|
|
387
|
+
| {condition} | {approach} | {behavior, message, side effect} | {UC1-SC…, BR…} |
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## 9. Design Decisions
|
|
392
|
+
|
|
393
|
+
<!-- The "why" behind non-obvious choices, with alternatives considered. Source:
|
|
394
|
+
PRD alternatives/assumptions + reasoning during generation. This is what lets
|
|
395
|
+
a reviewer trust the design. -->
|
|
396
|
+
|
|
397
|
+
| # | Decision | Rationale | Alternatives considered |
|
|
398
|
+
|---|----------|-----------|-------------------------|
|
|
399
|
+
| 1 | **{decision}** | {why} | {alt — why rejected} |
|
|
400
|
+
|
|
401
|
+
### NFR-to-Design Mapping
|
|
402
|
+
|
|
403
|
+
| NFR category | PRD requirement | Design decision |
|
|
404
|
+
|--------------|-----------------|-----------------|
|
|
405
|
+
| {e.g. Multi-tenant isolation} | {requirement} | {mechanism} |
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## 10. UC Coverage
|
|
410
|
+
|
|
411
|
+
<!-- THE APPEND ANCHOR **and the INDEX for per-UC consumers**. Every UC of the PRD
|
|
412
|
+
gets a row; every scenario maps to the section(s) that design it.
|
|
413
|
+
- /generate-tech-docs uses it to detect what is already covered vs missing.
|
|
414
|
+
- /generate-code, /map-testids, /qc-* work on ONE UC of a PRD-level doc — they
|
|
415
|
+
look this UC up HERE first to locate its scenarios → the sections/§5-lanes
|
|
416
|
+
(and thus the §4.1 endpoints its §5 flows call) that belong to it. Don't
|
|
417
|
+
pull another UC's endpoints/sections.
|
|
418
|
+
⚠ Scenario coverage is keyed by (platform, SC) because SC ids repeat across
|
|
419
|
+
platforms — the Platform column disambiguates. -->
|
|
420
|
+
|
|
421
|
+
| UC | Feature | Platforms | Sections covered | Status |
|
|
422
|
+
|----|---------|-----------|------------------|--------|
|
|
423
|
+
| {TICKET-ID}-UC1 | {title} | {system, web, app} | §… | ✅ Covered |
|
|
424
|
+
|
|
425
|
+
### UC1 Scenario Coverage
|
|
426
|
+
|
|
427
|
+
<!-- One row per (platform, SC). Same SC number on different platforms = different
|
|
428
|
+
scenarios → separate rows. -->
|
|
429
|
+
|
|
430
|
+
| Platform | Scenario | Section | Business rule |
|
|
431
|
+
|----------|----------|---------|---------------|
|
|
432
|
+
| system | {UC}-SC1: {name} | §5.A.1 | {BR…} |
|
|
433
|
+
| web | {UC}-SC1: {name} | §4.5 (web), §5.B.1 | {BR…} |
|
|
434
|
+
|
|
435
|
+
<!-- Repeat a scenario-coverage block per UC. -->
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 11. Cross-cutting & Assumptions (Out-of-Scope Reference)
|
|
440
|
+
|
|
441
|
+
<!-- Upstream concerns this PRD DEPENDS ON but does not implement (admin gate,
|
|
442
|
+
downstream UI in another module, order snapshotting…). Keep for cross-team
|
|
443
|
+
context. Reference the owning UC/team + doc. Source: PRD out-of-scope +
|
|
444
|
+
BDD BR "out of scope" notes. -->
|
|
445
|
+
|
|
446
|
+
### 11.1 {Concern}
|
|
447
|
+
|
|
448
|
+
> {Quote the BDD/PRD line that scopes it out.}
|
|
449
|
+
|
|
450
|
+
{Explanation of the boundary + a reference sequence diagram if useful.}
|
|
451
|
+
|
|
452
|
+
**Owned by:** {team / module}. See {link}.
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## 12. GAP Register — ẩn số thiết kế chưa chốt
|
|
457
|
+
|
|
458
|
+
<!--
|
|
459
|
+
Mọi [GAP: Gn] / [ASSUMPTION: An] đánh dấu inline trong doc PHẢI có đúng MỘT dòng ở đây
|
|
460
|
+
(và ngược lại — không marker mồ côi, không dòng thừa). Đây là sổ quản lý vòng đời ẩn số.
|
|
461
|
+
|
|
462
|
+
- Loại:
|
|
463
|
+
• nội tại — BE tự quyết (đóng: BE điền giá trị, thay marker)
|
|
464
|
+
• cross-service — cần team/partner khác (đóng: qua T7 sign-off của owner)
|
|
465
|
+
• spec-defect — BDD/PRD sai/thiếu (KHÔNG tự đóng: escalate PO sửa .feature/PRD → regen; xem §9 Conflict)
|
|
466
|
+
- Severity:
|
|
467
|
+
• 🔴 blocker — code BẮT BUỘC phải có mới đúng → CHẶN approve
|
|
468
|
+
• 🟢 non-blocker — đoán tạm chạy được, chỉ cần confirm → không chặn
|
|
469
|
+
(Nhãn GAP/ASSUMPTION KHÔNG tự quyết severity — một ASSUMPTION vẫn có thể là blocker nếu đoán sai sẽ vỡ.)
|
|
470
|
+
- Status: open → resolved (owner điền giá trị thật → thay marker inline → bump @trace.revision).
|
|
471
|
+
|
|
472
|
+
GATE: còn ≥1 🔴 blocker ở trạng thái `open` → @trace.status KHÔNG được lên `approved`
|
|
473
|
+
(giữ `in-review`) → generate-code bị chặn. Cùng pattern design-spec giữ `draft` khi còn ❌ Missing.
|
|
474
|
+
-->
|
|
475
|
+
|
|
476
|
+
| id | Dùng ở (§) | Điều chưa biết | Loại | Owner confirm | Severity | Status | Đóng thế nào |
|
|
477
|
+
|----|-----------|----------------|------|---------------|----------|--------|--------------|
|
|
478
|
+
| G1 | {§4.3} | {shape lỗi khi partner từ chối} | cross-service | {team-payment} | 🔴 blocker | open | {T7 sign-off — owner cung cấp contract} |
|
|
479
|
+
| A1 | {§4.1} | {timeout mặc định 30s} | nội tại | {BE lead} | 🟢 non-blocker | open | {BE xác nhận, thay giá trị} |
|
|
480
|
+
|
|
481
|
+
> Nếu doc **không có** ẩn số nào → ghi "Không có — mọi thiết kế đều có nguồn." **KHÔNG** bịa dòng để lấp trống.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## Figma Design References
|
|
486
|
+
|
|
487
|
+
<!-- @figma.url: {node-level figma url per screen} -->
|
|
488
|
+
- {Screen}: [Figma — {frame}]({url})
|
|
489
|
+
- Exported: {YYYY-MM-DD}
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## Changelog
|
|
494
|
+
|
|
495
|
+
| Revision | Date | Changes |
|
|
496
|
+
|----------|------|---------|
|
|
497
|
+
| 1 | {YYYY-MM-DD} | Initial generation from {TICKET-ID} BDD (v{bdd_version}): {list UCs covered} |
|
|
498
|
+
<!-- On append: add a row per extension, e.g. "2 | {date} | Added UC3 (§5.9, §10) from new BDD v{n}" -->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[📚 Docs](../README.md) › Getting Started
|
|
2
|
+
|
|
3
|
+
# Getting Started
|
|
4
|
+
|
|
5
|
+
Bắt đầu với spec-driven-docs framework — cài đặt, chạy feature đầu tiên, và nắm các khái niệm cốt lõi trong vài phút.
|
|
6
|
+
|
|
7
|
+
## Mục lục (this section)
|
|
8
|
+
|
|
9
|
+
- [installation.md](installation.md) — Cài framework, prerequisites (Node, Claude Code), QC automation stack, và VS Code extension (Review Board + Living Docs panels).
|
|
10
|
+
- [quickstart.md](quickstart.md) — Chạy feature đầu tiên end-to-end: Discovery → PRD → BDD → Tech Design → Code → Dev self-check.
|
|
11
|
+
- [core-concepts.md](core-concepts.md) — Khái niệm trong 5 phút: spec-as-source-of-truth, pipeline phases, traceability, dev_selftest vs qc_status, umbrella/spec-module.
|
|
12
|
+
|
|
13
|
+
## Đọc gì trước?
|
|
14
|
+
|
|
15
|
+
1. Mới hoàn toàn? → bắt đầu ở [core-concepts.md](core-concepts.md) để hiểu triết lý.
|
|
16
|
+
2. Sẵn sàng cài? → [installation.md](installation.md).
|
|
17
|
+
3. Đã cài xong? → [quickstart.md](quickstart.md) để chạy feature đầu tiên.
|
|
18
|
+
|
|
19
|
+
> Cần đào sâu hơn? Xem các section khác trong [📚 Docs](../README.md) — concepts, multi-repo/umbrella, QC pipeline, command reference, architecture.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[📚 Docs](../README.md) › [Getting Started](README.md) › Core Concepts
|
|
2
|
+
|
|
3
|
+
# Core Concepts
|
|
4
|
+
|
|
5
|
+
Các khái niệm cốt lõi trong 5 phút. Đào sâu hơn ở [../03-concepts](../03-concepts).
|
|
6
|
+
|
|
7
|
+
## Mục lục
|
|
8
|
+
|
|
9
|
+
- [Spec là source of truth](#spec-là-source-of-truth)
|
|
10
|
+
- [Pipeline phases](#pipeline-phases)
|
|
11
|
+
- [Traceability](#traceability)
|
|
12
|
+
- [dev_selftest vs qc_status](#dev_selftest-vs-qc_status)
|
|
13
|
+
- [Umbrella & spec module](#umbrella--spec-module)
|
|
14
|
+
|
|
15
|
+
## Spec là source of truth
|
|
16
|
+
|
|
17
|
+
> **Write the spec first. Generate the code from the spec. Trace everything.**
|
|
18
|
+
|
|
19
|
+
- Con người định nghĩa *WHAT* — acceptance criteria, business rules, platform requirements.
|
|
20
|
+
- AI sinh ra *HOW* — BDD scenarios, tech design, code, tests — thích ứng theo platform.
|
|
21
|
+
- Mỗi artifact được review (AI tìm findings) rồi **người duyệt** (đặt `Status` / `@trace.status: approved`) trước khi sang phase kế tiếp; sửa nội dung sau khi duyệt → tự về `draft`. Lệnh tiêu thụ **cảnh báo mềm** nếu nguồn chưa approved.
|
|
22
|
+
- Mỗi dòng code truy ngược về một scenario trong file `.feature`.
|
|
23
|
+
|
|
24
|
+
**PRD platform-agnostic (Option C):** một PRD phục vụ mọi platform — chỉ mô tả nghiệp vụ, không có chi tiết UI hay API. FE/App đọc PRD → Design Spec → BDD; BE đọc PRD trực tiếp → BDD. Thêm platform mới sau không cần sửa PRD.
|
|
25
|
+
|
|
26
|
+
## Pipeline phases
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Discovery → PRD → BDD Spec → Tech Design → Code → Dev Self-Check
|
|
30
|
+
(+ QC suite chính thức song song)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
| Phase | Ai | Lệnh chính | Output |
|
|
34
|
+
|-------|-----|-----------|--------|
|
|
35
|
+
| Discovery | PO + AI | `/define-product` | `specs/product-definition/{slug}.md` |
|
|
36
|
+
| PRD | AI → SA/PO | `/generate-prd`, `/refine-prd`, `/review-context` | `specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md` |
|
|
37
|
+
| Design Spec *(FE/App)* | AI → Designer/PO | `/generate-design-spec` | `specs/{domain}/{prd-slug}/design-spec/...` |
|
|
38
|
+
| BDD Spec | AI → SA/Dev | `/generate-bdd`, `/review-context` | `specs/{domain}/{prd-slug}/bdd/{UC-ID}.feature` |
|
|
39
|
+
| Tech Design | AI → SA/Lead | `/generate-tech-docs`, `/review-tech-docs` | `tech-docs/{domain}/{prd-slug}/tech-docs/{TICKET-ID}-tech-design.md` (1 doc full-stack/PRD) |
|
|
40
|
+
| Code | AI → Dev | `/generate-code`, `/review-code` | `src/...` |
|
|
41
|
+
| Dev Self-Check | Dev | `/dev-gen-test`, `/dev-run-test`, `/dev-smoke-test` | `src/test/...` |
|
|
42
|
+
| QC Automation | QC | `/qc-analyze → /qc-plan → /qc-design-test → /qc-review → /qc-run-test → /qc-report` | QC designs + run results |
|
|
43
|
+
| Trace audit | Tech Lead | `/validate-traces {domain}` | Coverage + drift report |
|
|
44
|
+
|
|
45
|
+
Chi tiết từng phase + happy-path lệnh: [quickstart.md](quickstart.md).
|
|
46
|
+
|
|
47
|
+
## Traceability
|
|
48
|
+
|
|
49
|
+
Mỗi artifact link tới artifact khác qua `@trace.*` tags:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
product-definition.md
|
|
53
|
+
└─► PRD.md (Domain, Status, Service, Module — bảng Metadata)
|
|
54
|
+
└─► specs/{domain}/{prd-slug}/bdd/{web|app|system}/{UC-ID}.feature (@trace.prd_version)
|
|
55
|
+
└─► specs/{domain}/{prd-slug}/tech-docs/{TICKET-ID}-tech-design.md (@trace.bdd_version)
|
|
56
|
+
└─► src/ code — service submodule (@trace.implements)
|
|
57
|
+
└─► src/test/ (@trace.verifies)
|
|
58
|
+
════► {spec_source}/.trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv — authoritative ở SPEC repo (drift tracking)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`/validate-traces {domain}` đọc các `.trace/{domain}/{prd-slug}/{UC-ID}-{platform}.tsv` và báo cáo:
|
|
62
|
+
|
|
63
|
+
| Status | Nghĩa |
|
|
64
|
+
|--------|-------|
|
|
65
|
+
| ✅ OK | Code version khớp spec version |
|
|
66
|
+
| ⚠️ DRIFT | Code sinh từ PRD/BDD version cũ — cần re-generate |
|
|
67
|
+
| 🔴 GAP | Scenario có trong spec nhưng chưa có code implement |
|
|
68
|
+
| — UNTRACKED | Scenario ghi nhận nhưng chưa code-gen |
|
|
69
|
+
|
|
70
|
+
Chi tiết tags + chain: [../03-concepts/traceability.md](../03-concepts/traceability.md).
|
|
71
|
+
|
|
72
|
+
## dev_selftest vs qc_status
|
|
73
|
+
|
|
74
|
+
Hai signal **độc lập** trong trace TSV — đừng nhầm lẫn:
|
|
75
|
+
|
|
76
|
+
| Signal | Set bởi | Ý nghĩa |
|
|
77
|
+
|--------|---------|---------|
|
|
78
|
+
| `dev_selftest` (+ `dev_selftest_at`) | `/dev-run-test` | Dev tự verify code của mình (smoke / self-check). **KHÔNG phải** official coverage. |
|
|
79
|
+
| `qc_status` (+ `qc_run_at`) | `/qc-run-test` | Bộ QC suite chính thức (native `/qc-*` pipeline), keyed theo `@trace.verifies={UC-ID}-SC{N}`. |
|
|
80
|
+
|
|
81
|
+
QC owns `qc_status`; dev owns `dev_selftest`. Living Docs panel hiển thị cả hai cạnh nhau. `/qc-run-test` & `/qc-report` dùng stack `qc-playwright` (độc lập với dev module — xem [installation.md](installation.md)).
|
|
82
|
+
|
|
83
|
+
## Umbrella & spec module
|
|
84
|
+
|
|
85
|
+
Cho project có nhiều service repo riêng (microservices, multi-platform): pattern khuyến nghị là **umbrella repo** — repo tổng chứa các service repo dưới dạng git submodule.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
my-project-umbrella/ ← mở Claude Code ở đây
|
|
89
|
+
├── .agent/project-context.yaml ← routing config (domain → service)
|
|
90
|
+
├── my-project-specs/ ← submodule: spec module của PO (PRD, design-spec, tech-docs)
|
|
91
|
+
├── user-service/ ← submodule: microservice
|
|
92
|
+
└── web-app/ ← submodule: FE app
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- **Spec module** (`{spec_source}/`): chứa PRD, Design Spec, **ALL BDD (web/app/system)**, tech-docs (1 doc full-stack/PRD: API contract + client design), domain-knowledge, feedback — shared để mọi umbrella đọc cùng nguồn. Report canonical của Living Docs cũng sinh tại `{spec_source}/.living-docs/`.
|
|
96
|
+
- **Routing:** context-loader đọc row `Domain` (bảng Metadata) từ PRD → tra trong `services` config → route **code** vào đúng service submodule; **BDD + tech-docs + specs + `.trace/` + feedback** đều ở spec module (cross-team, một chỗ cho PM). PRD phải có row `Domain` khớp một key trong `services`.
|
|
97
|
+
|
|
98
|
+
Setup umbrella đầy đủ, file ownership, two-layer commit, multi-platform → [Operations › Sync & Update §4 Umbrella mode](../04-operations/sync-and-update.md#4-umbrella-mode--git-submodule).
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
Sẵn sàng chạy? → [quickstart.md](quickstart.md).
|