takt 0.1.2 → 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.
- package/dist/agents/runner.d.ts +2 -0
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +10 -2
- package/dist/agents/runner.js.map +1 -1
- package/dist/commands/workflowExecution.d.ts.map +1 -1
- package/dist/commands/workflowExecution.js +35 -1
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/workflowLoader.d.ts.map +1 -1
- package/dist/config/workflowLoader.js +1 -0
- package/dist/config/workflowLoader.js.map +1 -1
- package/dist/models/schemas.d.ts +2 -0
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +1 -0
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +2 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +1 -0
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/instruction-builder.d.ts.map +1 -1
- package/dist/workflow/instruction-builder.js +4 -0
- package/dist/workflow/instruction-builder.js.map +1 -1
- package/package.json +1 -1
- package/resources/global/en/agents/default/ai-reviewer.md +0 -20
- package/resources/global/en/agents/default/architect.md +5 -73
- package/resources/global/en/agents/default/coder.md +0 -39
- package/resources/global/en/agents/default/planner.md +0 -23
- package/resources/global/en/agents/default/security.md +0 -16
- package/resources/global/en/agents/default/supervisor.md +0 -19
- package/resources/global/en/agents/expert-review/cqrs-es-reviewer.md +0 -35
- package/resources/global/en/agents/expert-review/frontend-reviewer.md +0 -35
- package/resources/global/en/agents/expert-review/qa-reviewer.md +0 -36
- package/resources/global/en/agents/expert-review/security-reviewer.md +0 -37
- package/resources/global/en/agents/expert-review/supervisor.md +0 -62
- package/resources/global/en/agents/magi/balthasar.md +0 -20
- package/resources/global/en/agents/magi/casper.md +0 -42
- package/resources/global/en/agents/magi/melchior.md +0 -20
- package/resources/global/en/agents/research/digger.md +0 -41
- package/resources/global/en/agents/research/planner.md +0 -34
- package/resources/global/en/agents/research/supervisor.md +0 -36
- package/resources/global/en/workflows/default.yaml +383 -30
- package/resources/global/en/workflows/expert-review.yaml +171 -0
- package/resources/global/en/workflows/magi.yaml +68 -26
- package/resources/global/en/workflows/research.yaml +89 -8
- package/resources/global/ja/agents/default/ai-reviewer.md +0 -20
- package/resources/global/ja/agents/default/architect.md +5 -73
- package/resources/global/ja/agents/default/coder.md +1 -41
- package/resources/global/ja/agents/default/planner.md +0 -23
- package/resources/global/ja/agents/default/security.md +0 -16
- package/resources/global/ja/agents/default/supervisor.md +0 -19
- package/resources/global/ja/agents/expert-review/cqrs-es-reviewer.md +0 -35
- package/resources/global/ja/agents/expert-review/frontend-reviewer.md +0 -35
- package/resources/global/ja/agents/expert-review/qa-reviewer.md +0 -36
- package/resources/global/ja/agents/expert-review/security-reviewer.md +0 -37
- package/resources/global/ja/agents/expert-review/supervisor.md +0 -62
- package/resources/global/ja/agents/magi/balthasar.md +0 -20
- package/resources/global/ja/agents/magi/casper.md +0 -42
- package/resources/global/ja/agents/magi/melchior.md +0 -20
- package/resources/global/ja/agents/research/digger.md +0 -41
- package/resources/global/ja/agents/research/planner.md +0 -34
- package/resources/global/ja/agents/research/supervisor.md +0 -36
- package/resources/global/ja/workflows/default.yaml +383 -34
- package/resources/global/ja/workflows/expert-review.yaml +171 -0
- package/resources/global/ja/workflows/magi.yaml +68 -26
- package/resources/global/ja/workflows/research.yaml +89 -8
|
@@ -30,6 +30,18 @@ steps:
|
|
|
30
30
|
- Bash
|
|
31
31
|
- WebSearch
|
|
32
32
|
- WebFetch
|
|
33
|
+
status_rules_prompt: |
|
|
34
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
35
|
+
|
|
36
|
+
**Without this tag, the workflow will stop.**
|
|
37
|
+
Your final output MUST include a status tag following the rules below.
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
| Situation | Tag |
|
|
42
|
+
|-----------|-----|
|
|
43
|
+
| Analysis complete | `[PLANNER:DONE]` |
|
|
44
|
+
| Requirements unclear | `[PLANNER:BLOCKED]` |
|
|
33
45
|
instruction_template: |
|
|
34
46
|
## Workflow Context
|
|
35
47
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -103,6 +115,18 @@ steps:
|
|
|
103
115
|
- Bash
|
|
104
116
|
- WebSearch
|
|
105
117
|
- WebFetch
|
|
118
|
+
status_rules_prompt: |
|
|
119
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
120
|
+
|
|
121
|
+
**Without this tag, the workflow will stop.**
|
|
122
|
+
Your final output MUST include a status tag following the rules below.
|
|
123
|
+
|
|
124
|
+
## Output Format
|
|
125
|
+
|
|
126
|
+
| Situation | Tag |
|
|
127
|
+
|-----------|-----|
|
|
128
|
+
| Implementation complete | `[CODER:DONE]` |
|
|
129
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
106
130
|
instruction_template: |
|
|
107
131
|
## Workflow Context
|
|
108
132
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -175,6 +199,18 @@ steps:
|
|
|
175
199
|
- Grep
|
|
176
200
|
- WebSearch
|
|
177
201
|
- WebFetch
|
|
202
|
+
status_rules_prompt: |
|
|
203
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
204
|
+
|
|
205
|
+
**Without this tag, the workflow will stop.**
|
|
206
|
+
Your final output MUST include a status tag following the rules below.
|
|
207
|
+
|
|
208
|
+
## Output Format
|
|
209
|
+
|
|
210
|
+
| Situation | Tag |
|
|
211
|
+
|-----------|-----|
|
|
212
|
+
| Design is sound | `[CQRS-ES:APPROVE]` |
|
|
213
|
+
| Design issues found | `[CQRS-ES:REJECT]` |
|
|
178
214
|
instruction_template: |
|
|
179
215
|
## Workflow Context
|
|
180
216
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -252,6 +288,18 @@ steps:
|
|
|
252
288
|
- Bash
|
|
253
289
|
- WebSearch
|
|
254
290
|
- WebFetch
|
|
291
|
+
status_rules_prompt: |
|
|
292
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
293
|
+
|
|
294
|
+
**Without this tag, the workflow will stop.**
|
|
295
|
+
Your final output MUST include a status tag following the rules below.
|
|
296
|
+
|
|
297
|
+
## Output Format
|
|
298
|
+
|
|
299
|
+
| Situation | Tag |
|
|
300
|
+
|-----------|-----|
|
|
301
|
+
| Fix complete | `[CODER:DONE]` |
|
|
302
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
255
303
|
instruction_template: |
|
|
256
304
|
## Workflow Context
|
|
257
305
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -296,6 +344,18 @@ steps:
|
|
|
296
344
|
- Grep
|
|
297
345
|
- WebSearch
|
|
298
346
|
- WebFetch
|
|
347
|
+
status_rules_prompt: |
|
|
348
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
349
|
+
|
|
350
|
+
**Without this tag, the workflow will stop.**
|
|
351
|
+
Your final output MUST include a status tag following the rules below.
|
|
352
|
+
|
|
353
|
+
## Output Format
|
|
354
|
+
|
|
355
|
+
| Situation | Tag |
|
|
356
|
+
|-----------|-----|
|
|
357
|
+
| Frontend design is sound | `[FRONTEND:APPROVE]` |
|
|
358
|
+
| Design issues found | `[FRONTEND:REJECT]` |
|
|
299
359
|
instruction_template: |
|
|
300
360
|
## Workflow Context
|
|
301
361
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -373,6 +433,18 @@ steps:
|
|
|
373
433
|
- Bash
|
|
374
434
|
- WebSearch
|
|
375
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
|
+
## Output Format
|
|
443
|
+
|
|
444
|
+
| Situation | Tag |
|
|
445
|
+
|-----------|-----|
|
|
446
|
+
| Fix complete | `[CODER:DONE]` |
|
|
447
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
376
448
|
instruction_template: |
|
|
377
449
|
## Workflow Context
|
|
378
450
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -417,6 +489,18 @@ steps:
|
|
|
417
489
|
- Grep
|
|
418
490
|
- WebSearch
|
|
419
491
|
- WebFetch
|
|
492
|
+
status_rules_prompt: |
|
|
493
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
494
|
+
|
|
495
|
+
**Without this tag, the workflow will stop.**
|
|
496
|
+
Your final output MUST include a status tag following the rules below.
|
|
497
|
+
|
|
498
|
+
## Output Format
|
|
499
|
+
|
|
500
|
+
| Situation | Tag |
|
|
501
|
+
|-----------|-----|
|
|
502
|
+
| No AI-specific issues | `[AI_REVIEW:APPROVE]` |
|
|
503
|
+
| Issues found | `[AI_REVIEW:REJECT]` |
|
|
420
504
|
instruction_template: |
|
|
421
505
|
## Workflow Context
|
|
422
506
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -490,6 +574,18 @@ steps:
|
|
|
490
574
|
- Bash
|
|
491
575
|
- WebSearch
|
|
492
576
|
- WebFetch
|
|
577
|
+
status_rules_prompt: |
|
|
578
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
579
|
+
|
|
580
|
+
**Without this tag, the workflow will stop.**
|
|
581
|
+
Your final output MUST include a status tag following the rules below.
|
|
582
|
+
|
|
583
|
+
## Output Format
|
|
584
|
+
|
|
585
|
+
| Situation | Tag |
|
|
586
|
+
|-----------|-----|
|
|
587
|
+
| Fix complete | `[CODER:DONE]` |
|
|
588
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
493
589
|
instruction_template: |
|
|
494
590
|
## Workflow Context
|
|
495
591
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -532,6 +628,18 @@ steps:
|
|
|
532
628
|
- Grep
|
|
533
629
|
- WebSearch
|
|
534
630
|
- WebFetch
|
|
631
|
+
status_rules_prompt: |
|
|
632
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
633
|
+
|
|
634
|
+
**Without this tag, the workflow will stop.**
|
|
635
|
+
Your final output MUST include a status tag following the rules below.
|
|
636
|
+
|
|
637
|
+
## Output Format
|
|
638
|
+
|
|
639
|
+
| Situation | Tag |
|
|
640
|
+
|-----------|-----|
|
|
641
|
+
| No security issues | `[SECURITY:APPROVE]` |
|
|
642
|
+
| Vulnerabilities found | `[SECURITY:REJECT]` |
|
|
535
643
|
instruction_template: |
|
|
536
644
|
## Workflow Context
|
|
537
645
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -606,6 +714,19 @@ steps:
|
|
|
606
714
|
- Bash
|
|
607
715
|
- WebSearch
|
|
608
716
|
- WebFetch
|
|
717
|
+
status_rules_prompt: |
|
|
718
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
719
|
+
|
|
720
|
+
**Without this tag, the workflow will stop.**
|
|
721
|
+
Your final output MUST include a status tag following the rules below.
|
|
722
|
+
|
|
723
|
+
## Output Format
|
|
724
|
+
|
|
725
|
+
| Situation | Tag |
|
|
726
|
+
|-----------|-----|
|
|
727
|
+
| Minor fix complete | `[CODER:DONE]` |
|
|
728
|
+
| Major fix (restart from CQRS+ES) | `[CODER:REJECT]` |
|
|
729
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
609
730
|
instruction_template: |
|
|
610
731
|
## Workflow Context
|
|
611
732
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -659,6 +780,18 @@ steps:
|
|
|
659
780
|
- Grep
|
|
660
781
|
- WebSearch
|
|
661
782
|
- WebFetch
|
|
783
|
+
status_rules_prompt: |
|
|
784
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
785
|
+
|
|
786
|
+
**Without this tag, the workflow will stop.**
|
|
787
|
+
Your final output MUST include a status tag following the rules below.
|
|
788
|
+
|
|
789
|
+
## Output Format
|
|
790
|
+
|
|
791
|
+
| Situation | Tag |
|
|
792
|
+
|-----------|-----|
|
|
793
|
+
| Quality standards met | `[QA:APPROVE]` |
|
|
794
|
+
| Quality issues found | `[QA:REJECT]` |
|
|
662
795
|
instruction_template: |
|
|
663
796
|
## Workflow Context
|
|
664
797
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -733,6 +866,20 @@ steps:
|
|
|
733
866
|
- Bash
|
|
734
867
|
- WebSearch
|
|
735
868
|
- WebFetch
|
|
869
|
+
status_rules_prompt: |
|
|
870
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
871
|
+
|
|
872
|
+
**Without this tag, the workflow will stop.**
|
|
873
|
+
Your final output MUST include a status tag following the rules below.
|
|
874
|
+
|
|
875
|
+
## Output Format
|
|
876
|
+
|
|
877
|
+
| Situation | Tag |
|
|
878
|
+
|-----------|-----|
|
|
879
|
+
| Minor fix complete | `[CODER:DONE]` |
|
|
880
|
+
| Security-impacting fix | `[CODER:IMPROVE]` |
|
|
881
|
+
| Major fix (restart from CQRS+ES) | `[CODER:REJECT]` |
|
|
882
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
736
883
|
instruction_template: |
|
|
737
884
|
## Workflow Context
|
|
738
885
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -790,6 +937,18 @@ steps:
|
|
|
790
937
|
- Grep
|
|
791
938
|
- WebSearch
|
|
792
939
|
- WebFetch
|
|
940
|
+
status_rules_prompt: |
|
|
941
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
942
|
+
|
|
943
|
+
**Without this tag, the workflow will stop.**
|
|
944
|
+
Your final output MUST include a status tag following the rules below.
|
|
945
|
+
|
|
946
|
+
## Output Format
|
|
947
|
+
|
|
948
|
+
| Situation | Tag |
|
|
949
|
+
|-----------|-----|
|
|
950
|
+
| Ready to merge | `[SUPERVISOR:APPROVE]` |
|
|
951
|
+
| Issues found | `[SUPERVISOR:REJECT]` |
|
|
793
952
|
instruction_template: |
|
|
794
953
|
## Workflow Context
|
|
795
954
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -906,6 +1065,18 @@ steps:
|
|
|
906
1065
|
- Bash
|
|
907
1066
|
- WebSearch
|
|
908
1067
|
- WebFetch
|
|
1068
|
+
status_rules_prompt: |
|
|
1069
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
1070
|
+
|
|
1071
|
+
**Without this tag, the workflow will stop.**
|
|
1072
|
+
Your final output MUST include a status tag following the rules below.
|
|
1073
|
+
|
|
1074
|
+
## Output Format
|
|
1075
|
+
|
|
1076
|
+
| Situation | Tag |
|
|
1077
|
+
|-----------|-----|
|
|
1078
|
+
| Fix complete | `[CODER:DONE]` |
|
|
1079
|
+
| Cannot proceed | `[CODER:BLOCKED]` |
|
|
909
1080
|
instruction_template: |
|
|
910
1081
|
## Workflow Context
|
|
911
1082
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -16,6 +16,27 @@ steps:
|
|
|
16
16
|
- Grep
|
|
17
17
|
- WebSearch
|
|
18
18
|
- WebFetch
|
|
19
|
+
status_rules_prompt: |
|
|
20
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
21
|
+
|
|
22
|
+
**Without this tag, the workflow will stop.**
|
|
23
|
+
Your final output MUST include a status tag following the rules below.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
| Judgment | Tag |
|
|
28
|
+
|----------|-----|
|
|
29
|
+
| In favor | `[MELCHIOR:APPROVE]` |
|
|
30
|
+
| Against | `[MELCHIOR:REJECT]` |
|
|
31
|
+
| Conditional approval | `[MELCHIOR:CONDITIONAL]` |
|
|
32
|
+
|
|
33
|
+
### Output Example
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
[MELCHIOR:APPROVE]
|
|
37
|
+
|
|
38
|
+
Reason: {Reason for approval}
|
|
39
|
+
```
|
|
19
40
|
instruction_template: |
|
|
20
41
|
# MAGI System Initiated
|
|
21
42
|
|
|
@@ -25,11 +46,6 @@ steps:
|
|
|
25
46
|
## Instructions
|
|
26
47
|
You are MELCHIOR-1 of the MAGI System.
|
|
27
48
|
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
49
|
transitions:
|
|
34
50
|
- condition: always
|
|
35
51
|
next_step: balthasar
|
|
@@ -42,6 +58,27 @@ steps:
|
|
|
42
58
|
- Grep
|
|
43
59
|
- WebSearch
|
|
44
60
|
- WebFetch
|
|
61
|
+
status_rules_prompt: |
|
|
62
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
63
|
+
|
|
64
|
+
**Without this tag, the workflow will stop.**
|
|
65
|
+
Your final output MUST include a status tag following the rules below.
|
|
66
|
+
|
|
67
|
+
## Output Format
|
|
68
|
+
|
|
69
|
+
| Judgment | Tag |
|
|
70
|
+
|----------|-----|
|
|
71
|
+
| In favor | `[BALTHASAR:APPROVE]` |
|
|
72
|
+
| Against | `[BALTHASAR:REJECT]` |
|
|
73
|
+
| Conditional approval | `[BALTHASAR:CONDITIONAL]` |
|
|
74
|
+
|
|
75
|
+
### Output Example
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
[BALTHASAR:APPROVE]
|
|
79
|
+
|
|
80
|
+
Reason: {Reason for approval}
|
|
81
|
+
```
|
|
45
82
|
instruction_template: |
|
|
46
83
|
# MAGI System Continuing
|
|
47
84
|
|
|
@@ -55,11 +92,6 @@ steps:
|
|
|
55
92
|
You are BALTHASAR-2 of the MAGI System.
|
|
56
93
|
Analyze the above from the perspective of a nurturer and render your judgment.
|
|
57
94
|
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
95
|
pass_previous_response: true
|
|
64
96
|
transitions:
|
|
65
97
|
- condition: always
|
|
@@ -73,28 +105,24 @@ steps:
|
|
|
73
105
|
- Grep
|
|
74
106
|
- WebSearch
|
|
75
107
|
- WebFetch
|
|
76
|
-
|
|
77
|
-
#
|
|
108
|
+
status_rules_prompt: |
|
|
109
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
78
110
|
|
|
79
|
-
|
|
80
|
-
|
|
111
|
+
**Without this tag, the workflow will stop.**
|
|
112
|
+
Your final output MUST include a status tag following the rules below.
|
|
81
113
|
|
|
82
|
-
##
|
|
83
|
-
{previous_response}
|
|
114
|
+
## Output Format
|
|
84
115
|
|
|
85
|
-
|
|
86
|
-
You are CASPER-3 of the MAGI System.
|
|
87
|
-
Analyze the above from a practical/realistic perspective and render your judgment.
|
|
116
|
+
Final conclusion by majority vote:
|
|
88
117
|
|
|
89
|
-
|
|
118
|
+
| Judgment | Tag |
|
|
119
|
+
|----------|-----|
|
|
120
|
+
| Approved (2+ in favor) | `[MAGI:APPROVE]` |
|
|
121
|
+
| Rejected (2+ against) | `[MAGI:REJECT]` |
|
|
122
|
+
| Conditional approval | `[MAGI:CONDITIONAL]` |
|
|
90
123
|
|
|
91
|
-
###
|
|
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)
|
|
124
|
+
### Output Example
|
|
96
125
|
|
|
97
|
-
**Final Conclusion Format Example:**
|
|
98
126
|
```
|
|
99
127
|
## MAGI System Final Judgment
|
|
100
128
|
|
|
@@ -108,6 +136,20 @@ steps:
|
|
|
108
136
|
|
|
109
137
|
[Reasoning/Summary]
|
|
110
138
|
```
|
|
139
|
+
instruction_template: |
|
|
140
|
+
# MAGI System Final Deliberation
|
|
141
|
+
|
|
142
|
+
## Matter for Deliberation
|
|
143
|
+
{task}
|
|
144
|
+
|
|
145
|
+
## Previous Judgments
|
|
146
|
+
{previous_response}
|
|
147
|
+
|
|
148
|
+
## Instructions
|
|
149
|
+
You are CASPER-3 of the MAGI System.
|
|
150
|
+
Analyze the above from a practical/realistic perspective and render your judgment.
|
|
151
|
+
|
|
152
|
+
**Finally, tally the judgments from all three and provide the final conclusion.**
|
|
111
153
|
pass_previous_response: true
|
|
112
154
|
transitions:
|
|
113
155
|
- condition: always
|
|
@@ -20,6 +20,33 @@ steps:
|
|
|
20
20
|
- Grep
|
|
21
21
|
- WebSearch
|
|
22
22
|
- WebFetch
|
|
23
|
+
status_rules_prompt: |
|
|
24
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
25
|
+
|
|
26
|
+
**Without this tag, the workflow will stop.**
|
|
27
|
+
Your final output MUST include a status tag following the rules below.
|
|
28
|
+
|
|
29
|
+
## Output Format
|
|
30
|
+
|
|
31
|
+
| Situation | Tag |
|
|
32
|
+
|-----------|-----|
|
|
33
|
+
| Plan complete | `[PLANNER:DONE]` |
|
|
34
|
+
| Insufficient info | `[PLANNER:BLOCKED]` |
|
|
35
|
+
|
|
36
|
+
### Output Examples
|
|
37
|
+
|
|
38
|
+
**DONE case:**
|
|
39
|
+
```
|
|
40
|
+
[PLANNER:DONE]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**BLOCKED case:**
|
|
44
|
+
```
|
|
45
|
+
[PLANNER:BLOCKED]
|
|
46
|
+
|
|
47
|
+
Clarifications needed:
|
|
48
|
+
- {Question 1}
|
|
49
|
+
```
|
|
23
50
|
instruction_template: |
|
|
24
51
|
## Workflow Status
|
|
25
52
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -41,8 +68,6 @@ steps:
|
|
|
41
68
|
- Make assumptions for unclear points and proceed
|
|
42
69
|
- If multiple interpretations exist, include all in the research scope
|
|
43
70
|
- If there is feedback from Supervisor, incorporate it into the plan
|
|
44
|
-
|
|
45
|
-
Output [PLANNER:DONE] when the plan is complete.
|
|
46
71
|
pass_previous_response: true
|
|
47
72
|
transitions:
|
|
48
73
|
- condition: done
|
|
@@ -58,6 +83,32 @@ steps:
|
|
|
58
83
|
- Grep
|
|
59
84
|
- WebSearch
|
|
60
85
|
- WebFetch
|
|
86
|
+
status_rules_prompt: |
|
|
87
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
88
|
+
|
|
89
|
+
**Without this tag, the workflow will stop.**
|
|
90
|
+
Your final output MUST include a status tag following the rules below.
|
|
91
|
+
|
|
92
|
+
## Output Format
|
|
93
|
+
|
|
94
|
+
| Situation | Tag |
|
|
95
|
+
|-----------|-----|
|
|
96
|
+
| Research complete | `[DIGGER:DONE]` |
|
|
97
|
+
| Unable to research | `[DIGGER:BLOCKED]` |
|
|
98
|
+
|
|
99
|
+
### Output Examples
|
|
100
|
+
|
|
101
|
+
**DONE case:**
|
|
102
|
+
```
|
|
103
|
+
[DIGGER:DONE]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**BLOCKED case:**
|
|
107
|
+
```
|
|
108
|
+
[DIGGER:BLOCKED]
|
|
109
|
+
|
|
110
|
+
Reason: {Why research was not possible}
|
|
111
|
+
```
|
|
61
112
|
instruction_template: |
|
|
62
113
|
## Workflow Status
|
|
63
114
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -84,8 +135,6 @@ steps:
|
|
|
84
135
|
- GitHub search (gh command)
|
|
85
136
|
- Codebase search
|
|
86
137
|
- File reading
|
|
87
|
-
|
|
88
|
-
Output [DIGGER:DONE] when the research is complete.
|
|
89
138
|
pass_previous_response: true
|
|
90
139
|
transitions:
|
|
91
140
|
- condition: done
|
|
@@ -101,6 +150,42 @@ steps:
|
|
|
101
150
|
- Grep
|
|
102
151
|
- WebSearch
|
|
103
152
|
- WebFetch
|
|
153
|
+
status_rules_prompt: |
|
|
154
|
+
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
155
|
+
|
|
156
|
+
**Without this tag, the workflow will stop.**
|
|
157
|
+
Your final output MUST include a status tag following the rules below.
|
|
158
|
+
|
|
159
|
+
## Judgment Criteria
|
|
160
|
+
|
|
161
|
+
| Situation | Judgment |
|
|
162
|
+
|-----------|----------|
|
|
163
|
+
| Research results sufficient | APPROVE |
|
|
164
|
+
| Research results insufficient | REJECT |
|
|
165
|
+
|
|
166
|
+
## Output Format
|
|
167
|
+
|
|
168
|
+
| Situation | Tag |
|
|
169
|
+
|-----------|-----|
|
|
170
|
+
| Research complete, results sufficient | `[SUPERVISOR:APPROVE]` |
|
|
171
|
+
| Insufficient, restart from planning | `[SUPERVISOR:REJECT]` |
|
|
172
|
+
|
|
173
|
+
### Output Examples
|
|
174
|
+
|
|
175
|
+
**APPROVE case:**
|
|
176
|
+
```
|
|
177
|
+
[SUPERVISOR:APPROVE]
|
|
178
|
+
|
|
179
|
+
Research results adequately answer the original request.
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**REJECT case:**
|
|
183
|
+
```
|
|
184
|
+
[SUPERVISOR:REJECT]
|
|
185
|
+
|
|
186
|
+
Missing:
|
|
187
|
+
- {Specific missing items}
|
|
188
|
+
```
|
|
104
189
|
instruction_template: |
|
|
105
190
|
## Workflow Status
|
|
106
191
|
- Iteration: {iteration}/{max_iterations}
|
|
@@ -115,10 +200,6 @@ steps:
|
|
|
115
200
|
## Instructions
|
|
116
201
|
Evaluate the research results and determine if they adequately answer the original request.
|
|
117
202
|
|
|
118
|
-
**Evaluation Output**:
|
|
119
|
-
- [SUPERVISOR:APPROVE] - Research complete, results are sufficient
|
|
120
|
-
- [SUPERVISOR:REJECT] - Insufficient, restart from planning (specify what's missing)
|
|
121
|
-
|
|
122
203
|
**Important**: If there are issues, include specific instructions for the Planner.
|
|
123
204
|
pass_previous_response: true
|
|
124
205
|
transitions:
|
|
@@ -107,26 +107,6 @@ AI生成コードには特有の特徴があります:
|
|
|
107
107
|
| 代替案が検討されている | 他のアプローチは評価されたか? |
|
|
108
108
|
| 仮定が明示されている | 仮定は明示的で合理的か? |
|
|
109
109
|
|
|
110
|
-
## 判定基準
|
|
111
|
-
|
|
112
|
-
| 状況 | 判定 |
|
|
113
|
-
|------|------|
|
|
114
|
-
| 仮定が間違っている(動作に影響) | REJECT |
|
|
115
|
-
| もっともらしいが間違っているコード | REJECT |
|
|
116
|
-
| コードベースの文脈に重大な不整合 | REJECT |
|
|
117
|
-
| スコープクリープ | APPROVE(警告を付記) |
|
|
118
|
-
| 軽微なスタイルの逸脱のみ | APPROVE |
|
|
119
|
-
| コードが文脈に合い動作する | APPROVE |
|
|
120
|
-
|
|
121
|
-
**注意:** スコープクリープは警告として記載するが、それだけでREJECTしない。大きな変更が必要なタスクもある。
|
|
122
|
-
|
|
123
|
-
## 出力フォーマット
|
|
124
|
-
|
|
125
|
-
| 状況 | タグ |
|
|
126
|
-
|------|------|
|
|
127
|
-
| AI特有の問題なし | `[AI_REVIEW:APPROVE]` |
|
|
128
|
-
| 問題あり | `[AI_REVIEW:REJECT]` |
|
|
129
|
-
|
|
130
110
|
## 重要
|
|
131
111
|
|
|
132
112
|
**AI特有の問題に集中する。** ArchitectやSecurityレビュアーがチェックすることを重複しない。
|
|
@@ -251,83 +251,15 @@ Vertical Slice の判定基準:
|
|
|
251
251
|
2. 繰り返されている場合、細かい修正指示ではなく**アプローチ自体の代替案**を提示
|
|
252
252
|
3. REJECTする場合でも、「別のアプローチを検討すべき」という観点を含める
|
|
253
253
|
|
|
254
|
-
|
|
255
|
-
[ARCHITECT:REJECT]
|
|
256
|
-
|
|
257
|
-
### 問題点
|
|
258
|
-
(通常の指摘)
|
|
259
|
-
|
|
260
|
-
### アプローチの再検討
|
|
261
|
-
3回目のレビューで同様の問題が続いています。
|
|
262
|
-
現在のアプローチでは解決が困難な可能性があります。
|
|
254
|
+
例: 3回目のレビューで問題が繰り返される場合
|
|
263
255
|
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
|
|
256
|
+
- 通常の問題点を指摘
|
|
257
|
+
- 同じ種類の問題が繰り返されていることを明記
|
|
258
|
+
- 現在のアプローチの限界を説明
|
|
259
|
+
- 代替案を提示(例: 別のパターンで再設計、新技術の導入など)
|
|
268
260
|
|
|
269
261
|
**ポイント**: 「もう一度修正して」と繰り返すより、立ち止まって別の道を示す。
|
|
270
262
|
|
|
271
|
-
## 判定基準
|
|
272
|
-
|
|
273
|
-
| 状況 | 判定 |
|
|
274
|
-
|------|------|
|
|
275
|
-
| 構造に問題がある | REJECT |
|
|
276
|
-
| 設計原則違反がある | REJECT |
|
|
277
|
-
| セキュリティ問題がある | REJECT |
|
|
278
|
-
| テストが不十分 | REJECT |
|
|
279
|
-
| 改善すべき点がある(ブロッキングではないが対応すべき) | IMPROVE |
|
|
280
|
-
| 問題なし | APPROVE |
|
|
281
|
-
|
|
282
|
-
**IMPROVEの使い方:**
|
|
283
|
-
- 設計としては許容範囲だが、改善した方が良い点がある場合
|
|
284
|
-
- 次のステップに進む前に修正させたい軽微な問題
|
|
285
|
-
- 例: 命名の改善、小さなリファクタリング、コメント追加
|
|
286
|
-
|
|
287
|
-
## 出力フォーマット
|
|
288
|
-
|
|
289
|
-
| 状況 | タグ |
|
|
290
|
-
|------|------|
|
|
291
|
-
| 問題なし | `[ARCHITECT:APPROVE]` |
|
|
292
|
-
| 改善すべき点がある(軽微) | `[ARCHITECT:IMPROVE]` |
|
|
293
|
-
| 問題があり修正が必要 | `[ARCHITECT:REJECT]` |
|
|
294
|
-
|
|
295
|
-
### 出力例
|
|
296
|
-
|
|
297
|
-
**REJECT の場合:**
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
[ARCHITECT:REJECT]
|
|
301
|
-
|
|
302
|
-
### 問題点
|
|
303
|
-
|
|
304
|
-
1. **ファイルサイズ超過**
|
|
305
|
-
- 場所: `src/services/user.ts` (523行)
|
|
306
|
-
- 問題: 単一ファイルに認証・権限・プロフィール管理が混在
|
|
307
|
-
- 修正案: 以下の3ファイルに分割
|
|
308
|
-
- `src/services/auth.ts` - 認証
|
|
309
|
-
- `src/services/permission.ts` - 権限
|
|
310
|
-
- `src/services/profile.ts` - プロフィール
|
|
311
|
-
|
|
312
|
-
2. **フォールバック値の乱用**
|
|
313
|
-
- 場所: `src/api/handler.ts:42`
|
|
314
|
-
- 問題: `user.name ?? 'unknown'` でエラーを隠蔽
|
|
315
|
-
- 修正案: nullの場合はエラーをthrowする
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
**APPROVE の場合:**
|
|
319
|
-
|
|
320
|
-
```
|
|
321
|
-
[ARCHITECT:APPROVE]
|
|
322
|
-
|
|
323
|
-
### 良い点
|
|
324
|
-
- モジュール分割が適切
|
|
325
|
-
- 単一責務が守られている
|
|
326
|
-
|
|
327
|
-
### 改善提案(任意)
|
|
328
|
-
- `utils/` 内の共通処理は将来的に整理を検討
|
|
329
|
-
```
|
|
330
|
-
|
|
331
263
|
## 重要
|
|
332
264
|
|
|
333
265
|
**具体的に指摘する。** 以下は禁止:
|
|
@@ -142,44 +142,4 @@
|
|
|
142
142
|
- **any型** - 型安全を破壊しない
|
|
143
143
|
- **オブジェクト/配列の直接変更** - スプレッド演算子で新規作成
|
|
144
144
|
- **console.log** - 本番コードに残さない
|
|
145
|
-
- **機密情報のハードコーディング**
|
|
146
|
-
|
|
147
|
-
## 出力フォーマット
|
|
148
|
-
|
|
149
|
-
作業完了時は必ず以下のタグを含めてください:
|
|
150
|
-
|
|
151
|
-
| 状況 | タグ |
|
|
152
|
-
|------|------|
|
|
153
|
-
| 実装完了 | `[CODER:DONE]` |
|
|
154
|
-
| Architectの指摘を修正完了 | `[CODER:FIXED]` |
|
|
155
|
-
| 判断できない/情報不足 | `[CODER:BLOCKED]` |
|
|
156
|
-
|
|
157
|
-
**重要**: 迷ったら `[BLOCKED]`。勝手に判断しない。
|
|
158
|
-
|
|
159
|
-
### 出力例
|
|
160
|
-
|
|
161
|
-
**実装完了時:**
|
|
162
|
-
```
|
|
163
|
-
実装完了しました。
|
|
164
|
-
- 作成: `src/auth/service.ts`, `tests/auth.test.ts`
|
|
165
|
-
- 変更: `src/routes.ts`
|
|
166
|
-
|
|
167
|
-
[CODER:DONE]
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
**ブロック時:**
|
|
171
|
-
```
|
|
172
|
-
[CODER:BLOCKED]
|
|
173
|
-
理由: DBスキーマが未定義のため実装できません
|
|
174
|
-
必要な情報: usersテーブルの構造
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**修正完了時:**
|
|
178
|
-
```
|
|
179
|
-
Architectの指摘3点を修正しました。
|
|
180
|
-
- 型定義を追加
|
|
181
|
-
- エラーハンドリングを修正
|
|
182
|
-
- テストケースを追加
|
|
183
|
-
|
|
184
|
-
[CODER:FIXED]
|
|
185
|
-
```
|
|
145
|
+
- **機密情報のハードコーディング**
|