@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
@@ -0,0 +1,258 @@
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, or straight to the implementation with `flagMode` off. Notes in
8
+ `.gtd/NAIVE-TEST.md`, a code edit or a requirements edit send it back: the
9
+ pass and the person's code edits leave the tree again, and the next naive
10
+ pass gets the notes and the edits. Every lap ends at the gate again.
11
+
12
+ Rule: with flagMode off
13
+
14
+ Background:
15
+ Given a gtd config with:
16
+ """
17
+ import { feature } from "@pmelab/gtd/workflows/feature"
18
+ export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
19
+ export default feature({ flagMode: false, naiveTest: true })
20
+ """
21
+ And an environment variable "GTD_QUALITYREVIEWS" set to ""
22
+ And a file "src/calc.ts" with:
23
+ """
24
+ export const add = (a: number, b: number) => a + b
25
+ """
26
+ And the working tree is committed as "feat: add calculator"
27
+ And a file "TODO.md" with:
28
+ """
29
+ # Add subtract
30
+
31
+ subtract(a, b) returns the difference.
32
+ """
33
+ And step "unwind" changes nothing
34
+ And step "start-gate.check" changes nothing
35
+ And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
36
+ """
37
+ # Requirements
38
+
39
+ ## Impact
40
+
41
+ - the calculator module
42
+
43
+ ## Acceptance Criteria
44
+
45
+ - AC-1: subtract(a, b) returns a - b.
46
+ """
47
+ And step "design.gate.answer" changes nothing
48
+ And step "seam.naive" writes "src/calc.test.ts" with:
49
+ """
50
+ it("[AC-1] subtracts", () => {})
51
+ """
52
+ And step "seam.naive" writes "src/calc.ts" with:
53
+ """
54
+ export const add = (a: number, b: number) => a + b
55
+ export const subtract = (a: number, b: number) => a + b
56
+ """
57
+ And step "seam.check" changes nothing
58
+ And step "seam.applying" runs its script
59
+ And step "seam.restoring" runs its script
60
+
61
+ Scenario: a green naive pass rests at seam.try, applied to the working tree
62
+ When the process is driven
63
+ Then the process rests at "seam.try"
64
+ And the resting step's content contains "try it by hand"
65
+ And the resting step's content contains "`.gtd/NAIVE-TEST.md`"
66
+ And "src/calc.ts" contains "export const subtract"
67
+ And the commit subjects end with:
68
+ """
69
+ gtd(agent): seam.naive → seam.check
70
+ gtd(check): seam.check → seam.applying
71
+ gtd(check): seam.applying → seam.try
72
+ """
73
+
74
+ Scenario: a clean landing signs the pass off, takes it out and lands it as the implementation
75
+ When the process is driven
76
+ Then the process rests at "seam.try"
77
+ When gtd lands
78
+ And step "implement.applying" runs its script
79
+ And step "implement.health.check" changes nothing
80
+ And step "implement.closing" runs its script
81
+ And the process is driven
82
+ Then the process rests at "build.review.reviewing"
83
+ And "src/calc.ts" contains "export const subtract"
84
+ And the commit subjects end with:
85
+ """
86
+ gtd(check): seam.applying → seam.try
87
+ gtd(human): seam.try → seam.restoring
88
+ gtd(check): seam.restoring → implement.applying
89
+ gtd(check): implement.applying → implement.health.check
90
+ gtd(check): implement.health.check → implement.closing
91
+ gtd(check): implement.closing → build.review.reviewing
92
+ """
93
+
94
+ Scenario: notes and a code edit send the pass back, out of the tree, to a naive pass that reads both
95
+ Given step "seam.naive", when prompted with "> subtract(5, 3) printed 8, not 2.", writes "notes-read.txt" with:
96
+ """
97
+ read
98
+ """
99
+ And step "seam.naive", when prompted with "-- . ':(exclude).gtd'", writes "edits-read.txt" with:
100
+ """
101
+ read
102
+ """
103
+ When the process is driven
104
+ Then the process rests at "seam.try"
105
+ Given a file ".gtd/NAIVE-TEST.md" with:
106
+ """
107
+ subtract(5, 3) printed 8, not 2.
108
+ """
109
+ And a file "src/calc.ts" with:
110
+ """
111
+ export const add = (a: number, b: number) => a + b
112
+ export const subtract = (a: number, b: number) => a - b
113
+ """
114
+ And a file "src/hint.ts" with:
115
+ """
116
+ export const hint = "subtract, not add"
117
+ """
118
+ When gtd lands
119
+ And the process is driven
120
+ Then the process rests at "seam.try"
121
+ And "src/hint.ts" does not exist
122
+ And "notes-read.txt" contains "read"
123
+ And "edits-read.txt" contains "read"
124
+ And ".gtd/NAIVE-TEST.md" does not exist
125
+ And the commit subjects end with:
126
+ """
127
+ gtd(check): seam.applying → seam.try
128
+ gtd(human): seam.try → seam.restoring
129
+ gtd(check): seam.restoring → seam.naive
130
+ gtd(agent): seam.naive → seam.check
131
+ gtd(check): seam.check → seam.applying
132
+ gtd(check): seam.applying → seam.try
133
+ """
134
+
135
+ Scenario: notes alone send the pass back with no edits to read
136
+ Given step "seam.naive", when prompted with "They edited the code", writes "edits-read.txt" with:
137
+ """
138
+ read
139
+ """
140
+ When the process is driven
141
+ Then the process rests at "seam.try"
142
+ Given a file ".gtd/NAIVE-TEST.md" with:
143
+ """
144
+ subtract adds.
145
+ """
146
+ When gtd lands
147
+ And the process is driven
148
+ Then the process rests at "seam.try"
149
+ And "edits-read.txt" does not exist
150
+
151
+ Scenario: a requirements edit at seam.try stays, and sends the pass back
152
+ When the process is driven
153
+ Then the process rests at "seam.try"
154
+ Given a file ".gtd/REQUIREMENTS.md" with:
155
+ """
156
+ # Requirements
157
+
158
+ ## Impact
159
+
160
+ - the calculator module
161
+
162
+ ## Acceptance Criteria
163
+
164
+ - AC-1: subtract(a, b) returns a - b.
165
+ - AC-2: subtract(a, b) rejects NaN.
166
+ """
167
+ When gtd lands
168
+ And the process is driven
169
+ Then the process rests at "seam.try"
170
+ And ".gtd/REQUIREMENTS.md" contains "AC-2: subtract(a, b) rejects NaN."
171
+ And the commit subjects end with:
172
+ """
173
+ gtd(human): seam.try → seam.restoring
174
+ gtd(check): seam.restoring → seam.naive
175
+ gtd(agent): seam.naive → seam.check
176
+ gtd(check): seam.check → seam.applying
177
+ gtd(check): seam.applying → seam.try
178
+ """
179
+
180
+ Rule: with flagMode on
181
+
182
+ Background:
183
+ Given a gtd config with:
184
+ """
185
+ import { feature } from "@pmelab/gtd/workflows/feature"
186
+ export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
187
+ export default feature({ naiveTest: true })
188
+ """
189
+ And an environment variable "GTD_QUALITYREVIEWS" set to ""
190
+ And a file "src/calc.ts" with:
191
+ """
192
+ export const add = (a: number, b: number) => a + b
193
+ """
194
+ And the working tree is committed as "feat: add calculator"
195
+ And a file "TODO.md" with:
196
+ """
197
+ # Add subtract
198
+
199
+ subtract(a, b) returns the difference.
200
+ """
201
+ And step "unwind" changes nothing
202
+ And step "start-gate.check" changes nothing
203
+ And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
204
+ """
205
+ # Requirements
206
+
207
+ ## Impact
208
+
209
+ - the calculator module
210
+
211
+ ## Acceptance Criteria
212
+
213
+ - AC-1: subtract(a, b) returns a - b.
214
+ """
215
+ And step "design.gate.answer" changes nothing
216
+ And step "seam.naive" writes "src/calc.test.ts" with:
217
+ """
218
+ it("[AC-1] subtracts", () => {})
219
+ """
220
+ And step "seam.naive" writes "src/calc.ts" with:
221
+ """
222
+ export const add = (a: number, b: number) => a + b
223
+ export const subtract = (a: number, b: number) => a + b
224
+ """
225
+ And step "seam.check" changes nothing
226
+ And step "seam.applying" runs its script
227
+ And step "seam.restoring" runs its script
228
+
229
+ Scenario: with flagMode on the person tries the pass before the seam judge rules
230
+ When the process is driven
231
+ Then the process rests at "seam.try"
232
+ And the resting step's content contains "the seam judge rules on its shape"
233
+ When gtd lands
234
+ And the process is driven
235
+ Then the process rests at "seam.judge"
236
+
237
+ Rule: with a naiveTest that is neither true nor false
238
+
239
+ Background:
240
+ Given an environment variable "GTD_NAIVETEST" set to "maybe"
241
+ And a gtd config with:
242
+ """
243
+ import { feature } from "@pmelab/gtd/workflows/feature"
244
+ export { summary, steering, skills, access } from "@pmelab/gtd/workflows/feature"
245
+ export default feature()
246
+ """
247
+ And a file "src/calc.ts" with:
248
+ """
249
+ export const add = (a: number, b: number) => a + b
250
+ """
251
+ And the working tree is committed as "feat: add calculator"
252
+ And a file "TODO.md" with:
253
+ """
254
+ # Add subtract
255
+ """
256
+
257
+ Scenario: the landing that would pin it is refused
258
+ Then driving the process is refused with "naiveTest must be"
@@ -10,7 +10,6 @@ Feature: a naive pass the judge rules land is itself the implementation
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
14
13
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
15
14
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
16
15
  And a file "src/greeting.ts" with:
