@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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +115 -390
- package/dist/chunks/{Schema-B3o6eRNU.mjs → testkit-CMBAAyRK.mjs} +13409 -3351
- package/dist/gtd.bundle.mjs +76 -59
- package/dist/testkit/gherkin.mjs +1 -1
- package/dist/testkit.mjs +1 -1
- package/package.json +3 -42
- package/skills/authoring/SKILL.md +31 -25
- package/src/cli/Cli.test.ts +15 -19
- package/src/cli/Cli.ts +2 -4
- package/src/cli/Program.test.ts +60 -29
- package/src/cli/Program.ts +5 -7
- package/src/edge/Edge.ts +3 -3
- package/src/flags/index.test.ts +0 -13
- package/src/flags/index.ts +1 -3
- package/src/install/Install.test.ts +14 -11
- package/src/install/Install.ts +38 -15
- package/src/install/index.ts +1 -2
- package/src/replay/Replay.test.ts +1 -1
- package/src/replay/index.ts +1 -1
- package/src/step/planStart.ts +6 -1
- package/src/twins/FlowScripts.ts +1 -1
- package/src/workflow/index.ts +1 -0
- package/src/workflow/load.test.ts +138 -113
- package/src/workflow/load.ts +1 -1
- package/src/workflow/vars.test.ts +30 -3
- package/src/workflow/vars.ts +34 -2
- package/src/workflow-kit/index.ts +1 -1
- package/dist/chunks/reserved-lMYCaapY.mjs +0 -1990
- package/dist/chunks/review-Bfaror38.mjs +0 -427
- package/dist/chunks/tail-Bd7L940p.mjs +0 -355
- package/dist/chunks/testkit-JDtpNKyi.mjs +0 -10410
- package/dist/workflows/cleanup.mjs +0 -36
- package/dist/workflows/feature.mjs +0 -1018
- package/dist/workflows/fix.mjs +0 -41
- package/dist/workflows/review.mjs +0 -45
- package/dist/workflows/rollout.mjs +0 -48
- package/dist/workflows.mjs +0 -40651
- package/src/install/ConfigScaffold.ts +0 -22
- package/src/workflows/cleanup/cleanup-path.feature +0 -94
- package/src/workflows/cleanup/cleanup.feature +0 -315
- package/src/workflows/cleanup/cleanup.test.ts +0 -276
- package/src/workflows/cleanup/cleanup.ts +0 -52
- package/src/workflows/cleanup/index.ts +0 -6
- package/src/workflows/feature/acceptance-criteria-tier.feature +0 -25
- package/src/workflows/feature/acceptance-criteria.feature +0 -389
- package/src/workflows/feature/criteria-coverage.feature +0 -102
- package/src/workflows/feature/criteria.test.ts +0 -147
- package/src/workflows/feature/criteria.ts +0 -267
- package/src/workflows/feature/fast-path.feature +0 -93
- package/src/workflows/feature/feature.test.ts +0 -338
- package/src/workflows/feature/feature.ts +0 -156
- package/src/workflows/feature/green.ts +0 -19
- package/src/workflows/feature/index.ts +0 -18
- package/src/workflows/feature/lens-models.feature +0 -69
- package/src/workflows/feature/lens-review.feature +0 -566
- package/src/workflows/feature/naive-acceptance.feature +0 -147
- package/src/workflows/feature/naive-test.feature +0 -263
- package/src/workflows/feature/one-step-land.feature +0 -93
- package/src/workflows/feature/planning.ts +0 -41
- package/src/workflows/feature/refactor-absorbs.feature +0 -131
- package/src/workflows/feature/refactor-first.feature +0 -158
- package/src/workflows/feature/refactor-lens-models.feature +0 -79
- package/src/workflows/feature/refactor-rebuild.feature +0 -273
- package/src/workflows/feature/refactor-review.feature +0 -1528
- package/src/workflows/feature/refactor.test.ts +0 -1220
- package/src/workflows/feature/refactor.ts +0 -368
- package/src/workflows/feature/release-flag.feature +0 -167
- package/src/workflows/feature/release-flag.test.ts +0 -49
- package/src/workflows/feature/release-flag.ts +0 -46
- package/src/workflows/feature/review-gate.feature +0 -241
- package/src/workflows/feature/reviewer-walkthrough.feature +0 -142
- package/src/workflows/feature/risk-tier.feature +0 -351
- package/src/workflows/feature/seam-rejection.feature +0 -146
- package/src/workflows/feature/seam.feature +0 -297
- package/src/workflows/feature/seam.test.ts +0 -527
- package/src/workflows/feature/seam.ts +0 -426
- package/src/workflows/feature/standards.feature +0 -354
- package/src/workflows/feature/steps.test.ts +0 -65
- package/src/workflows/feature/steps.ts +0 -45
- package/src/workflows/feature/tier-pin.feature +0 -66
- package/src/workflows/feature/tier.test.ts +0 -166
- package/src/workflows/feature/tier.ts +0 -56
- package/src/workflows/fix/fix-lens-origin.feature +0 -114
- package/src/workflows/fix/fix-quality.feature +0 -212
- package/src/workflows/fix/fix.feature +0 -79
- package/src/workflows/fix/fix.test.ts +0 -74
- package/src/workflows/fix/fix.ts +0 -52
- package/src/workflows/fix/index.ts +0 -6
- package/src/workflows/index.ts +0 -47
- package/src/workflows/review/index.ts +0 -6
- package/src/workflows/review/review-door.feature +0 -199
- package/src/workflows/review/review.test.ts +0 -27
- package/src/workflows/review/review.ts +0 -60
- package/src/workflows/rollout/index.ts +0 -6
- package/src/workflows/rollout/rollout.feature +0 -510
- package/src/workflows/rollout/rollout.test.ts +0 -263
- package/src/workflows/rollout/rollout.ts +0 -82
- package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +0 -98
- package/src/workflows/shared/access.test.ts +0 -62
- package/src/workflows/shared/access.ts +0 -24
- package/src/workflows/shared/config.fixture.ts +0 -12
- package/src/workflows/shared/fences.ts +0 -24
- package/src/workflows/shared/health.test.ts +0 -148
- package/src/workflows/shared/health.ts +0 -191
- package/src/workflows/shared/learn.test.ts +0 -140
- package/src/workflows/shared/learn.ts +0 -201
- package/src/workflows/shared/lenses.test.ts +0 -39
- package/src/workflows/shared/lenses.ts +0 -294
- package/src/workflows/shared/options.test.ts +0 -157
- package/src/workflows/shared/options.ts +0 -92
- package/src/workflows/shared/progress.feature +0 -124
- package/src/workflows/shared/prose.ts +0 -263
- package/src/workflows/shared/recheck.feature +0 -60
- package/src/workflows/shared/registry.test.ts +0 -345
- package/src/workflows/shared/registry.ts +0 -183
- package/src/workflows/shared/reserved.ts +0 -11
- package/src/workflows/shared/review.test.ts +0 -1062
- package/src/workflows/shared/review.ts +0 -446
- package/src/workflows/shared/skills.test.ts +0 -121
- package/src/workflows/shared/skills.ts +0 -49
- package/src/workflows/shared/standards.test.ts +0 -90
- package/src/workflows/shared/standards.ts +0 -156
- package/src/workflows/shared/steps.test.ts +0 -219
- package/src/workflows/shared/steps.ts +0 -201
- package/src/workflows/shared/tail.test.ts +0 -454
- package/src/workflows/shared/tail.ts +0 -264
- package/src/workflows/shared/text.fixture.ts +0 -128
- package/src/workflows/shared/text.test.ts +0 -1430
- package/src/workflows/shared/text.ts +0 -1700
- package/src/workflows/shared/threads.test.ts +0 -129
- package/src/workflows/shared/vars.ts +0 -47
- package/src/workflows/shared/workflows.steps.ts +0 -54
|
@@ -1,158 +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-first judgment walks one fixed path to the review gate
|
|
4
|
-
|
|
5
|
-
With GTD_FLAG_RISK_TIER off, a naive pass touching
|
|
6
|
-
an existing non-allowlisted file is ruled refactor-first, is refactored and
|
|
7
|
-
that refactor reviewed, and only then implemented and brought to the feature review. The flags are
|
|
8
|
-
pinned so the per-flag test runs never move it off its path.
|
|
9
|
-
|
|
10
|
-
Background:
|
|
11
|
-
Given the shipped workflows, as gtd install scaffolds them
|
|
12
|
-
And an environment variable "GTD_QUALITYREVIEWS" set to ""
|
|
13
|
-
And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
|
|
14
|
-
And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
|
|
15
|
-
And a file "src/calc.ts" with:
|
|
16
|
-
"""
|
|
17
|
-
export const add = (a: number, b: number) => a + b
|
|
18
|
-
"""
|
|
19
|
-
And the working tree is committed as "feat: add calculator"
|
|
20
|
-
And a file "TODO.md" with:
|
|
21
|
-
"""
|
|
22
|
-
# Add subtract
|
|
23
|
-
|
|
24
|
-
subtract(a, b) returns the difference.
|
|
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
|
-
### Subtract
|
|
35
|
-
|
|
36
|
-
- `subtract(a, b)` returns `a - b`.
|
|
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
|
-
|
|
52
|
-
Scenario: a refactor-first judgment runs refactor, its review, implement and the quality lap to the feature review
|
|
53
|
-
Given step "seam.check" changes nothing
|
|
54
|
-
And step "seam.naive" writes "src/acceptance.test.ts" with:
|
|
55
|
-
"""
|
|
56
|
-
it("[AC-1] holds", () => {})
|
|
57
|
-
"""
|
|
58
|
-
And step "seam.naive" writes "src/calc.ts" with:
|
|
59
|
-
"""
|
|
60
|
-
export const add = (a: number, b: number) => a + b
|
|
61
|
-
export const subtract = (a: number, b: number) => a - b
|
|
62
|
-
"""
|
|
63
|
-
And judge step "seam.judge" answers:
|
|
64
|
-
"""
|
|
65
|
-
[{"id":"shape","answer":"refactor-first","p":0.9}]
|
|
66
|
-
"""
|
|
67
|
-
And step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
|
|
68
|
-
"""
|
|
69
|
-
Seam: the existing code the strays touch.
|
|
70
|
-
"""
|
|
71
|
-
And step "refactor.deriving" runs its script
|
|
72
|
-
When the process is driven
|
|
73
|
-
Then the process rests at "refactor.building"
|
|
74
|
-
And ".gtd/REFACTOR.md" contains "calc.ts`"
|
|
75
|
-
|
|
76
|
-
Given step "refactor.building" writes "src/calc.ts" with:
|
|
77
|
-
"""
|
|
78
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
79
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
80
|
-
"""
|
|
81
|
-
And step "refactor.health.check" changes nothing
|
|
82
|
-
And step "refactor.closing" runs its script
|
|
83
|
-
And step "refactor.build.review.carrying" runs its script
|
|
84
|
-
And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
|
|
85
|
-
"""
|
|
86
|
-
# Review: abc1234
|
|
87
|
-
|
|
88
|
-
<!-- base: 0000000 -->
|
|
89
|
-
|
|
90
|
-
## calc
|
|
91
|
-
|
|
92
|
-
- [ ] ./src/calc.ts#1-2
|
|
93
|
-
add built on the shared op
|
|
94
|
-
"""
|
|
95
|
-
And step "refactor.build.review.closing" runs its script
|
|
96
|
-
When the process is driven
|
|
97
|
-
Then the process rests at "refactor.build.review.await-review"
|
|
98
|
-
And ".gtd/REFACTOR.md" does not exist
|
|
99
|
-
|
|
100
|
-
Given a file ".gtd/REVIEW.md" with:
|
|
101
|
-
"""
|
|
102
|
-
# Review: abc1234
|
|
103
|
-
|
|
104
|
-
<!-- base: 0000000 -->
|
|
105
|
-
|
|
106
|
-
## calc
|
|
107
|
-
|
|
108
|
-
- [x] ./src/calc.ts#1-2
|
|
109
|
-
add built on the shared op
|
|
110
|
-
"""
|
|
111
|
-
When gtd lands
|
|
112
|
-
And the process is driven
|
|
113
|
-
Then the process rests at "implement.building"
|
|
114
|
-
And "src/calc.ts" contains "op(a, b, 1)"
|
|
115
|
-
|
|
116
|
-
Given step "implement.building" writes "src/calc.ts" with:
|
|
117
|
-
"""
|
|
118
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
119
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
120
|
-
export const subtract = (a: number, b: number) => op(a, b, -1)
|
|
121
|
-
"""
|
|
122
|
-
And step "implement.building" writes "src/acceptance.test.ts" with:
|
|
123
|
-
"""
|
|
124
|
-
it("[AC-1] holds", () => {})
|
|
125
|
-
"""
|
|
126
|
-
And step "implement.health.check" changes nothing
|
|
127
|
-
And step "implement.closing" runs its script
|
|
128
|
-
When the process is driven
|
|
129
|
-
Then the process rests at "build.review.reviewing"
|
|
130
|
-
And "src/calc.ts" contains "op(a, b, 1)"
|
|
131
|
-
And "src/calc.ts" contains "subtract"
|
|
132
|
-
And the commit subjects end with:
|
|
133
|
-
"""
|
|
134
|
-
gtd(human): idle → unwind
|
|
135
|
-
gtd(check): unwind → start-gate.check
|
|
136
|
-
gtd(check): start-gate.check → design.triage
|
|
137
|
-
gtd(agent): design.triage → design.gate.answer
|
|
138
|
-
gtd(human): design.gate.answer → seam.naive
|
|
139
|
-
gtd(agent): seam.naive → seam.check
|
|
140
|
-
gtd(check): seam.check → seam.judge
|
|
141
|
-
gtd(judge): seam.judge → seam.note
|
|
142
|
-
gtd(agent): seam.note → refactor.deriving
|
|
143
|
-
gtd(check): refactor.deriving → refactor.building
|
|
144
|
-
gtd(agent): refactor.building → refactor.health.check
|
|
145
|
-
gtd(check): refactor.health.check → refactor.closing
|
|
146
|
-
gtd(check): refactor.closing → refactor.build.review.reviewing
|
|
147
|
-
gtd(agent): refactor.build.review.reviewing → refactor.build.review.await-review
|
|
148
|
-
gtd(human): refactor.build.review.await-review → refactor.build.review.closing
|
|
149
|
-
gtd(check): refactor.build.review.closing → implement.building
|
|
150
|
-
gtd(agent): implement.building → implement.health.check
|
|
151
|
-
gtd(check): implement.health.check → implement.closing
|
|
152
|
-
gtd(check): implement.closing → build.review.reviewing
|
|
153
|
-
"""
|
|
154
|
-
And the commit "gtd(human): idle → unwind" has a body containing "Gtd-Var: flag_risk_tier=0"
|
|
155
|
-
And the commit "gtd(agent): seam.naive → seam.check" has a body containing "Gtd-Kept:"
|
|
156
|
-
And the commit "gtd(judge): seam.judge → seam.note" has a body containing "\"answer\":\"refactor-first\""
|
|
157
|
-
And no commit body contains "Gtd-Approved:"
|
|
158
|
-
And no commit body contains "Gtd-Workflow:"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
@inmem
|
|
2
|
-
Feature: the refactor review's lenses take their model hints from refactorQualityReviews alone
|
|
3
|
-
|
|
4
|
-
Background:
|
|
5
|
-
Given the shipped workflows, as gtd install scaffolds them
|
|
6
|
-
And an environment variable "GTD_QUALITYREVIEWS" set to "correctness=base"
|
|
7
|
-
And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to "correctness, conventions=opus"
|
|
8
|
-
And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
|
|
9
|
-
And a file "src/calc.ts" with:
|
|
10
|
-
"""
|
|
11
|
-
export const add = (a: number, b: number) => a + b
|
|
12
|
-
"""
|
|
13
|
-
And the working tree is committed as "feat: add calculator"
|
|
14
|
-
And a file "TODO.md" with:
|
|
15
|
-
"""
|
|
16
|
-
# Add subtract
|
|
17
|
-
|
|
18
|
-
subtract(a, b) returns the difference.
|
|
19
|
-
"""
|
|
20
|
-
And step "unwind" changes nothing
|
|
21
|
-
And step "start-gate.check" changes nothing
|
|
22
|
-
And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
|
|
23
|
-
"""
|
|
24
|
-
# Requirements
|
|
25
|
-
|
|
26
|
-
## Concerns
|
|
27
|
-
|
|
28
|
-
### Subtract
|
|
29
|
-
|
|
30
|
-
- `subtract(a, b)` returns `a - b`.
|
|
31
|
-
|
|
32
|
-
## Impact
|
|
33
|
-
|
|
34
|
-
- the greeting module
|
|
35
|
-
|
|
36
|
-
## Release Flag
|
|
37
|
-
|
|
38
|
-
new
|
|
39
|
-
|
|
40
|
-
## Acceptance Criteria
|
|
41
|
-
|
|
42
|
-
- AC-1: the change behaves as described.
|
|
43
|
-
"""
|
|
44
|
-
And step "design.gate.answer" changes nothing
|
|
45
|
-
|
|
46
|
-
Scenario: a refactor lens runs on its refactorQualityReviews hint, else its default
|
|
47
|
-
Given step "seam.check" changes nothing
|
|
48
|
-
And step "seam.naive" writes "src/acceptance.test.ts" with:
|
|
49
|
-
"""
|
|
50
|
-
it("[AC-1] holds", () => {})
|
|
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 judge step "seam.judge" answers:
|
|
58
|
-
"""
|
|
59
|
-
[{"id":"shape","answer":"refactor-first","p":0.9}]
|
|
60
|
-
"""
|
|
61
|
-
And step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
|
|
62
|
-
"""
|
|
63
|
-
Seam: the existing code the strays touch.
|
|
64
|
-
"""
|
|
65
|
-
And step "refactor.deriving" runs its script
|
|
66
|
-
And step "refactor.building" writes "src/calc.ts" with:
|
|
67
|
-
"""
|
|
68
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
69
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
70
|
-
"""
|
|
71
|
-
And step "refactor.health.check" changes nothing
|
|
72
|
-
And step "refactor.closing" runs its script
|
|
73
|
-
When the process is driven
|
|
74
|
-
Then the process rests at "refactor.build.quality.correctness.reviewing"
|
|
75
|
-
And the output of gtd "next --json" contains "\"model\":\"smart\""
|
|
76
|
-
Given step "refactor.build.quality.correctness.reviewing" changes nothing
|
|
77
|
-
When the process is driven
|
|
78
|
-
Then the process rests at "refactor.build.quality.conventions.reviewing"
|
|
79
|
-
And the output of gtd "next --json" contains "\"model\":\"opus\""
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
# One SDLC path per file, so a changed path reds exactly one fixture — do not merge.
|
|
2
|
-
@inmem
|
|
3
|
-
Feature: refactor-first writes a refactor note, refactors on its own, then rebuilds
|
|
4
|
-
|
|
5
|
-
On a refactor-first judgment the naive pass is never applied. `seam.note`
|
|
6
|
-
reads the whole naive diff and writes `.gtd/REFACTOR-NOTE.md`; the refactor
|
|
7
|
-
lands on its own with the existing suite green; the rebuild re-implements the
|
|
8
|
-
change on the refactored base, is asked to carry over every test file the
|
|
9
|
-
naive pass added or changed, and lands once the suite is green. The note
|
|
10
|
-
reaches both turns.
|
|
11
|
-
|
|
12
|
-
Background:
|
|
13
|
-
Given the shipped workflows, as gtd install scaffolds them
|
|
14
|
-
And an environment variable "GTD_QUALITYREVIEWS" set to ""
|
|
15
|
-
And an environment variable "GTD_REFACTORQUALITYREVIEWS" set to ""
|
|
16
|
-
And an environment variable "GTD_FLAG_RISK_TIER" set to "0"
|
|
17
|
-
And a file "src/calc.ts" with:
|
|
18
|
-
"""
|
|
19
|
-
export const add = (a: number, b: number) => a + b
|
|
20
|
-
"""
|
|
21
|
-
And a file "src/calc.test.ts" with:
|
|
22
|
-
"""
|
|
23
|
-
it("adds", () => {})
|
|
24
|
-
"""
|
|
25
|
-
And the working tree is committed as "feat: add calculator"
|
|
26
|
-
And a file "TODO.md" with:
|
|
27
|
-
"""
|
|
28
|
-
# Add subtract
|
|
29
|
-
|
|
30
|
-
subtract(a, b) returns the difference.
|
|
31
|
-
"""
|
|
32
|
-
And step "unwind" changes nothing
|
|
33
|
-
And step "start-gate.check" changes nothing
|
|
34
|
-
And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
|
|
35
|
-
"""
|
|
36
|
-
# Requirements
|
|
37
|
-
|
|
38
|
-
## Concerns
|
|
39
|
-
|
|
40
|
-
### Subtract
|
|
41
|
-
|
|
42
|
-
- `subtract(a, b)` returns `a - b`.
|
|
43
|
-
|
|
44
|
-
## Impact
|
|
45
|
-
|
|
46
|
-
- the greeting module
|
|
47
|
-
|
|
48
|
-
## Release Flag
|
|
49
|
-
|
|
50
|
-
new
|
|
51
|
-
|
|
52
|
-
## Acceptance Criteria
|
|
53
|
-
|
|
54
|
-
- AC-1: subtract returns the difference.
|
|
55
|
-
"""
|
|
56
|
-
And step "design.gate.answer" changes nothing
|
|
57
|
-
And step "seam.check" changes nothing
|
|
58
|
-
And step "seam.naive" writes "src/acceptance.test.ts" with:
|
|
59
|
-
"""
|
|
60
|
-
it("subtracts", () => {})
|
|
61
|
-
"""
|
|
62
|
-
And step "seam.naive" writes "src/calc.test.ts" with:
|
|
63
|
-
"""
|
|
64
|
-
it("adds", () => {})
|
|
65
|
-
it("subtracts a larger number", () => {})
|
|
66
|
-
"""
|
|
67
|
-
And step "seam.naive" writes "src/calc.ts" with:
|
|
68
|
-
"""
|
|
69
|
-
export const add = (a: number, b: number) => a + b
|
|
70
|
-
export const subtract = (a: number, b: number) => a - b
|
|
71
|
-
"""
|
|
72
|
-
And judge step "seam.judge" answers:
|
|
73
|
-
"""
|
|
74
|
-
[{"id":"shape","answer":"refactor-first","p":0.9}]
|
|
75
|
-
"""
|
|
76
|
-
|
|
77
|
-
Scenario: the refactor note reaches the refactor turn and the rebuild turn
|
|
78
|
-
When the process is driven
|
|
79
|
-
Then the process rests at "seam.note"
|
|
80
|
-
And the resting step's content contains "git show"
|
|
81
|
-
And the resting step's content contains ".gtd/REFACTOR-NOTE.md"
|
|
82
|
-
And "src/calc.ts" does not contain "subtract"
|
|
83
|
-
|
|
84
|
-
Given step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
|
|
85
|
-
"""
|
|
86
|
-
# Refactor note
|
|
87
|
-
|
|
88
|
-
Seam: route add through a shared `op(a, b, sign)` in src/calc.ts.
|
|
89
|
-
"""
|
|
90
|
-
And step "refactor.deriving" runs its script
|
|
91
|
-
When the process is driven
|
|
92
|
-
Then the process rests at "refactor.building"
|
|
93
|
-
And ".gtd/REFACTOR.md" contains "## Refactor note"
|
|
94
|
-
And ".gtd/REFACTOR.md" contains "shared `op(a, b, sign)`"
|
|
95
|
-
And the resting step's content contains "Refactor note"
|
|
96
|
-
|
|
97
|
-
Given step "refactor.building" writes "src/calc.ts" with:
|
|
98
|
-
"""
|
|
99
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
100
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
101
|
-
"""
|
|
102
|
-
And step "refactor.health.check" changes nothing
|
|
103
|
-
And step "refactor.closing" runs its script
|
|
104
|
-
And step "refactor.build.review.carrying" runs its script
|
|
105
|
-
And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
|
|
106
|
-
"""
|
|
107
|
-
# Review: abc1234
|
|
108
|
-
|
|
109
|
-
<!-- base: 0000000 -->
|
|
110
|
-
|
|
111
|
-
## calc
|
|
112
|
-
|
|
113
|
-
- [ ] ./src/calc.ts#1-2
|
|
114
|
-
add built on the shared op
|
|
115
|
-
"""
|
|
116
|
-
And step "refactor.build.review.closing" runs its script
|
|
117
|
-
When the process is driven
|
|
118
|
-
Then the process rests at "refactor.build.review.await-review"
|
|
119
|
-
|
|
120
|
-
Given a file ".gtd/REVIEW.md" with:
|
|
121
|
-
"""
|
|
122
|
-
# Review: abc1234
|
|
123
|
-
|
|
124
|
-
<!-- base: 0000000 -->
|
|
125
|
-
|
|
126
|
-
## calc
|
|
127
|
-
|
|
128
|
-
- [x] ./src/calc.ts#1-2
|
|
129
|
-
add built on the shared op
|
|
130
|
-
"""
|
|
131
|
-
When gtd lands
|
|
132
|
-
And the process is driven
|
|
133
|
-
Then the process rests at "implement.building"
|
|
134
|
-
And the resting step's content contains "shared `op(a, b, sign)`"
|
|
135
|
-
And the resting step's content contains "Carry over the naive pass's acceptance tests"
|
|
136
|
-
And the resting step's content contains "'src/acceptance.test.ts' 'src/calc.test.ts'"
|
|
137
|
-
|
|
138
|
-
Scenario: a note turn that changes anything but the note is refused
|
|
139
|
-
Given step "seam.note" writes "src/calc.ts" with:
|
|
140
|
-
"""
|
|
141
|
-
export const sub = 1
|
|
142
|
-
"""
|
|
143
|
-
Then driving the process is refused with "refactor-note"
|
|
144
|
-
|
|
145
|
-
Scenario: the refactor lands on its own only with the existing suite green
|
|
146
|
-
Given step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
|
|
147
|
-
"""
|
|
148
|
-
Seam: a shared `op` in src/calc.ts.
|
|
149
|
-
"""
|
|
150
|
-
And step "refactor.deriving" runs its script
|
|
151
|
-
And step "refactor.building" writes "src/calc.ts" with:
|
|
152
|
-
"""
|
|
153
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
154
|
-
export const add = (a: number, b: number) => op(a, b, -1)
|
|
155
|
-
"""
|
|
156
|
-
And step "refactor.health.check" writes ".gtd/FEEDBACK.md" with:
|
|
157
|
-
"""
|
|
158
|
-
FAIL add(1, 2) returned -1
|
|
159
|
-
"""
|
|
160
|
-
When the process is driven
|
|
161
|
-
Then the process rests at "refactor.fix.suite.fixing"
|
|
162
|
-
|
|
163
|
-
Given step "refactor.fix.suite.fixing" writes "src/calc.ts" with:
|
|
164
|
-
"""
|
|
165
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
166
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
167
|
-
"""
|
|
168
|
-
And step "refactor.health.check" changes nothing
|
|
169
|
-
And step "refactor.closing" runs its script
|
|
170
|
-
And step "refactor.build.review.carrying" runs its script
|
|
171
|
-
And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
|
|
172
|
-
"""
|
|
173
|
-
# Review: abc1234
|
|
174
|
-
|
|
175
|
-
<!-- base: 0000000 -->
|
|
176
|
-
|
|
177
|
-
## calc
|
|
178
|
-
|
|
179
|
-
- [ ] ./src/calc.ts#1-2
|
|
180
|
-
add built on the shared op
|
|
181
|
-
"""
|
|
182
|
-
And step "refactor.build.review.closing" runs its script
|
|
183
|
-
When the process is driven
|
|
184
|
-
Then the process rests at "refactor.build.review.await-review"
|
|
185
|
-
|
|
186
|
-
Given a file ".gtd/REVIEW.md" with:
|
|
187
|
-
"""
|
|
188
|
-
# Review: abc1234
|
|
189
|
-
|
|
190
|
-
<!-- base: 0000000 -->
|
|
191
|
-
|
|
192
|
-
## calc
|
|
193
|
-
|
|
194
|
-
- [x] ./src/calc.ts#1-2
|
|
195
|
-
add built on the shared op
|
|
196
|
-
"""
|
|
197
|
-
When gtd lands
|
|
198
|
-
And the process is driven
|
|
199
|
-
Then the process rests at "implement.building"
|
|
200
|
-
And "src/calc.ts" contains "op(a, b, 1)"
|
|
201
|
-
And "src/calc.ts" does not contain "subtract"
|
|
202
|
-
|
|
203
|
-
Scenario: the rebuild lands once green, whichever tests it carried
|
|
204
|
-
Given step "seam.note" writes ".gtd/REFACTOR-NOTE.md" with:
|
|
205
|
-
"""
|
|
206
|
-
Seam: a shared `op` in src/calc.ts.
|
|
207
|
-
"""
|
|
208
|
-
And step "refactor.deriving" runs its script
|
|
209
|
-
And step "refactor.building" writes "src/calc.ts" with:
|
|
210
|
-
"""
|
|
211
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
212
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
213
|
-
"""
|
|
214
|
-
And step "refactor.health.check" changes nothing
|
|
215
|
-
And step "refactor.closing" runs its script
|
|
216
|
-
And step "refactor.build.review.carrying" runs its script
|
|
217
|
-
And step "refactor.build.review.reviewing" writes ".gtd/REVIEW.md" with:
|
|
218
|
-
"""
|
|
219
|
-
# Review: abc1234
|
|
220
|
-
|
|
221
|
-
<!-- base: 0000000 -->
|
|
222
|
-
|
|
223
|
-
## calc
|
|
224
|
-
|
|
225
|
-
- [ ] ./src/calc.ts#1-2
|
|
226
|
-
add built on the shared op
|
|
227
|
-
"""
|
|
228
|
-
And step "refactor.build.review.closing" runs its script
|
|
229
|
-
When the process is driven
|
|
230
|
-
Then the process rests at "refactor.build.review.await-review"
|
|
231
|
-
|
|
232
|
-
Given a file ".gtd/REVIEW.md" with:
|
|
233
|
-
"""
|
|
234
|
-
# Review: abc1234
|
|
235
|
-
|
|
236
|
-
<!-- base: 0000000 -->
|
|
237
|
-
|
|
238
|
-
## calc
|
|
239
|
-
|
|
240
|
-
- [x] ./src/calc.ts#1-2
|
|
241
|
-
add built on the shared op
|
|
242
|
-
"""
|
|
243
|
-
When gtd lands
|
|
244
|
-
And the process is driven
|
|
245
|
-
Then the process rests at "implement.building"
|
|
246
|
-
|
|
247
|
-
Given step "implement.building" writes "src/calc.ts" with:
|
|
248
|
-
"""
|
|
249
|
-
export const op = (a: number, b: number, sign: number) => a + sign * b
|
|
250
|
-
export const add = (a: number, b: number) => op(a, b, 1)
|
|
251
|
-
export const subtract = (a: number, b: number) => op(a, b, -1)
|
|
252
|
-
"""
|
|
253
|
-
And step "implement.health.check" changes nothing
|
|
254
|
-
And step "implement.closing" runs its script
|
|
255
|
-
When the process is driven
|
|
256
|
-
Then the process rests at "build.review.reviewing"
|
|
257
|
-
And "src/calc.ts" contains "op(a, b, -1)"
|
|
258
|
-
And ".gtd/REFACTOR-NOTE.md" does not exist
|
|
259
|
-
And the commit subjects end with:
|
|
260
|
-
"""
|
|
261
|
-
gtd(judge): seam.judge → seam.note
|
|
262
|
-
gtd(agent): seam.note → refactor.deriving
|
|
263
|
-
gtd(check): refactor.deriving → refactor.building
|
|
264
|
-
gtd(agent): refactor.building → refactor.health.check
|
|
265
|
-
gtd(check): refactor.health.check → refactor.closing
|
|
266
|
-
gtd(check): refactor.closing → refactor.build.review.reviewing
|
|
267
|
-
gtd(agent): refactor.build.review.reviewing → refactor.build.review.await-review
|
|
268
|
-
gtd(human): refactor.build.review.await-review → refactor.build.review.closing
|
|
269
|
-
gtd(check): refactor.build.review.closing → implement.building
|
|
270
|
-
gtd(agent): implement.building → implement.health.check
|
|
271
|
-
gtd(check): implement.health.check → implement.closing
|
|
272
|
-
gtd(check): implement.closing → build.review.reviewing
|
|
273
|
-
"""
|