@relipa/ai-flow-kit 0.1.4 → 0.1.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/README.md +0 -0
  2. package/bin/aiflow.js +0 -0
  3. package/bin/ak.js +0 -0
  4. package/custom/harness/playwright/.env.example +0 -0
  5. package/custom/harness/playwright/playwright.config.ts +0 -0
  6. package/custom/harness/playwright/tests/e2e/auth.setup.ts +0 -0
  7. package/custom/harness/playwright/tests/e2e/fixtures/test.ts +0 -0
  8. package/custom/harness/playwright/tests/e2e/pages/BasePage.ts +0 -0
  9. package/custom/harness/playwright/tests/e2e/support/auth.ts +0 -0
  10. package/custom/mcp-presets/README.md +0 -0
  11. package/custom/mcp-presets/backlog.json +0 -0
  12. package/custom/mcp-presets/figma-desktop.json +0 -0
  13. package/custom/mcp-presets/figma.json +0 -0
  14. package/custom/mcp-presets/gitnexus.json +0 -0
  15. package/custom/mcp-presets/google-sheets.json +0 -0
  16. package/custom/mcp-presets/jira.json +0 -0
  17. package/custom/mcp-presets/playwright.json +0 -0
  18. package/custom/prompts/bug-fix.md +0 -0
  19. package/custom/prompts/feature.md +0 -0
  20. package/custom/prompts/investigation.md +0 -0
  21. package/custom/rules/code-style.md +0 -0
  22. package/custom/rules/java/code-style.md +0 -0
  23. package/custom/rules/java/naming.md +0 -0
  24. package/custom/rules/java/review-checklist.md +0 -0
  25. package/custom/rules/java/spring-boot-examples.md +0 -0
  26. package/custom/rules/javascript/code-style.md +0 -0
  27. package/custom/rules/javascript/naming.md +0 -0
  28. package/custom/rules/ml-conventions.md +0 -0
  29. package/custom/rules/ml-review-checklist.md +0 -0
  30. package/custom/rules/naming.md +0 -0
  31. package/custom/rules/php/code-style.md +0 -0
  32. package/custom/rules/php/naming.md +0 -0
  33. package/custom/rules/project-conventions.md +67 -51
  34. package/custom/rules/review-checklist.md +0 -0
  35. package/custom/rules/test-patterns.md +0 -0
  36. package/custom/skills/automation-testing/SKILL.md +0 -0
  37. package/custom/skills/automation-testing/templates/BasePage.ts +0 -0
  38. package/custom/skills/automation-testing/templates/PageObject.example.ts +0 -0
  39. package/custom/skills/automation-testing/templates/playwright.config.ts +0 -0
  40. package/custom/skills/automation-testing/templates/spec.example.ts +0 -0
  41. package/custom/skills/ba-skills/{skill-ba-xay-dung-business-rules-v1.md → skill-ba-build-business-rules-v1.md} +0 -0
  42. package/custom/skills/ba-skills/{skill-ba-template-phan-tich-ban-dau-v1.md → skill-ba-initial-analysis-template-v1.md} +0 -0
  43. package/custom/skills/ba-skills/{skill-ba-phan-tich-ban-dau-v1.md → skill-ba-initial-analysis-v1.md} +2 -2
  44. package/custom/skills/ba-skills/{skill-ba-ve-luong-mermaid-v1.md → skill-ba-mermaid-flowchart-v1.md} +0 -0
  45. package/custom/skills/ba-skills/{skill-ba-qa-template-v1.md → skill-ba-qna-template-v1.md} +0 -0
  46. package/custom/skills/ba-skills/{skill-ba-qa-v1.md → skill-ba-qna-v1.md} +2 -2
  47. package/custom/skills/ba-skills/{skill-ba-template-uc-v1.md → skill-ba-uc-template-v1.md} +0 -0
  48. package/custom/skills/ba-skills/{skill-ba-prototype-v1.md → skill-ba-ui-prototype-v1.md} +2 -2
  49. package/custom/skills/ba-skills/{skill-ba-viet-spec-uc-v1.md → skill-ba-write-uc-spec-v1.md} +4 -4
  50. package/custom/skills/coverage-check/SKILL.md +0 -0
  51. package/custom/skills/deploy-model/SKILL.md +0 -0
  52. package/custom/skills/design-experiment/SKILL.md +0 -0
  53. package/custom/skills/evaluate-model/SKILL.md +0 -0
  54. package/custom/skills/evidence-aggregation/SKILL.md +0 -0
  55. package/custom/skills/execute-flow/SKILL.md +0 -0
  56. package/custom/skills/execute-flow/templates/playwright.config.ts +0 -0
  57. package/custom/skills/explore-data/SKILL.md +0 -0
  58. package/custom/skills/figma-to-component/SKILL.md +0 -0
  59. package/custom/skills/frame-ml-problem/SKILL.md +0 -0
  60. package/custom/skills/gate-review/SKILL.md +1 -1
  61. package/custom/skills/generate-spec/SKILL.md +99 -99
  62. package/custom/skills/generate-test-report/SKILL.md +0 -0
  63. package/custom/skills/generate-test-report/templates/test-report.md +0 -0
  64. package/custom/skills/generate-testcase/SKILL.md +0 -0
  65. package/custom/skills/generate-testcase/templates/testcase.md +0 -0
  66. package/custom/skills/impact-analysis/SKILL.md +0 -0
  67. package/custom/skills/improve-algorithm/SKILL.md +0 -0
  68. package/custom/skills/investigate-bug/SKILL.md +0 -0
  69. package/custom/skills/log-bug/SKILL.md +0 -0
  70. package/custom/skills/pr-impact-analysis/SKILL.md +0 -0
  71. package/custom/skills/read-study-requirement/SKILL.md +7 -5
  72. package/custom/skills/report-customer/SKILL.md +0 -0
  73. package/custom/skills/retest-orchestration/SKILL.md +0 -0
  74. package/custom/skills/review-plan/SKILL.md +194 -194
  75. package/custom/skills/script-sync/SKILL.md +0 -0
  76. package/custom/skills/test-analysis/SKILL.md +0 -0
  77. package/custom/skills/test-skills/categories/00-core/00.01.requirement-analysis.md +0 -0
  78. package/custom/skills/test-skills/categories/00-core/00.02.risk-analysis.md +0 -0
  79. package/custom/skills/test-skills/categories/00-core/00.03.test-scenario-builder.md +0 -0
  80. package/custom/skills/test-skills/categories/00-core/00.04.testcase-review.md +0 -0
  81. package/custom/skills/test-skills/categories/01-test-design/01.01.boundary-value-analysis.md +0 -0
  82. package/custom/skills/test-skills/categories/01-test-design/01.02.equivalence.partitioning.md +0 -0
  83. package/custom/skills/test-skills/categories/01-test-design/01.03.decision-table.md +0 -0
  84. package/custom/skills/test-skills/categories/01-test-design/01.04.state.transition.md +0 -0
  85. package/custom/skills/test-skills/categories/01-test-design/01.05.pairwise.md +0 -0
  86. package/custom/skills/test-skills/categories/01-test-design/01.06.error-guessing.md +0 -0
  87. package/custom/skills/test-skills/categories/02-ui-testing/02.01.UI-layout.md +0 -0
  88. package/custom/skills/test-skills/categories/02-ui-testing/02.02.form-validation.md +0 -0
  89. package/custom/skills/test-skills/categories/02-ui-testing/02.03.navigation.md +0 -0
  90. package/custom/skills/test-skills/categories/02-ui-testing/02.04.localization.md +0 -0
  91. package/custom/skills/test-skills/categories/02-ui-testing/02.05.accessibility.md +0 -0
  92. package/custom/skills/test-skills/categories/03-business-testing/03.01.CRUD-testing.md +0 -0
  93. package/custom/skills/test-skills/categories/03-business-testing/03.02.workflow-testing.md +0 -0
  94. package/custom/skills/test-skills/categories/03-business-testing/03.03.permission-testing.md +0 -0
  95. package/custom/skills/test-skills/categories/03-business-testing/03.04.dependency-validation.md +0 -0
  96. package/custom/skills/test-skills/categories/03-business-testing/03.05.notification-testing.md +0 -0
  97. package/custom/skills/test-skills/categories/03-business-testing/03.06.calculation.testing.md +0 -0
  98. package/custom/skills/test-skills/categories/04-data-testing/04.01.database-testing.md +0 -0
  99. package/custom/skills/test-skills/categories/04-data-testing/04.02.import-export-testing.md +0 -0
  100. package/custom/skills/test-skills/categories/04-data-testing/04.03.data-mapping.md +0 -0
  101. package/custom/skills/test-skills/categories/04-data-testing/04.04.duplicate-handling.md +0 -0
  102. package/custom/skills/test-skills/categories/04-data-testing/04.05.migration.md +0 -0
  103. package/custom/skills/test-skills/categories/05-integration/05.01.API-testing.md +0 -0
  104. package/custom/skills/test-skills/categories/05-integration/05.02.third-party-integration.md +0 -0
  105. package/custom/skills/test-skills/categories/05-integration/05.03.batch-processing.md +0 -0
  106. package/custom/skills/test-skills/categories/05-integration/05.04.file-upload-download.md +0 -0
  107. package/custom/skills/test-skills/categories/08-domain-skills/CMS.md +0 -0
  108. package/custom/skills/test-skills/categories/08-domain-skills/Ecommerce.md +0 -0
  109. package/custom/skills/test-skills/categories/99-review/99.01.coverage-review.md +0 -0
  110. package/custom/skills/test-skills/categories/99-review/99.02.knowledge-learning.md +0 -0
  111. package/custom/skills/test-skills/categories/99-review/99.03.repository-update.md +0 -0
  112. package/custom/skills/test-skills/categories/99-review/99.04.change-history.md +0 -0
  113. package/custom/skills/test-skills/rules/directory-and-naming-convention.md +158 -0
  114. package/custom/skills/test-skills/rules/{QA_Writing_Standards.md → qa-writing-standards.md} +0 -0
  115. package/custom/skills/test-skills/template/{template_testcase.md → testcase-template.md} +0 -0
  116. package/custom/skills/train-model/SKILL.md +0 -0
  117. package/custom/templates/laravel.md +0 -0
  118. package/custom/templates/nestjs.md +0 -0
  119. package/custom/templates/nextjs.md +0 -0
  120. package/custom/templates/nodejs-express.md +0 -0
  121. package/custom/templates/php-plain.md +0 -0
  122. package/custom/templates/php.md +0 -0
  123. package/custom/templates/python-django.md +0 -0
  124. package/custom/templates/python-fastapi.md +0 -0
  125. package/custom/templates/python-ml.md +0 -0
  126. package/custom/templates/python.md +0 -0
  127. package/custom/templates/reactjs.md +0 -0
  128. package/custom/templates/shared/coding-workflow.md +15 -0
  129. package/custom/templates/shared/create-spec-workflow.md +80 -89
  130. package/custom/templates/shared/create-testcase-workflow.md +86 -84
  131. package/custom/templates/shared/gate-workflow.md +64 -11
  132. package/custom/templates/shared/ml-gate-workflow.md +0 -0
  133. package/custom/templates/spring-boot.md +0 -0
  134. package/custom/templates/tools/claude.md +13 -13
  135. package/custom/templates/tools/copilot.md +12 -12
  136. package/custom/templates/tools/cursor.md +12 -12
  137. package/custom/templates/tools/gemini.md +22 -22
  138. package/custom/templates/tools/generic.md +17 -17
  139. package/custom/templates/vue-nuxt.md +0 -0
  140. package/docs/common/AIFLOW.md +10 -10
  141. package/docs/common/CHANGELOG.md +33 -9
  142. package/docs/common/QUICK_START.md +0 -0
  143. package/docs/common/ai-integration.md +53 -53
  144. package/docs/common/cli-reference.md +0 -0
  145. package/docs/common/configuration.md +0 -0
  146. package/docs/common/getting-started.md +0 -0
  147. package/docs/common/troubleshooting.md +0 -0
  148. package/docs/common/workflows/bug-fix.md +126 -126
  149. package/docs/common/workflows/feature.md +123 -123
  150. package/docs/common/workflows/figma.md +0 -0
  151. package/docs/common/workflows/impact-analysis.md +0 -0
  152. package/docs/common/workflows/investigation.md +0 -0
  153. package/docs/common/workflows/refactor.md +0 -0
  154. package/docs/project/ARCHITECTURE.md +0 -0
  155. package/index.js +0 -0
  156. package/package.json +1 -1
  157. package/scripts/checkpoint.js +0 -0
  158. package/scripts/config.js +0 -0
  159. package/scripts/context.js +0 -0
  160. package/scripts/create-score-excel.js +41 -47
  161. package/scripts/detect.js +0 -0
  162. package/scripts/doctor.js +0 -0
  163. package/scripts/gitnexus-worker.js +0 -0
  164. package/scripts/guide.js +0 -0
  165. package/scripts/hooks/block-git-write.js +0 -0
  166. package/scripts/hooks/session-start.js +10 -5
  167. package/scripts/hooks/session-stop.js +0 -0
  168. package/scripts/init.js +5 -0
  169. package/scripts/memory.js +0 -0
  170. package/scripts/prompt.js +0 -0
  171. package/scripts/remove.js +0 -0
  172. package/scripts/review.js +0 -0
  173. package/scripts/scaffold-playwright.js +0 -0
  174. package/scripts/task.js +69 -22
  175. package/scripts/telemetry/cli.js +0 -0
  176. package/scripts/telemetry/config.js +0 -0
  177. package/scripts/telemetry/crypto.js +0 -0
  178. package/scripts/telemetry/flush.js +0 -0
  179. package/scripts/telemetry/record.js +0 -0
  180. package/scripts/update.js +0 -0
  181. package/scripts/use.js +3 -2
  182. package/scripts/validate.js +0 -0
  183. package/upstream/.claude-plugin/marketplace.json +0 -0
  184. package/upstream/.claude-plugin/plugin.json +0 -0
  185. package/upstream/.codex/INSTALL.md +0 -0
  186. package/upstream/.cursor-plugin/plugin.json +0 -0
  187. package/upstream/.gitattributes +0 -0
  188. package/upstream/.github/FUNDING.yml +0 -0
  189. package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  190. package/upstream/.github/ISSUE_TEMPLATE/config.yml +0 -0
  191. package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  192. package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +0 -0
  193. package/upstream/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  194. package/upstream/.opencode/INSTALL.md +0 -0
  195. package/upstream/.opencode/plugins/superpowers.js +0 -0
  196. package/upstream/.version-bump.json +0 -0
  197. package/upstream/AGENTS.md +0 -0
  198. package/upstream/CHANGELOG.md +0 -0
  199. package/upstream/CLAUDE.md +0 -0
  200. package/upstream/CODE_OF_CONDUCT.md +0 -0
  201. package/upstream/GEMINI.md +0 -0
  202. package/upstream/LICENSE +0 -0
  203. package/upstream/README.md +0 -0
  204. package/upstream/RELEASE-NOTES.md +0 -0
  205. package/upstream/agents/code-reviewer.md +0 -0
  206. package/upstream/commands/brainstorm.md +0 -0
  207. package/upstream/commands/execute-plan.md +0 -0
  208. package/upstream/commands/write-plan.md +0 -0
  209. package/upstream/docs/README.codex.md +0 -0
  210. package/upstream/docs/README.opencode.md +0 -0
  211. package/upstream/docs/plans/2025-11-22-opencode-support-design.md +0 -0
  212. package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +0 -0
  213. package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +0 -0
  214. package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +0 -0
  215. package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +0 -0
  216. package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +0 -0
  217. package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +0 -0
  218. package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +0 -0
  219. package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +0 -0
  220. package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +0 -0
  221. package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +0 -0
  222. package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +0 -0
  223. package/upstream/docs/testing.md +0 -0
  224. package/upstream/docs/windows/polyglot-hooks.md +0 -0
  225. package/upstream/gemini-extension.json +0 -0
  226. package/upstream/hooks/hooks-cursor.json +0 -0
  227. package/upstream/hooks/hooks.json +0 -0
  228. package/upstream/hooks/run-hook.cmd +0 -0
  229. package/upstream/hooks/session-start +0 -0
  230. package/upstream/package.json +0 -0
  231. package/upstream/scripts/bump-version.sh +0 -0
  232. package/upstream/skills/brainstorming/SKILL.md +0 -0
  233. package/upstream/skills/brainstorming/scripts/frame-template.html +0 -0
  234. package/upstream/skills/brainstorming/scripts/helper.js +0 -0
  235. package/upstream/skills/brainstorming/scripts/server.cjs +0 -0
  236. package/upstream/skills/brainstorming/scripts/start-server.sh +0 -0
  237. package/upstream/skills/brainstorming/scripts/stop-server.sh +0 -0
  238. package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +0 -0
  239. package/upstream/skills/brainstorming/visual-companion.md +0 -0
  240. package/upstream/skills/dispatching-parallel-agents/SKILL.md +0 -0
  241. package/upstream/skills/executing-plans/SKILL.md +0 -0
  242. package/upstream/skills/finishing-a-development-branch/SKILL.md +0 -0
  243. package/upstream/skills/receiving-code-review/SKILL.md +0 -0
  244. package/upstream/skills/requesting-code-review/SKILL.md +0 -0
  245. package/upstream/skills/requesting-code-review/code-reviewer.md +0 -0
  246. package/upstream/skills/subagent-driven-development/SKILL.md +0 -0
  247. package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -0
  248. package/upstream/skills/subagent-driven-development/implementer-prompt.md +0 -0
  249. package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -0
  250. package/upstream/skills/systematic-debugging/CREATION-LOG.md +0 -0
  251. package/upstream/skills/systematic-debugging/SKILL.md +0 -0
  252. package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +0 -0
  253. package/upstream/skills/systematic-debugging/condition-based-waiting.md +0 -0
  254. package/upstream/skills/systematic-debugging/defense-in-depth.md +0 -0
  255. package/upstream/skills/systematic-debugging/find-polluter.sh +0 -0
  256. package/upstream/skills/systematic-debugging/root-cause-tracing.md +0 -0
  257. package/upstream/skills/systematic-debugging/test-academic.md +0 -0
  258. package/upstream/skills/systematic-debugging/test-pressure-1.md +0 -0
  259. package/upstream/skills/systematic-debugging/test-pressure-2.md +0 -0
  260. package/upstream/skills/systematic-debugging/test-pressure-3.md +0 -0
  261. package/upstream/skills/tdd-lean/SKILL.md +0 -0
  262. package/upstream/skills/test-driven-development/SKILL.md +0 -0
  263. package/upstream/skills/test-driven-development/testing-anti-patterns.md +0 -0
  264. package/upstream/skills/using-git-worktrees/SKILL.md +0 -0
  265. package/upstream/skills/using-superpowers/SKILL.md +0 -0
  266. package/upstream/skills/using-superpowers/references/codex-tools.md +0 -0
  267. package/upstream/skills/using-superpowers/references/copilot-tools.md +0 -0
  268. package/upstream/skills/using-superpowers/references/gemini-tools.md +0 -0
  269. package/upstream/skills/verification-before-completion/SKILL.md +0 -0
  270. package/upstream/skills/writing-plans/SKILL.md +0 -0
  271. package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +0 -0
  272. package/upstream/skills/writing-skills/SKILL.md +0 -0
  273. package/upstream/skills/writing-skills/anthropic-best-practices.md +0 -0
  274. package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -0
  275. package/upstream/skills/writing-skills/graphviz-conventions.dot +0 -0
  276. package/upstream/skills/writing-skills/persuasion-principles.md +0 -0
  277. package/upstream/skills/writing-skills/render-graphs.js +0 -0
  278. package/upstream/skills/writing-skills/testing-skills-with-subagents.md +0 -0
  279. package/upstream/tests/brainstorm-server/package-lock.json +0 -0
  280. package/upstream/tests/brainstorm-server/package.json +0 -0
  281. package/upstream/tests/brainstorm-server/server.test.js +0 -0
  282. package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +0 -0
  283. package/upstream/tests/brainstorm-server/ws-protocol.test.js +0 -0
  284. package/upstream/tests/claude-code/README.md +0 -0
  285. package/upstream/tests/claude-code/analyze-token-usage.py +0 -0
  286. package/upstream/tests/claude-code/run-skill-tests.sh +0 -0
  287. package/upstream/tests/claude-code/test-document-review-system.sh +0 -0
  288. package/upstream/tests/claude-code/test-helpers.sh +0 -0
  289. package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +0 -0
  290. package/upstream/tests/claude-code/test-subagent-driven-development.sh +0 -0
  291. package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +0 -0
  292. package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +0 -0
  293. package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +0 -0
  294. package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +0 -0
  295. package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +0 -0
  296. package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +0 -0
  297. package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +0 -0
  298. package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +0 -0
  299. package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +0 -0
  300. package/upstream/tests/explicit-skill-requests/run-all.sh +0 -0
  301. package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +0 -0
  302. package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +0 -0
  303. package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +0 -0
  304. package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +0 -0
  305. package/upstream/tests/explicit-skill-requests/run-test.sh +0 -0
  306. package/upstream/tests/opencode/run-tests.sh +0 -0
  307. package/upstream/tests/opencode/setup.sh +0 -0
  308. package/upstream/tests/opencode/test-plugin-loading.sh +0 -0
  309. package/upstream/tests/opencode/test-priority.sh +0 -0
  310. package/upstream/tests/opencode/test-tools.sh +0 -0
  311. package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +0 -0
  312. package/upstream/tests/skill-triggering/prompts/executing-plans.txt +0 -0
  313. package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +0 -0
  314. package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +0 -0
  315. package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +0 -0
  316. package/upstream/tests/skill-triggering/prompts/writing-plans.txt +0 -0
  317. package/upstream/tests/skill-triggering/run-all.sh +0 -0
  318. package/upstream/tests/skill-triggering/run-test.sh +0 -0
  319. package/upstream/tests/subagent-driven-dev/go-fractals/design.md +0 -0
  320. package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +0 -0
  321. package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +0 -0
  322. package/upstream/tests/subagent-driven-dev/run-test.sh +0 -0
  323. package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +0 -0
  324. package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +0 -0
  325. package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +0 -0
  326. package/custom/skills/test-skills/rules/Directory_and_Naming_Convention.md +0 -257
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ ## /coding — Manual Trigger for the DEV Coding Workflow
2
+
3
+ **Why this command exists:** the `[DEV] 5-Gate Development Workflow` (for `taskType`: `bug-fix`, `feature`, `refactor`, `investigation`, `documentation`) normally auto-starts via the `SessionStart` hook, which only fires when a Claude Code session **starts, resumes, or is cleared**. If a ticket was loaded with `ak use <TICKET-ID>` while this chat session was already open, the hook never re-ran — so this session has no ticket context yet, and typing "start" does nothing because nothing told the AI what "start" means. `/coding` fixes that by loading the ticket context manually, right now.
4
+
5
+ **Steps — do these now, in order:**
6
+
7
+ 1. Read `.aiflow/context/current.json`.
8
+ - Missing, or no `taskId` field → tell the developer to run `ak use <TICKET-ID>` first, then stop here.
9
+ 2. Read `.aiflow/tasks/[taskId]/task-state.json` if it exists.
10
+ - If `currentGate > 1` (task already in progress) → **resume at that gate** — do NOT restart from Gate 1. List which gates are already `APPROVED` before continuing.
11
+ - Otherwise → start fresh at Gate 1.
12
+ 3. In this project's main AI instruction file (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, or `.github/copilot-instructions.md` — whichever is present), find the section **`## [DEV] 5-Gate Development Workflow`** and follow it exactly, beginning at the gate identified in step 2.
13
+ 4. This workflow applies regardless of the ticket's `taskType` value — `bug-fix`, `feature`, `refactor`, `investigation`, and `documentation` all share this same 5-gate flow (see the "Workflow Selection" table above that section for the full routing).
14
+
15
+ Do not wait for further confirmation from the developer before starting — begin the identified gate immediately.
@@ -13,53 +13,53 @@ Các skill sau đây được cài tự động vào `.claude/skills/ba-skills/`
13
13
 
