Skip to content

docs: write requirement keywords in capitals where a rule is meant - #2901

Merged
benbrandt merged 1 commit into
mainfrom
docs/requirement-keywords
Nov 19, 2026
Merged

benbrandt merged 1 commit into
mainfrom
docs/requirement-keywords

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

The protocol pages write requirements as MUST, SHOULD and MAY, and the schema descriptions as MUST, SHOULD and MAY. Two things were missing:

  • No page said how these words are read.
  • Some rules used the lowercase word. The same rule could then be a requirement in one place and plain prose in another, for example MUST in a schema description or RFD and "must" on the page.

Changes

Convention statement. The v1 and v2 overview pages, and their draft/ copies, now carry the RFC 8174 sentence with links to RFC 2119 and RFC 8174: the key words are requirements only when they appear in all capitals.

Keyword sweep. Every lowercase "must", "should" and "may" outside code blocks was read and classified, in:

  • the v1 and v2 protocol pages and their draft/ copies
  • the migration guide
  • the Rust doc comments of the v1 and v2 types, which become schema descriptions

Where a rule is meant, the word is now the keyword. On the pages that is 102 MAY, 30 MUST NOT, 25 MUST, 19 SHOULD and 2 RECOMMENDED, counting draft copies. In the doc comments it is 96 lines. The eight schema files are regenerated.

AGENTS.md. One new rule: write a requirement with a capitalized keyword, use lowercase only for advice, a possibility, or a description of data, and use the same keyword wherever a rule is stated.

What does not change

  • The strength of every rule. "must" becomes MUST, "should" becomes SHOULD, and "may" becomes MAY. Nothing is upgraded or downgraded.
  • One sentence is reworded. "Clients must no longer present a prior running or requires_action as confirmed live activity" becomes "Clients MUST stop presenting", as the schema description says.
  • The schema itself. The generated files change in description text only, including the stable schema/v1/schema.json.

What stays lowercase

  • Advice: "implementers should support both versions side by side".
  • Possibility: "updates may arrive before or after the response".
  • Descriptions of data: "text may be plain text or Markdown".
  • Method summaries in doc comments: "The agent should respond with its supported protocol version".
  • The lifecycle examples table, which illustrates rules stated elsewhere.

v1

This touches the stable v1 pages and the stable v1 schema descriptions. It changes how existing rules are written, not what they require.

Checks

  • Clippy, the tests, rustdoc, Prettier, cargo fmt and the spell check pass.
  • Regenerating the schema a second time gives no diff.
  • All links and anchors in the changed pages resolve.
  • Only comment lines changed in the Rust sources.

The protocol pages write requirements as **MUST**, **SHOULD** and **MAY**,
and the schema descriptions as MUST, SHOULD and MAY. Some rules used the
lowercase word instead, so the same rule could read as a requirement in
one place and as plain prose in another.

- State the convention on the v1 and v2 overview pages, with links to
  RFC 2119 and RFC 8174: the key words are requirements only when they
  appear in all capitals.
- Convert lowercase "must", "should" and "may" to the keyword wherever a
  rule is meant, in the v1 and v2 pages, their draft copies, the
  migration guide, and the Rust doc comments that become schema
  descriptions. The schema files are regenerated, descriptions only.
- Add the rule to AGENTS.md.

The strength of each rule is unchanged: "must" becomes MUST, "should"
becomes SHOULD, and "may" becomes MAY. One sentence is reworded: "Clients
must no longer present a prior `running` or `requires_action` as
confirmed live activity" becomes "Clients **MUST** stop presenting", as
the schema description says.

Lowercase words that give advice, describe data, or state a possibility
are left as they were, which is how RFC 8174 reads them.
@benbrandt
benbrandt requested a review from a team as a code owner November 19, 2026 21:13
@benbrandt
benbrandt enabled auto-merge (squash) November 19, 2026 21:14
@benbrandt
benbrandt merged commit fc69783 into main Nov 19, 2026
13 checks passed
@benbrandt
benbrandt deleted the docs/requirement-keywords branch November 19, 2026 21:17
@acp-release-bot acp-release-bot Bot mentioned this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant