Skip to content

Infra: Agents.md for contributors using AI - #3826

Open
kaitlynmichael wants to merge 4 commits into
mainfrom
agents-md-conventions
Open

Infra: Agents.md for contributors using AI#3826
kaitlynmichael wants to merge 4 commits into
mainfrom
agents-md-conventions

Conversation

@kaitlynmichael

@kaitlynmichael kaitlynmichael commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

one AGENTS.md per product directory, recording the conventions each
product's pages already follow — so that when a contributor drafts with an agent, the
agent already knows them.

What a contributor gets

Someone drafting a page with Claude Code, Codex, or Cursor gets a first draft that
already uses our terminology, our style, and the disclosure rules for the product they're
writing about. The conventions an agent would otherwise guess at are simply there.

That means:

  • A better starting point. The draft arrives closer to publish-ready instead of
    needing the same handful of corrections every time.
  • Less repeat review. The corrections a reviewer would make are the ones the file
    already answers.
  • Confidence about the boundaries. Each product has its own rules about what can and
    can't be published, and the agent now has them in front of it rather than inferring
    from a neighboring product's pages.

Quality goes up at the point where the content is created, which is the cheapest place
for it to go up.

Why several small files rather than one

Two reasons, and they point the same way.

Agents do better with smaller files. A context file is loaded into the model's
working memory at the start of a session, sharing room with the task itself. Claude
Code's own guidance is explicit:

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

Every file here is inside that. For an AI reader, relevance density beats
completeness
— the reverse of what makes a human guide good, where answering everything
in one place is the point.

Per-directory files get this for free. A subdirectory's file loads when the agent reads
files in that directory, so a session in the Redis Software pages gets Redis Software
conventions and nothing else.

Each product is genuinely different. Not stylistically — substantively. The rules
that matter most are the ones that only make sense inside one directory:

  • Terminology that inverts by surface. In Redis Software, "Active-Active database" is
    correct in prose and CRDB is correct in the REST API reference titles, because the API
    surface is named crdb. Both are right. Nothing in the pages tells an agent where the
    line falls.
  • Disclosure rules that don't transfer. Open source documentation under
    content/develop/ legitimately links to source code, because the implementation is
    public and part of the product. Feature Form lives in that same directory and its
    source is private, so the general rule is backwards for those pages.
  • Names mid-transition. Most Kubernetes pages still carry the legacy product name, so
    an agent that follows the majority usage gets it wrong.

A single repo-wide file would have to pick one rule per topic and be wrong for somebody.
Per-product files let each rule be stated correctly, with its exception, where it applies.

Zero extra effort

Nobody has to do anything differently. No install, no new step, no checklist.

The three tools contributors already use read these files automatically — this is the
documented pattern in each, not a workaround we'd be inventing. Codex walks from the git
root down and concatenates every AGENTS.md it finds. Cursor supports nested files
combined with their parents. Claude Code has the same hierarchical model under the
filename CLAUDE.md, which is why each directory also gets a one-line CLAUDE.md
importing the AGENTS.md beside it — also documented, down to the syntax:

Claude Code reads CLAUDE.md, not AGENTS.md. If your repository already uses
AGENTS.md for other coding agents, create a CLAUDE.md that imports it so both tools
read the same instructions without duplicating them.

Done right, contributors never need to know they're there. They draft the way they
already draft, and what comes back needs less correction. That's the measure of success —
not adoption, and not anyone reading anything. There's nothing to launch and nothing to
learn.

Writing for AI readers is already practice here, too: redis/docs commits 29
agent-facing files today, including AGENT.md, AI_AGENT_DEVELOPER_GUIDE.md, eight under
.agents/, and nineteen under for-ais-only/.

What's there

Two tiers, both small.

  • A short root AGENTS.md — universal guidance only: Google style, relref
    cross-references, frontmatter shape, editing scope. Nothing product-specific, so it
    makes no claim about any product's terminology or what it may publish.
  • One AGENTS.md per product directory — terminology and disclosure, loaded only by
    sessions editing those pages.

That division is also the rule for where a new convention goes: as soon as it needs a
product-specific caveat, it belongs in the product file. Which is what keeps root small.

Path State
repo root written — style and mechanics only
content/operate/kubernetes/ written
content/operate/rs/ written
content/develop/ai/featureform/ written
content/operate/featureform/ written — identical copy of the above

Every rule states its exception

The rules in these files carry their carve-outs inline. That's the most important
convention in them, and it's the one that decides whether they help or hurt.

A rule without its exception doesn't make an agent cautious. It makes it thorough. A
person reading a style guide hedges — they hit a surface where the rule looks wrong and
they ask, or they leave it. An agent doesn't hedge. It applies the rule everywhere it
pattern-matches, uniformly, in one pass, and every edit looks deliberate in review. So a
rule that's correct 90% of the time doesn't produce 10% mistakes; it produces a confident
sweep that someone has to catch line by line.

