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