takt 0.1.3 → 0.1.4

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 (62) 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/config/workflowLoader.d.ts.map +1 -1
  6. package/dist/config/workflowLoader.js +1 -0
  7. package/dist/config/workflowLoader.js.map +1 -1
  8. package/dist/models/schemas.d.ts +2 -0
  9. package/dist/models/schemas.d.ts.map +1 -1
  10. package/dist/models/schemas.js +1 -0
  11. package/dist/models/schemas.js.map +1 -1
  12. package/dist/models/types.d.ts +2 -0
  13. package/dist/models/types.d.ts.map +1 -1
  14. package/dist/workflow/engine.d.ts.map +1 -1
  15. package/dist/workflow/engine.js +1 -0
  16. package/dist/workflow/engine.js.map +1 -1
  17. package/dist/workflow/instruction-builder.d.ts.map +1 -1
  18. package/dist/workflow/instruction-builder.js +4 -0
  19. package/dist/workflow/instruction-builder.js.map +1 -1
  20. package/package.json +1 -1
  21. package/resources/global/en/agents/default/ai-reviewer.md +0 -20
  22. package/resources/global/en/agents/default/architect.md +5 -73
  23. package/resources/global/en/agents/default/coder.md +0 -39
  24. package/resources/global/en/agents/default/planner.md +0 -23
  25. package/resources/global/en/agents/default/security.md +0 -16
  26. package/resources/global/en/agents/default/supervisor.md +0 -19
  27. package/resources/global/en/agents/expert-review/cqrs-es-reviewer.md +0 -35
  28. package/resources/global/en/agents/expert-review/frontend-reviewer.md +0 -35
  29. package/resources/global/en/agents/expert-review/qa-reviewer.md +0 -36
  30. package/resources/global/en/agents/expert-review/security-reviewer.md +0 -37
  31. package/resources/global/en/agents/expert-review/supervisor.md +0 -62
  32. package/resources/global/en/agents/magi/balthasar.md +0 -20
  33. package/resources/global/en/agents/magi/casper.md +0 -42
  34. package/resources/global/en/agents/magi/melchior.md +0 -20
  35. package/resources/global/en/agents/research/digger.md +0 -41
  36. package/resources/global/en/agents/research/planner.md +0 -34
  37. package/resources/global/en/agents/research/supervisor.md +0 -36
  38. package/resources/global/en/workflows/default.yaml +383 -30
  39. package/resources/global/en/workflows/expert-review.yaml +171 -0
  40. package/resources/global/en/workflows/magi.yaml +68 -26
  41. package/resources/global/en/workflows/research.yaml +89 -8
  42. package/resources/global/ja/agents/default/ai-reviewer.md +0 -20
  43. package/resources/global/ja/agents/default/architect.md +5 -73
  44. package/resources/global/ja/agents/default/coder.md +1 -41
  45. package/resources/global/ja/agents/default/planner.md +0 -23
  46. package/resources/global/ja/agents/default/security.md +0 -16
  47. package/resources/global/ja/agents/default/supervisor.md +0 -19
  48. package/resources/global/ja/agents/expert-review/cqrs-es-reviewer.md +0 -35
  49. package/resources/global/ja/agents/expert-review/frontend-reviewer.md +0 -35
  50. package/resources/global/ja/agents/expert-review/qa-reviewer.md +0 -36
  51. package/resources/global/ja/agents/expert-review/security-reviewer.md +0 -37
  52. package/resources/global/ja/agents/expert-review/supervisor.md +0 -62
  53. package/resources/global/ja/agents/magi/balthasar.md +0 -20
  54. package/resources/global/ja/agents/magi/casper.md +0 -42
  55. package/resources/global/ja/agents/magi/melchior.md +0 -20
  56. package/resources/global/ja/agents/research/digger.md +0 -41
  57. package/resources/global/ja/agents/research/planner.md +0 -34
  58. package/resources/global/ja/agents/research/supervisor.md +0 -36
  59. package/resources/global/ja/workflows/default.yaml +383 -34
  60. package/resources/global/ja/workflows/expert-review.yaml +171 -0
  61. package/resources/global/ja/workflows/magi.yaml +68 -26
  62. package/resources/global/ja/workflows/research.yaml +89 -8
@@ -18,6 +18,41 @@ steps:
18
18
  - Bash
19
19
  - WebSearch
20
20
  - WebFetch
