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
@@ -9,6 +9,16 @@
9
9
  # Fix destination is determined by Coder based on change impact:
10
10
  # - fix_security: MINOR→security_review, MAJOR→cqrs_es_review
11
11
  # - fix_qa: MINOR→qa_review, SECURITY→security_review, MAJOR→cqrs_es_review
12
+ #
13
+ # Template Variables:
14
+ # {iteration} - Workflow-wide turn count (total steps executed across all agents)
15
+ # {max_iterations} - Maximum iterations allowed for the workflow
16
+ # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
17
+ # {task} - Original user request
18
+ # {previous_response} - Output from the previous step
19
+ # {git_diff} - Current uncommitted changes (git diff)
20
+ # {user_inputs} - Accumulated user inputs during workflow
21
+ # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
12
22
 
13
23
  name: expert-review
14
24
  description: CQRS+ES, Frontend, Security, QA Expert Review
@@ -30,9 +40,22 @@ steps:
30
40
  - Bash
31
41
  - WebSearch
32
42
  - WebFetch
43
+ status_rules_prompt: |
44
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
45
+
46
+ **Without this tag, the workflow will stop.**
47
+ Your final output MUST include a status tag following the rules below.
48
+
49
+ ## Output Format
50
+
51
+ | Situation | Tag |
52
+ |-----------|-----|
53
+ | Analysis complete | `[PLANNER:DONE]` |
54
+ | Requirements unclear | `[PLANNER:BLOCKED]` |
33
55
  instruction_template: |
34
56
  ## Workflow Context
35
- - Iteration: {iteration}/{max_iterations}
57
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
58
+ - Step Iteration: {step_iteration} (times this step has run)
36
59
  - Step: plan (Task Analysis)
37
60
  - Report Directory: .takt/reports/{report_dir}/
38
61
  - Report File: .takt/reports/{report_dir}/00-plan.md
@@ -56,7 +79,7 @@ steps:
56
79
 
57
80
  **Report output:** Output to the `Report File` specified above.
58
81
  - If file does not exist: Create new file
59
- - If file exists: Append with `## Iteration {iteration}` section
82
+ - If file exists: Append with `## Iteration {step_iteration}` section
60
83
 
61
84
  **Report format:**
62
85
  ```markdown
@@ -103,9 +126,22 @@ steps:
103
126
  - Bash
104
127
  - WebSearch
105
128
  - WebFetch
129
+ status_rules_prompt: |
130
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
131
+
132
+ **Without this tag, the workflow will stop.**
133
+ Your final output MUST include a status tag following the rules below.
134
+
135
+ ## Output Format
136
+
137
+ | Situation | Tag |
138
+ |-----------|-----|
139
+ | Implementation complete | `[CODER:DONE]` |
140
+ | Cannot proceed | `[CODER:BLOCKED]` |
106
141
  instruction_template: |
107
142
  ## Workflow Context
108
- - Iteration: {iteration}/{max_iterations}
143
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
144
+ - Step Iteration: {step_iteration} (times this step has run)
109
145
  - Step: implement
110
146
  - Report Directory: .takt/reports/{report_dir}/
111
147
  - Report Files:
@@ -124,7 +160,7 @@ steps:
124
160
 
125
161
  **Report output:** Output to the `Report Files` specified above.
126
162
  - If file does not exist: Create new file
127
- - If file exists: Append with `## Iteration {iteration}` section
163
+ - If file exists: Append with `## Iteration {step_iteration}` section
128
164
 
129
165
  **Scope report format (create at implementation start):**
