takt 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/README.md +364 -325
  2. package/dist/agents/index.d.ts +1 -1
  3. package/dist/agents/index.d.ts.map +1 -1
  4. package/dist/agents/index.js +1 -1
  5. package/dist/agents/index.js.map +1 -1
  6. package/dist/agents/runner.d.ts +0 -1
  7. package/dist/agents/runner.d.ts.map +1 -1
  8. package/dist/agents/runner.js +6 -5
  9. package/dist/agents/runner.js.map +1 -1
  10. package/dist/agents/types.d.ts +3 -1
  11. package/dist/agents/types.d.ts.map +1 -1
  12. package/dist/app/cli/commands.d.ts +1 -1
  13. package/dist/app/cli/commands.js +9 -1
  14. package/dist/app/cli/commands.js.map +1 -1
  15. package/dist/app/cli/routing.js +1 -0
  16. package/dist/app/cli/routing.js.map +1 -1
  17. package/dist/core/models/index.d.ts +1 -1
  18. package/dist/core/models/index.d.ts.map +1 -1
  19. package/dist/core/models/schemas.d.ts +8 -6
  20. package/dist/core/models/schemas.d.ts.map +1 -1
  21. package/dist/core/models/schemas.js +16 -15
  22. package/dist/core/models/schemas.js.map +1 -1
  23. package/dist/core/models/types.d.ts +1 -1
  24. package/dist/core/models/types.d.ts.map +1 -1
  25. package/dist/core/models/workflow-types.d.ts +26 -24
  26. package/dist/core/models/workflow-types.d.ts.map +1 -1
  27. package/dist/core/workflow/constants.d.ts +7 -7
  28. package/dist/core/workflow/constants.d.ts.map +1 -1
  29. package/dist/core/workflow/constants.js +7 -7
  30. package/dist/core/workflow/constants.js.map +1 -1
  31. package/dist/core/workflow/engine/MovementExecutor.d.ts +59 -0
  32. package/dist/core/workflow/engine/MovementExecutor.d.ts.map +1 -0
  33. package/dist/core/workflow/engine/{StepExecutor.js → MovementExecutor.js} +30 -25
  34. package/dist/core/workflow/engine/MovementExecutor.js.map +1 -0
  35. package/dist/core/workflow/engine/OptionsBuilder.d.ts +6 -6
  36. package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
  37. package/dist/core/workflow/engine/OptionsBuilder.js +8 -3
  38. package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
  39. package/dist/core/workflow/engine/ParallelRunner.d.ts +12 -10
  40. package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
  41. package/dist/core/workflow/engine/ParallelRunner.js +46 -41
  42. package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
  43. package/dist/core/workflow/engine/WorkflowEngine.d.ts +16 -16
  44. package/dist/core/workflow/engine/WorkflowEngine.d.ts.map +1 -1
  45. package/dist/core/workflow/engine/WorkflowEngine.js +105 -92
  46. package/dist/core/workflow/engine/WorkflowEngine.js.map +1 -1
  47. package/dist/core/workflow/engine/blocked-handler.d.ts +3 -3
  48. package/dist/core/workflow/engine/blocked-handler.d.ts.map +1 -1
  49. package/dist/core/workflow/engine/blocked-handler.js +2 -2
  50. package/dist/core/workflow/engine/blocked-handler.js.map +1 -1
  51. package/dist/core/workflow/engine/index.d.ts +2 -1
  52. package/dist/core/workflow/engine/index.d.ts.map +1 -1
  53. package/dist/core/workflow/engine/index.js +1 -1
  54. package/dist/core/workflow/engine/index.js.map +1 -1
  55. package/dist/core/workflow/engine/loop-detector.d.ts +5 -5
  56. package/dist/core/workflow/engine/loop-detector.d.ts.map +1 -1
  57. package/dist/core/workflow/engine/loop-detector.js +8 -8
  58. package/dist/core/workflow/engine/loop-detector.js.map +1 -1
  59. package/dist/core/workflow/engine/parallel-logger.d.ts +15 -15
  60. package/dist/core/workflow/engine/parallel-logger.d.ts.map +1 -1
  61. package/dist/core/workflow/engine/parallel-logger.js +22 -21
  62. package/dist/core/workflow/engine/parallel-logger.js.map +1 -1
  63. package/dist/core/workflow/engine/state-manager.d.ts +6 -6
  64. package/dist/core/workflow/engine/state-manager.d.ts.map +1 -1
  65. package/dist/core/workflow/engine/state-manager.js +15 -16
  66. package/dist/core/workflow/engine/state-manager.js.map +1 -1
  67. package/dist/core/workflow/engine/transitions.d.ts +5 -5
  68. package/dist/core/workflow/engine/transitions.d.ts.map +1 -1
  69. package/dist/core/workflow/engine/transitions.js +4 -4
  70. package/dist/core/workflow/engine/transitions.js.map +1 -1
  71. package/dist/core/workflow/evaluation/AggregateEvaluator.d.ts +15 -15
  72. package/dist/core/workflow/evaluation/AggregateEvaluator.d.ts.map +1 -1
  73. package/dist/core/workflow/evaluation/AggregateEvaluator.js +35 -33
  74. package/dist/core/workflow/evaluation/AggregateEvaluator.js.map +1 -1
  75. package/dist/core/workflow/evaluation/RuleEvaluator.d.ts +8 -8
  76. package/dist/core/workflow/evaluation/RuleEvaluator.d.ts.map +1 -1
  77. package/dist/core/workflow/evaluation/RuleEvaluator.js +18 -14
  78. package/dist/core/workflow/evaluation/RuleEvaluator.js.map +1 -1
  79. package/dist/core/workflow/evaluation/index.d.ts +4 -4
  80. package/dist/core/workflow/evaluation/index.d.ts.map +1 -1
  81. package/dist/core/workflow/evaluation/index.js +1 -1
  82. package/dist/core/workflow/evaluation/index.js.map +1 -1
  83. package/dist/core/workflow/evaluation/rule-utils.d.ts +4 -4
  84. package/dist/core/workflow/evaluation/rule-utils.d.ts.map +1 -1
  85. package/dist/core/workflow/evaluation/rule-utils.js +2 -2
  86. package/dist/core/workflow/evaluation/rule-utils.js.map +1 -1
  87. package/dist/core/workflow/index.d.ts +6 -6
  88. package/dist/core/workflow/index.d.ts.map +1 -1
  89. package/dist/core/workflow/index.js +5 -5
  90. package/dist/core/workflow/index.js.map +1 -1
  91. package/dist/core/workflow/instruction/InstructionBuilder.d.ts +17 -15
  92. package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
  93. package/dist/core/workflow/instruction/InstructionBuilder.js +105 -120
  94. package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
  95. package/dist/core/workflow/instruction/ReportInstructionBuilder.d.ts +10 -11
  96. package/dist/core/workflow/instruction/ReportInstructionBuilder.d.ts.map +1 -1
  97. package/dist/core/workflow/instruction/ReportInstructionBuilder.js +38 -84
  98. package/dist/core/workflow/instruction/ReportInstructionBuilder.js.map +1 -1
  99. package/dist/core/workflow/instruction/StatusJudgmentBuilder.d.ts +6 -5
  100. package/dist/core/workflow/instruction/StatusJudgmentBuilder.d.ts.map +1 -1
  101. package/dist/core/workflow/instruction/StatusJudgmentBuilder.js +14 -22
  102. package/dist/core/workflow/instruction/StatusJudgmentBuilder.js.map +1 -1
  103. package/dist/core/workflow/instruction/escape.d.ts +3 -3
  104. package/dist/core/workflow/instruction/escape.d.ts.map +1 -1
  105. package/dist/core/workflow/instruction/escape.js +3 -3
  106. package/dist/core/workflow/instruction/escape.js.map +1 -1
  107. package/dist/core/workflow/instruction/instruction-context.d.ts +16 -49
  108. package/dist/core/workflow/instruction/instruction-context.d.ts.map +1 -1
  109. package/dist/core/workflow/instruction/instruction-context.js +17 -62
  110. package/dist/core/workflow/instruction/instruction-context.js.map +1 -1
  111. package/dist/core/workflow/instruction/status-rules.d.ts +19 -14
  112. package/dist/core/workflow/instruction/status-rules.d.ts.map +1 -1
  113. package/dist/core/workflow/instruction/status-rules.js +47 -66
  114. package/dist/core/workflow/instruction/status-rules.js.map +1 -1
  115. package/dist/core/workflow/phase-runner.d.ts +14 -8
  116. package/dist/core/workflow/phase-runner.d.ts.map +1 -1
  117. package/dist/core/workflow/phase-runner.js +75 -78
  118. package/dist/core/workflow/phase-runner.js.map +1 -1
  119. package/dist/core/workflow/types.d.ts +15 -12
  120. package/dist/core/workflow/types.d.ts.map +1 -1
  121. package/dist/features/config/ejectBuiltin.js +3 -3
  122. package/dist/features/config/ejectBuiltin.js.map +1 -1
  123. package/dist/features/interactive/interactive.d.ts.map +1 -1
  124. package/dist/features/interactive/interactive.js +38 -169
  125. package/dist/features/interactive/interactive.js.map +1 -1
  126. package/dist/features/prompt/index.d.ts +5 -0
  127. package/dist/features/prompt/index.d.ts.map +1 -0
  128. package/dist/features/prompt/index.js +5 -0
  129. package/dist/features/prompt/index.js.map +1 -0
  130. package/dist/features/prompt/preview.d.ts +14 -0
  131. package/dist/features/prompt/preview.d.ts.map +1 -0
  132. package/dist/features/prompt/preview.js +74 -0
  133. package/dist/features/prompt/preview.js.map +1 -0
  134. package/dist/features/tasks/add/index.d.ts +6 -9
  135. package/dist/features/tasks/add/index.d.ts.map +1 -1
  136. package/dist/features/tasks/add/index.js +23 -55
  137. package/dist/features/tasks/add/index.js.map +1 -1
  138. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  139. package/dist/features/tasks/execute/selectAndExecute.js +1 -0
  140. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  141. package/dist/features/tasks/execute/taskExecution.d.ts.map +1 -1
  142. package/dist/features/tasks/execute/taskExecution.js +4 -3
  143. package/dist/features/tasks/execute/taskExecution.js.map +1 -1
  144. package/dist/features/tasks/execute/types.d.ts +13 -0
  145. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  146. package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
  147. package/dist/features/tasks/execute/workflowExecution.js +63 -18
  148. package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
  149. package/dist/features/tasks/index.d.ts +1 -1
  150. package/dist/features/tasks/index.d.ts.map +1 -1
  151. package/dist/features/tasks/index.js +1 -1
  152. package/dist/features/tasks/index.js.map +1 -1
  153. package/dist/features/tasks/list/index.d.ts.map +1 -1
  154. package/dist/features/tasks/list/index.js +0 -1
  155. package/dist/features/tasks/list/index.js.map +1 -1
  156. package/dist/features/tasks/list/taskActions.d.ts +1 -0
  157. package/dist/features/tasks/list/taskActions.d.ts.map +1 -1
  158. package/dist/features/tasks/list/taskActions.js +24 -1
  159. package/dist/features/tasks/list/taskActions.js.map +1 -1
  160. package/dist/features/workflowSelection/index.js +1 -1
  161. package/dist/features/workflowSelection/index.js.map +1 -1
  162. package/dist/index.d.ts +3 -3
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js +1 -1
  165. package/dist/index.js.map +1 -1
  166. package/dist/infra/claude/client.d.ts +1 -1
  167. package/dist/infra/claude/client.d.ts.map +1 -1
  168. package/dist/infra/claude/client.js +6 -24
  169. package/dist/infra/claude/client.js.map +1 -1
  170. package/dist/infra/claude/executor.d.ts +0 -1
  171. package/dist/infra/claude/executor.d.ts.map +1 -1
  172. package/dist/infra/claude/executor.js +0 -2
  173. package/dist/infra/claude/executor.js.map +1 -1
  174. package/dist/infra/claude/index.js +2 -2
  175. package/dist/infra/claude/index.js.map +1 -1
  176. package/dist/infra/claude/options-builder.js +4 -4
  177. package/dist/infra/claude/options-builder.js.map +1 -1
  178. package/dist/infra/claude/process.d.ts +1 -1
  179. package/dist/infra/claude/process.d.ts.map +1 -1
  180. package/dist/infra/claude/process.js +1 -1
  181. package/dist/infra/claude/process.js.map +1 -1
  182. package/dist/infra/claude/query-manager.d.ts +1 -1
  183. package/dist/infra/claude/query-manager.d.ts.map +1 -1
  184. package/dist/infra/claude/query-manager.js +1 -2
  185. package/dist/infra/claude/query-manager.js.map +1 -1
  186. package/dist/infra/claude/stream-converter.d.ts +2 -2
  187. package/dist/infra/claude/stream-converter.js +2 -2
  188. package/dist/infra/claude/types.d.ts +1 -1
  189. package/dist/infra/claude/types.d.ts.map +1 -1
  190. package/dist/infra/codex/client.d.ts.map +1 -1
  191. package/dist/infra/codex/client.js +0 -1
  192. package/dist/infra/codex/client.js.map +1 -1
  193. package/dist/infra/config/global/globalConfig.d.ts.map +1 -1
  194. package/dist/infra/config/global/globalConfig.js +0 -1
  195. package/dist/infra/config/global/globalConfig.js.map +1 -1
  196. package/dist/infra/config/loaders/agentLoader.d.ts +1 -1
  197. package/dist/infra/config/loaders/agentLoader.d.ts.map +1 -1
  198. package/dist/infra/config/loaders/agentLoader.js +6 -5
  199. package/dist/infra/config/loaders/agentLoader.js.map +1 -1
  200. package/dist/infra/config/loaders/loader.d.ts +1 -1
  201. package/dist/infra/config/loaders/loader.js +1 -1
  202. package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
  203. package/dist/infra/config/loaders/workflowParser.js +9 -5
  204. package/dist/infra/config/loaders/workflowParser.js.map +1 -1
  205. package/dist/infra/config/loaders/workflowResolver.d.ts +4 -4
  206. package/dist/infra/config/loaders/workflowResolver.js +11 -11
  207. package/dist/infra/config/loaders/workflowResolver.js.map +1 -1
  208. package/dist/infra/config/paths.d.ts +4 -4
  209. package/dist/infra/config/paths.d.ts.map +1 -1
  210. package/dist/infra/config/paths.js +7 -7
  211. package/dist/infra/config/paths.js.map +1 -1
  212. package/dist/infra/config/project/index.d.ts +1 -1
  213. package/dist/infra/config/project/index.d.ts.map +1 -1
  214. package/dist/infra/config/project/index.js.map +1 -1
  215. package/dist/infra/config/project/projectConfig.d.ts +2 -2
  216. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  217. package/dist/infra/config/types.d.ts +0 -2
  218. package/dist/infra/config/types.d.ts.map +1 -1
  219. package/dist/infra/fs/index.d.ts +1 -1
  220. package/dist/infra/fs/index.d.ts.map +1 -1
  221. package/dist/infra/fs/index.js.map +1 -1
  222. package/dist/infra/fs/session.d.ts +1 -1
  223. package/dist/infra/fs/session.d.ts.map +1 -1
  224. package/dist/infra/fs/session.js +0 -1
  225. package/dist/infra/fs/session.js.map +1 -1
  226. package/dist/infra/providers/index.d.ts.map +1 -1
  227. package/dist/infra/providers/index.js +0 -1
  228. package/dist/infra/providers/index.js.map +1 -1
  229. package/dist/infra/task/autoCommit.js +1 -1
  230. package/dist/infra/task/autoCommit.js.map +1 -1
  231. package/dist/infra/task/branchList.d.ts +4 -2
  232. package/dist/infra/task/branchList.d.ts.map +1 -1
  233. package/dist/infra/task/branchList.js +87 -9
  234. package/dist/infra/task/branchList.js.map +1 -1
  235. package/dist/infra/task/clone.js +1 -1
  236. package/dist/infra/task/clone.js.map +1 -1
  237. package/dist/infra/task/parser.d.ts +1 -1
  238. package/dist/infra/task/parser.js +1 -1
  239. package/dist/infra/task/summarize.d.ts.map +1 -1
  240. package/dist/infra/task/summarize.js +3 -15
  241. package/dist/infra/task/summarize.js.map +1 -1
  242. package/dist/infra/task/types.d.ts +1 -0
  243. package/dist/infra/task/types.d.ts.map +1 -1
  244. package/dist/shared/context.d.ts.map +1 -1
  245. package/dist/shared/context.js +0 -1
  246. package/dist/shared/context.js.map +1 -1
  247. package/dist/shared/i18n/index.d.ts +31 -0
  248. package/dist/shared/i18n/index.d.ts.map +1 -0
  249. package/dist/shared/i18n/index.js +97 -0
  250. package/dist/shared/i18n/index.js.map +1 -0
  251. package/dist/shared/i18n/labels_en.yaml +37 -0
  252. package/dist/shared/i18n/labels_ja.yaml +37 -0
  253. package/dist/shared/prompt/select.d.ts +0 -3
  254. package/dist/shared/prompt/select.d.ts.map +1 -1
  255. package/dist/shared/prompt/select.js +5 -20
  256. package/dist/shared/prompt/select.js.map +1 -1
  257. package/dist/shared/prompts/en/perform_agent_system_prompt.md +7 -0
  258. package/dist/shared/prompts/en/perform_builtin_agent_system_prompt.md +7 -0
  259. package/dist/shared/prompts/en/perform_judge_message.md +24 -0
  260. package/dist/shared/prompts/en/perform_phase1_message.md +45 -0
  261. package/dist/shared/prompts/en/perform_phase2_message.md +31 -0
  262. package/dist/shared/prompts/en/perform_phase3_message.md +19 -0
  263. package/dist/shared/prompts/en/score_interactive_system_prompt.md +53 -0
  264. package/dist/shared/prompts/en/score_slug_system_prompt.md +19 -0
  265. package/dist/shared/prompts/en/score_summary_system_prompt.md +25 -0
  266. package/dist/shared/prompts/index.d.ts +27 -0
  267. package/dist/shared/prompts/index.d.ts.map +1 -0
  268. package/dist/shared/prompts/index.js +111 -0
  269. package/dist/shared/prompts/index.js.map +1 -0
  270. package/dist/shared/prompts/ja/perform_agent_system_prompt.md +7 -0
  271. package/dist/shared/prompts/ja/perform_builtin_agent_system_prompt.md +7 -0
  272. package/dist/shared/prompts/ja/perform_judge_message.md +24 -0
  273. package/dist/shared/prompts/ja/perform_phase1_message.md +44 -0
  274. package/dist/shared/prompts/ja/perform_phase2_message.md +30 -0
  275. package/dist/shared/prompts/ja/perform_phase3_message.md +19 -0
  276. package/dist/shared/prompts/ja/score_interactive_system_prompt.md +59 -0
  277. package/dist/shared/prompts/ja/score_slug_system_prompt.md +19 -0
  278. package/dist/shared/prompts/ja/score_summary_system_prompt.md +32 -0
  279. package/dist/shared/ui/LogManager.d.ts +1 -1
  280. package/dist/shared/ui/LogManager.d.ts.map +1 -1
  281. package/dist/shared/ui/LogManager.js +1 -2
  282. package/dist/shared/ui/LogManager.js.map +1 -1
  283. package/dist/shared/utils/debug.js +1 -1
  284. package/dist/shared/utils/debug.js.map +1 -1
  285. package/dist/shared/utils/types.d.ts +29 -1
  286. package/dist/shared/utils/types.d.ts.map +1 -1
  287. package/package.json +2 -2
  288. package/resources/global/en/{workflows → pieces}/default.yaml +16 -16
  289. package/resources/global/en/{workflows → pieces}/expert-cqrs.yaml +17 -17
  290. package/resources/global/en/{workflows → pieces}/expert.yaml +20 -20
  291. package/resources/global/en/{workflows → pieces}/magi.yaml +4 -4
  292. package/resources/global/en/{workflows → pieces}/minimal.yaml +7 -7
  293. package/resources/global/en/{workflows → pieces}/research.yaml +11 -11
  294. package/resources/global/en/{workflows → pieces}/review-fix-minimal.yaml +8 -8
  295. package/resources/global/en/{workflows → pieces}/review-only.yaml +7 -7
  296. package/resources/global/ja/agents/default/architecture-reviewer.md +3 -3
  297. package/resources/global/ja/agents/default/supervisor.md +1 -1
  298. package/resources/global/ja/agents/templates/planner.md +1 -1
  299. package/resources/global/ja/{workflows → pieces}/default.yaml +12 -12
  300. package/resources/global/ja/{workflows → pieces}/expert-cqrs.yaml +18 -18
  301. package/resources/global/ja/{workflows → pieces}/expert.yaml +15 -15
  302. package/resources/global/ja/{workflows → pieces}/magi.yaml +4 -4
  303. package/resources/global/ja/{workflows → pieces}/minimal.yaml +8 -8
  304. package/resources/global/ja/{workflows → pieces}/research.yaml +11 -11
  305. package/resources/global/ja/{workflows → pieces}/review-fix-minimal.yaml +8 -8
  306. package/resources/global/ja/{workflows → pieces}/review-only.yaml +7 -7
  307. package/dist/core/workflow/engine/StepExecutor.d.ts +0 -52
  308. package/dist/core/workflow/engine/StepExecutor.d.ts.map +0 -1
  309. package/dist/core/workflow/engine/StepExecutor.js.map +0 -1
