Why Stronger Instruction-Following Models Need Fewer Skills and a Leaner AGENTS.md
As general-purpose LLMs become much better at following instructions, the habit of stuffing project conventions, build steps, and database rules into agent rule files and skill descriptions starts to backfire. This article explains why over-triggering, task blocking, and context bloat happen, outlines three common rule-design flaws, and walks through a four-step cleanup: inventory, deduplication, tighter triggers, and layered context. It also covers the metrics to track and the shift from writing rules to designing context.
1. The Symptom: More Rules, Dumber Agents
Over the past two years, teams have commonly adopted a habit: write every project convention, build procedure, and database standard into the rule files and skill descriptions of AI coding tools, assuming that the more complete the coverage, the more reliably the model performs. But once a general-purpose LLM’s instruction-following ability improved significantly, this “pile it all in” configuration began to backfire. The model no longer “roughly understands” your intent; it executes every constraint you wrote, word for word.
There are three typical symptoms. The first is over-triggering: an overly broad skill description causes unrelated tasks to be judged as a match, pulling in large amounts of reference documentation and check steps. The second is task blocking: when rules conflict with each other or lack priority, the model tends to stop and ask the user for confirmation, or even pause the task outright. The third is context bloat: every edit forces the model to read multiple long documents, token consumption rises linearly, key information gets diluted, and the probability of hallucination actually increases.
The conclusion is clear: the stronger a model’s instruction following, the higher the quality weight of the rule text. Rules have turned from “hints” into “programs,” and programs are meant to be executed to the end.
2. Root Causes: Three Overlooked Rule-Design Flaws
1. Trigger conditions written as “domain words” instead of “task actions”
The bad pattern usually looks like this: Use when working with databases, queries, models, or persistence. This kind of description covers an entire technical domain. A user might only be changing a single ORM model field or fixing one query, yet the model may still judge it as “database-related,” and migration standards, rollback checks, and review checklists all get pulled into context.
The right approach is to narrow the trigger down to a concrete action and artifact:
# Bad example: scope too broadtrigger: working with databases, queries, models, or persistence# Good example: bound to a clear actiontrigger: adding or changing a migration, or reviewing its rollout
The difference is that the latter describes a “decidable task boundary.” The model can clearly answer “am I currently doing this thing?” rather than relying on semantic association.
2. Turning “patches for early models” into long-term constraints
Rules like Before every edit, read architecture.md, database.md, and deployment.md. were very common in the early days, because agents back then would not proactively retrieve project documentation and could only fall back on forced reads. Today, models already have the ability to search proactively and consult information on demand, so this rule degrades into pure fixed overhead: read once for one string change, read again for the second, progress slows, and context swells quickly.
Such rules should change from “forced execution every time” to “retrieve on demand + clear entry points”:
## Documentation index (consult on demand; no need to read all every time)- Architecture constraints: docs/architecture.md (consult when module boundaries are involved)- Data model: docs/database.md (consult when table structures or migrations are involved)- Release process: docs/deployment.md (consult when releases and rollbacks are involved)
3. Missing priority and conflict-resolution mechanisms
When multiple sources (global rules, repository rules, skill descriptions, ad-hoc user instructions) are in effect at the same time and contradict each other, a strong instruction-following model is more likely to choose “stop and ask.” The governance approach is to explicitly declare the priority order and conflict handling at the top of the rule file, for example: explicit user instructions > repository-level rules > skill default flows > general preferences, and to specify that “when conflicts occur, the more specific one prevails; if it cannot be determined, make the minimal change and flag it.”
3. The Method: A Thorough Rule “Spring Cleaning”
It is recommended to proceed in four steps, and the whole process can be completed within a single iteration.
Step one, inventory and annotate. Export all skill descriptions and rule entries, and annotate each one with three fields: trigger condition, execution cost (estimated tokens and time), and the last time it was actually hit. Entries not hit for longer than one iteration cycle go onto a deletion-candidate list.
Step two, deduplicate and merge. The same constraint often appears repeatedly in multiple places. Keep the single authoritative version and turn the rest into references. Duplication not only wastes context but also creates hidden conflicts where the wording differs.
Step three, tighten triggers. Rewrite domain words as action words, and add “do not trigger” counter-example boundaries to each skill. This is the most effective move for reducing false triggers.
Step four, layer and slim down. Split rules into three layers: the global layer keeps only safety baselines and commit standards; the repository layer keeps architecture and data constraints; the task layer loads details only after a skill is hit. Combined with “progressive disclosure,” meaning give a summary first and expand details only after a hit, this can significantly reduce the resident context.
An illustrative slimmed-down configuration:
# Global (resident, kept within a hundred lines)- Do not commit secrets; changes must be rollbackable- Conflict handling: explicit user instructions first, then repository rules# Skill: database migration (loaded after a hit)Applies to: adding or modifying migration scripts, reviewing rollout plansDoes not apply to: only adjusting ORM fields, only optimizing queriesSteps: generate migration -> validate locally -> provide a rollback plan
4. Validation: Use Observable Metrics to Judge the Results
Rule rework should not rely on gut feeling. It is recommended to track at least four metrics: average token consumption per task, rule hit rate (hits / tasks), the number of task blocks and clarifying questions, and the rework rate caused by context bloat. Sample a batch of similar tasks before and after the rework for comparison; if tokens drop while the rework rate does not rise, the slimming is effective.
One caveat: tightening too far carries risk. Removing necessary safety and compliance constraints leaves the model without a fallback at critical points. So the goal of the “spring cleaning” is precision, not minimalism.
5. The Trend: From “Writing Rules” to “Designing Context”
The core skill in the early days was translating human experience into rule text. After strong instruction-following models became widespread, the core skill became context engineering: deciding at what moment, at what granularity, and how much information to inject into the model. The number of rules is no longer a measure of capability; the signal-to-noise ratio of the rules is.
For teams, the practical approach is to establish lightweight rule lifecycle management: new rules must state their trigger conditions and cost, hit data is reviewed periodically, and zombie rules are retired promptly. In engineering practice on cloud platforms such as Baidu AI Cloud, this kind of governance is often combined with general capabilities like logging services and monitoring alerts, turning token consumption and task blocking into continuously observable metrics rather than after-the-fact guesses. Writing a little less and writing it more precisely often buys more stability and efficiency than continuing to pile on.
