Diogo Santos’ Post

A ~550-word AGENTS.md reduced agent runtime by 28.64% and token usage by 16.58% on SWE-bench Verified. The trick wasn’t more context — it was less ambiguity. I tested these ideas while refactoring agent docs for a production Python/FastMCP monorepo at NOS. What stuck with me: 𝗔𝗚𝗘𝗡𝗧𝗦.𝗺𝗱 𝘄𝗼𝗿𝗸𝘀 𝘄𝗵𝗲𝗻 𝗶𝘁’𝘀 𝗲𝘅𝗲𝗰𝘂𝘁𝗮𝗯𝗹𝗲 𝗼𝗻𝗯𝗼𝗮𝗿𝗱𝗶𝗻𝗴. Setup + test commands beat prose (Lulla et al.). 𝗔𝗚𝗘𝗡𝗧𝗦.𝗺𝗱 𝗶𝘀 𝗯𝗲𝗰𝗼𝗺𝗶𝗻𝗴 𝘁𝗵𝗲 𝗶𝗻𝘁𝗲𝗿𝗼𝗽𝗲𝗿𝗮𝗯𝗹𝗲 𝗱𝗲𝗳𝗮𝘂𝗹𝘁. 4,860 context files across GitHub; `.cursorrules` is basically legacy (Galster et al.). 𝗦𝗵𝗼𝗿𝘁 𝗯𝗲𝗮𝘁𝘀 𝗰𝗼𝗺𝗽𝗿𝗲𝗵𝗲𝗻𝘀𝗶𝘃𝗲. Most files are <500 words; medians cluster around ~335–535 words (Chatlatanagulchai et al.). 𝗧𝗲𝘀𝘁𝗶𝗻𝗴 𝗶𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝘁𝗵𝗲 𝗵𝗶𝗴𝗵𝗲𝘀𝘁-𝘀𝗶𝗴𝗻𝗮𝗹 𝘀𝗲𝗰𝘁𝗶𝗼𝗻. They show up in ~75% of high-quality files. 𝗔𝘂𝘁𝗼-𝗴𝗲𝗻𝗲𝗿𝗮𝘁𝗲𝗱 𝗰𝗼𝗻𝘁𝗲𝘅𝘁 𝗰𝗮𝗻 𝗯𝗮𝗰𝗸𝗳𝗶𝗿𝗲. LLM-generated files dropped success by ~3% on average while raising cost >20% (Gloaguen et al.). 𝗙𝗶𝗹𝗲 𝗹𝗼𝗰𝗮𝗹𝗶𝘇𝗮𝘁𝗶𝗼𝗻 𝗶𝘀 𝘄𝗵𝗲𝗿𝗲 𝗮𝗴𝗲𝗻𝘁𝘀 𝗳𝗮𝗶𝗹 𝗳𝗶𝗿𝘀𝘁. If they edit the wrong file, everything downstream collapses (ContextBench). What I did with this: one canonical AGENTS.md (~550 words, every snippet verified), CLAUDE.md + Copilot instructions as thin pointers, deleted `.cursorrules`, and 4 path-scoped instruction files that auto-inject context per folder. Takeaway: context engineering is mostly negative space — remove contradictions, name the right files, and make “run tests” unmissable. Sources: https://lnkd.in/eM-HnnGs https://lnkd.in/eN7pUsfY https://lnkd.in/eHAarmSC https://lnkd.in/e9Fx6UC7 https://lnkd.in/eJM2EHkh https://lnkd.in/eTqgZZqK https://lnkd.in/egk_dX8U #ContextEngineering #AICoding #CodingAgents #SoftwareEngineering #MCP #LLMs #DeveloperTools

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories