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
@@ -1,19 +1,23 @@
1
1
  # Simple TAKT Workflow
2
- # Plan -> Coder -> Architect Review -> AI Review -> Supervisor Approval
3
- # (Simplified version of default - removed improve, fix, ai_fix, security_review, security_fix)
2
+ # Plan -> Implement -> AI Review -> Architect Review -> Supervisor Approval
4
3
  #
5
- # Template Variables:
6
- # {iteration} - Workflow-wide turn count (total steps executed across all agents)
7
- # {max_iterations} - Maximum iterations allowed for the workflow
8
- # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
9
- # {task} - Original user request
10
- # {previous_response} - Output from the previous step
11
- # {git_diff} - Current uncommitted changes (git diff)
12
- # {user_inputs} - Accumulated user inputs during workflow
13
- # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
4
+ # Template Variables (auto-injected by engine):
5
+ # {iteration} - Workflow-wide turn count
6
+ # {max_iterations} - Maximum iterations allowed
7
+ # {step_iteration} - Per-step iteration count
8
+ # {task} - Original user request
9
+ # {previous_response} - Output from the previous step
10
+ # {user_inputs} - Accumulated user inputs during workflow
11
+ # {report_dir} - Report directory name
12
+ #
13
+ # Auto-injected sections (do NOT include in instruction_template):
14
+ # ## Workflow Context - iteration, step_iteration, report info
15
+ # ## User Request - {task}
16
+ # ## Previous Response - {previous_response}
17
+ # ## Additional User Inputs - {user_inputs}
14
18
 
15
19
  name: simple
16
- description: Simplified development workflow (plan -> implement -> review -> ai_review -> supervise)
20
+ description: Simplified development workflow (plan -> implement -> ai_review -> review -> supervise)
17
21
 
18
22
  max_iterations: 20
19
23
 
@@ -21,75 +25,53 @@ initial_step: plan
21
25
 
22
26
  steps:
23
27
  - name: plan
24
- agent: ~/.takt/agents/default/planner.md
28
+ edit: false
29
+ agent: ../agents/default/planner.md
30
+ report:
31
+ name: 00-plan.md
32
+ format: |
33
+ ```markdown
34
+ # Task Plan
35
+
36
+ ## Original Request
37
+ {User's request as-is}
38
+
39
+ ## Analysis Results
40
+
41
+ ### Objective
42
+ {What needs to be achieved}
43
+
44
+ ### Scope
45
+ {Impact scope}
46
+
47
+ ### Implementation Approach
48
+ {How to proceed}
49
+
50
+ ## Clarifications Needed (if any)
51
+ - {Unclear points or items requiring confirmation}
52
+ ```
25
53
  allowed_tools:
26
54
  - Read
27
55
  - Glob
28
56
  - Grep
57
+ - Write
29
58
  - Bash
30
59
  - WebSearch
31
60
  - WebFetch
32
- status_rules_prompt: |
33
- ## Judgment Criteria
34
-
35
- | Situation | Judgment |
36
- |-----------|----------|
37
- | Requirements clear and implementable | DONE |
38
- | User is asking a question (not an implementation task) | ANSWER |
39
- | Requirements unclear, insufficient info | BLOCKED |
40
-
41
- ## Output Format
42
-
43
- | Situation | Tag |
44
- |-----------|-----|
45
- | Analysis complete | `[PLANNER:DONE]` |
46
- | Question answered | `[PLANNER:ANSWER]` |
47
- | Insufficient info | `[PLANNER:BLOCKED]` |
48
-
49
- ### Output Examples
50
-
51
- **DONE case:**
52
- ```
53
- [PLANNER:DONE]
54
- ```
55
-
56
- **ANSWER case:**
57
- ```
58
- {Answer to the question}
59
-
60
- [PLANNER:ANSWER]
61
- ```
62
-
63
- **BLOCKED case:**
64
- ```
65
- [PLANNER:BLOCKED]
66
-
67
- Clarifications needed:
68
- - {Question 1}
69
- - {Question 2}
70
- ```
61
+ rules:
62
+ - condition: Requirements are clear and implementable
63
+ next: implement
64
+ - condition: User is asking a question
65
+ next: COMPLETE
66
+ - condition: Requirements unclear, insufficient info
67
+ next: ABORT
68
+ pass_previous_response: true
71
69
  instruction_template: |
72
- ## Workflow Context
73
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
74
- - Step Iteration: {step_iteration} (times this step has run)
75
- - Step: plan (Task Analysis)
76
- - Report Directory: .takt/reports/{report_dir}/
77
- - Report File: .takt/reports/{report_dir}/00-plan.md
78
-
79
- ## User Request
80
- {task}
81
-
82
70
  ## Previous Response (when returned from implement)
83
71
  {previous_response}
84
72
 
85
- ## Instructions
86
73
  Analyze the task and create an implementation plan.
87
74
 
88
- **Judgment criteria:**
89
- - If the user input is an implementation task → create a plan and output `[PLANNER:DONE]`
90
- - If the user input is a question → research, answer, and output `[PLANNER:ANSWER]`
91
- - If there is insufficient information → output `[PLANNER:BLOCKED]`
92
-
93
75
  **Note:** If returned from implement step (Previous Response exists),
94
76
  review and revise the plan based on that feedback (replan).
95
77
 
@@ -98,42 +80,12 @@ steps:
98
80
  2. Identify impact scope
99
81
  3. Decide implementation approach
100
82
 
101
- **Report output:** Output to the `Report File` specified above.
102
- - If file does not exist: Create new file
103
- - If file exists: Append with `## Iteration {step_iteration}` section
104
-
105
- **Report format:**
106
- ```markdown
107
- # Task Plan
108
-
109
- ## Original Request
110
- {User's request as-is}
111
-
112
- ## Analysis Results
113
-
114
- ### Objective
115
- {What needs to be achieved}
116
-
117
- ### Scope
118
- {Impact scope}
119
-
120
- ### Implementation Approach
121
- {How to proceed}
122
-
123
- ## Clarifications Needed (if any)
124
- - {Unclear points or items requiring confirmation}
125
- ```
126
- pass_previous_response: true
127
- transitions:
128
- - condition: done
129
- next_step: implement
130
- - condition: answer
131
- next_step: COMPLETE
132
- - condition: blocked
133
- next_step: ABORT
134
-
135
83
  - name: implement
136
- agent: ~/.takt/agents/default/coder.md
84
+ edit: true
85
+ agent: ../agents/default/coder.md
86
+ report:
87
+ - Scope: 01-coder-scope.md
88
+ - Decisions: 02-coder-decisions.md
137
89
  allowed_tools:
138
90
  - Read
139
91
  - Glob
@@ -144,58 +96,15 @@ steps:
144
96
  - WebSearch
145
97
  - WebFetch
146
98
  permission_mode: acceptEdits
147
- status_rules_prompt: |
148
- ## Output Format
149
-
150
- | Situation | Tag |
151
- |-----------|-----|
152
- | Implementation complete | `[CODER:DONE]` |
153
- | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
154
-
155
- **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
156
-
157
- ### Output Examples
158
-
159
- **DONE case:**
160
- ```
161
- Implementation complete.
162
- - Created: `src/auth/service.ts`, `tests/auth.test.ts`
163
- - Modified: `src/routes.ts`
164
-
165
- [CODER:DONE]
166
- ```
167
-
168
- **BLOCKED case:**
169
- ```
170
- [CODER:BLOCKED]
171
-
172
- Reason: DB schema is undefined, cannot implement
173
- Required info: users table structure
174
- ```
99
+ rules:
100
+ - condition: Implementation complete
101
+ next: ai_review
102
+ - condition: Cannot proceed, insufficient info
103
+ next: plan
175
104
  instruction_template: |
176
- ## Workflow Context
177
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
178
- - Step Iteration: {step_iteration} (times this step has run)
179
- - Step: implement
180
- - Report Directory: .takt/reports/{report_dir}/
181
- - Report Files:
182
- - Scope: .takt/reports/{report_dir}/01-coder-scope.md
183
- - Decisions: .takt/reports/{report_dir}/02-coder-decisions.md
184
-
185
- ## User Request
186
- {task}
187
-
188
- ## Additional User Inputs
189
- {user_inputs}
190
-
191
- ## Instructions
192
105
  Follow the plan from the plan step and implement.
193
106
  Refer to the plan report (00-plan.md) and proceed with implementation.
194
107
 
195
- **Report output:** Output to the `Report Files` specified above.
196
- - If file does not exist: Create new file
197
- - If file exists: Append with `## Iteration {step_iteration}` section
198
-
199
108
  **Scope report format (create at implementation start):**
200
109
  ```markdown
201
110
  # Change Scope Declaration
@@ -225,294 +134,129 @@ steps:
225
134
  - **Options Considered**: {List of options}
226
135
  - **Reason**: {Why this option was chosen}
227
136
  ```
228
- transitions:
229
- - condition: done
230
- next_step: review
231
- - condition: blocked
232
- next_step: plan
233
137
 