Three rules from these files show the shapes that failure takes:

  • The exception that looks like a contradiction. "Don't promise future functionality"
    is our convention. Stated flatly, it strips "support for TLS 1.1 will be removed in a
    future release" — a notice customers depend on for migration lead time. The rule has to
    say that losses are in and gains are out, or it removes the wrong half.
  • The identifier that must not follow the prose rule. "The product is Redis Software
    for Kubernetes" is correct, and applying it to RedisEnterpriseCluster breaks an API
    contract. Same for a literal bdb in a request path, or crdb-cli. The prose rule and
    the code rule are different rules.
  • The meta-rule that inverts. Our general guidance is that consistent usage across a
    section wins until it's deliberately changed. In the Kubernetes pages the legacy product
    name is the consistent usage, so following it is exactly wrong. That file says so
    explicitly and overrides the general rule for that term.

None of these are edge cases an agent would stumble into rarely. They're the highest-
traffic terms in their directories, which is why the exceptions are the most valuable
lines in the files.

It's also why this isn't just the style guide pasted into the repo. A guide written for
people can leave the exceptions implicit, because people supply the judgment. These files
have to state them, because the reader won't.

They never reach the site

Hugo renders any .md under content/ as a page, so the files are excluded in
config.toml alongside the existing build-output exclusions. Verified on the branch: a
full build produces 5,940 pages and none of them is an AGENTS.md or CLAUDE.md.

Nothing here is a new decision

Every rule in these files is a convention our pages already follow — the style guide and
our established terminology, restated where a drafting tool can read them.

So if a rule is wrong, missing, or out of date, change it in the PR where you hit it. No
process, no gate, and nothing to ask anyone's permission for.

What I'm asking for

A read on one PR. You don't need to read all ten files — start with the Kubernetes
one. It's short, and it's the best test of the shape, since the legacy product name is
still the majority usage in that directory. If the shape is right, the rest follow it.

Flag anything you'd want different and I'll fold it in.


Note

Low Risk
Contributor-only convention files and Hugo ignore rules; no changes to published documentation or runtime behavior.

Overview
Adds layered AGENTS.md files so coding agents inherit Redis docs house style and product-specific rules when drafting in a directory, without contributors installing anything new.

A repo-root AGENTS.md covers universal style, relref usage, frontmatter habits, editing scope, and when to flag instead of fix. Per-product files under content/operate/kubernetes/, content/operate/rs/, and Feature Form (content/develop/ai/featureform/ plus an identical copy in content/operate/featureform/) add terminology, disclosure, and carve-outs (for example mid-rebrand naming, CRDB vs Active-Active, private source, no roadmap promises).

Each of those directories also gets a one-line CLAUDE.md that imports the local AGENTS.md so Claude Code and other tools share the same instructions.

config.toml extends ignoreFiles so AGENTS.md, CLAUDE.md, and CLAUDE.local.md under content/ are not published as Hugo pages.

Reviewed by Cursor Bugbot for commit 462f9ae. Bugbot is set up for automated code reviews on this repo. Configure here.

@kaitlynmichael kaitlynmichael self-assigned this Aug 17, 2026
@kaitlynmichael kaitlynmichael added infrastructure AI-friendliness Features that help AI tools understand and use the doc pages more easily. labels Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history (5 new this commit):

Memory updated at 462f9ae

@mich-elle-luna mich-elle-luna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This feels a lot safer to implement because it is per directory and is more like guardrails on what not to change or break. Also, it allows owners of other directories to follow this or customized accordingly. Much simpler for new contributors as well because they don't have to do anything. And the main agents.md is already agreed by all of us I believe.

Comment thread AGENTS.md
## Site mechanics

- **Cross-references use the relref shortcode**, not markdown paths:
`{{< relref "/operate/rs/clusters/new-cluster-setup" >}}`. A broken relref fails the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true? I think we can ship with broken relrefs / they do not break a build, but I may be wrong

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken relrefs issue a warning at build time, but they need to be fixed. Broken relrefs lead to one of two places: (1) the top of the page on which the relref is used; (2) a 404 page. It's important that these are addressed, which is why I've been such a p.i.t.a. about it, driving other team members insane. 🙃

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to soften this language? @dwdougherty @mich-elle-luna

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs to state clearly that relref-related link warnings should be fixed before pushing upstream.

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I'll have to create files for the other "develop" sections and the "commands" section.

@kaitlynmichael

Copy link
Copy Markdown
Contributor Author

Approved. I'll have to create files for the other "develop" sections and the "commands" section.

@dwdougherty my experience is that your claude.local.md file is a great starting place. You just need to trim out stuff that's personal preference or irrelevant to contributors.

@dwdougherty

Copy link
Copy Markdown
Collaborator

Approved. I'll have to create files for the other "develop" sections and the "commands" section.

@dwdougherty my experience is that your claude.local.md file is a great starting place. You just need to trim out stuff that's personal preference or irrelevant to contributors.

What claude.local.md file? I might be the sole troglodyte on the team now. 😭

@kaitlynmichael

Copy link
Copy Markdown
Contributor Author

Approved. I'll have to create files for the other "develop" sections and the "commands" section.

@dwdougherty my experience is that your claude.local.md file is a great starting place. You just need to trim out stuff that's personal preference or irrelevant to contributors.

What claude.local.md file? I might be the sole troglodyte on the team now. 😭

No worries, Claude will know. I can create a prompt for you if you'd like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-friendliness Features that help AI tools understand and use the doc pages more easily. infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants