feat(review): surface reviewed-file edits deterministically — Tier A (nudge + version) - #195
Merged
Conversation
… command) Every review-loop failure the driving use case (muster's plan reviews) hit was "the agent didn't run a command" -- a comment left QUEUED (no `done`), no working pill (no `status`). Nagging the LLM harder via the skill is non-deterministic; it can always forget. This makes prereview observe ground truth instead: it watches the reviewed files, so the moment the agent edits one, the reviewer sees it -- no command required. (Tier A of a scoped plan; Tier B, a first-class "edited" comment state, is separate.) The pieces already existed; only the trigger was missing: - reviewedFilesFingerprint (mtime+size over versionScope), a sibling of agentSignalFingerprint, joins the 750ms WatchLLMStatus poll -- so a reviewed-file change is a first-class trigger alongside the agent's sidecars. - A1 (nudge): on a change the watcher bumps a per-tab reviewedGen; LLMStatusChanged nudges PendingRefresh when a tab's SeenReviewedGen lags -- the same non-intrusive, frozen-view refresh the working->done path already uses (scroll/drafts survive; refresh rebuilds and re-anchors). - A2 (version + diff): the same change checkpoints a version, so the reviewer gets the DIFF of what changed even with no `done` message. Ordered after the llm-done checkpoint and suppressed while `working`, so an agent that does use status keeps its richer changelog (the file-edit checkpoint becomes a SHA no-op); a bare edit gets its own changelog-less version. SKILL.md reframes `status working/done` from a required progress signal to optional enrichment (the reviewer already sees the edit + its version via the file-watch; status just adds a message and a changelog). Tests: unit (fingerprint fires iff a scoped file changes; handler nudges on a gen bump with no agent status; the watcher checkpoints a file-edit version, dedups a no-op touch by SHA, and defers to working->done so the changelog is never lost) + a deterministic browser e2e (a raw os.WriteFile edit -- zero prereview commands -- surfaces the nudge AND checkpoints a file-edit version). Existing internal/review + e2e suites stay green. Cost note: the fingerprint stats scoped files per tick; single-file/NoGit mode (muster's plan) is one stat, git mode runs `git` name-status per tick -- fine for a local tool, flagged in a comment as the sole thing to revisit for a huge repo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FG91be8B49Jq7sNMJskM8c
adnaan
force-pushed
the
feat/det-review-state
branch
from
July 23, 2026 19:14
6f6fb37 to
3b93ce4
Compare
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.
The problem
Every review-loop failure in the driving use case (muster's plan reviews) was the same shape: "the agent didn't run a command." A comment left QUEUED (no
done); no "working" pill (nostatus). Nagging the LLM harder via the skill is non-deterministic — it can always forget.The fix: observe ground truth, not the agent's narration
prereview now watches the reviewed files. The moment the agent edits one, the reviewer sees it — with no command from the agent. Every piece already existed; only the trigger was missing.
Trigger —
reviewedFilesFingerprint(mtime+size overversionScope), a sibling of the existing sidecar fingerprint, joins the existing 750msWatchLLMStatuspoll. A reviewed-file change is now first-class alongside the agent's sidecar signals.A1 — the nudge. On a change the watcher bumps a per-tab
reviewedGen;LLMStatusChangednudges the existingPendingRefreshaffordance when a tab lags — the same non-intrusive, frozen-view refreshworking→donealready uses (scroll/drafts survive; refresh rebuilds + re-anchors). No new UI, no mid-read view mutation.A2 — the version + diff. The same change checkpoints a version, so the reviewer gets the diff of what changed even with no
donemessage. It's ordered after thellm-donecheckpoint and suppressed whileworking, so an agent that does use status keeps its richer changelog (the file-edit checkpoint becomes a SHA no-op); a bare edit gets its own changelog-less version.Skill update (ships with the behavior)
SKILL.mdreframesstatus working/donefrom a required progress signal to optional enrichment: the reviewer already sees the edit + its version via the file-watch, so skippingstatusno longer hides anything — it just adds a message and a changelog.Tests
working→doneso the agent's changelog is never lost.os.WriteFileedit — zero prereview commands — surfaces the nudge and checkpoints afile-editversion; asserts nollm-status.jsonwas written.internal/review+ e2e suites stay green.Notes
statper scoped file per tick. Single-file/NoGit (how muster reviews a plan) is one stat; git-mode runsgitname-status per tick — fine for a local tool, flagged in a comment as the sole thing to revisit for a huge repo.prereview done— is planned separately.🤖 Generated with Claude Code
https://claude.ai/code/session_01FG91be8B49Jq7sNMJskM8c