takt 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/agents/runner.d.ts +2 -0
  2. package/dist/agents/runner.d.ts.map +1 -1
  3. package/dist/agents/runner.js +10 -2
  4. package/dist/agents/runner.js.map +1 -1
  5. package/dist/claude/client.d.ts.map +1 -1
  6. package/dist/claude/client.js +4 -1
  7. package/dist/claude/client.js.map +1 -1
  8. package/dist/claude/executor.d.ts.map +1 -1
  9. package/dist/claude/executor.js +1 -0
  10. package/dist/claude/executor.js.map +1 -1
  11. package/dist/claude/types.d.ts +2 -0
  12. package/dist/claude/types.d.ts.map +1 -1
  13. package/dist/commands/workflowExecution.d.ts.map +1 -1
  14. package/dist/commands/workflowExecution.js +25 -2
  15. package/dist/commands/workflowExecution.js.map +1 -1
  16. package/dist/config/workflowLoader.d.ts.map +1 -1
  17. package/dist/config/workflowLoader.js +1 -0
  18. package/dist/config/workflowLoader.js.map +1 -1
  19. package/dist/models/schemas.d.ts +2 -0
  20. package/dist/models/schemas.d.ts.map +1 -1
  21. package/dist/models/schemas.js +1 -0
  22. package/dist/models/schemas.js.map +1 -1
  23. package/dist/models/types.d.ts +4 -0
  24. package/dist/models/types.d.ts.map +1 -1
  25. package/dist/workflow/engine.d.ts.map +1 -1
  26. package/dist/workflow/engine.js +7 -3
  27. package/dist/workflow/engine.js.map +1 -1
  28. package/dist/workflow/instruction-builder.d.ts +5 -2
  29. package/dist/workflow/instruction-builder.d.ts.map +1 -1
  30. package/dist/workflow/instruction-builder.js +8 -2
  31. package/dist/workflow/instruction-builder.js.map +1 -1
  32. package/dist/workflow/state-manager.d.ts +4 -0
  33. package/dist/workflow/state-manager.d.ts.map +1 -1
  34. package/dist/workflow/state-manager.js +10 -0
  35. package/dist/workflow/state-manager.js.map +1 -1
  36. package/package.json +1 -1
  37. package/resources/global/en/agents/default/ai-reviewer.md +0 -20
  38. package/resources/global/en/agents/default/architect.md +5 -73
  39. package/resources/global/en/agents/default/coder.md +0 -39
  40. package/resources/global/en/agents/default/planner.md +0 -23
  41. package/resources/global/en/agents/default/security.md +0 -16
  42. package/resources/global/en/agents/default/supervisor.md +0 -19
  43. package/resources/global/en/agents/expert-review/cqrs-es-reviewer.md +0 -35
  44. package/resources/global/en/agents/expert-review/frontend-reviewer.md +0 -35
  45. package/resources/global/en/agents/expert-review/qa-reviewer.md +0 -36
  46. package/resources/global/en/agents/expert-review/security-reviewer.md +0 -37
  47. package/resources/global/en/agents/expert-review/supervisor.md +0 -62
  48. package/resources/global/en/agents/magi/balthasar.md +0 -20
  49. package/resources/global/en/agents/magi/casper.md +0 -42
  50. package/resources/global/en/agents/magi/melchior.md +0 -20
  51. package/resources/global/en/agents/research/digger.md +0 -41
  52. package/resources/global/en/agents/research/planner.md +0 -34
  53. package/resources/global/en/agents/research/supervisor.md +0 -36
  54. package/resources/global/en/workflows/default.yaml +419 -46
  55. package/resources/global/en/workflows/expert-review.yaml +217 -22
  56. package/resources/global/en/workflows/magi.yaml +78 -26
  57. package/resources/global/en/workflows/research.yaml +105 -11
  58. package/resources/global/ja/agents/default/ai-reviewer.md +0 -20
  59. package/resources/global/ja/agents/default/architect.md +5 -73
  60. package/resources/global/ja/agents/default/coder.md +1 -41
  61. package/resources/global/ja/agents/default/planner.md +0 -23
  62. package/resources/global/ja/agents/default/security.md +0 -16
  63. package/resources/global/ja/agents/default/supervisor.md +0 -19
  64. package/resources/global/ja/agents/expert-review/cqrs-es-reviewer.md +0 -35
  65. package/resources/global/ja/agents/expert-review/frontend-reviewer.md +0 -35
  66. package/resources/global/ja/agents/expert-review/qa-reviewer.md +0 -36
  67. package/resources/global/ja/agents/expert-review/security-reviewer.md +0 -37
  68. package/resources/global/ja/agents/expert-review/supervisor.md +0 -62
  69. package/resources/global/ja/agents/magi/balthasar.md +0 -20
  70. package/resources/global/ja/agents/magi/casper.md +0 -42
  71. package/resources/global/ja/agents/magi/melchior.md +0 -20
  72. package/resources/global/ja/agents/research/digger.md +0 -41
  73. package/resources/global/ja/agents/research/planner.md +0 -34
  74. package/resources/global/ja/agents/research/supervisor.md +0 -36
  75. package/resources/global/ja/workflows/default.yaml +419 -50
  76. package/resources/global/ja/workflows/expert-review.yaml +217 -22
  77. package/resources/global/ja/workflows/magi.yaml +78 -26
  78. package/resources/global/ja/workflows/research.yaml +105 -11
