@pmelab/gtd 50.0.0 → 51.0.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.
Files changed (49) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +32 -24
  3. package/dist/chunks/{reserved-CdOzKFVX.mjs → reserved-CUkk9XgL.mjs} +93 -4
  4. package/dist/chunks/{review-BChXEl2Y.mjs → review-BaCXlIT2.mjs} +2 -2
  5. package/dist/chunks/{tail-DRM2eC1z.mjs → tail-CX6Pdsql.mjs} +1 -1
  6. package/dist/workflows/cleanup.mjs +2 -2
  7. package/dist/workflows/feature.mjs +144 -11
  8. package/dist/workflows/fix.mjs +2 -2
  9. package/dist/workflows/review.mjs +3 -3
  10. package/dist/workflows/rollout.mjs +1 -1
  11. package/dist/workflows.mjs +234 -12
  12. package/package.json +1 -1
  13. package/src/workflows/feature/coverage.feature +1 -0
  14. package/src/workflows/feature/fast-path.feature +1 -0
  15. package/src/workflows/feature/feature.ts +4 -1
  16. package/src/workflows/feature/flag-mode.feature +1 -1
  17. package/src/workflows/feature/lens-models.feature +1 -0
  18. package/src/workflows/feature/lens-review.feature +1 -0
  19. package/src/workflows/feature/one-step-land.feature +1 -0
  20. package/src/workflows/feature/prototype-rounds.feature +152 -0
  21. package/src/workflows/feature/prototype.feature +419 -0
  22. package/src/workflows/feature/prototype.test.ts +43 -0
  23. package/src/workflows/feature/prototype.ts +181 -0
  24. package/src/workflows/feature/refactor-absorbs.feature +9 -1
  25. package/src/workflows/feature/refactor-first.feature +13 -3
  26. package/src/workflows/feature/refactor-rebuild.feature +29 -5
  27. package/src/workflows/feature/refactor-review.feature +111 -13
  28. package/src/workflows/feature/refactor.test.ts +14 -4
  29. package/src/workflows/feature/refactor.ts +2 -0
  30. package/src/workflows/feature/review-answers.feature +1 -0
  31. package/src/workflows/feature/review-gate.feature +1 -0
  32. package/src/workflows/feature/reviewer-walkthrough.feature +1 -0
  33. package/src/workflows/feature/seam-rejection.feature +1 -0
  34. package/src/workflows/feature/seam.feature +1 -0
  35. package/src/workflows/feature/seam.test.ts +3 -2
  36. package/src/workflows/feature/seam.ts +19 -5
  37. package/src/workflows/feature/severity-budget.feature +1 -0
  38. package/src/workflows/feature/severity-sorted-review.feature +1 -0
  39. package/src/workflows/feature/slice-findings.feature +1 -0
  40. package/src/workflows/feature/slicing-cap.feature +9 -0
  41. package/src/workflows/feature/slicing.feature +1 -0
  42. package/src/workflows/feature/standards.feature +1 -0
  43. package/src/workflows/shared/options.ts +1 -0
  44. package/src/workflows/shared/prose.ts +6 -0
  45. package/src/workflows/shared/skills.test.ts +4 -0
  46. package/src/workflows/shared/skills.ts +5 -0
  47. package/src/workflows/shared/steps.ts +1 -0
  48. package/src/workflows/shared/text.ts +104 -3
  49. package/src/workflows/shared/vars.ts +3 -0
@@ -9,6 +9,7 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
9
9
 
10
10
  Background:
11
11
  Given the shipped workflows, as gtd install scaffolds them
12
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
12
13
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
13
14
  And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
14
15
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
@@ -72,7 +73,12 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
72
73
  """
73
74
  And step "refactor.health.check" changes nothing
74
75
  And step "refactor.closing" runs its script
75
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
76
+ And judge step "refactor.build.review.ranking" answers:
77
+ """
78
+ []
79
+ """
80
+ And step "refactor.build.review.carrying" runs its script
81
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
76
82
  """
77
83
  # Review: abc1234
