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