234
- - name: review
235
- agent: ~/.takt/agents/default/architect.md
138
+ - name: ai_review
139
+ edit: false
140
+ agent: ../agents/default/ai-antipattern-reviewer.md
141
+ report:
142
+ name: 03-ai-review.md
143
+ format: |
144
+ ```markdown
145
+ # AI-Generated Code Review
146
+
147
+ ## Result: APPROVE / REJECT
148
+
149
+ ## Summary
150
+ {One sentence summarizing result}
151
+
152
+ ## Verified Items
153
+ | Aspect | Result | Notes |
154
+ |--------|--------|-------|
155
+ | Assumption validity | ✅ | - |
156
+ | API/Library existence | ✅ | - |
157
+ | Context fit | ✅ | - |
158
+ | Scope | ✅ | - |
159
+
160
+ ## Issues (if REJECT)
161
+ | # | Category | Location | Issue |
162
+ |---|----------|----------|-------|
163
+ | 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
164
+ ```
165
+
166
+ **Cognitive load reduction rules:**
167
+ - No issues -> Summary 1 line + check table only (10 lines or less)
168
+ - Issues found -> + Issues in table format (25 lines or less)
236
169
  allowed_tools:
237
170
  - Read
238
171
  - Glob
239
172
  - Grep
173
+ - Write
240
174
  - WebSearch
241
175
  - WebFetch
242
- status_rules_prompt: |
243
- ## Judgment Criteria
244
-
245
- | Situation | Judgment |
246
- |-----------|----------|
247
- | Structural issues | REJECT |
248
- | Design principle violations | REJECT |
249
- | Security issues | REJECT |
250
- | Insufficient tests | REJECT |
251
- | No issues | APPROVE |
252
-
253
- **Note:** In simple workflow, IMPROVE is not used.
254
- If there are minor suggestions, use APPROVE + comments.
255
-
256
- ## Output Format
257
-
258
- | Situation | Tag |
259
- |-----------|-----|
260
- | No issues | `[ARCHITECT:APPROVE]` |
261
- | Structural changes required | `[ARCHITECT:REJECT]` |
262
-
263
- ### Output Examples
264
-
265
- **APPROVE case:**
266
- ```
267
- [ARCHITECT:APPROVE]
268
-
269
- Positive points:
270
- - Appropriate module organization
271
- - Single responsibility maintained
272
- ```
273
-
274
- **REJECT case:**
275
- ```
276
- [ARCHITECT:REJECT]
277
-
278
- Issues:
279
- 1. File size exceeded
280
- - Location: `src/services/user.ts` (523 lines)
281
- - Fix: Split into 3 files
282
- ```
176
+ rules:
177
+ - condition: No AI-specific issues
178
+ next: review
179
+ - condition: AI-specific issues found
180
+ next: plan
283
181
  instruction_template: |
284
- ## Workflow Context
285
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
286
- - Step Iteration: {step_iteration} (times this step has run)
287
- - Step: review (Architecture Review)
288
- - Report Directory: .takt/reports/{report_dir}/
289
- - Report File: .takt/reports/{report_dir}/03-architect-review.md
290
-
291
- ## Original User Request (Initial request from workflow start)
292
- {task}
293
-
294
- ## Git Diff
295
- ```diff
296
- {git_diff}
297
- ```
298
-
299
- ## Instructions
300
- Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the next step).
301
-
302
- Review the changes and provide feedback.
303
-
304
- **Note:** In simple workflow, IMPROVE judgment is not used.
305
- If there are minor suggestions, use APPROVE + comments.
306
-
307
- **Report output:** Output to the `Report File` specified above.
308
- - If file does not exist: Create new file
309
- - If file exists: Append with `## Iteration {step_iteration}` section
310
-
311
- **Report format:**
312
- ```markdown
313
- # Architecture Review
314
-
315
- ## Result: APPROVE / REJECT
316
-
317
- ## Summary
318
- {1-2 sentences summarizing result}
319
-
320
- ## Reviewed Perspectives
321
- - [x] Structure & Design
322
- - [x] Code Quality
323
- - [x] Change Scope
324
-
325
- ## Issues (if REJECT)
326
- | # | Location | Issue | Fix |
327
- |---|----------|-------|-----|
328
- | 1 | `src/file.ts:42` | Issue description | Fix method |
329
-
330
- ## Improvement Suggestions (optional, non-blocking)
331
- - {Future improvement suggestions}
332
- ```
333
-
334
- **Cognitive load reduction rules:**
335
- - APPROVE + no issues → Summary only (5 lines or less)
336
- - APPROVE + minor suggestions → Summary + suggestions (15 lines or less)
337
- - REJECT → Issues in table format (30 lines or less)
338
- transitions:
339
- - condition: approved
340
- next_step: ai_review
341
- - condition: rejected
342
- next_step: plan
182
+ Review the code for AI-specific issues:
183
+ - Assumption validation
184
+ - Plausible but wrong patterns
185
+ - Context fit with existing codebase
186
+ - Scope creep detection
343
187
 