21
+ status_rules_prompt: |
22
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
23
+
24
+ **Without this tag, the workflow will stop.**
25
+ Your final output MUST include a status tag following the rules below.
26
+
27
+ ## Judgment Criteria
28
+
29
+ | Situation | Judgment |
30
+ |-----------|----------|
31
+ | Requirements clear and implementable | DONE |
32
+ | Requirements unclear, insufficient info | BLOCKED |
33
+
34
+ ## Output Format
35
+
36
+ | Situation | Tag |
37
+ |-----------|-----|
38
+ | Analysis complete | `[PLANNER:DONE]` |
39
+ | Insufficient info | `[PLANNER:BLOCKED]` |
40
+
41
+ ### Output Examples
42
+
43
+ **DONE case:**
44
+ ```
45
+ [PLANNER:DONE]
46
+ ```
47
+
48
+ **BLOCKED case:**
49
+ ```
50
+ [PLANNER:BLOCKED]
51
+
52
+ Clarifications needed:
53
+ - {Question 1}
54
+ - {Question 2}
55
+ ```
21
56
  instruction_template: |
22
57
  ## Workflow Context
23
58
  - Iteration: {iteration}/{max_iterations}
@@ -67,9 +102,6 @@ steps:
67
102
  ## Clarifications Needed (if any)
68
103
  - {Unclear points or items requiring confirmation}
69
104
  ```
70
-
71
- Output [PLANNER:DONE] when complete.
72
- Output [PLANNER:BLOCKED] if requirements are unclear.
73
105
  pass_previous_response: true
74
106
  transitions:
75
107
  - condition: done
@@ -88,6 +120,39 @@ steps:
88
120
  - Bash
89
121
  - WebSearch
90
122
  - WebFetch
123
+ status_rules_prompt: |
124
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
125
+
126
+ **Without this tag, the workflow will stop.**
127
+ Your final output MUST include a status tag following the rules below.
128
+
129
+ ## Output Format
130
+
131
+ | Situation | Tag |
132
+ |-----------|-----|
133
+ | Implementation complete | `[CODER:DONE]` |
134
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
135
+
136
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
137
+
138
+ ### Output Examples
139
+
140
+ **DONE case:**
141
+ ```
142
+ Implementation complete.
143
+ - Created: `src/auth/service.ts`, `tests/auth.test.ts`
144
+ - Modified: `src/routes.ts`
145
+
146
+ [CODER:DONE]
147
+ ```
148
+
149
+ **BLOCKED case:**
150
+ ```
151
+ [CODER:BLOCKED]
152
+
153
+ Reason: DB schema is undefined, cannot implement
154
+ Required info: users table structure
155
+ ```
91
156
  instruction_template: |
92
157
  ## Workflow Context
93
158
  - Iteration: {iteration}/{max_iterations}
@@ -140,9 +205,6 @@ steps:
140
205
  - **Options Considered**: {List of options}
141
206
  - **Reason**: {Why this option was chosen}
142
207
  ```
143
-
144
- Include [CODER:DONE] when complete.
145
- Include [CODER:BLOCKED] if you cannot proceed (returns to plan).
146
208
  transitions:
147
209
  - condition: done
148
210
  next_step: review
@@ -157,6 +219,64 @@ steps:
157
219
  - Grep
158
220
  - WebSearch
159
221
  - WebFetch
222
+ status_rules_prompt: |
223
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
224
+
225
+ **Without this tag, the workflow will stop.**
226
+ Your final output MUST include a status tag following the rules below.
227
+
228
+ ## Judgment Criteria
229
+
230
+ | Situation | Judgment |
231
+ |-----------|----------|
232
+ | Structural issues | REJECT |
233
+ | Design principle violations | REJECT |
234
+ | Security issues | REJECT |
235
+ | Insufficient tests | REJECT |
236
+ | Minor improvements needed | IMPROVE |
237
+ | No issues | APPROVE |
238
+
239
+ **How to use IMPROVE:**
240
+ - Design is acceptable but there are points that could be better
241
+ - Examples: naming improvements, small refactoring, adding comments
242
+
243
+ ## Output Format
244
+
245
+ | Situation | Tag |
246
+ |-----------|-----|
247
+ | No issues | `[ARCHITECT:APPROVE]` |
248
+ | Minor improvements needed | `[ARCHITECT:IMPROVE]` |
249
+ | Structural changes required | `[ARCHITECT:REJECT]` |
250
+
251
+ ### Output Examples
252
+
253
+ **APPROVE case:**
254
+ ```
255
+ [ARCHITECT:APPROVE]
256
+
257
+ Positive points:
258
+ - Appropriate module organization
259
+ - Single responsibility maintained
260
+ ```
261
+
262
+ **IMPROVE case:**
263
+ ```
264
+ [ARCHITECT:IMPROVE]
265
+
266
+ Improvements:
267
+ - Improve naming: `data` → `userData`
268
+ - Add comments
269
+ ```
270
+
271
+ **REJECT case:**
272
+ ```
273
+ [ARCHITECT:REJECT]
274
+
275
+ Issues:
276
+ 1. File size exceeded
277
+ - Location: `src/services/user.ts` (523 lines)
278
+ - Fix: Split into 3 files
279
+ ```
160
280
  instruction_template: |