@@ -10,7 +10,6 @@ Feature: a refactor that carried the whole feature still gets a quality lap over
10
10
 
11
11
  Background:
12
12
  Given the shipped workflows, as gtd install scaffolds them
13
- And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
14
13
  And an environment variable "GTD_QUALITYREVIEWS" set to "correctness"
15
14
  And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
16
15
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
@@ -74,10 +73,6 @@ Feature: a refactor that carried the whole feature still gets a quality lap over
74
73
  """
75
74
  And step "refactor.health.check" changes nothing
76
75
  And step "refactor.closing" runs its script
77
- And judge step "refactor.build.review.ranking" answers:
78
- """
79
- []
80
- """
81
76
  And step "refactor.build.review.carrying" runs its script
82
77
  And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
83
78
  """
@@ -100,9 +95,7 @@ Feature: a refactor that carried the whole feature still gets a quality lap over
100
95
 
101
96
  <!-- base: 0000000 -->
102
97
 
103
- ## Walkthrough
104
-
105
- ### calc
98
+ ## calc
106
99
 
107
100
  - [x] ./src/calc.ts#1-2
108
101
  subtract next to add
@@ -9,7 +9,6 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
9
9
 
10
10
  Background:
11
11
  Given the shipped workflows, as gtd install scaffolds them
