@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,147 +0,0 @@
1
- @inmem
2
- Feature: a naive pass ends only when its tests reach no file it added and the suite is green
3
-
4
- `seam.naive` needs no test at all. A pass whose test imports a file the pass
5
- added is sent back; `seam.check` then runs the suite with the kept pass
6
- applied, and a red run sends it back too, before the judge sees it. Three
7
- failed attempts rest at `seam.steer`.
8
-
9
- Background:
10
- Given the shipped workflows, as gtd install scaffolds them
11
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
12
- And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
13
- And a file "src/calc.ts" with:
14
- """
15
- export const add = (a: number, b: number) => a + b
16
- """
17
- And the working tree is committed as "feat: add calculator"
18
- And a file "TODO.md" with:
19
- """
20
- # Add subtract
21
-
22
- subtract(a, b) returns the difference.
23
- """
24
- And step "unwind" changes nothing
25
- And step "start-gate.check" changes nothing
26
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
27
- """
28
- # Requirements
29
-
30
- ## Impact
31
-
32
- - the greeting module
33
-
34
- ## Release Flag
35
-
36
- new
37
-
38
- ## Acceptance Criteria
39
-
40
- - AC-1: `subtract(5, 3)` returns 2.
41
- - AC-2: `add` still adds.
42
- """
43
- And step "design.gate.answer" changes nothing
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
-
50
- Scenario: a pass without a test goes on to the check and the judge
51
- Given step "seam.check" changes nothing
52
- When the process is driven
53
- Then the process rests at "seam.judge"
54
- And the commit subjects end with:
55
- """
56
- gtd(human): design.gate.answer → seam.naive
57
- gtd(agent): seam.naive → seam.check
58
- gtd(check): seam.check → seam.judge
59
- """
60
-
61
- Scenario: a test importing a file the pass added is sent back, and an overrule runs the check and sticks
62
- Given step "seam.naive" writes "src/subtract.ts" with:
63
- """
64
- export const subtract = (a: number, b: number) => a - b
65
- """
66
- And step "seam.naive" writes "src/subtract.test.ts" with:
67
- """
68
- import { subtract } from "./subtract.js"
69
- it("subtracts", () => expect(subtract(5, 3)).toBe(2))
70
- """
71
- When the process is driven
72
- Then the process rests at "seam.steer"
73
- And the resting step's content contains "src/subtract.test.ts → src/subtract.ts"
74
-
75
- Given step "seam.check" changes nothing
76
- When gtd lands
77
- And the process is driven
78
- Then the process rests at "seam.judge"
79
- And the commit subjects end with:
80
- """
81
- gtd(human): design.gate.answer → seam.naive
82
- gtd(agent): seam.naive
83
- gtd(agent): seam.naive
84
- gtd(agent): seam.naive → seam.steer
85
- gtd(human): seam.steer → seam.check
86
- gtd(check): seam.check → seam.judge
87
- """
88
-
89
- Given judge step "seam.judge" answers:
90
- """
91
- [{"id":"shape","answer":"reject","p":0.9}]
92
- """
93
- When the process is driven
94
- Then the process rests at "seam.steer"
95
- And the resting step's content contains "rejected the last attempt"
96
- And the commit subjects end with:
97
- """
98
- gtd(check): seam.check → seam.judge
99
- gtd(judge): seam.judge → seam.naive
100
- gtd(agent): seam.naive → seam.check
101
- gtd(check): seam.check → seam.judge
102
- gtd(judge): seam.judge → seam.naive
103
- gtd(agent): seam.naive → seam.check
104
- gtd(check): seam.check → seam.judge
105
- gtd(judge): seam.judge → seam.steer
106
- """
107
-
108
- Scenario: a red suite sends the pass back, and it moves on only once green
109
- Given step "seam.naive" writes "tests/calc.test.ts" with:
110
- """
111
- import { add, subtract } from "../src/calc.js"
112
- it("subtracts", () => expect(subtract(5, 3)).toBe(2))
113
- it("still adds", () => expect(add(1, 1)).toBe(2))
114
- """
115
- When the process is driven
116
- Then the process rests at "seam.check"
117
- And the resting step's content contains "git checkout -q HEAD --"
118
- And the resting step's content does not contain "'^'"
119
- And the resting step's content contains "npm test"
120
-
121
- Given step "seam.naive" is no longer scripted
122
- And step "seam.check" writes ".gtd/FEEDBACK.md" with:
123
- """
124
- FAIL tests/calc.test.ts > subtracts
125
- """
126
- When the process is driven
127
- Then the process rests at "seam.naive"
128
- And the resting step's content contains "left the suite red"
129
- And ".gtd/FEEDBACK.md" contains "> subtracts"
130
-
131
- Given step "seam.naive" writes "tests/calc.test.ts" with:
132
- """
133
- import { add, subtract } from "../src/calc.js"
134
- it("subtracts", () => expect(subtract(5, 3)).toBe(2))
135
- it("still adds", () => expect(add(2, 2)).toBe(4))
136
- """
137
- And step "seam.check" from now on changes nothing
138
- When the process is driven
139
- Then the process rests at "implement.applying"
140
- And the commit subjects end with:
141
- """
142
- gtd(human): design.gate.answer → seam.naive
143
- gtd(agent): seam.naive → seam.check
144
- gtd(check): seam.check → seam.naive
145
- gtd(agent): seam.naive → seam.check
146
- gtd(check): seam.check → implement.applying
147
- """
@@ -1,263 +0,0 @@
1
- @inmem
2
- Feature: a person tries the naive pass by hand before anything builds on it
3
-
4
- `naiveTest` is a factory option of the shipped workflows, off by default. On,
5
- every green naive pass is applied to the working tree and the process rests
6
- at `seam.try`. A clean landing signs it off and the process goes on — to the
7
- seam judge when the requirements ask for a release flag, else straight to the
8
- implementation. Notes in
9
- `.gtd/NAIVE-TEST.md`, a code edit or a requirements edit send it back: the
10
- pass and the person's code edits leave the tree again, and the next naive
11
- pass gets the notes and the edits. Every lap ends at the gate again.
12
-
13
- Rule: with no release flag asked for
14
-
15
- Background:
16
- Given a gtd config with:
17
- """
18
- import { feature } from "@pmelab/gtd/workflows/feature"
19
- export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
20
- export default feature({ naiveTest: true })
21
- """
22
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
23
- And a file "src/calc.ts" with:
24
- """
25
- export const add = (a: number, b: number) => a + b
26
- """
27
- And the working tree is committed as "feat: add calculator"
28
- And a file "TODO.md" with:
29
- """
30
- # Add subtract
31
-
32
- subtract(a, b) returns the difference.
33
- """
34
- And step "unwind" changes nothing
35
- And step "start-gate.check" changes nothing
36
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
37
- """
38
- # Requirements
39
-
40
- ## Impact
41
-
42
- - the calculator module
43
-
44
- ## Acceptance Criteria
45
-
46
- - AC-1: subtract(a, b) returns a - b.
47
- """
48
- And step "design.gate.answer" changes nothing
49
- And step "seam.naive" writes "src/calc.test.ts" with:
50
- """
51
- it("[AC-1] subtracts", () => {})
52
- """
53
- And step "seam.naive" writes "src/calc.ts" with:
54
- """
55
- export const add = (a: number, b: number) => a + b
56
- export const subtract = (a: number, b: number) => a + b
57
- """
58
- And step "seam.check" changes nothing
59
- And step "seam.applying" runs its script
60
- And step "seam.restoring" runs its script
61
-
62
- Scenario: a green naive pass rests at seam.try, applied to the working tree
63
- When the process is driven
64
- Then the process rests at "seam.try"
65
- And the resting step's content contains "try it by hand"
66
- And the resting step's content contains "`.gtd/NAIVE-TEST.md`"
67
- And "src/calc.ts" contains "export const subtract"
68
- And the commit subjects end with:
69
- """
70
- gtd(agent): seam.naive → seam.check
71
- gtd(check): seam.check → seam.applying
72
- gtd(check): seam.applying → seam.try
73
- """
74
-
75
- Scenario: a clean landing signs the pass off, takes it out and lands it as the implementation
76
- When the process is driven
77
- Then the process rests at "seam.try"
78
- When gtd lands
79
- And step "implement.applying" runs its script
80
- And step "implement.health.check" changes nothing
81
- And step "implement.closing" runs its script
82
- And the process is driven
83
- Then the process rests at "build.review.reviewing"
84
- And "src/calc.ts" contains "export const subtract"
85
- And the commit subjects end with:
86
- """
87
- gtd(check): seam.applying → seam.try
88
- gtd(human): seam.try → seam.restoring
89
- gtd(check): seam.restoring → implement.applying
90
- gtd(check): implement.applying → implement.health.check
91
- gtd(check): implement.health.check → implement.closing
92
- gtd(check): implement.closing → build.review.reviewing
93
- """
94
-
95
- Scenario: notes and a code edit send the pass back, out of the tree, to a naive pass that reads both
96
- Given step "seam.naive", when prompted with "> subtract(5, 3) printed 8, not 2.", writes "notes-read.txt" with:
97
- """
98
- read
99
- """
100
- And step "seam.naive", when prompted with "-- . ':(exclude).gtd'", writes "edits-read.txt" with:
101
- """
102
- read
103
- """
104
- When the process is driven
105
- Then the process rests at "seam.try"
106
- Given a file ".gtd/NAIVE-TEST.md" with:
107
- """
108
- subtract(5, 3) printed 8, not 2.
109
- """
110
- And a file "src/calc.ts" with:
111
- """
112
- export const add = (a: number, b: number) => a + b
113
- export const subtract = (a: number, b: number) => a - b
114
- """
115
- And a file "src/hint.ts" with:
116
- """
117
- export const hint = "subtract, not add"
118
- """
119
- When gtd lands
120
- And the process is driven
121
- Then the process rests at "seam.try"
122
- And "src/hint.ts" does not exist
123
- And "notes-read.txt" contains "read"
124
- And "edits-read.txt" contains "read"
125
- And ".gtd/NAIVE-TEST.md" does not exist
126
- And the commit subjects end with:
127
- """
128
- gtd(check): seam.applying → seam.try
129
- gtd(human): seam.try → seam.restoring
130
- gtd(check): seam.restoring → seam.naive
131
- gtd(agent): seam.naive → seam.check
132
- gtd(check): seam.check → seam.applying
133
- gtd(check): seam.applying → seam.try
134
- """
135
-
136
- Scenario: notes alone send the pass back with no edits to read
137
- Given step "seam.naive", when prompted with "They edited the code", writes "edits-read.txt" with:
138
- """
139
- read
140
- """
141
- When the process is driven
142
- Then the process rests at "seam.try"
143
- Given a file ".gtd/NAIVE-TEST.md" with:
144
- """
145
- subtract adds.
146
- """
147
- When gtd lands
148
- And the process is driven
149
- Then the process rests at "seam.try"
150
- And "edits-read.txt" does not exist
151
-
152
- Scenario: a requirements edit at seam.try stays, and sends the pass back
153
- When the process is driven
154
- Then the process rests at "seam.try"
155
- Given a file ".gtd/REQUIREMENTS.md" with:
156
- """
157
- # Requirements
158
-
159
- ## Impact
160
-
161
- - the calculator module
162
-
163
- ## Acceptance Criteria
164
-
165
- - AC-1: subtract(a, b) returns a - b.
166
- - AC-2: subtract(a, b) rejects NaN.
167
- """
168
- When gtd lands
169
- And the process is driven
170
- Then the process rests at "seam.try"
171
- And ".gtd/REQUIREMENTS.md" contains "AC-2: subtract(a, b) rejects NaN."
172
- And the commit subjects end with:
173
- """
174
- gtd(human): seam.try → seam.restoring
175
- gtd(check): seam.restoring → seam.naive
176
- gtd(agent): seam.naive → seam.check
177
- gtd(check): seam.check → seam.applying
178
- gtd(check): seam.applying → seam.try
179
- """
180
-
181
- Rule: with a release flag asked for
182
-
183
- Background:
184
- Given a gtd config with:
185
- """
186
- import { feature } from "@pmelab/gtd/workflows/feature"
187
- export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
188
- export default feature({ naiveTest: true })
189
- """
190
- And an environment variable "GTD_QUALITYREVIEWS" set to ""
191
- And a file "src/calc.ts" with:
192
- """
193
- export const add = (a: number, b: number) => a + b
194
- """
195
- And the working tree is committed as "feat: add calculator"
196
- And a file "TODO.md" with:
197
- """
198
- # Add subtract
199
-
200
- subtract(a, b) returns the difference.
201
- """
202
- And step "unwind" changes nothing
203
- And step "start-gate.check" changes nothing
204
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
205
- """
206
- # Requirements
207
-
208
- ## Impact
209
-
210
- - the calculator module
211
-
212
- ## Release Flag
213
-
214
- new
215
-
216
- ## Acceptance Criteria
217
-
218
- - AC-1: subtract(a, b) returns a - b.
219
- """
220
- And step "design.gate.answer" changes nothing
221
- And step "seam.naive" writes "src/calc.test.ts" with:
222
- """
223
- it("[AC-1] subtracts", () => {})
224
- """
225
- And step "seam.naive" writes "src/calc.ts" with:
226
- """
227
- export const add = (a: number, b: number) => a + b
228
- export const subtract = (a: number, b: number) => a + b
229
- """
230
- And step "seam.check" changes nothing
231
- And step "seam.applying" runs its script
232
- And step "seam.restoring" runs its script
233
-
234
- Scenario: the person tries the pass before the seam judge rules
235
- When the process is driven
236
- Then the process rests at "seam.try"
237
- And the resting step's content contains "the seam judge rules on its shape"
238
- When gtd lands
239
- And the process is driven
240
- Then the process rests at "seam.judge"
241
-
242
- Rule: with a naiveTest that is neither true nor false
243
-
244
- Background:
245
- Given an environment variable "GTD_NAIVETEST" set to "maybe"
246
- And a gtd config with:
247
- """
248
- import { feature } from "@pmelab/gtd/workflows/feature"
249
- export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
250
- export default feature()
251
- """
252
- And a file "src/calc.ts" with:
253
- """
254
- export const add = (a: number, b: number) => a + b
255
- """
256
- And the working tree is committed as "feat: add calculator"
257
- And a file "TODO.md" with:
258
- """
259
- # Add subtract
260
- """
261
-
262
- Scenario: the landing that would pin it is refused
263
- Then driving the process is refused with "naiveTest must be"
@@ -1,93 +0,0 @@
1
- # One SDLC path per file, so a changed path reds exactly one fixture — do not merge.
2
- @inmem
3
- Feature: a naive pass the judge rules land is itself the implementation
4
-
5
- With GTD_FLAG_RISK_TIER off, a naive pass that
6
- edits an existing source file is judged land: the process skips the approval
7
- gate and any refactor, applies the kept pass as it is — no build turn — and
8
- runs the health loop and quality lap to the feature review. The flag is pinned here so the per-flag test runs never
9
- move it off this path.
10
-
11
- Background:
12
- Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
14
- And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
15
- And a file "src/greeting.ts" with:
16
- """
17
- export const greeting = "Helo, world"
18
- """
19
- And the working tree is committed as "feat: add greeting"
20
- And a file "TODO.md" with:
21
- """
22
- # Fix the typo
23
-
24
- greeting says "Helo"; make it "Hello".
25
- """
26
- And step "unwind" changes nothing
27
- And step "start-gate.check" changes nothing
28
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
29
- """
30
- # Requirements
31
-
32
- ## Concerns
33
-
34
- ### Typo
35
-
36
- - greeting reads "Hello, world".
37
-
38
- ## Impact
39
-
40
- - the greeting module
41
-
42
- ## Release Flag
43
-
44
- new
45
-
46
- ## Acceptance Criteria
47
-
48
- - AC-1: the change behaves as described.
49
- """
50
- And step "design.gate.answer" changes nothing
51
- And step "seam.check" changes nothing
52
- And step "seam.naive" writes "src/acceptance.test.ts" with:
53
- """
54
- it("[AC-1] holds", () => {})
55
- """
56
- And step "seam.naive" writes "src/greeting.ts" with:
57
- """
58
- export const greeting = "Hello, world"
59
- """
60
- And judge step "seam.judge" answers:
61
- """
62
- [{"id":"shape","answer":"land","p":0.9}]
63
- """
64
- And step "implement.applying" runs its script
65
- And step "implement.health.check" changes nothing
66
- And step "implement.closing" runs its script
67
- And step "build.quality.correctness.reviewing" changes nothing
68
-
69
- Scenario: a land judgment applies the naive pass and runs from idle to the review gate with no rebuild
70
- When the process is driven
71
- Then the process rests at "build.review.reviewing"
72
- And "src/greeting.ts" contains "Hello, world"
73
- And "src/acceptance.test.ts" contains "[AC-1] holds"
74
- And the commit subjects end with:
75
- """
76
- gtd(human): idle → unwind
77
- gtd(check): unwind → start-gate.check
78
- gtd(check): start-gate.check → design.triage
79
- gtd(agent): design.triage → design.gate.answer
80
- gtd(human): design.gate.answer → seam.naive
81
- gtd(agent): seam.naive → seam.check
82
- gtd(check): seam.check → seam.judge
83
- gtd(judge): seam.judge → implement.applying
84
- gtd(check): implement.applying → implement.health.check
85
- gtd(check): implement.health.check → implement.closing
86
- gtd(check): implement.closing → build.quality.correctness.reviewing
87
- gtd(agent): build.quality.correctness.reviewing → build.review.reviewing
88
- """
89
- And the commit "gtd(human): idle → unwind" has a body containing "Gtd-Var: flag_risk_tier=0"
90
- And the commit "gtd(agent): seam.naive → seam.check" has a body containing "Gtd-Kept:"
91
- And the commit "gtd(judge): seam.judge → implement.applying" has a body containing "\"answer\":\"land\""
92
- And no commit body contains "Gtd-Approved:"
93
- And no commit body contains "Gtd-Workflow:"
@@ -1,41 +0,0 @@
1
- import {
2
- changes,
3
- hasThreadFor,
4
- requireAnswers,
5
- requireReplies,
6
- requireThreadsClosed,
7
- requireProgress,
8
- scope,
9
- } from "../../flows/index.js"
10
- import { REQUIREMENTS } from "../shared/steps.js"
11
- import { requireCriteria, requireImpact } from "./criteria.js"
12
- import { requireReleaseFlag } from "./release-flag.js"
13
- import { answerProductQuestions, triage } from "./steps.js"
14
-
15
- /**
16
- * Always stop for the human. Resolves `true` when the round changed anything
17
- * (the author revises), `false` on a clean re-run. Open threads refuse every
18
- * landing; unticked questions only refuse a round with no thread for the
19
- * agent to answer.
20
- */
21
- const noteGate = async (file: string, answer: () => Promise<void>): Promise<boolean> => {
22
- await answer()
23
- requireThreadsClosed(file)
24
- if (changes().length === 0) return false
25
- if (!hasThreadFor("agent", file)) requireAnswers(file)
26
- return true
27
- }
28
-
29
- /** Triage the sketch since `base` into requirements, until no product question is open; `guard` holds every round's criteria. */
30
- export const design = (base: string, guard?: () => void): Promise<void> =>
31
- scope("design", async () => {
32
- do {
33
- await triage(base)
34
- requireProgress(REQUIREMENTS)
35
- requireReplies(REQUIREMENTS)
36
- requireCriteria(REQUIREMENTS)
37
- requireImpact(REQUIREMENTS)
38
- requireReleaseFlag(REQUIREMENTS)
39
- guard?.()
40
- } while (await noteGate(REQUIREMENTS, answerProductQuestions))
41
- })
@@ -1,131 +0,0 @@
1
- # One SDLC path per file, so a changed path reds exactly one fixture — do not merge.
2
- @inmem
3
- Feature: a refactor that carried the whole feature still gets a quality lap over all of it
4
-
5
- With GTD_FLAG_RISK_TIER off, a refactor-first
6
- refactor can land everything the requirements ask for. The feature's
7
- implement turn then has only the naive pass's acceptance tests to carry
8
- over, and with no code but tests changed since the refactor the feature's
9
- quality lap covers the whole change, refactor included.
10
-
11
- Background:
12
- Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
14
- And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
15
- And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
16
- And a file "src/calc.ts" with:
17
- """
18
- export const add = (a: number, b: number) => a + b
19
- """
20
- And the working tree is committed as "feat: add calculator"
21
- And a file "TODO.md" with:
22
- """
23
- # Add subtract
24
-
25
- subtract(a, b) returns the difference.
26
- """
27
- And step "unwind" changes nothing
28
- And step "start-gate.check" changes nothing
29
- And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
30
- """
31
- # Requirements
32
-
33
- ## Concerns
34
-
35
- ### Subtract
36
-
37
- - `subtract(a, b)` returns `a - b`.
38
-
39
- ## Impact
40
-
41
- - the greeting module
42
-
43
- ## Release Flag
44
-
45
- new
46
-
47
- ## Acceptance Criteria
48
-
49
- - AC-1: the change behaves as described.
50
- """
51
- And step "design.gate.answer" changes nothing
52
-
53
- Scenario: a tests-only implement turn after a refactor that did it all reaches the quality lap and the review
54
- Given step "seam.check" changes nothing
55
- And step "seam.naive" writes "src/acceptance.test.ts" with:
56
- """
57
- it("[AC-1] holds", () => {})
58
- """
59
- And step "seam.naive" writes "src/calc.ts" with:
60
- """
61
- export const add = (a: number, b: number) => a + b
62
- export const subtract = (a: number, b: number) => a - b
63
- """
64
- And judge step "seam.judge" answers:
65
- """
66
- [{"id":"shape","answer":"refactor-first","p":0.9}]
67
- """
68
- And step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
69
- """
70
- Seam: the existing code the strays touch.
71
- """
72
- And step "refactor.deriving" runs its script
73
- And step "refactor.building" writes "src/calc.ts" with:
74
- """
75
- export const add = (a: number, b: number) => a + b
76
- export const subtract = (a: number, b: number) => a - b
77
- """
78
- And step "refactor.health.check" changes nothing
79
- And step "refactor.closing" runs its script
80
- And step "refactor.build.review.carrying" runs its script
81
- And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
82
- """
83
- # Review: abc1234
84
-
85
- <!-- base: 0000000 -->
86
-
87
- ## calc
88
-
89
- - [ ] ./src/calc.ts#1-2
90
- subtract next to add
91
- """
92
- And step "refactor.build.review.closing" runs its script
93
- When the process is driven
94
- Then the process rests at "refactor.build.review.await-review"
95
-
96
- Given a file ".gtd/REVIEW.md" with:
97
- """
98
- # Review: abc1234
99
-
100
- <!-- base: 0000000 -->
101
-
102
- ## calc
103
-
104
- - [x] ./src/calc.ts#1-2
105
- subtract next to add
106
- """
107
- And step "implement.building" writes "src/acceptance.test.ts" with:
108
- """
109
- it("[AC-1] holds", () => {})
110
- """
111
- And step "implement.health.check" changes nothing
112
- And step "implement.closing" runs its script
113
- When gtd lands
114
- And the process is driven
115
- Then the process rests at "build.quality.correctness.reviewing"
116
- And the resting step's content contains the hash of the commit "feat: add calculator"
117
- And ".gtd/REQUIREMENTS.md" does not exist
118
-
119
- Given step "build.quality.correctness.reviewing" changes nothing
120
- When the process is driven
121
- Then the process rests at "build.review.reviewing"
122
- And "src/calc.ts" contains "subtract"
123
- And the commit subjects end with:
124
- """
125
- gtd(human): refactor.build.review.await-review → refactor.build.review.closing
126
- gtd(check): refactor.build.review.closing → implement.building
127
- gtd(agent): implement.building → implement.health.check
128
- gtd(check): implement.health.check → implement.closing
129
- gtd(check): implement.closing → build.quality.correctness.reviewing
130
- gtd(agent): build.quality.correctness.reviewing → build.review.reviewing
131
- """