Grok Bot engineering lead shares a prompt for auditing agent-facing text in repositories
Lauren Tan shares a reusable prompt for auditing the unstructured agent-facing text in a repository (AGENTS.md, skills, cursor rules, etc.) and replacing as much of it as possible with executable code, types, lint, and tests.
The original post provides the full reusable audit prompt, which turns agent-facing text rules into executable checks and uses blind ablation testing to verify whether each one needs to stay.
here's a prompt you can try
Audit all unstructured agent-facing text in this repo (AGENTS.md, skills, cursor rules, architecture/spec markdown docs) and replace as much of it as possible with executable code, types, lints, and tests. Then prove empirically what text actually earns its context window.
1. Inventory: list every doc, rule, and skill file, its byte size, and classify each claim into:
- Restates code or types (delete)
- Mechanically enforceable (convert into a linter, compiler check, typed API, or test, then delete the prose)
- Irreducible judgment call (candidate to keep, only if concise)
2. Prune and enforce: move enforceable rules into CI/lints/tests first, delete the dead prose, and shrink root instructions to only what automated checks cannot catch.
3. Run a blinded ablation eval before keeping any remaining instructions/skills:
- Pick 1 to 2 representative real tasks from this repo with an objective rubric and stress tests.
- Pre-register a prune rule before running (for example: drop the larger text set unless its median beats the smaller set by at least 2 points).
- Run 3 fresh isolated replicates per condition on clean commits that differ ONLY in the text under test:
- A: full current instructions/skills
- B: domain-only instructions
- C: minimal root instructions only (0 skills/extra docs)
- Audit transcripts for leaks (verify which files were actually opened vs just sitting in the system prompt).
- Grade blinded diffs + built artifacts only (strip branch names, SHAs, and notes) using a separate judge model + automated probe tests.
4. Report the scorecard, which docs/skills were never opened, where extra text hurt or helped, and delete everything that fails the pre-registered prune rule. Turn any recurring failure modes into tests or lints, not new prose.
Source: lauren · x.com