@pmelab/gtd 58.1.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 (142) 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 +30 -2
  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/gherkin/git-control.feature +78 -0
  17. package/src/gherkin/index.ts +35 -1
  18. package/src/install/Install.test.ts +14 -11
  19. package/src/install/Install.ts +38 -15
  20. package/src/install/index.ts +1 -2
  21. package/src/replay/Replay.test.ts +1 -1
  22. package/src/replay/index.ts +1 -1
  23. package/src/step/planStart.ts +6 -1
  24. package/src/testkit/TestRepo.test.ts +118 -2
  25. package/src/testkit/TestRepo.ts +57 -6
  26. package/src/testkit/index.ts +1 -0
  27. package/src/twins/EmittedScriptRecognizer.ts +12 -14
  28. package/src/twins/FlowScripts.ts +10 -9
  29. package/src/twins/InMemRepo.ts +26 -1
  30. package/src/twins/Layers.ts +12 -1
  31. package/src/twins/index.ts +6 -1
  32. package/src/workflow/index.ts +1 -0
  33. package/src/workflow/load.test.ts +138 -113
  34. package/src/workflow/load.ts +1 -1
  35. package/src/workflow/vars.test.ts +30 -3
  36. package/src/workflow/vars.ts +34 -2
  37. package/src/workflow-kit/index.ts +1 -1
  38. package/dist/chunks/reserved-lMYCaapY.mjs +0 -1990
  39. package/dist/chunks/review-Bfaror38.mjs +0 -427
  40. package/dist/chunks/tail-Bd7L940p.mjs +0 -355
  41. package/dist/chunks/testkit-D1-auYau.mjs +0 -10362
  42. package/dist/workflows/cleanup.mjs +0 -36
  43. package/dist/workflows/feature.mjs +0 -1018
  44. package/dist/workflows/fix.mjs +0 -41
  45. package/dist/workflows/review.mjs +0 -45
  46. package/dist/workflows/rollout.mjs +0 -48
  47. package/dist/workflows.mjs +0 -40651
  48. package/src/install/ConfigScaffold.ts +0 -22
  49. package/src/workflows/cleanup/cleanup-path.feature +0 -94
  50. package/src/workflows/cleanup/cleanup.feature +0 -315
  51. package/src/workflows/cleanup/cleanup.test.ts +0 -276
  52. package/src/workflows/cleanup/cleanup.ts +0 -52
  53. package/src/workflows/cleanup/index.ts +0 -6
  54. package/src/workflows/feature/acceptance-criteria-tier.feature +0 -25
  55. package/src/workflows/feature/acceptance-criteria.feature +0 -389
  56. package/src/workflows/feature/criteria-coverage.feature +0 -102
  57. package/src/workflows/feature/criteria.test.ts +0 -147
  58. package/src/workflows/feature/criteria.ts +0 -267
  59. package/src/workflows/feature/fast-path.feature +0 -93
  60. package/src/workflows/feature/feature.test.ts +0 -338
  61. package/src/workflows/feature/feature.ts +0 -156
  62. package/src/workflows/feature/green.ts +0 -19
  63. package/src/workflows/feature/index.ts +0 -18
  64. package/src/workflows/feature/lens-models.feature +0 -69
  65. package/src/workflows/feature/lens-review.feature +0 -566
  66. package/src/workflows/feature/naive-acceptance.feature +0 -147
  67. package/src/workflows/feature/naive-test.feature +0 -263
  68. package/src/workflows/feature/one-step-land.feature +0 -93
  69. package/src/workflows/feature/planning.ts +0 -41
  70. package/src/workflows/feature/refactor-absorbs.feature +0 -131
  71. package/src/workflows/feature/refactor-first.feature +0 -158
  72. package/src/workflows/feature/refactor-lens-models.feature +0 -79
  73. package/src/workflows/feature/refactor-rebuild.feature +0 -273
  74. package/src/workflows/feature/refactor-review.feature +0 -1528
  75. package/src/workflows/feature/refactor.test.ts +0 -1220
  76. package/src/workflows/feature/refactor.ts +0 -368
  77. package/src/workflows/feature/release-flag.feature +0 -167
  78. package/src/workflows/feature/release-flag.test.ts +0 -49
  79. package/src/workflows/feature/release-flag.ts +0 -46
  80. package/src/workflows/feature/review-gate.feature +0 -241
  81. package/src/workflows/feature/reviewer-walkthrough.feature +0 -142
  82. package/src/workflows/feature/risk-tier.feature +0 -351
  83. package/src/workflows/feature/seam-rejection.feature +0 -146
  84. package/src/workflows/feature/seam.feature +0 -297
  85. package/src/workflows/feature/seam.test.ts +0 -527
  86. package/src/workflows/feature/seam.ts +0 -426
  87. package/src/workflows/feature/standards.feature +0 -354
  88. package/src/workflows/feature/steps.test.ts +0 -65
  89. package/src/workflows/feature/steps.ts +0 -45
  90. package/src/workflows/feature/tier-pin.feature +0 -66
  91. package/src/workflows/feature/tier.test.ts +0 -166
  92. package/src/workflows/feature/tier.ts +0 -56
  93. package/src/workflows/fix/fix-lens-origin.feature +0 -114
  94. package/src/workflows/fix/fix-quality.feature +0 -212
  95. package/src/workflows/fix/fix.feature +0 -79
  96. package/src/workflows/fix/fix.test.ts +0 -74
  97. package/src/workflows/fix/fix.ts +0 -52
  98. package/src/workflows/fix/index.ts +0 -6
  99. package/src/workflows/index.ts +0 -47
  100. package/src/workflows/review/index.ts +0 -6
  101. package/src/workflows/review/review-door.feature +0 -199
  102. package/src/workflows/review/review.test.ts +0 -27
  103. package/src/workflows/review/review.ts +0 -60
  104. package/src/workflows/rollout/index.ts +0 -6
  105. package/src/workflows/rollout/rollout.feature +0 -510
  106. package/src/workflows/rollout/rollout.test.ts +0 -263
  107. package/src/workflows/rollout/rollout.ts +0 -82
  108. package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +0 -98
  109. package/src/workflows/shared/access.test.ts +0 -62
  110. package/src/workflows/shared/access.ts +0 -24
  111. package/src/workflows/shared/config.fixture.ts +0 -12
  112. package/src/workflows/shared/fences.ts +0 -24
  113. package/src/workflows/shared/health.test.ts +0 -148
  114. package/src/workflows/shared/health.ts +0 -191
  115. package/src/workflows/shared/learn.test.ts +0 -140
  116. package/src/workflows/shared/learn.ts +0 -201
  117. package/src/workflows/shared/lenses.test.ts +0 -39
  118. package/src/workflows/shared/lenses.ts +0 -294
  119. package/src/workflows/shared/options.test.ts +0 -157
  120. package/src/workflows/shared/options.ts +0 -92
  121. package/src/workflows/shared/progress.feature +0 -124
  122. package/src/workflows/shared/prose.ts +0 -263
  123. package/src/workflows/shared/recheck.feature +0 -60
  124. package/src/workflows/shared/registry.test.ts +0 -345
  125. package/src/workflows/shared/registry.ts +0 -183
  126. package/src/workflows/shared/reserved.ts +0 -11
  127. package/src/workflows/shared/review.test.ts +0 -1062
  128. package/src/workflows/shared/review.ts +0 -446
  129. package/src/workflows/shared/skills.test.ts +0 -121
  130. package/src/workflows/shared/skills.ts +0 -49
  131. package/src/workflows/shared/standards.test.ts +0 -90
  132. package/src/workflows/shared/standards.ts +0 -156
  133. package/src/workflows/shared/steps.test.ts +0 -219
  134. package/src/workflows/shared/steps.ts +0 -201
  135. package/src/workflows/shared/tail.test.ts +0 -454
  136. package/src/workflows/shared/tail.ts +0 -264
  137. package/src/workflows/shared/text.fixture.ts +0 -128
  138. package/src/workflows/shared/text.test.ts +0 -1430
  139. package/src/workflows/shared/text.ts +0 -1700
  140. package/src/workflows/shared/threads.test.ts +0 -129
  141. package/src/workflows/shared/vars.ts +0 -47
  142. package/src/workflows/shared/workflows.steps.ts +0 -54
