takt 0.7.0 → 0.8.0-alpha.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 (516) hide show
  1. package/README.md +90 -39
  2. package/builtins/en/instructions/ai-fix.md +40 -0
  3. package/builtins/en/instructions/ai-review.md +10 -0
  4. package/builtins/en/instructions/arbitrate.md +14 -0
  5. package/builtins/en/instructions/architect.md +21 -0
  6. package/builtins/en/instructions/fix-supervisor.md +14 -0
  7. package/builtins/en/instructions/fix.md +12 -0
  8. package/builtins/en/instructions/implement.md +46 -0
  9. package/builtins/en/instructions/plan-investigate.md +13 -0
  10. package/builtins/en/instructions/plan.md +9 -0
  11. package/builtins/en/instructions/review-ai.md +5 -0
  12. package/builtins/en/instructions/review-arch.md +10 -0
  13. package/builtins/en/instructions/review-cqrs-es.md +12 -0
  14. package/builtins/en/instructions/review-frontend.md +12 -0
  15. package/builtins/en/instructions/review-qa.md +8 -0
  16. package/builtins/en/instructions/review-security.md +5 -0
  17. package/builtins/en/instructions/supervise.md +55 -0
  18. package/{resources/global/en/agents/default/architecture-reviewer.md → builtins/en/knowledge/architecture.md} +146 -202
  19. package/builtins/en/knowledge/backend.md +485 -0
  20. package/builtins/en/knowledge/cqrs-es.md +417 -0
  21. package/{resources/global/en/agents/expert/frontend-reviewer.md → builtins/en/knowledge/frontend.md} +53 -126
  22. package/builtins/en/knowledge/security.md +164 -0
  23. package/builtins/en/output-contracts/ai-review.md +25 -0
  24. package/builtins/en/output-contracts/architecture-design.md +22 -0
  25. package/builtins/en/output-contracts/architecture-review.md +30 -0
  26. package/builtins/en/output-contracts/coder-decisions.md +8 -0
  27. package/builtins/en/output-contracts/coder-scope.md +18 -0
  28. package/builtins/en/output-contracts/cqrs-es-review.md +27 -0
  29. package/builtins/en/output-contracts/frontend-review.md +22 -0
  30. package/builtins/en/output-contracts/plan.md +20 -0
  31. package/builtins/en/output-contracts/qa-review.md +22 -0
  32. package/builtins/en/output-contracts/review-summary.md +23 -0
  33. package/builtins/en/output-contracts/security-review.md +28 -0
  34. package/builtins/en/output-contracts/summary.md +20 -0
  35. package/builtins/en/output-contracts/validation.md +22 -0
  36. package/builtins/en/personas/ai-antipattern-reviewer.md +25 -0
  37. package/builtins/en/personas/architecture-reviewer.md +55 -0
  38. package/builtins/en/personas/coder.md +36 -0
  39. package/builtins/en/personas/cqrs-es-reviewer.md +36 -0
  40. package/builtins/en/personas/frontend-reviewer.md +43 -0
  41. package/builtins/en/personas/qa-reviewer.md +25 -0
  42. package/builtins/en/personas/security-reviewer.md +42 -0
  43. package/{resources/global → builtins}/en/piece-categories.yaml +17 -25
  44. package/builtins/en/pieces/coding-hybrid-codex.yaml +157 -0
  45. package/builtins/en/pieces/coding.yaml +152 -0
  46. package/builtins/en/pieces/default-hybrid-codex.yaml +313 -0
  47. package/builtins/en/pieces/default.yaml +307 -0
  48. package/builtins/en/pieces/expert-cqrs-hybrid-codex.yaml +341 -0
  49. package/builtins/en/pieces/expert-cqrs.yaml +334 -0
  50. package/builtins/en/pieces/expert-hybrid-codex.yaml +335 -0
  51. package/builtins/en/pieces/expert.yaml +328 -0
  52. package/{resources/global → builtins}/en/pieces/magi.yaml +8 -20
  53. package/builtins/en/pieces/minimal-hybrid-codex.yaml +202 -0
  54. package/builtins/en/pieces/minimal.yaml +194 -0
  55. package/{resources/global → builtins}/en/pieces/passthrough-hybrid-codex.yaml +14 -13
  56. package/{resources/global → builtins}/en/pieces/passthrough.yaml +12 -14
  57. package/{resources/global → builtins}/en/pieces/research.yaml +8 -26
  58. package/builtins/en/pieces/review-fix-minimal-hybrid-codex.yaml +202 -0
  59. package/builtins/en/pieces/review-fix-minimal.yaml +194 -0
  60. package/{resources/global → builtins}/en/pieces/review-only.yaml +55 -145
  61. package/builtins/en/policies/ai-antipattern.md +203 -0
  62. package/builtins/en/policies/coding.md +292 -0
  63. package/builtins/en/policies/qa.md +28 -0
  64. package/builtins/en/policies/review.md +124 -0
  65. package/builtins/en/policies/testing.md +88 -0
  66. package/builtins/en/templates/instructions/ai-fix.md +74 -0
  67. package/builtins/en/templates/instructions/ai-review-standalone.md +47 -0
  68. package/builtins/en/templates/instructions/arbitrate.md +45 -0
  69. package/builtins/en/templates/instructions/architect.md +48 -0
  70. package/builtins/en/templates/instructions/fix.md +86 -0
  71. package/builtins/en/templates/instructions/implement.md +102 -0
  72. package/builtins/en/templates/instructions/plan.md +55 -0
  73. package/builtins/en/templates/instructions/review.md +101 -0
  74. package/builtins/en/templates/instructions/supervise.md +106 -0
  75. package/builtins/en/templates/personas/character.md +45 -0
  76. package/builtins/en/templates/personas/expert.md +68 -0
  77. package/builtins/en/templates/personas/simple.md +22 -0
  78. package/builtins/en/templates/policies/policy.md +49 -0
  79. package/builtins/en/templates/reports/architecture-design.md +31 -0
  80. package/builtins/en/templates/reports/plan.md +70 -0
  81. package/builtins/en/templates/reports/review.md +143 -0
  82. package/builtins/en/templates/reports/security-review.md +43 -0
  83. package/builtins/en/templates/reports/summary.md +52 -0
  84. package/builtins/en/templates/reports/validation.md +31 -0
  85. package/builtins/ja/INSTRUCTION_STYLE_GUIDE.md +305 -0
  86. package/builtins/ja/OUTPUT_CONTRACT_STYLE_GUIDE.md +273 -0
  87. package/builtins/ja/PERSONA_STYLE_GUIDE.md +228 -0
  88. package/builtins/ja/POLICY_STYLE_GUIDE.md +169 -0
  89. package/builtins/ja/STYLE_GUIDE.md +67 -0
  90. package/builtins/ja/instructions/ai-fix.md +40 -0
  91. package/builtins/ja/instructions/ai-review.md +10 -0
  92. package/builtins/ja/instructions/arbitrate.md +14 -0
  93. package/builtins/ja/instructions/architect.md +21 -0
  94. package/builtins/ja/instructions/fix-supervisor.md +14 -0
  95. package/builtins/ja/instructions/fix.md +12 -0
  96. package/builtins/ja/instructions/implement.md +46 -0
  97. package/builtins/ja/instructions/plan-investigate.md +13 -0
  98. package/builtins/ja/instructions/plan.md +9 -0
  99. package/builtins/ja/instructions/review-ai.md +5 -0
  100. package/builtins/ja/instructions/review-arch.md +10 -0
  101. package/builtins/ja/instructions/review-cqrs-es.md +12 -0
  102. package/builtins/ja/instructions/review-frontend.md +12 -0
  103. package/builtins/ja/instructions/review-qa.md +8 -0
  104. package/builtins/ja/instructions/review-security.md +5 -0
  105. package/builtins/ja/instructions/supervise.md +55 -0
  106. package/builtins/ja/knowledge/architecture.md +427 -0
  107. package/builtins/ja/knowledge/backend.md +485 -0
  108. package/builtins/ja/knowledge/cqrs-es.md +730 -0
  109. package/{resources/global/ja/agents/expert/frontend-reviewer.md → builtins/ja/knowledge/frontend.md} +278 -150
  110. package/builtins/ja/knowledge/security.md +164 -0
  111. package/builtins/ja/output-contracts/ai-review.md +25 -0
  112. package/builtins/ja/output-contracts/architecture-design.md +22 -0
  113. package/builtins/ja/output-contracts/architecture-review.md +30 -0
  114. package/builtins/ja/output-contracts/coder-decisions.md +8 -0
  115. package/builtins/ja/output-contracts/coder-scope.md +18 -0
  116. package/builtins/ja/output-contracts/cqrs-es-review.md +27 -0
  117. package/builtins/ja/output-contracts/frontend-review.md +22 -0
  118. package/builtins/ja/output-contracts/plan.md +20 -0
  119. package/builtins/ja/output-contracts/qa-review.md +22 -0
  120. package/builtins/ja/output-contracts/review-summary.md +23 -0
  121. package/builtins/ja/output-contracts/security-review.md +28 -0
  122. package/builtins/ja/output-contracts/summary.md +20 -0
  123. package/builtins/ja/output-contracts/validation.md +22 -0
  124. package/builtins/ja/personas/ai-antipattern-reviewer.md +25 -0
  125. package/builtins/ja/personas/architect-planner.md +64 -0
  126. package/builtins/ja/personas/architecture-reviewer.md +26 -0
  127. package/builtins/ja/personas/balthasar.md +48 -0
  128. package/builtins/ja/personas/casper.md +50 -0
  129. package/builtins/ja/personas/coder.md +36 -0
  130. package/builtins/ja/personas/conductor.md +46 -0
  131. package/builtins/ja/personas/cqrs-es-reviewer.md +28 -0
  132. package/builtins/ja/personas/expert-supervisor.md +76 -0
  133. package/builtins/ja/personas/frontend-reviewer.md +29 -0
  134. package/builtins/ja/personas/melchior.md +47 -0
  135. package/builtins/ja/personas/planner.md +36 -0
  136. package/{resources/global/ja/agents/review → builtins/ja/personas}/pr-commenter.md +19 -24
  137. package/builtins/ja/personas/qa-reviewer.md +25 -0
  138. package/builtins/ja/personas/research-digger.md +47 -0
  139. package/builtins/ja/personas/research-planner.md +52 -0
  140. package/builtins/ja/personas/research-supervisor.md +55 -0
  141. package/builtins/ja/personas/security-reviewer.md +26 -0
  142. package/builtins/ja/personas/supervisor.md +111 -0
  143. package/{resources/global → builtins}/ja/piece-categories.yaml +16 -25
  144. package/builtins/ja/pieces/coding-hybrid-codex.yaml +157 -0
  145. package/builtins/ja/pieces/coding.yaml +152 -0
  146. package/builtins/ja/pieces/default-hybrid-codex.yaml +313 -0
  147. package/builtins/ja/pieces/default.yaml +307 -0
  148. package/builtins/ja/pieces/expert-cqrs-hybrid-codex.yaml +341 -0
  149. package/builtins/ja/pieces/expert-cqrs.yaml +334 -0
  150. package/builtins/ja/pieces/expert-hybrid-codex.yaml +335 -0
  151. package/builtins/ja/pieces/expert.yaml +328 -0
  152. package/{resources/global → builtins}/ja/pieces/magi.yaml +8 -20
  153. package/builtins/ja/pieces/minimal-hybrid-codex.yaml +202 -0
  154. package/builtins/ja/pieces/minimal.yaml +194 -0
  155. package/{resources/global → builtins}/ja/pieces/passthrough-hybrid-codex.yaml +14 -13
  156. package/{resources/global → builtins}/ja/pieces/passthrough.yaml +12 -14
  157. package/{resources/global → builtins}/ja/pieces/research.yaml +8 -26
  158. package/builtins/ja/pieces/review-fix-minimal-hybrid-codex.yaml +202 -0
  159. package/builtins/ja/pieces/review-fix-minimal.yaml +194 -0
  160. package/{resources/global → builtins}/ja/pieces/review-only.yaml +55 -145
  161. package/builtins/ja/policies/ai-antipattern.md +203 -0
  162. package/{resources/global/ja/agents/default/coder.md → builtins/ja/policies/coding.md} +79 -170
  163. package/builtins/ja/policies/qa.md +28 -0
  164. package/builtins/ja/policies/review.md +124 -0
  165. package/builtins/ja/policies/testing.md +88 -0
  166. package/builtins/ja/templates/instructions/ai-fix.md +74 -0
  167. package/builtins/ja/templates/instructions/ai-review-standalone.md +47 -0
  168. package/builtins/ja/templates/instructions/arbitrate.md +45 -0
  169. package/builtins/ja/templates/instructions/architect.md +48 -0
  170. package/builtins/ja/templates/instructions/fix.md +86 -0
  171. package/builtins/ja/templates/instructions/implement.md +102 -0
  172. package/builtins/ja/templates/instructions/plan.md +55 -0
  173. package/builtins/ja/templates/instructions/review.md +101 -0
  174. package/builtins/ja/templates/instructions/supervise.md +106 -0
  175. package/builtins/ja/templates/knowledge/knowledge.md +39 -0
  176. package/builtins/ja/templates/output-contracts/architecture-design.md +31 -0
  177. package/builtins/ja/templates/output-contracts/plan.md +70 -0
  178. package/builtins/ja/templates/output-contracts/review.md +143 -0
  179. package/builtins/ja/templates/output-contracts/security-review.md +43 -0
  180. package/builtins/ja/templates/output-contracts/summary.md +52 -0
  181. package/builtins/ja/templates/output-contracts/validation.md +31 -0
  182. package/builtins/ja/templates/personas/character.md +43 -0
  183. package/builtins/ja/templates/personas/expert.md +21 -0
  184. package/builtins/ja/templates/personas/simple.md +22 -0
  185. package/builtins/ja/templates/policies/policy.md +49 -0
  186. package/{resources → builtins}/skill/SKILL.md +56 -17
  187. package/{resources → builtins}/skill/references/engine.md +83 -33
  188. package/{resources → builtins}/skill/references/yaml-schema.md +100 -40
  189. package/dist/agents/runner.d.ts +14 -10
  190. package/dist/agents/runner.d.ts.map +1 -1
  191. package/dist/agents/runner.js +65 -101
  192. package/dist/agents/runner.js.map +1 -1
  193. package/dist/agents/types.d.ts +2 -2
  194. package/dist/agents/types.d.ts.map +1 -1
  195. package/dist/app/cli/commands.js +2 -2
  196. package/dist/app/cli/commands.js.map +1 -1
  197. package/dist/app/cli/routing.d.ts.map +1 -1
  198. package/dist/app/cli/routing.js +23 -6
  199. package/dist/app/cli/routing.js.map +1 -1
  200. package/dist/core/models/global-config.d.ts +7 -1
  201. package/dist/core/models/global-config.d.ts.map +1 -1
  202. package/dist/core/models/index.d.ts +1 -1
  203. package/dist/core/models/index.d.ts.map +1 -1
  204. package/dist/core/models/index.js.map +1 -1
  205. package/dist/core/models/piece-types.d.ts +36 -18
  206. package/dist/core/models/piece-types.d.ts.map +1 -1
  207. package/dist/core/models/response.d.ts +1 -1
  208. package/dist/core/models/response.d.ts.map +1 -1
  209. package/dist/core/models/schemas.d.ts +113 -62
  210. package/dist/core/models/schemas.d.ts.map +1 -1
  211. package/dist/core/models/schemas.js +80 -39
  212. package/dist/core/models/schemas.js.map +1 -1
  213. package/dist/core/models/types.d.ts +1 -1
  214. package/dist/core/models/types.d.ts.map +1 -1
  215. package/dist/core/piece/engine/MovementExecutor.d.ts +2 -1
  216. package/dist/core/piece/engine/MovementExecutor.d.ts.map +1 -1
  217. package/dist/core/piece/engine/MovementExecutor.js +18 -23
  218. package/dist/core/piece/engine/MovementExecutor.js.map +1 -1
  219. package/dist/core/piece/engine/OptionsBuilder.d.ts +2 -2
  220. package/dist/core/piece/engine/OptionsBuilder.d.ts.map +1 -1
  221. package/dist/core/piece/engine/OptionsBuilder.js +10 -9
  222. package/dist/core/piece/engine/OptionsBuilder.js.map +1 -1
  223. package/dist/core/piece/engine/ParallelRunner.d.ts +1 -1
  224. package/dist/core/piece/engine/ParallelRunner.d.ts.map +1 -1
  225. package/dist/core/piece/engine/ParallelRunner.js +11 -7
  226. package/dist/core/piece/engine/ParallelRunner.js.map +1 -1
  227. package/dist/core/piece/engine/PieceEngine.d.ts +3 -3
  228. package/dist/core/piece/engine/PieceEngine.d.ts.map +1 -1
  229. package/dist/core/piece/engine/PieceEngine.js +23 -23
  230. package/dist/core/piece/engine/PieceEngine.js.map +1 -1
  231. package/dist/core/piece/engine/parallel-logger.d.ts +12 -1
  232. package/dist/core/piece/engine/parallel-logger.d.ts.map +1 -1
  233. package/dist/core/piece/engine/parallel-logger.js +12 -2
  234. package/dist/core/piece/engine/parallel-logger.js.map +1 -1
  235. package/dist/core/piece/engine/state-manager.js +6 -6
  236. package/dist/core/piece/engine/state-manager.js.map +1 -1
  237. package/dist/core/piece/evaluation/rule-utils.d.ts +3 -4
  238. package/dist/core/piece/evaluation/rule-utils.d.ts.map +1 -1
  239. package/dist/core/piece/evaluation/rule-utils.js +9 -10
  240. package/dist/core/piece/evaluation/rule-utils.js.map +1 -1
  241. package/dist/core/piece/index.d.ts +1 -1
  242. package/dist/core/piece/index.js +1 -1
  243. package/dist/core/piece/instruction/InstructionBuilder.d.ts +6 -6
  244. package/dist/core/piece/instruction/InstructionBuilder.d.ts.map +1 -1
  245. package/dist/core/piece/instruction/InstructionBuilder.js +47 -19
  246. package/dist/core/piece/instruction/InstructionBuilder.js.map +1 -1
  247. package/dist/core/piece/instruction/ReportInstructionBuilder.d.ts.map +1 -1
  248. package/dist/core/piece/instruction/ReportInstructionBuilder.js +16 -14
  249. package/dist/core/piece/instruction/ReportInstructionBuilder.js.map +1 -1
  250. package/dist/core/piece/instruction/index.d.ts +1 -1
  251. package/dist/core/piece/instruction/index.js +1 -1
  252. package/dist/core/piece/instruction/instruction-context.d.ts +6 -0
  253. package/dist/core/piece/instruction/instruction-context.d.ts.map +1 -1
  254. package/dist/core/piece/instruction/instruction-context.js.map +1 -1
  255. package/dist/core/piece/judgment/FallbackStrategy.js +3 -3
  256. package/dist/core/piece/judgment/FallbackStrategy.js.map +1 -1
  257. package/dist/core/piece/phase-runner.d.ts +4 -4
  258. package/dist/core/piece/phase-runner.d.ts.map +1 -1
  259. package/dist/core/piece/phase-runner.js +6 -6
  260. package/dist/core/piece/phase-runner.js.map +1 -1
  261. package/dist/core/piece/types.d.ts +6 -2
  262. package/dist/core/piece/types.d.ts.map +1 -1
  263. package/dist/features/config/deploySkill.d.ts +12 -8
  264. package/dist/features/config/deploySkill.d.ts.map +1 -1
  265. package/dist/features/config/deploySkill.js +62 -44
  266. package/dist/features/config/deploySkill.js.map +1 -1
  267. package/dist/features/config/ejectBuiltin.d.ts +2 -2
  268. package/dist/features/config/ejectBuiltin.js +38 -24
  269. package/dist/features/config/ejectBuiltin.js.map +1 -1
  270. package/dist/features/interactive/interactive.d.ts.map +1 -1
  271. package/dist/features/interactive/interactive.js +27 -10
  272. package/dist/features/interactive/interactive.js.map +1 -1
  273. package/dist/features/pipeline/execute.js +1 -1
  274. package/dist/features/pipeline/execute.js.map +1 -1
  275. package/dist/features/prompt/preview.js +4 -4
  276. package/dist/features/prompt/preview.js.map +1 -1
  277. package/dist/features/tasks/add/index.d.ts +3 -6
  278. package/dist/features/tasks/add/index.d.ts.map +1 -1
  279. package/dist/features/tasks/add/index.js +20 -9
  280. package/dist/features/tasks/add/index.js.map +1 -1
  281. package/dist/features/tasks/execute/pieceExecution.d.ts.map +1 -1
  282. package/dist/features/tasks/execute/pieceExecution.js +40 -13
  283. package/dist/features/tasks/execute/pieceExecution.js.map +1 -1
  284. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  285. package/dist/features/tasks/execute/selectAndExecute.js +48 -20
  286. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  287. package/dist/features/tasks/execute/session.d.ts +1 -1
  288. package/dist/features/tasks/execute/session.d.ts.map +1 -1
  289. package/dist/features/tasks/execute/session.js +5 -5
  290. package/dist/features/tasks/execute/session.js.map +1 -1
  291. package/dist/features/tasks/execute/taskExecution.d.ts +3 -0
  292. package/dist/features/tasks/execute/taskExecution.d.ts.map +1 -1
  293. package/dist/features/tasks/execute/taskExecution.js +46 -3
  294. package/dist/features/tasks/execute/taskExecution.js.map +1 -1
  295. package/dist/features/tasks/execute/types.d.ts +11 -0
  296. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  297. package/dist/features/tasks/index.d.ts +1 -1
  298. package/dist/features/tasks/index.d.ts.map +1 -1
  299. package/dist/features/tasks/index.js +1 -1
  300. package/dist/features/tasks/index.js.map +1 -1
  301. package/dist/features/tasks/list/index.d.ts.map +1 -1
  302. package/dist/features/tasks/list/index.js +25 -5
  303. package/dist/features/tasks/list/index.js.map +1 -1
  304. package/dist/features/tasks/list/taskRetryActions.d.ts +15 -0
  305. package/dist/features/tasks/list/taskRetryActions.d.ts.map +1 -0
  306. package/dist/features/tasks/list/taskRetryActions.js +212 -0
  307. package/dist/features/tasks/list/taskRetryActions.js.map +1 -0
  308. package/dist/index.d.ts +2 -2
  309. package/dist/index.d.ts.map +1 -1
  310. package/dist/index.js +2 -2
  311. package/dist/index.js.map +1 -1
  312. package/dist/infra/claude/client.js +3 -3
  313. package/dist/infra/claude/client.js.map +1 -1
  314. package/dist/infra/claude/query-manager.d.ts +1 -0
  315. package/dist/infra/claude/query-manager.d.ts.map +1 -1
  316. package/dist/infra/claude/query-manager.js +7 -1
  317. package/dist/infra/claude/query-manager.js.map +1 -1
  318. package/dist/infra/codex/client.js +3 -3
  319. package/dist/infra/codex/client.js.map +1 -1
  320. package/dist/infra/config/global/globalConfig.d.ts.map +1 -1
  321. package/dist/infra/config/global/globalConfig.js +24 -0
  322. package/dist/infra/config/global/globalConfig.js.map +1 -1
  323. package/dist/infra/config/global/initialization.d.ts +1 -1
  324. package/dist/infra/config/global/initialization.js +1 -1
  325. package/dist/infra/config/loaders/agentLoader.d.ts +8 -16
  326. package/dist/infra/config/loaders/agentLoader.d.ts.map +1 -1
  327. package/dist/infra/config/loaders/agentLoader.js +20 -29
  328. package/dist/infra/config/loaders/agentLoader.js.map +1 -1
  329. package/dist/infra/config/loaders/index.d.ts +1 -1
  330. package/dist/infra/config/loaders/index.d.ts.map +1 -1
  331. package/dist/infra/config/loaders/index.js +1 -1
  332. package/dist/infra/config/loaders/index.js.map +1 -1
  333. package/dist/infra/config/loaders/loader.d.ts +1 -1
  334. package/dist/infra/config/loaders/loader.d.ts.map +1 -1
  335. package/dist/infra/config/loaders/loader.js +1 -1
  336. package/dist/infra/config/loaders/loader.js.map +1 -1
  337. package/dist/infra/config/loaders/pieceParser.d.ts +2 -5
  338. package/dist/infra/config/loaders/pieceParser.d.ts.map +1 -1
  339. package/dist/infra/config/loaders/pieceParser.js +148 -98
  340. package/dist/infra/config/loaders/pieceParser.js.map +1 -1
  341. package/dist/infra/config/loaders/pieceResolver.d.ts +1 -1
  342. package/dist/infra/config/loaders/pieceResolver.js +1 -1
  343. package/dist/infra/config/paths.d.ts +8 -8
  344. package/dist/infra/config/paths.d.ts.map +1 -1
  345. package/dist/infra/config/paths.js +11 -11
  346. package/dist/infra/config/paths.js.map +1 -1
  347. package/dist/infra/config/project/index.d.ts +1 -1
  348. package/dist/infra/config/project/index.d.ts.map +1 -1
  349. package/dist/infra/config/project/index.js +1 -1
  350. package/dist/infra/config/project/index.js.map +1 -1
  351. package/dist/infra/config/project/sessionStore.d.ts +16 -16
  352. package/dist/infra/config/project/sessionStore.d.ts.map +1 -1
  353. package/dist/infra/config/project/sessionStore.js +29 -29
  354. package/dist/infra/config/project/sessionStore.js.map +1 -1
  355. package/dist/infra/config/types.d.ts +3 -3
  356. package/dist/infra/config/types.d.ts.map +1 -1
  357. package/dist/infra/fs/session.d.ts +20 -0
  358. package/dist/infra/fs/session.d.ts.map +1 -1
  359. package/dist/infra/fs/session.js +58 -1
  360. package/dist/infra/fs/session.js.map +1 -1
  361. package/dist/infra/github/pr.d.ts +3 -2
  362. package/dist/infra/github/pr.d.ts.map +1 -1
  363. package/dist/infra/github/pr.js +8 -6
  364. package/dist/infra/github/pr.js.map +1 -1
  365. package/dist/infra/mock/client.d.ts +2 -2
  366. package/dist/infra/mock/client.d.ts.map +1 -1
  367. package/dist/infra/mock/client.js +6 -6
  368. package/dist/infra/mock/client.js.map +1 -1
  369. package/dist/infra/mock/scenario.d.ts +1 -1
  370. package/dist/infra/mock/scenario.d.ts.map +1 -1
  371. package/dist/infra/mock/scenario.js +10 -10
  372. package/dist/infra/mock/scenario.js.map +1 -1
  373. package/dist/infra/mock/types.d.ts +2 -2
  374. package/dist/infra/mock/types.d.ts.map +1 -1
  375. package/dist/infra/providers/claude.d.ts +3 -5
  376. package/dist/infra/providers/claude.d.ts.map +1 -1
  377. package/dist/infra/providers/claude.js +38 -33
  378. package/dist/infra/providers/claude.js.map +1 -1
  379. package/dist/infra/providers/codex.d.ts +3 -5
  380. package/dist/infra/providers/codex.d.ts.map +1 -1
  381. package/dist/infra/providers/codex.js +38 -34
  382. package/dist/infra/providers/codex.js.map +1 -1
  383. package/dist/infra/providers/index.d.ts +1 -1
  384. package/dist/infra/providers/index.d.ts.map +1 -1
  385. package/dist/infra/providers/mock.d.ts +3 -5
  386. package/dist/infra/providers/mock.d.ts.map +1 -1
  387. package/dist/infra/providers/mock.js +23 -15
  388. package/dist/infra/providers/mock.js.map +1 -1
  389. package/dist/infra/providers/types.d.ts +18 -7
  390. package/dist/infra/providers/types.d.ts.map +1 -1
  391. package/dist/infra/resources/index.d.ts +11 -10
  392. package/dist/infra/resources/index.d.ts.map +1 -1
  393. package/dist/infra/resources/index.js +14 -15
  394. package/dist/infra/resources/index.js.map +1 -1
  395. package/dist/infra/task/runner.d.ts +15 -0
  396. package/dist/infra/task/runner.d.ts.map +1 -1
  397. package/dist/infra/task/runner.js +78 -0
  398. package/dist/infra/task/runner.js.map +1 -1
  399. package/dist/infra/task/schema.d.ts +3 -0
  400. package/dist/infra/task/schema.d.ts.map +1 -1
  401. package/dist/infra/task/schema.js +4 -0
  402. package/dist/infra/task/schema.js.map +1 -1
  403. package/dist/infra/task/summarize.d.ts.map +1 -1
  404. package/dist/infra/task/summarize.js +9 -9
  405. package/dist/infra/task/summarize.js.map +1 -1
  406. package/dist/infra/task/types.d.ts +1 -1
  407. package/dist/infra/task/types.d.ts.map +1 -1
  408. package/dist/shared/prompt/select.d.ts.map +1 -1
  409. package/dist/shared/prompt/select.js +48 -42
  410. package/dist/shared/prompt/select.js.map +1 -1
  411. package/dist/shared/prompts/en/perform_agent_system_prompt.md +3 -1
  412. package/dist/shared/prompts/en/perform_phase1_message.md +29 -1
  413. package/dist/shared/prompts/en/perform_phase2_message.md +3 -3
  414. package/dist/shared/prompts/en/score_interactive_policy.md +51 -0
  415. package/dist/shared/prompts/en/score_interactive_system_prompt.md +14 -38
  416. package/dist/shared/prompts/ja/perform_agent_system_prompt.md +3 -1
  417. package/dist/shared/prompts/ja/perform_phase1_message.md +29 -1
  418. package/dist/shared/prompts/ja/perform_phase2_message.md +3 -3
  419. package/dist/shared/prompts/ja/score_interactive_policy.md +51 -0
  420. package/dist/shared/prompts/ja/score_interactive_system_prompt.md +12 -42
  421. package/dist/shared/ui/StreamDisplay.d.ts +19 -1
  422. package/dist/shared/ui/StreamDisplay.d.ts.map +1 -1
  423. package/dist/shared/ui/StreamDisplay.js +25 -4
  424. package/dist/shared/ui/StreamDisplay.js.map +1 -1
  425. package/dist/shared/ui/index.d.ts +1 -1
  426. package/dist/shared/ui/index.d.ts.map +1 -1
  427. package/dist/shared/ui/index.js.map +1 -1
  428. package/dist/shared/utils/index.d.ts +1 -0
  429. package/dist/shared/utils/index.d.ts.map +1 -1
  430. package/dist/shared/utils/index.js +1 -0
  431. package/dist/shared/utils/index.js.map +1 -1
  432. package/dist/shared/utils/sleep.d.ts +10 -0
  433. package/dist/shared/utils/sleep.d.ts.map +1 -0
  434. package/dist/shared/utils/sleep.js +37 -0
  435. package/dist/shared/utils/sleep.js.map +1 -0
  436. package/dist/shared/utils/types.d.ts +3 -3
  437. package/dist/shared/utils/types.d.ts.map +1 -1
  438. package/package.json +4 -4
  439. package/resources/global/en/agents/default/ai-antipattern-reviewer.md +0 -279
  440. package/resources/global/en/agents/default/coder.md +0 -383
  441. package/resources/global/en/agents/default/qa-reviewer.md +0 -92
  442. package/resources/global/en/agents/default/security-reviewer.md +0 -200
  443. package/resources/global/en/agents/expert/qa-reviewer.md +0 -92
  444. package/resources/global/en/agents/expert/security-reviewer.md +0 -169
  445. package/resources/global/en/agents/expert-cqrs/cqrs-es-reviewer.md +0 -147
  446. package/resources/global/en/agents/templates/coder.md +0 -128
  447. package/resources/global/en/agents/templates/planner.md +0 -45
  448. package/resources/global/en/agents/templates/reviewer.md +0 -57
  449. package/resources/global/en/agents/templates/supervisor.md +0 -64
  450. package/resources/global/en/pieces/coding-hybrid-codex.yaml +0 -350
  451. package/resources/global/en/pieces/coding.yaml +0 -348
  452. package/resources/global/en/pieces/default-hybrid-codex.yaml +0 -631
  453. package/resources/global/en/pieces/default.yaml +0 -628
  454. package/resources/global/en/pieces/expert-cqrs-hybrid-codex.yaml +0 -687
  455. package/resources/global/en/pieces/expert-cqrs.yaml +0 -683
  456. package/resources/global/en/pieces/expert-hybrid-codex.yaml +0 -700
  457. package/resources/global/en/pieces/expert.yaml +0 -696
  458. package/resources/global/en/pieces/minimal-hybrid-codex.yaml +0 -428
  459. package/resources/global/en/pieces/minimal.yaml +0 -423
  460. package/resources/global/en/pieces/review-fix-minimal-hybrid-codex.yaml +0 -428
  461. package/resources/global/en/pieces/review-fix-minimal.yaml +0 -423
  462. package/resources/global/en/prompts/interactive-summary.md +0 -16
  463. package/resources/global/en/prompts/interactive-system.md +0 -43
  464. package/resources/global/ja/agents/default/ai-antipattern-reviewer.md +0 -302
  465. package/resources/global/ja/agents/default/architect-planner.md +0 -149
  466. package/resources/global/ja/agents/default/architecture-reviewer.md +0 -636
  467. package/resources/global/ja/agents/default/conductor.md +0 -47
  468. package/resources/global/ja/agents/default/planner.md +0 -77
  469. package/resources/global/ja/agents/default/qa-reviewer.md +0 -92
  470. package/resources/global/ja/agents/default/security-reviewer.md +0 -200
  471. package/resources/global/ja/agents/default/supervisor.md +0 -170
  472. package/resources/global/ja/agents/expert/qa-reviewer.md +0 -92
  473. package/resources/global/ja/agents/expert/security-reviewer.md +0 -169
  474. package/resources/global/ja/agents/expert/supervisor.md +0 -126
  475. package/resources/global/ja/agents/expert-cqrs/cqrs-es-reviewer.md +0 -466
  476. package/resources/global/ja/agents/magi/balthasar.md +0 -55
  477. package/resources/global/ja/agents/magi/casper.md +0 -58
  478. package/resources/global/ja/agents/magi/melchior.md +0 -54
  479. package/resources/global/ja/agents/research/digger.md +0 -93
  480. package/resources/global/ja/agents/research/planner.md +0 -91
  481. package/resources/global/ja/agents/research/supervisor.md +0 -50
  482. package/resources/global/ja/agents/templates/coder.md +0 -128
  483. package/resources/global/ja/agents/templates/planner.md +0 -45
  484. package/resources/global/ja/agents/templates/reviewer.md +0 -57
  485. package/resources/global/ja/agents/templates/supervisor.md +0 -64
  486. package/resources/global/ja/pieces/coding-hybrid-codex.yaml +0 -350
  487. package/resources/global/ja/pieces/coding.yaml +0 -348
  488. package/resources/global/ja/pieces/default-hybrid-codex.yaml +0 -628
  489. package/resources/global/ja/pieces/default.yaml +0 -625
  490. package/resources/global/ja/pieces/expert-cqrs-hybrid-codex.yaml +0 -694
  491. package/resources/global/ja/pieces/expert-cqrs.yaml +0 -690
  492. package/resources/global/ja/pieces/expert-hybrid-codex.yaml +0 -685
  493. package/resources/global/ja/pieces/expert.yaml +0 -681
  494. package/resources/global/ja/pieces/minimal-hybrid-codex.yaml +0 -428
  495. package/resources/global/ja/pieces/minimal.yaml +0 -423
  496. package/resources/global/ja/pieces/review-fix-minimal-hybrid-codex.yaml +0 -428
  497. package/resources/global/ja/pieces/review-fix-minimal.yaml +0 -423
  498. package/resources/global/ja/prompts/interactive-summary.md +0 -16
  499. package/resources/global/ja/prompts/interactive-system.md +0 -43
  500. package/resources/skill/takt-command.md +0 -37
  501. /package/{resources/global → builtins}/en/config.yaml +0 -0
  502. /package/{resources/global/en/agents/default → builtins/en/personas}/architect-planner.md +0 -0
  503. /package/{resources/global/en/agents/magi → builtins/en/personas}/balthasar.md +0 -0
  504. /package/{resources/global/en/agents/magi → builtins/en/personas}/casper.md +0 -0
  505. /package/{resources/global/en/agents/default → builtins/en/personas}/conductor.md +0 -0
  506. /package/{resources/global/en/agents/expert/supervisor.md → builtins/en/personas/expert-supervisor.md} +0 -0
  507. /package/{resources/global/en/agents/magi → builtins/en/personas}/melchior.md +0 -0
  508. /package/{resources/global/en/agents/default → builtins/en/personas}/planner.md +0 -0
  509. /package/{resources/global/en/agents/review → builtins/en/personas}/pr-commenter.md +0 -0
  510. /package/{resources/global/en/agents/research/digger.md → builtins/en/personas/research-digger.md} +0 -0
  511. /package/{resources/global/en/agents/research/planner.md → builtins/en/personas/research-planner.md} +0 -0
  512. /package/{resources/global/en/agents/research/supervisor.md → builtins/en/personas/research-supervisor.md} +0 -0
  513. /package/{resources/global/en/agents/default → builtins/en/personas}/supervisor.md +0 -0
  514. /package/{resources/global → builtins}/ja/config.yaml +0 -0
  515. /package/{resources → builtins}/project/dotgitignore +0 -0
  516. /package/{resources → builtins}/project/tasks/TASK-FORMAT +0 -0
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **T**ask **A**gent **K**oordination **T**ool - Define how AI agents coordinate, where humans intervene, and what gets recorded — in YAML
6
6
 