161
281
  ## Workflow Context
162
282
  - Iteration: {iteration}/{max_iterations}
@@ -175,10 +295,7 @@ steps:
175
295
  ## Instructions
176
296
  Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the next step).
177
297
 
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)
298
+ Review the changes and provide feedback.
182
299
 
183
300
  **Report output:** Output to the `Report File` specified above.
184
301
  - If file does not exist: Create new file
@@ -230,6 +347,39 @@ steps:
230
347
  - Bash
231
348
  - WebSearch
232
349
  - WebFetch
350
+ status_rules_prompt: |
351
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
352
+
353
+ **Without this tag, the workflow will stop.**
354
+ Your final output MUST include a status tag following the rules below.
355
+
356
+ ## Output Format
357
+
358
+ | Situation | Tag |
359
+ |-----------|-----|
360
+ | Improvements complete | `[CODER:DONE]` |
361
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
362
+
363
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
364
+
365
+ ### Output Examples
366
+
367
+ **DONE case:**
368
+ ```
369
+ Improvements complete.
370
+ - Improved naming: `data` → `userData`
371
+ - Added comments
372
+
373
+ [CODER:DONE]
374
+ ```
375
+
376
+ **BLOCKED case:**
377
+ ```
378
+ [CODER:BLOCKED]
379
+
380
+ Reason: Improvement intent unclear
381
+ Required info: Specific improvement details
382
+ ```
233
383
  instruction_template: |
234
384
  ## Workflow Context
235
385
  - Iteration: {iteration}/{max_iterations}
@@ -254,8 +404,6 @@ steps:
254
404
  - Adding/fixing comments
255
405
  - Code organization
256
406
 
257
- Include [CODER:DONE] when complete.
258
- Include [CODER:BLOCKED] if you cannot proceed.
259
407
  pass_previous_response: true
260
408
  transitions:
261
409
  - condition: done
@@ -271,6 +419,48 @@ steps:
271
419
  - Grep
272
420
  - WebSearch
273
421
  - WebFetch
422
+ status_rules_prompt: |
423
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
424
+
425
+ **Without this tag, the workflow will stop.**
426
+ Your final output MUST include a status tag following the rules below.
427
+
428
+ ## Judgment Criteria
429
+
430
+ | Situation | Judgment |
431
+ |-----------|----------|
432
+ | Incorrect assumptions (affecting behavior) | REJECT |
433
+ | Plausible-but-wrong code | REJECT |
434
+ | Significant context mismatch with codebase | REJECT |
435
+ | Scope creep | APPROVE (with warning noted) |
436
+ | Minor style deviations only | APPROVE |
437
+ | Code fits context and works | APPROVE |
438
+
439
+ **Note:** Scope creep is noted as a warning but doesn't warrant REJECT alone.
440
+
441
+ ## Output Format
442
+
443
+ | Situation | Tag |
444
+ |-----------|-----|
445
+ | No AI-specific issues | `[AI_REVIEW:APPROVE]` |
446
+ | Issues found | `[AI_REVIEW:REJECT]` |
447
+
448
+ ### Output Examples
449
+
450
+ **APPROVE case:**
451
+ ```
452
+ [AI_REVIEW:APPROVE]
453
+
454
+ Verification result: No issues
455
+ ```
456
+
457
+ **REJECT case:**
458
+ ```
459
+ [AI_REVIEW:REJECT]
460
+
461
+ Issues:
462
+ 1. Non-existent API used: `fetch.json()` → `response.json()`
463
+ ```
274
464
  instruction_template: |
275
465
  ## Workflow Context
276
466
  - Iteration: {iteration}/{max_iterations}
@@ -293,10 +483,6 @@ steps:
293
483
  - Context fit with existing codebase
294
484
  - Scope creep detection
295
485
 
296
- Include:
297
- - [AI_REVIEW:APPROVE] if no AI-specific issues found
298
- - [AI_REVIEW:REJECT] if issues detected (list specific problems)
299
-
300
486
  **Report output:** Output to the `Report File` specified above.
