takt 0.31.0 → 0.32.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 (347) hide show
  1. package/README.md +16 -11
  2. package/builtins/en/facets/instructions/e2e-coverage-implement.md +26 -0
  3. package/builtins/en/facets/instructions/e2e-coverage-plan.md +38 -0
  4. package/builtins/en/facets/instructions/e2e-coverage-supervise.md +21 -0
  5. package/builtins/en/facets/instructions/fix.md +4 -0
  6. package/builtins/en/facets/instructions/loop-monitor-ai-fix.md +4 -3
  7. package/builtins/en/facets/instructions/loop-monitor-reviewers-fix.md +4 -2
  8. package/builtins/en/facets/instructions/review-frontend.md +7 -0
  9. package/builtins/en/facets/instructions/security-audit-plan.md +12 -0
  10. package/builtins/en/facets/instructions/security-audit-review.md +22 -0
  11. package/builtins/en/facets/instructions/security-audit-supervise.md +20 -0
  12. package/builtins/en/facets/instructions/security-audit-team-leader.md +27 -0
  13. package/builtins/en/facets/instructions/write-tests-first.md +1 -4
  14. package/builtins/en/facets/knowledge/cqrs-es.md +50 -0
  15. package/builtins/en/facets/knowledge/e2e-testing.md +89 -0
  16. package/builtins/en/facets/knowledge/security.md +50 -0
  17. package/builtins/en/facets/knowledge/task-decomposition.md +12 -18
  18. package/builtins/en/facets/knowledge/unit-testing.md +108 -0
  19. package/builtins/en/facets/output-contracts/e2e-coverage-plan.md +33 -0
  20. package/builtins/en/facets/output-contracts/security-audit.md +31 -0
  21. package/builtins/en/facets/personas/coder.md +1 -0
  22. package/builtins/en/facets/personas/frontend-reviewer.md +4 -0
  23. package/builtins/en/facets/policies/ai-antipattern.md +43 -0
  24. package/builtins/en/facets/policies/coding.md +67 -0
  25. package/builtins/en/facets/policies/design-fidelity.md +51 -0
  26. package/builtins/en/facets/policies/qa.md +15 -0
  27. package/builtins/en/facets/policies/task-decomposition.md +53 -0
  28. package/builtins/en/facets/policies/testing.md +23 -1
  29. package/builtins/en/piece-categories.yaml +19 -15
  30. package/builtins/en/pieces/backend-cqrs-mini.yaml +1 -1
  31. package/builtins/en/pieces/backend-cqrs.yaml +95 -9
  32. package/builtins/en/pieces/backend-mini.yaml +1 -1
  33. package/builtins/en/pieces/backend.yaml +94 -9
  34. package/builtins/en/pieces/compound-eye.yaml +1 -1
  35. package/builtins/en/pieces/default.yaml +4 -2
  36. package/builtins/en/pieces/dual-cqrs-mini.yaml +6 -1
  37. package/builtins/en/pieces/dual-cqrs.yaml +9 -3
  38. package/builtins/en/pieces/dual-mini.yaml +6 -1
  39. package/builtins/en/pieces/dual.yaml +13 -3
  40. package/builtins/en/pieces/{e2e-test.yaml → fill-e2e.yaml} +42 -62
  41. package/builtins/en/pieces/{unit-test.yaml → fill-unit.yaml} +13 -3
  42. package/builtins/en/pieces/frontend-mini.yaml +6 -1
  43. package/builtins/en/pieces/frontend.yaml +101 -10
  44. package/builtins/en/pieces/magi.yaml +3 -3
  45. package/builtins/en/pieces/{backend-cqrs-review.yaml → review-backend-cqrs.yaml} +1 -1
  46. package/builtins/en/pieces/{backend-review.yaml → review-backend.yaml} +1 -1
  47. package/builtins/en/pieces/{review.yaml → review-default.yaml} +5 -2
  48. package/builtins/en/pieces/{dual-cqrs-review.yaml → review-dual-cqrs.yaml} +4 -2
  49. package/builtins/en/pieces/{dual-review.yaml → review-dual.yaml} +4 -2
  50. package/builtins/en/pieces/{backend-cqrs-review-fix.yaml → review-fix-backend-cqrs.yaml} +2 -2
  51. package/builtins/en/pieces/{backend-review-fix.yaml → review-fix-backend.yaml} +2 -2
  52. package/builtins/en/pieces/{review-fix.yaml → review-fix-default.yaml} +5 -2
  53. package/builtins/en/pieces/{dual-cqrs-review-fix.yaml → review-fix-dual-cqrs.yaml} +7 -3
  54. package/builtins/en/pieces/{dual-review-fix.yaml → review-fix-dual.yaml} +7 -3
  55. package/builtins/en/pieces/{frontend-review-fix.yaml → review-fix-frontend.yaml} +7 -3
  56. package/builtins/en/pieces/{takt-default-review-fix.yaml → review-fix-takt-default.yaml} +118 -9
  57. package/builtins/en/pieces/{frontend-review.yaml → review-frontend.yaml} +4 -2
  58. package/builtins/en/pieces/review-takt-default.yaml +298 -0
  59. package/builtins/en/pieces/security-audit.yaml +68 -0
  60. package/builtins/en/pieces/takt-default.yaml +9 -4
  61. package/builtins/en/pieces/terraform.yaml +3 -8
  62. package/builtins/ja/INSTRUCTION_STYLE_GUIDE.md +9 -10
  63. package/builtins/ja/KNOWLEDGE_STYLE_GUIDE.md +4 -4
  64. package/builtins/ja/OUTPUT_CONTRACT_STYLE_GUIDE.md +4 -4
  65. package/builtins/ja/PERSONA_STYLE_GUIDE.md +8 -8
  66. package/builtins/ja/POLICY_STYLE_GUIDE.md +5 -5
  67. package/builtins/ja/STYLE_GUIDE.md +8 -26
  68. package/builtins/ja/facets/instructions/e2e-coverage-implement.md +26 -0
  69. package/builtins/ja/facets/instructions/e2e-coverage-plan.md +38 -0
  70. package/builtins/ja/facets/instructions/e2e-coverage-supervise.md +21 -0
  71. package/builtins/ja/facets/instructions/fix.md +4 -0
  72. package/builtins/ja/facets/instructions/loop-monitor-ai-fix.md +4 -3
  73. package/builtins/ja/facets/instructions/loop-monitor-reviewers-fix.md +4 -2
  74. package/builtins/ja/facets/instructions/review-frontend.md +7 -0
  75. package/builtins/ja/facets/instructions/security-audit-plan.md +12 -0
  76. package/builtins/ja/facets/instructions/security-audit-review.md +22 -0
  77. package/builtins/ja/facets/instructions/security-audit-supervise.md +20 -0
  78. package/builtins/ja/facets/instructions/security-audit-team-leader.md +27 -0
  79. package/builtins/ja/facets/instructions/write-tests-first.md +1 -4
  80. package/builtins/ja/facets/knowledge/cqrs-es.md +50 -0
  81. package/builtins/ja/facets/knowledge/e2e-testing.md +89 -0
  82. package/builtins/ja/facets/knowledge/security.md +50 -0
  83. package/builtins/ja/facets/knowledge/task-decomposition.md +12 -18
  84. package/builtins/ja/facets/knowledge/unit-testing.md +108 -0
  85. package/builtins/ja/facets/output-contracts/e2e-coverage-plan.md +33 -0
  86. package/builtins/ja/facets/output-contracts/security-audit.md +31 -0
  87. package/builtins/ja/facets/personas/coder.md +1 -0
  88. package/builtins/ja/facets/personas/frontend-reviewer.md +2 -0
  89. package/builtins/ja/facets/policies/ai-antipattern.md +43 -0
  90. package/builtins/ja/facets/policies/coding.md +67 -0
  91. package/builtins/ja/facets/policies/design-fidelity.md +51 -0
  92. package/builtins/ja/facets/policies/qa.md +15 -0
  93. package/builtins/ja/facets/policies/task-decomposition.md +53 -0
  94. package/builtins/ja/facets/policies/testing.md +23 -1
  95. package/builtins/ja/piece-categories.yaml +19 -15
  96. package/builtins/ja/pieces/backend-cqrs-mini.yaml +1 -1
  97. package/builtins/ja/pieces/backend-cqrs.yaml +95 -9
  98. package/builtins/ja/pieces/backend-mini.yaml +1 -1
  99. package/builtins/ja/pieces/backend.yaml +94 -9
  100. package/builtins/ja/pieces/compound-eye.yaml +1 -1
  101. package/builtins/ja/pieces/default.yaml +4 -2
  102. package/builtins/ja/pieces/dual-cqrs-mini.yaml +6 -1
  103. package/builtins/ja/pieces/dual-cqrs.yaml +9 -3
  104. package/builtins/ja/pieces/dual-mini.yaml +6 -1
  105. package/builtins/ja/pieces/dual.yaml +13 -3
  106. package/builtins/ja/pieces/{e2e-test.yaml → fill-e2e.yaml} +41 -61
  107. package/builtins/ja/pieces/{unit-test.yaml → fill-unit.yaml} +13 -3
  108. package/builtins/ja/pieces/frontend-mini.yaml +6 -1
  109. package/builtins/ja/pieces/frontend.yaml +101 -10
  110. package/builtins/ja/pieces/magi.yaml +3 -3
  111. package/builtins/ja/pieces/{backend-cqrs-review.yaml → review-backend-cqrs.yaml} +1 -1
  112. package/builtins/ja/pieces/{backend-review.yaml → review-backend.yaml} +1 -1
  113. package/builtins/ja/pieces/{review.yaml → review-default.yaml} +5 -2
  114. package/builtins/ja/pieces/{dual-cqrs-review.yaml → review-dual-cqrs.yaml} +4 -2
  115. package/builtins/ja/pieces/{dual-review.yaml → review-dual.yaml} +4 -2
  116. package/builtins/ja/pieces/{backend-cqrs-review-fix.yaml → review-fix-backend-cqrs.yaml} +2 -2
  117. package/builtins/ja/pieces/{backend-review-fix.yaml → review-fix-backend.yaml} +2 -2
  118. package/builtins/ja/pieces/{review-fix.yaml → review-fix-default.yaml} +5 -2
  119. package/builtins/ja/pieces/{dual-cqrs-review-fix.yaml → review-fix-dual-cqrs.yaml} +7 -3
  120. package/builtins/ja/pieces/{dual-review-fix.yaml → review-fix-dual.yaml} +7 -3
  121. package/builtins/ja/pieces/{frontend-review-fix.yaml → review-fix-frontend.yaml} +7 -3
  122. package/builtins/ja/pieces/{takt-default-review-fix.yaml → review-fix-takt-default.yaml} +118 -9
  123. package/builtins/ja/pieces/{frontend-review.yaml → review-frontend.yaml} +4 -2
  124. package/builtins/ja/pieces/review-takt-default.yaml +270 -0
  125. package/builtins/ja/pieces/security-audit.yaml +68 -0
  126. package/builtins/ja/pieces/takt-default.yaml +9 -4
  127. package/builtins/ja/pieces/terraform.yaml +3 -8
  128. package/builtins/skill/references/yaml-schema.md +26 -7
  129. package/builtins/skill-codex/SKILL.md +203 -0
  130. package/builtins/skill-codex/agents/openai.yaml +6 -0
  131. package/builtins/skill-codex/references/engine.md +228 -0
  132. package/builtins/skill-codex/references/yaml-schema.md +243 -0
  133. package/dist/app/cli/commands.js +7 -1
  134. package/dist/app/cli/commands.js.map +1 -1
  135. package/dist/app/cli/routing.js +1 -1
  136. package/dist/app/cli/routing.js.map +1 -1
  137. package/dist/core/models/config-types.d.ts +4 -0
  138. package/dist/core/models/config-types.d.ts.map +1 -1
  139. package/dist/core/models/piece-types.d.ts +4 -4
  140. package/dist/core/models/piece-types.d.ts.map +1 -1
  141. package/dist/core/models/schemas.d.ts +43 -0
  142. package/dist/core/models/schemas.d.ts.map +1 -1
  143. package/dist/core/models/schemas.js +10 -3
  144. package/dist/core/models/schemas.js.map +1 -1
  145. package/dist/core/piece/engine/MovementExecutor.d.ts +1 -0
  146. package/dist/core/piece/engine/MovementExecutor.d.ts.map +1 -1
  147. package/dist/core/piece/engine/MovementExecutor.js +8 -4
  148. package/dist/core/piece/engine/MovementExecutor.js.map +1 -1
  149. package/dist/core/piece/engine/OptionsBuilder.d.ts.map +1 -1
  150. package/dist/core/piece/engine/OptionsBuilder.js +4 -1
  151. package/dist/core/piece/engine/OptionsBuilder.js.map +1 -1
  152. package/dist/core/piece/engine/PieceEngine.d.ts +3 -3
  153. package/dist/core/piece/engine/PieceEngine.d.ts.map +1 -1
  154. package/dist/core/piece/engine/PieceEngine.js +10 -10
  155. package/dist/core/piece/engine/PieceEngine.js.map +1 -1
  156. package/dist/core/piece/engine/team-leader-common.js +1 -1
  157. package/dist/core/piece/engine/team-leader-common.js.map +1 -1
  158. package/dist/core/piece/instruction/InstructionBuilder.js +4 -4
  159. package/dist/core/piece/instruction/InstructionBuilder.js.map +1 -1
  160. package/dist/core/piece/instruction/escape.d.ts +1 -1
  161. package/dist/core/piece/instruction/escape.d.ts.map +1 -1
  162. package/dist/core/piece/instruction/escape.js +2 -2
  163. package/dist/core/piece/instruction/escape.js.map +1 -1
  164. package/dist/features/config/deploySkill.d.ts +0 -17
  165. package/dist/features/config/deploySkill.d.ts.map +1 -1
  166. package/dist/features/config/deploySkill.js +12 -167
  167. package/dist/features/config/deploySkill.js.map +1 -1
  168. package/dist/features/config/deploySkillCodex.d.ts +5 -0
  169. package/dist/features/config/deploySkillCodex.d.ts.map +1 -0
  170. package/dist/features/config/deploySkillCodex.js +18 -0
  171. package/dist/features/config/deploySkillCodex.js.map +1 -0
  172. package/dist/features/config/deploySkillInternal.d.ts +13 -0
  173. package/dist/features/config/deploySkillInternal.d.ts.map +1 -0
  174. package/dist/features/config/deploySkillInternal.js +140 -0
  175. package/dist/features/config/deploySkillInternal.js.map +1 -0
  176. package/dist/features/config/index.d.ts +1 -0
  177. package/dist/features/config/index.d.ts.map +1 -1
  178. package/dist/features/config/index.js +1 -0
  179. package/dist/features/config/index.js.map +1 -1
  180. package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
  181. package/dist/features/interactive/conversationLoop.js +4 -15
  182. package/dist/features/interactive/conversationLoop.js.map +1 -1
  183. package/dist/features/pipeline/steps.d.ts.map +1 -1
  184. package/dist/features/pipeline/steps.js +5 -1
  185. package/dist/features/pipeline/steps.js.map +1 -1
  186. package/dist/features/tasks/execute/parallelExecution.d.ts +1 -0
  187. package/dist/features/tasks/execute/parallelExecution.d.ts.map +1 -1
  188. package/dist/features/tasks/execute/parallelExecution.js +3 -1
  189. package/dist/features/tasks/execute/parallelExecution.js.map +1 -1
  190. package/dist/features/tasks/execute/resolveTask.d.ts.map +1 -1
  191. package/dist/features/tasks/execute/resolveTask.js +17 -4
  192. package/dist/features/tasks/execute/resolveTask.js.map +1 -1
  193. package/dist/features/tasks/execute/taskExecution.d.ts.map +1 -1
  194. package/dist/features/tasks/execute/taskExecution.js +8 -5
  195. package/dist/features/tasks/execute/taskExecution.js.map +1 -1
  196. package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
  197. package/dist/infra/config/global/globalConfigCore.js +11 -8
  198. package/dist/infra/config/global/globalConfigCore.js.map +1 -1
  199. package/dist/infra/config/global/globalConfigSerializer.d.ts.map +1 -1
  200. package/dist/infra/config/global/globalConfigSerializer.js +6 -0
  201. package/dist/infra/config/global/globalConfigSerializer.js.map +1 -1
  202. package/dist/infra/config/loaders/pieceParser.d.ts.map +1 -1
  203. package/dist/infra/config/loaders/pieceParser.js +16 -6
  204. package/dist/infra/config/loaders/pieceParser.js.map +1 -1
  205. package/dist/infra/config/loaders/pieceResolver.js +2 -2
  206. package/dist/infra/config/loaders/pieceResolver.js.map +1 -1
  207. package/dist/infra/config/loaders/resource-resolver.d.ts +4 -4
  208. package/dist/infra/config/loaders/resource-resolver.d.ts.map +1 -1
  209. package/dist/infra/config/loaders/resource-resolver.js +3 -3
  210. package/dist/infra/config/loaders/resource-resolver.js.map +1 -1
  211. package/dist/infra/config/pathExpansion.d.ts +3 -0
  212. package/dist/infra/config/pathExpansion.d.ts.map +1 -0
  213. package/dist/infra/config/pathExpansion.js +15 -0
  214. package/dist/infra/config/pathExpansion.js.map +1 -0
  215. package/dist/infra/config/paths.d.ts +2 -2
  216. package/dist/infra/config/paths.d.ts.map +1 -1
  217. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  218. package/dist/infra/config/project/projectConfig.js +15 -2
  219. package/dist/infra/config/project/projectConfig.js.map +1 -1
  220. package/dist/infra/config/resolveConfigValue.d.ts.map +1 -1
  221. package/dist/infra/config/resolveConfigValue.js +4 -1
  222. package/dist/infra/config/resolveConfigValue.js.map +1 -1
  223. package/dist/infra/cursor/client.js +1 -1
  224. package/dist/infra/cursor/client.js.map +1 -1
  225. package/dist/infra/github/pr.d.ts.map +1 -1
  226. package/dist/infra/github/pr.js +36 -8
  227. package/dist/infra/github/pr.js.map +1 -1
  228. package/dist/infra/opencode/client.d.ts.map +1 -1
  229. package/dist/infra/opencode/client.js +12 -0
  230. package/dist/infra/opencode/client.js.map +1 -1
  231. package/dist/infra/resources/index.d.ts +5 -6
  232. package/dist/infra/resources/index.d.ts.map +1 -1
  233. package/dist/infra/resources/index.js +5 -6
  234. package/dist/infra/resources/index.js.map +1 -1
  235. package/dist/infra/task/autoCommit.d.ts.map +1 -1
  236. package/dist/infra/task/autoCommit.js +5 -1
  237. package/dist/infra/task/autoCommit.js.map +1 -1
  238. package/dist/infra/task/clone-base-branch.d.ts +2 -0
  239. package/dist/infra/task/clone-base-branch.d.ts.map +1 -1
  240. package/dist/infra/task/clone-base-branch.js +12 -4
  241. package/dist/infra/task/clone-base-branch.js.map +1 -1
  242. package/dist/infra/task/clone.d.ts +3 -1
  243. package/dist/infra/task/clone.d.ts.map +1 -1
  244. package/dist/infra/task/clone.js +34 -7
  245. package/dist/infra/task/clone.js.map +1 -1
  246. package/dist/infra/task/git.d.ts +5 -1
  247. package/dist/infra/task/git.d.ts.map +1 -1
  248. package/dist/infra/task/git.js +51 -3
  249. package/dist/infra/task/git.js.map +1 -1
  250. package/dist/infra/task/index.d.ts +1 -1
  251. package/dist/infra/task/index.d.ts.map +1 -1
  252. package/dist/infra/task/index.js +1 -1
  253. package/dist/infra/task/index.js.map +1 -1
  254. package/dist/shared/prompts/en/score_interactive_policy.md +17 -0
  255. package/dist/shared/prompts/index.d.ts +1 -1
  256. package/dist/shared/prompts/index.d.ts.map +1 -1
  257. package/dist/shared/prompts/index.js +2 -2
  258. package/dist/shared/prompts/index.js.map +1 -1
  259. package/dist/shared/prompts/ja/score_interactive_policy.md +17 -0
  260. package/dist/shared/utils/index.d.ts +1 -0
  261. package/dist/shared/utils/index.d.ts.map +1 -1
  262. package/dist/shared/utils/index.js +1 -0
  263. package/dist/shared/utils/index.js.map +1 -1
  264. package/dist/shared/utils/pathBoundary.d.ts +2 -0
  265. package/dist/shared/utils/pathBoundary.d.ts.map +1 -0
  266. package/dist/shared/utils/pathBoundary.js +10 -0
  267. package/dist/shared/utils/pathBoundary.js.map +1 -0
  268. package/package.json +7 -6
  269. package/builtins/en/facets/instructions/implement-e2e-test.md +0 -51
  270. package/builtins/en/facets/instructions/plan-e2e-test.md +0 -11
  271. package/builtins/en/templates/instructions/ai-fix.md +0 -74
  272. package/builtins/en/templates/instructions/ai-review-standalone.md +0 -47
  273. package/builtins/en/templates/instructions/arbitrate.md +0 -45
  274. package/builtins/en/templates/instructions/architect.md +0 -48
  275. package/builtins/en/templates/instructions/fix.md +0 -86
  276. package/builtins/en/templates/instructions/implement.md +0 -102
  277. package/builtins/en/templates/instructions/plan.md +0 -55
  278. package/builtins/en/templates/instructions/review.md +0 -101
  279. package/builtins/en/templates/instructions/supervise.md +0 -106
  280. package/builtins/en/templates/personas/character.md +0 -45
  281. package/builtins/en/templates/personas/expert.md +0 -68
  282. package/builtins/en/templates/personas/simple.md +0 -22
  283. package/builtins/en/templates/policies/policy.md +0 -49
  284. package/builtins/en/templates/reports/architecture-design.md +0 -31
  285. package/builtins/en/templates/reports/plan.md +0 -70
  286. package/builtins/en/templates/reports/review.md +0 -143
  287. package/builtins/en/templates/reports/security-review.md +0 -43
  288. package/builtins/en/templates/reports/summary.md +0 -52
  289. package/builtins/en/templates/reports/validation.md +0 -31
  290. package/builtins/ja/facets/instructions/implement-e2e-test.md +0 -51
  291. package/builtins/ja/facets/instructions/plan-e2e-test.md +0 -11
  292. package/builtins/ja/templates/instructions/ai-fix.md +0 -74
  293. package/builtins/ja/templates/instructions/ai-review-standalone.md +0 -47
  294. package/builtins/ja/templates/instructions/arbitrate.md +0 -45
  295. package/builtins/ja/templates/instructions/architect.md +0 -48
  296. package/builtins/ja/templates/instructions/fix.md +0 -86
  297. package/builtins/ja/templates/instructions/implement.md +0 -102
  298. package/builtins/ja/templates/instructions/plan.md +0 -55
  299. package/builtins/ja/templates/instructions/review.md +0 -101
  300. package/builtins/ja/templates/instructions/supervise.md +0 -106
  301. package/builtins/ja/templates/knowledge/knowledge.md +0 -39
  302. package/builtins/ja/templates/output-contracts/architecture-design.md +0 -31
  303. package/builtins/ja/templates/output-contracts/plan.md +0 -70
  304. package/builtins/ja/templates/output-contracts/review.md +0 -143
  305. package/builtins/ja/templates/output-contracts/security-review.md +0 -43
  306. package/builtins/ja/templates/output-contracts/summary.md +0 -52
  307. package/builtins/ja/templates/output-contracts/validation.md +0 -31
  308. package/builtins/ja/templates/personas/character.md +0 -43
  309. package/builtins/ja/templates/personas/expert.md +0 -21
  310. package/builtins/ja/templates/personas/simple.md +0 -22
  311. package/builtins/ja/templates/policies/policy.md +0 -49
  312. package/dist/faceted-prompting/compose.d.ts +0 -18
  313. package/dist/faceted-prompting/compose.d.ts.map +0 -1
  314. package/dist/faceted-prompting/compose.js +0 -45
  315. package/dist/faceted-prompting/compose.js.map +0 -1
  316. package/dist/faceted-prompting/data-engine.d.ts +0 -49
  317. package/dist/faceted-prompting/data-engine.d.ts.map +0 -1
  318. package/dist/faceted-prompting/data-engine.js +0 -85
  319. package/dist/faceted-prompting/data-engine.js.map +0 -1
  320. package/dist/faceted-prompting/escape.d.ts +0 -14
  321. package/dist/faceted-prompting/escape.d.ts.map +0 -1
  322. package/dist/faceted-prompting/escape.js +0 -16
  323. package/dist/faceted-prompting/escape.js.map +0 -1
  324. package/dist/faceted-prompting/index.d.ts +0 -18
  325. package/dist/faceted-prompting/index.d.ts.map +0 -1
  326. package/dist/faceted-prompting/index.js +0 -18
  327. package/dist/faceted-prompting/index.js.map +0 -1
  328. package/dist/faceted-prompting/resolve.d.ts +0 -73
  329. package/dist/faceted-prompting/resolve.d.ts.map +0 -1
  330. package/dist/faceted-prompting/resolve.js +0 -160
  331. package/dist/faceted-prompting/resolve.js.map +0 -1
  332. package/dist/faceted-prompting/scope.d.ts +0 -47
  333. package/dist/faceted-prompting/scope.d.ts.map +0 -1
  334. package/dist/faceted-prompting/scope.js +0 -69
  335. package/dist/faceted-prompting/scope.js.map +0 -1
  336. package/dist/faceted-prompting/template.d.ts +0 -27
  337. package/dist/faceted-prompting/template.d.ts.map +0 -1
  338. package/dist/faceted-prompting/template.js +0 -49
  339. package/dist/faceted-prompting/template.js.map +0 -1
  340. package/dist/faceted-prompting/truncation.d.ts +0 -36
  341. package/dist/faceted-prompting/truncation.d.ts.map +0 -1
  342. package/dist/faceted-prompting/truncation.js +0 -63
  343. package/dist/faceted-prompting/truncation.js.map +0 -1
  344. package/dist/faceted-prompting/types.d.ts +0 -44
  345. package/dist/faceted-prompting/types.d.ts.map +0 -1
  346. package/dist/faceted-prompting/types.js +0 -10
  347. package/dist/faceted-prompting/types.js.map +0 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ TAKT is built with TAKT itself (dogfooding).