130
166
  ```markdown
@@ -175,9 +211,22 @@ steps:
175
211
  - Grep
176
212
  - WebSearch
177
213
  - WebFetch
214
+ status_rules_prompt: |
215
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
216
+
217
+ **Without this tag, the workflow will stop.**
218
+ Your final output MUST include a status tag following the rules below.
219
+
220
+ ## Output Format
221
+
222
+ | Situation | Tag |
223
+ |-----------|-----|
224
+ | Design is sound | `[CQRS-ES:APPROVE]` |
225
+ | Design issues found | `[CQRS-ES:REJECT]` |
178
226
  instruction_template: |
179
227
  ## Workflow Context
180
- - Iteration: {iteration}/{max_iterations}
228
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
229
+ - Step Iteration: {step_iteration} (times this step has run)
181
230
  - Step: cqrs_es_review (CQRS+ES Expert Review)
182
231
  - Report Directory: .takt/reports/{report_dir}/
183
232
  - Report File: .takt/reports/{report_dir}/03-cqrs-es-review.md
@@ -206,7 +255,7 @@ steps:
206
255
 
207
256
  **Report output:** Output to the `Report File` specified above.
208
257
  - If file does not exist: Create new file
209
- - If file exists: Append with `## Iteration {iteration}` section
258
+ - If file exists: Append with `## Iteration {step_iteration}` section
210
259
 
211
260
  **Report format:**
212
261
  ```markdown
@@ -252,9 +301,22 @@ steps:
252
301
  - Bash
253
302
  - WebSearch
254
303
  - WebFetch
304
+ status_rules_prompt: |
305
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
306
+
307
+ **Without this tag, the workflow will stop.**
308
+ Your final output MUST include a status tag following the rules below.
309
+
310
+ ## Output Format
311
+
312
+ | Situation | Tag |
313
+ |-----------|-----|
314
+ | Fix complete | `[CODER:DONE]` |
315
+ | Cannot proceed | `[CODER:BLOCKED]` |
255
316
  instruction_template: |
256
317
  ## Workflow Context
257
- - Iteration: {iteration}/{max_iterations}
318
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
319
+ - Step Iteration: {step_iteration} (times this step has run)
258
320
  - Step: fix_cqrs_es
259
321
 
260
322
  ## CQRS+ES Review Feedback (This is the latest instruction - prioritize this)
@@ -296,9 +358,22 @@ steps:
296
358
  - Grep
297
359
  - WebSearch
298
360
  - WebFetch
361
+ status_rules_prompt: |
362
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
363
+
364
+ **Without this tag, the workflow will stop.**
365
+ Your final output MUST include a status tag following the rules below.
366
+
367
+ ## Output Format
368
+
369
+ | Situation | Tag |
370
+ |-----------|-----|
371
+ | Frontend design is sound | `[FRONTEND:APPROVE]` |
372
+ | Design issues found | `[FRONTEND:REJECT]` |
299
373
  instruction_template: |
300
374
  ## Workflow Context
301
- - Iteration: {iteration}/{max_iterations}
375
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
376
+ - Step Iteration: {step_iteration} (times this step has run)
302
377
  - Step: frontend_review (Frontend Expert Review)
303
378
  - Report Directory: .takt/reports/{report_dir}/
304
379
  - Report File: .takt/reports/{report_dir}/04-frontend-review.md
@@ -327,7 +402,7 @@ steps:
327
402
 
328
403
  **Report output:** Output to the `Report File` specified above.
329
404
  - If file does not exist: Create new file
330
- - If file exists: Append with `## Iteration {iteration}` section
405
+ - If file exists: Append with `## Iteration {step_iteration}` section
331
406
 
332
407
  **Report format:**
