@sublang/playbook 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -19
- package/package.json +18 -6
- package/reference/sdlc/code.playbook/bin/playbook-code.js +277 -104
- package/reference/sdlc/code.playbook/code.fsm.d.ts +1 -0
- package/reference/sdlc/code.playbook/code.fsm.js +67 -29
- package/reference/sdlc/code.playbook/code.fsm.ts +74 -29
- package/reference/sdlc/code.playbook/code.gears.md +66 -30
- package/reference/sdlc/code.playbook/code.playbook.d.ts +19 -3
- package/reference/sdlc/code.playbook/code.playbook.js +292 -34
- package/reference/sdlc/code.playbook/code.playbook.ts +290 -35
- package/reference/sdlc/code.playbook/code.registry.d.ts +43 -0
- package/reference/sdlc/code.playbook/code.registry.js +109 -0
- package/reference/sdlc/code.playbook/code.registry.ts +159 -0
- package/reference/sdlc/code.playbook/code.tmux-play.d.ts +2 -0
- package/reference/sdlc/code.playbook/code.tmux-play.js +7 -93
- package/reference/sdlc/code.playbook/code.tmux-play.ts +20 -118
- package/reference/sdlc/code.playbook/playbook-captain.d.ts +21 -0
- package/reference/sdlc/code.playbook/playbook-captain.js +491 -0
- package/reference/sdlc/code.playbook/playbook-captain.ts +701 -0
- package/reference/sdlc/code.playbook/playbook-code.config.template.yaml +50 -25
- package/reference/sdlc/code.playbook/tmux-play.config.yaml +13 -8
- package/reference/sdlc/code.playbook/tmux-play.production.config.yaml +8 -4
|
@@ -112,8 +112,9 @@ const planAndImplementInput = (context) => ({
|
|
|
112
112
|
...bossReplyInputFields(context),
|
|
113
113
|
prompt: [
|
|
114
114
|
'Assess whether this can be completed in a single commit, following best practices.',
|
|
115
|
-
'If yes, implement and test, updating both code and specs; otherwise, decompose into tasks as a new IR under @specs/iterations.',
|
|
116
|
-
'
|
|
115
|
+
'If yes, implement and test, updating both code and specs; otherwise, decompose into tasks as a new IR under @specs/iterations and stop without implementing any IR task.',
|
|
116
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
117
|
+
'Ensure @specs/map.md reflects the changes.',
|
|
117
118
|
'Do not commit.',
|
|
118
119
|
].join('\n'),
|
|
119
120
|
result: withNeedsBossReply({
|
|
@@ -154,7 +155,7 @@ const summarizeSpecsInput = (context) => ({
|
|
|
154
155
|
'The set should be complete and coherent.',
|
|
155
156
|
'Avoid implementation specifics.',
|
|
156
157
|
'Avoid redundant spec items.',
|
|
157
|
-
'
|
|
158
|
+
'Ensure @specs/map.md reflects the changes.',
|
|
158
159
|
].join('\n'),
|
|
159
160
|
result: withNeedsBossReply({
|
|
160
161
|
specsReady: 'Coder produced uncommitted spec updates (Initial Changes).',
|
|
@@ -497,12 +498,15 @@ export const codingMachine = setup({
|
|
|
497
498
|
'Verify any affected spec items are:',
|
|
498
499
|
'',
|
|
499
500
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
500
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
501
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
501
502
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
503
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
502
504
|
'',
|
|
503
505
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
504
|
-
'
|
|
506
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
507
|
+
'Verify @specs/map.md reflects the changes.',
|
|
505
508
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
509
|
+
'Do not edit files or commit; report findings only.',
|
|
506
510
|
].join('\n'),
|
|
507
511
|
result: {
|
|
508
512
|
noFindings: 'The spec-only commit has no review findings.',
|
|
@@ -538,8 +542,10 @@ export const codingMachine = setup({
|
|
|
538
542
|
'Refer to the commit message.',
|
|
539
543
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
540
544
|
"Think thoroughly — don't just approve or reject.",
|
|
541
|
-
'
|
|
545
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
546
|
+
'Verify @specs/map.md reflects the changes.',
|
|
542
547
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
548
|
+
'Do not edit files or commit; report findings only.',
|
|
543
549
|
].join('\n'),
|
|
544
550
|
result: {
|
|
545
551
|
noFindings: 'The code-only commit has no review findings.',
|
|
@@ -576,14 +582,17 @@ export const codingMachine = setup({
|
|
|
576
582
|
'Verify any affected spec items are:',
|
|
577
583
|
'',
|
|
578
584
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
579
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
585
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
580
586
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
587
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
581
588
|
'',
|
|
582
589
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
583
590
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
584
591
|
"Think thoroughly — don't just approve or reject.",
|
|
585
|
-
'
|
|
592
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
593
|
+
'Verify @specs/map.md reflects the changes.',
|
|
586
594
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
595
|
+
'Do not edit files or commit; report findings only.',
|
|
587
596
|
].join('\n'),
|
|
588
597
|
result: {
|
|
589
598
|
noFindings: 'The mixed commit has no review findings.',
|
|
@@ -621,12 +630,15 @@ export const codingMachine = setup({
|
|
|
621
630
|
'Verify any affected spec items are:',
|
|
622
631
|
'',
|
|
623
632
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
624
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
633
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
625
634
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
635
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
626
636
|
'',
|
|
627
637
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
628
|
-
'
|
|
638
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
639
|
+
'Verify @specs/map.md reflects the changes.',
|
|
629
640
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
641
|
+
'Do not edit files or commit; report findings only.',
|
|
630
642
|
].join('\n'),
|
|
631
643
|
result: {
|
|
632
644
|
noFindings: 'The IR-task spec-only commit has no review findings.',
|
|
@@ -663,8 +675,10 @@ export const codingMachine = setup({
|
|
|
663
675
|
'Refer to the commit message.',
|
|
664
676
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
665
677
|
"Think thoroughly — don't just approve or reject.",
|
|
666
|
-
'
|
|
678
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
679
|
+
'Verify @specs/map.md reflects the changes.',
|
|
667
680
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
681
|
+
'Do not edit files or commit; report findings only.',
|
|
668
682
|
].join('\n'),
|
|
669
683
|
result: {
|
|
670
684
|
noFindings: 'The IR-task code-only commit has no review findings.',
|
|
@@ -702,14 +716,17 @@ export const codingMachine = setup({
|
|
|
702
716
|
'Verify any affected spec items are:',
|
|
703
717
|
'',
|
|
704
718
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
705
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
719
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
706
720
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
721
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
707
722
|
'',
|
|
708
723
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
709
724
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
710
725
|
"Think thoroughly — don't just approve or reject.",
|
|
711
|
-
'
|
|
726
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
727
|
+
'Verify @specs/map.md reflects the changes.',
|
|
712
728
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
729
|
+
'Do not edit files or commit; report findings only.',
|
|
713
730
|
].join('\n'),
|
|
714
731
|
result: {
|
|
715
732
|
noFindings: 'The IR-task mixed commit has no review findings.',
|
|
@@ -740,17 +757,20 @@ export const codingMachine = setup({
|
|
|
740
757
|
sourceItem: 'CODE-11',
|
|
741
758
|
...bossReplyInputFields(context),
|
|
742
759
|
prompt: [
|
|
743
|
-
'Review the unstaged
|
|
760
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
744
761
|
'Understand the intent.',
|
|
745
762
|
'Verify any affected spec items are:',
|
|
746
763
|
'',
|
|
747
764
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
748
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
765
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
749
766
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
767
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
750
768
|
'',
|
|
751
769
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
752
|
-
'
|
|
770
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
771
|
+
'Verify @specs/map.md reflects the changes.',
|
|
753
772
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
773
|
+
'Do not edit files or commit; report findings only.',
|
|
754
774
|
].join('\n'),
|
|
755
775
|
result: {
|
|
756
776
|
noFindings: 'The uncommitted spec-only changes are ready to commit.',
|
|
@@ -783,12 +803,14 @@ export const codingMachine = setup({
|
|
|
783
803
|
sourceItem: 'CODE-12',
|
|
784
804
|
...bossReplyInputFields(context),
|
|
785
805
|
prompt: [
|
|
786
|
-
'Review the unstaged
|
|
806
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
787
807
|
'Understand the intent.',
|
|
788
808
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
789
809
|
"Think thoroughly — don't just approve or reject.",
|
|
790
|
-
'
|
|
810
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
811
|
+
'Verify @specs/map.md reflects the changes.',
|
|
791
812
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
813
|
+
'Do not edit files or commit; report findings only.',
|
|
792
814
|
].join('\n'),
|
|
793
815
|
result: {
|
|
794
816
|
noFindings: 'The uncommitted code-only changes are ready to commit.',
|
|
@@ -821,19 +843,22 @@ export const codingMachine = setup({
|
|
|
821
843
|
sourceItem: 'CODE-13',
|
|
822
844
|
...bossReplyInputFields(context),
|
|
823
845
|
prompt: [
|
|
824
|
-
'Review the unstaged
|
|
846
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
825
847
|
'Understand the intent.',
|
|
826
848
|
'Verify any affected spec items are:',
|
|
827
849
|
'',
|
|
828
850
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
829
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
851
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
830
852
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
853
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
831
854
|
'',
|
|
832
855
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
833
856
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
834
857
|
"Think thoroughly — don't just approve or reject.",
|
|
835
|
-
'
|
|
858
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
859
|
+
'Verify @specs/map.md reflects the changes.',
|
|
836
860
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
861
|
+
'Do not edit files or commit; report findings only.',
|
|
837
862
|
].join('\n'),
|
|
838
863
|
result: {
|
|
839
864
|
noFindings: 'The uncommitted mixed changes are ready to commit.',
|
|
@@ -868,17 +893,20 @@ export const codingMachine = setup({
|
|
|
868
893
|
reviews: context.reviews,
|
|
869
894
|
challenges: context.challenges,
|
|
870
895
|
prompt: [
|
|
871
|
-
'Review the unstaged
|
|
896
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
872
897
|
'Understand the intent.',
|
|
873
898
|
'Verify any affected spec items are:',
|
|
874
899
|
'',
|
|
875
900
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
876
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
901
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
877
902
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
903
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
878
904
|
'',
|
|
879
905
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
880
|
-
'
|
|
906
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
907
|
+
'Verify @specs/map.md reflects the changes.',
|
|
881
908
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
909
|
+
'Do not edit files or commit; report findings only.',
|
|
882
910
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
883
911
|
].join('\n'),
|
|
884
912
|
result: {
|
|
@@ -914,12 +942,14 @@ export const codingMachine = setup({
|
|
|
914
942
|
reviews: context.reviews,
|
|
915
943
|
challenges: context.challenges,
|
|
916
944
|
prompt: [
|
|
917
|
-
'Review the unstaged
|
|
945
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
918
946
|
'Understand the intent.',
|
|
919
947
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
920
948
|
"Think thoroughly — don't just approve or reject.",
|
|
921
|
-
'
|
|
949
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
950
|
+
'Verify @specs/map.md reflects the changes.',
|
|
922
951
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
952
|
+
'Do not edit files or commit; report findings only.',
|
|
923
953
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
924
954
|
].join('\n'),
|
|
925
955
|
result: {
|
|
@@ -955,19 +985,22 @@ export const codingMachine = setup({
|
|
|
955
985
|
reviews: context.reviews,
|
|
956
986
|
challenges: context.challenges,
|
|
957
987
|
prompt: [
|
|
958
|
-
'Review the unstaged
|
|
988
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
959
989
|
'Understand the intent.',
|
|
960
990
|
'Verify any affected spec items are:',
|
|
961
991
|
'',
|
|
962
992
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
963
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
993
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
964
994
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
995
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
965
996
|
'',
|
|
966
997
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
967
998
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
968
999
|
"Think thoroughly — don't just approve or reject.",
|
|
969
|
-
'
|
|
1000
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1001
|
+
'Verify @specs/map.md reflects the changes.',
|
|
970
1002
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1003
|
+
'Do not edit files or commit; report findings only.',
|
|
971
1004
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
972
1005
|
].join('\n'),
|
|
973
1006
|
result: {
|
|
@@ -1004,6 +1037,7 @@ export const codingMachine = setup({
|
|
|
1004
1037
|
challenges: context.challenges,
|
|
1005
1038
|
prompt: [
|
|
1006
1039
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
1040
|
+
'Do not edit files or commit; report findings only.',
|
|
1007
1041
|
].join('\n'),
|
|
1008
1042
|
result: {
|
|
1009
1043
|
challengeAccepted: 'Reviewer accepted the rebuttal — no further review edits are required.',
|
|
@@ -1063,8 +1097,10 @@ export const codingMachine = setup({
|
|
|
1063
1097
|
sourceItem: 'CODE-18',
|
|
1064
1098
|
...bossReplyInputFields(context),
|
|
1065
1099
|
coderPlayer: context.coderPlayer,
|
|
1100
|
+
committerPlayer: context.committerPlayer,
|
|
1066
1101
|
prompt: [
|
|
1067
1102
|
'Make a commit of the changes that belong in the repo, following @specs/dev/git.md (reread if necessary).',
|
|
1103
|
+
'Write concisely.',
|
|
1068
1104
|
'Coder is <coder-llm>.',
|
|
1069
1105
|
'Format the `Co-authored-by` `<model>` token as the conventional human form of the substituted id (e.g., `claude-opus-4-7` → `Claude-Opus-4.7`, `gpt-5.5` → `GPT-5.5`).',
|
|
1070
1106
|
].join('\n'),
|
|
@@ -1125,8 +1161,10 @@ export const codingMachine = setup({
|
|
|
1125
1161
|
...bossReplyInputFields(context),
|
|
1126
1162
|
coderPlayer: context.coderPlayer,
|
|
1127
1163
|
reviewerPlayer: context.reviewerPlayer,
|
|
1164
|
+
committerPlayer: context.committerPlayer,
|
|
1128
1165
|
prompt: [
|
|
1129
1166
|
'Make a commit of the changes that belong in the repo, following @specs/dev/git.md (reread if necessary).',
|
|
1167
|
+
'Write concisely.',
|
|
1130
1168
|
'Coder is <coder-llm>; Reviewer is <reviewer-llm>.',
|
|
1131
1169
|
'Format the `Co-authored-by` `<model>` token as the conventional human form of the substituted id (e.g., `claude-opus-4-7` → `Claude-Opus-4.7`, `gpt-5.5` → `GPT-5.5`).',
|
|
1132
1170
|
].join('\n'),
|
|
@@ -66,6 +66,13 @@ export type CaptainInput = {
|
|
|
66
66
|
challenges?: string;
|
|
67
67
|
coderPlayer?: string;
|
|
68
68
|
reviewerPlayer?: string;
|
|
69
|
+
// Routing-only: the configured Committer-alias player id (`coder` /
|
|
70
|
+
// `reviewer`) threaded from `captain.options.code.committer`
|
|
71
|
+
// (PBRT-8 / PBRT-30). It selects which host pane runs a `Committer`
|
|
72
|
+
// commit; it is not a prompt-placeholder source, so it never affects
|
|
73
|
+
// <coder-llm> / <reviewer-llm> substitution or any labelled block,
|
|
74
|
+
// and `input.player` stays `Committer` (PLAYBOOK-3).
|
|
75
|
+
committerPlayer?: string;
|
|
69
76
|
pendingBossQuestion?: PendingBossQuestion;
|
|
70
77
|
bossReply?: string;
|
|
71
78
|
};
|
|
@@ -254,8 +261,9 @@ const planAndImplementInput: CaptainInputFactory = (context) => ({
|
|
|
254
261
|
...bossReplyInputFields(context),
|
|
255
262
|
prompt: [
|
|
256
263
|
'Assess whether this can be completed in a single commit, following best practices.',
|
|
257
|
-
'If yes, implement and test, updating both code and specs; otherwise, decompose into tasks as a new IR under @specs/iterations.',
|
|
258
|
-
'
|
|
264
|
+
'If yes, implement and test, updating both code and specs; otherwise, decompose into tasks as a new IR under @specs/iterations and stop without implementing any IR task.',
|
|
265
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
266
|
+
'Ensure @specs/map.md reflects the changes.',
|
|
259
267
|
'Do not commit.',
|
|
260
268
|
].join('\n'),
|
|
261
269
|
result: withNeedsBossReply({
|
|
@@ -301,7 +309,7 @@ const summarizeSpecsInput: CaptainInputFactory = (context) => ({
|
|
|
301
309
|
'The set should be complete and coherent.',
|
|
302
310
|
'Avoid implementation specifics.',
|
|
303
311
|
'Avoid redundant spec items.',
|
|
304
|
-
'
|
|
312
|
+
'Ensure @specs/map.md reflects the changes.',
|
|
305
313
|
].join('\n'),
|
|
306
314
|
result: withNeedsBossReply({
|
|
307
315
|
specsReady: 'Coder produced uncommitted spec updates (Initial Changes).',
|
|
@@ -704,12 +712,15 @@ export const codingMachine = setup({
|
|
|
704
712
|
'Verify any affected spec items are:',
|
|
705
713
|
'',
|
|
706
714
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
707
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
715
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
708
716
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
717
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
709
718
|
'',
|
|
710
719
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
711
|
-
'
|
|
720
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
721
|
+
'Verify @specs/map.md reflects the changes.',
|
|
712
722
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
723
|
+
'Do not edit files or commit; report findings only.',
|
|
713
724
|
].join('\n'),
|
|
714
725
|
result: {
|
|
715
726
|
noFindings: 'The spec-only commit has no review findings.',
|
|
@@ -748,8 +759,10 @@ export const codingMachine = setup({
|
|
|
748
759
|
'Refer to the commit message.',
|
|
749
760
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
750
761
|
"Think thoroughly — don't just approve or reject.",
|
|
751
|
-
'
|
|
762
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
763
|
+
'Verify @specs/map.md reflects the changes.',
|
|
752
764
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
765
|
+
'Do not edit files or commit; report findings only.',
|
|
753
766
|
].join('\n'),
|
|
754
767
|
result: {
|
|
755
768
|
noFindings: 'The code-only commit has no review findings.',
|
|
@@ -789,14 +802,17 @@ export const codingMachine = setup({
|
|
|
789
802
|
'Verify any affected spec items are:',
|
|
790
803
|
'',
|
|
791
804
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
792
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
805
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
793
806
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
807
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
794
808
|
'',
|
|
795
809
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
796
810
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
797
811
|
"Think thoroughly — don't just approve or reject.",
|
|
798
|
-
'
|
|
812
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
813
|
+
'Verify @specs/map.md reflects the changes.',
|
|
799
814
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
815
|
+
'Do not edit files or commit; report findings only.',
|
|
800
816
|
].join('\n'),
|
|
801
817
|
result: {
|
|
802
818
|
noFindings: 'The mixed commit has no review findings.',
|
|
@@ -837,12 +853,15 @@ export const codingMachine = setup({
|
|
|
837
853
|
'Verify any affected spec items are:',
|
|
838
854
|
'',
|
|
839
855
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
840
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
856
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
841
857
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
858
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
842
859
|
'',
|
|
843
860
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
844
|
-
'
|
|
861
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
862
|
+
'Verify @specs/map.md reflects the changes.',
|
|
845
863
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
864
|
+
'Do not edit files or commit; report findings only.',
|
|
846
865
|
].join('\n'),
|
|
847
866
|
result: {
|
|
848
867
|
noFindings: 'The IR-task spec-only commit has no review findings.',
|
|
@@ -882,8 +901,10 @@ export const codingMachine = setup({
|
|
|
882
901
|
'Refer to the commit message.',
|
|
883
902
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
884
903
|
"Think thoroughly — don't just approve or reject.",
|
|
885
|
-
'
|
|
904
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
905
|
+
'Verify @specs/map.md reflects the changes.',
|
|
886
906
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
907
|
+
'Do not edit files or commit; report findings only.',
|
|
887
908
|
].join('\n'),
|
|
888
909
|
result: {
|
|
889
910
|
noFindings: 'The IR-task code-only commit has no review findings.',
|
|
@@ -924,14 +945,17 @@ export const codingMachine = setup({
|
|
|
924
945
|
'Verify any affected spec items are:',
|
|
925
946
|
'',
|
|
926
947
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
927
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
948
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
928
949
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
950
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
929
951
|
'',
|
|
930
952
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
931
953
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
932
954
|
"Think thoroughly — don't just approve or reject.",
|
|
933
|
-
'
|
|
955
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
956
|
+
'Verify @specs/map.md reflects the changes.',
|
|
934
957
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
958
|
+
'Do not edit files or commit; report findings only.',
|
|
935
959
|
].join('\n'),
|
|
936
960
|
result: {
|
|
937
961
|
noFindings: 'The IR-task mixed commit has no review findings.',
|
|
@@ -965,17 +989,20 @@ export const codingMachine = setup({
|
|
|
965
989
|
sourceItem: 'CODE-11',
|
|
966
990
|
...bossReplyInputFields(context),
|
|
967
991
|
prompt: [
|
|
968
|
-
'Review the unstaged
|
|
992
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
969
993
|
'Understand the intent.',
|
|
970
994
|
'Verify any affected spec items are:',
|
|
971
995
|
'',
|
|
972
996
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
973
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
997
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
974
998
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
999
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
975
1000
|
'',
|
|
976
1001
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
977
|
-
'
|
|
1002
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1003
|
+
'Verify @specs/map.md reflects the changes.',
|
|
978
1004
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1005
|
+
'Do not edit files or commit; report findings only.',
|
|
979
1006
|
].join('\n'),
|
|
980
1007
|
result: {
|
|
981
1008
|
noFindings: 'The uncommitted spec-only changes are ready to commit.',
|
|
@@ -1011,12 +1038,14 @@ export const codingMachine = setup({
|
|
|
1011
1038
|
sourceItem: 'CODE-12',
|
|
1012
1039
|
...bossReplyInputFields(context),
|
|
1013
1040
|
prompt: [
|
|
1014
|
-
'Review the unstaged
|
|
1041
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
1015
1042
|
'Understand the intent.',
|
|
1016
1043
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
1017
1044
|
"Think thoroughly — don't just approve or reject.",
|
|
1018
|
-
'
|
|
1045
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1046
|
+
'Verify @specs/map.md reflects the changes.',
|
|
1019
1047
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1048
|
+
'Do not edit files or commit; report findings only.',
|
|
1020
1049
|
].join('\n'),
|
|
1021
1050
|
result: {
|
|
1022
1051
|
noFindings: 'The uncommitted code-only changes are ready to commit.',
|
|
@@ -1052,19 +1081,22 @@ export const codingMachine = setup({
|
|
|
1052
1081
|
sourceItem: 'CODE-13',
|
|
1053
1082
|
...bossReplyInputFields(context),
|
|
1054
1083
|
prompt: [
|
|
1055
|
-
'Review the unstaged
|
|
1084
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
1056
1085
|
'Understand the intent.',
|
|
1057
1086
|
'Verify any affected spec items are:',
|
|
1058
1087
|
'',
|
|
1059
1088
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1060
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1089
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1061
1090
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1091
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1062
1092
|
'',
|
|
1063
1093
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1064
1094
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
1065
1095
|
"Think thoroughly — don't just approve or reject.",
|
|
1066
|
-
'
|
|
1096
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1097
|
+
'Verify @specs/map.md reflects the changes.',
|
|
1067
1098
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1099
|
+
'Do not edit files or commit; report findings only.',
|
|
1068
1100
|
].join('\n'),
|
|
1069
1101
|
result: {
|
|
1070
1102
|
noFindings: 'The uncommitted mixed changes are ready to commit.',
|
|
@@ -1102,17 +1134,20 @@ export const codingMachine = setup({
|
|
|
1102
1134
|
reviews: context.reviews,
|
|
1103
1135
|
challenges: context.challenges,
|
|
1104
1136
|
prompt: [
|
|
1105
|
-
'Review the unstaged
|
|
1137
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
1106
1138
|
'Understand the intent.',
|
|
1107
1139
|
'Verify any affected spec items are:',
|
|
1108
1140
|
'',
|
|
1109
1141
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1110
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1142
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1111
1143
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1144
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1112
1145
|
'',
|
|
1113
1146
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1114
|
-
'
|
|
1147
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1148
|
+
'Verify @specs/map.md reflects the changes.',
|
|
1115
1149
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1150
|
+
'Do not edit files or commit; report findings only.',
|
|
1116
1151
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
1117
1152
|
].join('\n'),
|
|
1118
1153
|
result: {
|
|
@@ -1152,12 +1187,14 @@ export const codingMachine = setup({
|
|
|
1152
1187
|
reviews: context.reviews,
|
|
1153
1188
|
challenges: context.challenges,
|
|
1154
1189
|
prompt: [
|
|
1155
|
-
'Review the unstaged
|
|
1190
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
1156
1191
|
'Understand the intent.',
|
|
1157
1192
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
1158
1193
|
"Think thoroughly — don't just approve or reject.",
|
|
1159
|
-
'
|
|
1194
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1195
|
+
'Verify @specs/map.md reflects the changes.',
|
|
1160
1196
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1197
|
+
'Do not edit files or commit; report findings only.',
|
|
1161
1198
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
1162
1199
|
].join('\n'),
|
|
1163
1200
|
result: {
|
|
@@ -1197,19 +1234,22 @@ export const codingMachine = setup({
|
|
|
1197
1234
|
reviews: context.reviews,
|
|
1198
1235
|
challenges: context.challenges,
|
|
1199
1236
|
prompt: [
|
|
1200
|
-
'Review the unstaged
|
|
1237
|
+
'Review the unstaged and untracked changes in the context of the staged changes.',
|
|
1201
1238
|
'Understand the intent.',
|
|
1202
1239
|
'Verify any affected spec items are:',
|
|
1203
1240
|
'',
|
|
1204
1241
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1205
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1242
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1206
1243
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1244
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1207
1245
|
'',
|
|
1208
1246
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1209
1247
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
1210
1248
|
"Think thoroughly — don't just approve or reject.",
|
|
1211
|
-
'
|
|
1249
|
+
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
1250
|
+
'Verify @specs/map.md reflects the changes.',
|
|
1212
1251
|
"If the change is ready to commit or push, don't raise nitpicks.",
|
|
1252
|
+
'Do not edit files or commit; report findings only.',
|
|
1213
1253
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
1214
1254
|
].join('\n'),
|
|
1215
1255
|
result: {
|
|
@@ -1249,6 +1289,7 @@ export const codingMachine = setup({
|
|
|
1249
1289
|
challenges: context.challenges,
|
|
1250
1290
|
prompt: [
|
|
1251
1291
|
'For each rebuttal below, challenge or accept it, with strong reasoning, solid evidence, and comprehensive thinking.',
|
|
1292
|
+
'Do not edit files or commit; report findings only.',
|
|
1252
1293
|
].join('\n'),
|
|
1253
1294
|
result: {
|
|
1254
1295
|
challengeAccepted:
|
|
@@ -1316,8 +1357,10 @@ export const codingMachine = setup({
|
|
|
1316
1357
|
sourceItem: 'CODE-18',
|
|
1317
1358
|
...bossReplyInputFields(context),
|
|
1318
1359
|
coderPlayer: context.coderPlayer,
|
|
1360
|
+
committerPlayer: context.committerPlayer,
|
|
1319
1361
|
prompt: [
|
|
1320
1362
|
'Make a commit of the changes that belong in the repo, following @specs/dev/git.md (reread if necessary).',
|
|
1363
|
+
'Write concisely.',
|
|
1321
1364
|
'Coder is <coder-llm>.',
|
|
1322
1365
|
'Format the `Co-authored-by` `<model>` token as the conventional human form of the substituted id (e.g., `claude-opus-4-7` → `Claude-Opus-4.7`, `gpt-5.5` → `GPT-5.5`).',
|
|
1323
1366
|
].join('\n'),
|
|
@@ -1380,8 +1423,10 @@ export const codingMachine = setup({
|
|
|
1380
1423
|
...bossReplyInputFields(context),
|
|
1381
1424
|
coderPlayer: context.coderPlayer,
|
|
1382
1425
|
reviewerPlayer: context.reviewerPlayer,
|
|
1426
|
+
committerPlayer: context.committerPlayer,
|
|
1383
1427
|
prompt: [
|
|
1384
1428
|
'Make a commit of the changes that belong in the repo, following @specs/dev/git.md (reread if necessary).',
|
|
1429
|
+
'Write concisely.',
|
|
1385
1430
|
'Coder is <coder-llm>; Reviewer is <reviewer-llm>.',
|
|
1386
1431
|
'Format the `Co-authored-by` `<model>` token as the conventional human form of the substituted id (e.g., `claude-opus-4-7` → `Claude-Opus-4.7`, `gpt-5.5` → `GPT-5.5`).',
|
|
1387
1432
|
].join('\n'),
|