301
487
  - If file does not exist: Create new file
302
488
  - If file exists: Append with `## Iteration {iteration}` section
@@ -344,6 +530,38 @@ steps:
344
530
  - Bash
345
531
  - WebSearch
346
532
  - WebFetch
533
+ status_rules_prompt: |
534
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
535
+
536
+ **Without this tag, the workflow will stop.**
537
+ Your final output MUST include a status tag following the rules below.
538
+
539
+ ## Output Format
540
+
541
+ | Situation | Tag |
542
+ |-----------|-----|
543
+ | AI issue fixes complete | `[CODER:DONE]` |
544
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
545
+
546
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
547
+
548
+ ### Output Examples
549
+
550
+ **DONE case:**
551
+ ```
552
+ Fixed AI Reviewer's issues.
553
+ - Fixed non-existent API: `fetch.json()` → `response.json()`
554
+
555
+ [CODER:DONE]
556
+ ```
557
+
558
+ **BLOCKED case:**
559
+ ```
560
+ [CODER:BLOCKED]
561
+
562
+ Reason: Fix method unclear
563
+ Required info: Alternative API specification
564
+ ```
347
565
  instruction_template: |
348
566
  ## Workflow Context
349
567
  - Iteration: {iteration}/{max_iterations}
@@ -366,8 +584,6 @@ steps:
366
584
  - Aligning with existing codebase patterns
367
585
  - Removing scope creep
368
586
 
369
- Include [CODER:DONE] when complete.
370
- Include [CODER:BLOCKED] if you cannot proceed.
371
587
  pass_previous_response: true
372
588
  transitions:
373
589
  - condition: done
@@ -383,6 +599,45 @@ steps:
383
599
  - Grep
384
600
  - WebSearch
385
601
  - WebFetch
602
+ status_rules_prompt: |
603
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
604
+
605
+ **Without this tag, the workflow will stop.**
606
+ Your final output MUST include a status tag following the rules below.
607
+
608
+ ## Judgment Criteria
609
+
610
+ | Situation | Judgment |
611
+ |-----------|----------|
612
+ | Critical vulnerability | REJECT |
613
+ | Medium severity vulnerability | REJECT |
614
+ | Minor issues/warnings only | APPROVE (note warnings) |
615
+ | No security issues | APPROVE |
616
+
617
+ ## Output Format
618
+
619
+ | Situation | Tag |
620
+ |-----------|-----|
621
+ | No security issues | `[SECURITY:APPROVE]` |
622
+ | Vulnerabilities require fixes | `[SECURITY:REJECT]` |
623
+
624
+ ### Output Examples
625
+
626
+ **APPROVE case:**
627
+ ```
628
+ [SECURITY:APPROVE]
629
+
630
+ No security issues detected.
631
+ ```
632
+
633
+ **REJECT case:**
634
+ ```
635
+ [SECURITY:REJECT]
636
+
637
+ Vulnerabilities:
638
+ 1. SQL Injection: `src/db.ts:42`
639
+ Fix: Use parameterized query
640
+ ```
386
641
  instruction_template: |
387
642
  ## Workflow Context
388
643
  - Iteration: {iteration}/{max_iterations}
@@ -405,10 +660,6 @@ steps:
405
660
  - Data exposure risks
406
661
  - Cryptographic weaknesses
407
662
 
408
- Include:
409
- - [SECURITY:APPROVE] if no security issues found
410
- - [SECURITY:REJECT] if vulnerabilities detected (list specific issues)
411
-
412
663
  **Report output:** Output to the `Report File` specified above.
413
664
  - If file does not exist: Create new file
414
665
  - If file exists: Append with `## Iteration {iteration}` section
@@ -459,6 +710,38 @@ steps:
459
710
  - Bash
460
711
  - WebSearch
461
712
  - WebFetch
713
+ status_rules_prompt: |
714
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
715
+
716
+ **Without this tag, the workflow will stop.**
717
+ Your final output MUST include a status tag following the rules below.
718
+
719
+ ## Output Format
720
+
721
+ | Situation | Tag |
722
+ |-----------|-----|
723
+ | Security fixes complete | `[CODER:DONE]` |
724
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
725
+
726
+ **Important**: Security issues require highest priority.
727
+
728
+ ### Output Examples
729
+
730
+ **DONE case:**
731
+ ```
732
+ Fixed security issues.
733
+ - SQL injection fix: Changed to parameterized query
734
+
735
+ [CODER:DONE]
736
+ ```
737
+
738
+ **BLOCKED case:**
739
+ ```
740
+ [CODER:BLOCKED]
741
+
742
+ Reason: Fix method unclear
743
+ Required info: Auth library specification
744
+ ```
462
745
  instruction_template: |
