The Research Report
agent-style v0.2.0 — 21 Writing Rules for AI Agents
Suggested Title
The 21 Rules That Tell AI How to Write — And the Study That Says Don't Bother
Body
Something funny happened on the way to making AI write better.
A GitHub project called agent-style collected 21 writing rules, wrapped them in a polished CLI, and shipped them as a drop-in for every major coding agent. Claude Code, Codex, Cursor, Aider, GitHub Copilot — install one command and your agent's prose output follows rules sourced from Strunk & White, George Orwell, Steven Pinker, and Gopen & Swan. The project hit 362 stars. The maintainer built a benchmark. The benchmark showed violations dropping 45-82% across flagship models. It looks, on the surface, like a solved problem.
Then a research paper landed 11 days before agent-style's v0.2.0 release. Zhang et al. (2026) scraped 679 agent instruction files from GitHub, extracted 25,532 rules, ran over 5,000 SWE-bench Verified evaluations, and reached a conclusion that should make anyone writing positive directives for AI agents pause:
Negative constraints are the only individually beneficial rule type. Positive directives actively hurt performance.
agent-style prescribes 21 positive writing directives. The Guardrails study says positive directives are the problem. This is not a minor disagreement. This is a philosophical tension about what instructions are for when you give them to an AI.
Let me walk through both sides and then try to untangle them.
What agent-style Actually Does
The project is formally titled The Elements of Agent Style — a deliberate homage to Strunk & White's The Elements of Style (1918/1959). The maintainer is Yue Zhao, also known for the PyOD library for outlier detection. The project is at v0.3.5 as of late April 2026, with releases moving fast (v0.2.0 dropped April 20, v0.3.5 landed April 29).
The 21 rules split into two buckets:
12 canonical rules (RULE-01 through RULE-12), each sourced from a named writing authority:
- RULE-01: Do not assume the reader shares your tacit knowledge (Pinker 2014, Ch. 3 — the "curse of knowledge")
- RULE-02: Do not use passive voice when the agent matters (Orwell 1946, Strunk & White §II.14)
- RULE-03: Do not use abstract language when concrete terms exist (Strunk & White §II.16, Pinker 2014)
- RULE-04: Do not include needless words (Strunk & White §II.17, Orwell 1946)
- RULE-05: Do not use dying metaphors or prefabricated phrases (Orwell 1946, Rule 1)
- RULE-06: Do not use avoidable jargon (Orwell 1946, Rule 5, Pinker 2014)
- RULE-07: Use affirmative form for affirmative claims (Strunk & White §II.15)
- RULE-08: Do not overstate or understate claims relative to evidence (Pinker 2014, Gopen & Swan 1990)
- RULE-09: Express coordinate ideas in parallel structure (Strunk & White §II.19)
- RULE-10: Keep related words together (Strunk & White §II.20, Gopen & Swan 1990)
- RULE-11: Place new information in the stress position at end of sentence (Gopen & Swan 1990)
- RULE-12: Break long sentences; vary length (Strunk & White §II.18, Pinker 2014)
9 field-observed rules (RULE-A through RULE-I), each logged from patterns the maintainer saw in LLM output across dozens of writing projects between 2022 and 2026:
- RULE-A: Do not convert prose into bullet points unless it is a genuine list
- RULE-B: Do not use em or en dashes as casual sentence punctuation
- RULE-C: Do not start consecutive sentences with the same word
- RULE-D: Do not overuse transition words ("Additionally," "Furthermore," "Moreover")
- RULE-E: Do not close every paragraph with a summary sentence
- RULE-F: Use consistent terms; do not redefine abbreviations mid-document
- RULE-G: Use title case for headings
- RULE-H: Support factual claims with citation or concrete evidence (marked critical)
- RULE-I: Prefer full forms over contractions in formal technical prose
Each rule ships with a severity rating (critical, high, medium, low), an enforcement tier (Tier-1 mechanical deny through Tier-4 Codex review), 5+ BAD → GOOD examples spanning papers, API docs, runbooks, postmortems, and release notes, and a rationale explaining why LLM output specifically needs this rule.
There is also an escape hatch, borrowed from Orwell's own Rule 6: "Break any of these rules sooner than say anything outright barbarous."
The project includes a style-review skill that runs a second pass — after your agent drafts something, you can ask for a review against all 21 rules, and it writes a polished copy beside the original without touching the source.
The benchmark results are real. The README shows three models:
- Claude Opus 4.7: 105 violations → 58 (−45%)
- OpenAI GPT-5.4 via Codex CLI: 51 → 28 (−45%)
- Gemini 3 Flash: 79 → 14 (−82%)
These numbers are directional (10 tasks × 2 generations × 2 conditions = 40 calls per runner), not statistically rigorous, but the direction is clear. The ruleset reduces AI-tell density.
What the Guardrails Study Found
Now the wrinkle.
Zhang et al. (2026) — "Do Agent Rules Shape or Distort? Guardrails Beat Guidance in Coding Agents" — ran a different kind of experiment. They took 679 real instruction files (your CLAUDE.md, .cursorrules, AGENTS.md, etc.), extracted 25,532 individual rules, classified each rule by type, and measured their impact on SWE-bench Verified performance with a state-of-the-art coding agent.
Four findings:
- Rules improve performance by 7-14 percentage points over no rules. Good news so far.
- Random rules help as much as expert-curated ones. This is the first alarm bell. The improvement comes from context priming — any domain-relevant text activates the coding-task subspace in the model — not from the content of the instructions.
- Negative constraints are the only individually beneficial rule type. Rules like "do not refactor unrelated code" or "do not delete existing tests" help. Positive directives like "follow code style" or "write clear commit messages" actively degrade performance when added individually.
- Rules are mostly harmful in isolation yet collectively helpful, with no degradation up to about 50 rules. The total is what matters, not the individual directives.
The authors analyze the asymmetry through the lens of potential-based reward shaping (PBRS). Negative constraints remove infeasible branches — a binary cut. Positive directives add soft preferences that compete with the model's training-time priors, creating objective conflicts that show up as degraded benchmark performance.
The synthesis from the AgentPatterns.ai catalog is crisp: "Write negative constraints for failure modes the agent already knows how to avoid; write positive directives only for information the agent cannot reach any other way."
The Tension
agent-style is almost entirely positive directives. Out of 21 rules, 18 are phrased as negative constraints ("do not..."), which sounds like it aligns with the Guardrails finding. But the content of those negative constraints is prescriptive writing guidance — "do not use passive voice," "do not use abstract language," "do not include needless words." These are not coding guardrails like "do not refactor unrelated code." They are style instructions telling the model what good writing looks like.
This is where the distinction matters. The Guardrails study measured coding task success on SWE-bench — can the agent fix the bug? can it pass the test suite? Writing style rules don't help with that. A beautifully written commit message that fails the test is still a failure. A terse, passive-voice commit message that passes is a success.
But agent-style is not targeting coding task success. It targets prose output quality — the readability, clarity, and professionalism of the text the agent generates alongside its code. The project scope explicitly excludes fiction, poetry, marketing copy, and long-form narrative. It covers API docs, design docs, READMEs, runbooks, commit messages, error messages, research papers, grant proposals, and technical blog posts.
The question is not "do writing rules help agents write better code?" The question is "do writing rules help agents write better prose?"
And that is a different question with a different answer.
Why Writing Rules Might Work Where Coding Rules Don't
The Guardrails study found that random rules help as much as expert ones because of context priming. Any domain-relevant text activates the right subspace. But context priming is content-agnostic. The model gets a signal that says "this is a coding task" rather than "this is a creative writing task."
Writing rules work differently. They are not about activating a task subspace. They are about suppressing specific output patterns that LLMs overproduce by default — passive voice, abstract nouns, filler phrases, dying metaphors, em-dash punctuation, bullet-point overuse. These are not random instructions. They target documented failure modes in LLM prose.
The agent-style project cites two empirical sources:
- Zhang et al. 2026 — supports negative phrasing for anti-pattern directives. The project uses this to justify phrasing most rules as "do not X" rather than "write Y."
- Bohr 2025 — "Show and Tell: Prompt Strategies for Style Control in Multi-Turn LLM Code Generation" — supports pairing directives with examples for stronger initial style control. Every rule in agent-style ships with 5+ BAD → GOOD examples. This is not a decoration. Bohr found that combined prompts (directive + examples) give the best compression and discipline in multi-turn generation.
So agent-style is not just dumping positive directives into a prompt. It uses negative phrasing for anti-patterns, positive phrasing for constructive placement (like RULE-07 and RULE-11), and pairs every directive with concrete examples. This is closer to the Guardrails synthesis — "negative constraints for failure modes, positive directives only for information the agent cannot reach" — than a surface reading suggests.
The enforcement tier system also matters. Rules are not all equal weight. Tier-1 mechanically denies specific phrases (the filler phrase list, the dying metaphor list). Tier-2 runs ProseLint or LanguageTool checks. Tier-3 is agent self-check — the model reads the rules and tries to follow them. Tier-4 is a full Codex review pass. The project does not pretend that all 21 rules are equally enforceable or equally important. It grades them.
Where the Tension Holds
Even with the nuances, the tension does not fully resolve. Here is where it bites:
21 rules is a lot. The Guardrails study found no degradation up to 50 rules, but the compliance ceiling is real. IFScale (2025) shows frontier models at only 68% accuracy with 500 instructions. At 21 rules, agent-style is well within the safe zone, but the compact rule-pack render is ~20.6 KB, and the full RULES.md is ~89 KB. The full pack is getting large for an instruction file context window.
Most rules are style preferences, not factual guardrails. "Do not use passive voice" is a style preference with exceptions. "Do not refactor unrelated code" is a hard boundary with no exceptions. The Guardrails finding applies most strongly to the latter kind. Style preferences operate in a gray zone where the model already has strong priors from its training data. Telling Claude not to use passive voice competes with millions of passive constructions in its training corpus. Telling it not to delete tests competes with... nothing, really, because deleting tests is not a behavior the model defaults to.
The benchmark measures AI-tell density, not task success. agent-style's benchmark counts rule violations in generated prose. The Guardrails study measures SWE-bench resolution rate. These are different metrics. Fewer passive constructions in your README does not mean your agent fixed more bugs. It means your README reads better.
Random rules matched expert ones for coding. We do not know if random rules match expert ones for prose style. That experiment has not been run. It is possible that any 21 writing instructions prime the model into a "write carefully" subspace and the specific content of the rules is secondary. It is also possible that the specific targeting of known LLM failure modes (em-dash overuse, bullet-point conversion, hedge phrases) produces a genuine reduction that random instructions would not.
What I Think Is Happening
The Guardrails study is about coding agents solving coding tasks. agent-style is about writing agents producing prose. These are different problems with different failure modes and different mechanics.
For coding tasks, the model already knows how to write working code. The main risk is it does too much — refactors unrelated files, deletes tests, changes APIs outside scope. Negative constraints work because they fence in the model's existing competence. Positive directives hurt because they add soft preferences that conflict with the model's trained instincts about what good code looks like.
For prose tasks, the model does not reliably produce good prose by default. LLM prose has specific, documented, predictable failure modes: passive voice, hedging, abstract nouns, filler phrases, em-dash abuse, bullet-point over-conversion. These are not cases where the model knows the right thing and just needs permission to do it. These are cases where the model defaults to a bad behavior and needs explicit correction.
The Guardrails paper actually supports this distinction. It says positive directives hurt "when given without examples." agent-style gives every directive with 5+ examples. Bohr 2025 confirms that directive + example pairs give the strongest style control. The project is not ignoring the evidence. It is engaging with it.
The Deeper Lesson
The real lesson is not "writing rules work, coding rules don't." The real lesson is more specific:
Instruction design for AI agents is not one thing. It depends on the task, the domain, and what the model already does well by default.
For coding tasks where the model is already competent, guardrails work better than guidance. Tell it what not to do. Fence in its competence. Do not try to steer it toward a style of code it already knows how to write.
For prose tasks where the model has documented, predictable failure modes, targeted corrections with examples work. The agent-style project treats each rule as a bug report against LLM output. Every rule names a specific failure mode, explains why LLMs produce it, and shows what better output looks like. This is closer to a debugging methodology than a creative-writing philosophy.
For novel information the model cannot infer — project-specific build commands, non-standard workflows, team conventions — positive directives remain necessary. The Guardrails study explicitly notes this: "For novel conventions the agent cannot discover from the codebase — an unfamiliar build command, a project-specific tool invocation — a positive directive is the only option."
The synthesis is simple. Three kinds of instructions, three design principles:
- Hard boundaries the model should not cross → negative constraints ("do not refactor unrelated code," "do not delete tests")
- Known failure modes the model overproduces → negative directives with examples ("do not use passive voice when the agent matters," "do not convert prose to bullets")
- Novel information the model cannot discover → positive directives ("run tests with
pnpm test:integration --filter $PKG")
agent-style sits mostly in bucket two. The Guardrails study sits in bucket one. They are talking about different buckets.
What the Project Gets Right
The agent-style project is thoughtful about its claims. It does not promise that 21 rules will make your agent write like Hemingway. It promises they will reduce AI-tell density in technical prose. The benchmark shows that. The rules cite their sources. The field-observed rules are flagged as having a different evidentiary standard than the canonical ones. The escape hatch acknowledges that rules are guides, not laws.
The enforcement tier system is a genuine contribution. Not every rule can or should be mechanically enforced. Tier-1 (phrase deny list) is reliable. Tier-2 (linter checks) is noisy but useful. Tier-3 (agent self-check) is a request, not a guarantee. Tier-4 (full review) is expensive but thorough. The project is honest about which tiers catch what.
The compact rule-pack render (20.6 KB vs 89 KB for full RULES.md) shows awareness that instruction-file size matters. The project ships adapters for 9 different coding agents and a CLI that sets them up. It works as infrastructure, not just as a style guide.
What the Project Should Watch
The compliance ceiling looms. At 21 rules, agent-style is fine. But the project's own RULES.md is 89 KB. The compact pack is 20.6 KB. If your agent is already consuming other instruction files (CLAUDE.md, .cursorrules, project docs), those 21 rules are eating into a finite context window. The no-degradation finding of 50 rules applies to coding tasks. We do not know where the ceiling sits for style tasks.
The benchmark is self-reported and narrow. 10 tasks, 2 generations each, 3 models. The reductions are real but the sample is small. Independent replication would strengthen the claim.
The "random rules help as much as expert ones" finding from Guardrails should worry anyone who believes their specific instructions are what matters. Context priming is real. The possibility that any 21 writing instructions would produce similar reductions in AI-tell density is a hypothesis worth testing.
Where This Goes
The agent-style project is one answer to a real problem. LLM prose is recognizable. The passive constructions, the hedging, the abstract nouns, the "additionally" openers, the em-dash punctuated sentences, the summary sentences at the end of every paragraph — these are not subjective complaints. They are statistical regularities in LLM output that readers can spot at a glance.
The Guardrails study is one answer to a different real problem. Agent instruction files are growing. People are stuffing CLAUDE.md with hundreds of rules. Most of those rules are positive directives that compete with the model's training priors and produce no measurable benefit. The study's recommendation is clear: "constrain what agents must not do, rather than prescribing what they should."
The tension between these two positions is productive, not destructive. Writing rules and coding rules are different things targeting different failure modes in different domains. The right answer for your agent depends on what you are asking it to do.
If you want your agent to fix bugs, write guardrails. Tell it what not to touch. Keep the instruction count low. Trust its existing competence.
If you want your agent to write prose that does not read like AI output, writing rules with examples are a reasonable tool. The alternative — writing no rules and accepting default LLM prose — is not better. The rules target specific, documented failure modes. The examples show what better looks like. The negative phrasing aligns with what the Guardrails study recommends.
If you want your agent to do both, use both. Just be honest about which bucket each instruction falls into.
Orwell's Rule 6 applies here too. Break any of these rules sooner than say anything outright barbarous. Including the rule that says positive directives always hurt. They do not always hurt. They hurt in coding tasks. In prose tasks, the evidence is still being collected. agent-style is an early data point. We need more.
Citations
- Yue Zhao, agent-style (GitHub repository, v0.3.5), https://github.com/yzhao062/agent-style
- Zhang, X., Wang, G., Cui, Y., Qiu, W., Li, Z., Zhu, B., & He, P. (2026). "Do Agent Rules Shape or Distort? Guardrails Beat Guidance in Coding Agents." arXiv:2604.11088, https://arxiv.org/abs/2604.11088
- Bohr, J. (2025). "Show and Tell: Prompt Strategies for Style Control in Multi-Turn LLM Code Generation." arXiv:2511.13972, https://arxiv.org/abs/2511.13972
- Strunk, W., Jr., & White, E. B. (1959). The Elements of Style. Macmillan.
- Orwell, G. (1946). "Politics and the English Language." Horizon.
- Pinker, S. (2014). The Sense of Style. Viking.
- Gopen, G. D., & Swan, J. A. (1990). "The Science of Scientific Writing." American Scientist, 78(6), 550-558.
- AgentPatterns.ai, "Guardrails Beat Guidance: Rule Design for Coding Agents," https://agentpatterns.ai/instructions/guardrails-beat-guidance-coding-agents/
- IFScale (2025) — referenced in Zhang et al. (2026) for the 500-instruction compliance ceiling finding
- PyShine, "Agent Style: 21 Writing Rules for AI Coding Agents," https://pyshine.com/Agent-Style-21-Writing-Rules-for-AI-Coding-Agents/
Word Count
~2,800 words (body text)
Fact-Check Notes
- Star count: The search results showed 362 stars at time of search. This changes over time. Verify before publishing.
- Version history: v0.2.0 was released April 20, 2026. Current version is v0.3.5 as of April 29, 2026. The article title references v0.2.0 as specified in the brief, but the project has progressed. Consider updating the title or noting the version progression.
- Benchmark numbers: The 45% and 82% reductions come from the README's bench section. These are directional, not statistically rigorous (10 tasks × 2 generations). The project itself notes this.
- Guardrails study numbers: 679 files, 25,532 rules, 5,000+ agent runs, 7-14 percentage point improvement. These come from the arXiv abstract and the AgentPatterns.ai summary. The 68% compliance ceiling at 500 instructions comes from IFScale (2025), referenced in the Guardrails paper.
- Bohr 2025: N=160 paired programs. The study compares instruction-only, example-only, and combined prompts for style control in code generation, not open-ended prose. agent-style cites this for "pairing directives with examples," which is accurate but the domain is narrower than general prose.
- "Random rules help as much as expert-curated ones": This is a direct finding from Zhang et al. 2026. The agent-style SOURCES.md acknowledges this finding and uses it to justify negative phrasing for anti-pattern rules.
- The claim that agent-style is "almost entirely positive directives" needs nuance: 18 of 21 rules are phrased as negative constraints ("do not X"), which actually aligns with the Guardrails recommendation. The content of those constraints is prescriptive writing guidance, which is a different layer from the phrasing polarity. The article addresses this distinction.
- SWE-bench Verified vs SWE-bench: Zhang et al. used SWE-bench Verified specifically. The article uses "SWE-bench Verified" in some places and "SWE-bench" in others. Standardize to "SWE-bench Verified" for accuracy.