@pmelab/gtd 55.0.0 → 57.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 (83) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +72 -80
  3. package/dist/chunks/{reserved-DHafcW7t.mjs → reserved-X2RkNHin.mjs} +110 -318
  4. package/dist/chunks/{review-BJGKwlYv.mjs → review-v7sh5GF4.mjs} +30 -125
  5. package/dist/chunks/{steering-CLhu8C7q.mjs → steering-CCNvngSH.mjs} +256 -65
  6. package/dist/chunks/{tail-B9Hw2AFB.mjs → tail-S04KEewi.mjs} +144 -56
  7. package/dist/gtd.bundle.mjs +259 -22
  8. package/dist/steering.mjs +2 -2
  9. package/dist/testkit.mjs +6 -6
  10. package/dist/web/main.css +1 -1
  11. package/dist/web/main.js +551 -66
  12. package/dist/workflow-kit.mjs +1 -1
  13. package/dist/workflows/cleanup.mjs +2 -2
  14. package/dist/workflows/feature.mjs +63 -175
  15. package/dist/workflows/fix.mjs +3 -3
  16. package/dist/workflows/review.mjs +3 -3
  17. package/dist/workflows/rollout.mjs +1 -1
  18. package/dist/workflows.mjs +603 -727
  19. package/package.json +1 -1
  20. package/skills/authoring/SKILL.md +3 -3
  21. package/src/cli/Cli.ts +5 -5
  22. package/src/edge/Edge.test.ts +1 -1
  23. package/src/steering/FORMATS.md +5 -1
  24. package/src/steering/SteeringFormats.test.ts +2 -2
  25. package/src/steering/contract.test.ts +1 -0
  26. package/src/steering/findings.test.ts +47 -0
  27. package/src/steering/findings.ts +350 -0
  28. package/src/steering/fixtures/findings/gate.md +34 -0
  29. package/src/steering/fixtures/findings/gate.read.json +87 -0
  30. package/src/steering/index.test.ts +2 -2
  31. package/src/steering/index.ts +4 -3
  32. package/src/steering/review.test.ts +1 -75
  33. package/src/steering/review.ts +1 -74
  34. package/src/workflow/compile.test.ts +1 -0
  35. package/src/workflows/feature/criteria-coverage.feature +1 -7
  36. package/src/workflows/feature/criteria.test.ts +1 -41
  37. package/src/workflows/feature/criteria.ts +2 -14
  38. package/src/workflows/feature/fast-path.feature +0 -1
  39. package/src/workflows/feature/feature.test.ts +1 -1
  40. package/src/workflows/feature/feature.ts +16 -25
  41. package/src/workflows/feature/flag-mode.feature +1 -1
  42. package/src/workflows/feature/lens-models.feature +0 -1
  43. package/src/workflows/feature/lens-review.feature +323 -172
  44. package/src/workflows/feature/naive-test.feature +258 -0
  45. package/src/workflows/feature/one-step-land.feature +0 -1
  46. package/src/workflows/feature/refactor-absorbs.feature +1 -8
  47. package/src/workflows/feature/refactor-first.feature +2 -11
  48. package/src/workflows/feature/refactor-rebuild.feature +4 -25
  49. package/src/workflows/feature/refactor-review.feature +33 -118
  50. package/src/workflows/feature/refactor.test.ts +0 -2
  51. package/src/workflows/feature/refactor.ts +0 -1
  52. package/src/workflows/feature/review-gate.feature +7 -24
  53. package/src/workflows/feature/reviewer-walkthrough.feature +16 -104
  54. package/src/workflows/feature/seam-rejection.feature +0 -1
  55. package/src/workflows/feature/seam.feature +0 -1
  56. package/src/workflows/feature/seam.test.ts +1 -2
  57. package/src/workflows/feature/seam.ts +56 -10
  58. package/src/workflows/feature/standards.feature +75 -35
  59. package/src/workflows/fix/fix-lens-origin.feature +20 -7
  60. package/src/workflows/fix/fix-quality.feature +102 -23
  61. package/src/workflows/review/review-door.feature +62 -59
  62. package/src/workflows/shared/learn.test.ts +0 -14
  63. package/src/workflows/shared/learn.ts +1 -6
  64. package/src/workflows/shared/lenses.ts +149 -43
  65. package/src/workflows/shared/options.ts +9 -1
  66. package/src/workflows/shared/prose.ts +0 -6
  67. package/src/workflows/shared/review.test.ts +27 -26
  68. package/src/workflows/shared/review.ts +29 -196
  69. package/src/workflows/shared/skills.test.ts +0 -4
  70. package/src/workflows/shared/skills.ts +0 -5
  71. package/src/workflows/shared/steps.ts +1 -1
  72. package/src/workflows/shared/tail.ts +18 -9
  73. package/src/workflows/shared/text.test.ts +125 -329
  74. package/src/workflows/shared/text.ts +173 -471
  75. package/src/workflows/shared/vars.ts +2 -3
  76. package/src/workflows/feature/hands-on-skip.feature +0 -316
  77. package/src/workflows/feature/prototype-rounds.feature +0 -156
  78. package/src/workflows/feature/prototype.feature +0 -428
  79. package/src/workflows/feature/prototype.test.ts +0 -43
  80. package/src/workflows/feature/prototype.ts +0 -198
  81. package/src/workflows/feature/review-answers.feature +0 -324
  82. package/src/workflows/feature/severity-budget.feature +0 -116
  83. package/src/workflows/feature/severity-sorted-review.feature +0 -198
