feat(code-quality-plugin): add parallel-sweep rename map and auditor briefing to bulk-sweep-classify - #2317
Open
laurigates wants to merge 1 commit into
Open
Conversation
…briefing to bulk-sweep-classify Two additions learned from a 112-file Trends -> Foresight sweep in ForumViriumHelsinki/thelma (PR #1263), which also renamed a Postgres enum TrendType -> ForesightType. Parallelizing a sweep: when a sweep fans out across agents, the new failure mode is agents disagreeing about borderline renames, yielding a codebase that compiles per-file but not as a whole. Resolving every cross-file naming decision into a central rename map (plus an explicit do-NOT-rename list) and briefing it verbatim into every agent moves agreement out of the agents, so file grouping only has to guarantee disjointness. Agents refusing an out-of-map rename (LinkableEntityType) is the contract's success signal. Auditor briefing: adversarial auditors given only the transform contract flag the change's own reason for existing as scope creep — 10 of 25 findings in that session were false positives from that single omission. Auditor prompts must state what the artifact is FOR alongside the transform contract. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DvcEm3GrLgboEaKA24evDG
Contributor
Plugin Compliance Review
Recommendations
|
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.
What
Extends the existing
code-quality-plugin:bulk-sweep-classifyskill with two sections. Additive — no existing content was rewritten, and the skill's own regression test (scripts/tests/test-bulk-sweep-classify.sh, 11 checks) still passes.1. Parallelizing a Sweep — Resolve the Rename Map Before Dispatch
Once a sweep fans out across parallel agents, a failure mode appears that the four-category discipline alone doesn't cover: the agents disagree with each other about borderline renames. Each decision is locally defensible, and the result is a codebase that compiles file-by-file but not as a whole.
The fix is to resolve every cross-file naming decision before dispatch into a single explicit rename map (old → new, plus an explicit do-NOT-rename list drawn from the skill's category 2–4 buckets), and brief that map verbatim into every agent's prompt. That moves agreement out of the agents and into a shared artifact — so file grouping then only has to guarantee disjointness, a much weaker and easier property than getting independent agents to converge.
The section also names the success signal, because it's counter-intuitive: an agent refusing a rename is the contract working. A run where nobody declines anything usually means the map wasn't actually constraining them.
2. Brief Adversarial Auditors With the Artifact's Purpose, Not Just the Transform
An auditor given only the transform contract ("rename X to Y across these files") has no way to distinguish a deliberate change from scope creep — so it flags the change's own reason for existing. Every auditor prompt needs both the transform contract and a statement of what the artifact is FOR and what is deliberately in scope.
Why it's reusable beyond one repo
Neither section is language-, framework-, or repo-specific. The first is a property of fanning any cross-file decision out to independent agents: consensus is expensive to obtain from agents and free to obtain from a pre-resolved artifact. The second is a property of any adversarial review whose brief omits intent — the auditor's only available frame becomes "is this in the diff contract?", so purpose-driven changes read as creep.
Both sit naturally in this skill because it already owns the "the regex sees text, the transform needs semantics" discipline; the rename map is just that classification resolved once and shared, rather than re-derived per agent.
Where it was used
A 112-file
Trends → Foresightrename inForumViriumHelsinki/thelma(PR #1263), which also renamed a Postgres enumTrendType → ForesightType. The skill's existing four-category discipline is what kept that sweep from corrupting an enum value; these two things it did not yet cover.Evidence cited in the sections:
LinkableEntityType— contains the target word, not in the mapAlso in this PR
Related:agent-patterns-plugin:parallel-agent-dispatch(dispatch mechanics — the rename map is the sweep-specific payload it carries) andagent-patterns-plugin:adversarial-review(the review pass itself).code-quality-plugin/README.mdcatalog line extended to mention the new guidance (the pre-commit README-currency nudge fired; addressed in the same commit).modified:bumped to 2026-08-08, matching the repo's convention.🤖 Generated with Claude Code
https://claude.ai/code/session_01DvcEm3GrLgboEaKA24evDG