feat(codebase-audit): add repo-wide drift-audit plugin#82
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_06a0237c-10ab-4a6c-816b-36be4577fac7) |
|
Claude finished @kyle-sexton's task in 4m 54s —— View job PR Review:
|
There was a problem hiding this comment.
Stale comment
Risk: low. Not approving because Cursor Bugbot skipped (usage limit reached) and did not complete automated review. Human review is needed; no reviewers were assigned because no non-author maintainers are available on this repository.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82ae54db22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_02a0783f-4b1c-4c43-80df-da8d70d7829e) |
|
Claude finished @kyle-sexton's task in 2m 39s —— View job PR Review:
|
| Prior finding | Status |
|---|---|
Missing ${CLAUDE_PLUGIN_ROOT} on 5 internal file refs (SKILL.md ×3, setup/SKILL.md, discovery-method.md) |
✅ All fixed |
| Config layer merge semantics undefined (same dimension in two layers) | ✅ Defined: union globs, concat+dedupe example-claims, empty list = explicit opt-out |
| Phase 2 "required" vs self-contained tension | ✅ Softened to "required when tooling exists" + needs-review graceful degrade path |
| Phase 7 mislabeled as auto-fix in model auto-invoke default | ✅ Fixed: "Phases 4–6 (auto-fix) and Phase 7 (retrospective)" |
|| echo "clean" never fires on a genuinely clean tree |
✅ Fixed to || echo "(unavailable)" |
| Eval #2 missing verified-non-issues expectation | ✅ Added: "Includes the required 'Verified non-issues' section even in review-only mode" |
| Background/unattended variant paragraph underdefined | ✅ Paragraph removed |
| Codex P2: cross-file dimensions missing peer files in verification-sources | ✅ Addressed in setup/SKILL.md defaults, config-template.md, and discovery-method.md fence note |
One remaining minor observation
Phase 3 zero-findings path vs. --review-only gate — ambiguous ordering.
SKILL.md:211–220 (zero-findings outcome) says "Skip Phases 4-6. Proceed directly to Phase 7 (Retrospective)." But the --review-only gate two lines later says "present the full report and STOP." In a zero-findings --review-only run, both instructions apply and they conflict — the model has to pick one.
The checklist template (templates/checklist.md:18) disambiguates cleanly in favor of STOP: "Phases 4-7 SKIPPED in --review-only mode." So the checklist wins here, but the skill prose is slightly inconsistent. A one-word addition would close it:
- - Skip Phases 4-6 (nothing to fix). Proceed directly to Phase 7 (Retrospective) with scope/coverage
- observations.
+ - Skip Phases 4-6 (nothing to fix). If not `--review-only`, proceed to Phase 7 (Retrospective) with
+ scope/coverage observations.This is cosmetic — the checklist already gives the right answer — so not a blocker. Worth fixing in a follow-up or bundling with the next change.
What looks good (current state)
- All
${CLAUDE_PLUGIN_ROOT}references are consistent — every internal skill file path uses the variable; markdown link targets are kept as relative paths for human browsability. Pattern matchesdiagnoseandreview-toolkit. - Merge semantics spec is precise and covers the important edge cases: UNION for globs, concat+dedupe for claims, empty = opt-out (not silent inheritance).
- Graceful degrade for missing research tools is well-defined:
needs-reviewtag surfaces the gap for human judgment without dropping or asserting. - Cross-file dimension fence note in
discovery-method.md(new paragraph, lines 63–70) is one of the highest-value additions — it's the root-cause explanation for whyverification-sourcesmust include source roots, not just a rule to follow. The setup defaults and config-template comments reinforce it. - Evals now cover all five critical behavioral contracts including verified-non-issues in review-only mode.
- Security posture is clean: no hooks, no MCP, no scripts, no absolute paths,
${CLAUDE_PLUGIN_ROOT}only, consumer files scoped to audit target. - Manifest and marketplace entry are schema-valid and consistent with the plugin fleet.
Verdict: ready to merge. The fix commit is comprehensive and well-targeted. The zero-findings/--review-only nit is the only open item and it's not a behavioral regression — the checklist already carries the right answer.
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving because Cursor Bugbot skipped (usage limit reached) and did not complete automated review. Human review is needed; no reviewers were assigned because no non-author maintainers are available on this repository.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1857930e10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_edd31716-21bf-42e6-9456-8b9f1346198d) |
|
Claude finished @kyle-sexton's task in 1m 54s —— View job PR Review:
|
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approving because Cursor Bugbot skipped (usage limit reached) and did not complete automated review. Human review is needed; no reviewers were assigned because no non-author maintainers are available on this repository.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Author + ship the codebase-audit plugin (category: quality) from medley's in-repo skill. Verifies factual claims in docs/config/code/architecture against reality via per-file subagent fan-out with independent validation. De-couples all medley path/convention assumptions: audit dimensions and their primary/verification/example-claim targets now flow through a tracked .claude/codebase-audit.md config seam (extensibility contract v2.1 seam 2, additive user-global -> team -> local overlay resolution), written by a re-runnable /codebase-audit:setup skill per the convention-resolution ladder. Refs melodic-software/medley#1376
- Use ${CLAUDE_PLUGIN_ROOT} on all internal skill file references so they
resolve from the plugin cache in a consumer repo (matches diagnose/
review-toolkit pattern; checklist ref already did).
- Spec additive merge semantics when a dimension name spans config layers
(union globs, concat+dedupe example-claims, empty lists = explicit opt-out).
- Cross-file dimensions (code-quality/architecture) must list source roots +
manifests in verification-sources so discovery agents can read peer files
under the read-only fence — wired in setup defaults, template, and the
discovery fence note (Codex P2).
- Soften Phase 2 "required" to "required when tooling exists" + needs-review
degrade path for missing research tools.
- Fix Phase 7 label (retrospective, not auto-fix); precomputed-context clean-
tree fallback (blank vs misleading "clean"); add verified-non-issues eval
expectation; drop the underdefined background-workflow paragraph.
Refs melodic-software/medley#1376
d6b8638 to
5e3f53c
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_45f2ffd9-8a8c-4182-97ee-6535d228022a) |
|
Claude finished @kyle-sexton's task in 2m 1s —— View job PR Review:
|
There was a problem hiding this comment.
Risk: medium. Not approving because Cursor Bugbot skipped (usage limit reached) and did not complete automated review. Human review is needed; no reviewers were assigned because no non-author maintainers are available on this repository.
Sent by Cursor Approval Agent: Pull Request Router and Approver


