@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.
Files changed (382) hide show
  1. package/bin/build.js +230 -0
  2. package/bin/index.js +609 -0
  3. package/commands/debug.md +835 -0
  4. package/commands/debug.tmpl +257 -0
  5. package/commands/define-product.md +746 -0
  6. package/commands/define-product.tmpl +191 -0
  7. package/commands/dev-gen-test.md +1015 -0
  8. package/commands/dev-gen-test.tmpl +490 -0
  9. package/commands/dev-run-test.md +749 -0
  10. package/commands/dev-run-test.tmpl +224 -0
  11. package/commands/dev-smoke-test.md +716 -0
  12. package/commands/dev-smoke-test.tmpl +217 -0
  13. package/commands/fix-bug.md +749 -0
  14. package/commands/fix-bug.tmpl +171 -0
  15. package/commands/generate-bdd.md +1144 -0
  16. package/commands/generate-bdd.tmpl +499 -0
  17. package/commands/generate-code.md +1038 -0
  18. package/commands/generate-code.tmpl +513 -0
  19. package/commands/generate-design-spec.md +1079 -0
  20. package/commands/generate-design-spec.tmpl +524 -0
  21. package/commands/generate-prd.md +945 -0
  22. package/commands/generate-prd.tmpl +166 -0
  23. package/commands/generate-spec-manifest.md +663 -0
  24. package/commands/generate-spec-manifest.tmpl +164 -0
  25. package/commands/generate-tech-docs.md +1249 -0
  26. package/commands/generate-tech-docs.tmpl +252 -0
  27. package/commands/learn.md +641 -0
  28. package/commands/learn.tmpl +63 -0
  29. package/commands/map-testids.md +580 -0
  30. package/commands/map-testids.tmpl +81 -0
  31. package/commands/propose-scenario.md +632 -0
  32. package/commands/propose-scenario.tmpl +133 -0
  33. package/commands/qc-analyze.md +611 -0
  34. package/commands/qc-analyze.tmpl +112 -0
  35. package/commands/qc-design-test.md +567 -0
  36. package/commands/qc-design-test.tmpl +68 -0
  37. package/commands/qc-plan.md +548 -0
  38. package/commands/qc-plan.tmpl +49 -0
  39. package/commands/qc-report.md +559 -0
  40. package/commands/qc-report.tmpl +60 -0
  41. package/commands/qc-review.md +552 -0
  42. package/commands/qc-review.tmpl +53 -0
  43. package/commands/qc-run-test.md +609 -0
  44. package/commands/qc-run-test.tmpl +84 -0
  45. package/commands/refine-prd.md +992 -0
  46. package/commands/refine-prd.tmpl +278 -0
  47. package/commands/report-bug.md +647 -0
  48. package/commands/report-bug.tmpl +148 -0
  49. package/commands/review-code.md +682 -0
  50. package/commands/review-code.tmpl +104 -0
  51. package/commands/review-context.md +1202 -0
  52. package/commands/review-context.tmpl +488 -0
  53. package/commands/review-tech-docs.md +871 -0
  54. package/commands/review-tech-docs.tmpl +372 -0
  55. package/commands/setup-ai-first.md +546 -0
  56. package/commands/setup-ai-first.tmpl +358 -0
  57. package/commands/sync.md +451 -0
  58. package/commands/sync.tmpl +351 -0
  59. package/commands/update-framework.md +251 -0
  60. package/commands/update-framework.tmpl +151 -0
  61. package/commands/validate-traces.md +928 -0
  62. package/commands/validate-traces.tmpl +429 -0
  63. package/core/FRAMEWORK_VERSION +1 -0
  64. package/core/commands/debug.md +835 -0
  65. package/core/commands/define-product.md +746 -0
  66. package/core/commands/dev-gen-test.md +1015 -0
  67. package/core/commands/dev-run-test.md +749 -0
  68. package/core/commands/dev-smoke-test.md +716 -0
  69. package/core/commands/fix-bug.md +749 -0
  70. package/core/commands/generate-bdd.md +1144 -0
  71. package/core/commands/generate-code.md +1038 -0
  72. package/core/commands/generate-design-spec.md +1079 -0
  73. package/core/commands/generate-prd.md +945 -0
  74. package/core/commands/generate-spec-manifest.md +663 -0
  75. package/core/commands/generate-tech-docs.md +1249 -0
  76. package/core/commands/learn.md +641 -0
  77. package/core/commands/map-testids.md +580 -0
  78. package/core/commands/propose-scenario.md +632 -0
  79. package/core/commands/qc-analyze.md +611 -0
  80. package/core/commands/qc-design-test.md +567 -0
  81. package/core/commands/qc-plan.md +548 -0
  82. package/core/commands/qc-report.md +559 -0
  83. package/core/commands/qc-review.md +552 -0
  84. package/core/commands/qc-run-test.md +609 -0
  85. package/core/commands/refine-prd.md +992 -0
  86. package/core/commands/report-bug.md +647 -0
  87. package/core/commands/review-code.md +682 -0
  88. package/core/commands/review-context.md +1202 -0
  89. package/core/commands/review-tech-docs.md +871 -0
  90. package/core/commands/setup-ai-first.md +546 -0
  91. package/core/commands/sync.md +451 -0
  92. package/core/commands/update-framework.md +251 -0
  93. package/core/commands/validate-traces.md +928 -0
  94. package/core/hooks/data-guard.js +141 -0
  95. package/core/hooks/settings.json +18 -0
  96. package/core/modules/android-compose/module.yaml +13 -0
  97. package/core/modules/android-compose/stack-profile.yaml +57 -0
  98. package/core/modules/angular/architecture-snippets/component-patterns.md +187 -0
  99. package/core/modules/angular/module.yaml +6 -0
  100. package/core/modules/angular/stack-profile.yaml +38 -0
  101. package/core/modules/context-engineering/architecture-snippets/context-design.md +119 -0
  102. package/core/modules/context-engineering/module.yaml +9 -0
  103. package/core/modules/context-engineering/stack-profile.yaml +61 -0
  104. package/core/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
  105. package/core/modules/dotnet/module.yaml +6 -0
  106. package/core/modules/dotnet/stack-profile.yaml +50 -0
  107. package/core/modules/flutter/module.yaml +14 -0
  108. package/core/modules/flutter/stack-profile.yaml +59 -0
  109. package/core/modules/golang/architecture-snippets/domain-layout.md +283 -0
  110. package/core/modules/golang/module.yaml +6 -0
  111. package/core/modules/golang/stack-profile.yaml +40 -0
  112. package/core/modules/ios-swiftui/module.yaml +13 -0
  113. package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
  114. package/core/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
  115. package/core/modules/java-spring/module.yaml +15 -0
  116. package/core/modules/java-spring/stack-profile.yaml +28 -0
  117. package/core/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
  118. package/core/modules/nextjs/module.yaml +14 -0
  119. package/core/modules/nextjs/stack-profile.yaml +74 -0
  120. package/core/modules/nuxt/module.yaml +14 -0
  121. package/core/modules/nuxt/stack-profile.yaml +58 -0
  122. package/core/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
  123. package/core/modules/php-laravel/module.yaml +15 -0
  124. package/core/modules/php-laravel/stack-profile.yaml +56 -0
  125. package/core/modules/qc-playwright/stack-profile.yaml +66 -0
  126. package/core/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
  127. package/core/modules/react/module.yaml +14 -0
  128. package/core/modules/react/stack-profile.yaml +63 -0
  129. package/core/modules/react-native/module.yaml +14 -0
  130. package/core/modules/react-native/stack-profile.yaml +56 -0
  131. package/core/modules/vue/module.yaml +14 -0
  132. package/core/modules/vue/stack-profile.yaml +65 -0
  133. package/core/rules/data-protection.md +80 -0
  134. package/core/rules/workflow.md +44 -0
  135. package/core/skills/code/SKILL.md +19 -0
  136. package/core/skills/debug/SKILL.md +19 -0
  137. package/core/skills/design-spec/SKILL.md +11 -0
  138. package/core/skills/discovery/SKILL.md +14 -0
  139. package/core/skills/prd/SKILL.md +19 -0
  140. package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  141. package/core/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
  142. package/core/skills/qc/qa-analyst/business-rules.md +59 -0
  143. package/core/skills/qc/qa-analyst/data-flow.md +64 -0
  144. package/core/skills/qc/qa-analyst/spec-breakdown.md +61 -0
  145. package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
  146. package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
  147. package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  148. package/core/skills/qc/qa-designer/functional/api.md +45 -0
  149. package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  150. package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  151. package/core/skills/qc/qa-designer/integration/api.md +42 -0
  152. package/core/skills/qc/qa-designer/integration/db.md +39 -0
  153. package/core/skills/qc/qa-designer/integration/gui.md +40 -0
  154. package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
  155. package/core/skills/qc/qa-designer/non-functional.md +40 -0
  156. package/core/skills/qc/qa-planner/test-plan.md +120 -0
  157. package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
  158. package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  159. package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
  160. package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
  161. package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  162. package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  163. package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  164. package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  165. package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  166. package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  167. package/core/skills/qc/qa-runner/e2e.md +49 -0
  168. package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
  169. package/core/skills/qc/qa-runner/functional/api.md +35 -0
  170. package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  171. package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  172. package/core/skills/qc/qa-runner/integration.md +47 -0
  173. package/core/skills/qc/qa-runner/non-functional.md +49 -0
  174. package/core/skills/qc/qa-runner/report/report.md +37 -0
  175. package/core/skills/setup-ai-first/SKILL.md +11 -0
  176. package/core/skills/spec/SKILL.md +19 -0
  177. package/core/skills/test/SKILL.md +18 -0
  178. package/core/steps/business-language.md +56 -0
  179. package/core/steps/capture-lesson.md +79 -0
  180. package/core/steps/context-loader.md +311 -0
  181. package/core/steps/gate.md +88 -0
  182. package/core/steps/report-footer.md +100 -0
  183. package/core/steps/review-fanout.md +159 -0
  184. package/core/steps/spawn-agent.md +129 -0
  185. package/core/steps/trace-mirror.md +26 -0
  186. package/core/templates/architecture.template.md +113 -0
  187. package/core/templates/design-spec.template.md +217 -0
  188. package/core/templates/feature.template +120 -0
  189. package/core/templates/platform-guide.template.md +145 -0
  190. package/core/templates/prd.template.md +224 -0
  191. package/core/templates/product-definition.template.md +188 -0
  192. package/core/templates/project-context.yaml +161 -0
  193. package/core/templates/tech-design.template.md +498 -0
  194. package/docs/01-getting-started/README.md +19 -0
  195. package/docs/01-getting-started/core-concepts.md +102 -0
  196. package/docs/01-getting-started/installation.md +156 -0
  197. package/docs/01-getting-started/quickstart.md +86 -0
  198. package/docs/02-guides/README.md +26 -0
  199. package/docs/02-guides/bdd-input-checklist.md +68 -0
  200. package/docs/02-guides/developer/README.md +49 -0
  201. package/docs/02-guides/developer/bdd-and-trace.md +126 -0
  202. package/docs/02-guides/developer/commands.md +76 -0
  203. package/docs/02-guides/developer/pr-checklist.md +16 -0
  204. package/docs/02-guides/developer/scenarios.md +460 -0
  205. package/docs/02-guides/developer/workflow.md +121 -0
  206. package/docs/02-guides/prd-input-checklist.md +94 -0
  207. package/docs/02-guides/product-owner/README.md +81 -0
  208. package/docs/02-guides/product-owner/commands.md +30 -0
  209. package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
  210. package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
  211. package/docs/02-guides/product-owner/scenarios.md +438 -0
  212. package/docs/02-guides/tech-docs-input-checklist.md +109 -0
  213. package/docs/02-guides/tester/README.md +75 -0
  214. package/docs/02-guides/tester/bug-reporting.md +117 -0
  215. package/docs/02-guides/tester/qc-automation.md +165 -0
  216. package/docs/02-guides/tester/reading-specs.md +79 -0
  217. package/docs/02-guides/tester/scenarios.md +186 -0
  218. package/docs/02-guides/tester/spec-manifest.md +130 -0
  219. package/docs/02-guides/tester/test-checklist.md +31 -0
  220. package/docs/02-guides/tester/workflow.md +77 -0
  221. package/docs/03-concepts/README.md +20 -0
  222. package/docs/03-concepts/architecture.md +248 -0
  223. package/docs/03-concepts/mechanisms-explained.md +124 -0
  224. package/docs/03-concepts/pipeline.md +278 -0
  225. package/docs/03-concepts/traceability.md +152 -0
  226. package/docs/04-operations/README.md +33 -0
  227. package/docs/04-operations/bug-flow.md +364 -0
  228. package/docs/04-operations/publishing.md +154 -0
  229. package/docs/04-operations/sync-and-update.md +522 -0
  230. package/docs/05-reference/README.md +34 -0
  231. package/docs/05-reference/command-cheatsheet.md +147 -0
  232. package/docs/05-reference/commands.md +234 -0
  233. package/docs/05-reference/model-selection.md +74 -0
  234. package/docs/05-reference/modules.md +110 -0
  235. package/docs/05-reference/trace-schema.md +154 -0
  236. package/docs/06-commands/README.md +75 -0
  237. package/docs/06-commands/explain-debug.md +32 -0
  238. package/docs/06-commands/explain-define-product.md +43 -0
  239. package/docs/06-commands/explain-dev-gen-test.md +28 -0
  240. package/docs/06-commands/explain-dev-run-test.md +24 -0
  241. package/docs/06-commands/explain-dev-smoke-test.md +25 -0
  242. package/docs/06-commands/explain-fix-bug.md +28 -0
  243. package/docs/06-commands/explain-generate-bdd.md +45 -0
  244. package/docs/06-commands/explain-generate-code.md +53 -0
  245. package/docs/06-commands/explain-generate-design-spec.md +54 -0
  246. package/docs/06-commands/explain-generate-prd.md +45 -0
  247. package/docs/06-commands/explain-generate-spec-manifest.md +20 -0
  248. package/docs/06-commands/explain-generate-tech-docs.md +56 -0
  249. package/docs/06-commands/explain-learn.md +21 -0
  250. package/docs/06-commands/explain-map-testids.md +28 -0
  251. package/docs/06-commands/explain-propose-scenario.md +24 -0
  252. package/docs/06-commands/explain-qc-analyze.md +22 -0
  253. package/docs/06-commands/explain-qc-design-test.md +20 -0
  254. package/docs/06-commands/explain-qc-plan.md +21 -0
  255. package/docs/06-commands/explain-qc-report.md +23 -0
  256. package/docs/06-commands/explain-qc-review.md +24 -0
  257. package/docs/06-commands/explain-qc-run-test.md +27 -0
  258. package/docs/06-commands/explain-refine-prd.md +51 -0
  259. package/docs/06-commands/explain-report-bug.md +24 -0
  260. package/docs/06-commands/explain-review-code.md +45 -0
  261. package/docs/06-commands/explain-review-context.md +68 -0
  262. package/docs/06-commands/explain-review-tech-docs.md +45 -0
  263. package/docs/06-commands/explain-setup-ai-first.md +25 -0
  264. package/docs/06-commands/explain-sync.md +24 -0
  265. package/docs/06-commands/explain-update-framework.md +22 -0
  266. package/docs/06-commands/explain-validate-traces.md +25 -0
  267. package/docs/README.md +53 -0
  268. package/docs/t-sample.md +826 -0
  269. package/hooks/data-guard.js +141 -0
  270. package/hooks/settings.json +18 -0
  271. package/modules/android-compose/module.yaml +13 -0
  272. package/modules/android-compose/stack-profile.yaml +57 -0
  273. package/modules/angular/architecture-snippets/component-patterns.md +187 -0
  274. package/modules/angular/module.yaml +6 -0
  275. package/modules/angular/stack-profile.yaml +38 -0
  276. package/modules/context-engineering/architecture-snippets/context-design.md +119 -0
  277. package/modules/context-engineering/module.yaml +9 -0
  278. package/modules/context-engineering/stack-profile.yaml +61 -0
  279. package/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
  280. package/modules/dotnet/module.yaml +6 -0
  281. package/modules/dotnet/stack-profile.yaml +50 -0
  282. package/modules/flutter/module.yaml +14 -0
  283. package/modules/flutter/stack-profile.yaml +59 -0
  284. package/modules/golang/architecture-snippets/domain-layout.md +283 -0
  285. package/modules/golang/module.yaml +6 -0
  286. package/modules/golang/stack-profile.yaml +40 -0
  287. package/modules/ios-swiftui/module.yaml +13 -0
  288. package/modules/ios-swiftui/stack-profile.yaml +55 -0
  289. package/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
  290. package/modules/java-spring/module.yaml +15 -0
  291. package/modules/java-spring/stack-profile.yaml +28 -0
  292. package/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
  293. package/modules/nextjs/module.yaml +14 -0
  294. package/modules/nextjs/stack-profile.yaml +74 -0
  295. package/modules/nuxt/module.yaml +14 -0
  296. package/modules/nuxt/stack-profile.yaml +58 -0
  297. package/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
  298. package/modules/php-laravel/module.yaml +15 -0
  299. package/modules/php-laravel/stack-profile.yaml +56 -0
  300. package/modules/qc-playwright/stack-profile.yaml +66 -0
  301. package/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
  302. package/modules/react/module.yaml +14 -0
  303. package/modules/react/stack-profile.yaml +63 -0
  304. package/modules/react-native/module.yaml +14 -0
  305. package/modules/react-native/stack-profile.yaml +56 -0
  306. package/modules/vue/module.yaml +14 -0
  307. package/modules/vue/stack-profile.yaml +65 -0
  308. package/package.json +49 -0
  309. package/readme.txt +1 -0
  310. package/rules/data-protection.md +80 -0
  311. package/rules/workflow.md +44 -0
  312. package/scripts/init.sh +49 -0
  313. package/scripts/migrate-specs.js +258 -0
  314. package/scripts/rename-prd-files.js +174 -0
  315. package/scripts/upgrade.sh +94 -0
  316. package/skills/code/SKILL.md +19 -0
  317. package/skills/code/SKILL.tmpl +19 -0
  318. package/skills/debug/SKILL.md +19 -0
  319. package/skills/debug/SKILL.tmpl +19 -0
  320. package/skills/design-spec/SKILL.md +11 -0
  321. package/skills/design-spec/SKILL.tmpl +11 -0
  322. package/skills/discovery/SKILL.md +14 -0
  323. package/skills/discovery/SKILL.tmpl +14 -0
  324. package/skills/prd/SKILL.md +19 -0
  325. package/skills/prd/SKILL.tmpl +19 -0
  326. package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  327. package/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
  328. package/skills/qc/qa-analyst/business-rules.md +59 -0
  329. package/skills/qc/qa-analyst/data-flow.md +64 -0
  330. package/skills/qc/qa-analyst/spec-breakdown.md +61 -0
  331. package/skills/qc/qa-designer/e2e/journey.md +41 -0
  332. package/skills/qc/qa-designer/exploratory/charter.md +68 -0
  333. package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  334. package/skills/qc/qa-designer/functional/api.md +45 -0
  335. package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  336. package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  337. package/skills/qc/qa-designer/integration/api.md +42 -0
  338. package/skills/qc/qa-designer/integration/db.md +39 -0
  339. package/skills/qc/qa-designer/integration/gui.md +40 -0
  340. package/skills/qc/qa-designer/integration/kafka.md +40 -0
  341. package/skills/qc/qa-designer/non-functional.md +40 -0
  342. package/skills/qc/qa-planner/test-plan.md +120 -0
  343. package/skills/qc/qa-reviewer/script/e2e.md +87 -0
  344. package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  345. package/skills/qc/qa-reviewer/script/functional.md +101 -0
  346. package/skills/qc/qa-reviewer/script/integration.md +91 -0
  347. package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  348. package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  349. package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  350. package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  351. package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  352. package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  353. package/skills/qc/qa-runner/e2e.md +49 -0
  354. package/skills/qc/qa-runner/exploratory/session.md +36 -0
  355. package/skills/qc/qa-runner/functional/api.md +35 -0
  356. package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  357. package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  358. package/skills/qc/qa-runner/integration.md +47 -0
  359. package/skills/qc/qa-runner/non-functional.md +49 -0
  360. package/skills/qc/qa-runner/report/report.md +37 -0
  361. package/skills/setup-ai-first/SKILL.md +11 -0
  362. package/skills/setup-ai-first/SKILL.tmpl +11 -0
  363. package/skills/spec/SKILL.md +19 -0
  364. package/skills/spec/SKILL.tmpl +19 -0
  365. package/skills/test/SKILL.md +18 -0
  366. package/skills/test/SKILL.tmpl +18 -0
  367. package/steps/business-language.md +56 -0
  368. package/steps/capture-lesson.md +79 -0
  369. package/steps/context-loader.md +311 -0
  370. package/steps/gate.md +88 -0
  371. package/steps/report-footer.md +100 -0
  372. package/steps/review-fanout.md +159 -0
  373. package/steps/spawn-agent.md +129 -0
  374. package/steps/trace-mirror.md +26 -0
  375. package/templates/architecture.template.md +113 -0
  376. package/templates/design-spec.template.md +217 -0
  377. package/templates/feature.template +120 -0
  378. package/templates/platform-guide.template.md +145 -0
  379. package/templates/prd.template.md +224 -0
  380. package/templates/product-definition.template.md +188 -0
  381. package/templates/project-context.yaml +161 -0
  382. package/templates/tech-design.template.md +498 -0
