Skip to content

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
mainfrom
docs/bulk-sweep-parallel-and-auditor-briefing
Open

feat(code-quality-plugin): add parallel-sweep rename map and auditor briefing to bulk-sweep-classify#2317
laurigates wants to merge 1 commit into
mainfrom
docs/bulk-sweep-parallel-and-auditor-briefing

Conversation

@laurigates

Copy link
Copy Markdown
Owner

What

Extends the existing code-quality-plugin:bulk-sweep-classify skill 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 → Foresight rename in ForumViriumHelsinki/thelma (PR #1263), which also renamed a Postgres enum TrendType → 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:

Observation What it demonstrates
112 files across parallel agents, one central rename map Disjoint file grouping was sufficient once agreement was pre-resolved
Agents declined to rename LinkableEntityType — contains the target word, not in the map The do-NOT-rename list held against an agent "helpfully" extending scope
All three adversarial auditors flagged the PR's central purpose as scope creep; 10 of 25 findings were false positives from that one omission Cost of briefing auditors with the transform contract alone

Also in this PR

  • Cross-links added to Related: agent-patterns-plugin:parallel-agent-dispatch (dispatch mechanics — the rename map is the sweep-specific payload it carries) and agent-patterns-plugin:adversarial-review (the review pass itself).
  • code-quality-plugin/README.md catalog line extended to mention the new guidance (the pre-commit README-currency nudge fired; addressed in the same commit).
  • Frontmatter modified: bumped to 2026-08-08, matching the repo's convention.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DvcEm3GrLgboEaKA24evDG

…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
@laurigates laurigates added docs Documentation changes code-quality-plugin Code-quality plugin related labels Aug 8, 2026
@laurigates laurigates self-assigned this Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Plugin Compliance Review

Plugin plugin.json Frontmatter Body Marketplace Release Config Bash Patterns Descriptions When-to-Use Size Overall
code-quality-plugin ⚠️ ⚠️ ⚠️

Recommendations

  • ⚠️ code-quality-plugin/bulk-sweep-classify: description is 236 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ code-quality-plugin/bulk-sweep-classify: SKILL.md is 11901 chars (~2975 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ code-quality-plugin/code-docs-quality: SKILL.md is 13061 chars (~3265 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ code-quality-plugin/code-hidden-failures: SKILL.md is 11901 chars (~2975 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ code-quality-plugin/dry-consolidation: SKILL.md is 11848 chars (~2962 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)

@laurigates laurigates removed the docs Documentation changes label Aug 8, 2026
@laurigates laurigates changed the title docs(code-quality-plugin): add parallel-sweep rename map and auditor briefing to bulk-sweep-classify feat(code-quality-plugin): add parallel-sweep rename map and auditor briefing to bulk-sweep-classify Aug 8, 2026
@laurigates laurigates added the enhancement New feature or improvement label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality-plugin Code-quality plugin related enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant