@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
package/README.md CHANGED
@@ -31,19 +31,28 @@ Git history; keep secrets in an environment setting (see
31
31
  `GTD_FLAG_<NAME>` variables toggle experimental features — see
32
32
  [Feature flags](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#feature-flags).
33
33
 
34
- Also install all three skill sources the bundled workflow names in its prompts —
35
- none is optional. See
36
- [Setup](https://github.com/pmelab/gtd/blob/main/docs/setup.md) for the list, the
37
- install flags, and the never-install-the-plugin caveat. Skills are declared per
38
- scope, and restricted per turn where the driver can; each bundled scope has its
39
- own addressable `config.skills` entry in `gtd.config.ts` — see
40
- [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#skills)
41
- to repoint one to a set your own harness has instead.
42
-
43
- Each scope also declares which files its agent turns may read and write;
44
- `gtd land` refuses a turn that wrote outside its scope, and a driver can pass
45
- the read side to its agent. `read` is not a security boundary unless your driver
46
- enforces it at the OS level. See
34
+ gtd ships no workflow. Get one from
35
+ [gtd-workflows](https://github.com/pmelab/gtd-workflows) — a pinned checkout
36
+ whose `default` workflow is the feature → review → fix workflow gtd used to
37
+ bundle:
38
+
39
+ ```bash
40
+ git clone https://github.com/pmelab/gtd-workflows ~/.local/share/gtd/workflows
41
+ ~/.local/share/gtd/workflows/bin/gtd-wf pin origin/main
42
+ ~/.local/share/gtd/workflows/bin/gtd-wf config default > gtd.config.ts
43
+ ```
44
+
45
+ The config imports the workflow by absolute path, so each machine needs its own
46
+ checkout. Its README covers pinning, upgrading and the skills its prompts name.
47
+ Or write your own workflow: see
48
+ [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md)
49
+ and
50
+ [Testing a workflow](https://github.com/pmelab/gtd/blob/main/docs/testing.md).
51
+
52
+ A workflow's scopes may also declare which files their agent turns may read and
53
+ write; `gtd land` refuses a turn that wrote outside its scope, and a driver can
54
+ pass the read side to its agent. `read` is not a security boundary unless your
55
+ driver enforces it at the OS level. See
47
56
  [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#file-access).
48
57
 
49
58
  > **A repository's `gtd.config.ts` is code, and gtd runs it.** A custom workflow
@@ -54,13 +63,14 @@ enforces it at the OS level. See
54
63
 
55
64
  ## Quick start
56
65
 
57
- Run `gtd install` at your repository's root. It writes a `gtd.config.ts` that
58
- runs gtd's shipped workflows — commit it; gtd refuses to run without one — and
59
- prints a briefing. The repository need not be a JavaScript project: gtd resolves
60
- the config's `@pmelab/gtd/*` imports itself, so a Python, Rust or notes
61
- repository needs no `package.json` and no install. Pipe that briefing into your
62
- coding agent and answer its questions. It should build you a script that will
63
- autonomously run the process for you. Ask your agent if you have any questions.
66
+ Put a `gtd.config.ts` at your repository's root (see [Install](#install)) and
67
+ commit it; gtd refuses to run without one. The repository need not be a
68
+ JavaScript project: gtd resolves the config's `@pmelab/gtd/*` imports itself, so
69
+ a Python, Rust or notes repository needs no `package.json` and no install. Then
70
+ run `gtd install`: it writes nothing and prints a briefing (and where to get a
71
+ workflow, if you have none yet). Pipe that briefing into your coding agent and
72
+ answer its questions. It should build you a script that will autonomously run
73
+ the process for you. Ask your agent if you have any questions.
64
74
 
65
75
  ## Why
66
76
 
@@ -85,7 +95,7 @@ full command/flag reference,
85
95
  [Compatibility](https://github.com/pmelab/gtd/blob/main/COMPATIBILITY.md) for
86
96
  which surfaces you can rely on across releases, and
87
97
  [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md)
88
- for how to inspect or replace the workflow itself.
98
+ for how to write or replace the workflow itself.
89
99
 
90
100
  ## Basic concept
91
101
 
@@ -93,11 +103,11 @@ Two commands make up the whole cycle. **`gtd next` says what to do now.
93
103
  `gtd land` records that it is done — as a commit.** Everything else follows from
94
104
  that.
95
105
 
96
- The fastest way to understand it is to drive a few beats by hand. Any git
97
- repository with at least one commit will do once `gtd install` has written its
98
- `gtd.config.ts` and you have committed it — the first two beats need nothing
99
- else. Later beats run your test command, set as the `testCommand` workflow
100
- option in `gtd.config.ts`.
106
+ The fastest way to understand it is to drive a few beats by hand. The beats
107
+ below are those of gtd-workflows' `default` workflow. Any git repository with at
108
+ least one commit will do once its `gtd.config.ts` is committed — the first two
109
+ beats need nothing else. Later beats run your test command, set as the
110
+ `testCommand` workflow option in `gtd.config.ts`.
101
111
 
102
112
  ### Beat 1 — `gtd next` says whose turn it is
103
113
 
@@ -145,14 +155,14 @@ gtd land
145
155
 
146
156
  ```
147
157
  commit everything with this message: gtd(human): idle → unwind
148
- (run `gtd land --json=script | sh` to get the landing script)
158
+ (to land it: s=$(gtd land --json=script) && sh -c "$s")
149
159
  ```
150
160
 
151
161
  You could run that commit by hand. Take the script instead — it spells out the
152
162
  exact message and reports what landed:
153
163
 
154
164
  ```bash
155
- gtd land --json=script | sh
165
+ s=$(gtd land --json=script) && sh -c "$s"
156
166
  ```
157
167
 
158
168
  ```
@@ -195,7 +205,7 @@ before:
195
205
 
196
206
  ```bash
197
207
  sh -c "$(gtd next --json=content)"
198
- gtd land --json=script | sh
208
+ s=$(gtd land --json=script) && sh -c "$s"
199
209
  ```
200
210
 
201
211
  `--json=<field>` is how a script reads one value out of a beat. Bare `--json`
@@ -268,7 +278,7 @@ The prompt tells the agent to asses your request and write
268
278
  `.gtd/REQUIREMENTS.md`, and that file is the turn. Land it like any other beat:
269
279
 
270
280
  ```bash
271
- gtd land --json=script | sh
281
+ s=$(gtd land --json=script) && sh -c "$s"
272
282
  ```
273
283
 
274
284
  `gtd next --json=validate` is there if you want to check the agent's work first:
@@ -293,7 +303,7 @@ while :; do
293
303
  # Nothing left to do, abort.
294
304
  stalled) gtd next >&2; exit 1 ;;
295
305
  esac
296
- gtd land --json=script | sh
306
+ s=$(gtd land --json=script) && sh -c "$s"
297
307
  done
298
308
  ```
299
309
 
@@ -311,9 +321,8 @@ workflow's `smart`/`base` model hints to real model names through
311
321
  `GTD_LOOP_MODEL_SMART`/`GTD_LOOP_MODEL_BASE`.
312
322
 
313
323
  Neither guards an agent turn's context: a long turn relies on the agent
314
- harness's own compaction, and a pass that falls short is caught by its
315
- acceptance tests and retried. Size the work before the sketch — a change too big
316
- for one process is several processes.
324
+ harness's own compaction. Size the work before the sketch — a change too big for
325
+ one process is several processes.
317
326
 
318
327
  ### Or drive it from inside Claude Code
319
328
 
@@ -336,25 +345,26 @@ That starts a process from your requirements and drives it until it needs you.
336
345
  The requirements go to the top of `.gtd/TODO.md`, above whatever it already
337
346
  holds. A long, multi-line requirements paste still starts a process; if Claude
338
347
  Code never expanded the paste, gtd says it could not read it, and you add the
339
- requirements to the top of `.gtd/TODO.md` and run `/gtd`. `/gtd fix`,
340
- `/gtd review [base]`, `/gtd rollout <flag>` and `/gtd cleanup <flag>` (where the
341
- config exports them) take the doors described below; text whose word count does
342
- not fit a door's args (bare `/gtd rollout` included) starts a process from that
343
- text as requirements. At every human rest Claude itself takes over: it walks you
344
- through the open questions one at a time, answers your own questions about the
345
- plan or the diff, records what you decide in the steering file the way the step
346
- asks, and moves the process on only when you say so; a review you leave
347
- untouched signs off. While a step runs you can keep asking; requests for changes
348
- wait for the next rest. When the process finishes, Claude offers to squash it
349
- and open its pull request (or run `/gtd ship`: one commit under one pull
350
- request, see the [driver doc](docs/driver.md)); a process started for an issue
351
- ships with `Closes #N` on its pull request; a closed pull request whose branch
352
- was deleted from origin is left behind and a new one opens. A process can change
353
- hands at any gate: ask Claude to hand it off (or run `/gtd throw @dev`) and it
354
- opens a draft pull request assigned to them, and `/gtd catch <pr>` picks it up
355
- exactly where it waits, so whoever wrote the requirements can hand the build to
356
- someone else. `/gtd pr` brings a pull request's unresolved review threads into
357
- the review: each becomes a note in `.gtd/REVIEW.md` ticked "fix as suggested"
348
+ requirements to the top of `.gtd/TODO.md` and run `/gtd`. `/gtd <door> [args]`
349
+ takes one of the doors `gtd doors` lists (gtd-workflows' `default` brings `fix`,
350
+ `review [base]`, and `rollout <flag>` and `cleanup <flag>` where the config
351
+ exports them); text whose word count does not fit a door's args (bare
352
+ `/gtd rollout` included) starts a process from that text as requirements. At
353
+ every human rest Claude itself takes over: it walks you through the open
354
+ questions one at a time, answers your own questions about the plan or the diff,
355
+ records what you decide in the steering file the way the step asks, and moves
356
+ the process on only when you say so; a review you leave untouched signs off.
357
+ While a step runs you can keep asking; requests for changes wait for the next
358
+ rest. When the process finishes, Claude offers to squash it and open its pull
359
+ request (or run `/gtd ship`: one commit under one pull request, see the
360
+ [driver doc](docs/driver.md)); a process started for an issue ships with
361
+ `Closes #N` on its pull request; a closed pull request whose branch was deleted
362
+ from origin is left behind and a new one opens. A process can change hands at
363
+ any gate: ask Claude to hand it off (or run `/gtd throw @dev`) and it opens a
364
+ draft pull request assigned to them, and `/gtd catch <pr>` picks it up exactly
365
+ where it waits, so whoever wrote the requirements can hand the build to someone
366
+ else. `/gtd pr` brings a pull request's unresolved review threads into the
367
+ review: each becomes a note in `.gtd/REVIEW.md` ticked "fix as suggested"
358
368
  (untick it for "won't fix" plus a reason, or your own answer), the review door
359
369
  fixes them in place, and each thread then gets a reply naming the fixing commit
360
370
  (or your reason) and is resolved. Ship, hand-off and throw answer at once and
@@ -380,211 +390,38 @@ you what you want before it starts driving. You get one prompt to paste, not a
380
390
  state name to choose. The four commands: **`gtd-build`** drives beats until the
381
391
  process rests; **`gtd-edit`** opens the steering file the process is waiting on
382
392
  right now — falling back to `.gtd/TODO.md` when the resting state declares none;
383
- **`gtd-door <name> [args...]`** starts a process through a door (`gtd-door fix`,
384
- `gtd-door review [base]`, `gtd-door rollout <flag>`, `gtd-door cleanup <flag>`
385
- where the config exports them) and drives it. The `.gtd/TODO.md` fallback is
386
- also how you begin: on a clean repository the edit command opens the empty
387
- `.gtd/TODO.md`, and whatever you write there is the first sketch the whole
388
- process gets planned from. As a final step, if it finds an LSP-capable editor,
389
- the briefing also offers to wire up live diagnostics and review actions in it —
390
- asking first and naming the exact file, and merging rather than overwriting your
391
- editor's config. That editor integration also adds a footnote at the exact
392
- cursor position with one code action, landing the cursor in the new, empty
393
- definition ready to type, and jumps between a footnote's marker and its
394
- definition both ways — so leaving a comment for the next agent turn never means
395
- hand-typing the `[^name]` syntax yourself. In a review file, a `./path#42-70`
396
- hunk pointer is also a clickable link straight to that file and range, no
397
- go-to-definition required. A footnote can also hold a `H:`/`A:` conversation (a
398
- thread — see [configuration](docs/configuration.md)); the editor outlines
399
- threads, flags the open ones, and a `gtd: reply` code action adds your empty
400
- `- H:` entry and puts the cursor there; `gtd check <mode> <file> --open-threads`
401
- lists the ones still waiting on you, and a review question gets its answer at
402
- the review gate again, not a lap. The same conversation works as bare `// H: …`
403
- / `// A: …` line comments (`#`, `--`, `;` by language) in files the process
404
- changed; `gtd check --open-threads` alone lists the open ones (editor-only — the
405
- phone UI does not show them).
406
-
407
- ### The workflow it ships with
408
-
409
- One built-in workflow drives all of that. From where you sit, it has four
410
- moments — everything between them runs without you, with the judged exceptions
411
- noted in steps 3 and 4 below.
412
-
413
- 1. **You sketch.** Change anything, or write the idea into `.gtd/TODO.md`. Rough
414
- is fine; it is treated as a sketch, not as work.
415
- 2. **You answer questions and discuss.** Planning works out what the thing
416
- should do and hands you `.gtd/REQUIREMENTS.md` — every process stops there,
417
- even with no open question. Answer open questions in your editor, in the
418
- file, and start the loop again; a round that only leaves notes needs no tick.
419
- Start a footnote with `- H: <question>` to ask something: the agent replies
420
- with `- A: <reply>` and the process stops at the same gate again. Close a
421
- thread by replying with a conclusion or deleting it. While a thread's last
422
- entry is the agent's, moving on is refused. Leave the file untouched and
423
- start the loop to accept the plan as-is, unanswered questions and all. The
424
- file lists numbered acceptance criteria (`AC-1`, `AC-2`, …) that bind the
425
- build, and an `## Impact` section mapping the units and public surfaces the
426
- change touches — correct it here and the next lap re-explores from your edit.
427
- Sketch your own criteria under an `Acceptance criteria` heading and, when a
428
- judge finds every one clear and checkable, they are recorded as they are and
429
- this moment is skipped: a `design.impact` agent turn writes Impact instead,
430
- unreviewed. One vague criterion brings the moment back. See
431
- [Acceptance criteria](docs/configuration.md#acceptance-criteria).
432
-
433
- 3. **You wait.** The agent first implements the requirements the quickest way
434
- that works — the naive pass — and a judge reads where it changed code (see
435
- [the naive pass](#the-naive-pass) below; with [flag mode](#the-naive-pass)
436
- off, no judge runs). A pass the judge lets through is the implementation; one
437
- whose seam is refactored first is built again test-first. Then it is checked
438
- against the full suite (`testCommand`) and fixed until it passes — so keep
439
- that suite fast; gtd has no lighter one. Scenario wording is not frozen: a
440
- review's `## Scenarios` chunk marks any assertion an existing scenario lost
441
- as `Weakened:`, so you sign the scenarios off at step 4. After the build the
442
- quality lap runs. Three points along the process (two with flag mode off) are
443
- judged rather than always asking you outright — each stops and hands you a
444
- verdict to make (`gtd judge answer`, or land with a clean tree to accept the
445
- conservative default, which never skips work;
446
- `gtd judge run --provider fixed --answers <path>` — or the
447
- `GTD_JUDGE_ANSWERS` env var, inline JSON — answers one from a file, piped
448
- between `gtd judge --json` and `gtd judge answer`;
449
- `gtd judge run --provider jev` asks TypeSafe's Jev instead, with the key in
450
- `TYPESAFE_API_KEY` and `JEV_BASE_URL` optionally overriding the endpoint;
451
- `gtd judge run --provider llm` asks the `claude` CLI on `PATH` (Claude Code
452
- users only; model `sonnet`; `--model <name>` overrides) and reuses its login.
453
- With no `--provider`, `gtd judge run` picks jev when `TYPESAFE_API_KEY` is
454
- set and non-empty and no `--model` is given, else llm — never falling back
455
- across them; the `GTD_JUDGE_PROVIDER` / `GTD_JUDGE_MODEL` environment
456
- variables and a user-level `~/.config/gtd/judge.json` `{ provider, model }`
457
- choose the judge without editing the driver (flags win over both, in that
458
- order); `--model` with `--provider fixed`/`jev` is refused. jev and llm exit
459
- 1 with nothing on stdout when they cannot answer every question):
460
- - After the naive pass: does it land as is, need its seam refactored first,
461
- or get rejected and retried?
462
- - Every red round after the first: was the failure identical, new, or
463
- progress?
464
- - After you review: is each of your notes an edit, a question, a nit or
465
- praise?
466
-
467
- gtd itself never calls a judge: the Claude Code mod and the reference driver
468
- answer these through `gtd judge run` (auto selection: jev when
469
- `TYPESAFE_API_KEY` is set, else `llm` via `claude`, default model sonnet,
470
- while the Claude Code mod's own judge subagent stays on `haiku` —
471
- `--model <name>` overrides); if that fails it shows you the message and
472
- stops. **The `llm` provider's `p` is self-reported by the model, not a
473
- measured probability, so a confidently wrong verdict can clear the 0.7 floor
474
- and skip a gate unattended.**
475
-
476
- Once the change is built, the whole change goes through a qualitative review
477
- lap before you see anything: seven lenses, one turn each, in order —
478
- `correctness`, `owasp-security`, `ponytail-review`, `test-audit`,
479
- `conventions`, `spec-challenge`, `criteria-coverage`. `correctness`,
480
- `owasp-security`, `spec-challenge` and `criteria-coverage` run on the planner
481
- model (`smart`), the other three on the coder model (`base`); a
482
- `qualityReviews` entry `<lens>=<model>` picks a lens's own.
483
- `criteria-coverage` reads the requirements and the change's tests and writes
484
- one finding per acceptance criterion no test exercises; with no requirements
485
- (the `review` and `fix` workflows) it runs no turn. Each traces the change
486
- from its own angle and records every finding, blocking or not, as its own
487
- `## ` chunk of `.gtd/QUALITY.md`. A clean turn means approval only when that
488
- lens found nothing at all. The lenses are the only agentic review: a judge
489
- (`build.quality.triage`) then classifies each finding — `mechanical` ones are
490
- fixed by the fix turn (`build.fix.quality.fixing`, up to three turns),
491
- `noise` is dropped with its `p` recorded as
492
- `Gtd-Mark: noise=<id> p=<p> <title>`, and `design` ones (questioning a
493
- criterion or the approach) become notes. An unsure verdict (below
494
- `qualityTriageMinP`, `0.7`) is `design`; mechanical findings the fix turns
495
- leave become notes too. **The finding gate** (`build.quality.gate`) then
496
- stops for you: `.gtd/QUALITY.md` lists the notes, then the noise under
497
- `# Dropped as noise` so you can overrule the judge, each with one `- [ ] fix`
498
- box. Tick a finding to have it fixed, optionally with a line of guidance
499
- below its box; leave it unticked to drop it — landing the file untouched
500
- drops them all, and guidance under an unticked box is refused. The ticked
501
- ones go to the same fix turns (up to three), then the suite is kept green;
502
- what they leave is listed as unresolved, with no second gate. A ticked
503
- finding is fixed, never re-planned: raise anything bigger in your review. A
504
- lap with no notes and no noise has no gate. This lap is where code quality is
505
- looked at, and every round pays for it. It never replaces step 4 — your
506
- review stays the final gate, and nothing here skips it. The `fix` and
507
- `cleanup` doors run the same lap and gate before their own review.
508
-
509
- A red suite that keeps failing past a few fix attempts escalates instead of
510
- retrying forever: an agent turn reads the failing output and writes
511
- `.gtd/ESCALATION.md` — what's failing, why the earlier attempts didn't fix
512
- it, and what to try next — and the process stops for you to edit or land
513
- as-is, handing that document to the next fix turn as its instruction. Two
514
- such rounds with no fix is the terminal stop: the last analysis stays on disk
515
- instead of a third being written, and editing it is what gets the next
516
- attempt anywhere new. A loop the retry judge still calls progress at the cap
517
- gets one extra fix turn first. Before any escalation or red-baseline stop the
518
- suite runs once more; a pass there continues without you and is recorded as
519
- `Gtd-Mark: flaky=<check>` (see
520
- [Re-check before a person](docs/configuration.md#re-check-before-a-person)).
521
-
522
- 4. **You review.** After the quality lap a reviewer turn
523
- (`build.review.reviewing`) walks you through the whole change: `## ` chunks
524
- grouped by concern, **every chunk pointing at its code**
525
- (`./path#start-end`), so the phone shows the diff beside each one. gtd
526
- appends one `## Quality lap` chunk (`build.review.carrying`) listing, for
527
- reference, what the quality lap did with every finding: **fixed
528
- automatically** and **fixed at the finding gate** (each with its fixing
529
- commit), **dropped at the finding gate**, **dropped as noise**, and
530
- **unresolved after the finding gate**. To reopen one, write a note under its
531
- line. A review with a chunk pointing at no code is refused
532
- (`review-pointers`). A pointer note the reviewer opens with `Risk:` is fixed
533
- before you see the review (`build.review.fix.risks.fixing`), then the review
534
- is written again over the reviewer's own draft. On `refactor-first` the
535
- refactor gets a walkthrough of its own first, covering the whole refactor on
536
- every round, before the feature is built; see
537
- [the naive pass](#the-naive-pass). Land with nothing changed to approve, or
538
- write what is wrong. A note added with its own `Tick exactly one:` boxes (as
539
- `/gtd pr` imports a thread) is answered by its tick instead of judged: fix as
540
- suggested joins the nit batch below, won't fix drops it and records
541
- `Gtd-Mark: wontfix=<title>`, your own answer is judged like a note. Approving
542
- ends the process (at the refactor review, it moves on to the feature);
543
- feedback is judged note by note, each as `edit`, `question`, `nit` or
544
- `praise`. An `edit` sends the process back to step 2 for re-derived
545
- requirements — the built criteria keep their IDs (reworded in place when
546
- their behaviour changes) and new behaviour gets new ones — then the
547
- implementation is amended to meet them, with no new naive pass or seam judge,
548
- the quality lap runs, and you review again. At the refactor review an `edit`
549
- re-derives the refactor instead. A `question` is answered inline under your
550
- note and the process stops at the review again — no new plan. A `nit` is
551
- fixed in one batch, the suite must go green (a red one gets fix turns first),
552
- then a fresh review of the change stops at the review again. `praise` is
553
- dropped; a round of only praise signs off. When a round mixes them, questions
554
- are answered and nits fixed first, then the edits are planned — risk: the
555
- planning lap may redo nit fixes it touches.
556
-
557
- Each `edit` note also gets a severity tier from four judge questions
558
- (security, reversibility, blast radius, new concept). Every tier is
559
- re-planned this round, `critical` first, then `should`, then `could`; nothing
560
- is deferred. A leading `!` on a note forces `critical` and skips the judge.
561
- `reviewSeverityMinP` sets the confidence floor (see
562
- [configuration](docs/configuration.md)). A hand-edit to code always plans a
563
- lap. Only a confident non-`edit` verdict skips the replan — a note whose
564
- evidence was cut, or that got no verdict, counts as `edit`. The same
565
- `gtd judge answer` / conservative-default shape as step 3's own judged
566
- points.
567
-
568
- **The review learns your taste.** Each won't-fix and each own answer is a
569
- candidate standard. A judge (`build.review.standards.judge`) asks whether it
570
- is reusable beyond this note; at `standardMinP` (`0.8`) or above it is kept
571
- in `.gtd/STANDARDS.md` with no question asked, and the next review lists it
572
- under `## Standards added`. Every later agent turn — the lenses, the naive
573
- pass, the build, every fix — is handed the kept standards, so a finding you
574
- rejected once is not raised again and a rule you wrote is followed, in this
575
- process and every later one. One the judge does not confidently rule out
576
- contradicting a standard already kept is not applied: it waits under
577
- `## Undecided` and becomes a `## Standard conflict <id>` note in the review,
578
- with its own three boxes — **keep the new one (drop the old)**, **keep the
579
- old one (discard the new)**, or **your own wording**, which replaces both —
580
- and the review does not sign off until it is answered. `.gtd/STANDARDS.md` is
581
- committed and yours to edit; gtd rewrites it as one bullet per standard when
582
- it learns.
583
-
584
- You never talk to it. Every exchange is a file in `.gtd/` that you edit in your
585
- own editor, and every answer you give is a commit. Your test suite is the gate
586
- throughout: a red baseline stops the process before it starts, and a red build
587
- is fixed before review.
393
+ **`gtd-door <name> [args...]`** starts a process through one of the doors
394
+ `gtd doors` lists (`gtd-door fix`, `gtd-door review [base]` with gtd-workflows'
395
+ `default`) and drives it. The `.gtd/TODO.md` fallback is also how you begin: on
396
+ a clean repository the edit command opens the empty `.gtd/TODO.md`, and whatever
397
+ you write there is the first sketch the whole process gets planned from. As a
398
+ final step, if it finds an LSP-capable editor, the briefing also offers to wire
399
+ up live diagnostics and review actions in it — asking first and naming the exact
400
+ file, and merging rather than overwriting your editor's config. That editor
401
+ integration also adds a footnote at the exact cursor position with one code
402
+ action, landing the cursor in the new, empty definition ready to type, and jumps
403
+ between a footnote's marker and its definition both ways — so leaving a comment
404
+ for the next agent turn never means hand-typing the `[^name]` syntax yourself.
405
+ In a review file, a `./path#42-70` hunk pointer is also a clickable link
406
+ straight to that file and range, no go-to-definition required. A footnote can
407
+ also hold a `H:`/`A:` conversation (a thread — see
408
+ [configuration](docs/configuration.md)); the editor outlines threads, flags the
409
+ open ones, and a `gtd: reply` code action adds your empty `- H:` entry and puts
410
+ the cursor there; `gtd check <mode> <file> --open-threads` lists the ones still
411
+ waiting on you. The same conversation works as bare `// H: …` / `// A: …` line
412
+ comments (`#`, `--`, `;` by language) in files the process changed;
413
+ `gtd check --open-threads` alone lists the open ones (editor-only — the phone UI
414
+ does not show them).
415
+
416
+ ### The workflow
417
+
418
+ gtd decides nothing about _what_ a process does: the workflow in your
419
+ `gtd.config.ts` does. gtd-workflows' `default` has four moments for you — you
420
+ sketch, you answer the planning questions in `.gtd/REQUIREMENTS.md`, you wait
421
+ while it builds, checks and runs its quality lenses, and you review — with every
422
+ exchange a file in `.gtd/` that you edit in your own editor, and every answer a
423
+ commit. Its guide is
424
+ [The default workflow](https://github.com/pmelab/gtd-workflows/blob/main/docs/default.md).
588
425
 
589
426
  Prefer a phone or another device over your editor? `gtd ui` opens the file whose
590
427
  turn it is as a small web app, over Tailscale — including a step that names no
@@ -600,45 +437,19 @@ conversation under their block, question, chunk, or hunk, and one the agent
600
437
  answered last carries a "waiting on you" badge. Tap it to reply — your reply is
601
438
  added as a new `H:` entry; while the agent has yet to answer, reopening it edits
602
439
  your last entry instead. Tap an already-answered question to leave a note on it;
603
- the agent may overturn the answer. At the finding gate the phone lists the open
604
- findings, then those dropped as noise, each with a fix checkbox and, once
605
- ticked, an optional line of guidance; Done stays disabled while the file holds
606
- anything the gate would refuse. See
440
+ the agent may overturn the answer. A `findings` file lists its findings, each
441
+ with a fix checkbox and, once ticked, an optional line of guidance; Done stays
442
+ disabled while the file holds anything its gate would refuse. See
607
443
  [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md)
608
444
  for its `ui:` settings.
609
445
 
610
- The bundled workflows are named `feature` (the ordinary start above), `review`
611
- and `fix`. `review` and `fix` never plan. Each brings its own door. This
612
- command:
613
-
614
- ```bash
615
- gtd door review <commitish>
616
- ```
617
-
618
- starts a review of everything from `<commitish>` to HEAD — the same review a
619
- `feature` process ends with, minus planning and building. A green gate, then the
620
- quality lenses: mechanical findings are fixed, the rest wait at the finding
621
- gate, then a reviewer walks you through the change in `.gtd/REVIEW.md`, with the
622
- lap's summary. A nit note is fixed in place; a note asking for a change is
623
- collected into `.gtd/REQUIREMENTS.md` and built by one `feedback.fixing` turn,
624
- with no design phase and no criteria — under the health loop, then it asks for
625
- your review again. Sign off and it closes; nothing is left behind. A note asking
626
- for new behaviour belongs in a `feature` process: sign off and start one.
627
- `gtd door fix` repairs a red baseline as its own reviewed commit; a note at its
628
- review is left in `.gtd/REVIEW.md` (beside the reviewer's original,
629
- `.gtd/REVIEW.orig.md`) for the next `gtd door fix`, and until that runs,
630
- starting `feature` or `review` is refused — remove both files to abandon the
631
- hand-off. `gtd doors` lists the doors of the workflows your `gtd.config.ts`
632
- exports, plus any it adds. `gtd --workflow <name>` starts any workflow by name.
633
-
634
446
  The workflow itself is a plain async TypeScript function, and the
635
- `gtd.config.ts` at the repository root names it: the one `gtd install` writes
636
- re-exports each shipped workflow from its own subpath
637
- (`@pmelab/gtd/workflows/feature`, `…/review`, `…/fix`), and the pieces they are
638
- built from are exported for yours to reuse. Each shipped workflow is a factory —
447
+ `gtd.config.ts` at the repository root names it. A workflow may be a factory —
639
448
  `feature({ testCommand: "npm run ci" })` — whose options gtd validates when it
640
449
  loads the config: a misspelled or mistyped one fails every command, naming the
641
- workflow, the key and what was expected. See
450
+ workflow, the key and what was expected. `gtd doors` lists the doors of the
451
+ workflows your config exports, and `gtd --workflow <name>` starts any workflow
452
+ by name. See
642
453
  [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md) —
643
454
  and remember gtd evaluates that file on every command. A shared workflow package
644
455
  bundling its own `@pmelab/gtd` is checked against the running gtd and refused,
@@ -652,91 +463,6 @@ unknown key. `gtd.config.ts` is the only repository config: gtd 23 removed the
652
463
  home directory — fails every command until you delete it. See
653
464
  [Migrating from `.gtdrc`](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#migrating-from-gtdrc).
654
465
 
655
- #### The naive pass
656
-
657
- After design the agent first implements the requirements directly,
658
- breadth-first. It is asked to test the behaviour the criteria describe — one
659
- test per behaviour, not per criterion, with no criterion ID in a test name —
660
- through code that existed before the pass, but no test is required. The pass is
661
- sent back while a test imports a file it added, or the suite is red on it. A
662
- judge checks whether it changed anything outside the expected set (tests,
663
- steering files; see `seamAllow`). Incidental changes land: the pass itself is
664
- the implementation, with no rebuild, straight through the health loop and the
665
- quality lap. A needed seam change resets: the pass is never applied. An agent
666
- reads its whole diff and writes a refactor note (`.gtd/REFACTOR-NOTE.md`: which
667
- seams, which shape); the seam is refactored first, flag-free with the existing
668
- suite green, on its own with its own quality lap (`refactorQualityReviews`) and
669
- review; then the feature is rebuilt on the refactored base, behind a release
670
- flag, with the note and the naive diff as reference. The rebuild is asked to
671
- carry over every test file the naive pass added or changed, and the suite must
672
- be green; whether each criterion is still tested is the `criteria-coverage`
673
- lens's call in the quality lap. A wrong approach is retried twice, then rests
674
- for you to steer or overrule it. A refactor that already carried the whole
675
- feature leaves the rebuild only the carried-over tests, and the feature's
676
- quality lap and review cover the whole change. With `naiveTest` on (off by
677
- default), you try every green naive pass by hand first, applied to the working
678
- tree at `seam.try`, before the seam judge or anything builds on it: a clean
679
- `gtd land` signs it off; notes in `.gtd/NAIVE-TEST.md`, code edits or a
680
- requirements edit send it back to a new naive pass, which gets them, until you
681
- sign off. See [The naive test](docs/configuration.md#the-naive-test). Nothing
682
- else tries the change by hand: the suite, the quality lap and the review check
683
- the criteria. Feedback at the feature review re-runs design and the
684
- implementation, never the naive pass; feedback at the refactor review re-runs
685
- the refactor, never design; a refactor-review change the refactor cannot build
686
- is refused, and the only way out is `gtd abandon`. A process from 27.5.0 or
687
- later whose judge ruled `refactor-first` must `gtd abandon` too. Details in
688
- [the naive-pass path](docs/configuration.md#the-naive-pass-path).
689
-
690
- **One process, one build.** A change is built in one pass — one naive pass, one
691
- build, one quality lap, one review — however many criteria it has. Sizing the
692
- work is yours: split a change too big for one process into several before the
693
- sketch.
694
-
695
- **Release flags (only when asked for).** A change ships unflagged unless its
696
- requirements ask for a flag: a `## Release Flag` section in
697
- `.gtd/REQUIREMENTS.md` reading `new` (a new release flag) or `existing: <NAME>`
698
- (behind a flag that already exists). Triage writes it only when the sketch asks
699
- for a flag; you can add, change or delete it at the design gate. With it, the
700
- naive pass's judge runs as above and the build adds the new flag, or uses the
701
- named one; without it, no seam judge or refactor runs and the naive pass lands
702
- as the implementation, straight through the health loop and the quality lap. See
703
- [Release flags](docs/configuration.md#release-flags).
704
-
705
- **Risk tier (flag `GTD_FLAG_RISK_TIER=1`, off by default).** Triage proposes a
706
- risk tier, `low` or `high`, and the production signals to watch after merge.
707
- Edit the first word under `## Risk Tier` at the design gate to change it; a
708
- missing or unreadable tier means `high`. Each lap lands a
709
- `Gtd-Mark: risk-tier=<low|high>` trailer and a `Gtd-Mark: production-signal=…`
710
- trailer per signal; `gtd summary` reads the last lap's only. Its "needs a human
711
- reviewer" line for `high` is advisory, not a gate.
712
-
713
- A `gtd.config.ts` call to `buildTail` or `tail` that fits neither call form is
714
- rejected; `tail`'s positional form is deprecated for `tail(finish, options?)`.
715
- See [docs/configuration.md](docs/configuration.md).
716
-
717
- ### Rolling out and cleaning up release flags
718
-
719
- Two more bundled workflows retire a release flag. They are opt-in: the
720
- `gtd.config.ts` that `gtd install` writes does not export them, so add `rollout`
721
- from `@pmelab/gtd/workflows/rollout` and `cleanup` from
722
- `@pmelab/gtd/workflows/cleanup` to its exports first. `gtd door rollout <flag>`
723
- turns it default-on, `gtd door cleanup <flag>` removes it afterwards
724
- (`/gtd rollout <flag>` and `/gtd cleanup <flag>` in Claude Code;
725
- `gtd --workflow rollout --var flag=<name>` works too). See
726
- [Feature flags](docs/configuration.md#rolling-out-and-cleaning-up-a-release-flag).
727
-
728
- Rollout makes "on under `GTD_FLAG_<NAME>=1`" prose wrong until cleanup, so once
729
- the suite passes it lists every line outside the registry that names the flag
730
- (as `path:line`, the first 50, then a `git grep` command over tracked files for
731
- the rest) and edits none of them, leaving no file behind. The squash carries the
732
- list only through the closing message `gtd summary` writes; the `Gtd-Mark:`
733
- trailers survive only in the process history ref `refs/gtd/history/<entry>`,
734
- recovered with `gtd history fetch | sh` and read with
735
- `git log --format=%B <ref>`. An empty list says so in one line. Fix the prose by
736
- hand or leave it for cleanup.
737
-
738
- The delivery model these workflows implement: [Delivery model](SDLC.md).
739
-
740
466
  ## Checking a range for stray files
741
467
 
742
468
  ```sh
@@ -768,9 +494,9 @@ gtd history judges [ref...] # how often each judge's verdicts were overturn
768
494
  gtd history fetch | sh # pull every kept ref from origin
769
495
  ```
770
496
 
771
- `gtd history metrics` measures the bundled `feature` workflow from the kept refs
772
- — every ref, or the ones named. It reads commit subjects and trailers only, so
773
- it never replays and a config changed since is no refusal:
497
+ `gtd history metrics` measures gtd-workflows' `default` `feature` workflow from
498
+ the kept refs — every ref, or the ones named. It reads commit subjects and
499
+ trailers only, so it never replays and a config changed since is no refusal:
774
500
 
775
501
  - **refactor-first rate** — of the builds whose naive pass was decided, the
776
502
  share rebuilt rather than landed as it is; a landed pass that no longer
@@ -795,9 +521,10 @@ process kept from that branch. A rate is `null` without a decided build. Each
795
521
  process names its `workflow` (`null` for the default one); the total spans every
796
522
  ref measured, so name the refs to leave another workflow's processes out.
797
523
 
798
- `gtd history judges` calibrates three of the bundled `feature` workflow's judges
799
- from the `Gtd-Judge` verdicts the kept refs recorded. It never replays and asks
800
- no model. A verdict is **overturned** when later history contradicts it:
524
+ `gtd history judges` calibrates three of gtd-workflows' `default` `feature`
525
+ workflow's judges from the `Gtd-Judge` verdicts the kept refs recorded. It never
526
+ replays and asks no model. A verdict is **overturned** when later history
527
+ contradicts it:
801
528
 
802
529
  - **retry** (`health.judge`) — an `identical` verdict, when the next fix turn's
803
530
  check went green anyway (no outcome when a person edited code in between)
@@ -855,9 +582,9 @@ are not process history: `gtd history` does not list them, and the
855
582
  `refs/gtd/history/*` refspecs above neither push nor fetch them.
856
583
 
857
584
  A workflow can rest at an approval gate (`human(name, { approve: true })`; the
858
- `seamGate` helper does this for a `refactor-first` diff-shape judgment; the
859
- shipped flow does not use it). Only a clean `gtd land` approves it, and the
860
- commit records who in a
585
+ `seamGate` helper does this for a `refactor-first` diff-shape judgment;
586
+ gtd-workflows' `default` does not use it). Only a clean `gtd land` approves it,
587
+ and the commit records who in a
861
588
  `Gtd-Approved: {"step":"<step>#<n>","name":"<name>","email":"<email>"}` trailer;
862
589
  a landing with any edit is refused (as is a script run after the tree changed —
863
590
  revert and land again), and `gtd abandon` is the only other way out. `approve`
@@ -873,16 +600,14 @@ approvals as `approvals` (`[]` when none), and `gtd history show` prints each as
873
600
  gtd is one package, `@pmelab/gtd`, and every entrypoint shares its version and
874
601
  [SemVer promise](https://github.com/pmelab/gtd/blob/main/COMPATIBILITY.md).
875
602
 
876
- | Import | What it is |
877
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
878
- | `@pmelab/gtd/flows` | The flow API a workflow is written in: the steps (`agent`, `human`, `run`, …), `scope`, workflow factories, `defineConfig` and `FLOWS_PROTOCOL`. |
879
- | `@pmelab/gtd/wire` | The driver protocol: `WIRE_SCHEMA`, the exit codes and the types of every `--json` document. |
880
- | `@pmelab/gtd/steering` | The steering-file formats (`qa`, `review`, `findings`) and the review-note readers. |
881
- | `@pmelab/gtd/workflow-kit` | Policy-free building blocks to compose a workflow from: health checks, quality laps, scenario freezing, review tails. |
882
- | `@pmelab/gtd/workflows` | Every shipped workflow and all its parts in one module; also resolvable as `@pmelab/gtd/workflow`. |
883
- | `@pmelab/gtd/workflows/feature`, `@pmelab/gtd/workflows/review`, `@pmelab/gtd/workflows/fix`, `@pmelab/gtd/workflows/rollout`, `@pmelab/gtd/workflows/cleanup` | One shipped workflow each: its factory as the default export, its parts, and the reserved exports (`defaults`, `envDefaults`, `summary`, `steering`, `skills`, `access`). `gtd install` imports these. |
884
- | `@pmelab/gtd/testkit` | Runs any workflow against the real engine in an in-memory repository, under any test runner. See [Testing a workflow](https://github.com/pmelab/gtd/blob/main/docs/testing.md). |
885
- | `@pmelab/gtd/testkit/gherkin` | The testkit as quickpickle steps for vitest. Needs `vitest` and `quickpickle`, optional peer dependencies. |
603
+ | Import | What it is |
604
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
605
+ | `@pmelab/gtd/flows` | The flow API a workflow is written in: the steps (`agent`, `human`, `run`, …), `scope`, workflow factories, `defineConfig` and `FLOWS_PROTOCOL`. |
606
+ | `@pmelab/gtd/wire` | The driver protocol: `WIRE_SCHEMA`, the exit codes and the types of every `--json` document. |
607
+ | `@pmelab/gtd/steering` | The steering-file formats (`qa`, `review`, `findings`) and the review-note readers. |
608
+ | `@pmelab/gtd/workflow-kit` | Policy-free building blocks to compose a workflow from: health checks, quality laps, scenario freezing, review tails. |
609
+ | `@pmelab/gtd/testkit` | Runs any workflow against the real engine in an in-memory repository, under any test runner. See [Testing a workflow](https://github.com/pmelab/gtd/blob/main/docs/testing.md). |
610
+ | `@pmelab/gtd/testkit/gherkin` | The testkit as quickpickle steps for vitest. Needs `vitest` and `quickpickle`, optional peer dependencies. |
886
611
 
887
612
  Types come from the TypeScript sources the package ships. Configs never need an
888
613
  install for any of these but the testkit's: gtd resolves a `gtd.config.ts`'s