@pmelab/gtd 58.2.0 → 59.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 (133) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +115 -390
  3. package/dist/chunks/{Schema-B3o6eRNU.mjs → testkit-CMBAAyRK.mjs} +13409 -3351
  4. package/dist/gtd.bundle.mjs +76 -59
  5. package/dist/testkit/gherkin.mjs +1 -1
  6. package/dist/testkit.mjs +1 -1
  7. package/package.json +3 -42
  8. package/skills/authoring/SKILL.md +31 -25
  9. package/src/cli/Cli.test.ts +15 -19
  10. package/src/cli/Cli.ts +2 -4
  11. package/src/cli/Program.test.ts +60 -29
  12. package/src/cli/Program.ts +5 -7
  13. package/src/edge/Edge.ts +3 -3
  14. package/src/flags/index.test.ts +0 -13
  15. package/src/flags/index.ts +1 -3
  16. package/src/install/Install.test.ts +14 -11
  17. package/src/install/Install.ts +38 -15
  18. package/src/install/index.ts +1 -2
  19. package/src/replay/Replay.test.ts +1 -1
  20. package/src/replay/index.ts +1 -1
  21. package/src/step/planStart.ts +6 -1
  22. package/src/twins/FlowScripts.ts +1 -1
  23. package/src/workflow/index.ts +1 -0
  24. package/src/workflow/load.test.ts +138 -113
  25. package/src/workflow/load.ts +1 -1
  26. package/src/workflow/vars.test.ts +30 -3
  27. package/src/workflow/vars.ts +34 -2
  28. package/src/workflow-kit/index.ts +1 -1
  29. package/dist/chunks/reserved-lMYCaapY.mjs +0 -1990
  30. package/dist/chunks/review-Bfaror38.mjs +0 -427
  31. package/dist/chunks/tail-Bd7L940p.mjs +0 -355
  32. package/dist/chunks/testkit-JDtpNKyi.mjs +0 -10410
  33. package/dist/workflows/cleanup.mjs +0 -36
  34. package/dist/workflows/feature.mjs +0 -1018
  35. package/dist/workflows/fix.mjs +0 -41
  36. package/dist/workflows/review.mjs +0 -45
  37. package/dist/workflows/rollout.mjs +0 -48
  38. package/dist/workflows.mjs +0 -40651
  39. package/src/install/ConfigScaffold.ts +0 -22
  40. package/src/workflows/cleanup/cleanup-path.feature +0 -94
  41. package/src/workflows/cleanup/cleanup.feature +0 -315
  42. package/src/workflows/cleanup/cleanup.test.ts +0 -276
  43. package/src/workflows/cleanup/cleanup.ts +0 -52
  44. package/src/workflows/cleanup/index.ts +0 -6
  45. package/src/workflows/feature/acceptance-criteria-tier.feature +0 -25
  46. package/src/workflows/feature/acceptance-criteria.feature +0 -389
  47. package/src/workflows/feature/criteria-coverage.feature +0 -102
  48. package/src/workflows/feature/criteria.test.ts +0 -147
  49. package/src/workflows/feature/criteria.ts +0 -267
  50. package/src/workflows/feature/fast-path.feature +0 -93
  51. package/src/workflows/feature/feature.test.ts +0 -338
  52. package/src/workflows/feature/feature.ts +0 -156
  53. package/src/workflows/feature/green.ts +0 -19
  54. package/src/workflows/feature/index.ts +0 -18
  55. package/src/workflows/feature/lens-models.feature +0 -69
  56. package/src/workflows/feature/lens-review.feature +0 -566
  57. package/src/workflows/feature/naive-acceptance.feature +0 -147
  58. package/src/workflows/feature/naive-test.feature +0 -263
  59. package/src/workflows/feature/one-step-land.feature +0 -93
  60. package/src/workflows/feature/planning.ts +0 -41
  61. package/src/workflows/feature/refactor-absorbs.feature +0 -131
  62. package/src/workflows/feature/refactor-first.feature +0 -158
  63. package/src/workflows/feature/refactor-lens-models.feature +0 -79
  64. package/src/workflows/feature/refactor-rebuild.feature +0 -273
  65. package/src/workflows/feature/refactor-review.feature +0 -1528
  66. package/src/workflows/feature/refactor.test.ts +0 -1220
  67. package/src/workflows/feature/refactor.ts +0 -368
  68. package/src/workflows/feature/release-flag.feature +0 -167
  69. package/src/workflows/feature/release-flag.test.ts +0 -49
  70. package/src/workflows/feature/release-flag.ts +0 -46
  71. package/src/workflows/feature/review-gate.feature +0 -241
  72. package/src/workflows/feature/reviewer-walkthrough.feature +0 -142
  73. package/src/workflows/feature/risk-tier.feature +0 -351
  74. package/src/workflows/feature/seam-rejection.feature +0 -146
  75. package/src/workflows/feature/seam.feature +0 -297
  76. package/src/workflows/feature/seam.test.ts +0 -527
  77. package/src/workflows/feature/seam.ts +0 -426
  78. package/src/workflows/feature/standards.feature +0 -354
  79. package/src/workflows/feature/steps.test.ts +0 -65
  80. package/src/workflows/feature/steps.ts +0 -45
  81. package/src/workflows/feature/tier-pin.feature +0 -66
  82. package/src/workflows/feature/tier.test.ts +0 -166
  83. package/src/workflows/feature/tier.ts +0 -56
  84. package/src/workflows/fix/fix-lens-origin.feature +0 -114
  85. package/src/workflows/fix/fix-quality.feature +0 -212
  86. package/src/workflows/fix/fix.feature +0 -79
  87. package/src/workflows/fix/fix.test.ts +0 -74
  88. package/src/workflows/fix/fix.ts +0 -52
  89. package/src/workflows/fix/index.ts +0 -6
  90. package/src/workflows/index.ts +0 -47
  91. package/src/workflows/review/index.ts +0 -6
  92. package/src/workflows/review/review-door.feature +0 -199
  93. package/src/workflows/review/review.test.ts +0 -27
  94. package/src/workflows/review/review.ts +0 -60
  95. package/src/workflows/rollout/index.ts +0 -6
  96. package/src/workflows/rollout/rollout.feature +0 -510
  97. package/src/workflows/rollout/rollout.test.ts +0 -263
  98. package/src/workflows/rollout/rollout.ts +0 -82
  99. package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +0 -98
  100. package/src/workflows/shared/access.test.ts +0 -62
  101. package/src/workflows/shared/access.ts +0 -24
  102. package/src/workflows/shared/config.fixture.ts +0 -12
  103. package/src/workflows/shared/fences.ts +0 -24
  104. package/src/workflows/shared/health.test.ts +0 -148
  105. package/src/workflows/shared/health.ts +0 -191
  106. package/src/workflows/shared/learn.test.ts +0 -140
  107. package/src/workflows/shared/learn.ts +0 -201
  108. package/src/workflows/shared/lenses.test.ts +0 -39
  109. package/src/workflows/shared/lenses.ts +0 -294
  110. package/src/workflows/shared/options.test.ts +0 -157
  111. package/src/workflows/shared/options.ts +0 -92
  112. package/src/workflows/shared/progress.feature +0 -124
  113. package/src/workflows/shared/prose.ts +0 -263
  114. package/src/workflows/shared/recheck.feature +0 -60
  115. package/src/workflows/shared/registry.test.ts +0 -345
  116. package/src/workflows/shared/registry.ts +0 -183
  117. package/src/workflows/shared/reserved.ts +0 -11
  118. package/src/workflows/shared/review.test.ts +0 -1062
  119. package/src/workflows/shared/review.ts +0 -446
  120. package/src/workflows/shared/skills.test.ts +0 -121
  121. package/src/workflows/shared/skills.ts +0 -49
  122. package/src/workflows/shared/standards.test.ts +0 -90
  123. package/src/workflows/shared/standards.ts +0 -156
  124. package/src/workflows/shared/steps.test.ts +0 -219
  125. package/src/workflows/shared/steps.ts +0 -201
  126. package/src/workflows/shared/tail.test.ts +0 -454
  127. package/src/workflows/shared/tail.ts +0 -264
  128. package/src/workflows/shared/text.fixture.ts +0 -128
  129. package/src/workflows/shared/text.test.ts +0 -1430
  130. package/src/workflows/shared/text.ts +0 -1700
  131. package/src/workflows/shared/threads.test.ts +0 -129
  132. package/src/workflows/shared/vars.ts +0 -47
  133. package/src/workflows/shared/workflows.steps.ts +0 -54