package/README.md CHANGED
@@ -2,16 +2,37 @@
2
2
 
3
3
  🇯🇵 [日本語ドキュメント](./docs/README.ja.md)
4
4
 
5
- **T**ask **A**gent **K**oordination **T**ool - Multi-agent orchestration system for Claude Code and OpenAI Codex.
5
+ **T**ask **A**gent **K**oordination **T**ool - A governance-first orchestrator for running coding agents safely and responsibly
6
6
 
7
- TAKT is built with TAKT (dogfooding).
7
+ TAKT coordinates AI agents like Claude Code and Codex according to your organization's rules and workflows. It clarifies who is responsible, what is permitted, and how to recover from failures, while automating complex development tasks.
8
+
9
+ TAKT is built with TAKT itself (dogfooding).
10
+
11
+ ## TAKT is For Teams That Need
12
+
13
+ - **Want to integrate AI into CI/CD but fear runaway execution** — Clarify control scope with workflow definitions
14
+ - **Want automated PR generation but need audit logs** — Record and track all execution history
15
+ - **Want to use multiple AI models but manage them uniformly** — Control Claude/Codex/Mock with the same workflow
16
+ - **Want to reproduce and debug agent failures** — Maintain complete history with session logs and reports
17
+
18
+ ## What TAKT is NOT
19
+
20
+ - **Not an autonomous engineer** — TAKT doesn't complete implementations itself; it governs and coordinates multiple agents
21
+ - **Not competing with Claude Code Swarm** — While leveraging Swarm's execution power, TAKT provides "operational guardrails" such as workflow definitions, permission controls, and audit logs
22
+ - **Not just a workflow engine** — TAKT is designed to address AI-specific challenges (non-determinism, accountability, audit requirements, and reproducibility)
8
23
 
