takt 0.2.2 → 0.3.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 (210) hide show
  1. package/README.md +223 -166
  2. package/dist/agents/runner.d.ts +2 -4
  3. package/dist/agents/runner.d.ts.map +1 -1
  4. package/dist/agents/runner.js +6 -35
  5. package/dist/agents/runner.js.map +1 -1
  6. package/dist/claude/client.d.ts +31 -6
  7. package/dist/claude/client.d.ts.map +1 -1
  8. package/dist/claude/client.js +78 -30
  9. package/dist/claude/client.js.map +1 -1
  10. package/dist/claude/index.d.ts +1 -1
  11. package/dist/claude/index.d.ts.map +1 -1
  12. package/dist/claude/index.js +1 -1
  13. package/dist/claude/index.js.map +1 -1
  14. package/dist/cli.d.ts +4 -3
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +41 -20
  17. package/dist/cli.js.map +1 -1
  18. package/dist/codex/client.d.ts +0 -1
  19. package/dist/codex/client.d.ts.map +1 -1
  20. package/dist/codex/client.js +3 -6
  21. package/dist/codex/client.js.map +1 -1
  22. package/dist/commands/addTask.d.ts.map +1 -1
  23. package/dist/commands/addTask.js +23 -7
  24. package/dist/commands/addTask.js.map +1 -1
  25. package/dist/commands/eject.d.ts +13 -0
  26. package/dist/commands/eject.d.ts.map +1 -0
  27. package/dist/commands/eject.js +105 -0
  28. package/dist/commands/eject.js.map +1 -0
  29. package/dist/commands/help.d.ts.map +1 -1
  30. package/dist/commands/help.js +12 -5
  31. package/dist/commands/help.js.map +1 -1
  32. package/dist/commands/index.d.ts +2 -1
  33. package/dist/commands/index.d.ts.map +1 -1
  34. package/dist/commands/index.js +2 -1
  35. package/dist/commands/index.js.map +1 -1
  36. package/dist/commands/listTasks.d.ts +45 -0
  37. package/dist/commands/listTasks.d.ts.map +1 -0
  38. package/dist/commands/{reviewTasks.js → listTasks.js} +93 -73
  39. package/dist/commands/listTasks.js.map +1 -0
  40. package/dist/commands/refreshBuiltin.d.ts +4 -4
  41. package/dist/commands/refreshBuiltin.d.ts.map +1 -1
  42. package/dist/commands/refreshBuiltin.js +13 -29
  43. package/dist/commands/refreshBuiltin.js.map +1 -1
  44. package/dist/commands/taskExecution.d.ts +7 -5
  45. package/dist/commands/taskExecution.d.ts.map +1 -1
  46. package/dist/commands/taskExecution.js +21 -14
  47. package/dist/commands/taskExecution.js.map +1 -1
  48. package/dist/commands/workflowExecution.d.ts.map +1 -1
  49. package/dist/commands/workflowExecution.js +88 -21
  50. package/dist/commands/workflowExecution.js.map +1 -1
  51. package/dist/config/agentLoader.d.ts +3 -1
  52. package/dist/config/agentLoader.d.ts.map +1 -1
  53. package/dist/config/agentLoader.js +17 -24
  54. package/dist/config/agentLoader.js.map +1 -1
  55. package/dist/config/globalConfig.d.ts +2 -0
  56. package/dist/config/globalConfig.d.ts.map +1 -1
  57. package/dist/config/globalConfig.js +18 -0
  58. package/dist/config/globalConfig.js.map +1 -1
  59. package/dist/config/initialization.d.ts +7 -5
  60. package/dist/config/initialization.d.ts.map +1 -1
  61. package/dist/config/initialization.js +23 -21
  62. package/dist/config/initialization.js.map +1 -1
  63. package/dist/config/paths.d.ts +5 -0
  64. package/dist/config/paths.d.ts.map +1 -1
  65. package/dist/config/paths.js +9 -0
  66. package/dist/config/paths.js.map +1 -1
  67. package/dist/config/workflowLoader.d.ts +6 -4
  68. package/dist/config/workflowLoader.d.ts.map +1 -1
  69. package/dist/config/workflowLoader.js +190 -35
  70. package/dist/config/workflowLoader.js.map +1 -1
  71. package/dist/github/issue.d.ts +72 -0
  72. package/dist/github/issue.d.ts.map +1 -0
  73. package/dist/github/issue.js +143 -0
  74. package/dist/github/issue.js.map +1 -0
  75. package/dist/models/index.d.ts +1 -1
  76. package/dist/models/index.d.ts.map +1 -1
  77. package/dist/models/index.js.map +1 -1
  78. package/dist/models/schemas.d.ts +165 -90
  79. package/dist/models/schemas.d.ts.map +1 -1
  80. package/dist/models/schemas.js +79 -51
  81. package/dist/models/schemas.js.map +1 -1
  82. package/dist/models/types.d.ts +53 -20
  83. package/dist/models/types.d.ts.map +1 -1
  84. package/dist/providers/claude.js +2 -2
  85. package/dist/providers/claude.js.map +1 -1
  86. package/dist/providers/codex.d.ts.map +1 -1
  87. package/dist/providers/codex.js +0 -2
  88. package/dist/providers/codex.js.map +1 -1
  89. package/dist/providers/index.d.ts +2 -1
  90. package/dist/providers/index.d.ts.map +1 -1
  91. package/dist/providers/index.js.map +1 -1
  92. package/dist/resources/index.d.ts +3 -22
  93. package/dist/resources/index.d.ts.map +1 -1
  94. package/dist/resources/index.js +9 -76
  95. package/dist/resources/index.js.map +1 -1
  96. package/dist/task/autoCommit.d.ts +9 -6
  97. package/dist/task/autoCommit.d.ts.map +1 -1
  98. package/dist/task/autoCommit.js +21 -12
  99. package/dist/task/autoCommit.js.map +1 -1
  100. package/dist/task/branchList.d.ts +55 -0
  101. package/dist/task/branchList.d.ts.map +1 -0
  102. package/dist/task/branchList.js +131 -0
  103. package/dist/task/branchList.js.map +1 -0
  104. package/dist/task/clone.d.ts +53 -0
  105. package/dist/task/clone.d.ts.map +1 -0
  106. package/dist/task/clone.js +181 -0
  107. package/dist/task/clone.js.map +1 -0
  108. package/dist/task/index.d.ts +3 -2
  109. package/dist/task/index.d.ts.map +1 -1
  110. package/dist/task/index.js +3 -2
  111. package/dist/task/index.js.map +1 -1
  112. package/dist/task/schema.d.ts +4 -4
  113. package/dist/task/schema.js +4 -4
  114. package/dist/task/summarize.d.ts +7 -5
  115. package/dist/task/summarize.d.ts.map +1 -1
  116. package/dist/task/summarize.js +62 -29
  117. package/dist/task/summarize.js.map +1 -1
  118. package/dist/utils/session.d.ts +74 -10
  119. package/dist/utils/session.d.ts.map +1 -1
  120. package/dist/utils/session.js +101 -51
  121. package/dist/utils/session.js.map +1 -1
  122. package/dist/utils/updateNotifier.d.ts +6 -0
  123. package/dist/utils/updateNotifier.d.ts.map +1 -0
  124. package/dist/utils/updateNotifier.js +17 -0
  125. package/dist/utils/updateNotifier.js.map +1 -0
  126. package/dist/workflow/engine.d.ts +35 -2
  127. package/dist/workflow/engine.d.ts.map +1 -1
  128. package/dist/workflow/engine.js +238 -38
  129. package/dist/workflow/engine.js.map +1 -1
  130. package/dist/workflow/index.d.ts +1 -1
  131. package/dist/workflow/index.d.ts.map +1 -1
  132. package/dist/workflow/index.js +1 -1
  133. package/dist/workflow/index.js.map +1 -1
  134. package/dist/workflow/instruction-builder.d.ts +89 -20
  135. package/dist/workflow/instruction-builder.d.ts.map +1 -1
  136. package/dist/workflow/instruction-builder.js +404 -61
  137. package/dist/workflow/instruction-builder.js.map +1 -1
  138. package/dist/workflow/parallel-logger.d.ts +76 -0
  139. package/dist/workflow/parallel-logger.d.ts.map +1 -0
  140. package/dist/workflow/parallel-logger.js +173 -0
  141. package/dist/workflow/parallel-logger.js.map +1 -0
  142. package/dist/workflow/phase-runner.d.ts +40 -0
  143. package/dist/workflow/phase-runner.d.ts.map +1 -0
  144. package/dist/workflow/phase-runner.js +69 -0
  145. package/dist/workflow/phase-runner.js.map +1 -0
  146. package/dist/workflow/rule-evaluator.d.ts +64 -0
  147. package/dist/workflow/rule-evaluator.d.ts.map +1 -0
  148. package/dist/workflow/rule-evaluator.js +178 -0
  149. package/dist/workflow/rule-evaluator.js.map +1 -0
  150. package/dist/workflow/rule-utils.d.ts +13 -0
  151. package/dist/workflow/rule-utils.d.ts.map +1 -0
  152. package/dist/workflow/rule-utils.js +17 -0
  153. package/dist/workflow/rule-utils.js.map +1 -0
  154. package/dist/workflow/transitions.d.ts +5 -13
  155. package/dist/workflow/transitions.d.ts.map +1 -1
  156. package/dist/workflow/transitions.js +8 -78
  157. package/dist/workflow/transitions.js.map +1 -1
  158. package/dist/workflow/types.d.ts +2 -1
  159. package/dist/workflow/types.d.ts.map +1 -1
  160. package/package.json +4 -1
  161. package/resources/global/en/agents/default/ai-antipattern-reviewer.md +193 -0
  162. package/resources/global/en/agents/default/{architect.md → architecture-reviewer.md} +144 -44
  163. package/resources/global/en/agents/default/coder.md +7 -7
  164. package/resources/global/en/agents/default/planner.md +29 -9
  165. package/resources/global/en/agents/default/{security.md → security-reviewer.md} +23 -5
  166. package/resources/global/en/agents/default/supervisor.md +13 -2
  167. package/resources/global/en/agents/expert/frontend-reviewer.md +0 -17
  168. package/resources/global/en/agents/expert/qa-reviewer.md +0 -16
  169. package/resources/global/en/agents/expert/security-reviewer.md +0 -16
  170. package/resources/global/en/agents/expert-cqrs/cqrs-es-reviewer.md +0 -17
  171. package/resources/global/en/agents/templates/coder.md +128 -0
  172. package/resources/global/en/agents/templates/planner.md +44 -0
  173. package/resources/global/en/agents/templates/reviewer.md +57 -0
  174. package/resources/global/en/agents/templates/supervisor.md +64 -0
  175. package/resources/global/en/workflows/default.yaml +235 -770
  176. package/resources/global/en/workflows/expert-cqrs.yaml +325 -697
  177. package/resources/global/en/workflows/expert.yaml +354 -722
  178. package/resources/global/en/workflows/magi.yaml +45 -52
  179. package/resources/global/en/workflows/research.yaml +18 -99
  180. package/resources/global/en/workflows/simple.yaml +156 -421
  181. package/resources/global/ja/agents/default/{ai-reviewer.md → ai-antipattern-reviewer.md} +92 -15
  182. package/resources/global/ja/agents/default/{architect.md → architecture-reviewer.md} +148 -48
  183. package/resources/global/ja/agents/default/coder.md +7 -7
  184. package/resources/global/ja/agents/default/planner.md +29 -9
  185. package/resources/global/ja/agents/default/{security.md → security-reviewer.md} +23 -5
  186. package/resources/global/ja/agents/default/supervisor.md +13 -2
  187. package/resources/global/ja/agents/expert/frontend-reviewer.md +0 -18
  188. package/resources/global/ja/agents/expert/qa-reviewer.md +0 -16
  189. package/resources/global/ja/agents/expert/security-reviewer.md +0 -16
  190. package/resources/global/ja/agents/expert-cqrs/cqrs-es-reviewer.md +0 -18
  191. package/resources/global/ja/agents/templates/coder.md +128 -0
  192. package/resources/global/ja/agents/templates/planner.md +44 -0
  193. package/resources/global/ja/agents/templates/reviewer.md +57 -0
  194. package/resources/global/ja/agents/templates/supervisor.md +64 -0
  195. package/resources/global/ja/workflows/default.yaml +230 -771
  196. package/resources/global/ja/workflows/expert-cqrs.yaml +316 -832
  197. package/resources/global/ja/workflows/expert.yaml +331 -711
  198. package/resources/global/ja/workflows/magi.yaml +45 -52
  199. package/resources/global/ja/workflows/research.yaml +18 -99
  200. package/resources/global/ja/workflows/simple.yaml +149 -415
  201. package/resources/project/dotgitignore +10 -0
  202. package/resources/project/tasks/TASK-FORMAT +37 -0
  203. package/dist/commands/reviewTasks.d.ts +0 -43
  204. package/dist/commands/reviewTasks.d.ts.map +0 -1
  205. package/dist/commands/reviewTasks.js.map +0 -1
  206. package/dist/task/worktree.d.ts +0 -70
  207. package/dist/task/worktree.d.ts.map +0 -1
  208. package/dist/task/worktree.js +0 -221
  209. package/dist/task/worktree.js.map +0 -1
  210. package/resources/global/en/agents/default/ai-reviewer.md +0 -116