14
14
  | Skill | File |
15
15
  |---|---|
16
- | `skill-ba-phan-tich-ban-dau` | `.claude/skills/ba-skills/skill-ba-phan-tich-ban-dau-v1.md` |
17
- | `skill-ba-qa` | `.claude/skills/ba-skills/skill-ba-qa-v1.md` |
18
- | `skill-ba-prototype` | `.claude/skills/ba-skills/skill-ba-prototype-v1.md` |
19
- | `skill-ba-ve-luong-mermaid` | `.claude/skills/ba-skills/skill-ba-ve-luong-mermaid-v1.md` |
20
- | `skill-ba-xay-dung-business-rules` | `.claude/skills/ba-skills/skill-ba-xay-dung-business-rules-v1.md` |
21
- | `skill-ba-viet-spec-uc` | `.claude/skills/ba-skills/skill-ba-viet-spec-uc-v1.md` |
22
- | `template-phan-tich-ban-dau` | `.claude/skills/ba-skills/skill-ba-template-phan-tich-ban-dau-v1.md` |
23
- | `template-qa` | `.claude/skills/ba-skills/skill-ba-qa-template-v1.md` |
24
- | `template-uc` | `.claude/skills/ba-skills/skill-ba-template-uc-v1.md` |
16
+ | `skill-ba-phan-tich-ban-dau` | `.claude/skills/ba-skills/skill-ba-initial-analysis-v1.md` |
17
+ | `skill-ba-qa` | `.claude/skills/ba-skills/skill-ba-qna-v1.md` |
18
+ | `skill-ba-prototype` | `.claude/skills/ba-skills/skill-ba-ui-prototype-v1.md` |
19
+ | `skill-ba-ve-luong-mermaid` | `.claude/skills/ba-skills/skill-ba-mermaid-flowchart-v1.md` |
20
+ | `skill-ba-xay-dung-business-rules` | `.claude/skills/ba-skills/skill-ba-build-business-rules-v1.md` |
21
+ | `skill-ba-viet-spec-uc` | `.claude/skills/ba-skills/skill-ba-write-uc-spec-v1.md` |
22
+ | `template-phan-tich-ban-dau` | `.claude/skills/ba-skills/skill-ba-initial-analysis-template-v1.md` |
23
+ | `template-qa` | `.claude/skills/ba-skills/skill-ba-qna-template-v1.md` |
24
+ | `template-uc` | `.claude/skills/ba-skills/skill-ba-uc-template-v1.md` |
25
25
 