9
24
  ## Requirements
10
25
 
11
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or Codex must be installed and configured
12
- - [GitHub CLI](https://cli.github.com/) (`gh`) — required only for `takt #N` (GitHub Issue execution)
26
+ Choose one:
27
+
28
+ - **Use provider CLIs**: [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [Codex](https://github.com/openai/codex) installed
29
+ - **Use direct API**: **Anthropic API Key** or **OpenAI API Key** (no CLI required)
13
30
 
14
- TAKT supports both Claude Code and Codex as providers; you can choose the provider during setup.
31
+ Additionally required:
32
+
33
+ - [GitHub CLI](https://cli.github.com/) (`gh`) — Only needed for `takt #N` (GitHub Issue execution)
34
+
35
+ **Pricing Note**: When using API Keys, TAKT directly calls the Claude API (Anthropic) or OpenAI API. The pricing structure is the same as using Claude Code or Codex. Be mindful of costs, especially when running automated tasks in CI/CD environments, as API usage can accumulate.
15
36
 
16
37
  ## Installation
17
38
 
@@ -22,168 +43,240 @@ npm install -g takt
22
43
  ## Quick Start
23
44
 
24
45
  ```bash
25
- # Interactive planning refine task requirements with AI, then execute
46
+ # Interactive mode - refine task requirements with AI, then execute
26
47
  takt
27
48
 
28
- # You can also provide an initial message to start the conversation
29
- takt hello
30
-
31
- # Run a GitHub issue as a task (both are equivalent)
49
+ # Execute GitHub Issue as task (both work the same)
32
50
  takt #6
33
51
  takt --issue 6
34
52
 
35
- # Pipeline mode (non-interactive, for scripts and CI)
36
- takt --pipeline --task "fix the auth bug" --auto-pr
53
+ # Pipeline execution (non-interactive, for scripts/CI)
54
+ takt --pipeline --task "Fix the bug" --auto-pr
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Interactive Mode
60
+
61
+ A mode where you refine task content through conversation with AI before execution. Useful when task requirements are ambiguous or when you want to clarify content while consulting with AI.
62
+
63
+ ```bash
64
+ # Start interactive mode (no arguments)
65
+ takt
66
+
67
+ # Specify initial message (short word only)
68
+ takt hello
37
69
  ```
38
70
 
39
- ### What happens when you run a task
71
+ **Note:** If you specify a string with spaces, Issue reference (`#6`), or `--task` / `--issue` options, interactive mode will be skipped and the task will be executed directly.
40
72
 
41
- When you run `takt #6` (GitHub issue reference), TAKT guides you through an interactive flow:
73
+ **Flow:**
74
+ 1. Select workflow
75
+ 2. Refine task content through conversation with AI
76
+ 3. Finalize task instructions with `/go` (you can also add additional instructions like `/go additional instructions`)
77
+ 4. Execute (create worktree, run workflow, create PR)
42
78
 
43
- **1. Workflow selection**
79
+ #### Execution Example
44
80
 
45
81
  ```
82
+ $ takt
83
+
46
84
  Select workflow:
47
- (↑↓ to move, Enter to select)
48
-
49
- default (current) (default)
50
- expert
51
- expert-cqrs
52
- magi
53
- research
54
- simple
85
+ 🎼 default (current)
86
+ 📁 Development/
87
+ 📁 Research/
55
88
  Cancel
56
- ```
57
89
 
58
- **2. Isolated clone** (optional)
90
+ Interactive mode - Enter task content. Commands: /go (execute), /cancel (exit)
59
91
 
60
- ```
61
- ? Create worktree? (Y/n)
62
- ```
92
+ > I want to add user authentication feature
63
93
 
64
- Choose `y` to run in a `git clone --shared` isolated environment, keeping your working directory clean.
94
+ [AI confirms and organizes requirements]
65
95
 
66
- **3. Execution** — The selected workflow orchestrates multiple agents to complete the task.
96
+ > /go
67
97
 
68
- **4. PR creation** (after worktree execution)
98
+ Proposed task instructions:
99
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
+ Implement user authentication feature.
69
101
 
70
- ```
71
- ? Create pull request? (y/N)
102
+ Requirements:
103
+ - Login with email address and password
104
+ - JWT token-based authentication
105
+ - Password hashing (bcrypt)
106
+ - Login/logout API endpoints
107
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
108
+
109
+ Proceed with these task instructions? (Y/n) y
110
+
111
+ ? Create worktree? (Y/n) y
112
+
113
+ [Workflow execution starts...]
72
114
  ```
73
115
 
74
- If `--auto-pr` is specified, the PR is created automatically without asking.
116
+ ### Direct Task Execution
75
117
 
76
- ### Recommended workflows
118
+ When task content is clear, you can skip interactive mode and execute directly.
77
119
 
78
- | Workflow | Best for |
79
- |----------|----------|
80
- | `default` | Full development tasks. Used for TAKT's own development. Multi-stage review with parallel architect + security review. |
81
- | `minimal` | Quick fixes and simple tasks. Minimal workflow with basic review. |
82
- | `review-fix-minimal` | Review and fix workflow. Focused on iterative improvements with review feedback. |
83
- | `research` | Research and investigation. Autonomous research without asking questions. |
120
+ ```bash
121
+ # Specify task content directly (string with spaces)
122
+ takt "Add login feature"
84
123
 
85
- ## Commands
124
+ # Specify task content with --task option
125
+ takt --task "Fix bug"
86
126
 
87
- ### Interactive Mode (default)
127
+ # Specify workflow
128
+ takt "Add authentication" --workflow expert
88
129
 
89
- The standard mode for everyday development. Workflow selection, worktree creation, and PR creation are handled interactively.
130
+ # Auto-create PR
131
+ takt "Fix bug" --auto-pr
132
+ ```
90
133
 
91
- ```bash
92
- # Interactive planning — start AI conversation to refine task requirements
93
- takt
134
+ ### GitHub Issue Tasks
94
135
 
95
- # You can also provide an initial message to start the conversation
96
- takt hello
136
+ You can execute GitHub Issues directly as tasks. Issue title, body, labels, and comments are automatically incorporated as task content.
97
137
 
98
- # Run a GitHub issue as a task (both are equivalent)
138
+ ```bash
139
+ # Execute by specifying issue number
99
140
  takt #6
100
141
  takt --issue 6
101
142
 
102
- # Automatically create a PR (skip the confirmation prompt)
143
+ # Issue + workflow specification
144
+ takt #6 --workflow expert
145
+
146
+ # Issue + auto-create PR
103
147
  takt #6 --auto-pr
148
+ ```
149
+
150
+ **Requirements:** [GitHub CLI](https://cli.github.com/) (`gh`) must be installed and authenticated.
151
+
152
+ ### Task Management (add / run / watch / list)
153
+
154
+ Batch processing using task files (`.takt/tasks/`). Useful for accumulating multiple tasks and executing them together later.
104
155
 
105
- # Use --task option to specify task content (alternative to GitHub issue)
106
- takt --task "Add login feature"
156
+ #### Add Task (`takt add`)
157
+
158
+ ```bash
159
+ # Refine task requirements through AI conversation, then add task
160
+ takt add
161
+
162
+ # Add task from GitHub Issue (issue number reflected in branch name)
163
+ takt add #28
107
164
  ```
108
165
 
109
- When `--auto-pr` is not specified, you will be asked whether to create a PR after a successful worktree execution.
166
+ #### Execute Tasks (`takt run`)
110
167
 
111
- ### Pipeline Mode (`--pipeline`)
168
+ ```bash
169
+ # Execute all pending tasks in .takt/tasks/
170
+ takt run
171
+ ```
172
+
173
+ #### Watch Tasks (`takt watch`)
174
+
175
+ ```bash
176
+ # Monitor .takt/tasks/ and auto-execute tasks (resident process)
177
+ takt watch
178
+ ```
179
+
180
+ #### List Task Branches (`takt list`)
181
+
182
+ ```bash
183
+ # List task branches (merge/delete)
184
+ takt list
185
+ ```
186
+
187
+ ### Pipeline Mode (for CI/Automation)
112
188
 
113
- Specifying `--pipeline` enters pipeline mode — fully non-interactive, suitable for scripts and CI integration. TAKT automatically creates a branch, runs the workflow, commits, and pushes.
189
+ Specifying `--pipeline` enables non-interactive pipeline mode. Automatically creates branch runs workflow commits & pushes. Suitable for CI/CD automation.
114
190
 
115
191
  ```bash
116
- # Run a task in pipeline mode
117
- takt --pipeline --task "fix the auth bug"
192
+ # Execute task in pipeline mode
193
+ takt --pipeline --task "Fix bug"
118
194
 
119
- # Pipeline mode + automatic PR creation
120
- takt --pipeline --task "fix the auth bug" --auto-pr
195
+ # Pipeline execution + auto-create PR
196
+ takt --pipeline --task "Fix bug" --auto-pr
121
197
 
122
- # Attach GitHub issue context
198
+ # Link issue information
123
199
  takt --pipeline --issue 99 --auto-pr
124
200
 
125
201
  # Specify workflow and branch
126
- takt --pipeline --task "fix the auth bug" -w magi -b feat/fix-auth
202
+ takt --pipeline --task "Fix bug" -w magi -b feat/fix-bug
127
203
 
128
204
  # Specify repository (for PR creation)
129
- takt --pipeline --task "fix the auth bug" --auto-pr --repo owner/repo
205
+ takt --pipeline --task "Fix bug" --auto-pr --repo owner/repo
130
206
 
131
- # Run workflow only skip branch creation, commit, and push
132
- takt --pipeline --task "fix the auth bug" --skip-git
207
+ # Workflow execution only (skip branch creation, commit, push)
208
+ takt --pipeline --task "Fix bug" --skip-git
209
+
210
+ # Minimal output mode (for CI)
211
+ takt --pipeline --task "Fix bug" --quiet
133
212
  ```
134
213
 
135
- In pipeline mode, PRs are **not** created unless `--auto-pr` is explicitly specified.
214
+ In pipeline mode, PRs are not created unless `--auto-pr` is specified.
215
+
216
+ **GitHub Integration:** When using TAKT in GitHub Actions, see [takt-action](https://github.com/nrslib/takt-action). You can automate PR reviews and task execution. Refer to the [CI/CD Integration](#cicd-integration) section for details.
217
+
218
+ ### Other Commands
136
219
 
137
- ### Subcommands
220
+ ```bash
221
+ # Interactively switch workflows
222
+ takt switch
223
+
224
+ # Copy builtin workflows/agents to ~/.takt/ for customization
225
+ takt eject
226
+
227
+ # Clear agent conversation sessions
228
+ takt clear
229
+
230
+ # Configure permission mode
231
+ takt config
232
+ ```
138
233
 
139
- | Command | Description |
140
- |---------|-------------|
141
- | `takt run` | Run all pending tasks from `.takt/tasks/` |
142
- | `takt watch` | Watch `.takt/tasks/` and auto-execute tasks (stays resident) |
143
- | `takt add` | Add a new task via AI conversation |
144
- | `takt list` | List task branches (try merge, merge & cleanup, or delete) |
145
- | `takt switch` | Switch workflow interactively |
146
- | `takt clear` | Clear agent conversation sessions |
147
- | `takt eject` | Copy builtin workflow/agents to `~/.takt/` for customization |
148
- | `takt config` | Configure permission mode |
149
- | `takt --help` | Show help |
234
+ ### Recommended Workflows
150
235
 
151
- ### Options
236
+ | Workflow | Recommended Use |
237
+ |----------|-----------------|
238
+ | `default` | Serious development tasks. Used for TAKT's own development. Multi-stage review with parallel reviews (architect + security). |
239
+ | `minimal` | Simple fixes and straightforward tasks. Minimal workflow with basic review. |
240
+ | `review-fix-minimal` | Review & fix workflow. Specialized for iterative improvement based on review feedback. |
241
+ | `research` | Investigation and research. Autonomously executes research without asking questions. |
242
+
243
+ ### Main Options
152
244
 
153
245
  | Option | Description |
154
246
  |--------|-------------|
155
- | `--pipeline` | **Enable pipeline (non-interactive) mode** — required for CI/automation |
156
- | `-t, --task <text>` | Task content (as alternative to GitHub issue) |
157
- | `-i, --issue <N>` | GitHub issue number (equivalent to `#N` in interactive mode) |
247
+ | `--pipeline` | **Enable pipeline (non-interactive) mode** — Required for CI/automation |
248
+ | `-t, --task <text>` | Task content (alternative to GitHub Issue) |
249
+ | `-i, --issue <N>` | GitHub issue number (same as `#N` in interactive mode) |
158
250
  | `-w, --workflow <name or path>` | Workflow name or path to workflow YAML file |
159
- | `-b, --branch <name>` | Branch name (auto-generated if omitted) |
160
- | `--auto-pr` | Create PR after execution (interactive: skip confirmation, pipeline: enable PR) |
251
+ | `-b, --branch <name>` | Specify branch name (auto-generated if omitted) |
252
+ | `--auto-pr` | Create PR (interactive: skip confirmation, pipeline: enable PR) |
161
253
  | `--skip-git` | Skip branch creation, commit, and push (pipeline mode, workflow-only) |
162
- | `--repo <owner/repo>` | Repository for PR creation |
254
+ | `--repo <owner/repo>` | Specify repository (for PR creation) |
163
255
  | `--create-worktree <yes\|no>` | Skip worktree confirmation prompt |
164
256
  | `-q, --quiet` | Minimal output mode: suppress AI output (for CI) |
165
257
  | `--provider <name>` | Override agent provider (claude\|codex\|mock) |
166
258
  | `--model <name>` | Override agent model |
167
- | `--config <path>` | Path to global config file (default: `~/.takt/config.yaml`) |
168
259
 
169
260
  ## Workflows
170
261
 
171
- TAKT uses YAML-based workflow definitions with rule-based routing. Builtin workflows are embedded in the package; user workflows in `~/.takt/workflows/` take priority. Use `takt eject` to copy a builtin to `~/.takt/` for customization.
262
+ TAKT uses YAML-based workflow definitions and rule-based routing. Builtin workflows are embedded in the package, with user workflows in `~/.takt/workflows/` taking priority. Use `takt eject` to copy builtins to `~/.takt/` for customization.
263
+
264
+ > **Note (v0.4.0)**: Internal terminology has changed from "step" to "movement" for workflow components. User-facing workflow files remain compatible, but if you customize workflows, you may see `movements:` instead of `steps:` in YAML files. The functionality remains the same.
172
265
 
173
- ### Example Workflow
266
+ ### Workflow Example
174
267
 
175
268
  ```yaml
176
269
  name: default
177
270
  max_iterations: 10
178
- initial_step: plan
271
+ initial_movement: plan
179
272
 
180
- steps:
273
+ movements:
181
274
  - name: plan
182
275
  agent: ../agents/default/planner.md
183
276
  model: opus
184
277
  edit: false
185
278
  rules:
186
- - condition: Plan complete
279
+ - condition: Planning complete
187
280
  next: implement
188
281
  instruction_template: |
189
282
  Analyze the request and create an implementation plan.
@@ -195,7 +288,7 @@ steps:
195
288
  rules:
196
289
  - condition: Implementation complete
197
290
  next: review
198
- - condition: Cannot proceed
291
+ - condition: Blocked
199
292
  next: ABORT
200
293
  instruction_template: |
201
294
  Implement based on the plan.
@@ -209,12 +302,12 @@ steps:
209
302
  - condition: Needs fix
210
303
  next: implement
211
304
  instruction_template: |
212
- Review the implementation for architecture and code quality.
305
+ Review the implementation from architecture and code quality perspectives.
213
306
  ```
214
307
 
215
- ### Agent-less Steps
308
+ ### Agentless Movements
216
309
 
217
- The `agent` field is optional. When omitted, the step executes using only the `instruction_template` without a system prompt. This is useful for simple tasks where agent behavior customization is not needed.
310
+ 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.
218
311
 
219
312
  ```yaml
220
313
  - name: summarize
@@ -224,22 +317,22 @@ The `agent` field is optional. When omitted, the step executes using only the `i
224
317
  - condition: Summary complete
225
318
  next: COMPLETE
226
319
  instruction_template: |
227
- Read the reports and provide a brief summary.
320
+ Read the report and provide a concise summary.
228
321
  ```
229
322
 
230
- You can also provide an inline system prompt as the `agent` value (when the specified file does not exist):
323
+ You can also write an inline system prompt as the `agent` value (if the specified file doesn't exist):
231
324
 
232
325
  ```yaml
233
326
  - name: review
234
327
  agent: "You are a code reviewer. Focus on readability and maintainability."
235
328
  edit: false
236
329
  instruction_template: |
237
- Review the code for quality.
330
+ Review code quality.
238
331
  ```
239
332
 
240
- ### Parallel Steps
333
+ ### Parallel Movements
241
334
 
242
- Steps can execute sub-steps concurrently with aggregate evaluation:
335
+ Execute sub-movements in parallel within a movement and evaluate with aggregate conditions:
243
336
 
244
337
  ```yaml
245
338
  - name: reviewers
@@ -265,67 +358,56 @@ Steps can execute sub-steps concurrently with aggregate evaluation:
265
358
  next: fix
266
359
  ```
267
360
 
268
- - `all("X")`: true if ALL sub-steps matched condition X
269
- - `any("X")`: true if ANY sub-step matched condition X
270
- - Sub-step `rules` define possible outcomes; `next` is optional (parent handles routing)
361
+ - `all("X")`: true if ALL sub-movements matched condition X
362
+ - `any("X")`: true if ANY sub-movement matched condition X
363
+ - Sub-movement `rules` define possible outcomes, but `next` is optional (parent controls transition)
271
364
 
272
365
  ### Rule Condition Types
273
366
 
274
367
  | Type | Syntax | Description |
275
368
  |------|--------|-------------|
276
- | Tag-based | `"condition text"` | Agent outputs `[STEP:N]` tag, matched by index |
277
- | AI judge | `ai("condition text")` | AI evaluates the condition against agent output |
278
- | Aggregate | `all("X")` / `any("X")` | Aggregates parallel sub-step results |
369
+ | Tag-based | `"condition text"` | Agent outputs `[MOVEMENTNAME:N]` tag, matched by index |
370
+ | AI judge | `ai("condition text")` | AI evaluates condition against agent output |
371
+ | Aggregate | `all("X")` / `any("X")` | Aggregates parallel sub-movement matched conditions |
279
372
 
280
- ## Built-in Workflows
373
+ ## Builtin Workflows
281
374
 
282
- TAKT ships with several built-in workflows:
375
+ TAKT includes multiple builtin workflows:
283
376
 
284
377
  | Workflow | Description |
285
378
  |----------|-------------|
379
+ | `default` | Full development workflow: plan → architecture design → implement → AI review → parallel review (architect + security) → supervisor approval. Includes fix loops at each review stage. |
286
380
  | `minimal` | Quick workflow: plan → implement → review → supervisor. Minimal steps for fast iteration. |
287
- | `default` | Full development workflow: plan → implement → AI review → parallel reviewers (architect + security) → supervisor approval. Includes fix loops for each review stage. |
288
- | `review-fix-minimal` | Review-focused workflow: reviewfix → supervisor. For iterative improvements based on review feedback. |
289
- | `research` | Research workflow: planner digger supervisor. Autonomously researches topics without asking questions. |
290
- | `expert` | Sequential review with domain experts: Architecture, Frontend, Security, QA reviews with fix loops. |
291
- | `expert-cqrs` | Sequential review with domain experts: CQRS+ES, Frontend, Security, QA reviews with fix loops. |
381
+ | `review-fix-minimal` | Review-focused workflow: review → fix → supervisor. For iterative improvement based on review feedback. |
382
+ | `research` | Research workflow: plannerdigger → supervisor. Autonomously executes research without asking questions. |
383
+ | `expert` | Full-stack development workflow: architecture, frontend, security, QA reviews with fix loops. |
384
+ | `expert-cqrs` | Full-stack development workflow (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. |
292
385
  | `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
293
- | `review-only` | Read-only code review workflow without making any modifications. |
386
+ | `review-only` | Read-only code review workflow that makes no changes. |
294
387
 
295
- Switch between workflows with `takt switch`.
388
+ Use `takt switch` to switch workflows.
296
389
 
297
- ## Built-in Agents
390
+ ## Builtin Agents
298
391
 
299
392
  | Agent | Description |
300
393
  |-------|-------------|
301
- | **planner** | Task analysis, spec investigation, and implementation planning |
302
- | **coder** | Implements features and fixes bugs |
303
- | **ai-antipattern-reviewer** | Reviews for AI-specific anti-patterns (hallucinated APIs, incorrect assumptions, scope creep) |
304
- | **architecture-reviewer** | Reviews architecture and code quality, verifies spec compliance |
394
+ | **planner** | Task analysis, spec investigation, implementation planning |
395
+ | **coder** | Feature implementation, bug fixing |
396
+ | **ai-antipattern-reviewer** | AI-specific antipattern review (non-existent APIs, incorrect assumptions, scope creep) |
397
+ | **architecture-reviewer** | Architecture and code quality review, spec compliance verification |
305
398
  | **security-reviewer** | Security vulnerability assessment |
306
- | **supervisor** | Final verification, validation, and approval |
399
+ | **supervisor** | Final validation, approval |
307
400
 
308
401
  ## Custom Agents
309
402
 
310
- Define custom agents in `.takt/agents.yaml`:
311
-
312
- ```yaml
313
- agents:
314
- - name: my-reviewer
315
- prompt_file: .takt/prompts/reviewer.md
316
- allowed_tools: [Read, Glob, Grep]
317
- provider: claude # Optional: claude or codex
318
- model: opus # Claude: opus/sonnet/haiku or full name (claude-opus-4-5-20251101)
319
- ```
320
-
321
- Or create agent prompt files as Markdown:
403
+ Create agent prompts in Markdown files:
322
404
 
323
405
  ```markdown
324
406
  # ~/.takt/agents/my-agents/reviewer.md
325
407
 
326
- You are a code reviewer focused on security.
408
+ You are a code reviewer specialized in security.
327
409
 
328
- ## Your Role
410
+ ## Role
329
411
  - Check for security vulnerabilities
330
412
  - Verify input validation
331
413
  - Review authentication logic
@@ -333,33 +415,36 @@ You are a code reviewer focused on security.
333
415
 
334
416
  ## Model Selection
335
417
 
336
- The `model` field in workflow steps, agent configs, and global config is passed directly to the provider (Claude Code CLI or Codex SDK). TAKT does not resolve model aliases — the provider handles that.
418
+ The `model` field (in workflow movements, agent config, or global config) is passed directly to the provider (Claude Code CLI / Codex SDK). TAKT does not resolve model aliases.
337
419
 
338
420
  ### Claude Code
339
421
 
340
- Claude Code supports aliases (`opus`, `sonnet`, `haiku`, `opusplan`, `default`) and full model names (e.g., `claude-sonnet-4-5-20250929`). See [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code) for available models.
422
+ Claude Code supports aliases (`opus`, `sonnet`, `haiku`, `opusplan`, `default`) and full model names (e.g., `claude-sonnet-4-5-20250929`). Refer to the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code) for available models.
341
423
 
342
424
  ### Codex
343
425
 
344
- The model string is passed to the Codex SDK. Defaults to `codex` if not specified. See Codex documentation for available models.
426
+ The model string is passed to the Codex SDK. If unspecified, defaults to `codex`. Refer to Codex documentation for available models.
345
427
 
346
428
  ## Project Structure
347
429
 
348
430
  ```
349
- ~/.takt/
350
- ├── config.yaml # Global config (provider, model, workflows, etc.)
351
- ├── workflows/ # User workflow definitions (override builtins)
352
- └── agents/ # User agent prompt files
431
+ ~/.takt/ # Global configuration directory
432
+ ├── config.yaml # Global config (provider, model, workflow, etc.)
433
+ ├── workflows/ # User workflow definitions (override builtins)
434
+ └── custom.yaml
435
+ └── agents/ # User agent prompt files (.md)
436
+ └── my-agent.md
353
437
 
354
- .takt/ # Project-level config
355
- ├── agents.yaml # Custom agent definitions
356
- ├── tasks/ # Pending task files (.yaml, .md)
357
- ├── completed/ # Completed tasks with reports
358
- ├── reports/ # Execution reports (auto-generated)
359
- └── logs/ # Session logs in NDJSON format
360
- ├── latest.json # Pointer to current/latest session
361
- ├── previous.json # Pointer to previous session
362
- └── {sessionId}.jsonl # NDJSON session log per workflow run
438
+ .takt/ # Project-level configuration
439
+ ├── config.yaml # Project config (current workflow, etc.)
440
+ ├── tasks/ # Pending task files (.yaml, .md)
441
+ ├── completed/ # Completed tasks and reports
442
+ ├── reports/ # Execution reports (auto-generated)
443
+ └── {timestamp}-{slug}/
444
+ └── logs/ # NDJSON format session logs
445
+ ├── latest.json # Pointer to current/latest session
446
+ ├── previous.json # Pointer to previous session
447
+ └── {sessionId}.jsonl # NDJSON session log per workflow execution
363
448
  ```
364
449
 
365
450
  Builtin resources are embedded in the npm package (`dist/resources/`). User files in `~/.takt/` take priority.
@@ -375,11 +460,17 @@ default_workflow: default
375
460
  log_level: info
376
461
  provider: claude # Default provider: claude or codex
377
462
  model: sonnet # Default model (optional)
463
+
464
+ # API Key configuration (optional)
465
+ # Can be overridden by environment variables TAKT_ANTHROPIC_API_KEY / TAKT_OPENAI_API_KEY
466
+ anthropic_api_key: sk-ant-... # For Claude (Anthropic)
467
+ # openai_api_key: sk-... # For Codex (OpenAI)
468
+
378
469
  trusted_directories:
379
470
  - /path/to/trusted/dir
380
471
 
381
- # Pipeline execution settings (optional)
382
- # Customize branch naming, commit messages, and PR body for pipeline mode.
472
+ # Pipeline execution configuration (optional)
473
+ # Customize branch names, commit messages, and PR body.
383
474
  # pipeline:
384
475
  # default_branch_prefix: "takt/"
385
476
  # commit_message_template: "feat: {title} (#{issue})"
@@ -389,51 +480,110 @@ trusted_directories:
389
480
  # Closes #{issue}
390
481
  ```
391
482
 
392
- **Pipeline template variables:**
483
+ **API Key Configuration Methods:**
484
+
485
+ 1. **Set via environment variables**:
486
+ ```bash
487
+ export TAKT_ANTHROPIC_API_KEY=sk-ant-... # For Claude
488
+ # or
489
+ export TAKT_OPENAI_API_KEY=sk-... # For Codex
490
+ ```
491
+
492
+ 2. **Set in config file**:
493
+ Write `anthropic_api_key` or `openai_api_key` in `~/.takt/config.yaml` as shown above
494
+
495
+ Priority: Environment variables > `config.yaml` settings
393
496
 
394
- | Variable | Available in | Description |
497
+ **Notes:**
498
+ - If you set an API Key, installing Claude Code or Codex is not necessary. TAKT directly calls the Anthropic API or OpenAI API.
499
+ - **Security**: If you write API Keys in `config.yaml`, be careful not to commit this file to Git. Consider using environment variables or adding `~/.takt/config.yaml` to `.gitignore`.
500
+
501
+ **Pipeline Template Variables:**
502
+
503
+ | Variable | Available In | Description |
395
504
  |----------|-------------|-------------|
396
- | `{title}` | commit message | Issue title |
397
- | `{issue}` | commit message, PR body | Issue number |
398
- | `{issue_body}` | PR body | Issue body text |
505
+ | `{title}` | Commit message | Issue title |
506
+ | `{issue}` | Commit message, PR body | Issue number |
507
+ | `{issue_body}` | PR body | Issue body |
399
508
  | `{report}` | PR body | Workflow execution report |
400
509
 
401
510
  **Model Resolution Priority:**
402
- 1. Workflow step `model` (highest priority)
511
+ 1. Workflow movement `model` (highest priority)
403
512
  2. Custom agent `model`
404
513
  3. Global config `model`
405
- 4. Provider default (Claude: sonnet, Codex: gpt-5.2-codex)
514
+ 4. Provider default (Claude: sonnet, Codex: codex)
515
+
516
+ ## Detailed Guides
517
+
518
+ ### Task File Formats
519
+
520
+ TAKT supports batch processing with task files in `.takt/tasks/`. Both `.yaml`/`.yml` and `.md` file formats are supported.
521
+
522
+ **YAML format** (recommended, supports worktree/branch/workflow options):
523
+
524
+ ```yaml
525
+ # .takt/tasks/add-auth.yaml
526
+ task: "Add authentication feature"
527
+ worktree: true # Execute in isolated shared clone
528
+ branch: "feat/add-auth" # Branch name (auto-generated if omitted)
529
+ workflow: "default" # Workflow specification (uses current if omitted)
530
+ ```
531
+
532
+ **Markdown format** (simple, backward compatible):
533
+
534
+ ```markdown
535
+ # .takt/tasks/add-login-feature.md
536
+
537
+ Add login feature to the application.
538
+
539
+ Requirements:
540
+ - Username and password fields
541
+ - Form validation
542
+ - Error handling on failure
543
+ ```
406
544
 
545
+ #### Isolated Execution with Shared Clone
407
546
 
408
- ## Practical Usage Guide
547
+ Specifying `worktree` in YAML task files executes each task in an isolated clone created with `git clone --shared`, keeping your main working directory clean:
409
548
 
410
- ### Interactive Workflow
549
+ - `worktree: true` - Auto-create shared clone in adjacent directory (or location specified by `worktree_dir` config)
550
+ - `worktree: "/path/to/dir"` - Create at specified path
551
+ - `branch: "feat/xxx"` - Use specified branch (auto-generated as `takt/{timestamp}-{slug}` if omitted)
552
+ - Omit `worktree` - Execute in current directory (default)
411
553
 
412
- When running `takt` (interactive planning mode) or `takt #6` (GitHub issue), you are prompted to:
554
+ > **Note**: The YAML field name remains `worktree` for backward compatibility. Internally, it uses `git clone --shared` instead of `git worktree`. Git worktrees have a `.git` file containing `gitdir:` pointing to the main repository, which Claude Code follows to recognize the main repository as the project root. Shared clones have an independent `.git` directory, preventing this issue.
413
555
 
414
- 1. **Select a workflow** - Choose from available workflows (arrow keys, ESC to cancel)
415
- 2. **Create an isolated clone** (optional) - Run the task in a `git clone --shared` for isolation
416
- 3. **Create a pull request** (after worktree execution) - Create a PR from the task branch
556
+ Clones are ephemeral. After task completion, they auto-commit + push, then delete the clone. Branches are the only persistent artifacts. Use `takt list` to list, merge, or delete branches.
417
557
 
418
- If `--auto-pr` is specified, the PR confirmation is skipped and the PR is created automatically.
558
+ ### Session Logs
559
+
560
+ TAKT writes session logs in NDJSON (`.jsonl`) format to `.takt/logs/`. Each record is atomically appended, so partial logs are preserved even if the process crashes, and you can track in real-time with `tail -f`.
561
+
562
+ - `.takt/logs/latest.json` - Pointer to current (or latest) session
563
+ - `.takt/logs/previous.json` - Pointer to previous session
564
+ - `.takt/logs/{sessionId}.jsonl` - NDJSON session log per workflow execution
565
+
566
+ Record types: `workflow_start`, `step_start`, `step_complete`, `workflow_complete`, `workflow_abort`
567
+
568
+ Agents can read `previous.json` to inherit context from the previous execution. Session continuation is automatic — just run `takt "task"` to continue from the previous session.
419
569
 
420
570
  ### Adding Custom Workflows
421
571
 
422
- Create your own workflow by adding YAML files to `~/.takt/workflows/`, or use `/eject` to customize a builtin:
572
+ Add YAML files to `~/.takt/workflows/` or customize builtins with `takt eject`:
423
573
 
424
574
  ```bash
425
- # Copy the default workflow to ~/.takt/workflows/ for editing
575
+ # Copy default workflow to ~/.takt/workflows/ and edit
426
576
  takt eject default
427
577
  ```
428
578
 
429
579
  ```yaml
430
580
  # ~/.takt/workflows/my-workflow.yaml
431
581
  name: my-workflow
432
- description: My custom workflow
582
+ description: Custom workflow
433
583
  max_iterations: 5
434
- initial_step: analyze
584
+ initial_movement: analyze
435
585
 
436
- steps:
586
+ movements:
437
587
  - name: analyze
438
588
  agent: ~/.takt/agents/my-agents/analyzer.md
439
589
  edit: false
@@ -441,7 +591,7 @@ steps:
441
591
  - condition: Analysis complete
442
592
  next: implement
443
593
  instruction_template: |
444
- Analyze this request thoroughly.
594
+ Thoroughly analyze this request.
445
595
 
446
596
  - name: implement
447
597
  agent: ~/.takt/agents/default/coder.md
@@ -449,179 +599,80 @@ steps:
449
599
  permission_mode: edit
450
600
  pass_previous_response: true
451
601
  rules:
452
- - condition: Done
602
+ - condition: Complete
453
603
  next: COMPLETE
454
604
  instruction_template: |
455
605
  Implement based on the analysis.
456
606
  ```
457
607
 
458
- > **Note**: `{task}`, `{previous_response}`, and `{user_inputs}` are auto-injected into instructions. You only need explicit placeholders if you want to control their position in the template.
608
+ > **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.
459
609
 
460
610
  ### Specifying Agents by Path
461
611
 
462
- Agents are specified using file paths in workflow definitions:
612
+ In workflow definitions, specify agents using file paths:
463
613
 
464
614
  ```yaml
465
- # Relative to workflow file directory
615
+ # Relative path from workflow file
466
616
  agent: ../agents/default/coder.md
467
617
 
468
618
  # Home directory
469
619
  agent: ~/.takt/agents/default/coder.md
470
620
 
471
- # Absolute paths
621
+ # Absolute path
472
622
  agent: /path/to/custom/agent.md
473
623
  ```
474
624
 
475
- ### Task Management
476
-
477
- TAKT supports batch task processing through task files in `.takt/tasks/`. Both `.yaml`/`.yml` and `.md` file formats are supported.
478
-
479
- #### Adding Tasks with `takt add`
480
-
481
- ```bash
482
- # Start AI conversation to define and add a task
483
- takt add
484
-
485
- # Add task from GitHub issue (issue number reflected in branch name)
486
- takt add #28
487
- ```
488
-
489
- The `takt add` command starts an AI conversation where you discuss and refine your task requirements. After confirming with `/go`, the AI summarizes the conversation and creates a YAML task file with optional worktree/branch/workflow settings. When using `takt add #N`, the issue number is automatically reflected in the branch name (e.g., `takt/issue-28-...`).
490
-
491
- #### Task File Formats
492
-
493
- **YAML format** (recommended, supports worktree/branch/workflow options):
494
-
495
- ```yaml
496
- # .takt/tasks/add-auth.yaml
497
- task: "Add authentication feature"
498
- worktree: true # Run in isolated shared clone
499
- branch: "feat/add-auth" # Branch name (auto-generated if omitted)
500
- workflow: "default" # Workflow override (uses current if omitted)
501
- ```
502
-
503
- **Markdown format** (simple, backward compatible):
504
-
505
- ```markdown
506
- # .takt/tasks/add-login-feature.md
507
-
508
- Add a login feature to the application.
509
-
510
- Requirements:
511
- - Username and password fields
512
- - Form validation
513
- - Error handling for failed attempts
514
- ```
515
-
516
- #### Isolated Execution (Shared Clone)
517
-
518
- YAML task files can specify `worktree` to run each task in an isolated `git clone --shared`, keeping the main working directory clean:
519
-
520
- - `worktree: true` - Auto-create a shared clone in a sibling directory (or `worktree_dir` from config)
521
- - `worktree: "/path/to/dir"` - Create at specified path
522
- - `branch: "feat/xxx"` - Use specified branch (auto-generated as `takt/{timestamp}-{slug}` if omitted)
523
- - Omit `worktree` - Run in current working directory (default)
524
-
525
- > **Note**: The YAML field is named `worktree` for backward compatibility. Internally, `git clone --shared` is used instead of `git worktree` because git worktrees have a `.git` file with `gitdir:` that points back to the main repository, causing Claude Code to recognize the main repo as the project root. Shared clones have an independent `.git` directory that avoids this issue.
526
-
527
- Clones are ephemeral. When a task completes successfully, TAKT automatically commits all changes and pushes the branch to the main repository, then deletes the clone. Use `takt list` to list, try-merge, or delete task branches.
528
-
529
- #### Running Tasks with `/run-tasks`
530
-
531
- ```bash
532
- takt run
533
- ```
534
-
535
- - Tasks are executed in alphabetical order (use prefixes like `001-`, `002-` for ordering)
536
- - Completed tasks are moved to `.takt/completed/` with execution reports
537
- - New tasks added during execution will be picked up dynamically
538
-
539
- #### Watching Tasks with `/watch`
540
-
541
- ```bash
542
- takt watch
543
- ```
544
-
545
- Watch mode polls `.takt/tasks/` for new task files and auto-executes them as they appear. The process stays resident until `Ctrl+C`. This is useful for:
546
- - CI/CD pipelines that generate task files
547
- - Automated workflows where tasks are added by external processes
548
- - Long-running development sessions where tasks are queued over time
549
-
550
- #### Listing Task Branches with `/list-tasks`
551
-
552
- ```bash
553
- takt list
554
- ```
555
-
556
- Lists all `takt/`-prefixed branches with file change counts. For each branch you can:
557
- - **Try merge** - Squash merge into main (stage changes without committing)
558
- - **Instruct** - Give additional instructions via a temporary clone
559
- - **Merge & cleanup** - Merge and delete the branch
560
- - **Delete** - Delete the branch without merging
561
-
562
- ### Session Logs
563
-
564
- TAKT writes session logs in NDJSON (`.jsonl`) format to `.takt/logs/`. Each record is appended atomically, so even if the process crashes mid-execution, partial logs are preserved and logs can be tailed in real-time with `tail -f`.
565
-
566
- - `.takt/logs/latest.json` - Pointer to the current (or most recent) session
567
- - `.takt/logs/previous.json` - Pointer to the previous session
568
- - `.takt/logs/{sessionId}.jsonl` - NDJSON session log with step history
569
-
570
- Record types: `workflow_start`, `step_start`, `step_complete`, `workflow_complete`, `workflow_abort`.
571
-
572
- Agents can read `previous.json` to pick up context from a prior run. Session continuity is automatic — simply run `takt "task"` to continue where the previous session left off.
573
-
574
625
  ### Workflow Variables
575
626
 
576
- Available variables in `instruction_template`:
627
+ Variables available in `instruction_template`:
577
628
 
578
629
  | Variable | Description |
579
630
  |----------|-------------|
580
631
  | `{task}` | Original user request (auto-injected if not in template) |
581
632
  | `{iteration}` | Workflow-wide turn count (total steps executed) |
582
- | `{max_iterations}` | Maximum iterations allowed |
583
- | `{step_iteration}` | Per-step iteration count (how many times THIS step has run) |
584
- | `{previous_response}` | Previous step's output (auto-injected if not in template) |
633
+ | `{max_iterations}` | Maximum iteration count |
634
+ | `{movement_iteration}` | Per-movement iteration count (times this movement has been executed) |
635
+ | `{previous_response}` | Output from previous movement (auto-injected if not in template) |
585
636
  | `{user_inputs}` | Additional user inputs during workflow (auto-injected if not in template) |
586
637
  | `{report_dir}` | Report directory path (e.g., `.takt/reports/20250126-143052-task-summary`) |
587
- | `{report:filename}` | Resolves to `{report_dir}/filename` (e.g., `{report:00-plan.md}`) |
638
+ | `{report:filename}` | Expands to `{report_dir}/filename` (e.g., `{report:00-plan.md}`) |
588
639
 
589
- ### Designing Workflows
640
+ ### Workflow Design
590
641
 
591
- Each workflow step requires:
642
+ Elements needed for each workflow movement:
592
643
 
593
- **1. Agent** - A Markdown file containing the system prompt:
644
+ **1. Agent** - Markdown file containing system prompt:
594
645
 
595
646
  ```yaml
596
647
  agent: ../agents/default/coder.md # Path to agent prompt file
597
648
  agent_name: coder # Display name (optional)
598
649
  ```
599
650
 
600
- **2. Rules** - Define how the step routes to the next step. The instruction builder auto-injects status output rules so agents know what tags to output:
651
+ **2. Rules** - Define routing from movement to next movement. The instruction builder auto-injects status output rules, so agents know which tags to output:
601
652
 
602
653
  ```yaml
603
654
  rules:
604
655
  - condition: "Implementation complete"
605
656
  next: review
606
- - condition: "Cannot proceed"
657
+ - condition: "Blocked"
607
658
  next: ABORT
608
659
  ```
609
660
 
610
- Special `next` values: `COMPLETE` (success), `ABORT` (failure).
661
+ Special `next` values: `COMPLETE` (success), `ABORT` (failure)
611
662
 
612
- **3. Step options:**
663
+ **3. Movement Options:**
613
664
 
614
665
  | Option | Default | Description |
615
666
  |--------|---------|-------------|
616
- | `edit` | - | Whether the step can edit project files (`true`/`false`) |
617
- | `pass_previous_response` | `true` | Pass previous step's output to `{previous_response}` |
618
- | `allowed_tools` | - | List of tools the agent can use (Read, Glob, Grep, Edit, Write, Bash, etc.) |
619
- | `provider` | - | Override provider for this step (`claude` or `codex`) |
620
- | `model` | - | Override model for this step |
621
- | `permission_mode` | - | Permission mode: `readonly`, `edit`, or `full` (provider-independent) |
622
- | `report` | - | Report file configuration (name, format) for auto-generated reports |
667
+ | `edit` | - | Whether movement can edit project files (`true`/`false`) |
668
+ | `pass_previous_response` | `true` | Pass previous movement output to `{previous_response}` |
669
+ | `allowed_tools` | - | List of tools agent can use (Read, Glob, Grep, Edit, Write, Bash, etc.) |
670
+ | `provider` | - | Override provider for this movement (`claude` or `codex`) |
671
+ | `model` | - | Override model for this movement |
672
+ | `permission_mode` | - | Permission mode: `readonly`, `edit`, `full` (provider-independent) |
673
+ | `report` | - | Auto-generated report file settings (name, format) |
623
674
 
624
- ## API Usage
675
+ ## API Usage Example
625
676
 
626
677
  ```typescript
627
678
  import { WorkflowEngine, loadWorkflow } from 'takt'; // npm install takt
@@ -641,15 +692,15 @@ await engine.run();
641
692
 
642
693
  ## Contributing
643
694
 
644
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
695
+ See [CONTRIBUTING.md](../CONTRIBUTING.md) for details.
645
696
 
646
697
  ## CI/CD Integration
647
698
 
648
699
  ### GitHub Actions
649
700
 
650
- TAKT provides a GitHub Action for automated PR reviews and task execution. See [takt-action](https://github.com/nrslib/takt-action) for details.
701
+ TAKT provides a GitHub Action for automating PR reviews and task execution. See [takt-action](https://github.com/nrslib/takt-action) for details.
651
702
 
652
- **Example workflow** (see [.github/workflows/takt-action.yml](.github/workflows/takt-action.yml) in this repository):
703
+ **Workflow example** (see [.github/workflows/takt-action.yml](../.github/workflows/takt-action.yml) in this repository):
653
704
 
654
705
  ```yaml
655
706
  name: TAKT
@@ -678,50 +729,38 @@ jobs:
678
729
  github_token: ${{ secrets.GITHUB_TOKEN }}
679
730
  ```
680
731
 
681
- **Cost Warning**: TAKT uses AI APIs (Claude or OpenAI) which can incur significant costs, especially in CI/CD environments where tasks run automatically. Monitor your API usage and set billing alerts.
732
+ **Cost Warning**: TAKT uses AI APIs (Claude or OpenAI), which can incur significant costs, especially when tasks are auto-executed in CI/CD environments. Monitor API usage and set up billing alerts.
682
733
 
683
734
  ### Other CI Systems
684
735
 
685
- For non-GitHub CI systems, use pipeline mode:
736
+ For CI systems other than GitHub, use pipeline mode:
686
737
 
687
738
  ```bash
688
739
  # Install takt
689
740
  npm install -g takt
690
741
 
691
742
  # Run in pipeline mode
692
- takt --pipeline --task "fix bug" --auto-pr --repo owner/repo
743
+ takt --pipeline --task "Fix bug" --auto-pr --repo owner/repo
693
744
  ```
694
745
 
695
- Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` environment variables for authentication.
696
-
697
- ## Docker Support
698
-
699
- Docker environment is provided for testing in other environments:
746
+ For authentication, set `TAKT_ANTHROPIC_API_KEY` or `TAKT_OPENAI_API_KEY` environment variables (TAKT-specific prefix).
700
747
 
701
748
  ```bash
702
- # Build Docker images
703
- docker compose build
704
-
705
- # Run tests in container
706
- docker compose run --rm test
749
+ # For Claude (Anthropic)
750
+ export TAKT_ANTHROPIC_API_KEY=sk-ant-...
707
751
 
708
- # Run lint in container
709
- docker compose run --rm lint
710
-
711
- # Build only (skip tests)
712
- docker compose run --rm build
752
+ # For Codex (OpenAI)
753
+ export TAKT_OPENAI_API_KEY=sk-...
713
754
  ```
714
755
 
715
- This ensures the project works correctly in a clean Node.js 20 environment.
716
-
717
756
  ## Documentation
718
757
 
719
- - [Workflow Guide](./docs/workflows.md) - Create and customize workflows
720
- - [Agent Guide](./docs/agents.md) - Configure custom agents
721
- - [Changelog](./CHANGELOG.md) - Version history
722
- - [Security Policy](./SECURITY.md) - Vulnerability reporting
758
+ - [Workflow Guide](./docs/workflows.md) - Creating and customizing workflows
759
+ - [Agent Guide](./docs/agents.md) - Configuring custom agents
760
+ - [Changelog](../CHANGELOG.md) - Version history
761
+ - [Security Policy](../SECURITY.md) - Vulnerability reporting
723
762
  - [Blog: TAKT - AI Agent Orchestration](https://zenn.dev/nrs/articles/c6842288a526d7) - Design philosophy and practical usage guide (Japanese)
724
763
 
725
764
  ## License
726
765
 
727
- MIT - See [LICENSE](./LICENSE) for details.
766
+ MIT - See [LICENSE](../LICENSE) for details.