@@ -2,28 +2,39 @@
2
2
  # Review workflow with Architecture, Frontend, Security, and QA experts
3
3
  #
4
4
  # Flow:
5
- # plan -> implement -> architect_review -> frontend_review -> ai_review -> security_review -> qa_review -> supervise -> COMPLETE
6
- # ↓ ↓ ↓ ↓
7
- # fix_architect fix_frontend ai_fix fix_security fix_qa fix_supervisor
5
+ # plan -> implement -> ai_review -> architect_review -> frontend_review -> security_review -> qa_review -> supervise -> COMPLETE
6
+ # ↓ ↓ ↓ ↓
7
+ # ai_fix fix_architect fix_frontend fix_security fix_qa fix_supervisor
8
+ #
9
+ # AI review runs immediately after implementation to catch AI-specific issues early,
10
+ # before expert reviews begin.
8
11
  #
9
12
  # Fix destination is determined by Coder based on change impact:
10
- # - fix_security: MINORsecurity_review, MAJORarchitect_review
11
- # - fix_qa: MINORqa_review, SECURITYsecurity_review, MAJORarchitect_review
13
+ # - fix_security: MINOR->security_review, MAJOR->architect_review
14
+ # - fix_qa: MINOR->qa_review, SECURITY->security_review, MAJOR->architect_review
15
+ #
16
+ # Boilerplate sections (Workflow Context, User Request, Previous Response,
17
+ # Additional User Inputs, Instructions heading) are auto-injected by buildInstruction().
18
+ # Only step-specific content belongs in instruction_template.
12
19
  #
