Case file AI2

Persistent Brief

Context belongs in the repo rather than the chat.

The agent is only as good as the brief it walks into. The third repetition of the same instruction in chat is the signal: the brief belongs in the repo, in AGENTS.md or whichever tool-specific equivalent the stack uses.

ByAdam LewisPublished3 May 2026Revised23 Oct 2026Reading12 minVersionv1.2ConfidenceHigh
§0b

Opinion

I've watched too many teams treat the agent like a goldfish. Every session starts with the same paragraph in the chat: “we use Tailwind, no inline styles, single quotes, named exports, please don't add comments.” By the third session everyone is copy-pasting that paragraph from a Notion page. By the tenth, half the team has a slightly different version. By the thirtieth, two engineers are arguing about which version is right and the agent is following whichever paragraph the latest contributor pasted last. Anthropic's own engineering posts have been pushing the fix since 2025: commit the brief.1

As of 2026 the industry has converged on one file, stewarded by the Linux Foundation's Agentic AI Foundation: AGENTS.md, used by 60,000+ projects and 23 named coding tools including Cursor, Codex, GitHub Copilot, Aider, Gemini CLI, Windsurf, Devin, JetBrains Junie, Zed, and Warp.2 Each tool layers its own format on top (Anthropic's CLAUDE.md, Cursor's .cursor/rules/ directory, Cline's .clinerules, GitHub's .github/copilot-instructions.md, Aider's CONVENTIONS.md) but the principle survives the surface. Pick the file the tool loads, commit it and review changes to it like changes to tsconfig.json.

This Prickles repo is the canonical microcosm. The shared brief lives in AGENTS.md; CLAUDE.md is a one-line @AGENTS.md import. The agent reads the same file every session no matter which tool I run. The file is version-controlled, lint-checked, and reviewed on PRs that touch it. There is no oral tradition, no Notion page and no “ask Adam”. The brief is in the repo because the repo is the source of truth for everything else, the same reason the schema lives in the repo and not in somebody's head.

Copy a note and link

Grab this short comment and drop it into a PR comment or an LLM chat to prompt the right change.

Don't repeat instructions across prompts. Commit them. AGENTS.md is the standard; CLAUDE.md, `.cursor/rules`, `.clinerules`, `.github/copilot-instructions.md` are the surface-specific equivalents. The brief lives in the repo, not the chat: version it, review it, treat it like code.

/tenet/persistent-brief/AI2
Copy for paste
§0c

AI eyes only

Rule: context belongs in the repo rather than the chat. Read the committed brief on session start.

Reject: chat-only instructions that the next session cannot recover. Reject: contradicting the committed brief without flagging it. Reject: making changes whose rationale lives only in the conversation.

Generate: read CLAUDE.md, .cursor/rules/ (MDC alwaysApply: true), or .github/copilot-instructions.md on every session start. Treat the committed brief as the contract. Treat chat as conversation that either confirms it or amends it via a commit.

Diagnostic: when chat instructions disagree with the committed brief, halt and surface the contradiction. Either commit the new rule or comply with the existing one. Never silently pick.

§0d

Why?

  • Stops the paragraph-in-the-chat ritual. Project conventions stop being something every contributor pastes from a Notion page on session start. They become something the model loads automatically.
  • Brief becomes version-controlled. PR-reviewable, blame-able, revertable: the same review surface as the rest of the code, with the same audit trail.
  • Tool-portable via AGENTS.md. The brief survives the team switching from Cursor to Claude Code to Aider. Only the wrapper file changes, and most tools support AGENTS.md as a fallback.
  • Compounds with AI1 The Intern Pattern. The agent walks into every session with the brief loaded and the loop understood: the closest coding agents get to a colleague who already knows the team.
  • Ramps new contributors faster. The committed brief is the onboarding doc. New humans and new agents start from the same baseline.
  • Fixes propagate. When the agent does the wrong thing twice, the fix lands in the brief and every future session inherits it: instead of every contributor re-discovering the same correction.
  • Names the source of truth. The brief is the contract between humans and agents. Chat messages, Slack threads, and tribal knowledge stop competing for authority.