12
12
 
13
13
  **Batteries included** — Architecture, security, and AI antipattern review criteria are built in. Ship code that meets a quality bar from day one.
14
14
 
15
- **Practical** — A tool for daily development, not demos. Talk to AI to refine requirements, queue tasks, and run them. Automatic worktree isolation, PR creation, and retry on failure.
15
+ **Practical** — A tool for daily development, not demos. Talk to AI to refine requirements, queue tasks, and run them. Worktree isolation on task execution, PR creation, and retry on failure.
16
16
 
17
17
  **Reproducible** — Execution paths are declared in YAML, keeping results consistent. Pieces are shareable — a workflow built by one team member can be used by anyone else to run the same quality process. Every step is logged in NDJSON for full traceability from task to PR.
18
18
 
@@ -39,7 +39,7 @@ Optional:
39
39
  npm install -g takt
40
40
  ```
41
41
 
42
- ### Talk to AI, then execute
42
+ ### Talk to AI and queue tasks
43
43
 
44
44
  ```
45
45
  $ takt
@@ -55,21 +55,24 @@ Select piece:
55
55
  [AI clarifies requirements and organizes the task]
56
56
 
57
57
  > /go
58
- ```
59
58
 
60
- TAKT creates an isolated worktree, runs the piece (plan → implement → review → fix loop), and offers to create a PR when done.
59
+ Proposed task:
60
+ ...
61
61
 
62
- ### Queue tasks, then batch execute
62
+ What would you like to do?
63
+ Execute now
64
+ Create GitHub Issue
65
+ ❯ Queue as task # ← normal flow
66
+ Continue conversation
67
+ ```
63
68
 