333
408
  ```markdown
@@ -373,9 +448,22 @@ steps:
373
448
  - Bash
374
449
  - WebSearch
375
450
  - WebFetch
451
+ status_rules_prompt: |
452
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
453
+
454
+ **Without this tag, the workflow will stop.**
455
+ Your final output MUST include a status tag following the rules below.
456
+
457
+ ## Output Format
458
+
459
+ | Situation | Tag |
460
+ |-----------|-----|
461
+ | Fix complete | `[CODER:DONE]` |
462
+ | Cannot proceed | `[CODER:BLOCKED]` |
376
463
  instruction_template: |
377
464
  ## Workflow Context
378
- - Iteration: {iteration}/{max_iterations}
465
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
466
+ - Step Iteration: {step_iteration} (times this step has run)
379
467
  - Step: fix_frontend
380
468
 
381
469
  ## Frontend Review Feedback (This is the latest instruction - prioritize this)
@@ -417,9 +505,22 @@ steps:
417
505
  - Grep
418
506
  - WebSearch
419
507
  - WebFetch
508
+ status_rules_prompt: |
509
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
510
+
511
+ **Without this tag, the workflow will stop.**
512
+ Your final output MUST include a status tag following the rules below.
513
+
514
+ ## Output Format
515
+
516
+ | Situation | Tag |
517
+ |-----------|-----|
518
+ | No AI-specific issues | `[AI_REVIEW:APPROVE]` |
519
+ | Issues found | `[AI_REVIEW:REJECT]` |
420
520
  instruction_template: |
421
521
  ## Workflow Context
422
- - Iteration: {iteration}/{max_iterations}
522
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
523
+ - Step Iteration: {step_iteration} (times this step has run)
423
524
  - Step: ai_review (AI-Generated Code Review)
424
525
  - Report Directory: .takt/reports/{report_dir}/
425
526
  - Report File: .takt/reports/{report_dir}/05-ai-review.md
@@ -441,7 +542,7 @@ steps:
441
542
 
442
543
  **Report output:** Output to the `Report File` specified above.
443
544
  - If file does not exist: Create new file
444
- - If file exists: Append with `## Iteration {iteration}` section
545
+ - If file exists: Append with `## Iteration {step_iteration}` section
445
546
 
446
547
  **Report format:**
447
548
  ```markdown
@@ -490,9 +591,22 @@ steps:
490
591
  - Bash
491
592
  - WebSearch
492
593
  - WebFetch
594
+ status_rules_prompt: |
595
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
596
+
597
+ **Without this tag, the workflow will stop.**
598
+ Your final output MUST include a status tag following the rules below.
599
+
600
+ ## Output Format
601
+
602
+ | Situation | Tag |
603
+ |-----------|-----|
604
+ | Fix complete | `[CODER:DONE]` |
605
+ | Cannot proceed | `[CODER:BLOCKED]` |
493
606
  instruction_template: |
494
607
  ## Workflow Context
495
- - Iteration: {iteration}/{max_iterations}
608
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
609
+ - Step Iteration: {step_iteration} (times this step has run)
496
610
  - Step: ai_fix
497
611
 
498
612
  ## AI Review Feedback (This is the latest instruction - prioritize this)
@@ -532,9 +646,22 @@ steps:
532
646
  - Grep
533
647
  - WebSearch
534
648
  - WebFetch
649
+ status_rules_prompt: |
650
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
651
+
652
+ **Without this tag, the workflow will stop.**
653
+ Your final output MUST include a status tag following the rules below.
654
+
655
+ ## Output Format
656
+
657
+ | Situation | Tag |
658
+ |-----------|-----|
659
+ | No security issues | `[SECURITY:APPROVE]` |
660
+ | Vulnerabilities found | `[SECURITY:REJECT]` |
535
661
  instruction_template: |
536
662
  ## Workflow Context
537
- - Iteration: {iteration}/{max_iterations}
663
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
664
+ - Step Iteration: {step_iteration} (times this step has run)
538
665
  - Step: security_review (Security Expert Review)
539
666
  - Report Directory: .takt/reports/{report_dir}/
540
667
  - Report File: .takt/reports/{report_dir}/06-security-review.md
@@ -559,7 +686,7 @@ steps:
559
686
 
560
687
  **Report output:** Output to the `Report File` specified above.
561
688
  - If file does not exist: Create new file
562
- - If file exists: Append with `## Iteration {iteration}` section
689
+ - If file exists: Append with `## Iteration {step_iteration}` section
563
690
 
564
691
  **Report format:**