@@ -1,241 +0,0 @@
1
- @inmem
2
- Feature: a feature process ends at the human review
3
-
4
- After the quality lap the process rests at the review gate,
5
- `.gtd/REVIEW.md`. A sign-off ends the process. A note asking for a change in
6
- behaviour starts a feedback lap — design, then implement with no new naive
7
- pass or seam judge, the quality lap — and the review
8
- again. Its design keeps a built criterion's ID and numbers
9
- new behaviour above every ID handed out.
10
-
11
- Background:
12
- Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
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
- ## Concerns
32
-
33
- ### Subtract
34
-
35
- - `subtract(a, b)` returns `a - b`.
36
-
37
- ## Impact
38
-
39
- - the greeting module
40
-
41
- ## Acceptance Criteria
42
-
43
- - AC-1: subtract(a, b) returns a - b.
44
- """
45
- And step "design.gate.answer" changes nothing
46
- And step "seam.naive" writes "src/calc.test.ts" with:
47
- """
48
- it("[AC-1] subtracts", () => {})
49
- """
50
- And step "seam.naive" writes "src/calc.ts" with:
51
- """
52
- export const add = (a: number, b: number) => a + b
53
- export const subtract = (a: number, b: number) => a - b
54
- """
55
- And step "seam.check" changes nothing
56
- And step "implement.applying" runs its script
57
- And step "implement.health.check" changes nothing
58
- And step "implement.closing" runs its script
59
- And step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
60
- """
61
- # Review: abc1234
62
-
63
- <!-- base: 0000000 -->
64
-
65
- ## calc
66
-
67
- - [ ] ./src/calc.ts#2-2
68
- new subtract function
69
- """
70
- And step "build.review.closing" runs its script
71
- And step "build.review.carrying" runs its script
72
-
73
- Scenario: a feature process ends at the review gate
74
- When the process is driven
75
- Then the process rests at "build.review.await-review"
76
- And ".gtd/REQUIREMENTS.md" does not exist
77
- And the resting step's content contains the hash of the commit "feat: add calculator"
78
- And the commit subjects end with:
79
- """
80
- gtd(check): implement.health.check → implement.closing
81
- gtd(check): implement.closing → build.review.reviewing
82
- gtd(agent): build.review.reviewing → build.review.await-review
83
- """
84
-
85
- Scenario: a sign-off ends the process at idle
86
- When the process is driven
87
- Then the process rests at "build.review.await-review"
88
- Given a file ".gtd/REVIEW.md" with:
89
- """
90
- # Review: abc1234
91
-
92
- <!-- base: 0000000 -->
93
-
94
- ## calc
95
-
96
- - [x] ./src/calc.ts#2-2
97
- new subtract function
98
- """
99
- When gtd lands
100
- And the process is driven
101
- Then the process rests at "idle"
102
- And ".gtd/REVIEW.md" does not exist
103
- And the commit subjects end with:
104
- """
105
- gtd(agent): build.review.reviewing → build.review.await-review
106
- gtd(human): build.review.await-review → build.review.closing
107
- gtd(check): build.review.closing → idle
108
- """
109
-
110
- Rule: a note asking for new behaviour runs the feedback lap
111
-
112
- Background:
113
- Given step "build.review.collecting" writes ".gtd/REQUIREMENTS.md" with:
114
- """
115
- # Requirements
116
-
117
- ## Concerns
118
-
119
- ### Multiply
120
-
121
- - Export `multiply()`.
122
- """
123
- And step "build.review.collecting" writes ".gtd/REVIEW.md" with:
124
- """
125
- # Review: abc1234
126
-
127
- <!-- base: 0000000 -->
128
-
129
- ## calc
130
-
131
- - [ ] ./src/calc.ts#2-2
132
- new subtract function[^why]
133
-
134
- [^why]:
135
- - H: also export multiply
136
- - A: noted in the requirements.
137
- """
138
- And step "re-unwind" runs its script
139
- When the process is driven
140
- Then the process rests at "build.review.await-review"
141
- Given a file ".gtd/REVIEW.md" with:
142
- """
143
- # Review: abc1234
144
-
145
- <!-- base: 0000000 -->
146
-
147
- ## calc
148
-
149
- - [ ] ./src/calc.ts#2-2
150
- new subtract function[^why]
151
-
152
- [^why]:
153
- - H: also export multiply
154
- """
155
- When gtd lands
156
- And the process is driven
157
- Then the process rests at "build.review.await-review"
158
- And ".gtd/REQUIREMENTS.md" contains "multiply"
159
- Given a file ".gtd/REVIEW.md" with:
160
- """
161
- # Review: abc1234
162
-
163
- <!-- base: 0000000 -->
164
-
165
- ## calc
166
-
167
- - [ ] ./src/calc.ts#2-2
168
- new subtract function
169
- """
170
-
171
- Scenario: the lap keeps AC-1, adds AC-2, and builds both before the next review
172
- Given step "design.triage" from now on changes nothing
173
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
174
- """
175
- # Requirements
176
-
177
- ## Concerns
178
-
179
- ### Multiply
180
-
181
- - `multiply(a, b)` returns `a * b`.
182
-
183
- ## Impact
184
-
185
- - the greeting module
186
-
187
- ## Acceptance Criteria
188
-
189
- - AC-1: subtract(a, b) returns a - b.
190
- - AC-2: multiply(a, b) returns a * b.
191
- """
192
- And step "implement.building" writes "src/calc.ts" with:
193
- """
194
- export const add = (a: number, b: number) => a + b
195
- export const subtract = (a: number, b: number) => a - b
196
- export const multiply = (a: number, b: number) => a * b
197
- """
198
- And step "implement.building" writes "src/multiply.test.ts" with:
199
- """
200
- it("[AC-2] multiplies", () => {})
201
- """
202
- When gtd lands
203
- And the process is driven
204
- Then the process rests at "build.review.await-review"
205
- And ".gtd/REQUIREMENTS.md" does not exist
206
- And the commit subjects end with:
207
- """
208
- gtd(human): build.review.await-review → build.review.closing
209
- gtd(check): build.review.closing → re-unwind
210
- gtd(check): re-unwind → design.triage
211
- gtd(agent): design.triage → design.gate.answer
212
- gtd(human): design.gate.answer → implement.building
213
- gtd(agent): implement.building → implement.health.check
214
- gtd(check): implement.health.check → implement.closing
215
- gtd(check): implement.closing → build.review.reviewing
216
- gtd(agent): build.review.reviewing → build.review.await-review
217
- """
218
-
219
- Scenario: a design numbering new behaviour at or below an earlier ID is refused
220
- Given step "design.triage" from now on changes nothing
221
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
222
- """
223
- # Requirements
224
-
225
- ## Concerns
226
-
227
- ### Multiply
228
-
229
- - `multiply(a, b)` returns `a * b`.
230
-
231
- ## Impact
232
-
233
- - the greeting module
234
-
235
- ## Acceptance Criteria
236
-
237
- - AC-0: multiply(a, b) returns a * b.
238
- - AC-1: subtract(a, b) returns a - b.
239
- """
240
- When gtd lands
241
- Then driving the process is refused with "criteria-ids"
@@ -1,142 +0,0 @@
1
- @inmem
2
- Feature: a reviewer walks the human through the feature's code
3
-
4
- The feature's final review is written by a reviewer turn
5
- (`build.review.reviewing`): chunks grouped by concern, each pointing at its
6
- code, so the phone shows it. The quality lap's findings were decided at the
7
- finding gate: the reviewer is told nothing of them, and gtd only appends
8
- the lap's summary (`build.review.carrying`). A chunk pointing at no code is
9
- refused.
10
-
11
- Background:
12
- Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
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
- """
39
- And step "design.gate.answer" changes nothing
40
- And step "seam.naive" writes "src/calc.test.ts" with:
41
- """
42
- it("[AC-1] subtracts", () => {})
43
- """
44
- And step "seam.naive" writes "src/calc.ts" with:
45
- """
46
- export const add = (a: number, b: number) => a + b
47
- export const subtract = (a: number, b: number) => a - b
48
- """
49
- And step "seam.check" changes nothing
50
- And step "implement.applying" runs its script
51
- And step "implement.health.check" changes nothing
52
- And step "implement.closing" runs its script
53
-
54
- Scenario: the review is the reviewer's walkthrough, as it wrote it
55
- Given step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
56
- """
57
- # Review: abc1234
58
-
59
- <!-- base: 0000000 -->
60
-
61
- ## Subtract
62
-
63
- The new export.
64
-
65
- - [ ] ./src/calc.ts#2-2 — subtract(a, b)
66
- """
67
- When the process is driven
68
- Then the process rests at "build.review.await-review"
69
- And the resting step's content does not contain "Tick exactly one"
70
- And ".gtd/REVIEW.md" contains:
71
- """
72
- <!-- base: 0000000 -->
73
-
74
- ## Subtract
75
-
76
- The new export.
77
-
78
- - [ ] ./src/calc.ts#2-2 — subtract(a, b)
79
- """
80
- And the commit subjects end with:
81
- """
82
- gtd(check): implement.closing → build.review.reviewing
83
- gtd(agent): build.review.reviewing → build.review.await-review
84
- """
85
-
86
- Scenario: a chunk pointing at no code is refused
87
- Given step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
88
- """
89
- # Review: abc1234
90
-
91
- <!-- base: 0000000 -->
92
-
93
- ## Subtract
94
-
95
- The new export, with no pointer.
96
- """
97
- Then driving the process is refused with "Subtract — points at no code"
98
-
99
- Scenario: a review the reviewer sorts into sections itself is refused
100
- Given step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
101
- """
102
- # Review: abc1234
103
-
104
- <!-- base: 0000000 -->
105
-
106
- ## Walkthrough
107
-
108
- ### Subtract
109
-
110
- - [ ] ./src/calc.ts#2-2 — subtract(a, b)
111
- """
112
- Then driving the process is refused with "Walkthrough — write `## ` chunks only"
113
-
114
- Scenario: a standard conflict the reviewer writes itself is refused
115
- Given step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
116
- """
117
- # Review: abc1234
118
-
119
- <!-- base: 0000000 -->
120
-
121
- ## Standard conflict 0123abcd
122
-
123
- - [ ] ./src/calc.ts#2-2 — copied over
124
- """
125
- Then driving the process is refused with "Standard conflict 0123abcd — gtd writes conflicts"
126
-
127
- Scenario: two chunks with one title are refused
128
- Given step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
129
- """
130
- # Review: abc1234
131
-
132
- <!-- base: 0000000 -->
133
-
134
- ## Subtract
135
-
136
- - [ ] ./src/calc.ts#2-2 — subtract(a, b)
137
-
138
- ## Subtract
139
-
140
- - [ ] ./src/calc.ts#2-2 — returns the raw difference
141
- """
142
- Then driving the process is refused with "Subtract — a second chunk with this title"