78
84
 
@@ -96,6 +102,8 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
96
102
 
97
103
  ## calc
98
104
 
105
+ _critical: judge unsure_
106
+
99
107
  - [x] ./src/calc.ts#1-2
100
108
  add built on the shared op
101
109
  """
@@ -138,8 +146,10 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
138
146
  gtd(check): refactor.deriving → refactor.building
139
147
  gtd(agent): refactor.building → refactor.health.check
140
148
  gtd(check): refactor.health.check → refactor.closing
141
- gtd(check): refactor.closing → refactor.build.review.composing
142
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
149
+ gtd(check): refactor.closing → refactor.build.review.reviewing
150
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
151
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
152
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
143
153
  gtd(human): refactor.build.review.await-review → refactor.build.review.closing
144
154
  gtd(check): refactor.build.review.closing → implement.building
145
155
  gtd(agent): implement.building → implement.health.check
@@ -10,6 +10,7 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
13
14
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
14
15
  And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
15
16
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
@@ -83,7 +84,12 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
83
84
  """
84
85
  And step "refactor.health.check" changes nothing
85
86
  And step "refactor.closing" runs its script
86
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
87
+ And judge step "refactor.build.review.ranking" answers:
88
+ """
89
+ []
90
+ """
91
+ And step "refactor.build.review.carrying" runs its script
92
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
87
93
  """
88
94
  # Review: abc1234
89
95
 
@@ -106,6 +112,8 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
106
112
 
107
113
  ## calc
108
114
 
115
+ _critical: judge unsure_
116
+
109
117
  - [x] ./src/calc.ts#1-2
110
118
  add built on the shared op
111
119
  """
@@ -147,7 +155,12 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
147
155
  """
148
156
  And step "refactor.health.check" changes nothing
149
157
  And step "refactor.closing" runs its script
150
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
158
+ And judge step "refactor.build.review.ranking" answers:
159
+ """
160
+ []
161
+ """
162
+ And step "refactor.build.review.carrying" runs its script
163
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
151
164
  """
152
165
  # Review: abc1234
153
166
 
@@ -170,6 +183,8 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
170
183
 
171
184
  ## calc
172
185
 
186
+ _critical: judge unsure_
187
+
173
188
  - [x] ./src/calc.ts#1-2
174
189
  add built on the shared op
175
190
  """
@@ -193,7 +208,12 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
193
208
  """
194
209
  And step "refactor.health.check" changes nothing
195
210
  And step "refactor.closing" runs its script
196
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
211
+ And judge step "refactor.build.review.ranking" answers:
212
+ """
213
+ []
214
+ """
215
+ And step "refactor.build.review.carrying" runs its script
216
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
197
217
  """
198
218
  # Review: abc1234
199
219
 
@@ -216,6 +236,8 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
216
236
 
217
237
  ## calc
218
238
 
239
+ _critical: judge unsure_
240
+
219
241
  - [x] ./src/calc.ts#1-2
220
242
  add built on the shared op
221
243
  """
@@ -253,8 +275,10 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
253
275
  gtd(check): refactor.deriving → refactor.building
254
276
  gtd(agent): refactor.building → refactor.health.check
255
277
  gtd(check): refactor.health.check → refactor.closing
256
- gtd(check): refactor.closing → refactor.build.review.composing
257
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
278
+ gtd(check): refactor.closing → refactor.build.review.reviewing
279
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
280
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
281
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
258
282
  gtd(human): refactor.build.review.await-review → refactor.build.review.closing
259
283
  gtd(check): refactor.build.review.closing → implement.building
260
284
  gtd(agent): implement.building → implement.health.check
@@ -9,6 +9,7 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
9
9
 
10
10
  Background:
11
11
  Given the shipped workflows, as gtd install scaffolds them
12
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
12
13
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
13
14
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
14
15
 
@@ -78,7 +79,12 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
78
79
  """
79
80
  And step "refactor.health.check" changes nothing
80
81
  And step "refactor.closing" runs its script
81
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
82
+ And judge step "refactor.build.review.ranking" answers:
83
+ """
84
+ []
85
+ """
86
+ And step "refactor.build.review.carrying" runs its script
87
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
82
88
  """