565
692
  ```markdown
@@ -606,9 +733,23 @@ steps:
606
733
  - Bash
607
734
  - WebSearch
608
735
  - WebFetch
736
+ status_rules_prompt: |
737
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
738
+
739
+ **Without this tag, the workflow will stop.**
740
+ Your final output MUST include a status tag following the rules below.
741
+
742
+ ## Output Format
743
+
744
+ | Situation | Tag |
745
+ |-----------|-----|
746
+ | Minor fix complete | `[CODER:DONE]` |
747
+ | Major fix (restart from CQRS+ES) | `[CODER:REJECT]` |
748
+ | Cannot proceed | `[CODER:BLOCKED]` |
609
749
  instruction_template: |
610
750
  ## Workflow Context
611
- - Iteration: {iteration}/{max_iterations}
751
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
752
+ - Step Iteration: {step_iteration} (times this step has run)
612
753
  - Step: fix_security
613
754
 
614
755
  ## Security Review Feedback (This is the latest instruction - prioritize this)
@@ -659,9 +800,22 @@ steps:
659
800
  - Grep
660
801
  - WebSearch
661
802
  - WebFetch
803
+ status_rules_prompt: |
804
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
805
+
806
+ **Without this tag, the workflow will stop.**
807
+ Your final output MUST include a status tag following the rules below.
808
+
809
+ ## Output Format
810
+
811
+ | Situation | Tag |
812
+ |-----------|-----|
813
+ | Quality standards met | `[QA:APPROVE]` |
814
+ | Quality issues found | `[QA:REJECT]` |
662
815
  instruction_template: |
663
816
  ## Workflow Context
664
- - Iteration: {iteration}/{max_iterations}
817
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
818
+ - Step Iteration: {step_iteration} (times this step has run)
665
819
  - Step: qa_review (QA Expert Review)
666
820
  - Report Directory: .takt/reports/{report_dir}/
667
821
  - Report File: .takt/reports/{report_dir}/07-qa-review.md
@@ -687,7 +841,7 @@ steps:
687
841
 
688
842
  **Report output:** Output to the `Report File` specified above.
689
843
  - If file does not exist: Create new file
690
- - If file exists: Append with `## Iteration {iteration}` section
844
+ - If file exists: Append with `## Iteration {step_iteration}` section
691
845
 
692
846
  **Report format:**
693
847
  ```markdown
@@ -733,9 +887,24 @@ steps:
733
887
  - Bash
734
888
  - WebSearch
735
889
  - WebFetch
890
+ status_rules_prompt: |
891
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
892
+
893
+ **Without this tag, the workflow will stop.**
894
+ Your final output MUST include a status tag following the rules below.
895
+
896
+ ## Output Format
897
+
898
+ | Situation | Tag |
899
+ |-----------|-----|
900
+ | Minor fix complete | `[CODER:DONE]` |
901
+ | Security-impacting fix | `[CODER:IMPROVE]` |
902
+ | Major fix (restart from CQRS+ES) | `[CODER:REJECT]` |
903
+ | Cannot proceed | `[CODER:BLOCKED]` |
736
904
  instruction_template: |
737
905
  ## Workflow Context
738
- - Iteration: {iteration}/{max_iterations}
906
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
907
+ - Step Iteration: {step_iteration} (times this step has run)
739
908
  - Step: fix_qa
740
909
 
741
910
  ## QA Review Feedback (This is the latest instruction - prioritize this)
@@ -790,9 +959,22 @@ steps:
790
959
  - Grep
791
960
  - WebSearch
792
961
  - WebFetch
962
+ status_rules_prompt: |
963
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
964
+
965
+ **Without this tag, the workflow will stop.**
966
+ Your final output MUST include a status tag following the rules below.
967
+
968
+ ## Output Format
969
+
970
+ | Situation | Tag |
971
+ |-----------|-----|
972
+ | Ready to merge | `[SUPERVISOR:APPROVE]` |
973
+ | Issues found | `[SUPERVISOR:REJECT]` |
793
974
  instruction_template: |
794
975
  ## Workflow Context
795
- - Iteration: {iteration}/{max_iterations}
976
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
977
+ - Step Iteration: {step_iteration} (times this step has run)
796
978
  - Step: supervise (Final Review)
797
979
  - Report Directory: .takt/reports/{report_dir}/
798
980
  - Report Files:
@@ -828,7 +1010,7 @@ steps:
828
1010
 
829
1011
  **Report output:** Output to the `Report Files` specified above.
830
1012
  - If file does not exist: Create new file
831
- - If file exists: Append with `## Iteration {iteration}` section
1013
+ - If file exists: Append with `## Iteration {step_iteration}` section
832
1014
 
