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.
- package/README.md +186 -162
- package/dist/agents/runner.d.ts +2 -4
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +6 -35
- package/dist/agents/runner.js.map +1 -1
- package/dist/claude/client.d.ts +31 -6
- package/dist/claude/client.d.ts.map +1 -1
- package/dist/claude/client.js +78 -30
- package/dist/claude/client.js.map +1 -1
- package/dist/claude/executor.d.ts.map +1 -1
- package/dist/claude/executor.js +17 -8
- package/dist/claude/executor.js.map +1 -1
- package/dist/claude/index.d.ts +1 -1
- package/dist/claude/index.d.ts.map +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/claude/index.js.map +1 -1
- package/dist/cli.d.ts +5 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +160 -119
- package/dist/cli.js.map +1 -1
- package/dist/codex/client.d.ts +0 -1
- package/dist/codex/client.d.ts.map +1 -1
- package/dist/codex/client.js +3 -6
- package/dist/codex/client.js.map +1 -1
- package/dist/commands/addTask.d.ts +15 -8
- package/dist/commands/addTask.d.ts.map +1 -1
- package/dist/commands/addTask.js +63 -26
- package/dist/commands/addTask.js.map +1 -1
- package/dist/commands/eject.d.ts +13 -0
- package/dist/commands/eject.d.ts.map +1 -0
- package/dist/commands/eject.js +105 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/index.d.ts +2 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -2
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/interactive.d.ts +28 -0
- package/dist/commands/interactive.d.ts.map +1 -0
- package/dist/commands/interactive.js +186 -0
- package/dist/commands/interactive.js.map +1 -0
- package/dist/commands/taskExecution.js +2 -2
- package/dist/commands/taskExecution.js.map +1 -1
- package/dist/commands/workflowExecution.d.ts.map +1 -1
- package/dist/commands/workflowExecution.js +85 -18
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/agentLoader.d.ts +3 -1
- package/dist/config/agentLoader.d.ts.map +1 -1
- package/dist/config/agentLoader.js +17 -24
- package/dist/config/agentLoader.js.map +1 -1
- package/dist/config/globalConfig.d.ts +2 -0
- package/dist/config/globalConfig.d.ts.map +1 -1
- package/dist/config/globalConfig.js +14 -0
- package/dist/config/globalConfig.js.map +1 -1
- package/dist/config/initialization.d.ts +7 -5
- package/dist/config/initialization.d.ts.map +1 -1
- package/dist/config/initialization.js +23 -21
- package/dist/config/initialization.js.map +1 -1
- package/dist/config/paths.d.ts +5 -0
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +9 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/config/workflowLoader.d.ts +6 -4
- package/dist/config/workflowLoader.d.ts.map +1 -1
- package/dist/config/workflowLoader.js +190 -35
- package/dist/config/workflowLoader.js.map +1 -1
- package/dist/github/issue.d.ts +72 -0
- package/dist/github/issue.d.ts.map +1 -0
- package/dist/github/issue.js +143 -0
- package/dist/github/issue.js.map +1 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/schemas.d.ts +164 -90
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +77 -51
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +51 -20
- package/dist/models/types.d.ts.map +1 -1
- package/dist/prompt/index.d.ts +0 -7
- package/dist/prompt/index.d.ts.map +1 -1
- package/dist/prompt/index.js +0 -11
- package/dist/prompt/index.js.map +1 -1
- package/dist/providers/claude.js +2 -2
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +0 -2
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/resources/index.d.ts +3 -22
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -73
- package/dist/resources/index.js.map +1 -1
- package/dist/task/display.js +1 -1
- package/dist/task/display.js.map +1 -1
- package/dist/utils/session.d.ts +74 -10
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +101 -51
- package/dist/utils/session.js.map +1 -1
- package/dist/workflow/engine.d.ts +34 -1
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +228 -36
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +1 -1
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/instruction-builder.d.ts +87 -18
- package/dist/workflow/instruction-builder.d.ts.map +1 -1
- package/dist/workflow/instruction-builder.js +404 -57
- package/dist/workflow/instruction-builder.js.map +1 -1
- package/dist/workflow/parallel-logger.d.ts +76 -0
- package/dist/workflow/parallel-logger.d.ts.map +1 -0
- package/dist/workflow/parallel-logger.js +173 -0
- package/dist/workflow/parallel-logger.js.map +1 -0
- package/dist/workflow/phase-runner.d.ts +40 -0
- package/dist/workflow/phase-runner.d.ts.map +1 -0
- package/dist/workflow/phase-runner.js +69 -0
- package/dist/workflow/phase-runner.js.map +1 -0
- package/dist/workflow/rule-evaluator.d.ts +64 -0
- package/dist/workflow/rule-evaluator.d.ts.map +1 -0
- package/dist/workflow/rule-evaluator.js +178 -0
- package/dist/workflow/rule-evaluator.js.map +1 -0
- package/dist/workflow/rule-utils.d.ts +13 -0
- package/dist/workflow/rule-utils.d.ts.map +1 -0
- package/dist/workflow/rule-utils.js +17 -0
- package/dist/workflow/rule-utils.js.map +1 -0
- package/dist/workflow/transitions.d.ts +5 -13
- package/dist/workflow/transitions.d.ts.map +1 -1
- package/dist/workflow/transitions.js +8 -78
- package/dist/workflow/transitions.js.map +1 -1
- package/dist/workflow/types.d.ts +2 -1
- package/dist/workflow/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/global/en/agents/default/ai-antipattern-reviewer.md +84 -15
- package/resources/global/en/agents/default/{architect.md → architecture-reviewer.md} +144 -44
- package/resources/global/en/agents/default/coder.md +4 -4
- package/resources/global/en/agents/default/planner.md +16 -9
- package/resources/global/en/agents/default/{security.md → security-reviewer.md} +23 -5
- package/resources/global/en/agents/default/supervisor.md +22 -2
- package/resources/global/en/agents/expert/frontend-reviewer.md +0 -17
- package/resources/global/en/agents/expert/qa-reviewer.md +0 -16
- package/resources/global/en/agents/expert/security-reviewer.md +0 -16
- package/resources/global/en/agents/expert/supervisor.md +2 -0
- package/resources/global/en/agents/expert-cqrs/cqrs-es-reviewer.md +0 -17
- package/resources/global/en/agents/templates/coder.md +128 -0
- package/resources/global/en/agents/templates/planner.md +44 -0
- package/resources/global/en/agents/templates/reviewer.md +57 -0
- package/resources/global/en/agents/templates/supervisor.md +64 -0
- package/resources/global/en/workflows/default.yaml +232 -772
- package/resources/global/en/workflows/expert-cqrs.yaml +319 -698
- package/resources/global/en/workflows/expert.yaml +348 -723
- package/resources/global/en/workflows/magi.yaml +45 -52
- package/resources/global/en/workflows/research.yaml +18 -99
- package/resources/global/en/workflows/simple.yaml +152 -421
- package/resources/global/ja/agents/default/ai-antipattern-reviewer.md +84 -15
- package/resources/global/ja/agents/default/{architect.md → architecture-reviewer.md} +148 -48
- package/resources/global/ja/agents/default/coder.md +4 -4
- package/resources/global/ja/agents/default/planner.md +16 -9
- package/resources/global/ja/agents/default/{security.md → security-reviewer.md} +23 -5
- package/resources/global/ja/agents/default/supervisor.md +22 -2
- package/resources/global/ja/agents/expert/frontend-reviewer.md +0 -18
- package/resources/global/ja/agents/expert/qa-reviewer.md +0 -16
- package/resources/global/ja/agents/expert/security-reviewer.md +0 -16
- package/resources/global/ja/agents/expert/supervisor.md +2 -0
- package/resources/global/ja/agents/expert-cqrs/cqrs-es-reviewer.md +0 -18
- package/resources/global/ja/agents/templates/coder.md +128 -0
- package/resources/global/ja/agents/templates/planner.md +44 -0
- package/resources/global/ja/agents/templates/reviewer.md +57 -0
- package/resources/global/ja/agents/templates/supervisor.md +64 -0
- package/resources/global/ja/workflows/default.yaml +227 -773
- package/resources/global/ja/workflows/expert-cqrs.yaml +309 -833
- package/resources/global/ja/workflows/expert.yaml +325 -712
- package/resources/global/ja/workflows/magi.yaml +45 -52
- package/resources/global/ja/workflows/research.yaml +18 -99
- package/resources/global/ja/workflows/simple.yaml +145 -415
- package/dist/commands/help.d.ts +0 -8
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/help.js +0 -48
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/refreshBuiltin.d.ts +0 -11
- package/dist/commands/refreshBuiltin.d.ts.map +0 -1
- package/dist/commands/refreshBuiltin.js +0 -37
- package/dist/commands/refreshBuiltin.js.map +0 -1
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
# Default TAKT Workflow
|
|
2
|
-
# Plan -> Coder ->
|
|
2
|
+
# Plan -> Coder -> AI Review -> Reviewers (parallel: Architect + Security) -> Supervisor Approval
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# {
|
|
10
|
-
# {
|
|
11
|
-
# {
|
|
12
|
-
# {
|
|
4
|
+
# Boilerplate sections (Workflow Context, User Request, Previous Response,
|
|
5
|
+
# Additional User Inputs, Instructions heading) are auto-injected by buildInstruction().
|
|
6
|
+
# Only step-specific content belongs in instruction_template.
|
|
7
|
+
#
|
|
8
|
+
# Template Variables (available in instruction_template):
|
|
9
|
+
# {iteration} - Workflow-wide turn count (total steps executed across all agents)
|
|
10
|
+
# {max_iterations} - Maximum iterations allowed for the workflow
|
|
11
|
+
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
|
|
12
|
+
# {previous_response} - Output from the previous step (only when pass_previous_response: true)
|
|
13
|
+
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
|
|
14
|
+
#
|
|
15
|
+
# Step-level Fields:
|
|
16
|
+
# report: - Report file(s) for the step (auto-injected as Report File/Files in Workflow Context)
|
|
17
|
+
# Single: report: 00-plan.md
|
|
18
|
+
# Multiple: report:
|
|
19
|
+
# - Scope: 01-coder-scope.md
|
|
20
|
+
# - Decisions: 02-coder-decisions.md
|
|
13
21
|
|
|
14
22
|
name: default
|
|
15
23
|
description: Standard development workflow with planning and specialized reviews
|
|
16
24
|
|
|
17
|
-
max_iterations:
|
|
25
|
+
max_iterations: 30
|
|
18
26
|
|
|
19
27
|
initial_step: plan
|
|
20
28
|
|
|
21
29
|
steps:
|
|
22
30
|
- name: plan
|
|
23
|
-
|
|
31
|
+
edit: false
|
|
32
|
+
agent: ../agents/default/planner.md
|
|
33
|
+
report:
|
|
34
|
+
name: 00-plan.md
|
|
35
|
+
format: |
|
|
36
|
+
```markdown
|
|
37
|
+
# Task Plan
|
|
38
|
+
|
|
39
|
+
## Original Request
|
|
40
|
+
{User's request as-is}
|
|
41
|
+
|
|
42
|
+
## Analysis Results
|
|
43
|
+
|
|
44
|
+
### Objective
|
|
45
|
+
{What needs to be achieved}
|
|
46
|
+
|
|
47
|
+
### Scope
|
|
48
|
+
{Impact scope}
|
|
49
|
+
|
|
50
|
+
### Implementation Approach
|
|
51
|
+
{How to proceed}
|
|
52
|
+
|
|
53
|
+
## Clarifications Needed (if any)
|
|
54
|
+
- {Unclear points or items requiring confirmation}
|
|
55
|
+
```
|
|
24
56
|
allowed_tools:
|
|
25
57
|
- Read
|
|
26
58
|
- Glob
|
|
@@ -29,67 +61,24 @@ steps:
|
|
|
29
61
|
- Bash
|
|
30
62
|
- WebSearch
|
|
31
63
|
- WebFetch
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
```
|
|
64
|
+
rules:
|
|
65
|
+
- condition: Requirements are clear and implementable
|
|
66
|
+
next: implement
|
|
67
|
+
- condition: User is asking a question (not an implementation task)
|
|
68
|
+
next: COMPLETE
|
|
69
|
+
- condition: Requirements unclear, insufficient info
|
|
70
|
+
next: ABORT
|
|
71
|
+
appendix: |
|
|
72
|
+
Clarifications needed:
|
|
73
|
+
- {Question 1}
|
|
74
|
+
- {Question 2}
|
|
75
|
+
pass_previous_response: true
|
|
71
76
|
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
77
|
## Previous Response (when returned from implement)
|
|
83
78
|
{previous_response}
|
|
84
79
|
|
|
85
|
-
## Instructions
|
|
86
80
|
Analyze the task and create an implementation plan.
|
|
87
81
|
|
|
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
82
|
**Note:** If returned from implement step (Previous Response exists),
|
|
94
83
|
review and revise the plan based on that feedback (replan).
|
|
95
84
|
|
|
@@ -98,42 +87,12 @@ steps:
|
|
|
98
87
|
2. Identify impact scope
|
|
99
88
|
3. Decide implementation approach
|
|
100
89
|
|
|
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
90
|
- name: implement
|
|
136
|
-
|
|
91
|
+
edit: true
|
|
92
|
+
agent: ../agents/default/coder.md
|
|
93
|
+
report:
|
|
94
|
+
- Scope: 01-coder-scope.md
|
|
95
|
+
- Decisions: 02-coder-decisions.md
|
|
137
96
|
allowed_tools:
|
|
138
97
|
- Read
|
|
139
98
|
- Glob
|
|
@@ -144,58 +103,15 @@ steps:
|
|
|
144
103
|
- WebSearch
|
|
145
104
|
- WebFetch
|
|
146
105
|
permission_mode: acceptEdits
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
```
|
|
106
|
+
rules:
|
|
107
|
+
- condition: Implementation complete
|
|
108
|
+
next: ai_review
|
|
109
|
+
- condition: Cannot proceed, insufficient info
|
|
110
|
+
next: plan
|
|
175
111
|
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
112
|
Follow the plan from the plan step and implement.
|
|
193
113
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
|
194
114
|
|
|
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
115
|
**Scope report format (create at implementation start):**
|
|
200
116
|
```markdown
|
|
201
117
|
# Change Scope Declaration
|
|
@@ -225,208 +141,38 @@ steps:
|
|
|
225
141
|
- **Options Considered**: {List of options}
|
|
226
142
|
- **Reason**: {Why this option was chosen}
|
|
227
143
|
```
|
|
228
|
-
transitions:
|
|
229
|
-
- condition: done
|
|
230
|
-
next_step: review
|
|
231
|
-
- condition: blocked
|
|
232
|
-
next_step: plan
|
|
233
|
-
|
|
234
|
-
- name: review
|
|
235
|
-
agent: ~/.takt/agents/default/architect.md
|
|
236
|
-
allowed_tools:
|
|
237
|
-
- Read
|
|
238
|
-
- Glob
|
|
239
|
-
- Grep
|
|
240
|
-
- Write
|
|
241
|
-
- WebSearch
|
|
242
|
-
- WebFetch
|
|
243
|
-
status_rules_prompt: |
|
|
244
|
-
## Judgment Criteria
|
|
245
|
-
|
|
246
|
-
| Situation | Judgment |
|
|
247
|
-
|-----------|----------|
|
|
248
|
-
| Structural issues | REJECT |
|
|
249
|
-
| Design principle violations | REJECT |
|
|
250
|
-
| Security issues | REJECT |
|
|
251
|
-
| Insufficient tests | REJECT |
|
|
252
|
-
| Minor improvements needed | IMPROVE |
|
|
253
|
-
| No issues | APPROVE |
|
|
254
|
-
|
|
255
|
-
**How to use IMPROVE:**
|
|
256
|
-
- Design is acceptable but there are points that could be better
|
|
257
|
-
- Examples: naming improvements, small refactoring, adding comments
|
|
258
|
-
|
|
259
|
-
## Output Format
|
|
260
|
-
|
|
261
|
-
| Situation | Tag |
|
|
262
|
-
|-----------|-----|
|
|
263
|
-
| No issues | `[ARCHITECT:APPROVE]` |
|
|
264
|
-
| Minor improvements needed | `[ARCHITECT:IMPROVE]` |
|
|
265
|
-
| Structural changes required | `[ARCHITECT:REJECT]` |
|
|
266
|
-
|
|
267
|
-
### Output Examples
|
|
268
|
-
|
|
269
|
-
**APPROVE case:**
|
|
270
|
-
```
|
|
271
|
-
[ARCHITECT:APPROVE]
|
|
272
|
-
|
|
273
|
-
Positive points:
|
|
274
|
-
- Appropriate module organization
|
|
275
|
-
- Single responsibility maintained
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**IMPROVE case:**
|
|
279
|
-
```
|
|
280
|
-
[ARCHITECT:IMPROVE]
|
|
281
|
-
|
|
282
|
-
Improvements:
|
|
283
|
-
- Improve naming: `data` → `userData`
|
|
284
|
-
- Add comments
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**REJECT case:**
|
|
288
|
-
```
|
|
289
|
-
[ARCHITECT:REJECT]
|
|
290
|
-
|
|
291
|
-
Issues:
|
|
292
|
-
1. File size exceeded
|
|
293
|
-
- Location: `src/services/user.ts` (523 lines)
|
|
294
|
-
- Fix: Split into 3 files
|
|
295
|
-
```
|
|
296
|
-
instruction_template: |
|
|
297
|
-
## Workflow Context
|
|
298
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
299
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
300
|
-
- Step: review (Architecture Review)
|
|
301
|
-
- Report Directory: .takt/reports/{report_dir}/
|
|
302
|
-
- Report File: .takt/reports/{report_dir}/03-architect-review.md
|
|
303
|
-
|
|
304
|
-
## Original User Request (Initial request from workflow start)
|
|
305
|
-
{task}
|
|
306
|
-
|
|
307
|
-
## Git Diff
|
|
308
|
-
```diff
|
|
309
|
-
{git_diff}
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
## Instructions
|
|
313
|
-
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the next step).
|
|
314
|
-
|
|
315
|
-
Review the changes and provide feedback.
|
|
316
|
-
|
|
317
|
-
**Report output:** Output to the `Report File` specified above.
|
|
318
|
-
- If file does not exist: Create new file
|
|
319
|
-
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
320
|
-
|
|
321
|
-
**Report format:**
|
|
322
|
-
```markdown
|
|
323
|
-
# Architecture Review
|
|
324
|
-
|
|
325
|
-
## Result: APPROVE / IMPROVE / REJECT
|
|
326
|
-
|
|
327
|
-
## Summary
|
|
328
|
-
{1-2 sentences summarizing result}
|
|
329
|
-
|
|
330
|
-
## Reviewed Perspectives
|
|
331
|
-
- [x] Structure & Design
|
|
332
|
-
- [x] Code Quality
|
|
333
|
-
- [x] Change Scope
|
|
334
|
-
|
|
335
|
-
## Issues (if REJECT)
|
|
336
|
-
| # | Location | Issue | Fix |
|
|
337
|
-
|---|----------|-------|-----|
|
|
338
|
-
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
339
|
-
|
|
340
|
-
## Improvement Suggestions (optional, non-blocking)
|
|
341
|
-
- {Future improvement suggestions}
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**Cognitive load reduction rules:**
|
|
345
|
-
- APPROVE + no issues → Summary only (5 lines or less)
|
|
346
|
-
- APPROVE + minor suggestions → Summary + suggestions (15 lines or less)
|
|
347
|
-
- REJECT → Issues in table format (30 lines or less)
|
|
348
|
-
transitions:
|
|
349
|
-
- condition: approved
|
|
350
|
-
next_step: ai_review
|
|
351
|
-
- condition: improve
|
|
352
|
-
next_step: improve
|
|
353
|
-
- condition: rejected
|
|
354
|
-
next_step: fix
|
|
355
|
-
|
|
356
|
-
- name: improve
|
|
357
|
-
agent: ~/.takt/agents/default/coder.md
|
|
358
|
-
allowed_tools:
|
|
359
|
-
- Read
|
|
360
|
-
- Glob
|
|
361
|
-
- Grep
|
|
362
|
-
- Edit
|
|
363
|
-
- Write
|
|
364
|
-
- Bash
|
|
365
|
-
- WebSearch
|
|
366
|
-
- WebFetch
|
|
367
|
-
permission_mode: acceptEdits
|
|
368
|
-
status_rules_prompt: |
|
|
369
|
-
## Output Format
|
|
370
|
-
|
|
371
|
-
| Situation | Tag |
|
|
372
|
-
|-----------|-----|
|
|
373
|
-
| Improvements complete | `[CODER:DONE]` |
|
|
374
|
-
| Cannot decide/insufficient info | `[CODER:BLOCKED]` |
|
|
375
|
-
|
|
376
|
-
**Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
|
|
377
|
-
|
|
378
|
-
### Output Examples
|
|
379
|
-
|
|
380
|
-
**DONE case:**
|
|
381
|
-
```
|
|
382
|
-
Improvements complete.
|
|
383
|
-
- Improved naming: `data` → `userData`
|
|
384
|
-
- Added comments
|
|
385
|
-
|
|
386
|
-
[CODER:DONE]
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
**BLOCKED case:**
|
|
390
|
-
```
|
|
391
|
-
[CODER:BLOCKED]
|
|
392
|
-
|
|
393
|
-
Reason: Improvement intent unclear
|
|
394
|
-
Required info: Specific improvement details
|
|
395
|
-
```
|
|
396
|
-
instruction_template: |
|
|
397
|
-
## Workflow Context
|
|
398
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
399
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
400
|
-
- Step: improve
|
|
401
|
-
|
|
402
|
-
## Architect Feedback (This is the latest instruction - prioritize this)
|
|
403
|
-
{previous_response}
|
|
404
|
-
|
|
405
|
-
## Original User Request (Initial request from workflow start - for reference)
|
|
406
|
-
{task}
|
|
407
|
-
|
|
408
|
-
## Additional User Inputs
|
|
409
|
-
{user_inputs}
|
|
410
|
-
|
|
411
|
-
## Instructions
|
|
412
|
-
**Important**: Address the Architect's improvement suggestions.
|
|
413
|
-
These are minor improvements, not major design issues.
|
|
414
|
-
|
|
415
|
-
Make improvements such as:
|
|
416
|
-
- Naming improvements
|
|
417
|
-
- Small refactoring
|
|
418
|
-
- Adding/fixing comments
|
|
419
|
-
- Code organization
|
|
420
|
-
|
|
421
|
-
pass_previous_response: true
|
|
422
|
-
transitions:
|
|
423
|
-
- condition: done
|
|
424
|
-
next_step: review
|
|
425
|
-
- condition: blocked
|
|
426
|
-
next_step: plan
|
|
427
144
|
|
|
428
145
|
- name: ai_review
|
|
429
|
-
|
|
146
|
+
edit: false
|
|
147
|
+
agent: ../agents/default/ai-antipattern-reviewer.md
|
|
148
|
+
report:
|
|
149
|
+
name: 03-ai-review.md
|
|
150
|
+
format: |
|
|
151
|
+
```markdown
|
|
152
|
+
# AI-Generated Code Review
|
|
153
|
+
|
|
154
|
+
## Result: APPROVE / REJECT
|
|
155
|
+
|
|
156
|
+
## Summary
|
|
157
|
+
{One sentence summarizing result}
|
|
158
|
+
|
|
159
|
+
## Verified Items
|
|
160
|
+
| Aspect | Result | Notes |
|
|
161
|
+
|--------|--------|-------|
|
|
162
|
+
| Assumption validity | ✅ | - |
|
|
163
|
+
| API/Library existence | ✅ | - |
|
|
164
|
+
| Context fit | ✅ | - |
|
|
165
|
+
| Scope | ✅ | - |
|
|
166
|
+
|
|
167
|
+
## Issues (if REJECT)
|
|
168
|
+
| # | Category | Location | Issue |
|
|
169
|
+
|---|----------|----------|-------|
|
|
170
|
+
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Cognitive load reduction rules:**
|
|
174
|
+
- No issues -> Summary 1 line + check table only (10 lines or less)
|
|
175
|
+
- Issues found -> + Issues in table format (25 lines or less)
|
|
430
176
|
allowed_tools:
|
|
431
177
|
- Read
|
|
432
178
|
- Glob
|
|
@@ -434,104 +180,21 @@ steps:
|
|
|
434
180
|
- Write
|
|
435
181
|
- WebSearch
|
|
436
182
|
- WebFetch
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
| Incorrect assumptions (affecting behavior) | REJECT |
|
|
443
|
-
| Plausible-but-wrong code | REJECT |
|
|
444
|
-
| Significant context mismatch with codebase | REJECT |
|
|
445
|
-
| Scope creep | APPROVE (with warning noted) |
|
|
446
|
-
| Minor style deviations only | APPROVE |
|
|
447
|
-
| Code fits context and works | APPROVE |
|
|
448
|
-
|
|
449
|
-
**Note:** Scope creep is noted as a warning but doesn't warrant REJECT alone.
|
|
450
|
-
|
|
451
|
-
## Output Format
|
|
452
|
-
|
|
453
|
-
| Situation | Tag |
|
|
454
|
-
|-----------|-----|
|
|
455
|
-
| No AI-specific issues | `[AI_REVIEW:APPROVE]` |
|
|
456
|
-
| Issues found | `[AI_REVIEW:REJECT]` |
|
|
457
|
-
|
|
458
|
-
### Output Examples
|
|
459
|
-
|
|
460
|
-
**APPROVE case:**
|
|
461
|
-
```
|
|
462
|
-
[AI_REVIEW:APPROVE]
|
|
463
|
-
|
|
464
|
-
Verification result: No issues
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
**REJECT case:**
|
|
468
|
-
```
|
|
469
|
-
[AI_REVIEW:REJECT]
|
|
470
|
-
|
|
471
|
-
Issues:
|
|
472
|
-
1. Non-existent API used: `fetch.json()` → `response.json()`
|
|
473
|
-
```
|
|
183
|
+
rules:
|
|
184
|
+
- condition: No AI-specific issues
|
|
185
|
+
next: reviewers
|
|
186
|
+
- condition: AI-specific issues found
|
|
187
|
+
next: ai_fix
|
|
474
188
|
instruction_template: |
|
|
475
|
-
## Workflow Context
|
|
476
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
477
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
478
|
-
- Step: ai_review (AI-Generated Code Review)
|
|
479
|
-
- Report Directory: .takt/reports/{report_dir}/
|
|
480
|
-
- Report File: .takt/reports/{report_dir}/04-ai-review.md
|
|
481
|
-
|
|
482
|
-
## Original User Request (Initial request from workflow start)
|
|
483
|
-
{task}
|
|
484
|
-
|
|
485
|
-
## Git Diff
|
|
486
|
-
```diff
|
|
487
|
-
{git_diff}
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
## Instructions
|
|
491
189
|
Review the code for AI-specific issues:
|
|
492
190
|
- Assumption validation
|
|
493
191
|
- Plausible but wrong patterns
|
|
494
192
|
- Context fit with existing codebase
|
|
495
193
|
- Scope creep detection
|
|
496
194
|
|
|
497
|
-
**Report output:** Output to the `Report File` specified above.
|
|
498
|
-
- If file does not exist: Create new file
|
|
499
|
-
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
500
|
-
|
|
501
|
-
**Report format:**
|
|
502
|
-
```markdown
|
|
503
|
-
# AI-Generated Code Review
|
|
504
|
-
|
|
505
|
-
## Result: APPROVE / REJECT
|
|
506
|
-
|
|
507
|
-
## Summary
|
|
508
|
-
{One sentence summarizing result}
|
|
509
|
-
|
|
510
|
-
## Verified Items
|
|
511
|
-
| Aspect | Result | Notes |
|
|
512
|
-
|--------|--------|-------|
|
|
513
|
-
| Assumption validity | ✅ | - |
|
|
514
|
-
| API/Library existence | ✅ | - |
|
|
515
|
-
| Context fit | ✅ | - |
|
|
516
|
-
| Scope | ✅ | - |
|
|
517
|
-
|
|
518
|
-
## Issues (if REJECT)
|
|
519
|
-
| # | Category | Location | Issue |
|
|
520
|
-
|---|----------|----------|-------|
|
|
521
|
-
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
**Cognitive load reduction rules:**
|
|
525
|
-
- No issues → Summary 1 line + check table only (10 lines or less)
|
|
526
|
-
- Issues found → + Issues in table format (25 lines or less)
|
|
527
|
-
transitions:
|
|
528
|
-
- condition: approved
|
|
529
|
-
next_step: security_review
|
|
530
|
-
- condition: rejected
|
|
531
|
-
next_step: ai_fix
|
|
532
|
-
|
|
533
195
|
- name: ai_fix
|
|
534
|
-
|
|
196
|
+
edit: true
|
|
197
|
+
agent: ../agents/default/coder.md
|
|
535
198
|
allowed_tools:
|
|
536
199
|
- Read
|
|
537
200
|
- Glob
|
|
@@ -542,235 +205,131 @@ steps:
|
|
|
542
205
|
- WebSearch
|
|
543
206
|
- WebFetch
|
|
544
207
|
permission_mode: acceptEdits
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
| AI issue fixes complete | `[CODER:DONE]` |
|
|
551
|
-
| Cannot decide/insufficient info | `[CODER:BLOCKED]` |
|
|
552
|
-
|
|
553
|
-
**Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
|
|
554
|
-
|
|
555
|
-
### Output Examples
|
|
556
|
-
|
|
557
|
-
**DONE case:**
|
|
558
|
-
```
|
|
559
|
-
Fixed AI Reviewer's issues.
|
|
560
|
-
- Fixed non-existent API: `fetch.json()` → `response.json()`
|
|
561
|
-
|
|
562
|
-
[CODER:DONE]
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
**BLOCKED case:**
|
|
566
|
-
```
|
|
567
|
-
[CODER:BLOCKED]
|
|
568
|
-
|
|
569
|
-
Reason: Fix method unclear
|
|
570
|
-
Required info: Alternative API specification
|
|
571
|
-
```
|
|
208
|
+
rules:
|
|
209
|
+
- condition: AI issues fixed
|
|
210
|
+
next: reviewers
|
|
211
|
+
- condition: Cannot proceed, insufficient info
|
|
212
|
+
next: plan
|
|
572
213
|
instruction_template: |
|
|
573
|
-
## Workflow Context
|
|
574
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
575
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
576
|
-
- Step: ai_fix
|
|
577
|
-
|
|
578
214
|
## AI Review Feedback (This is the latest instruction - prioritize this)
|
|
579
215
|
{previous_response}
|
|
580
216
|
|
|
581
|
-
## Original User Request (Initial request from workflow start - for reference)
|
|
582
|
-
{task}
|
|
583
|
-
|
|
584
|
-
## Additional User Inputs
|
|
585
|
-
{user_inputs}
|
|
586
|
-
|
|
587
|
-
## Instructions
|
|
588
217
|
**Important**: Address the AI Reviewer's feedback.
|
|
589
218
|
Focus on:
|
|
590
219
|
- Correcting incorrect assumptions
|
|
591
220
|
- Fixing plausible-but-wrong implementations
|
|
592
221
|
- Aligning with existing codebase patterns
|
|
593
222
|
- Removing scope creep
|
|
594
|
-
|
|
595
223
|
pass_previous_response: true
|
|
596
|
-
transitions:
|
|
597
|
-
- condition: done
|
|
598
|
-
next_step: review
|
|
599
|
-
- condition: blocked
|
|
600
|
-
next_step: plan
|
|
601
|
-
|
|
602
|
-
- name: security_review
|
|
603
|
-
agent: ~/.takt/agents/default/security.md
|
|
604
|
-
allowed_tools:
|
|
605
|
-
- Read
|
|
606
|
-
- Glob
|
|
607
|
-
- Grep
|
|
608
|
-
- Write
|
|
609
|
-
- WebSearch
|
|
610
|
-
- WebFetch
|
|
611
|
-
status_rules_prompt: |
|
|
612
|
-
## Judgment Criteria
|
|
613
|
-
|
|
614
|
-
| Situation | Judgment |
|
|
615
|
-
|-----------|----------|
|
|
616
|
-
| Critical vulnerability | REJECT |
|
|
617
|
-
| Medium severity vulnerability | REJECT |
|
|
618
|
-
| Minor issues/warnings only | APPROVE (note warnings) |
|
|
619
|
-
| No security issues | APPROVE |
|
|
620
|
-
|
|
621
|
-
## Output Format
|
|
622
|
-
|
|
623
|
-
| Situation | Tag |
|
|
624
|
-
|-----------|-----|
|
|
625
|
-
| No security issues | `[SECURITY:APPROVE]` |
|
|
626
|
-
| Vulnerabilities require fixes | `[SECURITY:REJECT]` |
|
|
627
|
-
|
|
628
|
-
### Output Examples
|
|
629
|
-
|
|
630
|
-
**APPROVE case:**
|
|
631
|
-
```
|
|
632
|
-
[SECURITY:APPROVE]
|
|
633
|
-
|
|
634
|
-
No security issues detected.
|
|
635
|
-
```
|
|
636
|
-
|
|
637
|
-
**REJECT case:**
|
|
638
|
-
```
|
|
639
|
-
[SECURITY:REJECT]
|
|
640
|
-
|
|
641
|
-
Vulnerabilities:
|
|
642
|
-
1. SQL Injection: `src/db.ts:42`
|
|
643
|
-
Fix: Use parameterized query
|
|
644
|
-
```
|
|
645
|
-
instruction_template: |
|
|
646
|
-
## Workflow Context
|
|
647
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
648
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
649
|
-
- Step: security_review
|
|
650
|
-
- Report Directory: .takt/reports/{report_dir}/
|
|
651
|
-
- Report File: .takt/reports/{report_dir}/05-security-review.md
|
|
652
|
-
|
|
653
|
-
## Original User Request (Initial request from workflow start)
|
|
654
|
-
{task}
|
|
655
|
-
|
|
656
|
-
## Git Diff
|
|
657
|
-
```diff
|
|
658
|
-
{git_diff}
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
## Instructions
|
|
662
|
-
Perform security review on the changes. Check for vulnerabilities including:
|
|
663
|
-
- Injection attacks (SQL, Command, XSS)
|
|
664
|
-
- Authentication/Authorization issues
|
|
665
|
-
- Data exposure risks
|
|
666
|
-
- Cryptographic weaknesses
|
|
667
|
-
|
|
668
|
-
**Report output:** Output to the `Report File` specified above.
|
|
669
|
-
- If file does not exist: Create new file
|
|
670
|
-
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
671
|
-
|
|
672
|
-
**Report format:**
|
|
673
|
-
```markdown
|
|
674
|
-
# Security Review
|
|
675
|
-
|
|
676
|
-
## Result: APPROVE / REJECT
|
|
677
|
-
|
|
678
|
-
## Severity: None / Low / Medium / High / Critical
|
|
679
|
-
|
|
680
|
-
## Check Results
|
|
681
|
-
| Category | Result | Notes |
|
|
682
|
-
|----------|--------|-------|
|
|
683
|
-
| Injection | ✅ | - |
|
|
684
|
-
| Auth/Authz | ✅ | - |
|
|
685
|
-
| Data Protection | ✅ | - |
|
|
686
|
-
| Dependencies | ✅ | - |
|
|
687
|
-
|
|
688
|
-
## Vulnerabilities (if REJECT)
|
|
689
|
-
| # | Severity | Type | Location | Fix |
|
|
690
|
-
|---|----------|------|----------|-----|
|
|
691
|
-
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
|
|
692
224
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
225
|
+
- name: reviewers
|
|
226
|
+
parallel:
|
|
227
|
+
- name: arch-review
|
|
228
|
+
edit: false
|
|
229
|
+
agent: ../agents/default/architecture-reviewer.md
|
|
230
|
+
report:
|
|
231
|
+
name: 04-architect-review.md
|
|
232
|
+
format: |
|
|
233
|
+
```markdown
|
|
234
|
+
# Architecture Review
|
|
235
|
+
|
|
236
|
+
## Result: APPROVE / IMPROVE / REJECT
|
|
237
|
+
|
|
238
|
+
## Summary
|
|
239
|
+
{1-2 sentences summarizing result}
|
|
240
|
+
|
|
241
|
+
## Reviewed Perspectives
|
|
242
|
+
- [x] Structure & Design
|
|
243
|
+
- [x] Code Quality
|
|
244
|
+
- [x] Change Scope
|
|
245
|
+
|
|
246
|
+
## Issues (if REJECT)
|
|
247
|
+
| # | Location | Issue | Fix |
|
|
248
|
+
|---|----------|-------|-----|
|
|
249
|
+
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
250
|
+
|
|
251
|
+
## Improvement Suggestions (optional, non-blocking)
|
|
252
|
+
- {Future improvement suggestions}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Cognitive load reduction rules:**
|
|
256
|
+
- APPROVE + no issues -> Summary only (5 lines or less)
|
|
257
|
+
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
|
|
258
|
+
- REJECT -> Issues in table format (30 lines or less)
|
|
259
|
+
allowed_tools:
|
|
260
|
+
- Read
|
|
261
|
+
- Glob
|
|
262
|
+
- Grep
|
|
263
|
+
- Write
|
|
264
|
+
- WebSearch
|
|
265
|
+
- WebFetch
|
|
266
|
+
rules:
|
|
267
|
+
- condition: approved
|
|
268
|
+
- condition: needs_fix
|
|
269
|
+
instruction_template: |
|
|
270
|
+
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the ai_review step).
|
|
271
|
+
|
|
272
|
+
Review the changes and provide feedback.
|
|
273
|
+
|
|
274
|
+
- name: security-review
|
|
275
|
+
edit: false
|
|
276
|
+
agent: ../agents/default/security-reviewer.md
|
|
277
|
+
report:
|
|
278
|
+
name: 05-security-review.md
|
|
279
|
+
format: |
|
|
280
|
+
```markdown
|
|
281
|
+
# Security Review
|
|
282
|
+
|
|
283
|
+
## Result: APPROVE / REJECT
|
|
284
|
+
|
|
285
|
+
## Severity: None / Low / Medium / High / Critical
|
|
286
|
+
|
|
287
|
+
## Check Results
|
|
288
|
+
| Category | Result | Notes |
|
|
289
|
+
|----------|--------|-------|
|
|
290
|
+
| Injection | ✅ | - |
|
|
291
|
+
| Auth/Authz | ✅ | - |
|
|
292
|
+
| Data Protection | ✅ | - |
|
|
293
|
+
| Dependencies | ✅ | - |
|
|
294
|
+
|
|
295
|
+
## Vulnerabilities (if REJECT)
|
|
296
|
+
| # | Severity | Type | Location | Fix |
|
|
297
|
+
|---|----------|------|----------|-----|
|
|
298
|
+
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
|
|
299
|
+
|
|
300
|
+
## Warnings (non-blocking)
|
|
301
|
+
- {Security recommendations}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Cognitive load reduction rules:**
|
|
305
|
+
- No issues -> Check table only (10 lines or less)
|
|
306
|
+
- Warnings -> + Warnings 1-2 lines (15 lines or less)
|
|
307
|
+
- Vulnerabilities -> + Table format (30 lines or less)
|
|
308
|
+
allowed_tools:
|
|
309
|
+
- Read
|
|
310
|
+
- Glob
|
|
311
|
+
- Grep
|
|
312
|
+
- Write
|
|
313
|
+
- WebSearch
|
|
314
|
+
- WebFetch
|
|
315
|
+
rules:
|
|
316
|
+
- condition: approved
|
|
317
|
+
- condition: needs_fix
|
|
318
|
+
instruction_template: |
|
|
319
|
+
Perform security review on the changes. Check for vulnerabilities including:
|
|
320
|
+
- Injection attacks (SQL, Command, XSS)
|
|
321
|
+
- Authentication/Authorization issues
|
|
322
|
+
- Data exposure risks
|
|
323
|
+
- Cryptographic weaknesses
|
|
324
|
+
rules:
|
|
325
|
+
- condition: all("approved")
|
|
326
|
+
next: supervise
|
|
327
|
+
- condition: any("needs_fix")
|
|
328
|
+
next: fix
|
|
771
329
|
|
|
772
330
|
- name: fix
|
|
773
|
-
|
|
331
|
+
edit: true
|
|
332
|
+
agent: ../agents/default/coder.md
|
|
774
333
|
allowed_tools:
|
|
775
334
|
- Read
|
|
776
335
|
- Glob
|
|
@@ -781,63 +340,26 @@ steps:
|
|
|
781
340
|
- WebSearch
|
|
782
341
|
- WebFetch
|
|
783
342
|
permission_mode: acceptEdits
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
| Architect's issues fixed | `[CODER:DONE]` |
|
|
790
|
-
| Cannot decide/insufficient info | `[CODER:BLOCKED]` |
|
|
791
|
-
|
|
792
|
-
**Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
|
|
793
|
-
|
|
794
|
-
### Output Examples
|
|
795
|
-
|
|
796
|
-
**DONE case:**
|
|
797
|
-
```
|
|
798
|
-
Fixed Architect's issues.
|
|
799
|
-
- File split: Split into 3 files
|
|
800
|
-
- Added type definitions
|
|
801
|
-
|
|
802
|
-
[CODER:DONE]
|
|
803
|
-
```
|
|
804
|
-
|
|
805
|
-
**BLOCKED case:**
|
|
806
|
-
```
|
|
807
|
-
[CODER:BLOCKED]
|
|
808
|
-
|
|
809
|
-
Reason: Fix approach unclear
|
|
810
|
-
Required info: Specific split method
|
|
811
|
-
```
|
|
343
|
+
rules:
|
|
344
|
+
- condition: Fix complete
|
|
345
|
+
next: reviewers
|
|
346
|
+
- condition: Cannot proceed, insufficient info
|
|
347
|
+
next: plan
|
|
812
348
|
instruction_template: |
|
|
813
|
-
##
|
|
814
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
815
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
816
|
-
- Step: fix
|
|
817
|
-
|
|
818
|
-
## Architect Feedback (This is the latest instruction - prioritize this)
|
|
349
|
+
## Review Feedback (This is the latest instruction - prioritize this)
|
|
819
350
|
{previous_response}
|
|
820
351
|
|
|
821
|
-
|
|
822
|
-
{task}
|
|
823
|
-
|
|
824
|
-
## Additional User Inputs
|
|
825
|
-
{user_inputs}
|
|
826
|
-
|
|
827
|
-
## Instructions
|
|
828
|
-
**Important**: Address the Architect's feedback.
|
|
352
|
+
**Important**: Address the feedback from the reviewers.
|
|
829
353
|
The "Original User Request" is reference information, not the latest instruction.
|
|
830
|
-
Review the session conversation history and fix the issues raised by the
|
|
831
|
-
|
|
354
|
+
Review the session conversation history and fix the issues raised by the reviewers.
|
|
832
355
|
pass_previous_response: true
|
|
833
|
-
transitions:
|
|
834
|
-
- condition: done
|
|
835
|
-
next_step: review
|
|
836
|
-
- condition: blocked
|
|
837
|
-
next_step: plan
|
|
838
356
|
|
|
839
357
|
- name: supervise
|
|
840
|
-
|
|
358
|
+
edit: false
|
|
359
|
+
agent: ../agents/default/supervisor.md
|
|
360
|
+
report:
|
|
361
|
+
- Validation: 06-supervisor-validation.md
|
|
362
|
+
- Summary: summary.md
|
|
841
363
|
allowed_tools:
|
|
842
364
|
- Read
|
|
843
365
|
- Glob
|
|
@@ -846,65 +368,12 @@ steps:
|
|
|
846
368
|
- Bash
|
|
847
369
|
- WebSearch
|
|
848
370
|
- WebFetch
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
| Requirements not met | REJECT |
|
|
855
|
-
| Tests failing | REJECT |
|
|
856
|
-
| Build fails | REJECT |
|
|
857
|
-
| Workarounds remaining | REJECT |
|
|
858
|
-
| All OK | APPROVE |
|
|
859
|
-
|
|
860
|
-
**Principle**: When in doubt, REJECT. Don't give ambiguous approval.
|
|
861
|
-
|
|
862
|
-
## Output Format
|
|
863
|
-
|
|
864
|
-
| Situation | Tag |
|
|
865
|
-
|-----------|-----|
|
|
866
|
-
| Final approval | `[SUPERVISOR:APPROVE]` |
|
|
867
|
-
| Return for fixes | `[SUPERVISOR:REJECT]` |
|
|
868
|
-
|
|
869
|
-
### Output Examples
|
|
870
|
-
|
|
871
|
-
**APPROVE case:**
|
|
872
|
-
```
|
|
873
|
-
[SUPERVISOR:APPROVE]
|
|
874
|
-
|
|
875
|
-
Verification results:
|
|
876
|
-
- Tests: ✅ All passed
|
|
877
|
-
- Build: ✅ Succeeded
|
|
878
|
-
- Requirements met: ✅
|
|
879
|
-
```
|
|
880
|
-
|
|
881
|
-
**REJECT case:**
|
|
882
|
-
```
|
|
883
|
-
[SUPERVISOR:REJECT]
|
|
884
|
-
|
|
885
|
-
Issues:
|
|
886
|
-
1. Tests failing: `npm test` - 2 failures
|
|
887
|
-
2. Requirements not met: Login feature not implemented
|
|
888
|
-
```
|
|
371
|
+
rules:
|
|
372
|
+
- condition: All checks passed
|
|
373
|
+
next: COMPLETE
|
|
374
|
+
- condition: Requirements unmet, tests failing, build errors
|
|
375
|
+
next: plan
|
|
889
376
|
instruction_template: |
|
|
890
|
-
## Workflow Context
|
|
891
|
-
- Iteration: {iteration}/{max_iterations} (workflow-wide)
|
|
892
|
-
- Step Iteration: {step_iteration} (times this step has run)
|
|
893
|
-
- Step: supervise (final verification)
|
|
894
|
-
- Report Directory: .takt/reports/{report_dir}/
|
|
895
|
-
- Report Files:
|
|
896
|
-
- Validation: .takt/reports/{report_dir}/06-supervisor-validation.md
|
|
897
|
-
- Summary: .takt/reports/{report_dir}/summary.md
|
|
898
|
-
|
|
899
|
-
## Original User Request
|
|
900
|
-
{task}
|
|
901
|
-
|
|
902
|
-
## Git Diff
|
|
903
|
-
```diff
|
|
904
|
-
{git_diff}
|
|
905
|
-
```
|
|
906
|
-
|
|
907
|
-
## Instructions
|
|
908
377
|
Run tests, verify the build, and perform final approval.
|
|
909
378
|
|
|
910
379
|
**Workflow Overall Review:**
|
|
@@ -915,10 +384,6 @@ steps:
|
|
|
915
384
|
**Review Reports:** Read all reports in Report Directory and
|
|
916
385
|
check for any unaddressed improvement suggestions.
|
|
917
386
|
|
|
918
|
-
**Report output:** Output to the `Report Files` specified above.
|
|
919
|
-
- If file does not exist: Create new file
|
|
920
|
-
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
921
|
-
|
|
922
387
|
**Validation report format:**
|
|
923
388
|
```markdown
|
|
924
389
|
# Final Validation Results
|
|
@@ -972,8 +437,3 @@ steps:
|
|
|
972
437
|
npm run build
|
|
973
438
|
```
|
|
974
439
|
```
|
|
975
|
-
transitions:
|
|
976
|
-
- condition: approved
|
|
977
|
-
next_step: COMPLETE
|
|
978
|
-
- condition: rejected
|
|
979
|
-
next_step: plan
|