13
- # Template Variables:
14
- # {iteration} - Workflow-wide turn count (total steps executed across all agents)
15
- # {max_iterations} - Maximum iterations allowed for the workflow
16
- # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
17
- # {task} - Original user request
18
- # {previous_response} - Output from the previous step
19
- # {git_diff} - Current uncommitted changes (git diff)
20
- # {user_inputs} - Accumulated user inputs during workflow
21
- # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
20
+ # Template Variables (available in instruction_template):
21
+ # {iteration} - Workflow-wide turn count (total steps executed across all agents)
22
+ # {max_iterations} - Maximum iterations allowed for the workflow
23
+ # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
24
+ # {previous_response} - Output from the previous step (only when pass_previous_response: true)
25
+ # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
26
+ #
27
+ # Step-level Fields:
28
+ # report: - Report file(s) for the step (auto-injected as Report File/Files in Workflow Context)
29
+ # Single: report: 00-plan.md
30
+ # Multiple: report:
31
+ # - Scope: 01-coder-scope.md
32
+ # - Decisions: 02-coder-decisions.md
22
33
 
23
34
  name: expert
24
35
  description: Architecture, Frontend, Security, QA Expert Review
25
36
 
26
- max_iterations: 20
37
+ max_iterations: 30
27
38
 
28
39
  initial_step: plan
29
40
 
@@ -32,38 +43,43 @@ steps:
32
43
  # Phase 0: Planning
33
44
  # ===========================================
34
45
  - name: plan
35
- agent: ~/.takt/agents/default/planner.md
46
+ edit: false
47
+ agent: ../agents/default/planner.md
48
+ report:
49
+ name: 00-plan.md
50
+ format: |
51
+ ```markdown
52
+ # Task Plan
53
+
54
+ ## Original Request
55
+ {User's request as-is}
56
+
57
+ ## Analysis Results
58
+
59
+ ### Objective
60
+ {What needs to be achieved}
61
+
62
+ ### Scope
63
+ {Impact scope}
64
+
65
+ ### Implementation Approach
66
+ {How to proceed}
67
+
68
+ ## Clarifications Needed (if any)
69
+ - {Unclear points or items requiring confirmation}
70
+ ```
36
71
  allowed_tools:
37
72
  - Read
38
73
  - Glob
39
74
  - Grep
75
+ - Write
40
76
  - Bash
41
77
  - WebSearch
42
78
  - WebFetch
43
- status_rules_prompt: |
44
-
45
-
46
- ## Output Format
47
-
48
- | Situation | Tag |
49
- |-----------|-----|
50
- | Analysis complete | `[PLANNER:DONE]` |
51
- | Requirements unclear | `[PLANNER:BLOCKED]` |
52
79
  instruction_template: |
53
- ## Workflow Context
54
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
55
- - Step Iteration: {step_iteration} (times this step has run)
56
- - Step: plan (Task Analysis)
57
- - Report Directory: .takt/reports/{report_dir}/
58
- - Report File: .takt/reports/{report_dir}/00-plan.md
59
-
60
- ## User Request
61
- {task}
62
-
63
80
  ## Previous Response (when returned from implement)
64
81
  {previous_response}
65
82
 
66
- ## Instructions
67
83
  Analyze the task and create an implementation plan.
68
84
 
69
85
  **Note:** If returned from implement step (Previous Response exists),
@@ -73,47 +89,22 @@ steps:
73
89
  1. Understand the requirements
74
90
  2. Identify impact scope
75
91
  3. Decide implementation approach
76
-
77
- **Report output:** Output to the `Report File` specified above.
78
- - If file does not exist: Create new file
79
- - If file exists: Append with `## Iteration {step_iteration}` section
80
-
81
- **Report format:**
82
- ```markdown
83
- # Task Plan
84
-
85
- ## Original Request
86
- {User's request as-is}
87
-
88
- ## Analysis Results
89
-
90
- ### Objective
91
- {What needs to be achieved}
92
-
93
- ### Scope
94
- {Impact scope}
95
-
96
- ### Implementation Approach
97
- {How to proceed}
98
-
99
- ## Clarifications Needed (if any)
100
- - {Unclear points or items requiring confirmation}
101
- ```
102
-
103
- Output [PLANNER:DONE] when complete.
104
- Output [PLANNER:BLOCKED] if requirements are unclear.
105
92
  pass_previous_response: true
106
- transitions:
107
- - condition: done
108
- next_step: implement
109
- - condition: blocked
110
- next_step: ABORT
93
+ rules:
94
+ - condition: Task analysis and planning is complete
95
+ next: implement
96
+ - condition: Requirements are unclear and planning cannot proceed
97
+ next: ABORT
111
98
 
112
99
  # ===========================================
113
100
  # Phase 1: Implementation
114
101
  # ===========================================
115
102
  - name: implement
116
- agent: ~/.takt/agents/default/coder.md
103
+ edit: true
104
+ agent: ../agents/default/coder.md
105
+ report:
106
+ - Scope: 01-coder-scope.md
107
+ - Decisions: 02-coder-decisions.md
117
108
  allowed_tools:
118
109
  - Read
119
110
  - Glob
@@ -123,39 +114,10 @@ steps:
123
114
  - Bash
124
115
  - WebSearch
125
116
  - WebFetch
126
- status_rules_prompt: |
127
-
128
-
129
- ## Output Format
130
-
131
- | Situation | Tag |
132
- |-----------|-----|
133
- | Implementation complete | `[CODER:DONE]` |
134
- | Cannot proceed | `[CODER:BLOCKED]` |
135
117
  instruction_template: |
136
- ## Workflow Context
137
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
138
- - Step Iteration: {step_iteration} (times this step has run)
139
- - Step: implement
140
- - Report Directory: .takt/reports/{report_dir}/
141
- - Report Files:
142
- - Scope: .takt/reports/{report_dir}/01-coder-scope.md
143
- - Decisions: .takt/reports/{report_dir}/02-coder-decisions.md
144
-
145
- ## User Request
146
- {task}
147
-
148
- ## Additional User Inputs
149
- {user_inputs}
150
-
151
- ## Instructions
152
118
  Follow the plan from the plan step and implement.
153
119
  Refer to the plan report (00-plan.md) and proceed with implementation.
154
120
 
155
- **Report output:** Output to the `Report Files` specified above.
156
- - If file does not exist: Create new file
157
- - If file exists: Append with `## Iteration {step_iteration}` section
158
-
159
121
  **Scope report format (create at implementation start):**
160
122
  ```markdown
161
123
  # Change Scope Declaration
@@ -185,64 +147,140 @@ steps:
185
147
  - **Options Considered**: {List of options}
186
148
  - **Reason**: {Why this option was chosen}
187
149
  ```
188
-
189
- Include [CODER:DONE] when complete.
190
- Include [CODER:BLOCKED] if you cannot proceed (returns to plan).
191
- transitions:
192
- - condition: done
193
- next_step: architect_review
194
- - condition: blocked
195
- next_step: plan
150
+ rules:
151
+ - condition: Implementation is complete
152
+ next: ai_review
153
+ - condition: Cannot proceed with implementation
154
+ next: plan
196
155
 
197
156
  # ===========================================
198
- # Phase 2: Architecture Review
157
+ # Phase 2: AI Review
199
158
  # ===========================================