@@ -1,5 +1,15 @@
1
1
  # Default TAKT Workflow
2
2
  # Plan -> Coder -> Architect Review -> AI Review -> Security Review -> Supervisor Approval
3
+ #
4
+ # Template Variables:
5
+ # {iteration} - Workflow-wide turn count (total steps executed across all agents)
6
+ # {max_iterations} - Maximum iterations allowed for the workflow
7
+ # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
8
+ # {task} - Original user request
9
+ # {previous_response} - Output from the previous step
10
+ # {git_diff} - Current uncommitted changes (git diff)
11
+ # {user_inputs} - Accumulated user inputs during workflow
12
+ # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
3
13
 
4
14
  name: default
5
15
  description: Standard development workflow with planning and specialized reviews
@@ -18,9 +28,45 @@ steps:
18
28
  - Bash
19
29
  - WebSearch
20
30
  - WebFetch
31
+ status_rules_prompt: |
32
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
33
+
34
+ **Without this tag, the workflow will stop.**
35
+ Your final output MUST include a status tag following the rules below.
36
+
37
+ ## Judgment Criteria
38
+
39
+ | Situation | Judgment |
40
+ |-----------|----------|
41
+ | Requirements clear and implementable | DONE |
42
+ | Requirements unclear, insufficient info | BLOCKED |
43
+
44
+ ## Output Format
45
+
46
+ | Situation | Tag |
47
+ |-----------|-----|
48
+ | Analysis complete | `[PLANNER:DONE]` |
49
+ | Insufficient info | `[PLANNER:BLOCKED]` |
50
+
51
+ ### Output Examples
52
+
53
+ **DONE case:**
54
+ ```
55
+ [PLANNER:DONE]
56
+ ```
57
+
58
+ **BLOCKED case:**
59
+ ```
60
+ [PLANNER:BLOCKED]
61
+
62
+ Clarifications needed:
63
+ - {Question 1}
64
+ - {Question 2}
65
+ ```
21
66
  instruction_template: |
22
67
  ## Workflow Context
23
- - Iteration: {iteration}/{max_iterations}
68
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
69
+ - Step Iteration: {step_iteration} (times this step has run)
24
70
  - Step: plan (Task Analysis)
25
71
  - Report Directory: .takt/reports/{report_dir}/
26
72
  - Report File: .takt/reports/{report_dir}/00-plan.md
@@ -44,7 +90,7 @@ steps:
44
90
 
45
91
  **Report output:** Output to the `Report File` specified above.
46
92
  - If file does not exist: Create new file
47
- - If file exists: Append with `## Iteration {iteration}` section
93
+ - If file exists: Append with `## Iteration {step_iteration}` section
48
94
 
49
95
  **Report format:**
50
96
  ```markdown
@@ -67,9 +113,6 @@ steps:
67
113
  ## Clarifications Needed (if any)
68
114
  - {Unclear points or items requiring confirmation}
69
115
  ```
70
-
71
- Output [PLANNER:DONE] when complete.
72
- Output [PLANNER:BLOCKED] if requirements are unclear.
73
116
  pass_previous_response: true
74
117
  transitions:
75
118
  - condition: done
@@ -88,9 +131,43 @@ steps:
88
131
  - Bash
89
132
  - WebSearch
90
133
  - WebFetch
134
+ status_rules_prompt: |
135
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
136
+
137
+ **Without this tag, the workflow will stop.**
138
+ Your final output MUST include a status tag following the rules below.
139
+
140
+ ## Output Format
141
+
142
+ | Situation | Tag |
143
+ |-----------|-----|
144
+ | Implementation complete | `[CODER:DONE]` |
145
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
146
+
147
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
148
+
149
+ ### Output Examples
150
+
151
+ **DONE case:**
152
+ ```
153
+ Implementation complete.
154
+ - Created: `src/auth/service.ts`, `tests/auth.test.ts`
155
+ - Modified: `src/routes.ts`
156
+
157
+ [CODER:DONE]
158
+ ```
159
+
160
+ **BLOCKED case:**
161
+ ```
162
+ [CODER:BLOCKED]
163
+
164
+ Reason: DB schema is undefined, cannot implement
165
+ Required info: users table structure
166
+ ```
91
167
  instruction_template: |
92
168
  ## Workflow Context
93
- - Iteration: {iteration}/{max_iterations}
169
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
170
+ - Step Iteration: {step_iteration} (times this step has run)
94
171
  - Step: implement
95
172
  - Report Directory: .takt/reports/{report_dir}/
96
173
  - Report Files:
@@ -109,7 +186,7 @@ steps:
109
186
 
110
187
  **Report output:** Output to the `Report Files` specified above.
111
188
  - If file does not exist: Create new file
112
- - If file exists: Append with `## Iteration {iteration}` section
189
+ - If file exists: Append with `## Iteration {step_iteration}` section
113
190
 
114
191
  **Scope report format (create at implementation start):**
115
192
  ```markdown
@@ -140,9 +217,6 @@ steps:
140
217
  - **Options Considered**: {List of options}
141
218
  - **Reason**: {Why this option was chosen}
142
219
  ```
143
-
144
- Include [CODER:DONE] when complete.
145
- Include [CODER:BLOCKED] if you cannot proceed (returns to plan).
146
220
  transitions:
147
221
  - condition: done
148
222
  next_step: review
@@ -157,9 +231,68 @@ steps:
157
231
  - Grep
158
232
  - WebSearch
159
233
  - WebFetch
234
+ status_rules_prompt: |
235
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
236
+
237
+ **Without this tag, the workflow will stop.**
238
+ Your final output MUST include a status tag following the rules below.
239
+
240
+ ## Judgment Criteria
241
+
242
+ | Situation | Judgment |
243
+ |-----------|----------|
244
+ | Structural issues | REJECT |
245
+ | Design principle violations | REJECT |
246
+ | Security issues | REJECT |
247
+ | Insufficient tests | REJECT |
248
+ | Minor improvements needed | IMPROVE |
249
+ | No issues | APPROVE |
250
+
251
+ **How to use IMPROVE:**
252
+ - Design is acceptable but there are points that could be better
253
+ - Examples: naming improvements, small refactoring, adding comments
254
+
255
+ ## Output Format
256
+
257
+ | Situation | Tag |
258
+ |-----------|-----|
259
+ | No issues | `[ARCHITECT:APPROVE]` |
260
+ | Minor improvements needed | `[ARCHITECT:IMPROVE]` |
261
+ | Structural changes required | `[ARCHITECT:REJECT]` |
262
+
263
+ ### Output Examples
264
+
265
+ **APPROVE case:**
266
+ ```
267
+ [ARCHITECT:APPROVE]
268
+
269
+ Positive points:
270
+ - Appropriate module organization
271
+ - Single responsibility maintained
272
+ ```
273
+
274
+ **IMPROVE case:**
275
+ ```
276
+ [ARCHITECT:IMPROVE]
277
+
278
+ Improvements:
279
+ - Improve naming: `data` → `userData`
280
+ - Add comments
281
+ ```
282
+
283
+ **REJECT case:**
284
+ ```
285
+ [ARCHITECT:REJECT]
286
+
287
+ Issues:
288
+ 1. File size exceeded
289
+ - Location: `src/services/user.ts` (523 lines)
290
+ - Fix: Split into 3 files
291
+ ```
160
292
  instruction_template: |