83
89
  # Review: abc1234
84
90
 
@@ -171,7 +177,12 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
171
177
  """
172
178
  And step "refactor.health.check" changes nothing
173
179
  And step "refactor.closing" runs its script
174
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
180
+ And judge step "refactor.build.review.ranking" answers:
181
+ """
182
+ []
183
+ """
184
+ And step "refactor.build.review.carrying" runs its script
185
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
175
186
  """
176
187
  # Review: abc1234
177
188
 
@@ -191,8 +202,10 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
191
202
  And the commit subjects end with:
192
203
  """
193
204
  gtd(check): refactor.closing → refactor.build.quality.correctness.reviewing
194
- gtd(agent): refactor.build.quality.correctness.reviewing → refactor.build.review.composing
195
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
205
+ gtd(agent): refactor.build.quality.correctness.reviewing → refactor.build.review.reviewing
206
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
207
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
208
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
196
209
  """
197
210
 
198
211
 
@@ -263,7 +276,12 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
263
276
  """
264
277
  And step "refactor.health.check" changes nothing
265
278
  And step "refactor.closing" runs its script
266
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
279
+ And judge step "refactor.build.review.ranking" answers:
280
+ """
281
+ []
282
+ """
283
+ And step "refactor.build.review.carrying" runs its script
284
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
267
285
  """
268
286
  # Review: abc1234
269
287
 
@@ -287,6 +305,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
287
305
 
288
306
  ## calc
289
307
 
308
+ _critical: judge unsure_
309
+
290
310
  - [ ] ./src/calc.ts#1-2
291
311
  add built on the shared op[^why]
292
312
 
@@ -324,6 +344,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
324
344
 
325
345
  ## calc
326
346
 
347
+ _critical: judge unsure_
348
+
327
349
  - [ ] ./src/calc.ts#1-2
328
350
  add built on the shared op
329
351
  """
@@ -345,8 +367,10 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
345
367
  gtd(check): refactor.deriving → refactor.building
346
368
  gtd(agent): refactor.building → refactor.health.check
347
369
  gtd(check): refactor.health.check → refactor.closing
348
- gtd(check): refactor.closing → refactor.build.review.composing
349
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
370
+ gtd(check): refactor.closing → refactor.build.review.reviewing
371
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
372
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
373
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
350
374
  """
351
375
 
352
376
  Scenario: a question answered at the refactor review reaches the re-derived package as ### Answered Questions
@@ -360,6 +384,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
360
384
 
361
385
  ## calc
362
386
 
387
+ _critical: judge unsure_
388
+
363
389
  - [ ] ./src/calc.ts#1-1
364
390
  why a shared op?
365
391
  - [ ] ./src/calc.ts#2-2
@@ -434,8 +460,10 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
434
460
  gtd(check): refactor.deriving → refactor.building
435
461
  gtd(agent): refactor.building → refactor.health.check
436
462
  gtd(check): refactor.health.check → refactor.closing
437
- gtd(check): refactor.closing → refactor.build.review.composing
438
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
463
+ gtd(check): refactor.closing → refactor.build.review.reviewing
464
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
465
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
466
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
439
467
  """
440
468
 
441
469
  Scenario: an edit note the collecting turn leaves out refuses the landing and never signs off
@@ -449,6 +477,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
449
477
 
450
478
  ## calc
451
479
 
480
+ _critical: judge unsure_
481
+
452
482
  - [ ] ./src/calc.ts#1-2
453
483
  add built on the shared op — this should change behaviour, not just structure
454
484
  """
@@ -493,6 +523,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
493
523
 
494
524
  ## calc
495
525
 
526
+ _critical: judge unsure_
527
+
496
528
  - [ ] ./src/calc.ts#1-2 rename the helper
497
529
  add built on the shared op