344
- - name: ai_review
345
- agent: ~/.takt/agents/default/ai-reviewer.md
188
+ - name: review
189
+ edit: false
190
+ agent: ../agents/default/architecture-reviewer.md
191
+ report:
192
+ name: 04-architect-review.md
193
+ format: |
194
+ ```markdown
195
+ # Architecture Review
196
+
197
+ ## Result: APPROVE / REJECT
198
+
199
+ ## Summary
200
+ {1-2 sentences summarizing result}
201
+
202
+ ## Reviewed Perspectives
203
+ - [x] Structure & Design
204
+ - [x] Code Quality
205
+ - [x] Change Scope
206
+
207
+ ## Issues (if REJECT)
208
+ | # | Location | Issue | Fix |
209
+ |---|----------|-------|-----|
210
+ | 1 | `src/file.ts:42` | Issue description | Fix method |
211
+
212
+ ## Improvement Suggestions (optional, non-blocking)
213
+ - {Future improvement suggestions}
214
+ ```
215
+
216
+ **Cognitive load reduction rules:**
217
+ - APPROVE + no issues -> Summary only (5 lines or less)
218
+ - APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
219
+ - REJECT -> Issues in table format (30 lines or less)
346
220
  allowed_tools:
347
221
  - Read
348
222
  - Glob
349
223
  - Grep
224
+ - Write
350
225
  - WebSearch
351
226
  - WebFetch
352
- status_rules_prompt: |
353
- ## Judgment Criteria
354
-
355
- | Situation | Judgment |
356
- |-----------|----------|
357
- | Incorrect assumptions (affecting behavior) | REJECT |
358
- | Plausible-but-wrong code | REJECT |
359
- | Significant context mismatch with codebase | REJECT |
360
- | Scope creep | APPROVE (with warning noted) |
361
- | Minor style deviations only | APPROVE |
362
- | Code fits context and works | APPROVE |
363
-
364
- **Note:** Scope creep is noted as a warning but doesn't warrant REJECT alone.
365
-
366
- ## Output Format
367
-
368
- | Situation | Tag |
369
- |-----------|-----|
370
- | No AI-specific issues | `[AI_REVIEW:APPROVE]` |
371
- | Issues found | `[AI_REVIEW:REJECT]` |
372
-
373
- ### Output Examples
374
-
375
- **APPROVE case:**
376
- ```
377
- [AI_REVIEW:APPROVE]
378
-
379
- Verification result: No issues
380
- ```
381
-
382
- **REJECT case:**
383
- ```
384
- [AI_REVIEW:REJECT]
385
-
386
- Issues:
387
- 1. Non-existent API used: `fetch.json()` → `response.json()`
388
- ```
227
+ rules:
228
+ - condition: No issues found
229
+ next: supervise
230
+ - condition: Structural fix required
231
+ next: plan
389
232
  instruction_template: |