200
- - name: architect_review
201
- agent: ~/.takt/agents/default/architect.md
159
+ - name: ai_review
160
+ edit: false
161
+ agent: ../agents/default/ai-antipattern-reviewer.md
162
+ report:
163
+ name: 03-ai-review.md
164
+ format: |
165
+ ```markdown
166
+ # AI-Generated Code Review
167
+
168
+ ## Result: APPROVE / REJECT
169
+
170
+ ## Summary
171
+ {One sentence summarizing result}
172
+
173
+ ## Verified Items
174
+ | Aspect | Result | Notes |
175
+ |--------|--------|-------|
176
+ | Assumption validity | ✅ | - |
177
+ | API/Library existence | ✅ | - |
178
+ | Context fit | ✅ | - |
179
+ | Scope | ✅ | - |
180
+
181
+ ## Issues (if REJECT)
182
+ | # | Category | Location | Issue |
183
+ |---|----------|----------|-------|
184
+ | 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
185
+ ```
186
+
187
+ **Cognitive load reduction rules:**
188
+ - No issues -> Summary 1 line + check table only (10 lines or less)
189
+ - Issues found -> + Issues in table format (25 lines or less)
202
190
  allowed_tools:
203
191
  - Read
204
192
  - Glob
205
193
  - Grep
194
+ - Write
206
195
  - WebSearch
207
196
  - WebFetch
208
- status_rules_prompt: |
209
-
210
-
211
- ## Judgment Criteria
197
+ instruction_template: |
198
+ Review the code for AI-specific issues:
199
+ - Assumption validation
200
+ - Plausible but wrong patterns
201
+ - Context fit with existing codebase
202
+ - Scope creep detection
203
+ rules:
204
+ - condition: No AI-specific issues found
205
+ next: architect_review
206
+ - condition: AI-specific issues detected
207
+ next: ai_fix
212
208
 
213
- | Situation | Judgment |
214
- |-----------|----------|
215
- | Structural issues | REJECT |
216
- | Design principle violations | REJECT |
217
- | Missing call chain wiring | REJECT |
218
- | Insufficient tests | REJECT |
219
- | Minor improvements needed | IMPROVE |
220
- | No issues | APPROVE |
209
+ - name: ai_fix
210
+ edit: true
211
+ agent: ../agents/default/coder.md
212
+ allowed_tools:
213
+ - Read
214
+ - Glob
215
+ - Grep
216
+ - Edit
217
+ - Write
218
+ - Bash
219
+ - WebSearch
220
+ - WebFetch
221
+ instruction_template: |
222
+ ## AI Review Feedback (This is the latest instruction - prioritize this)
223
+ {previous_response}
221
224
 
222
- ## Output Format
225
+ **Important**: Address the AI Reviewer's feedback.
226
+ Focus on:
227
+ - Correcting incorrect assumptions
228
+ - Fixing plausible-but-wrong implementations
229
+ - Aligning with existing codebase patterns
230
+ - Removing scope creep
231
+ pass_previous_response: true
232
+ rules:
233
+ - condition: AI Reviewer's issues have been fixed
234
+ next: ai_review
235
+ - condition: Unable to proceed with fixes
236
+ next: plan
223
237
 
224
- | Situation | Tag |
225
- |-----------|-----|
226
- | No issues | `[ARCHITECT:APPROVE]` |
227
- | Minor improvements needed | `[ARCHITECT:IMPROVE]` |
228
- | Structural fixes required | `[ARCHITECT:REJECT]` |
238
+ # ===========================================
239
+ # Phase 3: Architecture Review
240
+ # ===========================================
241
+ - name: architect_review
242
+ edit: false
243
+ agent: ../agents/default/architecture-reviewer.md
244
+ report:
245
+ name: 04-architect-review.md
246
+ format: |
247
+ ```markdown
248
+ # Architecture Review
249
+
250
+ ## Result: APPROVE / IMPROVE / REJECT
251
+
252
+ ## Summary
253
+ {1-2 sentences summarizing result}
254
+
255
+ ## Reviewed Aspects
256
+ - [x] Structure/Design
257
+ - [x] Code Quality
258
+ - [x] Change Scope
259
+ - [x] Test Coverage
260
+ - [x] Dead Code
261
+ - [x] Call Chain Verification
262
+
263
+ ## Issues (if REJECT)
264
+ | # | Location | Issue | Fix |
265
+ |---|----------|-------|-----|
266
+ | 1 | `src/file.ts:42` | Issue description | Fix method |
267
+
268
+ ## Improvement Suggestions (optional - non-blocking)
269
+ - {Future improvement suggestions}
270
+ ```
271
+
272
+ **Cognitive load reduction rules:**
273
+ - APPROVE + no issues -> Summary only (5 lines or less)
274
+ - APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
275
+ - REJECT -> Issues in table format (30 lines or less)
276
+ allowed_tools:
277
+ - Read
278
+ - Glob
279
+ - Grep
280
+ - Write
281
+ - WebSearch
282
+ - WebFetch
229
283
  instruction_template: |
230
- ## Workflow Context
231
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
232
- - Step Iteration: {step_iteration} (times this step has run)
233
- - Step: architect_review (Architecture Review)
234
- - Report Directory: .takt/reports/{report_dir}/
235
- - Report File: .takt/reports/{report_dir}/03-architect-review.md
236
-
237
- ## Original User Request
238
- {task}
239
-
240
- ## Git Diff
241
- ```diff
242
- {git_diff}
243
- ```
244
-
245
- ## Instructions
246
284
  Focus on **architecture and design** review.
247
285
 
248
286
  **Review Criteria:**
@@ -252,51 +290,17 @@ steps:
252
290
  - Test coverage
253
291
  - Dead code
254
292
  - Call chain verification
255
-
256
- **Report output:** Output to the `Report File` specified above.
257
- - If file does not exist: Create new file
258
- - If file exists: Append with `## Iteration {step_iteration}` section
259
-
260
- **Report format:**
261
- ```markdown
262
- # Architecture Review
263
-
264
- ## Result: APPROVE / IMPROVE / REJECT
265
-
266
- ## Summary
267
- {1-2 sentences summarizing result}
268
-
269
- ## Reviewed Aspects
270
- - [x] Structure/Design
271
- - [x] Code Quality
272
- - [x] Change Scope
273
- - [x] Test Coverage
274
- - [x] Dead Code
275
- - [x] Call Chain Verification
276
-
277
- ## Issues (if REJECT)
278
- | # | Location | Issue | Fix |
279
- |---|----------|-------|-----|
280
- | 1 | `src/file.ts:42` | Issue description | Fix method |
281
-
282
- ## Improvement Suggestions (optional - non-blocking)
283
- - {Future improvement suggestions}
284
- ```
285
-
286
- **Cognitive load reduction rules:**
287
- - APPROVE + no issues → Summary only (5 lines or less)
288
- - APPROVE + minor suggestions → Summary + suggestions (15 lines or less)
289
- - REJECT → Issues in table format (30 lines or less)
290
- transitions:
291
- - condition: approved
292
- next_step: frontend_review
293
- - condition: improve
294
- next_step: fix_architect
295
- - condition: rejected
296
- next_step: fix_architect
293
+ rules:
294
+ - condition: No architecture or design issues found
295
+ next: frontend_review
296
+ - condition: Minor improvements needed but no structural issues
297
+ next: fix_architect
298
+ - condition: Structural issues found that require fixes
299
+ next: fix_architect
297
300
 
298
301
  - name: fix_architect
299
- agent: ~/.takt/agents/default/coder.md
302
+ edit: true
303
+ agent: ../agents/default/coder.md
300
304
  allowed_tools:
301
305
  - Read
302
306
  - Glob
@@ -307,82 +311,60 @@ steps:
307
311
  - WebSearch
308
312
  - WebFetch
309
313
  permission_mode: acceptEdits
310
- status_rules_prompt: |
311
-
312
-
313
- ## Output Format
314
-
315
- | Situation | Tag |
316
- |-----------|-----|
317
- | Fix complete | `[CODER:DONE]` |
318
- | Cannot proceed | `[CODER:BLOCKED]` |
319
314
  instruction_template: |
320
- ## Workflow Context
321
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
322
- - Step Iteration: {step_iteration} (times this step has run)
323
- - Step: fix_architect
324
-
325
315
  ## Architect Feedback (This is the latest instruction - prioritize this)
326
316
  {previous_response}
327
317
 
328
- ## Original User Request (Initial request - for reference)
329
- {task}
330
-
331
- ## Additional User Inputs
332
- {user_inputs}
333
-
334
- ## Instructions
335
318
  **Important**: Address the Architect's feedback.
336
319
  "Original User Request" is for reference; it's not the latest instruction.
337
320
  Review the session conversation history and fix the Architect's issues.
338
-
339
- Include [CODER:DONE] when complete.
340
- Include [CODER:BLOCKED] if unable to proceed.
341
321
  pass_previous_response: true
342
- transitions:
343
- - condition: done
344
- next_step: architect_review
345
- - condition: blocked
346
- next_step: plan
322
+ rules:
323
+ - condition: Architect's issues have been fixed
324
+ next: architect_review
325
+ - condition: Unable to proceed with fixes
326
+ next: plan
347
327
 
348
328
  # ===========================================
349
- # Phase 3: Frontend Review
329
+ # Phase 4: Frontend Review
350
330
  # ===========================================
351
331
  - name: frontend_review
352
- agent: ~/.takt/agents/expert/frontend-reviewer.md
332
+ edit: false
333
+ agent: ../agents/expert/frontend-reviewer.md
334
+ report:
335
+ name: 05-frontend-review.md
336
+ format: |
337
+ ```markdown
338
+ # Frontend Review
339
+
340
+ ## Result: APPROVE / REJECT
341
+
342
+ ## Summary
343
+ {1-2 sentences summarizing result}
344
+
345
+ ## Reviewed Perspectives
346
+ | Perspective | Result | Notes |
347
+ |-------------|--------|-------|
348
+ | Component Design | ✅ | - |
349
+ | State Management | ✅ | - |
350
+ | Performance | ✅ | - |
351
+ | Accessibility | ✅ | - |
352
+ | Type Safety | ✅ | - |
353
+
354
+ ## Issues (if REJECT)
355
+ | # | Location | Issue | Fix |
356
+ |---|----------|-------|-----|
357
+ | 1 | `src/file.tsx:42` | Issue description | Fix method |
358
+ ```
353
359
  allowed_tools:
354
360
  - Read
355
361
  - Glob
356
362
  - Grep
363
+ - Write
357
364
  - WebSearch
358
365
  - WebFetch
359
- status_rules_prompt: |
360
-
361
-
362
- ## Output Format
363
-
364
- | Situation | Tag |
365
- |-----------|-----|
366
- | Frontend design is sound | `[FRONTEND:APPROVE]` |
367
- | Design issues found | `[FRONTEND:REJECT]` |
368
366
  instruction_template: |
369
- ## Workflow Context
370
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
371
- - Step Iteration: {step_iteration} (times this step has run)
372
- - Step: frontend_review (Frontend Expert Review)
373
- - Report Directory: .takt/reports/{report_dir}/
374
- - Report File: .takt/reports/{report_dir}/04-frontend-review.md
375
-
376
- ## Original User Request
377
- {task}
378
-
379
- ## Git Diff
380
- ```diff
381
- {git_diff}
382
- ```
383
-
384
- ## Instructions
385
- Review the changes above from the frontend development perspective.
367
+ Review the changes from the frontend development perspective.
386
368
 
387
369
  **Review Criteria:**
388
370
  - Component design (separation of concerns, granularity)
@@ -393,47 +375,16 @@ steps:
393
375
  - TypeScript type safety
394
376
 
395
377
  **Note**: If this project does not include frontend code,
396
- output [FRONTEND:APPROVE] and proceed.
397
-
398
- **Report output:** Output to the `Report File` specified above.
399
- - If file does not exist: Create new file
400
- - If file exists: Append with `## Iteration {step_iteration}` section
401
-
402
- **Report format:**
403
- ```markdown
404
- # Frontend Review
405
-
406
- ## Result: APPROVE / REJECT
407
-
408
- ## Summary
409
- {1-2 sentences summarizing result}
410
-
411
- ## Reviewed Perspectives
412
- | Perspective | Result | Notes |
413
- |-------------|--------|-------|
414
- | Component Design | ✅ | - |
415
- | State Management | ✅ | - |
416
- | Performance | ✅ | - |
417
- | Accessibility | ✅ | - |
418
- | Type Safety | ✅ | - |
419
-
420
- ## Issues (if REJECT)
421
- | # | Location | Issue | Fix |
422
- |---|----------|-------|-----|
423
- | 1 | `src/file.tsx:42` | Issue description | Fix method |
424
- ```
425
-
426
- Include:
427
- - [FRONTEND:APPROVE] if frontend design is sound
428
- - [FRONTEND:REJECT] if design issues found (list specific issues)
429
- transitions:
430
- - condition: approved
431
- next_step: ai_review
432
- - condition: rejected
433
- next_step: fix_frontend
378
+ approve and proceed to the next step.
379
+ rules:
380
+ - condition: Frontend design is sound with no issues
381
+ next: security_review
382
+ - condition: Frontend design issues found
383
+ next: fix_frontend
434
384
 
435
385
  - name: fix_frontend
436
- agent: ~/.takt/agents/default/coder.md
386
+ edit: true
387
+ agent: ../agents/default/coder.md
437
388
  allowed_tools:
438
389
  - Read
439
390
  - Glob
@@ -443,31 +394,10 @@ steps:
443
394
  - Bash
444
395
  - WebSearch
445
396
  - WebFetch
446
- status_rules_prompt: |
447
-
448
-
449
- ## Output Format
450
-
451
- | Situation | Tag |
452
- |-----------|-----|
453
- | Fix complete | `[CODER:DONE]` |
454
- | Cannot proceed | `[CODER:BLOCKED]` |
455
397
  instruction_template: |
456
- ## Workflow Context
457
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
458
- - Step Iteration: {step_iteration} (times this step has run)
459
- - Step: fix_frontend
460
-
461
398
  ## Frontend Review Feedback (This is the latest instruction - prioritize this)
462
399
  {previous_response}
463
400
 
464
- ## Original User Request (Initial request - for reference)
465
- {task}
466
-
467
- ## Additional User Inputs
468
- {user_inputs}
469
-
470
- ## Instructions
471
401
  **Important**: Fix the issues pointed out by the frontend expert.
472
402
 
473
403
  Areas of concern:
@@ -476,189 +406,54 @@ steps:
476
406
  - Performance
477
407
  - Accessibility
478
408
  - Type safety
479
-
480
- Include [CODER:DONE] when complete.
481
- Include [CODER:BLOCKED] if unable to proceed.
482
409
  pass_previous_response: true