64
- Use `takt` to queue multiple tasks, then execute them all at once:
69
+ Choosing "Queue as task" saves the task to `.takt/tasks/`. Run `takt run` to execute TAKT creates an isolated worktree, runs the piece (plan implement → review → fix loop), and offers to create a PR when done.
65
70
 
66
71
  ```bash
67
- # Queue tasks through conversation
68
- takt
69
- > Refactor the auth module
70
- > /go # queues the task
72
+ # Execute queued tasks
73
+ takt run
71
74
 
72
- # Or queue from GitHub Issues
75
+ # You can also queue from GitHub Issues
73
76
  takt add #6
74
77
  takt add #12
75
78
 
@@ -77,6 +80,8 @@ takt add #12
77
80
  takt run
78
81
  ```
79
82
 
83
+ > **"Execute now"** runs the piece directly in your current directory without worktree isolation. Useful for quick experiments, but note that changes go straight into your working tree.
84
+
80
85
  ### Manage results
81
86
 
82
87
  ```bash
@@ -0,0 +1,26 @@
1
+ Implement missing E2E tests based on the test case list.
2
+
3
+ **Important:** Refer to the test plan report: {report:01-e2e-coverage-plan.md}
4
+
5
+ **Note:** If Previous Response exists, this is a resubmission.
6
+ Check which test cases were flagged as unimplemented and implement them.
7
+
8
+ **What to do:**
9
+ 1. Review the numbered test case list from the test plan
10
+ 2. Implement tests following existing E2E test patterns (file structure, helpers, fixtures, mock strategy)
11
+ 3. Implement ALL cases in the test case list (do not stop after implementing just a few)
12
+ 4. Run E2E tests and confirm all tests pass
13
+ 5. Confirm existing E2E tests are not broken
14
+
15
+ **Implementation constraints:**
16
+ - Do not modify the existing E2E test framework
17
+ - Write one scenario per concern with clear expected results
18
+ - Follow existing fixture/helper/mock patterns for cases with external dependencies
19
+
20
+ **Required output (include headings)**
21
+ ## Implemented Test Cases
22
+ - {Test case list number and corresponding test file/test name}
23
+ ## Unimplemented Test Cases (if any)
24
+ - {Number and reason for not implementing}
25
+ ## Test Results
26
+ - {Execution command and results}
@@ -0,0 +1,38 @@
1
+ Comprehensively identify all user operation routes in the application and create a list of missing E2E test cases.
2
+
3
+ **Note:** If Previous Response exists, this is a resubmission.
4
+ Review and revise the list based on that feedback.
5
+
6
+ **What to do:**
7
+
8
+ 1. **Understand the E2E test infrastructure**
9
+ - Review existing E2E test directory structure, test runner, helpers, fixtures, and mock strategy
10
+ - Identify the test execution commands
11
+
12
+ 2. **Identify user operation entry points** (read CODE, not just documentation)
13
+ - For CLI: extract command definitions, subcommands, and options from code
14
+ - For Web: extract routing definitions, page transitions, and API endpoints from code
15
+ - Trace each entry point's handler and processing flow, identifying branches and state transitions
16
+
17
+ 3. **Deep-dive into UX variations**
18
+ - For each entry point, enumerate all possible routes a user can take
19
+ - Option/flag combinations that create different branches (e.g., `--pipeline` on/off, `--auto-pr` on/off)
20
+ - State-dependent branches (first run vs existing data, config present vs absent)
21
+ - Not just happy paths — error handling and recovery routes when things fail midway
22
+ - Permission/role-based routes
23
+ - External dependency state branches (connection success vs failure, normal vs abnormal response)
24
+
25
+ 4. **Cross-reference with existing E2E tests**
26
+ - Analyze what existing tests cover on a per-file basis
27
+ - Identify which routes are already covered by existing tests
28
+ - List uncovered routes as "missing test cases"
29
+
30
+ 5. **Create the test case list**
31
+ - Assign a unique number to every test case (this is the ledger supervisor uses for verification)
32
+ - Assign priority to each case (user impact × untested risk)
33
+ - **Do NOT abbreviate.** Don't stop at 1-2 cases — enumerate ALL identified routes
34
+
35
+ **Strictly prohibited:**
36
+ - Reading only docs/README and guessing test cases → PROHIBITED. Read the code
37
+ - Cutting the list short with "there might be more" → PROHIBITED. Enumerate all
38
+ - Including cases already covered by existing tests → PROHIBITED. Only list verified gaps
@@ -0,0 +1,21 @@
1
+ Cross-reference the test case list from the plan with implementation results, and verify all cases have been implemented.
2
+
3
+ **Important:** Refer to the test plan report: {report:01-e2e-coverage-plan.md}
4
+
5
+ **Verification procedure:**
6
+
7
+ 1. **Cross-reference with test case list (most important)**
8
+ - Check each numbered test case from the plan report one by one
9
+ - Identify the corresponding test file and test name for each case
10
+ - Read the test file to confirm the case is actually tested
11
+ - List any cases without a corresponding test as "unimplemented"
12
+ - REJECT if even one unimplemented case exists
13
+
14
+ 2. **Test quality verification**
15
+ - Does each test correctly verify the intent of the test case?
16
+ - Are assertions appropriate (not just existence checks, but value verification)?
17
+ - Does the mock/fixture usage follow existing patterns?
18
+
19
+ 3. **Test execution verification**
20
+ - Run E2E tests and confirm all tests pass
21
+ - Confirm existing tests are not broken
@@ -1,5 +1,9 @@
1
1
  Use reports in the Report Directory and fix the issues raised by the reviewer.
2
2
 
3
+ **Fix principles:**
4
+ - When a finding includes a "suggested fix", follow it rather than inventing your own workaround
5
+ - Fix the target code directly. Do not deflect findings by adding tests or documentation instead
6
+
3
7
  **Report reference policy:**
4
8
  - Use the latest review reports in the Report Directory as primary evidence.
5
9
  - Past iteration reports are saved as `{filename}.{timestamp}` in the same directory (e.g., `architect-review.md.20260304T123456Z`). For each report, run Glob with a `{report-name}.*` pattern, read up to 2 files in descending timestamp order, and understand persists / reopened trends before starting fixes.
@@ -7,6 +7,7 @@ is healthy (making progress) or unproductive (repeating the same issues).
7
7
  - AI Review results: {report:ai-review.md}
8
8
 
9
9
  **Judgment criteria:**
10
- - Are new issues being found/fixed in each cycle?
11
- - Are the same findings being repeated?
12
- - Are fixes actually being applied?
10
+ - Are the same finding_ids persisting across multiple cycles?
11
+ - Same finding_id repeatedly persists unproductive (stuck)
12
+ - Previous findings resolved and new findings appear as new → healthy (progressing)
13
+ - Are fixes actually being applied to the code?
@@ -4,6 +4,8 @@ Review the latest review reports in the Report Directory and determine
4
4
  whether this loop is healthy (converging) or unproductive (diverging or oscillating).
5
5
 
6
6
  **Judgment criteria:**
7
- - Is the number of new / reopened findings decreasing each cycle?
8
- - Are the same family_tag findings not repeating (is persists not growing)?
7
+ - Are the same finding_ids persisting across multiple cycles?
8
+ - Same finding_id repeatedly persists unproductive (stuck)
9
+ - Previous findings resolved and new findings appear as new → healthy (converging)
9
10
  - Are fixes actually being applied to the code?
11
+ - Is the number of new / reopened findings decreasing overall?
@@ -1,6 +1,7 @@
1
1
  Review the changes from a frontend development perspective.
2
2
 
3
3
  **Review criteria:**
4
+ - Design fidelity (top priority when a design reference is provided)
4
5
  - Component design (separation of concerns, granularity)
5
6
  - State management (local vs. global decisions)
6
7
  - Performance (re-renders, memoization)
@@ -8,6 +9,12 @@ Review the changes from a frontend development perspective.
8
9
  - Data fetching patterns
9
10
  - TypeScript type safety
10
11
 
12
+ **Design fidelity check (when a design reference exists):**
13
+ 1. Identify the design reference from the task order's referenced materials
14
+ 2. Compare design elements (layout, wording, colors, spacing) against implementation element by element
15
+ 3. For any discrepancy, check the decisions log to determine if it was intentional
16
+ 4. Report unintentional discrepancies as blocking issues
17
+
11
18
  **Note**: If this project does not include a frontend,
12
19
  proceed as no issues found.
13
20
 
@@ -0,0 +1,12 @@
1
+ Understand the overall project structure and create a complete list of files to be audited for security.
2
+
3
+ **What to do:**
4
+ 1. Identify the project's source code directories and list all files using Glob
5
+ 2. Understand the project's tech stack, frameworks, and major dependencies
6
+ 3. Classify each file's role briefly (API layer, domain layer, infrastructure layer, utilities, etc.)
7
+ 4. Identify files with high security risk (authentication, input handling, external communication, file operations, configuration, etc.)
8
+
9
+ **Important:**
10
+ - List ALL files without omission. Do not abbreviate
11
+ - Include configuration files and test files
12
+ - Even if the file count is large, list every single file
@@ -0,0 +1,22 @@
1
+ Re-audit the files that were judged insufficient in the previous audit.
2
+
3
+ **Important:** Review the supervisor's verification results and understand:
4
+ - List of unaudited files
5
+ - List of files flagged as insufficiently audited
6
+ - Specific feedback
7
+
8
+ **What to do:**
9
+ 1. **Read each flagged file in full using Read tool one by one**
10
+ 2. Review each file from a security perspective
11
+ 3. Report discovered issues with severity ratings
12
+
13
+ **Strictly prohibited:**
14
+ - Searching with Grep and only reviewing matching files → PROHIBITED
15
+ - Reading only part of a file → PROHIBITED
16
+ - Skipping a file because it "looks fine" → PROHIBITED
17
+
18
+ **Required output (include headings):**
19
+ ## Re-audit Results
20
+ - {Audit results for each file}
21
+ ## Detected Issues
22
+ - {Issue details (severity, location, remediation)}
@@ -0,0 +1,20 @@
1
+ Verify the completeness and quality of the security audit.
2
+
3
+ **Important:** Refer to the plan report: {report:01-plan.md}
4
+
5
+ **Verification procedure:**
6
+
7
+ 1. **Completeness verification (most important)**
8
+ - Cross-reference the file list from the plan report with files mentioned in the audit results
9
+ - List any files not mentioned in the audit results as "unaudited files"
10
+ - REJECT if even one unaudited file exists
11
+
12
+ 2. **Methodology verification**
13
+ - Check whether each file's audit result references specific code content
14
+ - If a file only says "no issues" without mentioning specific content checked, it may not have been actually Read → REJECT
15
+ - Check for signs that judgment was based solely on Grep keyword matching
16
+
17
+ 3. **Quality verification**
18
+ - Check whether severity classifications of detected issues are appropriate
19
+ - Read a few high-security-risk files yourself to verify no issues were missed
20
+ - Check whether there are too many false positives
@@ -0,0 +1,27 @@
1
+ Decompose the security audit task, assign files to each part, and execute in parallel.
2
+
3
+ **Important:** Refer to the plan report: {report:01-plan.md}
4
+
5
+ **What to do:**
6
+
7
+ 1. Review the file list from the plan report and understand all files to be audited
8
+ 2. Split files into 3 groups by module/layer
9
+ - Distribute high-security-risk files (authentication, input handling, external communication, etc.) evenly across groups
10
+ - Keep related files (within the same module) in the same group when possible
11
+ 3. Assign exclusive file ownership to each part
12
+
13
+ **Each part's instruction MUST include:**
14
+ - **Assigned file list** (all file paths to review via Read)
15
+ - **Audit procedure:**
16
+ 1. **Read each assigned file in full using Read tool one by one** (do NOT abbreviate with Grep or partial reads)
17
+ 2. Review each file from a security perspective
18
+ 3. Report discovered issues with severity ratings
19
+ - **Strictly prohibited:**
20
+ - Searching with Grep and only reviewing matching files → PROHIBITED. Read ALL files
21
+ - Reading only part of a file → PROHIBITED. Read the entire file
22
+ - Skipping a file because it "looks fine" → PROHIBITED. Review every file
23
+ - **Completion criteria:** All assigned files have been Read in full, and audit results are reported for each file
24
+
25
+ **Constraints:**
26
+ - Each part is read-only. Do not modify code
27
+ - Do not audit files outside your assignment (to prevent overlap)
@@ -12,14 +12,13 @@ Refer only to files within the Report Directory shown in the Piece Context. Do n
12
12
  - Does a new status/state merge into an existing workflow?
13
13
  - Does a new option propagate through a call chain to the endpoint?
14
14
  - If any apply, create integration tests
15
- 5. Run the build (type check) to verify test code has no syntax errors
16
15
 
17
16
  **Test writing guidelines:**
18
17
  - Follow the project's existing test patterns (naming conventions, directory structure, helpers)
19
18
  - Write tests in Given-When-Then structure
20
19
  - One concept per test. Do not mix multiple concerns in a single test
21
20
  - Cover happy path, error cases, boundary values, and edge cases
22
- - Write tests that are expected to pass after implementation is complete
21
+ - Write tests that are expected to pass after implementation is complete (build errors and test failures are expected at this stage)
23
22
 
24
23
  **Scope output contract (create at the start):**
25
24
  ```markdown