26
26
  ---
27
27
 
28
28
  ### Cấu trúc thư mục đầu ra
29
29
 
30
30
  ```
31
- docs/ak-{project}/spec/
32
- ├── phan-tich/
33
- │ ├── [functionId]_phan-tich(1).md ← Gate 1 tạo
34
- │ └── [functionId]_phan-tich(n).md ← Gate 2 cập nhật (tăng version)
35
- ├── QA/
36
- │ ├── [functionId]_QA(1).md ← Gate 1 tạo
37
- │ └── [functionId]_QA(m).md ← Gate 2 tạo thêm nếu còn Open
38
- ├── design/
39
- │ └── [functionId]_design.html ← Gate 3 tạo
40
- └── UC/
41
- └── [functionId]_UC.md ← Gate 4 tạo
31
+ 02.BA-Specs/
32
+ ├── 01.Analysis/
33
+ │ ├── [functionId]/Analysis_v1.md ← Gate 1 tạo
34
+ │ └── [functionId]/Analysis_vn.md ← Gate 2 cập nhật (tăng version)
35
+ ├── 02.QnA/
36
+ │ ├── [functionId]/QnA-Log_v1.md ← Gate 1 tạo
37
+ │ └── [functionId]/QnA-Log_vm.md ← Gate 2 tạo thêm nếu còn Open
38
+ ├── 03.UI-Prototypes/
39
+ │ └── [functionId]/UI-Prototype_v1.html← Gate 3 tạo
40
+ └── 04.UC-Specs/
41
+ └── [functionId]/UC-Spec_v1.md ← Gate 4 tạo
42
42
  ```