833
1015
  **Validation report format:**
834
1016
  ```markdown
@@ -906,9 +1088,22 @@ steps:
906
1088
  - Bash
907
1089
  - WebSearch
908
1090
  - WebFetch
1091
+ status_rules_prompt: |
1092
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
1093
+
1094
+ **Without this tag, the workflow will stop.**
1095
+ Your final output MUST include a status tag following the rules below.
1096
+
1097
+ ## Output Format
1098
+
1099
+ | Situation | Tag |
1100
+ |-----------|-----|
1101
+ | Fix complete | `[CODER:DONE]` |
1102
+ | Cannot proceed | `[CODER:BLOCKED]` |
909
1103
  instruction_template: |
910
1104
  ## Workflow Context
911
- - Iteration: {iteration}/{max_iterations}
1105
+ - Iteration: {iteration}/{max_iterations} (workflow-wide)
1106
+ - Step Iteration: {step_iteration} (times this step has run)
912
1107
  - Step: fix_supervisor
913
1108
 
914
1109
  ## Supervisor Feedback (This is the latest instruction - prioritize this)
@@ -1,6 +1,16 @@
1
1
  # MAGI System Workflow
2
2
  # A deliberation workflow modeled after Evangelion's MAGI system
3
3
  # Three personas (scientist, nurturer, pragmatist) analyze from different perspectives and vote
4
+ #
5
+ # Template Variables:
6
+ # {iteration} - Workflow-wide turn count (total steps executed across all agents)
7
+ # {max_iterations} - Maximum iterations allowed for the workflow
8
+ # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
9
+ # {task} - Original user request
10
+ # {previous_response} - Output from the previous step
11
+ # {git_diff} - Current uncommitted changes (git diff)
12
+ # {user_inputs} - Accumulated user inputs during workflow
13
+ # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
4
14
 
5
15
  name: magi
6
16
  description: MAGI Deliberation System - Analyze from 3 perspectives and decide by majority
@@ -16,6 +26,27 @@ steps:
16
26
  - Grep
17
27
  - WebSearch
18
28
  - WebFetch
29
+ status_rules_prompt: |
30
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
31
+
32
+ **Without this tag, the workflow will stop.**
33
+ Your final output MUST include a status tag following the rules below.
34
+
35
+ ## Output Format
36
+
37
+ | Judgment | Tag |
38
+ |----------|-----|
39
+ | In favor | `[MELCHIOR:APPROVE]` |
40
+ | Against | `[MELCHIOR:REJECT]` |
41
+ | Conditional approval | `[MELCHIOR:CONDITIONAL]` |
42
+
43
+ ### Output Example
44
+
45
+ ```
46
+ [MELCHIOR:APPROVE]
47
+
48
+ Reason: {Reason for approval}
49
+ ```
19
50
  instruction_template: |
20
51
  # MAGI System Initiated
21
52
 
@@ -25,11 +56,6 @@ steps:
25
56
  ## Instructions
26
57
  You are MELCHIOR-1 of the MAGI System.
27
58
  Analyze the above from the perspective of a scientist/engineer and render your judgment.
28
-
29
- Your judgment must be one of:
30
- - [MELCHIOR:APPROVE] - In favor
31
- - [MELCHIOR:REJECT] - Against
32
- - [MELCHIOR:CONDITIONAL] - Conditional approval
33
59
  transitions:
34
60
  - condition: always
35
61
  next_step: balthasar
@@ -42,6 +68,27 @@ steps:
42
68
  - Grep
43
69
  - WebSearch
44
70
  - WebFetch
71
+ status_rules_prompt: |
72
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
73
+
74
+ **Without this tag, the workflow will stop.**
75
+ Your final output MUST include a status tag following the rules below.
76
+
77
+ ## Output Format
78
+
79
+ | Judgment | Tag |
80
+ |----------|-----|
81
+ | In favor | `[BALTHASAR:APPROVE]` |
82
+ | Against | `[BALTHASAR:REJECT]` |
83
+ | Conditional approval | `[BALTHASAR:CONDITIONAL]` |
84
+
85
+ ### Output Example
86
+
87
+ ```
88
+ [BALTHASAR:APPROVE]
89
+
90
+ Reason: {Reason for approval}
91
+ ```
45
92
  instruction_template: |
46
93
  # MAGI System Continuing
47
94
 
@@ -55,11 +102,6 @@ steps:
55
102
  You are BALTHASAR-2 of the MAGI System.
56
103
  Analyze the above from the perspective of a nurturer and render your judgment.
57
104
  Consider MELCHIOR's judgment as reference, but make your own independent assessment.
58
-
59
- Your judgment must be one of:
60
- - [BALTHASAR:APPROVE] - In favor
61
- - [BALTHASAR:REJECT] - Against
62
- - [BALTHASAR:CONDITIONAL] - Conditional approval
63
105
  pass_previous_response: true
64
106
  transitions:
65
107
  - condition: always
@@ -73,28 +115,24 @@ steps:
73
115
  - Grep
74
116
  - WebSearch
75
117
  - WebFetch
76
- instruction_template: |
77
- # MAGI System Final Deliberation
118
+ status_rules_prompt: |
119
+ # ⚠️ REQUIRED: Status Output Rules ⚠️
78
120
 
79
- ## Matter for Deliberation
80
- {task}
121
+ **Without this tag, the workflow will stop.**
122
+ Your final output MUST include a status tag following the rules below.
81
123
 
82
- ## Previous Judgments
83
- {previous_response}
124
+ ## Output Format
84
125
 
85
- ## Instructions
86
- You are CASPER-3 of the MAGI System.
87
- Analyze the above from a practical/realistic perspective and render your judgment.
126
+ Final conclusion by majority vote:
88
127
 
89
- **Finally, tally the judgments from all three and provide the final conclusion.**
128
+ | Judgment | Tag |
129
+ |----------|-----|
130
+ | Approved (2+ in favor) | `[MAGI:APPROVE]` |
131
+ | Rejected (2+ against) | `[MAGI:REJECT]` |
132
+ | Conditional approval | `[MAGI:CONDITIONAL]` |
90
133
 
91
- ### Final Conclusion (Required)
92
- Determine the final judgment by majority vote:
93
- - [MAGI:APPROVE] - Approved (2 or more in favor)
94
- - [MAGI:REJECT] - Rejected (2 or more against)
95
- - [MAGI:CONDITIONAL] - Conditional approval (majority conditional or split opinions)
134
+ ### Output Example
96
135
 
97
- **Final Conclusion Format Example:**
98
136
  ```
99
137
  ## MAGI System Final Judgment
100
138
 
@@ -108,6 +146,20 @@ steps:
108
146
 
109
147
  [Reasoning/Summary]
110
148
  ```
149
+ instruction_template: |
150
+ # MAGI System Final Deliberation
151
+
152
+ ## Matter for Deliberation
153
+ {task}
154
+
155
+ ## Previous Judgments
156
+ {previous_response}
157
+
158
+ ## Instructions
159
+ You are CASPER-3 of the MAGI System.
160
+ Analyze the above from a practical/realistic perspective and render your judgment.
161
+
162
+ **Finally, tally the judgments from all three and provide the final conclusion.**
111
163
  pass_previous_response: true
112
164
  transitions:
113
165
  - condition: always