trace2rules audits AGENTS.md against real sessions: 66 rules, only 9 measurable, cargo fmt ignored 100%

rkkautsar · reddit · 2026-11-20

A new MIT-licensed CLI, trace2rules, treats local coding-agent session logs as data to audit whether your AGENTS.md/CLAUDE.md rules actually work. Auditing swc's AGENTS.md against 188 real sessions: only 9 of 66 rules were measurable, UPDATE=1 cargo test was violated in 86% of applicable sessions, cargo test -p <crate> in 92%, and cargo fmt/clippy were skipped in all 185 applicable sessions (CI catches issues but no local pre-commit means agents never self-correct). Built on DuckDB, it reads logs from Claude Code, Codex, OpenCode, Pi, and OMP. Three subcommands: audit (check rules against sessions), run (mine repeated friction into evidence-backed Markdown reports you can hand to your agent to write rules, no API key needed), and holdout (time-split sessions to validate rules). Outputs are heuristic suggestions to review, not auto-edits. Install: uv tool install trace2rules.

Original post →

More from coding & agent

coding & agent channel →