How to Slim Down Agent Instructions in the Strong-Model Era
As coding assistants and autonomous agents follow instructions more literally, broad “load everything” rules inflate context, slow work, and raise hallucination risk. This article explains how to replace vague triggers and mandatory full reads with task predicates, on-demand documents, and a small, non-conflicting rule set.
As coding assistants and autonomous agents enter a stronger instruction-following stage, context strategies that once favored “write more and force a full read” are breaking down. Models now execute each rule more carefully. Overly broad trigger phrases pull unrelated skills into context as a whole package. Conflicting constraints make the model pause early, ask for confirmation repeatedly, or block the task outright. For developers, this is no longer a matter of style. It is an engineering problem of cost, latency, and hallucination risk. Skill descriptions, project-level agent instructions, and always-on rules need a structured cleanup.
Why old “slow learner” habits become negative optimization
Early agents often skipped repository docs or checklists, so teams wrote rules broadly: load the migration skill whenever a change touched databases, queries, models, or persistence; before every code edit, read the architecture, database, and deployment documents in full. In the weak-model era, that kind of forced insurance compensated for a lack of initiative. In the strong-model era, the same rules are executed literally. Fixing a query or changing one object-mapping field can be judged “database-related,” so migration checks, rollback lists, and reference material all enter context. Changing a single string can mean reading several Markdown files end to end—and reading them again on the next edit. The result is wasted tokens, slower progress, drowned-out signal, and a higher chance of hallucination.
The core tension is simple: the stronger instruction following becomes, the more damage vague rules do. Rules are no longer hints. They are a control plane that will be executed strictly. That control plane must be decidable, convergent, and sliceable by task.
Skill triggers: from topic words to task predicates
A typical overly broad trigger stacks domain nouns: “use when handling databases, queries, models, or persistence.” Those words cover roughly half of everyday application work. A safer pattern tightens the scope with an observable task predicate, for example: “enable only when adding or changing a data migration, or when reviewing its release and rollback plan.” The first describes a topic. The second describes a concrete action and artifact.
The benefit is verifiable. Unrelated ORM field tweaks and ordinary query fixes no longer misfire. Migration checks and references enter context only when they are actually needed. When writing a trigger, test it with three questions:
- Can a single commit diff decide whether it should fire?
- Does it exclude read-only investigation, doc comments, and unrelated module changes?
- Does it avoid hitting another skill on the same task?
If you cannot answer yes to all three, the condition is still a topic word, not a task boundary.
Project instruction files: from “read everything every time” to on-demand retrieval
Another outdated rule is: “Before every edit, read the architecture, database, and deployment docs.” Early agents would not look up documents on their own, so a forced full read was reasonable. Current models execute that constraint repeatedly and completely, and context grows fast. A better pattern is layered. Keep the always-on layer short and high-frequency: repository layout, language and package-manager conventions, and hard prohibitions. Load topical documents by retrieval or explicit reference, for example “read the database doc only when the change touches the data schema or an external interface” and “read the deployment doc only when the change affects the release process or runtime configuration.”
Supporting practices:
- Split long documents into retrievable sections and state when each applies.
- In the agent instructions, say “judge document relevance from the change path, then read the matching section,” instead of listing every filename.
- Turn repeated checklists into tools—scripts, static checks, or pipeline gates—so the model consumes a result instead of rereading the source every time.
The goal is for documents to be knowledge opened by query, not a fixed tax on every session.
Conflicts, overbreadth, and early pauses: design rules as interfaces
Strong instruction following also amplifies rule conflicts. One rule says “do not change production-related files without confirmation.” Another says “automatically complete every fix the user specified.” On the boundary, the model may ask again and again or simply stop. Governance looks like interface design: each rule should state its precondition, scope, priority, and failure behavior—ask, skip, or downgrade to a suggestion. Overbroad phrases such as “always,” “all files,” and “any database operation” should become enumerations or path prefixes. Human confirmation should be bound to high-risk actions—irreversible migrations, breaking changes to external interfaces—not to “any edit.”
Keep a minimal rule set:
- If a repository convention, test, or pipeline can express it, do not write it in natural language.
- If one task description can make it clear, do not put it in the global agent file.
- The global file should keep only constraints that stay stable across tasks.
- A skill file should keep only that skill’s trigger predicate, inputs and outputs, and checkpoints.
- The task prompt should add only this run’s goal and acceptance criteria.
Separating these three layers shrinks the conflict surface.
An executable cleanup checklist
- Inventory triggers. List the trigger statements for every skill and always-on rule. Replay recent real tasks and count false triggers and extra documents loaded. Replace topic words with task predicates, and delete entries that a diff cannot decide.
- Measure the context tax. For typical small changes—copy edits, a single test fix, tuning one query—record whether a long document was read in full and whether an unrelated checklist came along. Set limits for the target scenarios: a small change should not load a long topical document, and a topical skill should not wake up in an unrelated module.
- Remove forced loops. Delete blanket constraints such as “before every edit, you must read these files.” Gate reads on path or change type. Push repeated checks down into repeatable commands or pipelines.
- Review conflicts. Compare obligatory wording pairwise and make priority explicit. Narrow high-risk confirmation points to a few actions so the model does not pause constantly during ordinary coding.
- Regression-check. Run the same task set before and after cleanup. Compare step count, context length, and whether the run stopped without cause. What matters is not whether the wording “looks professional,” but whether useless loads drop and tasks are more likely to finish in one pass.
How different roles should apply this
- Individual developers: Slim your own agent instructions first. Keep language style, commit conventions, and safety red lines. Move the rest to directory-level conventions.
- Teams: Write skill triggers as short, reviewable specs and include them in code review, so people do not each copy an overly broad template.
- Platform and engineering-productivity owners: Treat context bloat and false-trigger rate as assistant quality metrics, alongside latency and failed retries, rather than judging only whether a single answer looks correct.
Cleanup is not about making the model do less. It is about making it work inside the right boundary. A strong model will take every “always,” “all,” and “related” you write at face value. The slower and broader the writing, the more those words become negative optimization under new capability. Turn rules from an encyclopedia into an interface contract, and instruction following goes from a burden back to leverage.
Closing
Agent context is scarce working memory, not a drawer for unlimited manuals. Once instruction following is markedly stronger, the quality of skills and project instructions depends on whether they can be triggered precisely, loaded on demand, and kept from fighting each other. A cleanup centered on task predicates and layered loading usually cuts consumption, speeds the loop, and reduces unstable behavior caused by context overload. This is general engineering practice. It does not depend on any one product generation, but it pays off again with each stronger model.
