From 66906935f5f67c98c49307ccad4e76e10c15601e Mon Sep 17 00:00:00 2001 From: fredericrous Date: Thu, 8 Oct 2026 16:13:11 +0200 Subject: [PATCH 1/4] docs(plan): approve only what needs judging Co-Authored-By: Claude Opus 5.5 --- docs/plans/2026-10-08-approve-only-what-needs-judging.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/plans/2026-10-08-approve-only-what-needs-judging.md diff --git a/docs/plans/2026-10-08-approve-only-what-needs-judging.md b/docs/plans/2026-10-08-approve-only-what-needs-judging.md new file mode 100644 index 0000000..6a2c8ba --- /dev/null +++ b/docs/plans/2026-10-08-approve-only-what-needs-judging.md @@ -0,0 +1,7 @@ +--- +canonical: decisions:docs/plans/2026-10-08-approve-only-what-needs-judging.md +phases: [3] +status: active +--- +Part of [Approve only what needs judging](https://github.com/fredericrous/decisions/blob/feat/approve-only-what-needs-judging/docs/plans/2026-10-08-approve-only-what-needs-judging.md). +This repository carries Phase 3: the worktree-task skill (the `question_prefix`, the `## Preview` evidence path, a resumed Delta review) and the plan template's `## Preview` section, after bringing the skill's source in line with the deployed copy. From a3bd787fe9a59e20d210197606acf171eb1c4c25 Mon Sep 17 00:00:00 2001 From: fredericrous Date: Thu, 8 Oct 2026 16:13:15 +0200 Subject: [PATCH 2/4] fix(skills): source catches up with worktree-task The deployed SKILL.md had gained F9 Teardown and the merge and release lines, and the chezmoi source had not, so the next apply would have reverted them. Co-Authored-By: Claude Opus 5.5 --- dot_claude/skills/worktree-task/SKILL.md | 45 +++++++++++++----------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/dot_claude/skills/worktree-task/SKILL.md b/dot_claude/skills/worktree-task/SKILL.md index fa9fa92..0c4b437 100644 --- a/dot_claude/skills/worktree-task/SKILL.md +++ b/dot_claude/skills/worktree-task/SKILL.md @@ -265,30 +265,33 @@ below names one of them. - An approval given before the person had a guide is not informed. Hold the push, give the guide, and ask again. - **F8.** Any code change or rebase after F4 returns to F1. +- **F9. Teardown: required, and the finish is not done without it.** Run it + only after the push succeeds (confirmed with `git ls-remote`). It is + never "cleanup for later": skipping it has left merged worktrees behind. + 1. Remove this worktree from the **primary** checkout (not from inside + itself), using `git -C` so no `cd` persists: + ```bash + git -C worktree remove ../-wt- + ``` + If it refuses because of untracked files, inspect them first. Don't + `--force` blindly: it may be legitimate leftover build output, but check. + 2. Sweep the other worktrees in this repo. A merged PR elsewhere does not + clean itself up. Run it from the primary checkout: after step 1 the + shell's cwd can be the worktree just removed. + ```bash + cd && python3 ~/.claude/tools/worktree-sweep/sweep.py --repo --apply + ``` + It removes only worktrees that are clean, fully pushed, merged and + contained in a release tag, and leaves anything it cannot verify. See + the `worktree-sweep` skill. + 3. In the report, say what was removed and what the sweep kept, one line + each. + +- One implementation pull request per repo per plan (`work.one-implementation-pr-per-repo-per-plan`); merge it with the `merge-when-green` skill. That skill's step 6 fast-forwards the live checkout after the merge, so this finish does not touch it: before the merge there is nothing new on `origin/main` to bring in. +- A release (`tag-release`) ends with the same sweep, because a worktree becomes sweepable only once its PR is in a release tag. No release unless the person asks for one (`work.release-on-request`). -Only after the push succeeds, remove the worktree from the **primary** -checkout (not from inside itself): - -```bash -cd -git worktree remove ../-wt- -``` - -- If `git worktree remove` refuses because of untracked files, inspect them first (don't `--force` blindly — it may be legitimate leftover build output, but check). -- One implementation pull request per repo per plan (`work.one-implementation-pr-per-repo-per-plan`); merge it with the `merge-when-green` skill. - -Then sweep any *other* worktree in this repo that became redundant while you were -working — a merged PR elsewhere does not clean itself up: - -```bash -python3 ~/.claude/tools/worktree-sweep/sweep.py --repo --apply -``` - -It removes only worktrees that are clean, fully pushed, merged, and contained in a -release tag; anything it cannot verify is left alone. See the `worktree-sweep` skill. - ## Cleanup (abandon) ```bash From 42a5e8c14e0a29282578e9f416b2258512948c93 Mon Sep 17 00:00:00 2001 From: fredericrous Date: Thu, 8 Oct 2026 16:14:47 +0200 Subject: [PATCH 3/4] feat(skills): preview by prefix, planned evidence F7 asks with the register's question_prefix and gains the ADR-0028 evidence path; a Delta review may resume its reviewer. Co-Authored-By: Claude Opus 5.5 --- dot_claude/skills/worktree-task/SKILL.md | 23 +++++++++++++++---- .../skills/worktree-task/plan-template.md | 7 ++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dot_claude/skills/worktree-task/SKILL.md b/dot_claude/skills/worktree-task/SKILL.md index 0c4b437..6a41e7e 100644 --- a/dot_claude/skills/worktree-task/SKILL.md +++ b/dot_claude/skills/worktree-task/SKILL.md @@ -201,7 +201,10 @@ below names one of them. named deliberate: continue to F5. A fix that changes code returns to F1, and the **second** pass through F4b is the `Delta`: a fresh block for the new tree, `Delta.`, the round-1 findings, the diff since, - "answer resolved / not resolved / new blocker for each". There is no + "answer resolved / not resolved / new blocker for each". The Delta may + resume the same reviewer with `SendMessage` (the block first in the + message) instead of a fresh launch: the hook counts a resumed round on + its new tree (amont-agent ≥ 2.30). There is no third pass: a `rework` that survives the Delta goes to the person with a **marked** AskUserQuestion — its text starts with `[implementation-review @]` (the full id from @@ -222,6 +225,15 @@ below names one of them. user interface; fleet ADR-0023, `work.preview-is-guided`). The person works on several projects at once and will not remember where this one stood. **Never ask for an approval without a guide.** + 0. **Planned evidence** (ADR-0028, `work.preview-unless-planned-evidence`). + If the approved plan's body has a `## Preview` section whose first + non-empty line starts with `evidence:`, do steps 2 and 3 (screenshots, + guide), compare every existing screen against the base, and put the + guide, screenshots and comparison in the PR body. Ask nothing, then push + as in F6: the hook passes the push and journals `evidence`. If the + comparison shows a visible change the plan did not decide, the + exemption lapses: run steps 1–7 as usual. A push touching screens drawn + from a picked mockup never takes this path. 1. Dependencies are already there from the Start bootstrap; re-run that step only if the rebase in F1 changed the lockfile. Start the dev server on a free port and keep it up until the person answers. @@ -245,16 +257,17 @@ below names one of them. `amont-agent preview register --url --guide --open` It refuses an incomplete guide. `--open` opens the rendered guide page in the person's browser. - Its JSON prints `label` (and `aliases`): the question in step 6 names - one of them, or the answer approves nothing. A register that did not + Its JSON prints `question_prefix` (`[preview ]