@@ -1,297 +0,0 @@
1
- @inmem
2
- Feature: the naive pass and seam judge decide how a feature is built
3
-
4
- After design a naive pass is set aside under a kept ref, the judge reads its
5
- diff, and the process either applies the pass as the implementation,
6
- refactors the seam first behind a human approval, or retries the naive pass.
7
-
8
- Background:
9
- Given the shipped workflows, as gtd install scaffolds them
10
- And the gtd config ends with:
11
- """
12
- export const config = {
13
- skills: {
14
- implement: ["my-tdd", "my-runbook"],
15
- },
16
- }
17
- """
18
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
19
- And a file "src/calc.ts" with:
20
- """
21
- export const add = (a: number, b: number) => a + b
22
- """
23
- And a file "src/calc.test.ts" with:
24
- """
25
- import { expect, it } from "vitest"
26
- it("adds", () => expect(1 + 1).toBe(2))
27
- """
28
- And the working tree is committed as "feat: add calculator"
29
- And a file "TODO.md" with:
30
- """
31
- # Add subtract
32
-
33
- subtract(a, b) returns the difference.
34
- """
35
- And step "unwind" changes nothing
36
- And step "start-gate.check" changes nothing
37
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
38
- """
39
- # Requirements
40
-
41
- ## Concerns
42
-
43
- ### Subtract
44
-
45
- - `subtract(a, b)` returns `a - b`.
46
-
47
- ## Impact
48
-
49
- - the greeting module
50
-
51
- ## Release Flag
52
-
53
- new
54
-
55
- ## Acceptance Criteria
56
-
57
- - AC-1: the change behaves as described.
58
- """
59
- And step "design.gate.answer" changes nothing
60
-
61
- Scenario: a land judgment applies the naive pass with no seam gate, refactor or build turn
62
- Given step "seam.check" changes nothing
63
- And step "seam.naive" writes "src/acceptance.test.ts" with:
64
- """
65
- it("[AC-1] holds", () => {})
66
- """
67
- And step "seam.naive" writes "src/calc.ts" with:
68
- """
69
- export const add = (a: number, b: number) => a + b
70
- export const subtract = (a: number, b: number) => a - b
71
- """
72
- And judge step "seam.judge" answers:
73
- """
74
- [{"id":"shape","answer":"land","p":0.9}]
75
- """
76
- When the process is driven
77
- Then the process rests at "implement.applying"
78
- And the last commit body contains "Gtd-Judge:"
79
- And the commit subjects end with:
80
- """
81
- chore: initial commit
82
- feat: add calculator
83
- gtd(human): idle → unwind
84
- gtd(check): unwind → start-gate.check
85
- gtd(check): start-gate.check → design.triage
86
- gtd(agent): design.triage → design.gate.answer
87
- gtd(human): design.gate.answer → seam.naive
88
- gtd(agent): seam.naive → seam.check
89
- gtd(check): seam.check → seam.judge
90
- gtd(judge): seam.judge → implement.applying
91
- """
92
-
93
- Scenario: a naive pass that no longer applies is built fresh, with the implement scope's skills
94
- Given step "seam.naive" writes "src/acceptance.test.ts" with:
95
- """
96
- it("[AC-1] holds", () => {})
97
- """
98
- And step "seam.naive" writes "src/subtract.ts" with:
99
- """
100
- export const subtract = (a: number, b: number) => a - b
101
- """
102
- And step "seam.check" writes "src/subtract.ts" with:
103
- """
104
- export const subtract = (a: number, b: number) => b - a
105
- """
106
- And step "implement.applying" runs its script
107
- When the process is driven
108
- Then the process rests at "implement.building"
109
- And the resting step's content contains "my-tdd, my-runbook"
110
- And the resting step's content contains "git show"
111
- And ".gtd/FEEDBACK.md" contains "could not apply the naive pass"
112
- And "src/subtract.ts" contains "b - a"
113
- And the commit subjects end with:
114
- """
115
- gtd(check): seam.check → implement.applying
116
- gtd(check): implement.applying → implement.building
117
- """
118
-
119
- Scenario: the naive pass lands as a marker commit and its turn stays off the branch
120
- Given step "seam.check" changes nothing
121
- And step "seam.naive" writes "src/acceptance.test.ts" with:
122
- """
123
- it("[AC-1] holds", () => {})
124
- """
125
- And step "seam.naive" writes "src/calc.ts" with:
126
- """
127
- export const add = (a: number, b: number) => a + b
128
- export const subtract = (a: number, b: number) => a - b
129
- """
130
- When the process is driven
131
- Then the process rests at "seam.judge"
132
- And the commit subjects end with:
133
- """
134
- gtd(agent): seam.naive → seam.check
135
- gtd(check): seam.check → seam.judge
136
- """
137
- And the commit "gtd(agent): seam.naive → seam.check" has a body containing "Gtd-Kept:"
138
- And "src/calc.ts" does not contain "subtract"
139
-
140
- Scenario: the implementation is the applied naive pass, a green check, then the requirements are closed out
141
- Given step "seam.check" changes nothing
142
- And step "seam.naive" writes "src/acceptance.test.ts" with:
143
- """
144
- it("[AC-1] holds", () => {})
145
- """
146
- And step "seam.naive" writes "src/calc.ts" with:
147
- """
148
- export const add = (a: number, b: number) => a + b
149
- export const subtract = (a: number, b: number) => a - b
150
- """
151
- And judge step "seam.judge" answers:
152
- """
153
- [{"id":"shape","answer":"land","p":0.9}]
154
- """
155
- And step "implement.applying" runs its script
156
- And step "implement.health.check" changes nothing
157
- And step "implement.closing" runs its script
158
- When the process is driven
159
- Then the process rests at "build.review.reviewing"
160
- And "src/calc.ts" contains "subtract"
161
- And the commit subjects end with:
162
- """
163
- gtd(judge): seam.judge → implement.applying
164
- gtd(check): implement.applying → implement.health.check
165
- gtd(check): implement.health.check → implement.closing
166
- gtd(check): implement.closing → build.review.reviewing
167
- """
168
- And ".gtd/REQUIREMENTS.md" does not exist
169
-
170
- Scenario: a naive pass modifying a test file and adding a new one skips the judge
171
- Given step "seam.check" changes nothing
172
- And step "seam.naive" writes "src/acceptance.test.ts" with:
173
- """
174
- it("[AC-1] holds", () => {})
175
- """
176
- And step "seam.naive" writes "src/subtract.ts" with:
177
- """
178
- export const subtract = (a: number, b: number) => a - b
179
- """
180
- And step "seam.naive" writes "src/calc.test.ts" with:
181
- """
182
- import { expect, it } from "vitest"
183
- it("adds", () => expect(2 + 2).toBe(4))
184
- """
185
- When the process is driven
186
- Then the process rests at "implement.applying"
187
- And the commit subjects end with:
188
- """
189
- gtd(human): design.gate.answer → seam.naive
190
- gtd(agent): seam.naive → seam.check
191
- gtd(check): seam.check → implement.applying
192
- """
193
-
194
- Scenario: a naive pass adding a glob-named file does not hide a modified sibling
195
- Given step "seam.check" changes nothing
196
- And step "seam.naive" writes "src/acceptance.test.ts" with:
197
- """
198
- it("[AC-1] holds", () => {})
199
- """
200
- And step "seam.naive" writes "src/calc*.ts" with:
201
- """
202
- export const subtract = (a: number, b: number) => a - b
203
- """
204
- And step "seam.naive" writes "src/calc.ts" with:
205
- """
206
- export const add = (a: number, b: number) => a + b
207
- export const subtract = (a: number, b: number) => a - b
208
- """
209
- And judge step "seam.judge" answers:
210
- """
211
- [{"id":"shape","answer":"reject","p":0.9}]
212
- """
213
- When the process is driven
214
- Then the process rests at "seam.steer"
215
- And the resting step's content contains "src/calc.ts"
216
- And the resting step's content does not contain "src/calc*.ts"
217
-
218
- Scenario: an edit at the steer gate runs the naive pass again with a fresh retry budget
219
- Given step "seam.check" changes nothing
220
- And step "seam.naive" writes "src/acceptance.test.ts" with:
221
- """
222
- it("[AC-1] holds", () => {})
223
- """
224
- And step "seam.naive" writes "src/calc.ts" with:
225
- """
226
- export const add = (a: number, b: number) => b + a
227
- """
228
- And judge step "seam.judge" answers:
229
- """
230
- [{"id":"shape","answer":"reject","p":0.9}]
231
- """
232
- When the process is driven
233
- Then the process rests at "seam.steer"
234
- Given a file ".gtd/REQUIREMENTS.md" with:
235
- """
236
- # Requirements
237
-
238
- ## Concerns
239
-
240
- ### Subtract
241
-
242
- - `subtract(a, b)` returns `a - b`, in a new module.
243
-
244
- ## Impact
245
-
246
- - the greeting module
247
-
248
- ## Release Flag
249
-
250
- new
251
-
252
- ## Acceptance Criteria
253
-
254
- - AC-1: the change behaves as described.
255
- """
256
- When gtd lands
257
- Then the process rests at "seam.naive"
258
- And the resting step's content does not contain "was rejected"
259
- When the process is driven
260
- Then the process rests at "seam.steer"
261
- And the commit subjects end with:
262
- """
263
- gtd(human): seam.steer → seam.naive
264
- gtd(agent): seam.naive → seam.check
265
- gtd(check): seam.check → seam.judge
266
- gtd(judge): seam.judge → seam.naive
267
- gtd(agent): seam.naive → seam.check
268
- gtd(check): seam.check → seam.judge
269
- gtd(judge): seam.judge → seam.naive
270
- gtd(agent): seam.naive → seam.check
271
- gtd(check): seam.check → seam.judge
272
- gtd(judge): seam.judge → seam.steer
273
- """
274
-
275
- Scenario: a clean landing at the steer gate overrules and applies the pass, with no seam gate and no refactor
276
- Given step "seam.check" changes nothing
277
- And step "seam.naive" writes "src/acceptance.test.ts" with:
278
- """
279
- it("[AC-1] holds", () => {})
280
- """
281
- And step "seam.naive" writes "src/calc.ts" with:
282
- """
283
- export const add = (a: number, b: number) => b + a
284
- """
285
- And judge step "seam.judge" answers:
286
- """
287
- [{"id":"shape","answer":"reject","p":0.9}]
288
- """
289
- When the process is driven
290
- Then the process rests at "seam.steer"
291
- When gtd lands
292
- Then the process rests at "implement.applying"
293
- And the commit subjects end with:
294
- """
295
- gtd(judge): seam.judge → seam.steer
296
- gtd(human): seam.steer → implement.applying
297
- """