483
- transitions:
484
- - condition: done
485
- next_step: frontend_review
486
- - condition: blocked
487
- next_step: plan
488
-
489
- # ===========================================
490
- # Phase 4: AI Review
491
- # ===========================================
492
- - name: ai_review
493
- agent: ~/.takt/agents/default/ai-reviewer.md
494
- allowed_tools:
495
- - Read
496
- - Glob
497
- - Grep
498
- - WebSearch
499
- - WebFetch
500
- status_rules_prompt: |
501
-
502
-
503
- ## Output Format
504
-
505
- | Situation | Tag |
506
- |-----------|-----|
507
- | No AI-specific issues | `[AI_REVIEW:APPROVE]` |
508
- | Issues found | `[AI_REVIEW:REJECT]` |
509
- instruction_template: |
510
- ## Workflow Context
511
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
512
- - Step Iteration: {step_iteration} (times this step has run)
513
- - Step: ai_review (AI-Generated Code Review)
514
- - Report Directory: .takt/reports/{report_dir}/
515
- - Report File: .takt/reports/{report_dir}/05-ai-review.md
516
-
517
- ## Original User Request (Initial request from workflow start)
518
- {task}
519
-
520
- ## Git Diff
521
- ```diff
522
- {git_diff}
523
- ```
524
-
525
- ## Instructions
526
- Review the code for AI-specific issues:
527
- - Assumption validation
528
- - Plausible but wrong patterns
529
- - Context fit with existing codebase
530
- - Scope creep detection
531
-
532
- **Report output:** Output to the `Report File` specified above.
533
- - If file does not exist: Create new file
534
- - If file exists: Append with `## Iteration {step_iteration}` section
535
-
536
- **Report format:**
537
- ```markdown
538
- # AI-Generated Code Review
539
-
540
- ## Result: APPROVE / REJECT
541
-
542
- ## Summary
543
- {One sentence summarizing result}
544
-
545
- ## Verified Items
546
- | Aspect | Result | Notes |
547
- |--------|--------|-------|
548
- | Assumption validity | ✅ | - |
549
- | API/Library existence | ✅ | - |
550
- | Context fit | ✅ | - |
551
- | Scope | ✅ | - |
552
-
553
- ## Issues (if REJECT)
554
- | # | Category | Location | Issue |
555
- |---|----------|----------|-------|
556
- | 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
557
- ```
558
-
559
- **Cognitive load reduction rules:**
560
- - No issues → Summary 1 line + check table only (10 lines or less)
561
- - Issues found → + Issues in table format (25 lines or less)
562
-
563
- Include:
564
- - [AI_REVIEW:APPROVE] if no AI-specific issues found
565
- - [AI_REVIEW:REJECT] if issues detected (list specific problems)
566
- transitions:
567
- - condition: approved
568
- next_step: security_review
569
- - condition: rejected
570
- next_step: ai_fix
571
-
572
- - name: ai_fix
573
- agent: ~/.takt/agents/default/coder.md
574
- allowed_tools:
575
- - Read
576
- - Glob
577
- - Grep
578
- - Edit
579
- - Write
580
- - Bash
581
- - WebSearch
582
- - WebFetch
583
- status_rules_prompt: |
584
-
585
-
586
- ## Output Format
587
-
588
- | Situation | Tag |
589
- |-----------|-----|
590
- | Fix complete | `[CODER:DONE]` |
591
- | Cannot proceed | `[CODER:BLOCKED]` |
592
- instruction_template: |
593
- ## Workflow Context
594
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
595
- - Step Iteration: {step_iteration} (times this step has run)
596
- - Step: ai_fix
597
-
598
- ## AI Review Feedback (This is the latest instruction - prioritize this)
599
- {previous_response}
600
-
601
- ## Original User Request (Initial request from workflow start - for reference)
602
- {task}
603
-
604
- ## Additional User Inputs
605
- {user_inputs}
606
-
607
- ## Instructions
608
- **Important**: Address the AI Reviewer's feedback.
609
- Focus on:
610
- - Correcting incorrect assumptions
611
- - Fixing plausible-but-wrong implementations
612
- - Aligning with existing codebase patterns
613
- - Removing scope creep
614
-
615
- Include [CODER:DONE] when complete.
616
- Include [CODER:BLOCKED] if unable to proceed.
617
- pass_previous_response: true
618
- transitions:
619
- - condition: done
620
- next_step: ai_review
621
- - condition: blocked
622
- next_step: plan
410
+ rules:
411
+ - condition: Frontend issues have been fixed
412
+ next: frontend_review
413
+ - condition: Unable to proceed with fixes
414
+ next: plan
623
415
 
624
416
  # ===========================================
625
417
  # Phase 5: Security Review
626
418
  # ===========================================
627
419
  - name: security_review
628
- agent: ~/.takt/agents/expert/security-reviewer.md
420
+ edit: false
421
+ agent: ../agents/expert/security-reviewer.md
422
+ report:
423
+ name: 06-security-review.md
424
+ format: |
425
+ ```markdown
426
+ # Security Review
427
+
428
+ ## Result: APPROVE / REJECT
429
+
430
+ ## Severity: None / Low / Medium / High / Critical
431
+
432
+ ## Check Results
433
+ | Category | Result | Notes |
434
+ |----------|--------|-------|
435
+ | Injection | ✅ | - |
436
+ | Auth/Authz | ✅ | - |
437
+ | Data Protection | ✅ | - |
438
+ | Dependencies | ✅ | - |
439
+
440
+ ## Vulnerabilities (if REJECT)
441
+ | # | Severity | Type | Location | Fix |
442
+ |---|----------|------|----------|-----|
443
+ | 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
444
+
445
+ ## Warnings (non-blocking)
446
+ - {Security recommendations}
447
+ ```
629
448
  allowed_tools:
630
449
  - Read
631
450
  - Glob
632
451
  - Grep
452
+ - Write
633
453
  - WebSearch
634
454
  - WebFetch
635
- status_rules_prompt: |
636
-
637
-
638
- ## Output Format
639
-
640
- | Situation | Tag |
641
- |-----------|-----|
642
- | No security issues | `[SECURITY:APPROVE]` |
643
- | Vulnerabilities found | `[SECURITY:REJECT]` |
644
455
  instruction_template: |
645
- ## Workflow Context
646
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
647
- - Step Iteration: {step_iteration} (times this step has run)
648
- - Step: security_review (Security Expert Review)
649
- - Report Directory: .takt/reports/{report_dir}/
650
- - Report File: .takt/reports/{report_dir}/06-security-review.md
651
-
652
- ## Original User Request
653
- {task}
654
-
655
- ## Git Diff
656
- ```diff
657
- {git_diff}
658
- ```
659
-
660
- ## Instructions
661
- Review the changes above from the security perspective.
456
+ Review the changes from the security perspective.
662
457
 
663
458
  **Review Criteria:**
664
459
  - Injection attacks (SQL, command, XSS)
@@ -666,47 +461,15 @@ steps:
666
461
  - Sensitive information handling
667
462
  - Encryption appropriateness
668
463
  - OWASP Top 10
669
-
670
- **Report output:** Output to the `Report File` specified above.
671
- - If file does not exist: Create new file
672
- - If file exists: Append with `## Iteration {step_iteration}` section
673
-
674
- **Report format:**
675
- ```markdown
676
- # Security Review
677
-
678
- ## Result: APPROVE / REJECT
679
-
680
- ## Severity: None / Low / Medium / High / Critical
681
-
682
- ## Check Results
683
- | Category | Result | Notes |
684
- |----------|--------|-------|
685
- | Injection | ✅ | - |
686
- | Auth/Authz | ✅ | - |
687
- | Data Protection | ✅ | - |
688
- | Dependencies | ✅ | - |
689
-
690
- ## Vulnerabilities (if REJECT)
691
- | # | Severity | Type | Location | Fix |
692
- |---|----------|------|----------|-----|
693
- | 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
694
-
695
- ## Warnings (non-blocking)
696
- - {Security recommendations}
697
- ```
698
-
699
- Include:
700
- - [SECURITY:APPROVE] if no security issues found
701
- - [SECURITY:REJECT] if vulnerabilities found (list specific issues with severity)
702
- transitions:
703
- - condition: approved
704
- next_step: qa_review
705
- - condition: rejected
706
- next_step: fix_security
464
+ rules:
465
+ - condition: No security issues found
466
+ next: qa_review
467
+ - condition: Security vulnerabilities detected
468
+ next: fix_security
707
469
 
