convention-audit
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.
- License 许可
- Apache-2.0
- 所属仓库
- EtanHey/golems
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- convention-audit
- execute
- scripts/run.sh
- description
- 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.
02 资源文件 38
- 参考文档evals/evals.json5.4 KB
- 参考文档evals/expected/known-answer.json1.4 KB
- 参考文档evals/expected/shared-helper-control.json61 B
- 脚本evals/fixtures/shared-helper-control/benchmark.py125 B
- 脚本evals/fixtures/shared-helper-control/enrich.py122 B
- 脚本evals/fixtures/shared-helper-control/search.py117 B
- 脚本evals/fixtures/shared-helper-control/time_windows.py197 B
- 其他evals/green-with-skill.log1.8 KB
- 其他evals/red-baseline.log952 B
- 参考文档evals/results/brainlayer-failure-replay.json2.7 KB
- 参考文档evals/results/iterate-2-evidence.json8.1 KB
- 其他evals/results/round2-control-live/pin-preflight.log577 B
- 参考文档evals/results/round2-control-live/results.json2.4 KB
- 其他evals/results/round2-served-run/pin-preflight.log523 B
- 参考文档evals/results/round2-served-run/report.json1.9 KB
- 参考文档evals/results/round2-served-run/report.md1.5 KB
- 参考文档evals/results/round2-served-run/run-log.json5.3 KB
- 参考文档evals/review-disposition-log.md2.9 KB
- 脚本evals/run_live_eval.py15.4 KB
- 脚本scripts/__tests__/fixtures/emitted-refusal.json6.5 KB
- 脚本scripts/__tests__/fixtures/emitted-success.json9.6 KB
- 脚本scripts/__tests__/fixtures/fake-codex.py592 B
- 脚本scripts/__tests__/fixtures/split-contract.json12.5 KB
- 脚本scripts/__tests__/test_convention_audit.py33.5 KB
- 脚本scripts/__tests__/test_convention_split_contract.py8.9 KB
- 脚本scripts/__tests__/test_role_default.py2.5 KB
- 脚本scripts/convention_audit_impl/__init__.py286 B
- 脚本scripts/convention_audit_impl/audit.py11.5 KB
- 脚本scripts/convention_audit_impl/cli.py1.8 KB
- 脚本scripts/convention_audit_impl/codex_runner.py6.9 KB
- 脚本scripts/convention_audit_impl/detector.py3.4 KB
- 脚本scripts/convention_audit_impl/payloads.py3.6 KB
- 脚本scripts/convention_audit_impl/README.md1.5 KB
- 脚本scripts/convention_audit_impl/reporting.py8.1 KB
- 脚本scripts/convention_audit.py5.1 KB
- 脚本scripts/report.schema.json1.5 KB
- 脚本scripts/run.sh151 B
- 脚本scripts/worker.schema.json1.5 KB
03 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:
- One concept has at least two independent implementation or ownership sites.
- Every relevant site is listed as
file:lineand verified against the current tree. - At least one concrete drift state is explained; resemblance alone is insufficient.
- 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
unavailablevalue 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-cleanupprimary,@brainlayercopied. - 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
| Mistake | Correction |
|---|---|
| Running a broad conventions review | Ask only the single-source-of-truth question. |
| Flagging three callers of one helper | Return no finding; ownership is already shared. |
| Listing examples instead of every site | Re-scan and enumerate the full concept surface. |
| Reporting a requested pin as independent effective telemetry | Report it as a successful preflight acceptance and retain the startup banner. |
| Editing the target while auditing | Stop; raw workers run in a read-only sandbox and the runner verifies tracked and nonignored git-visible state. |
| Treating the static seed as broad discovery | State that it covers Python SQLite recent-window comparisons only. |
| Reading eval fixtures or answer keys from outside the target | Stop; workers and synthesis are scoped to the audited repository root. |
04 同仓库更多 Skills
yash
Push dependency bugs upstream. Triggers: dependency bug, workaround, monkey-patch, fork/fix. NOT app bugs.
whats-new
Diff Claude/Codex/Cursor/Wispr/agy changelogs vs local setup. Triggers: whats new, changelog, version bump.
weave
Orchestrator convergence: mine JSONLs, cite findings, route actions. Triggers: weave, run weave.
unslop
Cut AI tells while keeping every receipt, number, path, and hedge intact. Triggers: unslop, cut the slop, wall of text, too verbose, rambly, make this readable. NOT for delivery cadence (see i-have-adhd), channel choice, or artifact length governance.
tmp-block
Guard denying durable writes to /tmp, /private/tmp, /var/folders, $TMPDIR; enforces <repo>/.worktrees/<name>. Triggers: tmp guard, TMP-BLOCK deny, WORKTREE-CONVENTION deny, bypass ledger. NOT for storage policy.
t3-visuals
Show/visualize/chart/diagram/compare/status board in T3 with compact interactive HTML. Not standalone dashboards.