takt 0.2.3 → 0.3.2

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