708
470
  - name: fix_security
709
- agent: ~/.takt/agents/default/coder.md
471
+ edit: true
472
+ agent: ../agents/default/coder.md
710
473
  allowed_tools:
711
474
  - Read
712
475
  - Glob
@@ -716,32 +479,10 @@ steps:
716
479
  - Bash
717
480
  - WebSearch
718
481
  - WebFetch
719
- status_rules_prompt: |
720
-
721
-
722
- ## Output Format
723
-
724
- | Situation | Tag |
725
- |-----------|-----|
726
- | Minor fix complete | `[CODER:DONE]` |
727
- | Major fix (restart from Architecture) | `[CODER:REJECT]` |
728
- | Cannot proceed | `[CODER:BLOCKED]` |
729
482
  instruction_template: |
730
- ## Workflow Context
731
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
732
- - Step Iteration: {step_iteration} (times this step has run)
733
- - Step: fix_security
734
-
735
483
  ## Security Review Feedback (This is the latest instruction - prioritize this)
736
484
  {previous_response}
737
485
 
738
- ## Original User Request (Initial request - for reference)
739
- {task}
740
-
741
- ## Additional User Inputs
742
- {user_inputs}
743
-
744
- ## Instructions
745
486
  **Important**: Fix the issues pointed out by the security expert.
746
487
  Security issues should be addressed with highest priority.
747
488
 
@@ -752,61 +493,61 @@ steps:
752
493
  - Encryption issues
753
494
 
754
495
  ## Completion: Determine Change Impact
755
- When fix is complete, judge the **impact scope of changes** and output the appropriate tag:
496
+ When fix is complete, judge the **impact scope of changes**:
756
497
 
757
- - `[CODER:DONE]` - Minor fix (re-run security review only)
498
+ - Minor fix (re-run security review only)
758
499
  - Examples: Add validation, add escaping, configuration changes
759
- - `[CODER:REJECT]` - Major fix (restart from Architecture review)
500
+ - Major fix (restart from Architecture review)
760
501
  - Examples: Data flow changes, API design changes, auth method changes, domain model changes
761
-
762
- Include [CODER:BLOCKED] if unable to proceed.
763
502
  pass_previous_response: true
764
- transitions:
765
- - condition: done
766
- next_step: security_review
767
- - condition: rejected
768
- next_step: architect_review
769
- - condition: blocked
770
- next_step: plan
503
+ rules:
504
+ - condition: Minor security fix is complete
505
+ next: security_review
506
+ - condition: Major fix applied requiring architecture re-review
507
+ next: architect_review
508
+ - condition: Unable to proceed with fixes
509
+ next: plan
771
510
 
772
511
  # ===========================================
773
512
  # Phase 6: QA Review
774
513
  # ===========================================
775
514
  - name: qa_review
776
- agent: ~/.takt/agents/expert/qa-reviewer.md
515
+ edit: false
516
+ agent: ../agents/expert/qa-reviewer.md
517
+ report:
518
+ name: 07-qa-review.md
519
+ format: |
520
+ ```markdown
521
+ # QA Review
522
+
523
+ ## Result: APPROVE / REJECT
524
+
525
+ ## Summary
526
+ {1-2 sentences summarizing result}
527
+
528
+ ## Reviewed Perspectives
529
+ | Perspective | Result | Notes |
530
+ |-------------|--------|-------|
531
+ | Test Coverage | ✅ | - |
532
+ | Test Quality | ✅ | - |
533
+ | Error Handling | ✅ | - |
534
+ | Documentation | ✅ | - |
535
+ | Maintainability | ✅ | - |
536
+
537
+ ## Issues (if REJECT)
538
+ | # | Category | Issue | Fix |
539
+ |---|----------|-------|-----|
540
+ | 1 | Testing | Issue description | Fix method |
541
+ ```
777
542
  allowed_tools:
778
543
  - Read
779
544
  - Glob
780
545
  - Grep
546
+ - Write
781
547
  - WebSearch
782
548
  - WebFetch
783
- status_rules_prompt: |
784
-
785
-
786
- ## Output Format
787
-
788
- | Situation | Tag |
789
- |-----------|-----|
790
- | Quality standards met | `[QA:APPROVE]` |
791
- | Quality issues found | `[QA:REJECT]` |
792
549
  instruction_template: |
793
- ## Workflow Context
794
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
795
- - Step Iteration: {step_iteration} (times this step has run)
796
- - Step: qa_review (QA Expert Review)
797
- - Report Directory: .takt/reports/{report_dir}/
798
- - Report File: .takt/reports/{report_dir}/07-qa-review.md
799
-
800
- ## Original User Request
801
- {task}
802
-
803
- ## Git Diff
804
- ```diff
805
- {git_diff}
806
- ```
807
-
808
- ## Instructions
809
- Review the changes above from the quality assurance perspective.
550
+ Review the changes from the quality assurance perspective.
810
551
 
811
552
  **Review Criteria:**
812
553
  - Test coverage and quality
@@ -815,46 +556,15 @@ steps:
815
556
  - Error handling
816
557
  - Logging and monitoring
817
558
  - Maintainability
818
-
819
- **Report output:** Output to the `Report File` specified above.
820
- - If file does not exist: Create new file
821
- - If file exists: Append with `## Iteration {step_iteration}` section
822
-
823
- **Report format:**
824
- ```markdown
825
- # QA Review
826
-
827
- ## Result: APPROVE / REJECT
828
-
829
- ## Summary
830
- {1-2 sentences summarizing result}
831
-
832
- ## Reviewed Perspectives
833
- | Perspective | Result | Notes |
834
- |-------------|--------|-------|
835
- | Test Coverage | ✅ | - |
836
- | Test Quality | ✅ | - |
837
- | Error Handling | ✅ | - |
838
- | Documentation | ✅ | - |
839
- | Maintainability | ✅ | - |
840
-
841
- ## Issues (if REJECT)
842
- | # | Category | Issue | Fix |
843
- |---|----------|-------|-----|
844
- | 1 | Testing | Issue description | Fix method |
845
- ```
846
-
847
- Include:
848
- - [QA:APPROVE] if quality standards are met
849
- - [QA:REJECT] if quality issues found (list specific issues)
850
- transitions:
851
- - condition: approved
852
- next_step: supervise
853
- - condition: rejected
854
- next_step: fix_qa
559
+ rules:
560
+ - condition: Quality standards are met
561
+ next: supervise
562
+ - condition: Quality issues found
563
+ next: fix_qa
855
564
 
856
565
  - name: fix_qa
857
- agent: ~/.takt/agents/default/coder.md
566
+ edit: true
567
+ agent: ../agents/default/coder.md
858
568
  allowed_tools:
859
569
  - Read
860
570
  - Glob
@@ -864,33 +574,10 @@ steps:
864
574
  - Bash
865
575
  - WebSearch
866
576
  - WebFetch
