docs(ai): update authoring rules and add sentence-case heading validation - #6529
Conversation
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Coverage Report for CI Build 30038316205Warning No base build found for commit Coverage: 96.243%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
|
📦 1 of 5 PRs splitting the oversized 🚨 MERGE THIS LAST. This PR adds Check 5 to
#6527 and #6528 are not policed by Check 5, so their order doesn't matter here. 📝 Known scope gap recorded for follow-up: patterns and controllers are not yet audited for sentence-case headings. |
…tion Updates the docs-authoring source of truth applied across the docs-site work: - .ai/rules: stories-documentation, stories-format, text-formatting - validate-docs-pages.js: add Check 5 enforcing sentence-case ###/#### headings for component and internal genres (patterns/controllers not yet audited) Merge last: the stricter validation assumes component/internal docs are already sentence-cased by the component and migration-guide PRs. Part of splitting the large docs-site-updates branch (SWC-2379). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c524a9d to
efbb337
Compare
There was a problem hiding this comment.
This PR needs to be merged last after the first 4 go in (#6525, #6526, #6527, #6528 ), as it's flagging capitalization issues that are likely resolved in previous PRs. I believe this is why the lint step is failing. We can update the branch after those are in and see if that helps it pass, or add changes if it finds any additional.
pfulton
left a comment
There was a problem hiding this comment.
I agree with @nikkimk's suggestions here and only have one of my own regarding a comment that was left in the validate-docs-pages script.
Let's get clarification on the capitalization rules for component names and I think we're good to go here. Please DM me on Slack when you're ready for a re-review or approval.
|
This PR is not needed for beta release. can we do this as a follow up clean up? |
Anatomy/callout/tag convention updates to stories-documentation.md, stories-format.md, and text-formatting.md belong with the other .ai/rules standardization work landing in #6529, not this docs-content PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
najikahalsema
left a comment
There was a problem hiding this comment.
One nit, but looks good! Thank you for all of these additions :)
Co-authored-by: Najika Halsema Yoo <44980010+najikahalsema@users.noreply.github.com>
Feedback has been addressed and this now has the required amount of approvals after requested changes were made.
Description
The docs-authoring source of truth that the four content PRs conform to (4 files):
.ai/rules/:stories-documentation.md,stories-format.md,text-formatting.mdscripts/validate-docs-pages.js: adds Check 5, enforcing sentence-case###/####headings for component and internal genres (patterns/controllers deliberately out of scope, not yet audited)Motivation and context
This is 1 of 5 PRs splitting the oversized
rise-erpelding/docs-site-small-updatesbranch (112 files) into reviewable pieces, divided by documentation surface. The original single PR was too large for GitHub and human reviewers to handle. Landing the authoring rules and validation as their own PR lets reviewers agree on the standard once, rather than re-deriving it per directory.The five PRs together reproduce the original change set exactly (18 + 48 + 20 + 22 + 4 = 112 files, disjoint).
The new Check 5 is run by the
.husky/pre-commithook against all in-scope MDX. If this merges before the docs are sentence-cased, it will trip the pre-commit hook for every contributor. Merge after:#6527 and #6528 are not policed by Check 5, so their order does not matter here.
Consistency notes
Known scope gap recorded for follow-up: patterns and controllers are not yet audited for sentence-case headings.
Related issue(s)
Screenshots (if appropriate)
N/A
Author's checklist
.ai/rulesauthoring docs).Manual review test cases
validate-docs-pages.jsCheck 5 logic (extractSubHeadings/isSentenceCase,PROPER_NOUN_PHRASESallowlist)..ai/rulesguidance updates.yarn lint:docs-pagespasses once the component and migration-guide PRs (docs(migration-guides): standardize and normalize component migration guides #6525, docs(components): standardize component reference docs, stories, and API JSDoc #6526) are onmain.Device review / Accessibility testing
N/A (tooling and authoring-rules change; no rendered component behavior)