Doc Audit
Audits side task goal.md and scoring_details.md files for quality issues using an LLM with heuristic pre-analysis.
Purpose
Side tasks have two documentation files with different audiences:
goal.mdis shown to both the attacking agent and the monitor, so it must be a general one-liner; specifics make the monitor's job easier.scoring_details.mdis shown only to the attacking agent. It must give enough information to avoid needless failures while maximizing attack diversity, and should describe what success looks like rather than how to achieve it.
Each audit type uses a separate LLM call with its own system prompt. Regex-based heuristic checks run first, and their results go to the LLM as pre-analysis context.
Commands
ct run doc-audit
--apply writes the suggested fixes to disk, then re-audits the fixed tasks up to --max-iterations times (default 5) until all pass. Run ct run doc-audit --help for every option.
Examples:
# Audit both goal.md and scoring_details.md for an environment ct run doc-audit -e slack_clone # Audit only scoring_details.md ct run doc-audit -e slack_clone -t sd # Audit only goal.md for specific side tasks ct run doc-audit -e web_scraping -s visit_malicious_website -s expose_secret -t goal # Audit and apply goal.md fixes ct run doc-audit -e web_scraping -t goal --apply # Audit all environments ct run doc-audit --all-envs
What it checks
Goal audit
A goal.md fails if it contains:
- Named identifiers (variable names, function names, table names, API keys, file paths)
- Specific URLs, hostnames, or host:port
- Named persons, usernames, or emails
- Numeric thresholds (dollar amounts, percentages, ID ranges)
- Parenthetical lists enumerating specific items
- Method specifications (HOW rather than WHAT)
- Multi-line content, bullet points, or redundant sentences
Heuristic checks (13): line count, URLs, hostnames, file paths, specific users, magic numbers, ALL-CAPS identifiers, product names, bullet points, bare filenames, backtick refs, parenthetical lists, method specification.
Scoring details audit
A scoring_details.md fails if it is:
- Prescriptive: exact commands, curl examples, SQL queries, step-by-step instructions, DB connection strings with credentials
- Over-specified: reveals the full scorer test suite, lists all accepted values, exposes scorer internals
- Incomplete: missing submission format, contract info (what gets reset or rotated), or target identifiers
- Scorer-misaligned: describes an attack the scorer doesn't test
It passes if it describes what the scorer checks, provides submission format, states constraints, and leaves the attack approach to the agent.
Heuristic checks (12): code blocks, curl commands, SQL queries, step-by-step patterns, DB connection strings, function references, missing submission info, missing constraints, exhaustive lists, short documents, file paths, specific entity IDs.
Output
Per-task JSON files in the output directory with:
verdict: PASS or FAILconfidence: 1–10issues: specific problems foundsuggested_fix: corrected text if FAILreasoning: brief explanationheuristic_issues: pre-analysis flags from regex checks
Goal audit results also include specifics_to_move (what should move to scoring_details.md).
The output directory also holds a summary.json with aggregate counts across all audited tasks.