43
43
 
44
- Ví dụ: `functionId = AD10`, `project = coinbook` → thư mục gốc là `docs/ak-coinbook/spec/`
44
+ Ví dụ: `functionId = AD10` → thư mục gốc là `02.BA-Specs/`
45
45
 
46
46
  ---
47
47
 
48
48
  ### Quy trình tổng quan 4 Gates
49
49
 
50
50
  ```
51
- (spec/ = docs/ak-{project}/spec/ — viết tắt cho ngắn gọn)
51
+ (BA-Specs/ = 02.BA-Specs/ — viết tắt cho ngắn gọn)
52
52
 
53
- [Input: Jira / Backlog / file] → Pre-flight: xác định functionId + thư mục đầu ra
53
+ [Input: Jira / Backlog / file] → Pre-flight: BẮT BUỘC xác định functionId
54
54
 
55
- Gate 1: Phân tích yêu cầu & Tạo Q&A → spec/phan-tich/ + spec/QA/
55
+ Gate 1: Phân tích yêu cầu & Tạo Q&A → BA-Specs/01.Analysis/ + BA-Specs/02.QnA/
56
56
  ↓ APPROVED
57
57
  Gate 2: Cập nhật phản hồi Q&A ←─────────────────────────────────────────┐
58
- ↓ còn Open → tạo QA(m+1) → đợi BA phản hồi → lặp lại ───────────────┘
58
+ ↓ còn Open → tạo QnA-Log_v(m+1) → đợi BA phản hồi → lặp lại ────────┘
59
59
  ↓ tất cả Confirmed + APPROVED
60
- Gate 3: Thiết kế UI Prototype HTML/CSS → spec/design/
60
+ Gate 3: Thiết kế UI Prototype HTML/CSS → BA-Specs/03.UI-Prototypes/
61
61
  ↓ APPROVED
62
- Gate 4: Viết đặc tả Use Case Spec → spec/UC/
62
+ Gate 4: Viết đặc tả Use Case Spec → BA-Specs/04.UC-Specs/
63
63
  ↓ APPROVED
64
64
  Bàn giao Dev/Test
65
65
  ```
