agentleFS
EtanHeyEtanHey/golems/skills/golem-powers/convention-audit/SKILL.md

convention-audit

Skill0 starsChanged 16 days agoApache-2.0View on GitHub

Audit code for duplicated ownership, uncoordinated implementations, multiple writers, split lifecycle controls, live-copy drift, or missing single sources of truth. NOT for generic lint, style, security, or architectural research audits.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep a finding only when all are true:

    line 31
  2. Very specific:

    Every relevant site is listed as file:line and verified against the current tree.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Convention Audit

Answer one question:

Where does one concept have multiple independent implementations that can silently diverge?

This is a report-only audit. Do not fix findings in the audited repository; each fix needs its own owning-repo PR loop.

Run

bash skills/golem-powers/convention-audit/scripts/run.sh \
  --repo /absolute/path/to/repo \
  --output-dir /absolute/path/to/reports

The runner fans out raw codex exec workers across six concept lenses, then sends their candidates through a separate synthesis worker. Every worker resolves codex.implement through scripts/model-roles.mjs --stable with max reasoning. It may fall back to xhigh only when Codex explicitly rejects max; all other pin failures stop the run. A successful preflight must accept the requested model and effort, and its raw startup banner is retained in pin-preflight.log. That banner is acceptance evidence from the CLI, not independent server-side model telemetry. repoGolem aliases are forbidden because they can drop model and effort.

The time/query lens also receives a deterministic Python-source inventory for lower-bound SQLite datetime() comparisons. This is a narrow seed, not a general detector: the model workers remain responsible for other languages, query shapes, and convention families.

Raw lens outputs are candidates, not reports. They must be structurally valid, but a lens may cite a broad implementation entrypoint and a more specific divergent line. Those candidates still reach synthesis; the final synthesis output is rejected unless every divergent path:line also appears verbatim in its finding's implementation-site set. The runner checkpoints run-log.json through preflight, analysis, synthesis, and reporting. A handled failure overwrites it with status: failed, the failing stage and error, partial worker telemetry, and target-state verification when available.

Finding Gate

Keep a finding only when all are true:

  1. One concept has at least two independent implementation or ownership sites.
  2. Every relevant site is listed as file:line and verified against the current tree.
  3. At least one concrete drift state is explained; resemblance alone is insufficient.
  4. A shared helper, owner, controller, or derivation shape would collapse the sites.

Callers that already share one helper are a must-not-flag control. Ignore naming, formatting, ordinary repeated syntax, generic lint, and speculative refactors. Workers may inspect only the audited repository root; external eval, collab, report, skill, and checkout paths are out of scope and may contain answer keys.

Output Contract

Each finding includes the concept, every implementation site, only the divergent sites, and the smallest shared-helper shape. Each repo report also includes:

  • requested model and effort accepted by the successful preflight, plus its raw banner evidence;
  • whether detection was seed-assisted; when no seed fires, an explicit warning that unseeded lenses have no measured known-answer detection evidence;
  • output tokens and wall-clock duration;
  • Codex CLI cost telemetry, or an explicit unavailable value when the CLI emits none;
  • raw worker logs and git-visible unchanged-target-state verification, with the verification scope recorded explicitly.
  • on failure, a durable partial run-log.json; raw candidates remain non-actionable unless synthesis completes under the strict finding contract.

Routing

  • BrainLayer findings: @bl-cleanup primary, @brainlayer copied.
  • VoiceLayer findings: flag for a successor seat; the previous seat is retired.
  • Findings remain reports until the owning lane opens a separate implementation loop.

Rollout Calibration Gate

Run BrainLayer first: it owns the known answer and its static seed fires there. Before authorizing VoiceLayer or cmuxlayer, use the BrainLayer report to select one independently verified defect outside the seed's SQLite-window family—such as live-copy drift, path/worktree identity, or split lifecycle ownership—and record whether an unseeded model lens found it. If no unseeded calibration point passes, do not spend the later repo runs.

Common Mistakes

MistakeCorrection
Running a broad conventions reviewAsk only the single-source-of-truth question.
Flagging three callers of one helperReturn no finding; ownership is already shared.
Listing examples instead of every siteRe-scan and enumerate the full concept surface.
Reporting a requested pin as independent effective telemetryReport it as a successful preflight acceptance and retain the startup banner.
Editing the target while auditingStop; raw workers run in a read-only sandbox and the runner verifies tracked and nonignored git-visible state.
Treating the static seed as broad discoveryState that it covers Python SQLite recent-window comparisons only.
Reading eval fixtures or answer keys from outside the targetStop; workers and synthesis are scoped to the audited repository root.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.