390
- ## Workflow Context
391
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
392
- - Step Iteration: {step_iteration} (times this step has run)
393
- - Step: ai_review (AI-Generated Code Review)
394
- - Report Directory: .takt/reports/{report_dir}/
395
- - Report File: .takt/reports/{report_dir}/04-ai-review.md
396
-
397
- ## Original User Request (Initial request from workflow start)
398
- {task}
399
-
400
- ## Git Diff
401
- ```diff
402
- {git_diff}
403
- ```
233
+ Focus on **architecture and design** review. Do NOT review AI-specific issues (that's already done).
404
234
 
405
- ## Instructions
406
- Review the code for AI-specific issues:
407
- - Assumption validation
408
- - Plausible but wrong patterns
409
- - Context fit with existing codebase
410
- - Scope creep detection
411
-
412
- **Report output:** Output to the `Report File` specified above.
413
- - If file does not exist: Create new file
414
- - If file exists: Append with `## Iteration {step_iteration}` section
415
-
416
- **Report format:**
417
- ```markdown
418
- # AI-Generated Code Review
419
-
420
- ## Result: APPROVE / REJECT
421
-
422
- ## Summary
423
- {One sentence summarizing result}
424
-
425
- ## Verified Items
426
- | Aspect | Result | Notes |
427
- |--------|--------|-------|
428
- | Assumption validity | ✅ | - |
429
- | API/Library existence | ✅ | - |
430
- | Context fit | ✅ | - |
431
- | Scope | ✅ | - |
432
-
433
- ## Issues (if REJECT)
434
- | # | Category | Location | Issue |
435
- |---|----------|----------|-------|
436
- | 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
437
- ```
235
+ Review the changes and provide feedback.
438
236
 
439
- **Cognitive load reduction rules:**
440
- - No issues Summary 1 line + check table only (10 lines or less)
441
- - Issues found → + Issues in table format (25 lines or less)
442
- transitions:
443
- - condition: approved
444
- next_step: supervise
445
- - condition: rejected
446
- next_step: plan
237
+ **Note:** In simple workflow, IMPROVE judgment is not used.
238
+ If there are minor suggestions, use APPROVE + comments.
447
239
 
448
240
  - name: supervise
449
- agent: ~/.takt/agents/default/supervisor.md
241
+ edit: false
242
+ agent: ../agents/default/supervisor.md
243
+ report:
244
+ - Validation: 05-supervisor-validation.md
245
+ - Summary: summary.md
450
246
  allowed_tools:
451
247
  - Read
452
248
  - Glob
453
249
  - Grep
250
+ - Write
454
251
  - Bash
455
252
  - WebSearch
456
253
  - WebFetch
457
- status_rules_prompt: |
458
- ## Judgment Criteria
459
-
460
- | Situation | Judgment |
461
- |-----------|----------|
462
- | Requirements not met | REJECT |
463
- | Tests failing | REJECT |
464
- | Build fails | REJECT |
465
- | Workarounds remaining | REJECT |
466
- | All OK | APPROVE |
467
-
468
- **Principle**: When in doubt, REJECT. Don't give ambiguous approval.
469
-
470
- ## Output Format
471
-
472
- | Situation | Tag |
473
- |-----------|-----|
474
- | Final approval | `[SUPERVISOR:APPROVE]` |
475
- | Return for fixes | `[SUPERVISOR:REJECT]` |
476
-
477
- ### Output Examples
478
-
479
- **APPROVE case:**
480
- ```
481
- [SUPERVISOR:APPROVE]
482
-
483
- Verification results:
484
- - Tests: ✅ All passed
485
- - Build: ✅ Succeeded
486
- - Requirements met: ✅
487
- ```
488
-
489
- **REJECT case:**
490
- ```
491
- [SUPERVISOR:REJECT]
492
-
493
- Issues:
494
- 1. Tests failing: `npm test` - 2 failures
495
- 2. Requirements not met: Login feature not implemented
496
- ```
254
+ rules:
255
+ - condition: All checks passed
256
+ next: COMPLETE
257
+ - condition: Requirements unmet, tests failing
258
+ next: plan
497
259
  instruction_template: |
498
- ## Workflow Context
499
- - Iteration: {iteration}/{max_iterations} (workflow-wide)
500
- - Step Iteration: {step_iteration} (times this step has run)
501
- - Step: supervise (final verification)
502
- - Report Directory: .takt/reports/{report_dir}/
503
- - Report Files:
504
- - Validation: .takt/reports/{report_dir}/05-supervisor-validation.md
505
- - Summary: .takt/reports/{report_dir}/summary.md
506
-
507
- ## Original User Request
508
- {task}
509
-
510
- ## Git Diff
511
- ```diff
512
- {git_diff}
513
- ```
514
-
515
- ## Instructions
516
260
  Run tests, verify the build, and perform final approval.
517
261
 
518
262
  **Workflow Overall Review:**
@@ -523,10 +267,6 @@ steps:
523
267
  **Review Reports:** Read all reports in Report Directory and
524
268
  check for any unaddressed improvement suggestions.
525
269
 
526
- **Report output:** Output to the `Report Files` specified above.
527
- - If file does not exist: Create new file
528
- - If file exists: Append with `## Iteration {step_iteration}` section
529
-
530
270
  **Validation report format:**
531
271
  ```markdown
532
272
  # Final Validation Results
@@ -569,8 +309,8 @@ steps:
569
309
  ## Review Results
570
310
  | Review | Result |
571
311
  |--------|--------|
572
- | Architect | ✅ APPROVE |
573
312
  | AI Review | ✅ APPROVE |
313
+ | Architect | ✅ APPROVE |
574
314
  | Supervisor | ✅ APPROVE |
575
315
 
576
316
  ## Verification Commands
@@ -579,8 +319,3 @@ steps:
579
319
  npm run build
580
320
  ```
581
321
  ```
582
- transitions:
583
- - condition: approved
584
- next_step: COMPLETE
585
- - condition: rejected
586
- next_step: plan