Pruning Agent Prompts: Why I Cut My Factory's Rules by 65%
Post-mortem fixes bloated my dark factory's agent prompts to 17,072 words in 30 days. See what happened when I cut 65% of the rules and moved them to code.
~/Code/jduncan-blog
Engineering, craft, and curiosity.
Self-taught engineer, recovering history major. Tech, woodworking, home automation.
Post-mortem fixes bloated my dark factory's agent prompts to 17,072 words in 30 days. See what happened when I cut 65% of the rules and moved them to code.
How I built an autonomous security loop in Leaf with Trivy, Semgrep, and an examiner agent, and what its first 289 findings fixed in BrandCast.
After 15.8 billion tokens and 208,649 model turns in Leaf, SWE-bench and static price routers like LiteLLM optimize for the wrong thing. Buy runs, not models.
Interactive agent skills rely on progressive disclosure and human guardrails. My token data shows why unattended 2027 loops need radically smaller context.
How I rebuilt Leaf as a local-first Level 5 dark software factory using adversarial validation, role-scoped WebSocket rooms, and deterministic CI/CD tasks.