@pmelab/gtd 29.3.1 → 30.1.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 +64 -63
- package/claude/hooks/register.tsx +5 -0
- package/dist/chunks/{reserved-Dmpg6dAp.mjs → reserved-DDiiAZ8U.mjs} +35 -239
- package/dist/chunks/{tail-CLyE5VFR.mjs → tail-ILPlELuy.mjs} +1 -1
- package/dist/gtd.bundle.mjs +0 -5
- package/dist/testkit.mjs +0 -5
- package/dist/workflows/cleanup.mjs +2 -2
- package/dist/workflows/feature.mjs +17 -182
- 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 +47 -416
- package/package.json +1 -1
- package/skills/authoring/SKILL.md +15 -27
- package/src/cli/Cli.test.ts +6 -6
- package/src/edge/Edge.test.ts +7 -7
- package/src/flags/index.test.ts +0 -4
- package/src/flags/index.ts +0 -1
- package/src/workflow/load.test.ts +1 -1
- package/src/workflows/feature/fast-path.feature +1 -2
- package/src/workflows/feature/feature.test.ts +115 -63
- package/src/workflows/feature/feature.ts +21 -38
- package/src/workflows/feature/flag-mode.feature +157 -0
- package/src/workflows/feature/index.ts +0 -1
- package/src/workflows/feature/one-step-land.feature +4 -6
- package/src/workflows/feature/planning.ts +2 -27
- package/src/workflows/feature/refactor-absorbs.feature +1 -2
- package/src/workflows/feature/refactor-first.feature +1 -3
- package/src/workflows/feature/refactor-review.feature +0 -1
- package/src/workflows/feature/risk-tier.feature +2 -3
- package/src/workflows/feature/seam-rejection.feature +1 -3
- package/src/workflows/feature/seam.feature +4 -6
- package/src/workflows/feature/seam.ts +2 -0
- package/src/workflows/feature/steps.test.ts +0 -20
- package/src/workflows/feature/steps.ts +1 -49
- package/src/workflows/feature/{seam-pin.feature → tier-pin.feature} +17 -11
- package/src/workflows/feature/tier.test.ts +3 -5
- package/src/workflows/feature/tier.ts +2 -2
- package/src/workflows/index.ts +0 -1
- package/src/workflows/shared/access.test.ts +0 -2
- package/src/workflows/shared/access.ts +0 -2
- package/src/workflows/shared/options.test.ts +14 -3
- package/src/workflows/shared/options.ts +17 -2
- package/src/workflows/shared/prose.ts +4 -11
- package/src/workflows/shared/reserved.ts +2 -2
- package/src/workflows/shared/skills.test.ts +0 -11
- package/src/workflows/shared/skills.ts +2 -9
- package/src/workflows/shared/steps.ts +0 -1
- package/src/workflows/shared/text.test.ts +20 -104
- package/src/workflows/shared/text.ts +28 -229
- package/src/workflows/shared/vars.ts +2 -3
- package/src/workflows/feature/packages.test.ts +0 -368
- package/src/workflows/feature/packages.ts +0 -173
package/README.md
CHANGED
|
@@ -74,8 +74,8 @@ autonomously run the process for you. Ask your agent if you have any questions.
|
|
|
74
74
|
misreading it — see
|
|
75
75
|
[History format](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#history-format).
|
|
76
76
|
- **Files, not chat.** Conversation lives in files like `REQUIREMENTS.md` or
|
|
77
|
-
`
|
|
78
|
-
|
|
77
|
+
`REVIEW.md`. Request changes by editing them, approve by leaving the tree
|
|
78
|
+
clean — all in your own editor. There is no chat UI that could flicker.
|
|
79
79
|
- **Harness agnostic.** gtd emits prompts to stdout (or JSON). Claude Code, a
|
|
80
80
|
bash loop, a CI job, or you reading it out loud to your sentient cat — the
|
|
81
81
|
workflow doesn't care who executes it.
|
|
@@ -355,12 +355,12 @@ stack down from its worktree, delete the top branch with
|
|
|
355
355
|
process can change hands at any gate: ask Claude to hand it off (or run
|
|
356
356
|
`/gtd throw @dev`) and it opens a draft pull request assigned to them, and
|
|
357
357
|
`/gtd catch <pr>` picks it up exactly where it waits, so whoever wrote the
|
|
358
|
-
requirements can hand the
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
358
|
+
requirements can hand the build to someone else. Ship, hand-off and throw answer
|
|
359
|
+
at once and run in the background, with progress on the status line; they report
|
|
360
|
+
by waking Claude, a toast, a transcript line and a push notification, and a
|
|
361
|
+
failed push or `gh` call reports as a failure. While a ship or hand-off runs or
|
|
362
|
+
is queued, `/gtd catch`, the doors, `/gtd <requirements>` and bare `/gtd` wait
|
|
363
|
+
for its report. See
|
|
364
364
|
[Inside Claude Code](https://github.com/pmelab/gtd/blob/main/docs/driver.md#inside-claude-code-the-gtd-mod).
|
|
365
365
|
|
|
366
366
|
### Then let an agent build your own
|
|
@@ -411,36 +411,27 @@ noted in steps 3 and 4 below.
|
|
|
411
411
|
1. **You sketch.** Change anything, or write the idea into `.gtd/TODO.md`. Rough
|
|
412
412
|
is fine; it is treated as a sketch, not as work.
|
|
413
413
|
2. **You answer questions and discuss.** Planning works out what the thing
|
|
414
|
-
should do
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
work lies outside the repository, such as filing issues, closes on recorded
|
|
436
|
-
evidence), checked against the full suite (`testCommand`) and fixed until it
|
|
437
|
-
passes before moving on — so keep that suite fast; gtd has no lighter one.
|
|
438
|
-
Scenario wording is not frozen: you sign the scenarios off once, in the
|
|
439
|
-
review's `## Scenarios` chunk, where any assertion an existing scenario lost
|
|
440
|
-
is marked `Weakened:`. After the last package the quality lap runs. Two
|
|
441
|
-
points along the process are judged rather than always asking you outright —
|
|
442
|
-
each stops and hands you a verdict to make (`gtd judge answer`, or land with
|
|
443
|
-
a clean tree to accept the conservative default, which never skips work;
|
|
414
|
+
should do and hands you `.gtd/REQUIREMENTS.md` — every process stops there,
|
|
415
|
+
even with no open question. Answer open questions in your editor, in the
|
|
416
|
+
file, and start the loop again; a round that only leaves notes needs no tick.
|
|
417
|
+
Start a footnote with `- H: <question>` to ask something: the agent replies
|
|
418
|
+
with `- A: <reply>` and the process stops at the same gate again. Close a
|
|
419
|
+
thread by replying with a conclusion or deleting it. While a thread's last
|
|
420
|
+
entry is the agent's, moving on is refused. Leave the file untouched and
|
|
421
|
+
start the loop to accept the plan as-is, unanswered questions and all.
|
|
422
|
+
|
|
423
|
+
3. **You wait.** The agent first implements the requirements the quickest way
|
|
424
|
+
that works — the naive pass — and a judge reads where it changed code (see
|
|
425
|
+
[the naive pass](#the-naive-pass) below; with [flag mode](#the-naive-pass)
|
|
426
|
+
off, neither runs). Then the change is built test-first, checked against the
|
|
427
|
+
full suite (`testCommand`) and fixed until it passes — so keep that suite
|
|
428
|
+
fast; gtd has no lighter one. Scenario wording is not frozen: you sign the
|
|
429
|
+
scenarios off once, in the review's `## Scenarios` chunk, where any assertion
|
|
430
|
+
an existing scenario lost is marked `Weakened:`. After the build the quality
|
|
431
|
+
lap runs. Three points along the process (two with flag mode off) are judged
|
|
432
|
+
rather than always asking you outright — each stops and hands you a verdict
|
|
433
|
+
to make (`gtd judge answer`, or land with a clean tree to accept the
|
|
434
|
+
conservative default, which never skips work;
|
|
444
435
|
`gtd judge run --provider fixed --answers <path>` — or the
|
|
445
436
|
`GTD_JUDGE_ANSWERS` env var, inline JSON — answers one from a file, piped
|
|
446
437
|
between `gtd judge --json` and `gtd judge answer`;
|
|
@@ -455,6 +446,8 @@ noted in steps 3 and 4 below.
|
|
|
455
446
|
choose the judge without editing the driver (flags win over both, in that
|
|
456
447
|
order); `--model` with `--provider fixed`/`jev` is refused. jev and llm exit
|
|
457
448
|
1 with nothing on stdout when they cannot answer every question):
|
|
449
|
+
- After the naive pass: does it land as is, need its seam refactored first,
|
|
450
|
+
or get rejected and retried?
|
|
458
451
|
- Every red round after the first: was the failure identical, new, or
|
|
459
452
|
progress?
|
|
460
453
|
- After you review: is each of your notes an edit, a question, a nit or
|
|
@@ -469,8 +462,8 @@ noted in steps 3 and 4 below.
|
|
|
469
462
|
measured probability, so a confidently wrong verdict can clear the 0.7 floor
|
|
470
463
|
and skip a gate unattended.**
|
|
471
464
|
|
|
472
|
-
Once the
|
|
473
|
-
|
|
465
|
+
Once the change is built, the whole change goes through a qualitative review
|
|
466
|
+
lap before you see anything: six lenses, one turn each, in order —
|
|
474
467
|
`correctness`, `owasp-security`, `ponytail-review`, `test-audit`,
|
|
475
468
|
`conventions`, `spec-challenge`. Each traces the change from its own angle
|
|
476
469
|
and records every finding, blocking or not; one fix turn then fixes ALL of
|
|
@@ -497,14 +490,14 @@ noted in steps 3 and 4 below.
|
|
|
497
490
|
you unfixed; risk: a fix lands with no check that the risk was real. Tick the
|
|
498
491
|
boxes to approve, or write what is wrong. Approving ends the process;
|
|
499
492
|
feedback is judged note by note, each as `edit`, `question`, `nit` or
|
|
500
|
-
`praise`. An `edit` sends the process back to step 2 for
|
|
501
|
-
|
|
502
|
-
under your note and the process stops at the review again —
|
|
503
|
-
`nit` is fixed in one batch, the suite must go green (a red
|
|
504
|
-
turns first), then a fresh review of the change stops at the
|
|
505
|
-
`praise` is dropped; a round of only praise signs off. When a
|
|
506
|
-
them, questions are answered and nits fixed first, then the edits
|
|
507
|
-
— risk: the planning lap may redo nit fixes it touches.
|
|
493
|
+
`praise`. An `edit` sends the process back to step 2 for re-derived
|
|
494
|
+
requirements, and the implementation is amended to meet them. A `question` is
|
|
495
|
+
answered inline under your note and the process stops at the review again —
|
|
496
|
+
no new plan. A `nit` is fixed in one batch, the suite must go green (a red
|
|
497
|
+
one gets fix turns first), then a fresh review of the change stops at the
|
|
498
|
+
review again. `praise` is dropped; a round of only praise signs off. When a
|
|
499
|
+
round mixes them, questions are answered and nits fixed first, then the edits
|
|
500
|
+
are planned — risk: the planning lap may redo nit fixes it touches.
|
|
508
501
|
|
|
509
502
|
Each `edit` note also gets a severity tier from four judge questions
|
|
510
503
|
(security, reversibility, blast radius, new concept). `critical` and `should`
|
|
@@ -523,8 +516,8 @@ noted in steps 3 and 4 below.
|
|
|
523
516
|
|
|
524
517
|
You never talk to it. Every exchange is a file in `.gtd/` that you edit in your
|
|
525
518
|
own editor, and every answer you give is a commit. Your test suite is the gate
|
|
526
|
-
throughout: a red baseline stops the process before it starts, and a red
|
|
527
|
-
is fixed before
|
|
519
|
+
throughout: a red baseline stops the process before it starts, and a red build
|
|
520
|
+
is fixed before review.
|
|
528
521
|
|
|
529
522
|
Prefer a phone or another device over your editor? `gtd ui` opens the file whose
|
|
530
523
|
turn it is as a small web app, over Tailscale — including a step that names no
|
|
@@ -584,11 +577,12 @@ unknown key. `gtd.config.ts` is the only repository config: gtd 23 removed the
|
|
|
584
577
|
home directory — fails every command until you delete it. See
|
|
585
578
|
[Migrating from `.gtdrc`](https://github.com/pmelab/gtd/blob/main/docs/configuration.md#migrating-from-gtdrc).
|
|
586
579
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
580
|
+
#### The naive pass
|
|
581
|
+
|
|
582
|
+
After design the agent first implements the requirements directly. A judge
|
|
583
|
+
checks whether it changed anything outside the expected set (tests, steering
|
|
584
|
+
files; see `seamAllow`). Incidental changes land; a needed seam change is
|
|
585
|
+
refactored first, in its own slice with its own quality lap
|
|
592
586
|
(`refactorQualityReviews`) and review, before the feature is implemented and
|
|
593
587
|
reviewed; a wrong approach is retried twice, then rests for you to steer or
|
|
594
588
|
overrule it. `gtd slices` lists the `refactor` and `feature` slices. A refactor
|
|
@@ -602,14 +596,21 @@ out is `gtd abandon`. A process from 27.5.0 or later whose judge ruled
|
|
|
602
596
|
that slice. Details in
|
|
603
597
|
[the naive-pass path](docs/configuration.md#the-naive-pass-path).
|
|
604
598
|
|
|
605
|
-
**
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
599
|
+
**Flag mode (`flagMode`, on by default).** On, the implementation is asked for a
|
|
600
|
+
new release flag (none at a `low` risk tier) and the naive pass and its judge
|
|
601
|
+
run as above. A project that is not publicly released turns it off explicitly —
|
|
602
|
+
`feature({ flagMode: false })` in `gtd.config.ts`, it is never detected: then no
|
|
603
|
+
flag is asked for, no seam judge or refactor runs, and the implementation is the
|
|
604
|
+
naive version, straight through the health loop and the quality lap. See
|
|
605
|
+
[`flagMode`](docs/configuration.md#the-bundled-workflows-settings).
|
|
606
|
+
|
|
607
|
+
**Risk tier (flag `GTD_FLAG_RISK_TIER=1`, off by default).** Triage proposes a
|
|
608
|
+
risk tier, `low` or `high`, and the production signals to watch after merge.
|
|
609
|
+
Edit the first word under `## Risk Tier` at the design gate to change it; a
|
|
610
|
+
missing or unreadable tier means `high`. Each lap lands a
|
|
611
|
+
`Gtd-Mark: risk-tier=<low|high>` trailer and a `Gtd-Mark: production-signal=…`
|
|
612
|
+
trailer per signal; `gtd summary` reads the last lap's only. Its "needs a human
|
|
613
|
+
reviewer" line for `high` is advisory, not a gate.
|
|
613
614
|
|
|
614
615
|
A `gtd.config.ts` call to `buildTail` or `tail` that fits neither call form is
|
|
615
616
|
rejected; `tail`'s positional form is deprecated for `tail(finish, options?)`.
|
|
@@ -993,6 +993,11 @@ export const register: Register = (on) => {
|
|
|
993
993
|
return next(e)
|
|
994
994
|
})
|
|
995
995
|
|
|
996
|
+
// A worker's tool call hands settings hooks the MAIN session's
|
|
997
|
+
// `transcript_path`, marked only by `agent_id`/`agent_type`; its own
|
|
998
|
+
// transcript (`agent_transcript_path`) is named only at SubagentStop, too
|
|
999
|
+
// late to measure a running worker's context.
|
|
1000
|
+
//
|
|
996
1001
|
// The loop lands a turn when it ends; work left running in the background
|
|
997
1002
|
// would still be writing the tree gtd is committing.
|
|
998
1003
|
on("tool.call", async ($, e, next) => {
|