161
293
  ## Workflow Context
162
- - Iteration: {iteration}/{max_iterations}
294
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
295
+ - Step Iteration: {step_iteration} (times this step has run)
163
296
  - Step: review (Architecture Review)
164
297
  - Report Directory: .takt/reports/{report_dir}/
165
298
  - Report File: .takt/reports/{report_dir}/03-architect-review.md
@@ -175,14 +308,11 @@ steps:
175
308
  ## Instructions
176
309
  Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the next step).
177
310
 
178
- Review the changes and provide feedback:
179
- - [ARCHITECT:APPROVE] if no issues
180
- - [ARCHITECT:IMPROVE] if minor improvements needed
181
- - [ARCHITECT:REJECT] if structural changes are needed (list specific issues)
311
+ Review the changes and provide feedback.
182
312
 
183
313
  **Report output:** Output to the `Report File` specified above.
184
314
  - If file does not exist: Create new file
185
- - If file exists: Append with `## Iteration {iteration}` section
315
+ - If file exists: Append with `## Iteration {step_iteration}` section
186
316
 
187
317
  **Report format:**
188
318
  ```markdown
@@ -230,9 +360,43 @@ steps:
230
360
  - Bash
231
361
  - WebSearch
232
362
  - WebFetch
363
+ status_rules_prompt: |
364
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
365
+
366
+ **Without this tag, the workflow will stop.**
367
+ Your final output MUST include a status tag following the rules below.
368
+
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
+ ```
233
396
  instruction_template: |
234
397
  ## Workflow Context
235
- - Iteration: {iteration}/{max_iterations}
398
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
399
+ - Step Iteration: {step_iteration} (times this step has run)
236
400
  - Step: improve
237
401
 
238
402
  ## Architect Feedback (This is the latest instruction - prioritize this)
@@ -254,8 +418,6 @@ steps:
254
418
  - Adding/fixing comments
255
419
  - Code organization
256
420
 
257
- Include [CODER:DONE] when complete.
258
- Include [CODER:BLOCKED] if you cannot proceed.
259
421
  pass_previous_response: true
260
422
  transitions:
261
423
  - condition: done
@@ -271,9 +433,52 @@ steps:
271
433
  - Grep
272
434
  - WebSearch
273
435
  - WebFetch
436
+ status_rules_prompt: |
437
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
438
+
439
+ **Without this tag, the workflow will stop.**
440
+ Your final output MUST include a status tag following the rules below.
441
+
442
+ ## Judgment Criteria
443
+
444
+ | Situation | Judgment |
445
+ |-----------|----------|
446
+ | Incorrect assumptions (affecting behavior) | REJECT |
447
+ | Plausible-but-wrong code | REJECT |
448
+ | Significant context mismatch with codebase | REJECT |
449
+ | Scope creep | APPROVE (with warning noted) |
450
+ | Minor style deviations only | APPROVE |
451
+ | Code fits context and works | APPROVE |
452
+
453
+ **Note:** Scope creep is noted as a warning but doesn't warrant REJECT alone.
454
+
455
+ ## Output Format
456
+
457
+ | Situation | Tag |
458
+ |-----------|-----|
459
+ | No AI-specific issues | `[AI_REVIEW:APPROVE]` |
460
+ | Issues found | `[AI_REVIEW:REJECT]` |
461
+
462
+ ### Output Examples
463
+
464
+ **APPROVE case:**
465
+ ```
466
+ [AI_REVIEW:APPROVE]
467
+
468
+ Verification result: No issues
469
+ ```
470
+
471
+ **REJECT case:**
472
+ ```
473
+ [AI_REVIEW:REJECT]
474
+
475
+ Issues:
476
+ 1. Non-existent API used: `fetch.json()` → `response.json()`
477
+ ```
274
478
  instruction_template: |