7
- TAKT runs multiple AI agents (Claude Code, Codex) through YAML-defined workflows. Each step — who runs, what's allowed, what happens on failure — is declared in a piece file, not left to the agent.
7
+ TAKT runs multiple AI agents (Claude Code, Codex) through YAML-defined workflows. Each step — who runs, what they see, what's allowed, what happens on failure — is declared in a piece file, not left to the agent.
8
8
 
9
9
  TAKT is built with TAKT itself (dogfooding).
10
10
 
@@ -24,6 +24,21 @@ You can read every term as standard workflow language (piece = workflow, movemen
24
24
  - Multi-agent coordination needs structure — pieces define who does what, in what order, with what permissions
25
25
  - CI/CD integration needs guardrails — pipeline mode runs agents non-interactively with full audit logs
26
26
 
27
+ ## What TAKT Controls and Manages
28
+
29
+ TAKT **controls** agent execution and **manages** prompt components.
30
+
31
+ | | Concern | Description |
32
+ |---|---------|-------------|
33
+ | Control | **Routing** | State transition rules (who runs when) |
34
+ | Control | **Tools & Permissions** | Readonly, edit, full access (what's allowed) |
35
+ | Control | **Recording** | Session logs, reports (what gets captured) |
36
+ | Manage | **Personas** | Agent roles and expertise (who they act as) |
37
+ | Manage | **Policies** | Coding standards, quality criteria, prohibitions (what to uphold) |
38
+ | Manage | **Knowledge** | Domain knowledge, architecture info (what to reference) |
39
+
40
+ Personas, policies, and knowledge are managed as independent files and freely combined across workflows ([Faceted Prompting](./docs/faceted-prompting.md)). Change a policy in one file and every workflow using it gets the update.
41
+
27
42
  ## What TAKT is NOT
28
43
 
29
44
  - **Not an autonomous engineer** — TAKT coordinates agents but doesn't decide what to build. You provide the task, TAKT governs the execution.
@@ -190,6 +205,12 @@ takt watch
190
205
  ```bash
191
206
  # List task branches (merge/delete)
192
207
  takt list
208
+
209
+ # Non-interactive mode (for CI/scripts)
210
+ takt list --non-interactive
211
+ takt list --non-interactive --action diff --branch takt/my-branch
212
+ takt list --non-interactive --action delete --branch takt/my-branch --yes
213
+ takt list --non-interactive --format json
193
214
  ```
194
215
 
195
216
  ### Pipeline Mode (for CI/Automation)
@@ -229,17 +250,26 @@ In pipeline mode, PRs are not created unless `--auto-pr` is specified.
229
250
  # Interactively switch pieces
230
251
  takt switch
231
252
 
232
- # Copy builtin pieces/agents to ~/.takt/ for customization
253
+ # Copy builtin pieces/personas to project .takt/ for customization
233
254
  takt eject
234
255
 
256
+ # Copy to ~/.takt/ (global) instead
257
+ takt eject --global
258
+
235
259
  # Clear agent conversation sessions
236
260
  takt clear
237
261
 
238
- # Deploy builtin pieces/agents as Claude Code Skill
262
+ # Deploy builtin pieces/personas as Claude Code Skill
239
263
  takt export-cc
240
264
 
265
+ # Preview assembled prompts for each movement and phase
266
+ takt prompt [piece]
267
+
241
268
  # Configure permission mode
242
269
  takt config
270
+
271
+ # Reset piece categories to builtin defaults
272
+ takt reset categories
243
273
  ```
244
274
 
245
275
  ### Recommended Pieces
@@ -281,9 +311,21 @@ name: default
281
311
  max_iterations: 10
282
312
  initial_movement: plan
283
313
 
314
+ # Section maps — key: file path (relative to this YAML)
315
+ personas:
316
+ planner: ../personas/planner.md
317
+ coder: ../personas/coder.md
318
+ reviewer: ../personas/architecture-reviewer.md
319
+
320
+ policies:
321
+ coding: ../policies/coding.md
322
+
323
+ knowledge:
324
+ architecture: ../knowledge/architecture.md
325
+
284
326
  movements:
285
327
  - name: plan
286
- agent: ../agents/default/planner.md
328
+ persona: planner
287
329
  model: opus
288
330
  edit: false
289
331
  rules:
@@ -293,7 +335,9 @@ movements:
293
335
  Analyze the request and create an implementation plan.
294
336
 
295
337
  - name: implement
296
- agent: ../agents/default/coder.md
338
+ persona: coder
339
+ policy: coding
340
+ knowledge: architecture
297
341
  edit: true
298
342
  permission_mode: edit
299
343
  rules:
@@ -305,7 +349,8 @@ movements:
305
349
  Implement based on the plan.
306
350
 
307
351
  - name: review
308
- agent: ../agents/default/architecture-reviewer.md
352
+ persona: reviewer
353
+ knowledge: architecture
309
354
  edit: false
310
355
  rules:
311
356
  - condition: Approved
@@ -316,13 +361,13 @@ movements:
316
361
  Review the implementation from architecture and code quality perspectives.
317
362
  ```
318
363
 
319
- ### Agentless Movements
364
+ ### Persona-less Movements
320
365
 
321
- The `agent` field is optional. When omitted, the movement executes using only the `instruction_template` without a system prompt. This is useful for simple tasks that don't require agent behavior customization.
366
+ The `persona` field is optional. When omitted, the movement executes using only the `instruction_template` without a system prompt. This is useful for simple tasks that don't require persona customization.
322
367
 
323
368
  ```yaml
324
369
  - name: summarize
325
- # No agent specified — uses instruction_template only
370
+ # No persona specified — uses instruction_template only
326
371
  edit: false
327
372
  rules:
328
373
  - condition: Summary complete
@@ -331,11 +376,11 @@ The `agent` field is optional. When omitted, the movement executes using only th
331
376
  Read the report and provide a concise summary.
332
377
  ```
333
378
 
334
- You can also write an inline system prompt as the `agent` value (if the specified file doesn't exist):
379
+ You can also write an inline system prompt as the `persona` value (if the specified file doesn't exist):
335
380
 
336
381
  ```yaml
337
382
  - name: review
338
- agent: "You are a code reviewer. Focus on readability and maintainability."
383
+ persona: "You are a code reviewer. Focus on readability and maintainability."
339
384
  edit: false
340
385
  instruction_template: |
341
386
  Review code quality.
@@ -349,14 +394,14 @@ Execute sub-movements in parallel within a movement and evaluate with aggregate
349
394
  - name: reviewers
350
395
  parallel:
351
396
  - name: arch-review
352
- agent: ../agents/default/architecture-reviewer.md
397
+ persona: reviewer
353
398
  rules:
354
399
  - condition: approved
355
400
  - condition: needs_fix
356
401
  instruction_template: |
357
402
  Review architecture and code quality.
358
403
  - name: security-review
359
- agent: ../agents/default/security-reviewer.md
404
+ persona: security-reviewer
360
405
  rules:
361
406
  - condition: approved
362
407
  - condition: needs_fix
@@ -394,6 +439,7 @@ TAKT includes multiple builtin pieces:
394
439
  | `expert` | Full-stack development piece: architecture, frontend, security, QA reviews with fix loops. |
395
440
  | `expert-cqrs` | Full-stack development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. |
396
441
  | `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
442
+ | `coding` | Lightweight development piece: architect-planner → implement → parallel review (AI antipattern + architecture) → fix. Fast feedback loop without supervisor. |
397
443
  | `passthrough` | Thinnest wrapper. Pass task directly to coder as-is. No review. |
398
444
  | `review-only` | Read-only code review piece that makes no changes. |
399
445
 
@@ -401,23 +447,26 @@ TAKT includes multiple builtin pieces:
401
447
 
402
448
  Use `takt switch` to switch pieces.
403
449
 
404
- ## Builtin Agents
450
+ ## Builtin Personas
405
451
 
406
- | Agent | Description |
407
- |-------|-------------|
452
+ | Persona | Description |
453
+ |---------|-------------|
408
454
  | **planner** | Task analysis, spec investigation, implementation planning |
455
+ | **architect-planner** | Task analysis and design planning: investigates code, resolves unknowns, creates implementation plans |
409
456
  | **coder** | Feature implementation, bug fixing |
410
457
  | **ai-antipattern-reviewer** | AI-specific antipattern review (non-existent APIs, incorrect assumptions, scope creep) |
411
458
  | **architecture-reviewer** | Architecture and code quality review, spec compliance verification |
459
+ | **qa-reviewer** | Test coverage and quality assurance review |
412
460
  | **security-reviewer** | Security vulnerability assessment |
461
+ | **conductor** | Phase 3 judgment specialist: reads reports/responses and outputs status tags |
413
462
  | **supervisor** | Final validation, approval |
414
463
 
415
- ## Custom Agents
464
+ ## Custom Personas
416
465
 
417
- Create agent prompts in Markdown files:
466
+ Create persona prompts in Markdown files:
418
467
 
419
468
  ```markdown
420
- # ~/.takt/agents/my-agents/reviewer.md
469
+ # ~/.takt/personas/my-reviewer.md
421
470
 
422
471
  You are a code reviewer specialized in security.
423
472
 
@@ -444,10 +493,10 @@ The model string is passed to the Codex SDK. If unspecified, defaults to `codex`
444
493
  ```
445
494
  ~/.takt/ # Global configuration directory
446
495
  ├── config.yaml # Global config (provider, model, piece, etc.)
447
- ├── pieces/ # User piece definitions (override builtins)
496
+ ├── pieces/ # User piece definitions (override builtins)
448
497
  │ └── custom.yaml
449
- └── agents/ # User agent prompt files (.md)
450
- └── my-agent.md
498
+ └── personas/ # User persona prompt files (.md)
499
+ └── my-persona.md
451
500
 
452
501
  .takt/ # Project-level configuration
453
502
  ├── config.yaml # Project config (current piece, etc.)
@@ -461,7 +510,7 @@ The model string is passed to the Codex SDK. If unspecified, defaults to `codex`
461
510
  └── {sessionId}.jsonl # NDJSON session log per piece execution
462
511
  ```
463
512
 
464
- Builtin resources are embedded in the npm package (`dist/resources/`). User files in `~/.takt/` take priority.
513
+ Builtin resources are embedded in the npm package (`builtins/`). User files in `~/.takt/` take priority.
465
514
 
466
515
  ### Global Configuration
467
516
 
@@ -596,9 +645,13 @@ description: Custom piece
596
645
  max_iterations: 5
597
646
  initial_movement: analyze
598
647
 
648
+ personas:
649
+ analyzer: ~/.takt/personas/analyzer.md
650
+ coder: ../personas/coder.md
651
+
599
652
  movements:
600
653
  - name: analyze
601
- agent: ~/.takt/agents/my-agents/analyzer.md
654
+ persona: analyzer
602
655
  edit: false
603
656
  rules:
604
657
  - condition: Analysis complete
@@ -607,7 +660,7 @@ movements:
607
660
  Thoroughly analyze this request.
608
661
 
609
662
  - name: implement
610
- agent: ~/.takt/agents/default/coder.md
663
+ persona: coder
611
664
  edit: true
612
665
  permission_mode: edit
613
666
  pass_previous_response: true
@@ -620,19 +673,15 @@ movements:
620
673
 
621
674
  > **Note**: `{task}`, `{previous_response}`, `{user_inputs}` are automatically injected into instructions. Explicit placeholders are only needed if you want to control their position in the template.
622
675
 
623
- ### Specifying Agents by Path
676
+ ### Specifying Personas by Path
624
677
 
625
- In piece definitions, specify agents using file paths:
678
+ Map keys to file paths in section maps, then reference keys from movements:
626
679
 
627
680
  ```yaml
628
- # Relative path from piece file
629
- agent: ../agents/default/coder.md
630
-
631
- # Home directory
632
- agent: ~/.takt/agents/default/coder.md
633
-
634
- # Absolute path
635
- agent: /path/to/custom/agent.md
681
+ # Section maps (relative to piece file)
682
+ personas:
683
+ coder: ../personas/coder.md
684
+ reviewer: ~/.takt/personas/my-reviewer.md
636
685
  ```
637
686
 
638
687
  ### Piece Variables
@@ -654,11 +703,11 @@ Variables available in `instruction_template`:
654
703
 
655
704
  Elements needed for each piece movement:
656
705
 
657
- **1. Agent** - Markdown file containing system prompt:
706
+ **1. Persona** - Referenced by section map key (used as system prompt):
658
707
 
659
708
  ```yaml
660
- agent: ../agents/default/coder.md # Path to agent prompt file
661
- agent_name: coder # Display name (optional)
709
+ persona: coder # Key from personas section map
710
+ persona_name: coder # Display name (optional)
662
711
  ```
663
712
 
664
713
  **2. Rules** - Define routing from movement to next movement. The instruction builder auto-injects status output rules, so agents know which tags to output:
@@ -683,7 +732,8 @@ Special `next` values: `COMPLETE` (success), `ABORT` (failure)
683
732
  | `provider` | - | Override provider for this movement (`claude` or `codex`) |
684
733
  | `model` | - | Override model for this movement |
685
734
  | `permission_mode` | - | Permission mode: `readonly`, `edit`, `full` (provider-independent) |
686
- | `report` | - | Auto-generated report file settings (name, format) |
735
+ | `output_contracts` | - | Output contract definitions for report files |
736
+ | `quality_gates` | - | AI directives for movement completion requirements |
687
737
 
688
738
  ## API Usage Example
689
739
 
@@ -768,6 +818,7 @@ export TAKT_OPENAI_API_KEY=sk-...
768
818
 
769
819
  ## Documentation
770
820
 
821
+ - [Faceted Prompting](./docs/faceted-prompting.md) - Separation of Concerns for AI prompts (Persona, Policy, Instruction, Knowledge, Output Contract)
771
822
  - [Piece Guide](./docs/pieces.md) - Creating and customizing pieces
772
823
  - [Agent Guide](./docs/agents.md) - Configuring custom agents
773
824
  - [Changelog](../CHANGELOG.md) - Version history
@@ -0,0 +1,40 @@
1
+ **This is AI Review iteration #{movement_iteration}.**
2
+
3
+ From the 2nd iteration onward, it means the previous fixes were not actually applied.
4
+ **Your belief that they were "already fixed" is incorrect.**
5
+
6
+ **First, acknowledge the following:**
7
+ - The files you thought were "fixed" are actually not fixed
8
+ - Your understanding of the previous work is wrong
9
+ - You need to rethink from scratch
10
+
11
+ **Required actions:**
12
+ 1. Open all flagged files with the Read tool (discard assumptions and verify the facts)
13
+ 2. Search for the problem areas with grep to confirm they exist
14
+ 3. Fix the confirmed issues with the Edit tool
15
+ 4. Run tests to verify
16
+ 5. Report specifically "what you checked and what you fixed"
17
+
18
+ **Report format:**
19
+ - NG: "It has already been fixed"
20
+ - OK: "After checking file X at L123, I found issue Y and fixed it to Z"
21
+
22
+ **Strictly prohibited:**
23
+ - Reporting "already fixed" without opening the file
24
+ - Making judgments based on assumptions
25
+ - Leaving issues that the AI Reviewer REJECTed unresolved
26
+
27
+ **Handling "no fix needed" (required)**
28
+ - Do not judge "no fix needed" unless you can show verification results for the target file for each AI Review finding
29
+ - If the finding relates to "generated output" or "spec synchronization", output the tag corresponding to "unable to determine" unless you can verify the source/spec
30
+ - If no fix is needed, output the tag corresponding to "unable to determine" and clearly state the reason and scope of verification
31
+
32
+ **Required output (include headings)**
33
+ ## Files checked
34
+ - {filepath:line_number}
35
+ ## Searches performed
36
+ - {command and summary}
37
+ ## Changes made
38
+ - {change details}
39
+ ## Test results
40
+ - {command executed and results}
@@ -0,0 +1,10 @@
1
+ **This is AI Review iteration #{movement_iteration}.**
2
+
3
+ On the first iteration, review comprehensively and report all issues that need to be flagged.
4
+ From the 2nd iteration onward, prioritize verifying whether previously REJECTed items have been fixed.
5
+
6
+ Review the code for AI-specific issues:
7
+ - Verification of assumptions
8
+ - Plausible but incorrect patterns
9
+ - Compatibility with the existing codebase
10
+ - Scope creep detection
@@ -0,0 +1,14 @@
1
+ The ai_review (reviewer) and ai_fix (coder) disagree.
2
+
3
+ - ai_review flagged issues and issued a REJECT
4
+ - ai_fix reviewed and determined "no fix needed"
5
+
6
+ Review both outputs and arbitrate which judgment is valid.
7
+
8
+ **Reports to reference:**
9
+ - AI review results: {report:ai-review.md}
10
+
11
+ **Judgment criteria:**
12
+ - Whether ai_review's findings are specific and point to real issues in the code
13
+ - Whether ai_fix's rebuttal has evidence (file verification results, test results)
14
+ - Whether the findings are non-blocking (record only) level or actually require fixes
@@ -0,0 +1,21 @@
1
+ Read the plan report ({report:plan.md}) and design the architecture.
2
+
3
+ **Criteria for small tasks:**
4
+ - Only 1-2 file changes
5
+ - No design decisions needed
6
+ - No technology selection needed
7
+
8
+ For small tasks, skip creating a design report and match the rule for "small task (no design needed)".
9
+
10
+ **Tasks requiring design:**
11
+ - Changes to 3 or more files
12
+ - Adding new modules or features
13
+ - Technology selection required
14
+ - Architecture pattern decisions needed
15
+
16
+ **Actions:**
17
+ 1. Assess the task scope
18
+ 2. Determine file structure
19
+ 3. Select technologies (if needed)
20
+ 4. Choose design patterns
21
+ 5. Create implementation guidelines for the Coder
@@ -0,0 +1,14 @@
1
+ Fix the issues raised by the supervisor.
2
+
3
+ The supervisor has flagged problems from an overall perspective.
4
+ Address items in order of priority, starting with the highest.
5
+
6
+ **Required output (include headings)**
7
+ ## Work results
8
+ - {Summary of actions taken}
9
+ ## Changes made
10
+ - {Summary of changes}
11
+ ## Test results
12
+ - {Command executed and results}
13
+ ## Evidence
14
+ - {List key points from files checked/searches/diffs/logs}
@@ -0,0 +1,12 @@
1
+ Address the reviewer's feedback.
2
+ Review the session conversation history and fix the issues raised by the reviewer.
3
+
4
+ **Required output (include headings)**
5
+ ## Work results
6
+ - {Summary of actions taken}
7
+ ## Changes made
8
+ - {Summary of changes}
9
+ ## Test results
10
+ - {Command executed and results}
11
+ ## Evidence
12
+ - {List key points from files checked/searches/diffs/logs}
@@ -0,0 +1,46 @@
1
+ Implement according to the plan.
2
+ Refer only to files within the Report Directory shown in the Piece Context. Do not search or reference other report directories.
3
+
4
+ **Important**: Add unit tests alongside the implementation.
5
+ - Add unit tests for newly created classes and functions
6
+ - Update relevant tests when modifying existing code
7
+ - Test file placement: follow the project's conventions
8
+ - Running tests is mandatory. After completing implementation, always run tests and verify results
9
+
10
+ **Scope output contract (create at the start of implementation):**
11
+ ```markdown
12
+ # Change Scope Declaration
13
+
14
+ ## Task
15
+ {One-line task summary}
16
+
17
+ ## Planned changes
18
+ | Type | File |
19
+ |------|------|
20
+ | Create | `src/example.ts` |
21
+ | Modify | `src/routes.ts` |
22
+
23
+ ## Estimated size
24
+ Small / Medium / Large
25
+
26
+ ## Impact area
27
+ - {Affected modules or features}
28
+ ```
29
+
30
+ **Decisions output contract (at implementation completion, only if decisions were made):**
31
+ ```markdown
32
+ # Decision Log
33
+
34
+ ## 1. {Decision}
35
+ - **Context**: {Why the decision was needed}
36
+ - **Options considered**: {List of options}
37
+ - **Rationale**: {Reason for the choice}
38
+ ```
39
+
40
+ **Required output (include headings)**
41
+ ## Work results
42
+ - {Summary of actions taken}
43
+ ## Changes made
44
+ - {Summary of changes}
45
+ ## Test results
46
+ - {Command executed and results}
@@ -0,0 +1,13 @@
1
+ Analyze the task and formulate an implementation plan.
2
+
3
+ **Handling unknowns (important):**
4
+ If the task has open questions or unknowns, investigate by reading the code and resolve them on your own.
5
+ Only mark something as "unclear" if it involves external factors that cannot be resolved through investigation (e.g., the user's intent cannot be determined).
6
+ If it can be understood by reading the code, it is not "unclear".
7
+
8
+ **Actions:**
9
+ 1. Understand the task requirements
10
+ 2. Read the relevant code to grasp the current state
11
+ 3. Investigate any unknowns through code analysis
12
+ 4. Identify the impact area
13
+ 5. Decide on the implementation approach
@@ -0,0 +1,9 @@
1
+ Analyze the task and formulate an implementation plan.
2
+
3
+ **Note:** If a Previous Response exists, this is a replan due to rejection.
4
+ Revise the plan taking that feedback into account.
5
+
6
+ **Actions:**
7
+ 1. Understand the task requirements
8
+ 2. Identify the impact area
9
+ 3. Decide on the implementation approach
@@ -0,0 +1,5 @@
1
+ Review the code for AI-specific issues:
2
+ - Verification of assumptions
3
+ - Plausible but incorrect patterns
4
+ - Compatibility with the existing codebase
5
+ - Scope creep detection
@@ -0,0 +1,10 @@
1
+ Focus on reviewing **architecture and design**.
2
+ Do not review AI-specific issues (already covered by the ai_review movement).
3
+
4
+ **Review criteria:**
5
+ - Structural and design validity
6
+ - Code quality
7
+ - Appropriateness of change scope
8
+ - Test coverage
9
+ - Dead code
10
+ - Call chain verification
@@ -0,0 +1,12 @@
1
+ Review the changes from the perspective of CQRS (Command Query Responsibility Segregation) and Event Sourcing.
2
+ AI-specific issue review is not needed (already covered by the ai_review movement).
3
+
4
+ **Review criteria:**
5
+ - Aggregate design validity
6
+ - Event design (granularity, naming, schema)
7
+ - Command/Query separation
8
+ - Projection design
9
+ - Eventual consistency considerations
10
+
11
+ **Note**: If this project does not use the CQRS+ES pattern,
12
+ review from a general domain design perspective instead.
@@ -0,0 +1,12 @@
1
+ Review the changes from a frontend development perspective.
2
+
3
+ **Review criteria:**
4
+ - Component design (separation of concerns, granularity)
5
+ - State management (local vs. global decisions)
6
+ - Performance (re-renders, memoization)
7
+ - Accessibility (keyboard navigation, ARIA)
8
+ - Data fetching patterns
9
+ - TypeScript type safety
10
+
11
+ **Note**: If this project does not include a frontend,
12
+ proceed as no issues found.
@@ -0,0 +1,8 @@
1
+ Review the changes from a quality assurance perspective.
2
+
3
+ **Review criteria:**
4
+ - Test coverage and quality
5
+ - Test strategy (unit/integration/E2E)
6
+ - Error handling
7
+ - Logging and monitoring
8
+ - Maintainability
@@ -0,0 +1,5 @@
1
+ Review the changes from a security perspective. Check for the following vulnerabilities:
2
+ - Injection attacks (SQL, command, XSS)
3
+ - Authentication and authorization flaws
4
+ - Data exposure risks
5
+ - Cryptographic weaknesses
@@ -0,0 +1,55 @@
1
+ Run tests, verify the build, and perform final approval.
2
+
3
+ **Overall piece verification:**
4
+ 1. Whether the plan and implementation results are consistent
5
+ 2. Whether findings from each review movement have been addressed
6
+ 3. Whether the original task objective has been achieved
7
+
8
+ **Report verification:** Read all reports in the Report Directory and
9
+ check for any unaddressed improvement suggestions.
10
+
11
+ **Validation output contract:**
12
+ ```markdown
13
+ # Final Verification Results
14
+
15
+ ## Result: APPROVE / REJECT
16
+
17
+ ## Verification Summary
18
+ | Item | Status | Verification method |
19
+ |------|--------|-------------------|
20
+ | Requirements met | ✅ | Cross-checked with requirements list |
21
+ | Tests | ✅ | `npm test` (N passed) |
22
+ | Build | ✅ | `npm run build` succeeded |
23
+ | Functional check | ✅ | Main flows verified |
24
+
25
+ ## Deliverables
26
+ - Created: {Created files}
27
+ - Modified: {Modified files}
28
+
29
+ ## Outstanding items (if REJECT)
30
+ | # | Item | Reason |
31
+ |---|------|--------|
32
+ | 1 | {Item} | {Reason} |
33
+ ```
34
+
35
+ **Summary output contract (only if APPROVE):**
36
+ ```markdown
37
+ # Task Completion Summary
38
+
39
+ ## Task
40
+ {Original request in 1-2 sentences}
41
+
42
+ ## Result
43
+ Complete
44
+
45
+ ## Changes
46
+ | Type | File | Summary |
47
+ |------|------|---------|
48
+ | Create | `src/file.ts` | Summary description |
49
+
50
+ ## Verification commands
51
+ ```bash
52
+ npm test
53
+ npm run build
54
+ ```
55
+ ```