867
- status_rules_prompt: |
868
-
869
-
870
- ## Output Format
871
-
872
- | Situation | Tag |
873
- |-----------|-----|
874
- | Minor fix complete | `[CODER:DONE]` |
875
- | Security-impacting fix | `[CODER:IMPROVE]` |
876
- | Major fix (restart from Architecture) | `[CODER:REJECT]` |
877
- | Cannot proceed | `[CODER:BLOCKED]` |
878
577
  instruction_template: |
879
- ## Workflow Context
880
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
881
- - Step Iteration: {step_iteration} (times this step has run)
882
- - Step: fix_qa
883
-
884
578
  ## QA Review Feedback (This is the latest instruction - prioritize this)
885
579
  {previous_response}
886
580
 
887
- ## Original User Request (Initial request - for reference)
888
- {task}
889
-
890
- ## Additional User Inputs
891
- {user_inputs}
892
-
893
- ## Instructions
894
581
  **Important**: Fix the issues pointed out by the QA expert.
895
582
 
896
583
  Areas of concern:
@@ -901,65 +588,42 @@ steps:
901
588
  - Code quality
902
589
 
903
590
  ## Completion: Determine Change Impact
904
- When fix is complete, judge the **impact scope of changes** and output the appropriate tag:
591
+ When fix is complete, judge the **impact scope of changes**:
905
592
 
906
- - `[CODER:DONE]` - Minor fix (re-run QA review only)
593
+ - Minor fix (re-run QA review only)
907
594
  - Examples: Add tests, add documentation, add logs, add comments
908
- - `[CODER:IMPROVE]` - Security-impacting fix (restart from security review)
595
+ - Security-impacting fix (restart from security review)
909
596
  - Examples: Error handling changes (error message content changes), input validation changes
910
- - `[CODER:REJECT]` - Major fix (restart from Architecture review)
597
+ - Major fix (restart from Architecture review)
911
598
  - Examples: Business logic changes, data model changes, API changes
912
-
913
- Include [CODER:BLOCKED] if unable to proceed.
914
599
  pass_previous_response: true
915
- transitions:
916
- - condition: done
917
- next_step: qa_review
918
- - condition: improve
919
- next_step: security_review
920
- - condition: rejected
921
- next_step: architect_review
922
- - condition: blocked
923
- next_step: plan
600
+ rules:
601
+ - condition: Minor QA fix is complete
602
+ next: qa_review
603
+ - condition: Security-impacting fix applied
604
+ next: security_review
605
+ - condition: Major fix applied requiring architecture re-review
606
+ next: architect_review
607
+ - condition: Unable to proceed with fixes
608
+ next: plan
924
609
 
925
610
  # ===========================================
926
611
  # Phase 7: Supervision
927
612
  # ===========================================
928
613
  - name: supervise
929
- agent: ~/.takt/agents/expert/supervisor.md
614
+ edit: false
615
+ agent: ../agents/expert/supervisor.md
616
+ report:
617
+ - Validation: 08-supervisor-validation.md
618
+ - Summary: summary.md
930
619
  allowed_tools:
931
620
  - Read
932
621
  - Glob
933
622
  - Grep
623
+ - Write
934
624
  - WebSearch
935
625
  - WebFetch
936
- status_rules_prompt: |
937
-
938
-
939
- ## Output Format
940
-
941
- | Situation | Tag |
942
- |-----------|-----|
943
- | Ready to merge | `[SUPERVISOR:APPROVE]` |
944
- | Issues found | `[SUPERVISOR:REJECT]` |
945
626
  instruction_template: |
946
- ## Workflow Context
947
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
948
- - Step Iteration: {step_iteration} (times this step has run)
949
- - Step: supervise (Final Review)
950
- - Report Directory: .takt/reports/{report_dir}/
951
- - Report Files:
952
- - Validation: .takt/reports/{report_dir}/08-supervisor-validation.md
953
- - Summary: .takt/reports/{report_dir}/summary.md
954
-
955
- ## Original User Request
956
- {task}
957
-
958
- ## Git Diff
959
- ```diff
960
- {git_diff}
961
- ```
962
-
963
627
  ## Previous Reviews Summary
964
628
  Reaching this step means all the following reviews have been APPROVED:
965
629
  - Architecture Review: APPROVED
@@ -968,7 +632,6 @@ steps:
968
632
  - Security Review: APPROVED
969
633
  - QA Review: APPROVED
970
634
 
971
- ## Instructions
972
635
  Run tests, verify the build, and perform final approval.
973
636
 
974
637
  **Workflow Overall Review:**
@@ -979,10 +642,6 @@ steps:
979
642
  **Review Reports:** Read all reports in Report Directory and
980
643
  check for any unaddressed improvement suggestions.
981
644
 
982
- **Report output:** Output to the `Report Files` specified above.
983
- - If file does not exist: Create new file
984
- - If file exists: Append with `## Iteration {step_iteration}` section
985
-
986
645
  **Validation report format:**
987
646
  ```markdown
988
647
  # Final Validation Results
@@ -1038,18 +697,15 @@ steps:
1038
697
  npm run build
1039
698
  ```
1040
699
  ```
1041
-
1042
- Output:
1043
- - [SUPERVISOR:APPROVE] if ready to merge
1044
- - [SUPERVISOR:REJECT] if issues found (specify the issues)
1045
- transitions:
1046
- - condition: approved
1047
- next_step: COMPLETE
1048
- - condition: rejected
1049
- next_step: fix_supervisor
700
+ rules:
701
+ - condition: All validations pass and ready to merge
702
+ next: COMPLETE
703
+ - condition: Issues detected during final review
704
+ next: fix_supervisor
1050
705
 
1051
706
  - name: fix_supervisor
1052
- agent: ~/.takt/agents/default/coder.md
707
+ edit: true
708
+ agent: ../agents/default/coder.md
1053
709
  allowed_tools:
1054
710
  - Read
1055
711
  - Glob
@@ -1059,41 +715,17 @@ steps:
1059
715
  - Bash
1060
716
  - WebSearch
1061
717
  - WebFetch
1062
- status_rules_prompt: |
1063
-
1064
-
1065
- ## Output Format
1066
-
1067
- | Situation | Tag |
1068
- |-----------|-----|
1069
- | Fix complete | `[CODER:DONE]` |
1070
- | Cannot proceed | `[CODER:BLOCKED]` |
1071
718
  instruction_template: |
1072
- ## Workflow Context
1073
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
1074
- - Step Iteration: {step_iteration} (times this step has run)
1075
- - Step: fix_supervisor
1076
-
1077
719
  ## Supervisor Feedback (This is the latest instruction - prioritize this)
1078
720
  {previous_response}
1079
721
 
1080
- ## Original User Request (Initial request - for reference)
1081
- {task}
1082
-
1083
- ## Additional User Inputs
1084
- {user_inputs}
1085
-
1086
- ## Instructions
1087
722
  **Important**: Fix the issues pointed out by the supervisor.
1088
723
 
1089
724
  The supervisor has identified issues from a big-picture perspective.
1090
725
  Address items in priority order.
1091
-
1092
- Include [CODER:DONE] when complete.
1093
- Include [CODER:BLOCKED] if unable to proceed.
1094
726
  pass_previous_response: true
1095
- transitions:
1096
- - condition: done
1097
- next_step: supervise
1098
- - condition: blocked
1099
- next_step: plan
727
+ rules:
728
+ - condition: Supervisor's issues have been fixed
729
+ next: supervise
730
+ - condition: Unable to proceed with fixes
731
+ next: plan