The receipts
Origins, quoted passages, evidence, the strongest counter-argument and the reply.
§1

Origins

The pattern began as a tool-specific kludge. Anthropic shipped CLAUDE.md as the Claude Code convention in early 2025, Cursor shipped .cursorrules and then .cursor/rules/, Cline shipped .clinerules, Aider shipped CONVENTIONS.md and GitHub Copilot shipped .github/copilot-instructions.md. Each format was the same idea in a different filename: a file the model loads automatically so you never have to repeat yourself.

The convergence happened in 2025. AGENTS.md emerged as a tool-agnostic open standard, stewarded by the Linux Foundation's Agentic AI Foundation, with explicit sign-on from OpenAI Codex, Jules, Amp, Cursor, Factory, Aider, GitHub Copilot's coding agent, Gemini CLI, goose, Devin, Windsurf, Zed, JetBrains Junie, Warp, VS Code, Augment Code, RooCode, and the rest of the twenty-three tools the standard lists.2 60,000+ open-source repositories adopted the file in under twelve months. The industry has rarely converged on a convention so fast. The speed says the principle was load-bearing and the only friction was the filename.

Anthropic's Claude Code documentation codified the rules of the brief: target under 200 lines per CLAUDE.md, keep instructions general enough to apply everywhere, and cut any line whose removal would not cause a mistake.1 The same advice generalises across surfaces: a 2,000-line CLAUDE.md or Cursor rules dump is a brief that the model skims, not a brief that the model reads.

Anthropic's Effective Context Engineering post (September 2025) reframes the brief as one half of a hybrid context model: “CLAUDE.md files are naively dropped into context up front, while primitives like glob and grep allow it to navigate its environment and retrieve files just-in-time.”3 The committed brief holds the rules. The live filesystem holds the facts. The two together are the working context for every session.

§2

Quotes

A simple, open format for guiding coding agents, used by over 60k open-source projects. Think of AGENTS.md as a README for agents: a dedicated, predictable place to provide the context and instructions to help AI coding agents work on your project.

AGENTS.md · open standard (Linux Foundation Agentic AI Foundation)

Size: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence.

Anthropic · How Claude remembers your project

Claude Code is an agent that employs this hybrid model: CLAUDE.md files are naively dropped into context up front, while primitives like glob and grep allow it to navigate its environment and retrieve files just-in-time, effectively bypassing the issues of stale indexing and complex syntax trees.

Anthropic · Effective Context Engineering for AI Agents (October 2025)

Instead of a hidden text box, your instructions live in simple Markdown (.md) files within your project or a global directory. … You can create a .clinerules/ directory and break your instructions into multiple, focused files like 01-coding-style.md, 02-documentation-rules.md, or react-patterns.md.

Cline · clinerules: version-controlled, shareable, AI-editable
§3

Evidence