498
530
  """
@@ -520,6 +552,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
520
552
 
521
553
  ## calc
522
554
 
555
+ _critical: judge unsure_
556
+
523
557
  - [ ] ./src/calc.ts#1-2
524
558
  add built on the shared op, lovely work
525
559
  """
@@ -539,6 +573,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
539
573
 
540
574
  ## calc
541
575
 
576
+ _critical: judge unsure_
577
+
542
578
  - [ ] ./src/calc.ts#1-2
543
579
  add built on the shared op[^q]
544
580
 
@@ -593,6 +629,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
593
629
 
594
630
  ## calc
595
631
 
632
+ _critical: judge unsure_
633
+
596
634
  - [ ] ./src/calc.ts#1-2
597
635
  add built on the shared op[^q]
598
636
 
@@ -625,6 +663,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
625
663
 
626
664
  ## calc
627
665
 
666
+ _critical: judge unsure_
667
+
628
668
  - [ ] ./src/calc.ts#1-2
629
669
  add built on the shared op[^q]
630
670
 
@@ -676,6 +716,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
676
716
 
677
717
  ## calc
678
718
 
719
+ _critical: judge unsure_
720
+
679
721
  - [ ] ./src/calc.ts#1-2
680
722
  add built on the shared op[^n1]
681
723
 
@@ -702,6 +744,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
702
744
 
703
745
  ## calc
704
746
 
747
+ _critical: judge unsure_
748
+
705
749
  - [ ] ./src/calc.ts#1-2
706
750
  add built on the shared op[^n1]
707
751
 
@@ -729,6 +773,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
729
773
 
730
774
  ## calc
731
775
 
776
+ _critical: judge unsure_
777
+
732
778
  - [ ] ./src/calc.ts#1-2
733
779
  add built on the shared op[^q]
734
780
 
@@ -761,6 +807,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
761
807
 
762
808
  ## calc
763
809
 
810
+ _critical: judge unsure_
811
+
764
812
  - [ ] ./src/calc.ts#1-2
765
813
  add built on the shared op[^n1]
766
814
 
@@ -787,6 +835,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
787
835
 
788
836
  ## calc
789
837
 
838
+ _critical: judge unsure_
839
+
790
840
  - [ ] ./src/calc.ts#1-2
791
841
  add built on the shared op - this should change behaviour, not just structure[^q]
792
842
 
@@ -819,6 +869,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
819
869
 
820
870
  ## calc
821
871
 
872
+ _critical: judge unsure_
873
+
822
874
  - [ ] ./src/calc.ts#1-2
823
875
  add built on the shared op - this should change behaviour, not just structure[^q]
824
876
 
@@ -864,6 +916,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
864
916
 
865
917
  ## calc
866
918
 
919
+ _critical: judge unsure_
920
+
867
921
  - [ ] ./src/calc.ts#1-2
868
922
  add built on the shared op[^q]
869
923
 
@@ -896,6 +950,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
896
950
 
897
951
  ## calc
898
952
 
953
+ _critical: judge unsure_
954
+
899
955
  - [ ] ./src/calc.ts#1-2
900
956
  add built on the shared op[^q]
901
957
 
@@ -946,6 +1002,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
946
1002
 
947
1003
  ## calc
948
1004
 
1005
+ _critical: judge unsure_
1006
+
949
1007
  - [ ] ./src/calc.ts#1-2
950
1008
  add built on the shared op, lovely work[^q]
951
1009
 
@@ -978,6 +1036,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
978
1036
 
979
1037
  ## calc
980
1038
 
1039
+ _critical: judge unsure_
1040
+
981
1041
  - [ ] ./src/calc.ts#1-2
982
1042
  add built on the shared op, lovely work[^q]
983
1043
 
@@ -1033,6 +1093,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1033
1093
 
1034
1094
  ## calc
1035
1095
 
1096
+ _critical: judge unsure_
1097
+
1036
1098
  - [x] ./src/calc.ts#1-2
1037
1099
  add built on the shared op
