promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_

CLAUDE.md, AGENTS.md, .cursor/rules — the system prompt your agent reads every session — step 9 of 9

Checkpoint

One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.

Final drill. Audit a real-shape CLAUDE.md against all four properties, plus check for duplicate rules across nested files. Write audit_config(text, nested_text) that:

  • Splits both text (root) and nested_text (leaf) into rules (lines starting with - ).
  • Counts: root_rules, leaf_rules, duplicate_rules (rules that appear identically in both).
  • Counts fluff phrases (same list as step 8) across both files combined.
  • Returns {"root_rules": int, "leaf_rules": int, "duplicate_rules": int, "fluff_count": int, "advice": str} where advice is:
    • "good" if duplicate_rules == 0 AND fluff_count == 0
    • "prune duplicates" if duplicate_rules > 0
    • "cut fluff" if fluff_count > 0 (only when no duplicates)
    • if BOTH issues, return "prune duplicates" first (higher priority).

Two cases run. Expected output:

case 1: root=4 leaf=2 dup=1 fluff=0 advice=prune duplicates
case 2: root=3 leaf=2 dup=0 fluff=2 advice=cut fluff

full-screen editor opens — close anytime to keep reading.