@pmelab/gtd 28.1.0 → 29.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 +28 -17
- package/claude/hooks/assist.ts +1 -1
- package/claude/hooks/register.tsx +1 -1
- package/claude/hooks/ship.ts +963 -143
- package/dist/chunks/{reserved-DeBS4Ymh.mjs → reserved-DoHUII2D.mjs} +206 -121
- package/dist/chunks/{tail-B2SER2Ih.mjs → tail-C6YBG5zh.mjs} +19 -12
- package/dist/testkit.mjs +2 -1
- package/dist/workflow-kit.mjs +51 -21
- package/dist/workflows/cleanup.mjs +2 -2
- package/dist/workflows/feature.mjs +247 -96
- package/dist/workflows/fix.mjs +2 -2
- package/dist/workflows/review.mjs +2 -2
- package/dist/workflows/rollout.mjs +1 -1
- package/dist/workflows.mjs +528 -262
- package/package.json +1 -1
- package/src/testkit/TestRepo.ts +3 -0
- package/src/testkit/index.ts +1 -1
- package/src/testkit/steps.ts +44 -0
- package/src/workflow-kit/review.test.ts +366 -8
- package/src/workflow-kit/review.ts +109 -26
- package/src/workflows/feature/feature.test.ts +313 -1
- package/src/workflows/feature/feature.ts +48 -43
- package/src/workflows/feature/one-step-land.feature +4 -0
- package/src/workflows/feature/refactor-first.feature +54 -24
- package/src/workflows/feature/refactor-review.feature +1706 -0
- package/src/workflows/feature/refactor.test.ts +592 -2
- package/src/workflows/feature/refactor.ts +160 -42
- package/src/workflows/feature/review.test.ts +322 -5
- package/src/workflows/feature/review.ts +77 -10
- package/src/workflows/feature/seam-rejection.feature +4 -0
- package/src/workflows/feature/seam.feature +3 -4
- package/src/workflows/feature/seam.test.ts +196 -1
- package/src/workflows/feature/seam.ts +23 -9
- package/src/workflows/feature/steps.test.ts +54 -2
- package/src/workflows/feature/steps.ts +45 -9
- package/src/workflows/feature/tier.test.ts +4 -0
- package/src/workflows/feature/tier.ts +2 -20
- package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +97 -0
- package/src/workflows/shared/access.test.ts +31 -1
- package/src/workflows/shared/access.ts +7 -1
- package/src/workflows/shared/fences.ts +19 -0
- package/src/workflows/shared/health.ts +32 -12
- package/src/workflows/shared/options.test.ts +18 -0
- package/src/workflows/shared/options.ts +1 -0
- package/src/workflows/shared/prose.ts +4 -2
- package/src/workflows/shared/skills.test.ts +20 -1
- package/src/workflows/shared/skills.ts +43 -32
- package/src/workflows/shared/steps.ts +33 -19
- package/src/workflows/shared/tail.test.ts +84 -1
- package/src/workflows/shared/tail.ts +30 -12
- package/src/workflows/shared/text.test.ts +266 -4
- package/src/workflows/shared/text.ts +183 -70
- package/src/workflows/shared/vars.ts +12 -2
package/README.md
CHANGED
|
@@ -336,16 +336,18 @@ questions one at a time, answers your own questions about the plan or the diff,
|
|
|
336
336
|
records what you decide in the steering file the way the step asks, and moves
|
|
337
337
|
the process on only when you say so; a review you leave untouched signs off.
|
|
338
338
|
While a step runs you can keep asking; requests for changes wait for the next
|
|
339
|
-
rest. When the process finishes, Claude offers to squash it
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
339
|
+
rest. When the process finishes, Claude offers to squash it and open its pull
|
|
340
|
+
request(s) (or run `/gtd ship`; `GTD_SHIP_MODE` picks one stacked pull request
|
|
341
|
+
per slice or one commit per slice, see the [driver doc](docs/driver.md)). A
|
|
342
|
+
process can change hands at any gate: ask Claude to hand it off (or run
|
|
343
|
+
`/gtd throw @dev`) and it opens a draft pull request assigned to them, and
|
|
344
|
+
`/gtd catch <pr>` picks it up exactly where it waits, so whoever wrote the
|
|
345
|
+
requirements can hand the architecture to someone else. Ship, hand-off and throw
|
|
346
|
+
answer at once and run in the background, with progress on the status line; they
|
|
347
|
+
report by waking Claude, a toast, a transcript line and a push notification, and
|
|
348
|
+
a failed push or `gh` call reports as a failure. While a ship or hand-off runs
|
|
349
|
+
or is queued, `/gtd catch`, the doors, `/gtd <requirements>` and bare `/gtd`
|
|
350
|
+
wait for its report. See
|
|
349
351
|
[Inside Claude Code](https://github.com/pmelab/gtd/blob/main/docs/driver.md#inside-claude-code-the-gtd-mod).
|
|
350
352
|
|
|
351
353
|
### Then let an agent build your own
|
|
@@ -568,8 +570,16 @@ home directory — fails every command until you delete it. See
|
|
|
568
570
|
architecture and package files, the agent first implements the requirements
|
|
569
571
|
directly. A judge checks whether it changed anything outside the expected set
|
|
570
572
|
(tests, steering files; see `seamAllow`). Incidental changes land; a needed seam
|
|
571
|
-
change
|
|
572
|
-
|
|
573
|
+
change is refactored first, in its own slice with its own quality lap
|
|
574
|
+
(`refactorQualityReviews`) and review, before the feature is implemented and
|
|
575
|
+
reviewed; a wrong approach is retried twice, then rests for you to steer or
|
|
576
|
+
overrule it. `gtd slices` lists the `refactor` and `feature` slices. Feedback at
|
|
577
|
+
the feature review re-runs design and the implementation, never the naive pass;
|
|
578
|
+
feedback at the refactor review re-runs the refactor, never design; a
|
|
579
|
+
refactor-review change the refactor cannot build is refused, and the only way
|
|
580
|
+
out is `gtd abandon`. A process from 27.5.0 or later whose judge ruled
|
|
581
|
+
`refactor-first` must `gtd abandon` too. Each slice's quality lap reviews only
|
|
582
|
+
that slice. Details in
|
|
573
583
|
[the naive-pass path](docs/configuration.md#the-naive-pass-path).
|
|
574
584
|
|
|
575
585
|
**Risk tier (flag `GTD_FLAG_RISK_TIER=1`, off by default, needs
|
|
@@ -623,9 +633,9 @@ When a process finishes, the landing that closes it also keeps the whole run
|
|
|
623
633
|
behind a ref, `refs/gtd/history/<entry>`, so a squash or a deleted branch
|
|
624
634
|
doesn't lose it. `/gtd ship` pushes this process's own ref to origin alongside
|
|
625
635
|
the branch (never the others) and writes a `Gtd-History: <ref>` trailer on the
|
|
626
|
-
|
|
627
|
-
If that push fails, the ship fails and nothing is squashed. Recover the
|
|
628
|
-
trail with `gtd history fetch | sh`, then `gtd history show <ref>`.
|
|
636
|
+
commit of every slice. The push is forced, so it replaces origin's copy of that
|
|
637
|
+
one ref. If that push fails, the ship fails and nothing is squashed. Recover the
|
|
638
|
+
full trail with `gtd history fetch | sh`, then `gtd history show <ref>`.
|
|
629
639
|
|
|
630
640
|
```sh
|
|
631
641
|
gtd history list # one line per kept process
|
|
@@ -654,8 +664,9 @@ are not process history: `gtd history` does not list them, and the
|
|
|
654
664
|
`refs/gtd/history/*` refspecs above neither push nor fetch them.
|
|
655
665
|
|
|
656
666
|
A workflow can rest at an approval gate (`human(name, { approve: true })`; the
|
|
657
|
-
`seamGate` helper does this
|
|
658
|
-
a clean `gtd land` approves it, and the
|
|
667
|
+
`seamGate` helper does this for a `refactor-first` diff-shape judgment; the
|
|
668
|
+
shipped flow does not use it). Only a clean `gtd land` approves it, and the
|
|
669
|
+
commit records who in a
|
|
659
670
|
`Gtd-Approved: {"step":"<step>#<n>","name":"<name>","email":"<email>"}` trailer;
|
|
660
671
|
a landing with any edit is refused (as is a script run after the tree changed —
|
|
661
672
|
revert and land again), and `gtd abandon` is the only other way out. `approve`
|
package/claude/hooks/assist.ts
CHANGED
|
@@ -119,7 +119,7 @@ function trouble(w: Wake) {
|
|
|
119
119
|
function finished(w: Wake) {
|
|
120
120
|
return [
|
|
121
121
|
`gtd finished the process on branch ${w.branch}.`,
|
|
122
|
-
`Tell the person in two or three lines what was built (read the branch's commits), then ask whether to
|
|
122
|
+
`Tell the person in two or three lines what was built (read the branch's commits), then ask whether to squash it and open its pull request(s). On yes, call ${TOOL.ship}.`,
|
|
123
123
|
]
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -593,7 +593,7 @@ async function shipNow($: $, isDry: boolean, isInTurn: boolean) {
|
|
|
593
593
|
isInTurn,
|
|
594
594
|
async () => {
|
|
595
595
|
$.ui.status(isDry ? "previewing the pull request…" : "opening the pull request…")
|
|
596
|
-
return ship(shipIo($), isDry)
|
|
596
|
+
return ship(shipIo($), isDry, await $.env.get("GTD_SHIP_MODE"))
|
|
597
597
|
},
|
|
598
598
|
async (shipped) => {
|
|
599
599
|
// a failed ship leaves the run as it was; a dry run changes nothing
|