12
- And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
13
12
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
14
13
  And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
15
14
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
@@ -77,10 +76,6 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
77
76
  """
78
77
  And step "refactor.health.check" changes nothing
79
78
  And step "refactor.closing" runs its script
80
- And judge step "refactor.build.review.ranking" answers:
81
- """
82
- []
83
- """
84
79
  And step "refactor.build.review.carrying" runs its script
85
80
  And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
86
81
  """
@@ -104,9 +99,7 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
104
99
 
105
100
  <!-- base: 0000000 -->
106
101
 
107
- ## Walkthrough
108
-
109
- ### calc
102
+ ## calc
110
103
 
111
104
  - [x] ./src/calc.ts#1-2
112
105
  add built on the shared op
@@ -147,9 +140,7 @@ Feature: a refactor-first judgment walks one fixed path to the review gate
147
140
  gtd(agent): refactor.building → refactor.health.check
148
141
  gtd(check): refactor.health.check → refactor.closing
149
142
  gtd(check): refactor.closing → refactor.build.review.reviewing
150
- gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
151
- gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
152
- gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
143
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.await-review
153
144
  gtd(human): refactor.build.review.await-review → refactor.build.review.closing
154
145
  gtd(check): refactor.build.review.closing → implement.building
155
146
  gtd(agent): implement.building → implement.health.check
