@pmelab/gtd 28.0.0 → 28.2.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 +18 -14
- 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-BIsngMGL.mjs → reserved-DeBS4Ymh.mjs} +10 -5
- package/dist/chunks/{tail-DHEaOHyp.mjs → tail-B2SER2Ih.mjs} +1 -1
- package/dist/gtd.bundle.mjs +166 -57
- package/dist/testkit.mjs +166 -57
- package/dist/workflows/cleanup.mjs +2 -2
- package/dist/workflows/feature.mjs +2 -2
- 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 +10 -5
- package/package.json +1 -1
- package/src/cli/Cli.test.ts +39 -0
- package/src/cli/Cli.ts +37 -5
- package/src/cli/Program.test.ts +31 -0
- package/src/cli/Program.ts +14 -7
- package/src/edge/Edge.test.ts +259 -3
- package/src/edge/Edge.ts +175 -58
- package/src/flows/runtime.ts +20 -1
- package/src/workflows/shared/text.test.ts +124 -0
- package/src/workflows/shared/text.ts +20 -6
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
|
|
@@ -623,9 +625,9 @@ When a process finishes, the landing that closes it also keeps the whole run
|
|
|
623
625
|
behind a ref, `refs/gtd/history/<entry>`, so a squash or a deleted branch
|
|
624
626
|
doesn't lose it. `/gtd ship` pushes this process's own ref to origin alongside
|
|
625
627
|
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>`.
|
|
628
|
+
commit of every slice. The push is forced, so it replaces origin's copy of that
|
|
629
|
+
one ref. If that push fails, the ship fails and nothing is squashed. Recover the
|
|
630
|
+
full trail with `gtd history fetch | sh`, then `gtd history show <ref>`.
|
|
629
631
|
|
|
630
632
|
```sh
|
|
631
633
|
gtd history list # one line per kept process
|
|
@@ -694,7 +696,9 @@ listed in the
|
|
|
694
696
|
`gtd slices` lists the spans a flow's `slice()` calls mark. It refuses (exit 1)
|
|
695
697
|
when HEAD neither closes nor sits inside a process, or when today's config
|
|
696
698
|
disagrees with history about the process; a version mismatch only warns on
|
|
697
|
-
stderr.
|
|
699
|
+
stderr. `gtd summary --slice <name>` prints the closing-message prompt for one
|
|
700
|
+
of those slices — its own range, human commits and cost — and inherits those
|
|
701
|
+
refusals; an unknown name is refused with every valid slice listed.
|
|
698
702
|
|
|
699
703
|
## License
|
|
700
704
|
|
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
|