@@ -0,0 +1,217 @@
1
+ # {TICKET-ID} {Feature Name} — Design Spec [{Platform}]
2
+
3
+ <!--
4
+ Template này được sử dụng bởi /generate-design-spec.
5
+ Platform = web | app | app-ios | app-android
6
+
7
+ PLATFORM SECTIONS:
8
+ - Section 3A + 4A: chỉ dành cho web (react/nextjs/vue/angular). Xóa C khi dùng cho web.
9
+ - Section 3C + 4B: chỉ dành cho app (flutter/react-native/ios/android). Xóa A+B khi dùng cho app.
10
+
11
+ COMPONENT MAPPING (bắt buộc):
12
+ - Mọi component trong Component Inventory PHẢI được map với figma-components/{module}.md
13
+ - ✅ Matched → dùng Code Component và Import Path từ catalog
14
+ - ⚠️ TODO → đánh dấu [TODO — chưa implement]
15
+ - ❌ Chưa có → đánh dấu [NEW — cần confirm với designer]
16
+
17
+ FIGMA LINKS (bắt buộc mỗi màn):
18
+ - Mỗi screen PHẢI có link Figma node-level (URL chứa ?node-id=...) — lấy bằng
19
+ right-click frame → "Copy link to selection". Đây là link AI đọc được qua Figma MCP.
20
+ - Link file trần (không có node-id) KHÔNG hợp lệ — AI không định vị được frame.
21
+ - Screen chưa có design → đánh dấu ❌ Missing; spec giữ Status "draft", chặn sign-off
22
+ và /generate-bdd cho tới khi đủ link.
23
+
24
+ SCREEN STATES (bắt buộc mỗi màn):
25
+ - Tối thiểu: default, loading, error
26
+ - Thêm "empty" nếu màn có thể hiển thị trạng thái không có dữ liệu
27
+ - Thêm "success" nếu action tạo ra trạng thái xác nhận riêng biệt
28
+ -->
29
+
30
+ ---
31
+
32
+ ## Metadata
33
+
34
+ | Field | Value |
35
+ |--------------------|---------------------------------------------------------------|
36
+ | **Spec ID** | {TICKET-ID}-DS-{platform} |
37
+ | **Version** | 1.0 |
38
+ | **Status** | draft / approved |
39
+ | **Platform** | {web \| app \| app-ios \| app-android} |
40
+ | **Module** | {active_module} |
41
+ | **Service** | {active_service} |
42
+ | **Domain** | {domain} |
43
+ | **Business PRD** | [{TICKET-ID}](./{TICKET-ID}-slug.md) |
44
+ | **Figma** | {link file feature} ({linked}/{N} frame đã link) |
45
+ | **Author** | {tên PO hoặc "AI-assisted"} |
46
+ | **Created** | {YYYY-MM-DD} |
47
+ | **Updated** | {YYYY-MM-DD} |
48
+
49
+ ---
50
+
51
+ # 1. Danh mục màn hình (Screen Inventory)
52
+
53
+ | # | Tên màn hình | Điểm vào | Figma Frame (link node-level) | Ghi chú |
54
+ |---|-------------|-------------|-------------------------------|-------|
55
+ | 1 | {Màn hình 1} | {người dùng đến từ đâu} | [Frame]({node-level url}) | |
56
+ | 2 | {Màn hình 2} | {điểm vào} | ❌ Missing — thêm link node-id | |
57
+
58
+ ---
59
+
60
+ # 2. Đặc tả màn hình (Screen Specs)
61
+
62
+ ## Màn hình 1: {Tên màn hình}
63
+
64
+ **Figma**: [{Tên frame}]({figma_frame_url})
65
+
66
+ ### Layout
67
+
68
+ {Grid / max-width / padding / spacing — tham chiếu design token nếu áp dụng được}
69
+
70
+ ### Component Inventory
71
+
72
+ | Component (Figma) | Code Component | Import Path | States | Ghi chú |
73
+ |------------------------|----------------|------------------------|---------------------------------|---------|
74
+ | {Figma/Button/Primary} | Button | @/components/ui/Button | default, loading, disabled | |
75
+ | {Figma/Input/Text} | TextInput | @/components/ui/Input | default, focus, error, disabled | |
76
+
77
+ ### Screen States
78
+
79
+ | State | Trigger | Hành vi UI |
80
+ |-----------|----------------------------------|----------------------------------------------------------|
81
+ | default | Màn đã load, có dữ liệu | {Mô tả toàn bộ giao diện đã render} |
82
+ | loading | API đang gọi | {Vị trí và kiểu skeleton / spinner} |
83
+ | error | API thất bại / lỗi validation | {Toast / lỗi inline / màn lỗi + CTA khôi phục} |
84
+ | empty | Không có dữ liệu trả về | {Illustration + CTA — vd: "Chưa có mục nào. Thêm mới →"} |
85
+ | success | Action hoàn tất (nếu có) | {Toast xác nhận / điều hướng / thay đổi giao diện} |
86
+
87
+ ### Actions & Navigation
88
+
89
+ | Action | Trigger | Kết quả |
90
+ |-----------------|---------------------------|---------------------------------------------------|
91
+ | {Tên action} | Tap/click {phần tử} | Điều hướng tới {Màn hình N} / Mở {Tên modal} |
92
+ | {Back/Cancel} | Cử chỉ back / nút | Quay lại {màn trước} mà không lưu |
93
+
94
+ ---
95
+
96
+ <!-- Lặp lại ## Màn hình N cho mỗi màn bổ sung -->
97
+
98
+ ---
99
+
100
+ # 3. Pattern tương tác (Interaction Patterns)
101
+
102
+ <!-- === CHỈ WEB — xóa section này cho app === -->
103
+
104
+ ## A. Hành vi Responsive *(web)*
105
+
106
+ | Breakpoint | Width | Thay đổi layout |
107
+ |------------|------------|---------------------------------------------|
108
+ | Mobile | < 768px | {1 cột, bottom nav, CTA full-width} |
109
+ | Tablet | 768–1279px | {grid 2 cột, sidebar thu gọn} |
110
+ | Desktop | ≥ 1280px | {layout đầy đủ, max-width 1440px} |
111
+
112
+ ## B. Hover / Focus / Keyboard *(web)*
113
+
114
+ | Phần tử | Hover | Focus | Keyboard |
115
+ |----------------|-------------------------------|---------------------------------|---------------|
116
+ | Primary button | Background → {color.hover} | Outline 2px {color.focus} | Enter / Space |
117
+ | Text input | Border → {color.border.hover} | Border → {color.primary} | Tab to focus |
118
+
119
+ <!-- === CHỈ APP — xóa section A+B cho app === -->
120
+
121
+ ## C. Cử chỉ & Điều hướng *(app)*
122
+
123
+ | Cử chỉ | Màn / Phần tử | Hành vi |
124
+ |----------------------|---------------------|---------------------------------------------|
125
+ | Cử chỉ back | Mọi màn | {Quay lại / hiện dialog "Discard changes?"} |
126
+ | Pull-to-refresh | {Tên màn} | Refresh dữ liệu, spinner ở trên cùng |
127
+ | Swipe trái trên row | {List item} | Hiện action {Delete / Archive} |
128
+
129
+ ### Navigation Stack *(app)*
130
+
131
+ ```
132
+ {vd: BottomTab(Home) → ListPage → DetailPage → EditPage}
133
+ ```
134
+
135
+ ### Platform Conventions *(app)*
136
+
137
+ | Khía cạnh | iOS | Android |
138
+ |------------------|-------------------------------------------|-------------------------------------|
139
+ | Navigation bar | Nút back trên-trái, title canh giữa | Mũi tên Up, title canh trái |
140
+ | Bottom sheet | UISheetPresentation, hiện grabber | BottomSheet, drag handle |
141
+ | Dialog | Action canh phải | Action canh trái |
142
+
143
+ ---
144
+
145
+ # 4. Cân nhắc theo Platform (Platform Considerations)
146
+
147
+ <!-- === CHỈ WEB === -->
148
+
149
+ ## A. Accessibility *(web)*
150
+
151
+ - [ ] Mọi phần tử tương tác đều tới được bằng phím Tab — không có keyboard trap
152
+ - [ ] Focus trap bên trong modal
153
+ - [ ] Nút chỉ có icon phải có `aria-label`
154
+ - [ ] Nội dung động thông báo qua `aria-live`
155
+ - [ ] Tương phản WCAG AA: text ≥ 4.5:1, text lớn ≥ 3:1
156
+ - [ ] Input form có label hiển thị (không chỉ dùng placeholder)
157
+
158
+ <!-- === CHỈ APP === -->
159
+
160
+ ## B. Thiết bị & OS *(app)*
161
+
162
+ - [ ] Áp dụng safe area insets (trên + dưới) ở mọi màn
163
+ - [ ] Touch target tối thiểu: 44×44pt (iOS) / 48×48dp (Android)
164
+ - [ ] Đã test trên 375pt (iPhone SE) và 360dp (Android nhỏ)
165
+ - [ ] Deep link: `{scheme}://{host}/{path}` → {tên màn}
166
+ - [ ] Permission: {Camera / Location / Notification} — nội dung lý do TBD
167
+ - [ ] Offline: {tên màn} hiện dữ liệu cache + banner; {action} bị disable kèm tooltip
168
+ - [ ] Đã test dark mode — không có màu hardcode
169
+
170
+ ---
171
+
172
+ # 5. AC-UI — Tiêu chí chấp nhận về Design
173
+
174
+ > Được **PO + Designer** review và sign off trước khi sinh BDD.
175
+ > Bổ sung cho AC mức nghiệp vụ trong [Business PRD](./{TICKET-ID}-slug.md).
176
+
177
+ | ID | Tiêu chí chấp nhận | Verified by |
178
+ |--------|--------------------------------------------------------------------------|-----------------|
179
+ | AC-UI1 | Mọi màn khớp với frame Figma đã duyệt trong dung sai design-system | Designer |
180
+ | AC-UI2 | Trạng thái loading xuất hiện trong vòng 200ms kể từ khi gọi API | QA |
181
+ | AC-UI3 | Mọi thông báo lỗi đều hiển thị, rõ ràng, và kèm CTA khôi phục | PO |
182
+ | AC-UI4 | Empty state có illustration và call-to-action | PO + Designer |
183
+ | AC-UI5 | {Tiêu chí riêng theo platform} | QA |
184
+
185
+ ---
186
+
187
+ # Appendix
188
+
189
+ ## Tóm tắt Figma
190
+
191
+ | Màn hình | Figma Frame (node-level) | Trạng thái Link / Fetch |
192
+ |------------|--------------------------|--------------------------------|
193
+ | {Màn hình 1} | [Link]({node-level url}) | ✅ Đã link & fetch |
194
+ | {Màn hình 2} | — | ❌ Missing — không có link node-id |
195
+
196
+ ## Design Token đã tham chiếu
197
+
198
+ | Token | Value | Dùng ở |
199
+ |-------------------|----------|----------------------------|
200
+ | `color.primary` | {#hex} | Button, link |
201
+ | `spacing.md` | {16px} | Khoảng cách dọc tiêu chuẩn |
202
+
203
+ ## Tài liệu tham khảo
204
+
205
+ - [{TICKET-ID}](./{TICKET-ID}-slug.md) — Business PRD
206
+
207
+ ## Giả định AI
208
+
209
+ - {Giả định — [AI DRAFT]}
210
+
211
+ ---
212
+
213
+ ## Changelog
214
+
215
+ | Version | Date | Changes |
216
+ |---------|--------------|-----------------|
217
+ | 1.0 | {YYYY-MM-DD} | Initial version |
@@ -0,0 +1,120 @@
1
+ # ============================================================
2
+ # @trace.id: {TICKET-ID}-UC{N}
3
+ # @trace.title: <Feature name>
4
+ # @trace.revision: 1 ← field tĩnh; dùng @trace.bdd_version để theo dõi version (tăng bởi /review-context --fix hoặc --resume)
5
+ # @trace.domain: <domain>
6
+ # @trace.platform: {active_platform — web | app | system | (bỏ trong umbrella mode)}
7
+ # @trace.service: {active_service — bỏ trong spec repo mode}
8
+ # @trace.module: {active_module trong umbrella mode; "unknown" trong spec repo mode}
9
+ # @trace.status: draft
10
+ # @trace.author: AI-generated
11
+ # @trace.created_at: {YYYY-MM-DD}
12
+ # @trace.prd: {TICKET-ID}
13
+ # @trace.prd_version: {đọc từ metadata PRD "| **Version** |"}
14
+ # @trace.bdd_version: {1.0 nếu gen mới; tăng 0.1 khi gen lại — vd 1.0 → 1.1}
15
+ # @trace.business_rules: {TICKET-ID}-UC{N}-BR1, {TICKET-ID}-UC{N}-BR2
16
+ # @trace.dataset: {domain}.testdata.yaml
17
+ # ============================================================
18
+
19
+ # === CONTEXT ===
20
+ # Actor: <vai trò thực hiện hành động, vd: Consumer, Staff, System>
21
+ # Screens: <các màn liên quan, vd: Cart → Confirm Order → Order Detail>
22
+ # Entities: <business entity, vd: Order, OrderItem, Consumer>
23
+ # Pre-state: <state dùng chung trước khi vào các scenario>
24
+
25
+ # === SCOPE ===
26
+ # In: <UC này phủ gì>
27
+ # Out: <cái gì KHÔNG thuộc UC này — link tới UC/feature khác (R10)>
28
+
29
+ # === BUSINESS DEFINITION ===
30
+ # Tham chiếu nhanh các term dùng trong feature này. Chi tiết SoT: business-dictionary.md
31
+ # <Term 1>: <định nghĩa ngắn>
32
+ # <Term 2>: <định nghĩa ngắn>
33
+ #
34
+ # --- Popup/Modal Lifecycle (tùy chọn — BẮT BUỘC nếu feature là popup/modal; Pre-merge yêu cầu) ---
35
+ # - Open trigger: <khi nào popup hiển thị, vd: click menu sidebar>
36
+ # - Close trigger: <khi nào popup đóng, vd: F5 / click X / ESC / navigate away>
37
+ # - Refresh model: <data refresh khi nào, vd: mỗi lần open (NO CACHE) / persisted / polling>
38
+ # - State reset: <state nào reset khi đóng/mở lại, vd: pagination, expand, dropdown selection>
39
+ #
40
+ # --- Display Logic Matrix (tùy chọn — BẮT BUỘC nếu display logic phụ thuộc ≥2 chiều; Pre-merge yêu cầu) ---
41
+ # Liệt kê đủ ma trận N×M case + map mỗi case → SC. Tên SC theo pattern `<cấu trúc>: <outcome>` (KHÔNG dùng "(Case X)").
42
+ # | # | Dim1 | Dim2 | Format hiển thị | SC |
43
+ # |---|------|------|------------------------|------|
44
+ # | 1 | 0 | 0 | `Tên hàng` | SC{} |
45
+ # | 2 | 0 | 1 | `Tên hàng (đơn vị)` | SC{} |
46
+ # | ... | ... | ... | ... | ... |
47
+
48
+ Feature: <Feature name>
49
+ As a <role>
50
+ I want to <action>
51
+ So that <business value>
52
+
53
+ Background:
54
+ Given <precondition dùng chung — dùng alias từ dataset, không phải ID kỹ thuật>
55
+
56
+ # ==========================================================
57
+ # NHÓM 1: <Business theme> (<BR refs>)
58
+ # ==========================================================
59
+
60
+ # Side-effects: <liệt kê ngắn các Then side-effect cần verify>
61
+ # @trace.scenario: {TICKET-ID}-UC{N}-SC1
62
+ # @trace.sc_version: 1.0
63
+ # @trace.business_rules: {TICKET-ID}-UC{N}-BR1
64
+ @happy
65
+ Scenario: <mô tả business outcome — dùng động từ chính xác: create/receive/assign/block>
66
+ Given <input state — alias từ dataset>
67
+ When <single action>
68
+ Then <main observable outcome>
69
+ And <side-effect 1 khai báo trong header>
70
+
71
+ # Side-effects: <...>
72
+ # @trace.scenario: {TICKET-ID}-UC{N}-SC2
73
+ # @trace.sc_version: 1.0
74
+ # @trace.business_rules: {TICKET-ID}-UC{N}-BR1
75
+ @happy @alternative
76
+ Scenario: <cùng theme NHÓM 1 nhưng path khác — vd: giá trị enum khác>
77
+ Given <state>
78
+ When <action>
79
+ Then <outcome>
80
+
81
+ # ==========================================================
82
+ # NHÓM 2: <Business theme 2> (<BR refs>)
83
+ # ==========================================================
84
+
85
+ # Side-effects: <...>
86
+ # @trace.scenario: {TICKET-ID}-UC{N}-SC3
87
+ # @trace.sc_version: 1.0
88
+ # @trace.business_rules: {TICKET-ID}-UC{N}-BR2
89
+ @edge
90
+ Scenario: <scenario boundary / error>
91
+ Given <state>
92
+ When <action>
93
+ Then <expected error handling>
94
+
95
+ # === PRD COVERAGE (C.1 + C.2) ===
96
+ # AC mapping:
97
+ # AC1 (...) → SC1, SC2
98
+ # AC2 (...) → SC3
99
+ # BR mapping (mỗi bullet PHẢI có ≥1 SC — C.2):
100
+ # {TICKET-ID}-UC{N}-BR1 (...) → SC1, SC2
101
+ # {TICKET-ID}-UC{N}-BR2 (...) → SC3
102
+ # Wireframe mapping (mỗi component/action ≥1 SC — C.1):
103
+ # Screen "<screen name>":
104
+ # [x] <action 1> → SC1
105
+ # [x] <action 2> → SC2
106
+ # [ ] <action 3> → MISSING ← BLOCK MERGE
107
+ # Design Spec coverage (chỉ FE/App — C.1 mở rộng; bỏ khối này nếu không nạp design-spec):
108
+ # Screen "<screen>": loading → SC?, error → SC?, empty → SC?
109
+ # AC-UI behavioral: AC-UI3 (lỗi+khôi phục) → SC?, AC-UI4 (empty CTA) → SC?
110
+ # (bỏ AC-UI visual thuần: AC-UI1 khớp Figma, AC-UI5 WCAG — Designer/QA review riêng)
111
+
112
+ # === PRE-MERGE CHECKLIST ===
113
+ # - [ ] Mỗi SC có Side-effects + @trace.scenario + @trace.sc_version + @trace.business_rules
114
+ # - [ ] Coverage Matrix: 0 dòng MISSING (C.1)
115
+ # - [ ] FE/App: mỗi Screen State (≠default) + AC-UI behavioral của design-spec có ≥1 SC (C.1 mở rộng)
116
+ # - [ ] Mỗi AC/BR map tới ≥1 SC (C.2)
117
+ # - [ ] 0 banned term (C.4) — grep file trước khi merge
118
+ # - [ ] Feature ≥3 SC có NHÓM grouping theo business theme (C.5)
119
+ # - [ ] Nếu popup/modal: khai báo Popup/Modal Lifecycle trong BUSINESS DEFINITION
120
+ # - [ ] Nếu display logic ≥2 chiều: Display Logic Matrix trong BUSINESS DEFINITION
@@ -0,0 +1,145 @@
1
+ # Platform Guide — {{SERVICE_NAME}}
2
+
3
+ > Guide này cung cấp context mà Claude dùng khi làm việc trong service/repository NÀY.
4
+ > Giữ ngắn gọn và đúng sự thật. Cập nhật khi kiến trúc hoặc domain model thay đổi.
5
+ > Tham chiếu: CLAUDE.md cho chuẩn toàn dự án. File này phủ context riêng của service.
6
+
7
+ ---
8
+
9
+ # §1. Service Overview
10
+
11
+ **Tên service**: {{SERVICE_NAME}}
12
+ **Mục đích**: {{ONE_SENTENCE_PURPOSE}}
13
+ **Bounded context**: {{BOUNDED_CONTEXT}} # vd: "Sở hữu toàn bộ logic vòng đời order. KHÔNG sở hữu payment hay inventory."
14
+ **Team**: {{TEAM_NAME}}
15
+ **Repository**: {{REPO_URL}}
16
+
17
+ Trách nhiệm chính:
18
+ - {{RESPONSIBILITY_1}}
19
+ - {{RESPONSIBILITY_2}}
20
+ - {{RESPONSIBILITY_3}}
21
+
22
+ Service này KHÔNG xử lý:
23
+ - {{OUT_OF_SCOPE_1}} # vd: "Xử lý payment → xem payment-service"
24
+ - {{OUT_OF_SCOPE_2}}
25
+
26
+ ---
27
+
28
+ # §2. Domain Model
29
+
30
+ Các entity chính và quan hệ của chúng:
31
+
32
+ ```
33
+ {{ENTITY_1}} (aggregate root)
34
+ ├── {{CHILD_ENTITY_1}} (value object / child entity)
35
+ └── {{CHILD_ENTITY_2}}
36
+
37
+ {{ENTITY_2}}
38
+ └── references {{ENTITY_1}} by ID
39
+ ```
40
+
41
+ **{{ENTITY_1}}**:
42
+ - Field chính: {{KEY_FIELDS}}
43
+ - Vòng đời status: {{STATUS_1}} → {{STATUS_2}} → {{STATUS_3}}
44
+ - Business rule: {{KEY_RULE_1}}
45
+
46
+ **{{ENTITY_2}}**:
47
+ - Field chính: {{KEY_FIELDS}}
48
+ - Quan hệ: {{RELATIONSHIP_DESCRIPTION}}
49
+
50
+ ---
51
+
52
+ # §3. Common Patterns
53
+
54
+ Các pattern riêng của service này (bổ sung cho chuẩn toàn dự án trong CLAUDE.md):
55
+
56
+ ## {{PATTERN_NAME_1}}
57
+ ```
58
+ // Khi nào dùng: {{USE_CASE}}
59
+ // Ví dụ:
60
+ {{CODE_EXAMPLE}}
61
+ ```
62
+
63
+ ## {{PATTERN_NAME_2}}
64
+ ```
65
+ // Khi nào dùng: {{USE_CASE}}
66
+ // Ví dụ:
67
+ {{CODE_EXAMPLE}}
68
+ ```
69
+
70
+ ---
71
+
72
+ # §4. Integration Points
73
+
74
+ ## Upstream Dependencies (service này gọi các bên dưới)
75
+
76
+ | Service / System | Cái ta gọi | Protocol | Auth |
77
+ |------------------|--------------|----------|------|
78
+ | {{UPSTREAM_1}} | {{WHAT}} | REST/gRPC/Event | {{AUTH_METHOD}} |
79
+ | {{UPSTREAM_2}} | {{WHAT}} | REST/gRPC/Event | {{AUTH_METHOD}} |
80
+
81
+ ## Downstream Consumers (các bên dưới gọi ta hoặc tiêu thụ event của ta)
82
+
83
+ | Consumer | Cái họ dùng | Protocol |
84
+ |----------|---------------|----------|
85
+ | {{DOWNSTREAM_1}} | {{WHAT}} | REST/Event |
86
+ | {{DOWNSTREAM_2}} | {{WHAT}} | REST/Event |
87
+
88
+ ## Event phát ra (Produced)
89
+
90
+ | Tên event | Trigger | Tóm tắt payload |
91
+ |------------|---------|-----------------|
92
+ | {{EVENT_1}} | {{WHEN}} | {{PAYLOAD_FIELDS}} |
93
+ | {{EVENT_2}} | {{WHEN}} | {{PAYLOAD_FIELDS}} |
94
+
95
+ ## Event tiêu thụ (Consumed)
96
+
97
+ | Tên event | Từ service | Ta làm gì với nó |
98
+ |------------|-------------|-------------------|
99
+ | {{EVENT_1}} | {{SOURCE}} | {{HANDLER_ACTION}} |
100
+
101
+ ---
102
+
103
+ # §5. Known Constraints
104
+
105
+ ## Ràng buộc hiệu năng (Performance)
106
+ - {{PERF_CONSTRAINT_1}} # vd: "Endpoint danh sách order phải phản hồi < 200ms cho tới 1000 order"
107
+ - {{PERF_CONSTRAINT_2}}
108
+
109
+ ## Ràng buộc business rule
110
+ - {{BUSINESS_CONSTRAINT_1}} # vd: "Không thể huỷ order sau khi đã ship"
111
+ - {{BUSINESS_CONSTRAINT_2}}
112
+
113
+ ## Phụ thuộc bên ngoài (External)
114
+ - {{EXTERNAL_DEP_1}} # vd: "Cần inventory-service sẵn sàng để tạo order"
115
+ - {{EXTERNAL_DEP_2}}
116
+
117
+ ## Technical Debt đã biết
118
+ - {{TECH_DEBT_1}} # vd: "OrderItem.price bị nhân bản từ catalog — đồng bộ qua job hằng đêm"
119
+
120
+ ---
121
+
122
+ # §6. Directory Structure
123
+
124
+ ```
125
+ {{SERVICE_ROOT}}/
126
+ ├── {{SOURCE_DIR}}/ # Code nguồn chính
127
+ │ ├── {{LAYER_1}}/ # vd: controller/ hoặc handler/
128
+ │ │ └── {{EXAMPLE_FILE}}
129
+ │ ├── {{LAYER_2}}/ # vd: service/ hoặc usecase/
130
+ │ │ └── {{EXAMPLE_FILE}}
131
+ │ ├── {{LAYER_3}}/ # vd: repository/ hoặc repo/
132
+ │ │ └── {{EXAMPLE_FILE}}
133
+ │ └── {{LAYER_4}}/ # vd: model/ hoặc domain/
134
+ │ └── {{EXAMPLE_FILE}}
135
+ ├── {{TEST_DIR}}/ # Test phản chiếu cấu trúc src
136
+ ├── specs/ # File BDD feature
137
+ │ └── bdd/
138
+ │ └── {{DOMAIN}}/
139
+ │ └── {{UC-ID}}-{{slug}}.feature
140
+ └── {{CONFIG_FILE}} # vd: application.yaml / appsettings.json
141
+ ```
142
+
143
+ **Convention chính của repo này:**
144
+ - {{CONVENTION_1}} # vd: "Mọi DTO nằm trong package api/, không trộn với domain model"
145
+ - {{CONVENTION_2}} # vd: "Integration test nằm ở src/test/java/.../integration/ với @Tag(\"integration\")"