275
479
  ## Workflow Context
276
- - Iteration: {iteration}/{max_iterations}
480
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
481
+ - Step Iteration: {step_iteration} (times this step has run)
277
482
  - Step: ai_review (AI-Generated Code Review)
278
483
  - Report Directory: .takt/reports/{report_dir}/
279
484
  - Report File: .takt/reports/{report_dir}/04-ai-review.md
@@ -293,13 +498,9 @@ steps:
293
498
  - Context fit with existing codebase
294
499
  - Scope creep detection
295
500
 
296
- Include:
297
- - [AI_REVIEW:APPROVE] if no AI-specific issues found
298
- - [AI_REVIEW:REJECT] if issues detected (list specific problems)
299
-
300
501
  **Report output:** Output to the `Report File` specified above.
301
502
  - If file does not exist: Create new file
302
- - If file exists: Append with `## Iteration {iteration}` section
503
+ - If file exists: Append with `## Iteration {step_iteration}` section
303
504
 
304
505
  **Report format:**
305
506
  ```markdown
@@ -344,9 +545,42 @@ steps:
344
545
  - Bash
345
546
  - WebSearch
346
547
  - WebFetch
548
+ status_rules_prompt: |
549
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
550
+
551
+ **Without this tag, the workflow will stop.**
552
+ Your final output MUST include a status tag following the rules below.
553
+
554
+ ## Output Format
555
+
556
+ | Situation | Tag |
557
+ |-----------|-----|
558
+ | AI issue fixes complete | `[CODER:DONE]` |
559
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
560
+
561
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
562
+
563
+ ### Output Examples
564
+
565
+ **DONE case:**
566
+ ```
567
+ Fixed AI Reviewer's issues.
568
+ - Fixed non-existent API: `fetch.json()` → `response.json()`
569
+
570
+ [CODER:DONE]
571
+ ```
572
+
573
+ **BLOCKED case:**
574
+ ```
575
+ [CODER:BLOCKED]
576
+
577
+ Reason: Fix method unclear
578
+ Required info: Alternative API specification
579
+ ```
347
580
  instruction_template: |
348
581
  ## Workflow Context
349
- - Iteration: {iteration}/{max_iterations}
582
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
583
+ - Step Iteration: {step_iteration} (times this step has run)
350
584
  - Step: ai_fix
351
585
 
352
586
  ## AI Review Feedback (This is the latest instruction - prioritize this)
@@ -366,8 +600,6 @@ steps:
366
600
  - Aligning with existing codebase patterns
367
601
  - Removing scope creep
368
602
 
369
- Include [CODER:DONE] when complete.
370
- Include [CODER:BLOCKED] if you cannot proceed.
371
603
  pass_previous_response: true
372
604
  transitions:
373
605
  - condition: done
@@ -383,9 +615,49 @@ steps:
383
615
  - Grep
384
616
  - WebSearch
385
617
  - WebFetch
618
+ status_rules_prompt: |
619
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
620
+
621
+ **Without this tag, the workflow will stop.**
622
+ Your final output MUST include a status tag following the rules below.
623
+
624
+ ## Judgment Criteria
625
+
626
+ | Situation | Judgment |
627
+ |-----------|----------|
628
+ | Critical vulnerability | REJECT |
629
+ | Medium severity vulnerability | REJECT |
630
+ | Minor issues/warnings only | APPROVE (note warnings) |
631
+ | No security issues | APPROVE |
632
+
633
+ ## Output Format
634
+
635
+ | Situation | Tag |
636
+ |-----------|-----|
637
+ | No security issues | `[SECURITY:APPROVE]` |
638
+ | Vulnerabilities require fixes | `[SECURITY:REJECT]` |
639
+
640
+ ### Output Examples
641
+
642
+ **APPROVE case:**
643
+ ```
644
+ [SECURITY:APPROVE]
645
+
646
+ No security issues detected.
647
+ ```
648
+
649
+ **REJECT case:**
650
+ ```
651
+ [SECURITY:REJECT]
652
+
653
+ Vulnerabilities:
654
+ 1. SQL Injection: `src/db.ts:42`
655
+ Fix: Use parameterized query
656
+ ```
386
657
  instruction_template: |
387
658
  ## Workflow Context
388
- - Iteration: {iteration}/{max_iterations}
659
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
660
+ - Step Iteration: {step_iteration} (times this step has run)
389
661
  - Step: security_review
390
662
  - Report Directory: .takt/reports/{report_dir}/
391
663
  - Report File: .takt/reports/{report_dir}/05-security-review.md
@@ -405,13 +677,9 @@ steps:
405
677
  - Data exposure risks
406
678
  - Cryptographic weaknesses
407
679
 
408
- Include:
409
- - [SECURITY:APPROVE] if no security issues found
410
- - [SECURITY:REJECT] if vulnerabilities detected (list specific issues)
411
-
412
680
  **Report output:** Output to the `Report File` specified above.
413
681
  - If file does not exist: Create new file
414
- - If file exists: Append with `## Iteration {iteration}` section
682
+ - If file exists: Append with `## Iteration {step_iteration}` section
415
683
 