@@ -71,55 +71,46 @@ Bàn giao Dev/Test
71
71
  **Mục tiêu:** Tiếp nhận đầu vào, hiểu nghiệp vụ, phát hiện khoảng trống (Gaps), lập bản phân tích sơ bộ và danh sách Q&A.
72
72
 
73
73
  **Đầu ra (Outputs):**
74
- - `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(1).md`
75
- - `docs/ak-{project}/spec/QA/[functionId]_QA(1).md`
74
+ - `02.BA-Specs/01.Analysis/[functionId]/Analysis_v1.md`
75
+ - `02.BA-Specs/02.QnA/[functionId]/QnA-Log_v1.md`
76
76
 
77
77
  **Bước thực hiện:**
78
78
 
79
79
  #### Bước 0: Pre-flight — Xác định functionId và thư mục đầu ra
80
80
 
81
- **Xác định `functionId`:**
81
+ **Xác định `functionId` (BẮT BUỘC):**
82
82
 
83
83
  Kiểm tra theo thứ tự ưu tiên:
84
84
  1. Trường `functionId` hoặc `screenId` trong `.aiflow/context/current.json`
85
85
  2. Rút gọn từ `ticketId` — bỏ dấu gạch, giữ ký hiệu (ví dụ: `AD-10` → `AD10`)
86
- 3. Nếu không tìm thấy → **hỏi BA ngay**:
86
+ 3. Nếu không tìm thấy → **BẮT BUỘC hỏi BA ngay**:
87
87
 
88
88
  ```
89
89
  Không tìm thấy functionId trong context.
90
90
  Vui lòng cung cấp mã định danh cho chức năng này (ví dụ: AD10, UC-LOGIN, PM-003):
91
91
  ```
92
92
 
93
- → Đợi BA trả lời, ghi nhận giá trị, dùng cho toàn bộ workflow.
93
+ → Đợi BA trả lời, ghi nhận giá trị, dùng cho toàn bộ workflow. KHÔNG ĐƯỢC TIẾP TỤC NẾU CHƯA CÓ functionId.
94
94
 
