Repository navigation
feat(finalize-pr): lead the PR body with a change outline and the preview - #142
Merged
Merged
Conversation
…view Reviewers had to rebuild a PR's shape from the file diffs before judging it. The optional `## Changes` file list did not answer that. The body now opens with a 1–2 bullet summary, a `## Change outline` of small diff views of the shapes that changed, then `## Preview`. Phases and the rest follow. No length rule applies to the outline or the preview. The view rules are adapted from humanlayer/skills' visual-pr (MIT, license vendored beside them). It is ported, not installed: routines load no plugins, and visual-pr replaces the whole body, which drops the `## Phases` and `Closes #N` the dispatcher reads. A markers test pins that `## Phases` below an outline, with a fenced `## Phases` inside it, still counts only the real checklist. Bumps the plugin to 2.4.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reviewer reads the outline first, so a view that disagrees with the diff points the whole review at the wrong thing. The critic now checks it and files a contradiction as should-fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
I could not request a reviewer here, so this is the step left for you.
🤖 sydevs dispatcher |
This was referenced Oct 4, 2026
Merged
Ardnived
pushed a commit
that referenced
this pull request
Oct 5, 2026
…the dispatcher takes (#147) * fix(preflight): fetch the default branch before trusting its ref A routine clone's `origin/<default-branch>` ref is whatever the image shipped, not what main holds. Step 6 named `worktreeSetup` and `git remote set-head`, neither of which fetches, so every diff and every `git worktree add` taken against that ref was wrong until the run noticed. 11 sessions across four days paid for it. SahajCloud#859's critic read 83 files and 32,953 insertions for a 3-file diff; SahajAtlasWordpress#47's read a 0.2.0 version bump that was not in the PR and nearly filed a phantom release-cutting blocker; SahajCloud#860 and #864 branched a worktree off a stale base and needed a hard reset; SahajAtlasWordpress#50's clone was 9 commits behind. This reflect run reproduced it on its own checkout: `git fetch origin main` moved `origin/main` de6440e -> de7c0bd. The order matters. `set-head` is what `/security-review` reads, and `worktreeSetup` runs last because it is the slow step and the two git commands are what make its output meaningful. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * fix(review): diff against origin/<branch>, never FETCH_HEAD Step 3 said `git diff origin/main...FETCH_HEAD`. Preflight step 6 now fetches the default branch, and any run that fetches it overwrites `FETCH_HEAD`, so the recipe returns an empty diffstat with nothing wrong on screen. 3 sessions across two days hit it and each landed on the same answer: SahajCloud#856 ("returned an empty diffstat"), SahajCloud#859 ("the next diff came back empty"), SahajAtlasWordpress#47 ("overwrote the branch's FETCH_HEAD"). A named remote ref cannot be clobbered by a later fetch. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * feat(preflight): worktreeSetup is owed when a node command is Step 6 asked every run for `worktreeSetup` before its first command. A read-only handler runs no lane, so `pnpm install` buys it nothing, and 11 sessions across four days skipped it and spent a friction line saying why: "a read-only review needs no install, and `pnpm install` would have spent much of a 45-minute lease" (SahajCloud#857), "pure lease spend" (SahajCloud#874), "the install would have spent the lease" (#882). Blessing the skip alone would keep the half that costs something. Three of those sessions then could not settle a framework claim the finding rested on — SahajCloud#857's `jobs.queue` `overrideAccess` default went unverified and was "the crux of finding 1"; SahajCloud#875's critic curled unpkg for `[email protected]` instead; WeMeditateWeb#156's appended spec could not be run. So the install is deferred, not waived, and an unverifiable assertion is refused rather than shipped. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * fix(revise): name the reviewProposals fire, which carries no instruction Reads said the instruction is the comment `trigger.id` points at. On a `dispatch.reviewProposals` auto-revision there is no such comment and `trigger.id` is null, so the skill named no grounding for the path that fires on every bot-filed ticket. 3 sessions across two days reported it: SahajCloud#871 ("the run had no instruction to read"), WeMeditateWeb#154, SahajAtlasWeb#244 ("only `loop-config.json` `dispatch.reviewProposals` states that path"). Each worked from the code, which is the right answer — now it is written where the handler reads it rather than inferred from a config comment. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * fix(address-review): refresh the PR body when the push falsified it Step 4 asked for a body refresh after every push. `update_pull_request` replaces the whole body and no MCP read writes it to a file, so the only way to add two filenames is to retype 8,000 to 15,000 characters out of a tool result — and #142's mandatory `## Change outline` makes those bodies longer, not shorter. 6 sessions across four days declined, and most applied this exact test unaided: "the body had become false nowhere" (SahajCloud#874), "retyping 8000 characters to correct two test counts risked corrupting an accurate body" (SahajCloud#853), "a 15k-char retype bought nothing" (SahajAtlasWeb#243). Two got it wrong in the other direction and left a false body up — SahajAtlasWeb#243's "one decision is yours" block outlived the branch that took both decisions, and SahajCloud#873's lockfile table reported moves the lockfile does not have. So the trigger is falsification, not the push. That keeps the refresh where it is load-bearing and stops it competing for a lease where it is not. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * docs(review): value 1, asked of the total rather than the layer Profile refinement, gated on two PRs in the window where the reviewer drew the same question six times and this review passed clean on all of it: SahajAtlasWeb#243 and #247. The existing bimodal rule is applied per layer, and on both PRs every layer passed it — each piece of shadow-DOM or Tailwind-v4 machinery was forced by a constraint the author had measured and stated. The reviewer asked instead whether an approach that forces that many pieces is the right approach, and asked it of files, helpers, a polling loop and a comment block alike. Written at the level of the value, not the incident: count the bespoke pieces a diff adds against one boundary, and where there are several the finding is the approach. Scoped so it does not fire on a one-piece diff, and separated from the 2026-09-27 membership bullet it would otherwise read as a restatement of. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * chore(plugin): 2.5.0 `version` is the installed plugin's cache key. Four skills and the reviewer profile moved, so this is a minor bump. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * fix(hooks): quote CLAUDE_PLUGIN_ROOT, so the lean gate can pass again `claude plugin validate ./workflow --strict` is this repo's entire automated gate, and on Claude Code 2.1.289 it fails on `origin/main`: four `hooks.json` commands interpolate `${CLAUDE_PLUGIN_ROOT}` unquoted, which the validator warns about and `--strict` turns into an error. #132 reported these four as no longer raised by the CLI it ran on, so this is a CLI change, not a regression here. Verified both sides: `--strict` exits 1 identically on `origin/main` and on this branch before the fix, and 0 after. Without the fix no PR in this repo can show a green gate, including this one. The hooks run in a maintainer's own session, so the change is the smallest that clears the warning: the placeholder is quoted, the path is otherwise byte-identical, the JSON parses, and `block-wrong-bash.mjs` was invoked through the new quoted form and exited 0. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * docs(why): the third thing a routine clone is missing The section named `node_modules` and `origin/HEAD`, which read as a complete list and hid the stale `origin/<default-branch>` ref behind it. Records the count and the three worst outcomes, why a stale ref is worse than a missing one, and why the install is deferred rather than waived. Also disambiguates the `FETCH_HEAD` note in `adversarial-review` step 3: it is preflight's fetch that overwrites the ref, not a step 6 in that skill's own list. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U7n4cu5djzGwFZ9i5gFTne * docs(review): fold value 1's three scopes into the value The three dated bullets each declared themselves value 1 at a different scope -- 09-12 of guards, 09-27 of membership, 10-04 of the aggregate. Line 124 says to fold bullets into the owning value when that happens, and this PR's own bullet is what made them three. Value 1 now states the layer question, then the three wider readings in order, widest first. Every PR link and quote survives; what goes is the cross-referencing the ladder makes structural -- 09-27's "tie-breaker against the 2026-09-12 bullet below" and 10-04's "it is not the 2026-09-27 bullet", each of which existed only because the rules sat apart. Value-1 material drops 83 lines to 69, and `Recent refinements` drops 98 lines to 28. rule-delta reports 62 -> 62, no directive dropped. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ej2qbnRfj5zexAGFdTJ8ci * fix(address-review): name the mechanism the refresh uses The step gave "no read writes it to a file" as the reason a refresh is conditional. That understates what the run holds: preflight step 4 already read the body as the run's grounding, so the choice is not retyping 15k characters from nothing, it is re-sending the body you hold with the delta applied. The step now says that. The trigger stays falsification, and now names the case that drifts. A `## Change outline` view the new commits contradict is false, not merely incomplete, so it forces the refresh -- `change-outline.md` already forbids a contradicted view and `adversarial-review` step 2 makes one a `should-fix`. SahajAtlasWeb#243 took 8 address-review rounds last week, which is 8 chances for the outline to drift. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ej2qbnRfj5zexAGFdTJ8ci --------- Co-authored-by: Claude <[email protected]> Co-authored-by: sydevs-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change outline
Flow — the PR body, top to bottom
The reviewer's first screen is now the summary, the change's shape, and where to see it. No length rule applies to the outline or the preview.
Behaviour — how a run builds the outline
adversarial-review: gather context 1. linked ticket 2. PR body + a view the diff contradicts → should-fix 3. diffFiles
Test results
claude plugin validate ./workflow --strict): ✓node --test dispatcher/test/*.test.mjs: 106 passed, including the newparsePhasescaserule-delta.mjs --base origin/main: 59 → 62 directives, 3 added, none removedste-lint.pyon the new and changed lines: 0 violationsNotes for reviewer
visual-prreplaces the whole body. That drops## PhasesandCloses #N, which the dispatcher reads. It also writes withghand opens its own PR.## Phasesdown is safe.parsePhasesmatches the heading anywhere and skips fenced blocks. The new test pins both.Detail
Dry run. I wrote outlines under the new rules for SahajCloud#834 and SahajAtlasWeb#234, and rendered both through GitHub's markdown API. Nothing was posted. Both rendered cleanly with diff colouring.
The first draft of the rules had gaps, and the dry run surfaced them. These fixes are now in
change-outline.md:The Preview note also gained the Railway PR-number host.
🤖 Generated with Claude Code