16 external sources, ranked by author authority. The first five are the canon; expand to see the rest, including the qualifiers and the named opposers. Each links out to its primary source.

  1. 01
    Linux Foundation Agentic AI Foundation · 2025
    60,000+ projects; 23+ tools support it natively. The cross-tool consolidation point that makes the brief portable across Claude Code, Cursor, Codex, Aider, Cline, Copilot, Gemini CLI and the rest.
  2. 02
    InfoQ · 2025
    Industry-press confirmation of the convergence point. A sign that AGENTS.md is no longer one-of-many but the convention the agent ecosystem agreed on.
  3. 03
    Anthropic · 2024 onwards
    Anthropic's own rules of the brief: target under 200 lines, prefer pointers to copies, snippets drift. The most-quoted single source for the discipline.
  4. 04
    Anthropic · 2025
    Hybrid context model: CLAUDE.md is loaded up front. Glob and grep retrieve facts just-in-time. The committed brief is one half of the agent's context.
  5. 05
    Cursor · 2025
    MDC format, glob scoping, manual invocation, subdirectory rules, ~500-line target. Cursor's surface for the same principle, with explicit per-file scoping.
  1. 06
    Cline · 2024
    Plain Markdown. Single file or directory; AI-editable. The interesting qualifier: lets the agent edit its own brief, raising the staleness-vs-introspection trade-off.
  2. 07
    GitHub · 2024
    Repository-wide and path-specific (.instructions.md with applyTo). Microsoft's surface for the same principle, with explicit per-path scoping.
  3. 08
    Aider · 2024
    Convention file loaded via .aider.conf.yml. Specifies libraries, type-annotation rules, code style. The original Aider convention. Pre-dates the AGENTS.md consolidation.
  4. 09
    OpenAI Codex · 2025
    OpenAI's documentation of AGENTS.md support in Codex. The signal that the standard is cross-vendor, not just open-source.
  5. 10
    HumanLayer · 2025
    Practitioner walk-through of what makes a brief load-bearing vs decorative. Useful for the difference between a 200-line CLAUDE.md and a 2,000-line one.
  6. 11
    Anthropic · 2025
    Subagent isolation. The only channel between parent and subagent is the prompt string. Reinforces that committed conventions are the only durable brief once subagents are in play.
  7. 12
    LangChain · 2025
    Survey of context-engineering practices across the open-source agent stack. Confirms the committed-brief pattern is industry-wide, not Anthropic-specific.
  8. 13
    Anthropic · 2025
    Agent-managed file-based memory outside the context window. The interesting qualifier: if the agent can keep its own brief current, the case for committing a static file weakens.
  9. 14
    Hubinger et al. · 2024
    Background context for why agent output cannot be trusted by default and why grounding the brief in committed, reviewable text matters as a safety property, not just a workflow preference.
  10. 15
    Block · 2024 onwards
    One of the AGENTS.md-supporting tools listed by the Linux Foundation. Multi-vendor adoption is the strongest single signal that this is the convergence point.
  11. 16
    Bai et al. · 2022
    The larger Anthropic position on agent rules: a committed constitution constrains output by design, not by post-hoc filtering. The brief is the project's constitution.

Sixteen sources. The supporters cluster on the cross-tool consolidation point: the AGENTS.md open standard (Linux Foundation), the InfoQ standardisation write-up, Anthropic's CLAUDE.md best practices, and Cursor's .cursor/rules/ convention. The qualifiers further down hold the “not all briefs are alike” nuance. Nobody in the list opposes the pattern outright; the nearest is the memory-tool qualifier, and the reply addresses it.

§4b

Enforcement

Viewing: TypeScript.

Apply these rules in eslint.config.mjs. The full enforcement across every tenet lives on the implementation page.

RuleToolCatches
markdownlint-cli2markdownlint-cli2shape regressions in AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc: heading order, line length and a missing top-level heading.
eslint-plugin-markdownlinteslint-plugin-markdownlintthe same shape rules but inside the ESLint pipeline: one binary, one config tree.
GitHub Actions: brief validatorGitHub ActionsPRs that delete AGENTS.md, push CLAUDE.md over the 200-line cap, or break the markdown shape.
eslint.config.mjsconfiguration snippet
import jsonc from 'eslint-plugin-jsonc';
import markdownlint from 'eslint-plugin-markdownlint';
import markdownlintParser from 'eslint-plugin-markdownlint/parser.js';

export default [
  {
    files: ['AGENTS.md', 'CLAUDE.md', '.cursor/rules/**/*.mdc', '.clinerules', '.clinerules/**/*.md'],
    plugins: { markdownlint },
    languageOptions: { parser: markdownlintParser },
    rules: {
      'markdownlint/md001': 'error',
      'markdownlint/md013': ['warn', { line_length: 200 }],
      'markdownlint/md041': 'error',
    },
  },
  {
    files: ['.github/copilot-instructions.md', '.github/instructions/**/*.md'],
    plugins: { markdownlint },
    languageOptions: { parser: markdownlintParser },
    rules: {
      'markdownlint/md013': ['warn', { line_length: 200 }],
    },
  },
];
§4c