@@ -55,5 +54,3 @@ Small / Medium / Large
55
54
  - {Summary of actions taken}
56
55
  ## Changes made
57
56
  - {List of test files created}
58
- ## Build results
59
- - {Build execution results}
@@ -408,6 +408,56 @@ Checklist:
408
408
  | Query side tests don't create data via Command | Recommended |
409
409
  | Integration tests consider Axon async processing | Required |
410
410
 
411
+ ## Master Data and CRUD
412
+
413
+ Not everything in a CQRS+ES system needs event sourcing. Master data (reference data) with simple characteristics is better implemented as plain CRUD — it's simpler and easier to maintain.
414
+
415
+ However, don't mechanically decide "it's master data, so CRUD". The more criteria below that apply, the more CRUD is suitable. Conversely, if even one requirement calls for CQRS+ES, consider adopting it.
416
+
417
+ **Criteria for determining CRUD is sufficient:**
418
+
419
+ | Aspect | Leans CRUD | Leans CQRS+ES |
420
+ |--------|-----------|---------------|
421
+ | Business requirements | Just "manage X" with no special mentions | Specific business rules or constraints |
422
+ | Logic evolution | Simple reference/update, no foreseeable complexity | State transitions or lifecycle may grow complex |
423
+ | Change history / audit | No need to track "who changed what when" | Change history or audit trail required |
424
+ | Domain events | Changes don't affect other aggregates or processes | Changes trigger downstream processes |
425
+ | Consistency scope | Self-contained, no cross-aggregate consistency needed | Must maintain consistency with other aggregates |
426
+ | Point-in-time queries | No "what was the state at time T" queries | Point-in-time queries required |
427
+
428
+ **Typical CRUD candidates:**
429
+ - Code masters such as prefecture/country codes
430
+ - Classification masters such as categories and tags
431
+ - Configuration values, constant tables
432
+
433
+ **Cases where CQRS+ES is justified:**
434
+ - Product master, but price change history tracking is needed
435
+ - Organization master, but changes trigger permission recalculation
436
+ - Business partner master, but has credit assessment state transitions
437
+
438
+ ```kotlin
439
+ // CRUD is sufficient: Simple category master
440
+ @Entity
441
+ data class Category(
442
+ @Id val categoryId: String,
443
+ val name: String,
444
+ val displayOrder: Int
445
+ )
446
+
447
+ // CQRS+ES is appropriate: Product with price change history tracking
448
+ data class Product(
449
+ val productId: String,
450
+ val currentPrice: Money
451
+ ) {
452
+ fun changePrice(newPrice: Money, reason: String): PriceChangedEvent {
453
+ require(newPrice.amount > BigDecimal.ZERO) { "Price must be positive" }
454
+ return PriceChangedEvent(productId, currentPrice, newPrice, reason)
455
+ }
456
+ }
457
+ ```
458
+
459
+ Even when implementing with CRUD, other aggregates in the CQRS+ES system reference CRUD entities by ID. The principle that CRUD entities don't directly access aggregate internal state still applies.
460
+
411
461
  ## Infrastructure Layer
