@pmelab/gtd 58.2.0 → 59.0.1

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 (150) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +120 -395
  3. package/dist/chunks/{Schema-B3o6eRNU.mjs → testkit-07Z_ENch.mjs} +13503 -3460
  4. package/dist/chunks/{wire-C12dahrH.mjs → wire-BTUhRGXj.mjs} +1 -1
  5. package/dist/flows.mjs +1 -1
  6. package/dist/gtd.bundle.mjs +484 -497
  7. package/dist/testkit/gherkin.mjs +145 -65
  8. package/dist/testkit.mjs +1 -1
  9. package/dist/wire.mjs +1 -1
  10. package/package.json +3 -42
  11. package/skills/authoring/SKILL.md +34 -27
  12. package/src/cli/Cli.test.ts +148 -71
  13. package/src/cli/Cli.ts +384 -463
  14. package/src/cli/Help.test.ts +47 -0
  15. package/src/cli/Help.ts +70 -0
  16. package/src/cli/Program.test.ts +127 -33
  17. package/src/cli/Program.ts +70 -25
  18. package/src/edge/Edge.ts +4 -4
  19. package/src/emit/Emit.test.ts +1 -1
  20. package/src/emit/Emit.ts +1 -1
  21. package/src/flags/index.test.ts +0 -13
  22. package/src/flags/index.ts +1 -3
  23. package/src/flows/factory.ts +3 -1
  24. package/src/gherkin/index.ts +135 -71
  25. package/src/gherkin/messages.test.ts +90 -0
  26. package/src/gherkin/messages.ts +84 -0
  27. package/src/install/Install.test.ts +14 -11
  28. package/src/install/Install.ts +38 -15
  29. package/src/install/index.ts +1 -2
  30. package/src/replay/Replay.test.ts +1 -1
  31. package/src/replay/index.ts +1 -1
  32. package/src/step/planStart.ts +6 -1
  33. package/src/testkit/TestRepo.test.ts +47 -2
  34. package/src/testkit/TestRepo.ts +51 -6
  35. package/src/twins/EmittedScriptRecognizer.ts +5 -8
  36. package/src/twins/FlowScripts.ts +1 -1
  37. package/src/wire/Land.ts +1 -1
  38. package/src/workflow/index.ts +1 -0
  39. package/src/workflow/load.test.ts +138 -113
  40. package/src/workflow/load.ts +7 -7
  41. package/src/workflow/skills.test.ts +5 -5
  42. package/src/workflow/skills.ts +1 -1
  43. package/src/workflow/vars.test.ts +30 -3
  44. package/src/workflow/vars.ts +34 -2
  45. package/src/workflow-kit/index.ts +1 -1
  46. package/dist/chunks/reserved-lMYCaapY.mjs +0 -1990
  47. package/dist/chunks/review-Bfaror38.mjs +0 -427
  48. package/dist/chunks/tail-Bd7L940p.mjs +0 -355
  49. package/dist/chunks/testkit-JDtpNKyi.mjs +0 -10410
  50. package/dist/workflows/cleanup.mjs +0 -36
  51. package/dist/workflows/feature.mjs +0 -1018
  52. package/dist/workflows/fix.mjs +0 -41
  53. package/dist/workflows/review.mjs +0 -45
  54. package/dist/workflows/rollout.mjs +0 -48
  55. package/dist/workflows.mjs +0 -40651
  56. package/src/install/ConfigScaffold.ts +0 -22
  57. package/src/workflows/cleanup/cleanup-path.feature +0 -94
  58. package/src/workflows/cleanup/cleanup.feature +0 -315
  59. package/src/workflows/cleanup/cleanup.test.ts +0 -276
  60. package/src/workflows/cleanup/cleanup.ts +0 -52
  61. package/src/workflows/cleanup/index.ts +0 -6
  62. package/src/workflows/feature/acceptance-criteria-tier.feature +0 -25
  63. package/src/workflows/feature/acceptance-criteria.feature +0 -389
  64. package/src/workflows/feature/criteria-coverage.feature +0 -102
  65. package/src/workflows/feature/criteria.test.ts +0 -147
  66. package/src/workflows/feature/criteria.ts +0 -267
  67. package/src/workflows/feature/fast-path.feature +0 -93
  68. package/src/workflows/feature/feature.test.ts +0 -338
  69. package/src/workflows/feature/feature.ts +0 -156
  70. package/src/workflows/feature/green.ts +0 -19
  71. package/src/workflows/feature/index.ts +0 -18
  72. package/src/workflows/feature/lens-models.feature +0 -69
  73. package/src/workflows/feature/lens-review.feature +0 -566
  74. package/src/workflows/feature/naive-acceptance.feature +0 -147
  75. package/src/workflows/feature/naive-test.feature +0 -263
  76. package/src/workflows/feature/one-step-land.feature +0 -93
  77. package/src/workflows/feature/planning.ts +0 -41
  78. package/src/workflows/feature/refactor-absorbs.feature +0 -131
  79. package/src/workflows/feature/refactor-first.feature +0 -158
  80. package/src/workflows/feature/refactor-lens-models.feature +0 -79
  81. package/src/workflows/feature/refactor-rebuild.feature +0 -273
  82. package/src/workflows/feature/refactor-review.feature +0 -1528
  83. package/src/workflows/feature/refactor.test.ts +0 -1220
  84. package/src/workflows/feature/refactor.ts +0 -368
  85. package/src/workflows/feature/release-flag.feature +0 -167
  86. package/src/workflows/feature/release-flag.test.ts +0 -49
  87. package/src/workflows/feature/release-flag.ts +0 -46
  88. package/src/workflows/feature/review-gate.feature +0 -241
  89. package/src/workflows/feature/reviewer-walkthrough.feature +0 -142
  90. package/src/workflows/feature/risk-tier.feature +0 -351
  91. package/src/workflows/feature/seam-rejection.feature +0 -146
  92. package/src/workflows/feature/seam.feature +0 -297
  93. package/src/workflows/feature/seam.test.ts +0 -527
  94. package/src/workflows/feature/seam.ts +0 -426
  95. package/src/workflows/feature/standards.feature +0 -354
  96. package/src/workflows/feature/steps.test.ts +0 -65
  97. package/src/workflows/feature/steps.ts +0 -45
  98. package/src/workflows/feature/tier-pin.feature +0 -66
  99. package/src/workflows/feature/tier.test.ts +0 -166
  100. package/src/workflows/feature/tier.ts +0 -56
  101. package/src/workflows/fix/fix-lens-origin.feature +0 -114
  102. package/src/workflows/fix/fix-quality.feature +0 -212
  103. package/src/workflows/fix/fix.feature +0 -79
  104. package/src/workflows/fix/fix.test.ts +0 -74
  105. package/src/workflows/fix/fix.ts +0 -52
  106. package/src/workflows/fix/index.ts +0 -6
  107. package/src/workflows/index.ts +0 -47
  108. package/src/workflows/review/index.ts +0 -6
  109. package/src/workflows/review/review-door.feature +0 -199
  110. package/src/workflows/review/review.test.ts +0 -27
  111. package/src/workflows/review/review.ts +0 -60
  112. package/src/workflows/rollout/index.ts +0 -6
  113. package/src/workflows/rollout/rollout.feature +0 -510
  114. package/src/workflows/rollout/rollout.test.ts +0 -263
  115. package/src/workflows/rollout/rollout.ts +0 -82
  116. package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +0 -98
  117. package/src/workflows/shared/access.test.ts +0 -62
  118. package/src/workflows/shared/access.ts +0 -24
  119. package/src/workflows/shared/config.fixture.ts +0 -12
  120. package/src/workflows/shared/fences.ts +0 -24
  121. package/src/workflows/shared/health.test.ts +0 -148
  122. package/src/workflows/shared/health.ts +0 -191
  123. package/src/workflows/shared/learn.test.ts +0 -140
  124. package/src/workflows/shared/learn.ts +0 -201
  125. package/src/workflows/shared/lenses.test.ts +0 -39
  126. package/src/workflows/shared/lenses.ts +0 -294
  127. package/src/workflows/shared/options.test.ts +0 -157
  128. package/src/workflows/shared/options.ts +0 -92
  129. package/src/workflows/shared/progress.feature +0 -124
  130. package/src/workflows/shared/prose.ts +0 -263
  131. package/src/workflows/shared/recheck.feature +0 -60
  132. package/src/workflows/shared/registry.test.ts +0 -345
  133. package/src/workflows/shared/registry.ts +0 -183
  134. package/src/workflows/shared/reserved.ts +0 -11
  135. package/src/workflows/shared/review.test.ts +0 -1062
  136. package/src/workflows/shared/review.ts +0 -446
  137. package/src/workflows/shared/skills.test.ts +0 -121
  138. package/src/workflows/shared/skills.ts +0 -49
  139. package/src/workflows/shared/standards.test.ts +0 -90
  140. package/src/workflows/shared/standards.ts +0 -156
  141. package/src/workflows/shared/steps.test.ts +0 -219
  142. package/src/workflows/shared/steps.ts +0 -201
  143. package/src/workflows/shared/tail.test.ts +0 -454
  144. package/src/workflows/shared/tail.ts +0 -264
  145. package/src/workflows/shared/text.fixture.ts +0 -128
  146. package/src/workflows/shared/text.test.ts +0 -1430
  147. package/src/workflows/shared/text.ts +0 -1700
  148. package/src/workflows/shared/threads.test.ts +0 -129
  149. package/src/workflows/shared/vars.ts +0 -47
  150. 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"