AI rules

File.cursor/rules/ai2-persistent-brief.mdc
---
alwaysApply: true
---

## Prickles AI2: Persistent Brief

Keep the agent's brief in the repo, not in the prompt. Anything you would say twice belongs in a file the model loads on every session.

AGENTS.md is the cross-tool standard (Linux Foundation, 60k+ projects). CLAUDE.md, `.cursor/rules/`, `.clinerules`, `.github/copilot-instructions.md`, and `CONVENTIONS.md` are the surface-specific equivalents: pick the right file for your tool.

The brief contains pointers, not snippets. Anthropic's own guidance: target under 200 lines, prefer references to copies, anything that drifts is debt.

Treat the brief as code. Version it, lint it, review it on PRs that touch it. The brief is the contract between humans and agents. If it is wrong on main, every session is wrong.

Repo layout, CI, and ESLint wiring for these paths live on /implementation, not repeated on every tenet.

§5

Counter-argument

Counter

The honest steelman is that committed briefs go stale. A file that says “we use React 18” in a repo that has shipped React 19 is worse than no file: the agent will follow the brief and write code for an API that no longer exists. Anthropic's own September 2025 memory-tool release suggests the future may be agent-managed memory rather than human-managed briefs: a system that “stores and consults information outside the context window through a file-based system” the agent edits itself.4 If the agent can keep its own brief current, the case for committing a static file weakens.

§6

Counter-argument retort

Reply

The staleness objection is real and the fix is the same fix that stops every other repo artefact from going stale: review it. The brief is code. PRs that touch it get reviewed; CI lints it. Team practice on the day a major dependency moves includes “update the brief” the same way it includes “update the lockfile”. A brief that is on main and wrong is the same problem as a comment on main that is wrong: covered by F5 Self-Documenting Code. The fix is process, not the absence of a brief.

The agent-managed memory case is more interesting. Anthropic's memory tool (public beta, October 2025) does allow the agent to edit its own brief, and Cline offers AI-editable rules with the same shape.5 The risk is that an agent-edited brief is an unaudited brief: the next session reads facts the previous session invented and the model's confidence travels through the file system into the next workflow. The fix is not to ban agent-edited briefs, it is to treat them like agent-edited code: open a PR, get a human review, then merge. Huang et al. are explicit that pure introspection without external grounding can degrade accuracy. The same caveat applies to letting the agent rewrite its own rules of the road.6

The larger lesson is that the brief is where the team decides its conventions once and lets them compound. Without it, every new contributor, human or agent, relitigates the same arguments in the chat and the rate of bad output rises with the rate of new conversation. Pair AI2 with AI1 The Intern Pattern and the agent walks into every session with the brief loaded, the loop understood and a written plan to be approved: the closest a coding agent gets to a colleague who already knows how the team works.

§7

Notes

  1. [1]Anthropic: Best Practices for Claude Code on CLAUDE.md. Recommended target under 200 lines, with pointers preferred to copies because snippets become out-of-date quickly. The 200-line cap is the load-bearing constraint that turns the brief from a wall of text into something the model reads.
  2. [2]Linux Foundation Agentic AI Foundation: AGENTS.md: open standard for agent rules files. 60,000+ projects; 23+ tools support it including OpenAI Codex, Cursor, Aider, Claude Code, GitHub Copilot Coding Agent, Gemini CLI, Cline, Goose, Devin, Windsurf, Zed, JetBrains Junie, Warp, VS Code, Augment, RooCode.
  3. [3]Anthropic: Effective Context Engineering for AI Agents (October 2025). The hybrid context model: CLAUDE.md is naively dropped in up front. Glob and grep retrieve files just-in-time. The committed brief is one half of the agent's working context.
Disagree? Found a hole in the argument? Take issue with this tenet →
Last revised: 2026-10-23