@pmelab/gtd 33.0.0 → 34.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.
@@ -0,0 +1,108 @@
1
+ @inmem
2
+ Feature: human review is the review door's, never the feature workflow's
3
+
4
+ A feature process ends once its last slice lands: the quality lap is its
5
+ last look at the change, and no human review rest follows it. Human review
6
+ runs only when someone opens the `review` door.
7
+
8
+ Background:
9
+ Given the shipped workflows, as gtd install scaffolds them
10
+ And an environment variable "GTD_QUALITYREVIEWS" set to ""
11
+ And an environment variable "GTD_FLAGMODE" set to "false"
12
+ And a file "src/calc.ts" with:
13
+ """
14
+ export const add = (a: number, b: number) => a + b
15
+ """
16
+ And the working tree is committed as "feat: add calculator"
17
+ And a file "TODO.md" with:
18
+ """
19
+ # Add subtract
20
+
21
+ subtract(a, b) returns the difference.
22
+ """
23
+ And step "unwind" changes nothing
24
+ And step "start-gate.check" changes nothing
25
+ And step "design.triage" writes ".gtd/REQUIREMENTS.md" with:
26
+ """
27
+ # Requirements
28
+
29
+ ## Concerns
30
+
31
+ ### Subtract
32
+
33
+ - `subtract(a, b)` returns `a - b`.
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 "implement.building" writes "src/calc.ts" with:
41
+ """
42
+ export const add = (a: number, b: number) => a + b
43
+ export const subtract = (a: number, b: number) => a - b
44
+ """
45
+ And step "implement.health.check" changes nothing
46
+ And step "implement.closing" runs its script
47
+
48
+ Scenario: a feature process ends at idle with no review rest
49
+ When the process is driven
50
+ Then the process rests at "idle"
51
+ And "src/calc.ts" contains "subtract"
52
+ And ".gtd/REVIEW.md" does not exist
53
+ And the commit subjects end with:
54
+ """
55
+ gtd(human): design.gate.answer → implement.building
56
+ gtd(agent): implement.building → implement.health.check
57
+ gtd(check): implement.health.check → implement.closing
58
+ gtd(check): implement.closing → idle
59
+ """
60
+
61
+ Scenario: the review door still runs human review over the finished feature
62
+ When the process is driven
63
+ Then the process rests at "idle"
64
+
65
+ Given step "review-gate.check" changes nothing
66
+ And step "build.health.check" changes nothing
67
+ And step "build.review.reviewing" writes ".gtd/REVIEW.md" with:
68
+ """
69
+ # Review: abc1234
70
+
71
+ <!-- base: 0000000 -->
72
+
73
+ ## calc
74
+
75
+ - [ ] ./src/calc.ts#2-2
76
+ new subtract function
77
+ """
78
+ When gtd opens door "review" with "HEAD~8"
79
+ And the process is driven
80
+ Then the process rests at "build.review.await-review"
81
+ And the resting step's content contains the hash of the commit "feat: add calculator"
82
+
83
+ Given a file ".gtd/REVIEW.md" with:
84
+ """
85
+ # Review: abc1234
86
+
87
+ <!-- base: 0000000 -->
88
+
89
+ ## calc
90
+
91
+ - [x] ./src/calc.ts#2-2
92
+ new subtract function
93
+ """
94
+ And step "build.review.closing" runs its script
95
+ When gtd lands
96
+ And the process is driven
97
+ Then the process rests at "idle"
98
+ And ".gtd/REVIEW.md" does not exist
99
+ And the commit subjects end with:
100
+ """
101
+ gtd(check): implement.closing → idle
102
+ gtd(human): review-gate.check
103
+ gtd(check): review-gate.check → build.health.check
104
+ gtd(check): build.health.check → build.review.reviewing
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
+ """
@@ -92,7 +92,7 @@ export interface TailOptions {
92
92
 
93
93
  /**
94
94
  * The build tail: fix (when entered red), keep green, the quality lap, then
95
- * `finish` — the human review, as the calling workflow runs it.
95
+ * `finish` — whatever the calling workflow runs last, a human review or nothing.
96
96
  */
97
97
  export function tail<T>(
98
98
  finish: (escalations: EscalationCount) => Promise<T>,
@@ -165,7 +165,7 @@ const runTail = <T>(finish: Finish<T>, options: TailOptions): Promise<T> =>
165
165
  // Truthy, not `true`: an untyped config's flags read as they always did.
166
166
  if (options.fixFirst) await repair()
167
167
  else if (!options.green) await healthy(fix, { escalations, guard, guardRests, rules })
168
- // The lap runs once a tail: after its findings are fixed, review follows.
168
+ // The lap runs once a tail: after its findings are fixed, `finish` follows.
169
169
  if ((await qualityLap(guard, lenses, lensBase)) === "findings") {
170
170
  if (await fixQualityFindings(escalations, guard, guardRests, rules)) {
171
171
  await healthy(fix, { escalations, guard, guardRests, rules })
@@ -87,6 +87,19 @@ What each change does next (then run \`gtd land\`):
87
87
  - **Continue** — having undone the sketch by hand, check the test baseline is green and start triage (**start-gate.check**).
88
88
  `
89
89
 
90
+ export const qualityUnresolvedMessage = (): string =>
91
+ `The quality lap's fix turns hit their cap and \`.gtd/QUALITY.md\` still
92
+ holds findings. Nothing reviews the change after this, so the process
93
+ will not end with them open.
94
+
95
+ Fix what matters by hand, then delete or empty \`.gtd/QUALITY.md\` —
96
+ dropping a finding is your call to make.
97
+
98
+ What each change does next (then run \`gtd land\`):
99
+ - **Delete or empty \`.gtd/QUALITY.md\`** — the suite runs on your edits, then the process ends (**idle**).
100
+ - **Anything else** — rests here again.
101
+ `
102
+
90
103
  export const startGateBlockedMessage = (): string =>
91
104
  `The test baseline is red — gtd will not start new work on a broken suite.
92
105
  \`.gtd/FEEDBACK.md\` holds the failing output.