Refs melodic-software/medley#1376
What
New
codebase-auditplugin (category: quality) migrated from medley's in-repo.claude/skills/codebase-audit/. Verifies a codebase's factual claims — in docs, config, code,and architecture notes — against reality, distinct from diff/PR review (judges a change) and from
Claude Code config audits (check
settings.json/hooks/permissions).Two skills, one cohesive capability:
/codebase-audit:codebase-audit— the eight-phase audit: prime the repo's conventions, discovervia one-subagent-per-file claim-extraction fan-out (scope-gated), independently validate each finding
(a separate agent re-verifies — never self-review), severity-rate in the required table with a
verified-non-issues proof-of-thoroughness list, then fix in priority order or stop at
--review-only./codebase-audit:setup— re-runnable interview that infers audit targets from the repo layout andwrites the tracked
.claude/codebase-audit.mdconfig.Marketplace entry appended to
.claude-plugin/marketplace.json(category: quality); README catalogrow appended.
plugin.jsonpinsversion: 0.1.0.De-coupling from the source repo (contract v2.1)
The in-repo skill hardcoded this repo's audit targets (
libs/dotnet/Platform.*,Directory.Build.props,PLAT001-PLAT022,.claude/rules/**, a medley enumeration script). All of it is removed:primary-sources/verification-sources/example-claimsnow resolve from a tracked.claude/codebase-audit.mdconfig, additive across
~/.claude/codebase-audit.md(user-global) →.claude/codebase-audit.md(team) →
.claude/codebase-audit.local.md(gitignored overlay). Four bundled dimensions(documentation/configuration/code-quality/architecture) are tunable/removable; custom dimensions add.
persist via
/codebase-audit:setup; cannot infer → ask + offer persist; else safe generic default.No baked repo layout, ever.
setupskill that interviews + writes the tracked config(the rejected Thariq
config.jsonfirst-run pattern is not used).tools/codebase-audit/list-audit-targets.sh) dropped — targets come fromthe config seam, not a bundled script. Adjacent-lane references generalized to
/claude-config-audit:*"when installed", with inline out-of-scope fallback. Phase 4/5 build/verify/simplify steps generalized to the consumer's own gates.
Gate evidence
claude plugin validate --strict ./plugins/codebase-audit— PASSclaude plugin validate --strict .(catalog manifest) — PASS--plugin-dirsmoke test in a clean non-medley repo (freshgit initscratch dir): headless/codebase-audit:setupload confirmed under namespace; repliedSMOKE-OK codebase-audit.claude plugin details: always-on ~319 tok (codebase-audit ~160 / setup ~160); on-invoke~3.9k / ~1.1k.
typos(plugin + touched files): clean.markdownlint-cli2(8 files): 0 errors. All JSON valid (jq).Security review (plugin-acceptance)
evals/evals.jsonfixtures (established marketplace pattern).../reach-outs, no absolute paths; templates referenced via${CLAUDE_PLUGIN_ROOT}; the audit reads/writes only the consumer's own files under the given scope.consumer's setup provides.
playbook.
🤖 Generated with Claude Code
Note
Medium Risk
Markdown-only plugin with no hooks or bundled scripts, but a non–review-only run can modify consumer repo files and spawn many subagents; scope gates mitigate cost but depend on skill adherence.
Overview
Adds a new
codebase-auditmarketplace plugin (category: quality) and registers it inmarketplace.jsonand the root README catalog.The plugin ships two skills:
/codebase-audit:codebase-audit(eight-phase claim verification with per-file subagent fan-out, independent re-validation, scope/cost gates,--review-onlyand dimension flags, optional fix/verify/review phases) and/codebase-audit:setup(interactive interview that writes tracked.claude/codebase-audit.mdwith layered overlays). Audit targets are repo-agnostic via configurable dimensions (documentation,configuration,code-quality,architecture) and merge semantics across user/team/local config — no bundled medley-specific paths or enumeration scripts.Supporting markdown includes discovery method, category playbook, audit checklist, config template, phase checklist, and evals for both skills.
Reviewed by Cursor Bugbot for commit 5e3f53c. Bugbot is set up for automated code reviews on this repo. Configure here.