1038
1100
  """
@@ -1056,6 +1118,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1056
1118
 
1057
1119
  ## calc
1058
1120
 
1121
+ _critical: judge unsure_
1122
+
1059
1123
  - [ ] ./src/calc.ts#1-2
1060
1124
  add built on the shared op — rename `sign` to `direction`
1061
1125
  """
@@ -1085,6 +1149,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1085
1149
 
1086
1150
  ## calc
1087
1151
 
1152
+ _critical: judge unsure_
1153
+
1088
1154
  - [ ] ./src/calc.ts#1-2
1089
1155
  add built on the shared op — rename `sign` to `direction`
1090
1156
  """
@@ -1103,9 +1169,25 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1103
1169
  Then the process rests at "refactor.build.review.await-review"
1104
1170
  And the commit subjects end with:
1105
1171
  """
1106
- gtd(check): refactor.closing → refactor.build.review.composing
1107
- gtd(check): refactor.build.review.composing → refactor.build.review.await-review
1172
+ gtd(check): refactor.closing → refactor.build.review.reviewing
1173
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
1174
+ gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
1175
+ gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
1176
+ """
1177
+
1178
+ Scenario: a reviewer walks the human through the whole refactor, every chunk pointing at its code
1179
+ When the process is driven
1180
+ Then the process rests at "refactor.build.review.await-review"
1181
+ And ".gtd/REVIEW.md" contains:
1182
+ """
1183
+ ## calc
1184
+
1185
+ _critical: judge unsure_
1186
+
1187
+ - [ ] ./src/calc.ts#1-2
1188
+ add built on the shared op
1108
1189
  """
1190
+ And no commit body contains "refactor.build.review.composing"
1109
1191
 
1110
1192
  Rule: with a quality lens on both slices
1111
1193
 
@@ -1175,7 +1257,12 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1175
1257
  """
1176
1258
  And step "refactor.health.check" changes nothing
1177
1259
  And step "refactor.closing" runs its script
1178
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
1260
+ And judge step "refactor.build.review.ranking" answers:
1261
+ """
1262
+ []
1263
+ """
1264
+ And step "refactor.build.review.carrying" runs its script
1265
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
1179
1266
  """
1180
1267
  # Review: abc1234
1181
1268
 
@@ -1219,6 +1306,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1219
1306
 
1220
1307
  ## calc
1221
1308
 
1309
+ _critical: judge unsure_
1310
+
1222
1311
  - [x] ./src/calc.ts#1-2
1223
1312
  add built on the shared op
1224
1313
  """
@@ -1382,7 +1471,12 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1382
1471
  """
1383
1472
  And step "refactor.health.check" changes nothing
1384
1473
  And step "refactor.closing" runs its script
1385
- And step "refactor.build.review.composing" writes ".gtd/REVIEW.md" with:
1474
+ And judge step "refactor.build.review.ranking" answers:
1475
+ """
1476
+ []
1477
+ """
1478
+ And step "refactor.build.review.carrying" runs its script
1479
+ And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
1386
1480
  """
1387
1481
  # Review: abc1234
1388
1482
 
@@ -1403,6 +1497,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1403
1497
 
1404
1498
  ## calc
1405
1499
 
1500
+ _critical: judge unsure_
1501
+
1406
1502
  - [ ] ./src/calc.ts#1-2
1407
1503
  add built on the shared op[^why]
1408
1504
 
@@ -1443,6 +1539,8 @@ Feature: the refactor slice is reviewed on its own before the feature is impleme
1443
1539
 
1444
1540
  ## calc
1445
1541
 
1542
+ _critical: judge unsure_
1543
+
1446
1544
  - [ ] ./src/calc.ts#1-2
1447
1545
  add built on the shared op