412
462
 
413
463
  Check:
@@ -0,0 +1,89 @@
1
+ # E2E Testing Knowledge
2
+
3
+ ## E2E Test Scope
4
+
5
+ E2E tests verify the entire user operation flow. Their scope differs from unit and integration tests.
6
+
7
+ | Test Type | Scope | Verification Target |
8
+ |-----------|-------|-------------------|
9
+ | Unit | Function/Class | Logic correctness |
10
+ | Integration | Inter-module coupling | Data flow correctness |
11
+ | E2E | Entire user operation flow | Behavior as seen by the user |
12
+
13
+ | Criteria | Judgment |
14
+ |----------|----------|
15
+ | Writing E2E tests for logic that unit tests can cover | Warning. Consider moving to unit tests |
16
+ | Verifying user operation flows | E2E test is appropriate |
17
+ | Scenarios spanning multiple commands/pages | E2E test is appropriate |
18
+ | Error message display verification | E2E test is appropriate |
19
+
20
+ ## UX Route Identification
21
+
22
+ E2E test completeness depends on thorough UX route identification. Identify entry points from code, not documentation.
23
+
24
+ ### Entry Point Identification
25
+
26
+ | Application Type | How to Find Entry Points |
27
+ |-----------------|-------------------------|
28
+ | CLI | Extract command definitions, subcommand registrations, option/flag definitions from code |
29
+ | Web | Extract routing definitions, page component lists from code |
30
+ | API | Extract endpoint definitions, router registrations from code |
31
+
32
+ ### Branch Patterns
33
+
34
+ Exhaustively enumerate routes branching from each entry point.
35
+
36
+ | Branch Pattern | Example |
37
+ |---------------|---------|
38
+ | Option/flag combinations | `--verbose` on/off, `--format json` vs `--format table` |
39
+ | State-dependent branches | First run vs existing data, config present vs absent |
40
+ | Permission/role | Admin vs regular user, authenticated vs unauthenticated |
41
+ | External dependency state | Connection success vs timeout, normal vs error response |
42
+ | Error recovery | Retry on midway failure, rollback |
43
+ | Input variations | Valid input, invalid input, empty input, boundary values |
44
+
45
+
46
+ ## Mock Boundary Design
47
+
48
+ In E2E tests, deciding "how far to run real code and where to start mocking" is critical.
49
+
50
+ ### Mock Design Principles
51
+
52
+ - Run the application code under test as-is
53
+ - Insert mocks at external service boundaries
54
+ - Follow existing fixture/helper mock patterns
55
+ - Check existing mock infrastructure before introducing new mechanisms
56
+
57
+ ## Flaky Test Prevention
58
+
59
+ E2E tests are prone to non-deterministic failures.
60
+
61
+ | Cause | Mitigation |
62
+ |-------|-----------|
63
+ | Timing dependency | Use explicit wait conditions (state-based waits, not fixed sleeps) |
64
+ | Port conflicts | Assign random ports per test |
65
+ | Filesystem residue | Create temp directories per test, cleanup on teardown |
66
+ | Process leaks | Set timeouts and force-kill |
67
+ | Environment dependency | Explicitly set up prerequisites for test execution |
68
+ | Execution order dependency | Initialize state so each test runs independently |
69
+
70
+ ```typescript
71
+ // NG - fixed sleep for timing
72
+ await sleep(3000)
73
+ expect(result).toBeDefined()
74
+
75
+ // OK - condition-based wait
76
+ await waitFor(() => expect(result).toBeDefined(), { timeout: 5000 })
77
+ ```
78
+
79
+ ## Test Case Management
80
+
81
+ Manage test cases as a list to guarantee E2E test completeness.
82
+
83
+ | Principle | Description |
84
+ |-----------|-------------|
85
+ | Numbered list | Assign a unique number to each test case and track implementation status |
86
+ | Classify by entry point | Group by command/page/endpoint |
87
+ | Prioritize | Determine priority by user impact × untested risk |
88
+ | Cross-reference with existing tests | Check existing test coverage before adding new tests |
89
+
@@ -98,6 +98,56 @@ app.get('/user/:id', authorize('read:user'), (req, res) => {
98
98
  - Missing type checks → REJECT
99
99
  - No size limits set → REJECT
100
100
 
101
+ ## Logging & Masking
102
+
103
+ Prevent sensitive information from leaking into logs and responses.
104
+
105
+ **Never log:**
106
+ - Passwords, tokens, API keys
107
+ - Credit card numbers, personal identification numbers
108
+ - Session IDs, authentication header values
109
+ - Personal information (email, phone) unless necessary for debugging
110
+
111
+ **Masking patterns:**
112
+
113
+ ```typescript
114
+ // NG - Password exposed in logs
115
+ logger.info('User login attempt', { email, password })
116
+
117
+ // OK - Exclude sensitive fields
118
+ logger.info('User login attempt', { email })
119
+ ```
120
+
121
+ ```kotlin
122
+ // NG - Logging entire request object
123
+ logger.info("Request: {}", request)
124
+
125
+ // OK - Log only safe fields
126
+ logger.info("Request: userId={}, action={}", request.userId, request.action)
127
+ ```
128
+
129
+ **Structured logging field filtering:**
130
+
131
+ When passing objects to log output, ensure `toString()` or JSON serialization does not include sensitive fields.
132
+
133
+ ```kotlin
134
+ // NG - data class toString() includes password
135
+ data class UserCredentials(val email: String, val password: String)
136
+
137
+ // OK - Override toString() to mask sensitive fields
138
+ data class UserCredentials(val email: String, val password: String) {
139
+ override fun toString(): String = "UserCredentials(email=$email, password=***)"
140
+ }
141
+ ```
142
+
143
+ | Criteria | Verdict |
144
+ |----------|---------|
145
+ | Log output contains passwords, tokens, or API keys | REJECT |
146
+ | Error responses contain stack traces or internal paths | REJECT |
147
+ | data class toString() exposes sensitive fields | REJECT |
148
+ | Sensitive info can be output regardless of log level | REJECT |
149
+ | Debug logs contain PII but disabled in production | Warning. Risk of misconfiguration |
150
+
101
151
  ## Cryptography
102
152
 
103
153
  - Use of weak crypto algorithms → REJECT
@@ -2,15 +2,17 @@
2
2
 
3
3
  ## Decomposition Feasibility
4
4
 
5
- Before splitting a task into multiple parts, assess whether decomposition is appropriate. When decomposition is unsuitable, implementing in a single part is more efficient.
5
+ Before splitting a task into multiple parts, assess whether decomposition is appropriate. Conditions that prohibit decomposition and REJECT criteria are defined in the Task Decomposition Policy. This section explains the underlying reasoning.
6
6
 
7
- | Criteria | Judgment |
8
- |----------|----------|
9
- | Changed files clearly separate into layers | Decompose |
10
- | Shared types/IDs span multiple parts | Single part |
11
- | Broad rename/refactoring | Single part |
12
- | Fewer than 5 files to change | Single part |
13
- | Same file needs editing by multiple parts | Single part |
7
+ ### Decision Criteria Table (Rationale)
8
+
9
+ | Perspective | Detection Pattern | Recommended Judgment | Rationale (Why) |
10
+ |-------------|-------------------|----------------------|-----------------|
11
+ | Shared contracts (ID/type) | A new ID/type is defined in one part and referenced by another | Do not decompose (single part) | Producer/consumer mismatches in type, naming, and handoff are common |
12
+ | Event chains | Both emitter and receiver must be changed together | Do not decompose (single part) | Bidirectional assumptions drift and cause runtime inconsistencies |
13
+ | Interface changes | Existing signature change + multiple call-site updates required | Do not decompose (single part) | Missed call-site updates easily lead to build/runtime failures |
14
+ | File ownership overlap | Same file assigned to multiple parts | Do not decompose (restructure plan) | Overwrites/conflicts create repeated REJECT in review cycles |
15
+ | Layer independence | API/Domain/Infra boundaries are clear and dependencies are one-way | Decomposition allowed | Clear boundaries reduce coupling across parts |
14
16
 
15
17
  ### Detecting Cross-Cutting Concerns
16
18
 
@@ -20,17 +22,9 @@ When any of the following apply, independent parts cannot maintain consistency.
20
22
  - Both the event emitter and event receiver need changes
21
23
  - An existing interface signature changes, requiring updates to all call sites
22
24
 
23
- ## File Exclusivity Principle
24
-
25
- When decomposing into multiple parts, each part's file ownership must be completely exclusive.
26
-
27
- | Criteria | Judgment |
28
- |----------|----------|
29
- | Same file edited by multiple parts | REJECT (causes conflicts) |
30
- | Type definition and consumer in different parts | Consolidate into the type definition part |
31
- | Test file and implementation file in different parts | Consolidate into the same part |
25
+ ## Grouping Priority
32
26
 
33
- ### Grouping Priority
27
+ When decomposition is appropriate, use the following criteria to group files.
34
28
 
35
29
  1. **By dependency direction** — keep dependency source and target in the same part
36
30
  2. **By layer** — domain layer / infrastructure layer / API layer