Repository navigation
docs: write requirement keywords in capitals where a rule is meant - #2901
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The protocol pages write requirements as MUST, SHOULD and MAY, and the schema descriptions as MUST, SHOULD and MAY. Two things were missing:
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:
draft/copiesWhere 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
runningorrequires_actionas confirmed live activity" becomes "Clients MUST stop presenting", as the schema description says.schema/v1/schema.json.What stays lowercase
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
cargo fmtand the spell check pass.