1448
1546
  """
@@ -820,7 +820,7 @@ const driveReviewed = async (
820
820
  ...Object.fromEntries(lensEffects),
821
821
  deriving: () => void files.set(REFACTOR_PACKAGE, "package"),
822
822
  closing: () => void files.delete(REFACTOR_PACKAGE),
823
- "review.composing": () => void files.set(REVIEW, reviewDoc("add")),
823
+ "review.reviewing": () => void files.set(REVIEW, reviewDoc("add")),
824
824
  "review.closing": () => void files.delete(REVIEW),
825
825
  "review.collecting": () => {
826
826
  if (!script.silentCollect)
@@ -929,7 +929,9 @@ describe("reviewedRefactor", () => {
929
929
  "refactor.build.quality.correctness.reviewing",
930
930
  "refactor.build.quality.ponytail-review.reviewing",
931
931
  "refactor.build.quality.conventions.reviewing",
932
- "refactor.build.review.composing",
932
+ "refactor.build.review.reviewing",
933
+ "refactor.build.review.ranking",
934
+ "refactor.build.review.carrying",
933
935
  "refactor.build.review.await-review",
934
936
  "refactor.build.review.closing",
935
937
  ])
@@ -937,8 +939,16 @@ describe("reviewedRefactor", () => {
937
939
 
938
940
  it("reviews from HEAD at scope entry", async () => {
939
941
  const h = await driveReviewed(shape())
940
- const composing = h.steps.find((s) => s.kind === "run" && s.name === "review.composing")
941
- expect(composing?.kind === "run" ? composing.body : "").toContain("<!-- base: c0 -->")
942
+ const reviewing = h.steps.find((s) => s.kind === "agent" && s.name === "review.reviewing")
943
+ expect(reviewing?.kind === "agent" ? reviewing.prompt : "").toContain("<!-- base: c0 -->")
944
+ })
945
+
946
+ it("has the reviewer walk the whole refactor on every round", async () => {
947
+ const h = await driveReviewed(shape())
948
+ const reviewing = h.steps.find((s) => s.kind === "agent" && s.name === "review.reviewing")
949
+ expect(reviewing?.kind === "agent" ? reviewing.prompt : "").toContain(
950
+ "it covers the whole refactor since it started, on every round",
951
+ )
942
952
  })
943
953
 
944
954
  it("names the entry commit in every lens prompt, on the first lap and after a feedback lap", async () => {
@@ -389,6 +389,8 @@ export const reviewedRefactor = async (
389
389
  fixAccess: strayAccess(p.strays),
390
390
  lensBase: entry,
391
391
  rules: t.refactorRules(p.strays, p.pattern),
392
+ walkthrough: true,
393
+ lap: "refactor",
392
394
  })
393
395
  if (outcome.verdict === "signoff") return true
394
396
  await reUnwind(outcome)
@@ -10,6 +10,7 @@ Feature: every note in the review is answered with one tick
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
13
14
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
14
15
  And an environment variable "GTD_FLAGMODE" set to "false"
15
16
  And a file "src/calc.ts" with:
@@ -10,6 +10,7 @@ Feature: a feature process ends at the human review
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
13
14
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
14
15
  And an environment variable "GTD_FLAGMODE" set to "false"
15
16
  And a file "src/calc.ts" with:
@@ -11,6 +11,7 @@ Feature: a reviewer walks the human through the feature's code
11
11
 
12
12
  Background:
13
13
  Given the shipped workflows, as gtd install scaffolds them
14
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
14
15
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
15
16
  And an environment variable "GTD_FLAGMODE" set to "false"
16
17
  And a file "src/calc.ts" with:
@@ -9,6 +9,7 @@ Feature: rejected naive passes walk one fixed path through the steer gate to the
9
9
 
10
10
  Background:
11
11
  Given the shipped workflows, as gtd install scaffolds them
12
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
12
13
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
13
14
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
14
15
  And a file "src/calc.ts" with:
@@ -7,6 +7,7 @@ Feature: the naive pass and seam judge decide how a feature is built
7
7
 
8
8
  Background:
9
9
  Given the shipped workflows, as gtd install scaffolds them
10
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
10
11
  And the gtd config ends with:
11
12
  """