463
746
  ## Workflow Context
464
747
  - Iteration: {iteration}/{max_iterations}
@@ -477,8 +760,6 @@ steps:
477
760
  **Important**: Fix the vulnerabilities identified in the security review.
478
761
  Security issues require highest priority.
479
762
 
480
- Include [CODER:DONE] when complete.
481
- Include [CODER:BLOCKED] if you cannot proceed.
482
763
  pass_previous_response: true
483
764
  transitions:
484
765
  - condition: done
@@ -497,6 +778,39 @@ steps:
497
778
  - Bash
498
779
  - WebSearch
499
780
  - WebFetch
781
+ status_rules_prompt: |
782
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
783
+
784
+ **Without this tag, the workflow will stop.**
785
+ Your final output MUST include a status tag following the rules below.
786
+
787
+ ## Output Format
788
+
789
+ | Situation | Tag |
790
+ |-----------|-----|
791
+ | Architect's issues fixed | `[CODER:DONE]` |
792
+ | Cannot decide/insufficient info | `[CODER:BLOCKED]` |
793
+
794
+ **Important**: When in doubt, `[BLOCKED]`. Don't decide on your own.
795
+
796
+ ### Output Examples
797
+
798
+ **DONE case:**
799
+ ```
800
+ Fixed Architect's issues.
801
+ - File split: Split into 3 files
802
+ - Added type definitions
803
+
804
+ [CODER:DONE]
805
+ ```
806
+
807
+ **BLOCKED case:**
808
+ ```
809
+ [CODER:BLOCKED]
810
+
811
+ Reason: Fix approach unclear
812
+ Required info: Specific split method
813
+ ```
500
814
  instruction_template: |
501
815
  ## Workflow Context
502
816
  - Iteration: {iteration}/{max_iterations}
@@ -516,8 +830,6 @@ steps:
516
830
  The "Original User Request" is reference information, not the latest instruction.
517
831
  Review the session conversation history and fix the issues raised by the Architect.
518
832
 
519
- Include [CODER:DONE] when complete.
520
- Include [CODER:BLOCKED] if you cannot proceed.
521
833
  pass_previous_response: true
522
834
  transitions:
523
835
  - condition: done
@@ -534,6 +846,51 @@ steps:
534
846
  - Bash
535
847
  - WebSearch
536
848
  - WebFetch
849
+ status_rules_prompt: |
850
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
851
+
852
+ **Without this tag, the workflow will stop.**
853
+ Your final output MUST include a status tag following the rules below.
854
+
855
+ ## Judgment Criteria
856
+
857
+ | Situation | Judgment |
858
+ |-----------|----------|
859
+ | Requirements not met | REJECT |
860
+ | Tests failing | REJECT |
861
+ | Build fails | REJECT |
862
+ | Workarounds remaining | REJECT |
863
+ | All OK | APPROVE |
864
+
865
+ **Principle**: When in doubt, REJECT. Don't give ambiguous approval.
866
+
867
+ ## Output Format
868
+
869
+ | Situation | Tag |
870
+ |-----------|-----|
871
+ | Final approval | `[SUPERVISOR:APPROVE]` |
872
+ | Return for fixes | `[SUPERVISOR:REJECT]` |
873
+
874
+ ### Output Examples
875
+
876
+ **APPROVE case:**
877
+ ```
878
+ [SUPERVISOR:APPROVE]
879
+
880
+ Verification results:
881
+ - Tests: ✅ All passed
882
+ - Build: ✅ Succeeded
883
+ - Requirements met: ✅
884
+ ```
885
+
886
+ **REJECT case:**
887
+ ```
888
+ [SUPERVISOR:REJECT]
889
+
890
+ Issues:
891
+ 1. Tests failing: `npm test` - 2 failures
892
+ 2. Requirements not met: Login feature not implemented
893
+ ```
537
894
  instruction_template: |
538
895
  ## Workflow Context
539
896
  - Iteration: {iteration}/{max_iterations}
@@ -619,10 +976,6 @@ steps:
619
976
  npm run build
620
977
  ```
621
978
  ```
622
-
623
- Output:
624
- - [SUPERVISOR:APPROVE] if ready to merge
625
- - [SUPERVISOR:REJECT] if issues found (specify the issues)
626
979
  transitions:
627
980
  - condition: approved
628
981
  next_step: COMPLETE