95
- **Xác định `{project}` và thư mục đầu ra:**
95
+ **Xác định thư mục đầu ra:**
96
96
 
97
- 1. Lấy `{project}` theo thứ tự ưu tiên:
98
- - Trường `project` trong `.aiflow/context/current.json`
99
- - Tên thư mục gốc workspace (chuyển lowercase, thay space bằng `-`)
100
-
101
- 2. Kiểm tra tồn tại thư mục `docs/ak-{project}/spec/` trong root dự án:
97
+ 1. Kiểm tra tồn tại thư mục `02.BA-Specs/` trong root dự án:
102
98
  - **Tìm thấy** → thông báo xác nhận:
103
99
  ```
104
- ✓ Thư mục đầu ra: docs/ak-{project}/spec/
100
+ ✓ Thư mục đầu ra: 02.BA-Specs/
105
101
  ✓ functionId: [functionId]
106
102
  → Bắt đầu Gate 1...
107
103
  ```
108
- - **Không tìm thấy** → **hỏi BA**:
109
- ```
110
- Không tìm thấy thư mục docs/ak-{project}/spec/.
111
- Tên project là gì? (ví dụ: coinbook, crm-app)
112
- ```
113
- → Nhận tên project từ BA → chuyển lowercase → tạo toàn bộ cây thư mục:
104
+ - **Không tìm thấy** → tạo toàn bộ cây thư mục:
114
105
  ```
115
- docs/ak-{project}/spec/phan-tich/
116
- docs/ak-{project}/spec/QA/
117
- docs/ak-{project}/spec/design/
118
- docs/ak-{project}/spec/UC/
106
+ 02.BA-Specs/01.Analysis/
107
+ 02.BA-Specs/02.QnA/
108
+ 02.BA-Specs/03.UI-Prototypes/
109
+ 02.BA-Specs/04.UC-Specs/
119
110
  ```
120
111
  → Thông báo:
121
112
  ```
122
- ✓ Đã tạo thư mục: docs/ak-{project}/spec/
113
+ ✓ Đã tạo thư mục: 02.BA-Specs/
123
114
  ✓ functionId: [functionId]
124
115
  → Bắt đầu Gate 1...
125
116
  ```