@@ -29,6 +29,8 @@ export const defaults: Readonly<Record<string, string>> = {
29
29
  refactorFlagPattern: "\\bGTD_FLAG_\\w+",
30
30
  seamAllow: [...testFileGlobs, ".gtd/**"].join(", "),
31
31
  flagMode: "true",
32
+ // A person tries every green naive pass at `seam.try` before anything builds on it.
33
+ naiveTest: "false",
32
34
  // GTD_FLAG_RISK_TIER, recorded at process start; only "1" is on.
33
35
  flag_risk_tier: "0",
34
36
  // Decides the turn count: one `build.quality.<lens>` scope per entry, each
@@ -36,9 +38,6 @@ export const defaults: Readonly<Record<string, string>> = {
36
38
  qualityReviews:
37
39
  "correctness, owasp-security, ponytail-review, test-audit, conventions, spec-challenge, criteria-coverage",
38
40
  refactorQualityReviews: "correctness, ponytail-review, conventions",
39
- // Fix-and-retest rounds of the hands-on test before a person is asked;
40
- // "0" skips the test.
41
- prototypeRounds: "3",
42
41
  }
43
42
 
44
43
  /** Environment settings. */
@@ -1,316 +0,0 @@
1
- @inmem
2
- Feature: the hands-on test tries only the criteria a person can observe
3
-
4
- Design may tag a criterion no person can try by using the change — prompt
5
- wording, internal wiring — by writing `(no hands-on)` between its ID and the
6
- colon. At every hands-on test, implement.prototype.observable asks a judge,
7
- per untagged criterion, whether a person can observe it by using the
8
- software; a tagged one is never asked about. Every ID it does not answer
9
- `no` reaches implement.prototype.testing, which must report each once and
10
- needs no chunk for the rest. A change with no such criterion is not tested by
11
- hand, and nothing rests to say so.
12
-
13
- Background:
14
- Given the shipped workflows, as gtd install scaffolds them
15
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
16
- And an environment variable "GTD_FLAGMODE" set to "false"
17
- And a file "src/calc.ts" with:
18
- """
19
- export const add = (a: number, b: number) => a + b
20
- """
21
- And the working tree is committed as "feat: add calculator"
22
- And a file "TODO.md" with:
23
- """
24
- # Add subtract
25
-
26
- subtract(a, b) returns the difference.
27
- """
28
- And step "unwind" changes nothing
29
- And step "start-gate.check" changes nothing
30
- And step "design.gate.answer" changes nothing
31
- And step "seam.check" changes nothing
32
- And step "implement.applying" runs its script
33
- And step "implement.health.check" changes nothing
34
- And step "implement.closing" runs its script
35
-
36
- Scenario: the testing turn skips a tagged criterion, which the judge is never asked about
37
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
38
- """
39
- # Requirements
40
-
41
- ## Impact
42
-
43
- - the greeting module
44
-
45
- ## Acceptance Criteria
46
-
47
- - AC-1: subtract(a, b) returns a - b.
48
- - AC-2 (no hands-on): the build prompt names subtract.
49
- """
50
- And step "seam.naive" writes "src/calc.test.ts" with:
51
- """
52
- it("[AC-1] subtracts", () => {})
53
- it("[AC-2] names subtract", () => {})
54
- """
55
- And judge step "implement.prototype.observable", when its questions contain "criterion AC-2 describes", answers:
56
- """
57
- [{"id":"AC-1","answer":"no","p":0.9},{"id":"AC-2","answer":"no","p":0.9}]
58
- """
59
- And judge step "implement.prototype.observable", when its questions contain "criterion AC-1 describes", answers:
60
- """
61
- [{"id":"AC-1","answer":"yes","p":0.9}]
62
- """
63
- And step "implement.prototype.testing" is prompted with "Skip AC-2: no person can observe them"
64
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
65
- """
66
- ## AC-1: pass
67
-
68
- Printed 2.
69
- """
70
- When the process is driven
71
- Then the process rests at "build.review.reviewing"
72
- And the commit subjects end with:
73
- """
74
- gtd(check): implement.health.check → implement.prototype.observable
75
- gtd(judge): implement.prototype.observable → implement.prototype.testing
76
- gtd(agent): implement.prototype.testing → implement.closing
77
- gtd(check): implement.closing → build.review.reviewing
78
- """
79
-
80
- Scenario: a criterion the judge finds no person can observe is skipped like a tagged one
81
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
82
- """
83
- # Requirements
84
-
85
- ## Impact
86
-
87
- - the greeting module
88
-
89
- ## Acceptance Criteria
90
-
91
- - AC-1: subtract(a, b) returns a - b.
92
- - AC-2: add is unchanged.
93
- """
94
- And step "seam.naive" writes "src/calc.test.ts" with:
95
- """
96
- it("[AC-1] subtracts", () => {})
97
- it("[AC-2] adds", () => {})
98
- """
99
- And judge step "implement.prototype.observable" answers:
100
- """
101
- [{"id":"AC-1","answer":"yes","p":0.9},{"id":"AC-2","answer":"no","p":0.9}]
102
- """
103
- And step "implement.prototype.testing" is prompted with "Skip AC-2: no person can observe them"
104
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
105
- """
106
- ## AC-1: pass
107
-
108
- Printed 2.
109
- """
110
- When the process is driven
111
- Then the process rests at "build.review.reviewing"
112
- And the commit subjects end with:
113
- """
114
- gtd(judge): implement.prototype.observable → implement.prototype.testing
115
- gtd(agent): implement.prototype.testing → implement.closing
116
- gtd(check): implement.closing → build.review.reviewing
117
- """
118
-
119
- Scenario: a criterion the judge gives no verdict on is tested by hand
120
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
121
- """
122
- # Requirements
123
-
124
- ## Impact
125
-
126
- - the greeting module
127
-
128
- ## Acceptance Criteria
129
-
130
- - AC-1: subtract(a, b) returns a - b.
131
- - AC-2: add is unchanged.
132
- """
133
- And step "seam.naive" writes "src/calc.test.ts" with:
134
- """
135
- it("[AC-1] subtracts", () => {})
136
- it("[AC-2] adds", () => {})
137
- """
138
- And judge step "implement.prototype.observable" answers:
139
- """
140
- [{"id":"AC-2","answer":"no","p":0.9}]
141
- """
142
- And step "implement.prototype.testing" is prompted with "Skip AC-2: no person can observe them"
143
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
144
- """
145
- ## AC-1: pass
146
-
147
- Printed 2.
148
- """
149
- When the process is driven
150
- Then the process rests at "build.review.reviewing"
151
- And the commit subjects end with:
152
- """
153
- gtd(judge): implement.prototype.observable → implement.prototype.testing
154
- gtd(agent): implement.prototype.testing → implement.closing
155
- gtd(check): implement.closing → build.review.reviewing
156
- """
157
-
158
- Scenario: a judge landing without a verdict tests every untagged criterion by hand
159
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
160
- """
161
- # Requirements
162
-
163
- ## Impact
164
-
165
- - the greeting module
166
-
167
- ## Acceptance Criteria
168
-
169
- - AC-1: subtract(a, b) returns a - b.
170
- - AC-2: add is unchanged.
171
- """
172
- And step "seam.naive" writes "src/calc.test.ts" with:
173
- """
174
- it("[AC-1] subtracts", () => {})
175
- it("[AC-2] adds", () => {})
176
- """
177
- And judge step "implement.prototype.observable" answers:
178
- """
179
- []
180
- """
181
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
182
- """
183
- ## AC-1: pass
184
-
185
- Printed 2.
186
- """
187
- Then driving the process is refused with "exactly one chunk headed `## <ID>: pass|fail|blocked` for AC-2"
188
-
189
- Scenario: a report missing a criterion the judge found observable is refused
190
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
191
- """
192
- # Requirements
193
-
194
- ## Impact
195
-
196
- - the greeting module
197
-
198
- ## Acceptance Criteria
199
-
200
- - AC-1: subtract(a, b) returns a - b.
201
- - AC-2: subtract prints a warning for negative results.
202
- """
203
- And step "seam.naive" writes "src/calc.test.ts" with:
204
- """
205
- it("[AC-1] subtracts", () => {})
206
- it("[AC-2] warns", () => {})
207
- """
208
- And judge step "implement.prototype.observable" answers:
209
- """
210
- [{"id":"AC-1","answer":"yes","p":0.9},{"id":"AC-2","answer":"yes","p":0.9}]
211
- """
212
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
213
- """
214
- ## AC-1: pass
215
-
216
- Printed 2.
217
- """
218
- Then driving the process is refused with "exactly one chunk headed `## <ID>: pass|fail|blocked` for AC-2"
219
-
220
- Scenario: a change with no observable criterion skips the hands-on test without resting
221
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
222
- """
223
- # Requirements
224
-
225
- ## Impact
226
-
227
- - the greeting module
228
-
229
- ## Acceptance Criteria
230
-
231
- - AC-1: add is unchanged.
232
- """
233
- And step "seam.naive" writes "src/calc.test.ts" with:
234
- """
235
- it("[AC-1] adds", () => {})
236
- """
237
- And judge step "implement.prototype.observable" answers:
238
- """
239
- [{"id":"AC-1","answer":"no","p":0.9}]
240
- """
241
- When the process is driven
242
- Then the process rests at "build.review.reviewing"
243
- And the commit subjects end with:
244
- """
245
- gtd(check): implement.health.check → implement.prototype.observable
246
- gtd(judge): implement.prototype.observable → implement.closing
247
- gtd(check): implement.closing → build.review.reviewing
248
- """
249
-
250
- Scenario: a change whose every criterion is tagged is not tested by hand or judged
251
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
252
- """
253
- # Requirements
254
-
255
- ## Impact
256
-
257
- - the greeting module
258
-
259
- ## Acceptance Criteria
260
-
261
- - AC-1 (no hands-on): the build prompt names subtract.
262
- - AC-2 (no hands-on): the review prompt names subtract.
263
- """
264
- And step "seam.naive" writes "src/calc.test.ts" with:
265
- """
266
- it("[AC-1] names subtract in the build", () => {})
267
- it("[AC-2] names subtract in the review", () => {})
268
- """
269
- When the process is driven
270
- Then the process rests at "build.review.reviewing"
271
- And the commit subjects end with:
272
- """
273
- gtd(check): implement.health.check → implement.closing
274
- gtd(check): implement.closing → build.review.reviewing
275
- """
276
-
277
- Scenario: the tag is frozen once design is settled
278
- Given step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
279
- """
280
- # Requirements
281
-
282
- ## Impact
283
-
284
- - the greeting module
285
-
286
- ## Acceptance Criteria
287
-
288
- - AC-1: subtract(a, b) returns a - b.
289
- """
290
- And step "seam.naive" writes "src/calc.test.ts" with:
291
- """
292
- it("[AC-1] subtracts", () => {})
293
- """
294
- And judge step "implement.prototype.observable" answers:
295
- """
296
- [{"id":"AC-1","answer":"yes","p":0.9}]
297
- """
298
- And step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
299
- """
300
- ## AC-1: fail
301
-
302
- Printed 4.
303
- """
304
- And step "implement.prototype.fix.fixing" writes ".gtd/REQUIREMENTS.md" with:
305
- """
306
- # Requirements
307
-
308
- ## Impact
309
-
310
- - the greeting module
311
-
312
- ## Acceptance Criteria
313
-
314
- - AC-1 (no hands-on): subtract(a, b) returns a - b.
315
- """
316
- Then driving the process is refused with "criteria-frozen"
@@ -1,156 +0,0 @@
1
- @inmem
2
- Feature: past its round cap the hands-on test rests at a person's gate
3
-
4
- `prototypeRounds` caps the fix turns the hands-on test gets. Once they
5
- are spent and the report still has open items, the process rests at
6
- implement.prototype.open naming them; a person's fix there is tested again
7
- with a fresh budget.
8
-
9
- Background:
10
- Given the shipped workflows, as gtd install scaffolds them
11
- And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
12
- And an environment variable "GTD_FLAGMODE" set to "false"
13
- And an environment variable "GTD_PROTOTYPEROUNDS" set to "1"
14
- And a file "src/calc.ts" with:
15
- """
16
- export const add = (a: number, b: number) => a + b
17
- """
18
- And the working tree is committed as "feat: add calculator"
19
- And a file "TODO.md" with:
20
- """
21
- # Add subtract
22
-
23
- subtract(a, b) returns the difference.
24
- """
25
- And step "unwind" changes nothing
26
- And step "start-gate.check" changes nothing
27
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
28
- """
29
- # Requirements
30
-
31
- ## Impact
32
-
33
- - the greeting module
34
-
35
- ## Acceptance Criteria
36
-
37
- - AC-1: subtract(a, b) returns a - b.
38
- - AC-2: add is unchanged.
39
- """
40
- And step "design.gate.answer" changes nothing
41
- And step "seam.naive" writes "src/calc.ts" with:
42
- """
43
- export const add = (a: number, b: number) => a + b
44
- export const subtract = (a: number, b: number) => a + b
45
- """
46
- And step "seam.naive" writes "src/calc.test.ts" with:
47
- """
48
- it("[AC-1] subtracts", () => expect(subtract(3, 1)).toBe(2))
49
- it("[AC-2] adds", () => expect(add(1, 1)).toBe(2))
50
- """
51
- And step "seam.check" changes nothing
52
- And step "implement.applying" runs its script
53
- And step "implement.health.check" changes nothing
54
- And judge step "implement.prototype.observable" answers:
55
- """
56
- [{"id":"AC-1","answer":"yes","p":0.9},{"id":"AC-2","answer":"yes","p":0.9}]
57
- """
58
- And step "implement.closing" runs its script
59
-
60
- Scenario: past the round cap a person is asked, naming the open items
61
- Given step "implement.prototype.testing", when prompted with "Find how this project", writes ".gtd/PROTOTYPE.md" with:
62
- """
63
- ## AC-1: fail
64
-
65
- `subtract(3, 1)` printed 4. Expected 2.
66
-
67
- ## AC-2: pass
68
-
69
- Printed 2.
70
- """
71
- And step "implement.prototype.testing", when prompted with "This is a re-test", writes ".gtd/PROTOTYPE.md" with:
72
- """
73
- ## AC-1: fail
74
-
75
- Re-tested: `subtract(3, 1)` printed -2. Expected 2.
76
-
77
- ## AC-2: pass
78
-
79
- Printed 2.
80
- """
81
- And step "implement.prototype.fix.fixing" writes "src/calc.ts" with:
82
- """
83
- export const add = (a: number, b: number) => a + b
84
- export const subtract = (a: number, b: number) => b - a
85
- """
86
- And step "implement.prototype.health.check" changes nothing
87
- When the process is driven
88
- Then the process rests at "implement.prototype.open"
89
- And the resting step's content contains "- AC-1: fail"
90
- And the resting step's content contains "after 1 fix round"
91
- And the resting step's content does not contain "AC-2"
92
-
93
- Scenario: a person's change at the gate is tested again
94
- Given step "implement.prototype.testing", when prompted with "Find how this project", writes ".gtd/PROTOTYPE.md" with:
95
- """
96
- ## AC-1: blocked
97
-
98
- `subtract` is not exported from any entry point I could run.
99
-
100
- ## AC-2: pass
101
-
102
- Printed 2.
103
- """
104
- And step "implement.prototype.open" writes "src/calc.ts" with:
105
- """
106
- export const add = (a: number, b: number) => a + b
107
- export const subtract = (a: number, b: number) => a - b
108
- """
109
- And step "implement.prototype.health.check" changes nothing
110
- And step "implement.prototype.testing", when prompted with "This is a re-test", writes ".gtd/PROTOTYPE.md" with:
111
- """
112
- ## AC-1: pass
113
-
114
- `subtract(3, 1)` printed 2.
115
-
116
- ## AC-2: pass
117
-
118
- Printed 2.
119
- """
120
- When the process is driven
121
- Then the process rests at "build.quality.correctness.reviewing"
122
- And the commit subjects end with:
123
- """
124
- gtd(agent): implement.prototype.testing → implement.prototype.open
125
- gtd(human): implement.prototype.open → implement.prototype.health.check
126
- gtd(check): implement.prototype.health.check → implement.prototype.testing
127
- gtd(agent): implement.prototype.testing → implement.closing
128
- gtd(check): implement.closing → build.quality.correctness.reviewing
129
- """
130
-
131
- Scenario: a re-test that sees exactly what the last round saw still ends the round
132
- Given step "implement.prototype.testing" writes ".gtd/PROTOTYPE.md" with:
133
- """
134
- ## AC-1: fail
135
-
136
- `subtract(3, 1)` printed 4. Expected 2.
137
-
138
- ## AC-2: pass
139
-
140
- Printed 2.
141
- """
142
- And step "implement.prototype.fix.fixing" writes "src/calc.ts" with:
143
- """
144
- export const add = (a: number, b: number) => a + b
145
- export const subtract = (a: number, b: number) => b - a
146
- """
147
- And step "implement.prototype.health.check" changes nothing
148
- When the process is driven
149
- Then the process rests at "implement.prototype.open"
150
- And the commit subjects end with:
151
- """
152
- gtd(agent): implement.prototype.testing → implement.prototype.fix.fixing
153
- gtd(agent): implement.prototype.fix.fixing → implement.prototype.health.check
154
- gtd(check): implement.prototype.health.check → implement.prototype.testing
155
- gtd(agent): implement.prototype.testing → implement.prototype.open
156
- """