416
684
  **Report format:**
417
685
  ```markdown
@@ -459,9 +727,42 @@ steps:
459
727
  - Bash
460
728
  - WebSearch
461
729
  - WebFetch
730
+ status_rules_prompt: |
731
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
732
+
733
+ **Without this tag, the workflow will stop.**
734
+ Your final output MUST include a status tag following the rules below.
735
+
736
+ ## Output Format
737
+
738
+ | Situation | Tag |
739
+ |-----------|-----|
740
+ | Security fixes complete | `[CODER:DONE]` |
741
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
742
+
743
+ **Important**: Security issues require highest priority.
744
+
745
+ ### Output Examples
746
+
747
+ **DONE case:**
748
+ ```
749
+ Fixed security issues.
750
+ - SQL injection fix: Changed to parameterized query
751
+
752
+ [CODER:DONE]
753
+ ```
754
+
755
+ **BLOCKED case:**
756
+ ```
757
+ [CODER:BLOCKED]
758
+
759
+ Reason: Fix method unclear
760
+ Required info: Auth library specification
761
+ ```
462
762
  instruction_template: |
463
763
  ## Workflow Context
464
- - Iteration: {iteration}/{max_iterations}
764
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
765
+ - Step Iteration: {step_iteration} (times this step has run)
465
766
  - Step: security_fix
466
767
 
467
768
  ## Security Review Feedback (This is the latest instruction - prioritize this)
@@ -477,8 +778,6 @@ steps:
477
778
  **Important**: Fix the vulnerabilities identified in the security review.
478
779
  Security issues require highest priority.
479
780
 
480
- Include [CODER:DONE] when complete.
481
- Include [CODER:BLOCKED] if you cannot proceed.
482
781
  pass_previous_response: true
483
782
  transitions:
484
783
  - condition: done
@@ -497,9 +796,43 @@ steps:
497
796
  - Bash
498
797
  - WebSearch
499
798
  - WebFetch
799
+ status_rules_prompt: |
800
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
801
+
802
+ **Without this tag, the workflow will stop.**
803
+ Your final output MUST include a status tag following the rules below.
804
+
805
+ ## Output Format
806
+
807
+ | Situation | Tag |
808
+ |-----------|-----|
809
+ | Architect's issues fixed | `[CODER:DONE]` |
810
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
811
+
812
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
813
+
814
+ ### Output Examples
815
+
816
+ **DONE case:**
817
+ ```
818
+ Fixed Architect's issues.
819
+ - File split: Split into 3 files
820
+ - Added type definitions
821
+
822
+ [CODER:DONE]
823
+ ```
824
+
825
+ **BLOCKED case:**
826
+ ```
827
+ [CODER:BLOCKED]
828
+
829
+ Reason: Fix approach unclear
830
+ Required info: Specific split method
831
+ ```
500
832
  instruction_template: |
501
833
  ## Workflow Context
502
- - Iteration: {iteration}/{max_iterations}
834
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
835
+ - Step Iteration: {step_iteration} (times this step has run)
503
836
  - Step: fix
504
837
 
505
838
  ## Architect Feedback (This is the latest instruction - prioritize this)
@@ -516,8 +849,6 @@ steps:
516
849
  The "Original User Request" is reference information, not the latest instruction.
517
850
  Review the session conversation history and fix the issues raised by the Architect.
518
851
 
519
- Include [CODER:DONE] when complete.
520
- Include [CODER:BLOCKED] if you cannot proceed.
521
852
  pass_previous_response: true
522
853
  transitions:
523
854
  - condition: done
@@ -534,9 +865,55 @@ steps:
534
865
  - Bash
535
866
  - WebSearch
536
867
  - WebFetch
868
+ status_rules_prompt: |
869
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
870
+
871
+ **Without this tag, the workflow will stop.**
872
+ Your final output MUST include a status tag following the rules below.
873
+
874
+ ## Judgment Criteria
875
+
876
+ | Situation | Judgment |
877
+ |-----------|----------|
878
+ | Requirements not met | REJECT |
879
+ | Tests failing | REJECT |
880
+ | Build fails | REJECT |
881
+ | Workarounds remaining | REJECT |
882
+ | All OK | APPROVE |
883
+
884
+ **Principle**: When in doubt, REJECT. Don't give ambiguous approval.
885
+
886
+ ## Output Format
887
+
888
+ | Situation | Tag |
889
+ |-----------|-----|
890
+ | Final approval | `[SUPERVISOR:APPROVE]` |
891
+ | Return for fixes | `[SUPERVISOR:REJECT]` |
892
+
893
+ ### Output Examples
894
+
895
+ **APPROVE case:**
896
+ ```
897
+ [SUPERVISOR:APPROVE]
898
+
899
+ Verification results:
900
+ - Tests: ✅ All passed
901
+ - Build: ✅ Succeeded
902
+ - Requirements met: ✅
903
+ ```
904
+
905
+ **REJECT case:**
906
+ ```
907
+ [SUPERVISOR:REJECT]
908
+
909
+ Issues:
910
+ 1. Tests failing: `npm test` - 2 failures
911
+ 2. Requirements not met: Login feature not implemented
912
+ ```
537
913
  instruction_template: |
538
914
  ## Workflow Context
539
- - Iteration: {iteration}/{max_iterations}
915
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
916
+ - Step Iteration: {step_iteration} (times this step has run)
540
917
  - Step: supervise (final verification)
541
918
  - Report Directory: .takt/reports/{report_dir}/
542
919
  - Report Files:
@@ -564,7 +941,7 @@ steps:
564
941
 
565
942
  **Report output:** Output to the `Report Files` specified above.
566
943
  - If file does not exist: Create new file
567
- - If file exists: Append with `## Iteration {iteration}` section
944
+ - If file exists: Append with `## Iteration {step_iteration}` section
568
945
 
569
946
  **Validation report format:**
570
947
  ```markdown
@@ -619,10 +996,6 @@ steps:
619
996
  npm run build
620
997
  ```
621
998
  ```
622
-
623
- Output:
624
- - [SUPERVISOR:APPROVE] if ready to merge
625
- - [SUPERVISOR:REJECT] if issues found (specify the issues)
626
999
  transitions:
627
1000
  - condition: approved
628
1001
  next_step: COMPLETE