@@ -129,6 +120,7 @@ Vui lòng cung cấp mã định danh cho chức năng này (ví dụ: AD10, UC-
129
120
  - Nếu description có URL → chạy `ak fetch-links <url>` để tải nội dung
130
121
  - Nếu có `supplementaryContext[]` → đọc từng item (file đính kèm, ticket liên quan, comment PM)
131
122
  - Nếu có file yêu cầu thô được chỉ định → đọc file đó
123
+ - **READ skill:** `.superpowers/skills/brainstorming/SKILL.md` (hoặc `brainstorming` skill) để chủ động làm rõ các yêu cầu thô, khơi gợi ý tưởng trước khi phân tích.
132
124
 
133
125
  #### Bước 1b: Đọc Source Code
134
126
 
@@ -160,25 +152,25 @@ Nếu workspace mở dạng parent folder chứa cả `ak docs` lẫn source cod
160
152
  - Nếu có điểm mơ hồ cốt yếu → hỏi ONE câu làm rõ, đợi BA trả lời trước khi tiếp tục
161
153
 
162
154
  #### Bước 3: Soạn thảo Kết quả phân tích sơ bộ
163
- - **READ template:** `.claude/skills/ba-skills/skill-ba-template-phan-tich-ban-dau-v1.md`
155
+ - **READ template:** `.claude/skills/ba-skills/skill-ba-initial-analysis-template-v1.md`
164
156
  - Điền đầy đủ các mục theo template: Actors, Facts, Assumptions, Gap Analysis table
165
- - Lưu: `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(1).md`
157
+ - Lưu: `02.BA-Specs/01.Analysis/[functionId]/Analysis_v1.md`
166
158
 
167
159
  #### Bước 4: Soạn thảo danh sách Q&A
168
- - **READ skill:** `.claude/skills/ba-skills/skill-ba-qa-v1.md`
169
- - **READ template:** `.claude/skills/ba-skills/skill-ba-qa-template-v1.md`
160
+ - **READ skill:** `.claude/skills/ba-skills/skill-ba-qna-v1.md`
161
+ - **READ template:** `.claude/skills/ba-skills/skill-ba-qna-template-v1.md`
170
162
  - Chuyển từng Gap thành câu hỏi cụ thể, khách quan, không định hướng
171
163
  - Mỗi câu hỏi tương ứng với ít nhất một Gap. Trạng thái ban đầu: **Open**
172
- - Lưu: `docs/ak-{project}/spec/QA/[functionId]_QA(1).md`
164
+ - Lưu: `02.BA-Specs/02.QnA/[functionId]/QnA-Log_v1.md`
173
165
 
174
166
  #### Bước 5: Gate Review & Pause
175
167
  - **INVOKE** `gate-review` skill (generate mode) — ghi `.aiflow/review/gate-1-[functionId].md`
176
- - **Kiểm tra Q&A bắt buộc:** Đọc `QA(1).md` — đếm số câu có trạng thái **Open**
168
+ - **Kiểm tra Q&A bắt buộc:** Đọc `QnA-Log_v1.md` — đếm số câu có trạng thái **Open**
177
169
  - Hiển thị gate pause message — chờ phản hồi từ BA
178
170
 
179
- **Nếu nhận được APPROVED mà QA(1).md còn câu hỏi Open → từ chối ngay, hiển thị:**
171
+ **Nếu nhận được APPROVED mà QnA-Log_v1.md còn câu hỏi Open → từ chối ngay, hiển thị:**
180
172
 
181
- ⛔ GATE 1 BLOCKED — Còn [N] câu hỏi chưa được trả lời trong QA(1).md.
173
+ ⛔ GATE 1 BLOCKED — Còn [N] câu hỏi chưa được trả lời trong QnA-Log_v1.md.
182
174
 
183
175
  | ID | Câu hỏi còn Open |
184
176
  |----|-----------------|
@@ -187,7 +179,7 @@ Nếu workspace mở dạng parent folder chứa cả `ak docs` lẫn source cod
187
179
  Vui lòng cung cấp câu trả lời theo một trong 3 cách:
188
180
  → Option A: nhập trực tiếp — `Q1: [trả lời], Q2: [trả lời]`
189
181
  → Option B: paste nội dung bảng Q&A đã điền vào chat
190
- → Option C: đặt file `[functionId]_QA(1)_response.md` vào thư mục QA/ rồi gõ NEXT
182
+ → Option C: đặt file `QnA-Log_v1_response.md` vào thư mục `02.QnA/[functionId]/` rồi gõ NEXT
191
183
 
192
184
  ❌ APPROVED không được chấp nhận cho đến khi 100% câu hỏi đã Confirmed.
193
185
 
@@ -197,9 +189,9 @@ Vui lòng cung cấp câu trả lời theo một trong 3 cách:
197
189
  → Nếu blocked: làm theo gate-review skill response protocol
198
190
 
199
191
  **Definition of Done:**
200
- - [ ] `functionId` và `{project}` đã được xác định và thư mục đầu ra đã sẵn sàng
201
- - [ ] File `phan-tich(1).md` tạo đúng vị trí, cấu trúc đúng template, có bảng Gap Analysis
202
- - [ ] File `QA(1).md` có ít nhất 1 câu hỏi cho mỗi Gap, tất cả trạng thái **Open**
192
+ - [ ] `functionId` đã được xác định và thư mục đầu ra đã sẵn sàng
193
+ - [ ] File `Analysis_v1.md` tạo đúng vị trí, cấu trúc đúng template, có bảng Gap Analysis
194
+ - [ ] File `QnA-Log_v1.md` có ít nhất 1 câu hỏi cho mỗi Gap, tất cả trạng thái **Open**
203
195
  - [ ] Không có giả định nào được tự ý chốt thành Spec mà không đưa vào Q&A
204
196
 
205
197
  > **Telemetry:** Run `ak gate 1 start --ticket [functionId]` khi bắt đầu gate này.
@@ -213,33 +205,32 @@ Vui lòng cung cấp câu trả lời theo một trong 3 cách:
213
205
 
214
206
  **Đầu vào (Inputs):**
215
207
  - Phản hồi Q&A từ BA (xem 3 option bên dưới)
216
- - `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n).md` — phiên bản hiện tại
217
- - `docs/ak-{project}/spec/QA/[functionId]_QA(m).md` — danh sách câu hỏi hiện tại
208
+ - `02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n).md` — phiên bản hiện tại
209
+ - `02.BA-Specs/02.QnA/[functionId]/QnA-Log_v(m).md` — danh sách câu hỏi hiện tại
218
210
 
219
211
  **Cách BA cung cấp phản hồi (BA chọn một trong 3):**
220
212
  - **Option A** — Nhập trực tiếp vào chat: `Q&A: Q1: [trả lời], Q2: [trả lời]`
221
213
  - **Option B** — Paste nội dung bảng Q&A đã điền vào chat
222
- - **Option C** — Đặt file tại: `docs/ak-{project}/spec/QA/[functionId]_QA(m)_response.md`
214
+ - **Option C** — Đặt file tại: `02.BA-Specs/02.QnA/[functionId]/QnA-Log_v(m)_response.md`
223
215
 
224
216
  **Bước thực hiện:**
225
217
 
226
218
  #### Bước 1: Tiếp nhận và đánh giá câu trả lời
227
- - **READ skill:** `.claude/skills/ba-skills/skill-ba-qa-v1.md` và làm theo
228
- - Đối chiếu từng câu trả lời với câu hỏi trong `QA(m).md`
219
+ - Đối chiếu từng câu trả lời với câu hỏi trong `QnA-Log_v(m).md`
229
220
  - Phân loại:
230
221
  - Đủ thông tin → cập nhật trạng thái: **Confirmed**
231
222
  - Chưa rõ hoặc phát sinh nghiệp vụ mới → giữ trạng thái **Open**, bổ sung ghi chú
232
223
 
233
224
  #### Bước 2: Tích hợp thông tin vào tài liệu phân tích
234
- - Lấy thông tin từ các câu Confirmed → cập nhật vào `phan-tich(n).md`
225
+ - Lấy thông tin từ các câu Confirmed → cập nhật vào `Analysis_v(n).md`
235
226
  - Xóa các Gap đã được giải quyết khỏi bảng Gap Analysis
236
- - Tạo phiên bản mới: `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1).md`
227
+ - Tạo phiên bản mới: `02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n+1).md`
237
228
 
238
229
  #### Bước 3: Rẽ nhánh theo trạng thái Q&A
239
230
 
240
231
  **Kịch bản A — Vẫn còn câu hỏi Open:**
241
- 1. Dùng `skill-ba-phan-tich-ban-dau` kiểm tra `phan-tich(n+1).md` có phát sinh Gap mới không
242
- 2. Tạo: `docs/ak-{project}/spec/QA/[functionId]_QA(m+1).md` theo `skill-ba-qa` — chỉ giữ câu Open và câu mới phát sinh
232
+ 1. Kiểm tra `Analysis_v(n+1).md` có phát sinh Gap mới không
233
+ 2. Tạo: `02.BA-Specs/02.QnA/[functionId]/QnA-Log_v(m+1).md` — chỉ giữ câu Open và câu mới phát sinh
243
234
  3. **INVOKE** `gate-review` skill (generate mode) — ghi `.aiflow/review/gate-2-[functionId]-round-[m+1].md`
244
235
  4. Hiển thị:
245
236
 
@@ -247,8 +238,8 @@ Vui lòng cung cấp câu trả lời theo một trong 3 cách:
247
238
  ⏸️ GATE 2 — VÒNG Q&A [m+1]
248
239
 
249
240
  Câu hỏi còn Open: [N]
250
- File Q&A mới: [docs/ak-{project}/spec/QA/[functionId]_QA(m+1).md](docs/ak-{project}/spec/QA/[functionId]_QA(m+1).md)
251
- File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1).md](docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1).md)
241
+ File Q&A mới: [02.BA-Specs/02.QnA/[functionId]/QnA-Log_v(m+1).md](02.BA-Specs/02.QnA/[functionId]/QnA-Log_v(m+1).md)
242
+ File phân tích: [02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n+1).md](02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n+1).md)
252
243
 
253
244
  → BA điền câu trả lời và cung cấp theo một trong 3 option (A/B/C)
254
245
  → Sau khi cung cấp phản hồi, type NEXT để AI xử lý vòng tiếp theo
@@ -294,10 +285,10 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
294
285
  **Điều kiện vào Gate 3:** Tất cả Q&A đã **Confirmed** và Gate 2 đã **APPROVED**.
295
286
 
296
287
  **Đầu vào (Inputs):**
297
- - `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n).md` — phiên bản cuối
288
+ - `02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n).md` — phiên bản cuối
298
289
 