@@ -11,7 +11,6 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
11
11
 
12
12
  Background:
13
13
  Given the shipped workflows, as gtd install scaffolds them
14
- And an environment variable "GTD_PROTOTYPEROUNDS" set to "0"
15
14
  And an environment variable "GTD_QUALITYREVIEWS" set to ""
16
15
  And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
17
16
  And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
@@ -98,10 +97,6 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
98
97
  """
99
98
  And step "refactor.health.check" changes nothing
100
99
  And step "refactor.closing" runs its script
101
- And judge step "refactor.build.review.ranking" answers:
102
- """
103
- []
104
- """
105
100
  And step "refactor.build.review.carrying" runs its script
106
101
  And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
107
102
  """
@@ -124,9 +119,7 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
124
119
 
125
120
  <!-- base: 0000000 -->
126
121
 
127
- ## Walkthrough
128
-
129
- ### calc
122
+ ## calc
130
123
 
131
124
  - [x] ./src/calc.ts#1-2
132
125
  add built on the shared op
@@ -170,10 +163,6 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
170
163
  """
171
164
  And step "refactor.health.check" changes nothing
172
165
  And step "refactor.closing" runs its script
173
- And judge step "refactor.build.review.ranking" answers:
174
- """
175
- []
176
- """
177
166
  And step "refactor.build.review.carrying" runs its script
178
167
  And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
179
168
  """
@@ -196,9 +185,7 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
196
185
 
197
186
  <!-- base: 0000000 -->
198
187
 
199
- ## Walkthrough
200
-
201
- ### calc
188
+ ## calc
202
189
 
203
190
  - [x] ./src/calc.ts#1-2
204
191
  add built on the shared op
@@ -222,10 +209,6 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
222
209
  """
223
210
  And step "refactor.health.check" changes nothing
224
211
  And step "refactor.closing" runs its script
225
- And judge step "refactor.build.review.ranking" answers:
226
- """
227
- []
228
- """
229
212
  And step "refactor.build.review.carrying" runs its script
230
213
  And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
231
214
  """
@@ -248,9 +231,7 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
248
231
 
249
232
  <!-- base: 0000000 -->
250
233
 
251
- ## Walkthrough
252
-
253
- ### calc
234
+ ## calc
254
235
 
255
236
  - [x] ./src/calc.ts#1-2
256
237
  add built on the shared op
@@ -279,9 +260,7 @@ Feature: refactor-first writes a refactor note, refactors on its own, then rebui
279
260
  gtd(agent): refactor.building → refactor.health.check
280
261
  gtd(check): refactor.health.check → refactor.closing
281
262
  gtd(check): refactor.closing → refactor.build.review.reviewing
282
- gtd(agent): refactor.build.review.reviewing → refactor.build.review.ranking
283
- gtd(judge): refactor.build.review.ranking → refactor.build.review.carrying
284
- gtd(check): refactor.build.review.carrying → refactor.build.review.await-review
263
+ gtd(agent): refactor.build.review.reviewing → refactor.build.review.await-review
285
264
  gtd(human): refactor.build.review.await-review → refactor.build.review.closing
286
265
  gtd(check): refactor.build.review.closing → implement.building
287
266
  gtd(agent): implement.building → implement.health.check