@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtd",
3
- "version": "55.0.0",
3
+ "version": "57.0.0",
4
4
  "description": "Drive the gtd loop inside Claude Code: agent turns run as subagents, gtd decides every beat",
5
5
  "author": {
6
6
  "name": "Philipp Melab"
package/README.md CHANGED
@@ -490,12 +490,21 @@ noted in steps 3 and 4 below.
490
490
  fixed by the fix turn (`build.fix.quality.fixing`, up to three turns),
491
491
  `noise` is dropped with its `p` recorded as
492
492
  `Gtd-Mark: noise=<id> p=<p> <title>`, and `design` ones (questioning a
493
- criterion or the approach) become notes for your review. An unsure verdict
494
- (below `qualityTriageMinP`, `0.7`) is `design`; mechanical findings the fix
495
- turns leave become notes too. This lap is where code quality is looked at,
496
- and every round pays for it. It never replaces step 4 — your review stays the
497
- final gate, and nothing here skips it. The `fix` and `cleanup` doors triage
498
- their lap too, and hand its notes to their own review.
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.
499
508
 
500
509
  A red suite that keeps failing past a few fix attempts escalates instead of
501
510
  retrying forever: an agent turn reads the failing output and writes
@@ -513,46 +522,37 @@ noted in steps 3 and 4 below.
513
522
  4. **You review.** After the quality lap a reviewer turn
514
523
  (`build.review.reviewing`) walks you through the whole change: `## ` chunks
515
524
  grouped by concern, **every chunk pointing at its code**
516
- (`./path#start-end`), so the phone shows the diff beside each one. Every
517
- design note the lap left gets a chunk of its own, pointing at the code it
518
- cites; gtd adds the note's text and three tick boxes — **fix as suggested**,
519
- **won't fix**, or **your own answer** written over `_your answer_`
520
- (`build.review.carrying`) — then, for reference, no tick boxes, no answer
521
- needed — what was **fixed automatically** (with the fixing commit) and what
522
- was **dropped as noise**. A review with a chunk pointing at no code, or a
523
- note left out, is refused (`review-pointers`). A pointer note the reviewer
524
- opens with `Risk:` is fixed before you see the review
525
- (`build.review.fix.risks.fixing`), then the review is written again. **What
526
- matters most comes first:** a judge (`build.review.ranking`) rates every
527
- chunk on the four severity questions below, and the review lists `critical`
528
- chunks first (security, then one-way doors), then `should`, then `could`,
529
- each led by its tier and reason (`_critical: security, one-way door_`) — the
530
- phone shows it on the chunk's card. A chunk the judge is unsure of, or whose
531
- evidence the budget cut, is `critical`. On `refactor-first` the refactor gets
532
- a walkthrough of its own first, covering the whole refactor on every round,
533
- before the feature is built; see [the naive pass](#the-naive-pass). **Every
534
- note needs exactly one tick before `gtd land` accepts the review**
535
- (`answer-completeness`; an open `- H:` thread waiting on the agent is the one
536
- exception). Fix as suggested joins the nit batch below, unjudged; won't fix
537
- drops the note and records it as `Gtd-Mark: wontfix=<title>` on the gate's
538
- commit; your own answer is judged like a note. A note you answered is left
539
- out of the fresh review after a nit fix. Land with every note answered and
540
- nothing else changed to approve, or write what is wrong — disagreeing with a
541
- fix or a drop means writing a note of your own. Approving ends the process
542
- (at the refactor review, it moves on to the feature); feedback is judged note
543
- by note, each as `edit`, `question`, `nit` or `praise`. An `edit` sends the
544
- process back to step 2 for re-derived requirements — the built criteria keep
545
- their IDs (reworded in place when their behaviour changes) and new behaviour
546
- gets new ones — then the implementation is amended to meet them, with no new
547
- naive pass or seam judge, the hands-on test runs again, the quality lap runs,
548
- and you review again. At the refactor review an `edit` re-derives the
549
- refactor instead. A `question` is answered inline under your note and the
550
- process stops at the review again — no new plan. A `nit` is fixed in one
551
- batch, the suite must go green (a red one gets fix turns first), then a fresh
552
- review of the change stops at the review again. `praise` is dropped; a round
553
- of only praise signs off. When a round mixes them, questions are answered and
554
- nits fixed first, then the edits are planned — risk: the planning lap may
555
- redo nit fixes it touches.
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
556
 
557
557
  Each `edit` note also gets a severity tier from four judge questions
558
558
  (security, reversibility, blast radius, new concept). Every tier is
@@ -600,9 +600,10 @@ conversation under their block, question, chunk, or hunk, and one the agent
600
600
  answered last carries a "waiting on you" badge. Tap it to reply — your reply is
601
601
  added as a new `H:` entry; while the agent has yet to answer, reopening it edits
602
602
  your last entry instead. Tap an already-answered question to leave a note on it;
603
- the agent may overturn the answer. On a review, each finding takes its decision
604
- on the phone too — fix as suggested, won't fix, or your own answer — and Done
605
- stays disabled, saying how many are left, until every finding has one. See
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
606
607
  [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md)
607
608
  for its `ui:` settings.
608
609
 
@@ -616,17 +617,15 @@ gtd door review <commitish>
616
617
 
617
618
  starts a review of everything from `<commitish>` to HEAD — the same review a
618
619
  `feature` process ends with, minus planning and building. A green gate, then the
619
- quality lenses: mechanical findings are fixed, noise is dropped, and the rest
620
- become notes under `## Findings` in `.gtd/REVIEW.md`, one tick box each, apart
621
- from the walkthrough of the code under `## Walkthrough`, which you only tick as
622
- read. Tick `fix as suggested` or write your own answer and the process fixes it
623
- in place — your own answers that ask for a change are collected into
624
- `.gtd/REQUIREMENTS.md` and built by one `feedback.fixing` turn, with no design
625
- phase and no criteria — under the health loop, then asks for your review again.
626
- Sign off (or tick `won't fix`) and it closes; nothing is left behind. A note
627
- asking for new behaviour belongs in a `feature` process: tick `won't fix` and
628
- start one. `gtd door fix` repairs a red baseline as its own reviewed commit; a
629
- note at its review is left in `.gtd/REVIEW.md` (beside the reviewer's original,
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,
630
629
  `.gtd/REVIEW.orig.md`) for the next `gtd door fix`, and until that runs,
631
630
  starting `feature` or `review` is refused — remove both files to abandon the
632
631
  hand-off. `gtd doors` lists the doors of the workflows your `gtd.config.ts`
@@ -674,25 +673,18 @@ be green; whether each criterion is still tested is the `criteria-coverage`
674
673
  lens's call in the quality lap. A wrong approach is retried twice, then rests
675
674
  for you to steer or overrule it. A refactor that already carried the whole
676
675
  feature leaves the rebuild only the carried-over tests, and the feature's
677
- quality lap and review cover the whole change. Once the implementation is green,
678
- a judge asks, per acceptance criterion, whether a person can observe it by using
679
- the software; an agent then uses the change by hand for those — the real program
680
- in a scratch directory, the real page, guided by a project skill or a manual
681
- testing section in `AGENTS.md`, `CLAUDE.md` or `README.md` — and writes
682
- `.gtd/PROTOTYPE.md`: per criterion pass, fail or blocked, with the steps run and
683
- what it saw. A criterion the judge finds no one can observe (a refactor,
684
- something left unchanged, internal shape), or one design tagged `(no hands-on)`,
685
- is skipped; a change with none left skips this step. This is the one check that
686
- a criterion is met: with `prototypeRounds` set to `0` nothing checks the
687
- criteria beyond the green suite. Failures are fixed and re-tested before the
688
- quality lap, up to `prototypeRounds` (3) fix rounds; past them, with only
689
- blocked items, or with no way to test found, it rests for you. See
690
- [The hands-on test](docs/configuration.md#the-hands-on-test). Feedback at the
691
- feature review re-runs design and the implementation, never the naive pass;
692
- feedback at the refactor review re-runs the refactor, never design; a
693
- refactor-review change the refactor cannot build is refused, and the only way
694
- out is `gtd abandon`. A process from 27.5.0 or later whose judge ruled
695
- `refactor-first` must `gtd abandon` too. Details in
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
696
688
  [the naive-pass path](docs/configuration.md#the-naive-pass-path).
697
689
 
698
690
  **One process, one build.** A change is built in one pass — one naive pass, one
@@ -884,7 +876,7 @@ gtd is one package, `@pmelab/gtd`, and every entrypoint shares its version and
884
876
  | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
885
877
  | `@pmelab/gtd/flows` | The flow API a workflow is written in: the steps (`agent`, `human`, `run`, …), `scope`, workflow factories, `defineConfig` and `FLOWS_PROTOCOL`. |
886
878
  | `@pmelab/gtd/wire` | The driver protocol: `WIRE_SCHEMA`, the exit codes and the types of every `--json` document. |
887
- | `@pmelab/gtd/steering` | The steering-file formats (`qa`, `review`) and the review-note readers. |
879
+ | `@pmelab/gtd/steering` | The steering-file formats (`qa`, `review`, `findings`) and the review-note readers. |
888
880
  | `@pmelab/gtd/workflow-kit` | Policy-free building blocks to compose a workflow from: health checks, quality laps, scenario freezing, review tails. |
889
881
  | `@pmelab/gtd/workflows` | Every shipped workflow and all its parts in one module; also resolvable as `@pmelab/gtd/workflow`. |
890
882
  | `@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. |