299
290
  **Đầu ra (Outputs):**
300
- - `docs/ak-{project}/spec/design/[functionId]_design.html`
291
+ - `02.BA-Specs/03.UI-Prototypes/[functionId]/UI-Prototype_v1.html`
301
292
 
302
293
  **Bước thực hiện:**
303
294
 
@@ -317,7 +308,7 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
317
308
  - CSS nổi bật lỗi (chữ đỏ, viền đỏ), mặc định ẩn (`display: none`)
318
309
 
319
310
  #### Bước 4: Lưu file
320
- - `docs/ak-{project}/spec/design/[functionId]_design.html`
311
+ - `02.BA-Specs/03.UI-Prototypes/[functionId]/UI-Prototype_v1.html`
321
312
 
322
313
  #### Bước 5: Gate Review & Pause
323
314
  - **INVOKE** `gate-review` skill (generate mode) — ghi `.aiflow/review/gate-3-[functionId].md`
@@ -329,7 +320,7 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
329
320
  → Nếu blocked: làm theo gate-review skill response protocol
330
321
 
331
322
  **Definition of Done:**
332
- - [ ] File `[functionId]_design.html` tạo đúng vị trí
323
+ - [ ] File `UI-Prototype_v1.html` tạo đúng vị trí
333
324
  - [ ] Giao diện hiển thị đủ tất cả thành phần nghiệp vụ
334
325
  - [ ] 100% thẻ tương tác có `id` duy nhất
335
326
  - [ ] CSS tự chứa trong file HTML
@@ -346,18 +337,18 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
346
337
  **Điều kiện vào Gate 4:** Gate 3 đã **APPROVED** và `design.html` đã hoàn chỉnh.
347
338
 
348
339
  **Đầu vào (Inputs):**
349
- - `docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n).md` — phiên bản cuối
350
- - `docs/ak-{project}/spec/design/[functionId]_design.html`
340
+ - `02.BA-Specs/01.Analysis/[functionId]/Analysis_v(n).md` — phiên bản cuối
341
+ - `02.BA-Specs/03.UI-Prototypes/[functionId]/UI-Prototype_v1.html`
351
342
 
352
343
  **Đầu ra (Outputs):**
353
- - `docs/ak-{project}/spec/UC/[functionId]_UC.md`
344
+ - `02.BA-Specs/04.UC-Specs/[functionId]/UC-Spec_v1.md`
354
345
 
355
346
  **Bước thực hiện:**
356
347
 
357
348
  #### Bước 1: Khởi tạo Spec từ Template
358
- - **READ template:** `.claude/skills/ba-skills/skill-ba-template-uc-v1.md`
359
- - **READ skill:** `.claude/skills/ba-skills/skill-ba-viet-spec-uc-v1.md`
360
- - Tạo: `docs/ak-{project}/spec/UC/[functionId]_UC.md`
349
+ - **READ template:** `.claude/skills/ba-skills/skill-ba-uc-template-v1.md`
350
+ - **READ skill:** `.claude/skills/ba-skills/skill-ba-write-uc-spec-v1.md`
351
+ - Tạo: `02.BA-Specs/04.UC-Specs/[functionId]/UC-Spec_v1.md`
361
352
  - Điền General Information: Use Case ID, Title, Version, Actors, Preconditions, Postconditions
362
353
 
363
354
  #### Bước 2: Mô tả luồng sự kiện (Flow of Events)
@@ -367,7 +358,7 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
367
358
  - Viết rõ tương tác Actor ↔ System ở từng bước
368
359
 
369
360
  #### Bước 3: Tích hợp giao diện Prototype
370
- - Copy toàn bộ mã HTML/CSS từ `design.html` vào phần Screen Description
361
+ - Copy toàn bộ mã HTML/CSS từ `UI-Prototype_v1.html` vào phần Screen Description
371
362
 
372
363
  #### Bước 4: Mô tả chi tiết UI Components
373
364
  - Lập bảng: Tên | Loại | Bắt buộc | Độ dài tối đa | Giá trị mặc định | Ràng buộc validation
@@ -399,7 +390,7 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
399
390
  - BA gõ `REVISION: [nội dung]` → cập nhật section liên quan → re-generate review file → hiển thị lại gate pause
400
391
 
401
392
  **Definition of Done:**
402
- - [ ] File `[functionId]_UC.md` đúng vị trí và cấu trúc template
393
+ - [ ] File `UC-Spec_v1.md` đúng vị trí và cấu trúc template
403
394
  - [ ] 100% element HTML được mô tả trong bảng UI Components (id, loại, ràng buộc)
404
395
  - [ ] Mã Mermaid hợp lệ, thể hiện đủ Main/Alternative/Exception Flow
405
396
  - [ ] Business Rules đầy đủ với mã `[BR-NNN]` và thông báo lỗi chính xác
@@ -414,10 +405,10 @@ File phân tích: [docs/ak-{project}/spec/phan-tich/[functionId]_phan-tich(n+1
414
405
 
415
406
  | Gate | Skills đọc | Output |
416
407
  |---|---|---|
417
- | Gate 1 | `skill-ba-phan-tich-ban-dau`, `template-phan-tich-ban-dau`, `skill-ba-qa`, `template-qa` | `phan-tich(1).md`, `QA(1).md` |
418
- | Gate 2 | `skill-ba-qa`, `skill-ba-phan-tich-ban-dau` | `phan-tich(n+1).md`, `QA(m+1).md` (nếu còn Open) |
419
- | Gate 3 | `skill-ba-prototype` | `design.html` |
420
- | Gate 4 | `skill-ba-viet-spec-uc`, `template-uc`, `skill-ba-ve-luong-mermaid`, `skill-ba-xay-dung-business-rules` | `_UC.md` |
408
+ | Gate 1 | `brainstorming`, `skill-ba-initial-analysis`, `skill-ba-initial-analysis-template`, `skill-ba-qna`, `skill-ba-qna-template` | `Analysis_v1.md`, `QnA-Log_v1.md` |
409
+ | Gate 2 | `skill-ba-qna`, `skill-ba-initial-analysis` | `Analysis_v(n+1).md`, `QnA-Log_v(m+1).md` (nếu còn Open) |
410
+ | Gate 3 | `skill-ba-ui-prototype` | `UI-Prototype_v1.html` |
411
+ | Gate 4 | `skill-ba-write-uc-spec`, `skill-ba-uc-template`, `skill-ba-mermaid-flowchart`, `skill-ba-build-business-rules` | `UC-Spec_v1.md` |
421
412
 
422
413
  ---
423
414