12
13
  export const config = {
@@ -335,7 +335,7 @@ const driveSeam = async (
335
335
  note: () => void files.set(NOTE, "Seam: a shared op"),
336
336
  deriving: () => void files.set(REFACTOR, "package"),
337
337
  closing: () => void files.delete(REFACTOR),
338
- "review.composing": () => void files.set(REVIEW, reviewDoc),
338
+ "review.reviewing": () => void files.set(REVIEW, reviewDoc),
339
339
  "review.closing": () => {
340
340
  files.delete(REVIEW)
341
341
  current = "after-refactor"
@@ -500,7 +500,8 @@ describe("implement", () => {
500
500
  lastOptions = undefined
501
501
  installContext(
502
502
  fixtureContext(
503
- {},
503
+ // The hands-on test after coverage has its own scenarios.
504
+ { vars: { prototypeRounds: "0" } },
504
505
  {
505
506
  step: (request: StepRequest) => {
506
507
  requests.push(request)
@@ -26,10 +26,19 @@ import {
26
26
  type KeptTip,
27
27
  } from "../../flows/index.js"
28
28
  import { continuing, phase, type Handoff, type Phase } from "../shared/continuation.js"
29
- import { coder, FEEDBACK, HANDOFF, REFACTOR_NOTE, REQUIREMENTS, SLICES } from "../shared/steps.js"
29
+ import {
30
+ coder,
31
+ FEEDBACK,
32
+ HANDOFF,
33
+ PROTOTYPE,
34
+ REFACTOR_NOTE,
35
+ REQUIREMENTS,
36
+ SLICES,
37
+ } from "../shared/steps.js"
30
38
  import * as t from "../shared/text.js"
31
39
  import { defaults } from "../shared/vars.js"
32
40
  import { green, requireCoverage } from "./coverage.js"
41
+ import { prototypeTest } from "./prototype.js"
33
42
  import {
34
43
  criterionIds,
35
44
  requireCriteria,
@@ -373,10 +382,11 @@ export const implementing = (options: ImplementOptions): Promise<readonly string
373
382
  if (built && acceptance !== undefined)
374
383
  requireAcceptance({ ...acceptance, ids: settled(acceptance.ids, options.slice) }, since)
375
384
  // Fix turns are held to the carried tests too: deleting a red one must not buy a green suite.
376
- await green(
377
- built && acceptance !== undefined ? () => requireAcceptanceKept(acceptance) : undefined,
378
- )
385
+ const keepsTests =
386
+ built && acceptance !== undefined ? () => requireAcceptanceKept(acceptance) : undefined
387
+ await green(keepsTests)
379
388
  await requireCoverage(options.base, options.slice)
389
+ await prototypeTest(options.slice, keepsTests)
380
390
  const ids = criterionIds(read(REQUIREMENTS) ?? "")
381
391
  await closing(moreToBuild(options.more))
382
392
  return ids
@@ -393,7 +403,11 @@ export const closeOut = (): Promise<void> => scope("implement", () => closing(fa
393
403
  const closing = (more: boolean): Promise<void> =>
394
404
  run(
395
405
  "closing",
396
- removeScript(more ? [REFACTOR_NOTE, HANDOFF] : [REQUIREMENTS, REFACTOR_NOTE, SLICES, HANDOFF]),
406
+ removeScript(
407
+ more
408
+ ? [REFACTOR_NOTE, HANDOFF, PROTOTYPE]
409
+ : [REQUIREMENTS, REFACTOR_NOTE, SLICES, HANDOFF, PROTOTYPE],
410
+ ),
397
411
  { label: "Closing out the implementation" },
398
412
  )
399
413
 
@@ -7,6 +7,7 @@ Feature: the review's ranking is batched to the judge's budget
7
7
 
8
8
  Background:
9
9
  Given the shipped workflows, as gtd install scaffolds them
10
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
10
11
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
11
12
  And an environment variable "GTD_FLAGMODE" set to "false"
12
13
  And an environment variable "GTD_JUDGEBUDGETBYTES" set to "150"
@@ -10,6 +10,7 @@ Feature: the final review lists what matters most first
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
+ And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
13
14
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
14
15
  And an environment variable "GTD_FLAGMODE" set to "false"
15
16
  And a file "src/calc.ts" with: