Skip to content

docs(ai): update authoring rules and add sentence-case heading validation - #6529

Merged
rise-erpelding merged 8 commits into
mainfrom
rise-erpelding/docs-split-standards
Jul 24, 2026
Merged

docs(ai): update authoring rules and add sentence-case heading validation#6529
rise-erpelding merged 8 commits into
mainfrom
rise-erpelding/docs-split-standards

Conversation

@rise-erpelding

@rise-erpelding rise-erpelding commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

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.md
  • scripts/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-updates branch (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).

⚠️ Merge order: merge this last

The new Check 5 is run by the .husky/pre-commit hook 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

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have included updated documentation (updates the .ai/rules authoring docs).
  • Accessibility Practices — N/A (tooling / authoring rules change).
  • Automated tests — N/A (validation-script logic; no component runtime change).
  • Changeset — N/A (no published-package behavior change).

Manual review test cases

Device review / Accessibility testing

N/A (tooling and authoring-rules change; no rendered component behavior)

@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4a32580

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 Visual Regression Test Results

When 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: pr-6529

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@coveralls

coveralls commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30038316205

Warning

No base build found for commit efa4581 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 96.243%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 39208
Covered Lines: 37935
Line Coverage: 96.75%
Relevant Branches: 6466
Covered Branches: 6023
Branch Coverage: 93.15%
Branches in Coverage %: Yes
Coverage Strength: 460.8 hits per line

💛 - Coveralls

@rise-erpelding

Copy link
Copy Markdown
Collaborator Author

📦 1 of 5 PRs splitting the oversized docs-site-small-updates branch (112 files) by doc surface. Siblings: #6525 (migration guides), #6526 (component reference), #6527 (site guides), #6528 (patterns/core).

🚨 MERGE THIS LAST. This PR adds Check 5 to validate-docs-pages.js — enforcing sentence-case ###/#### headings for component + internal genres — and the .husky/pre-commit hook runs it repo-wide. If it lands 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 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>
@rise-erpelding
rise-erpelding force-pushed the rise-erpelding/docs-split-standards branch from c524a9d to efbb337 Compare July 17, 2026 18:13
@pfulton
pfulton self-requested a review July 20, 2026 14:20
@pfulton
pfulton requested a review from nikkimk July 20, 2026 14:21

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

@nikkimk nikkimk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for taking this on. Left a question and a few suggestions.

Comment thread .ai/rules/stories-documentation.md Outdated
Comment thread .ai/rules/stories-documentation.md Outdated
Comment thread scripts/validate-docs-pages.js Outdated
Comment thread scripts/validate-docs-pages.js Outdated

@pfulton pfulton 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.

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.

@rise-erpelding rise-erpelding added the skip_vrt Skip VRT build; mark UI Tests green without running Chromatic label Jul 20, 2026
Comment thread .ai/rules/stories-documentation.md
Comment thread .ai/rules/stories-documentation.md
@Rajdeepc

Copy link
Copy Markdown
Contributor

This PR is not needed for beta release. can we do this as a follow up clean up?
cc @pfulton

rise-erpelding pushed a commit that referenced this pull request Jul 21, 2026
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>
Comment thread .ai/rules/stories-format.md
@rise-erpelding rise-erpelding added Status:Ready for review PR ready for review or re-review. do-not-merge NO MERGE-Y! labels Jul 21, 2026
@rise-erpelding
rise-erpelding marked this pull request as ready for review July 21, 2026 13:38
@rise-erpelding
rise-erpelding requested a review from a team as a code owner July 21, 2026 13:38
@rise-erpelding rise-erpelding added AI tooling and removed do-not-merge NO MERGE-Y! labels Jul 23, 2026

@najikahalsema najikahalsema left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One nit, but looks good! Thank you for all of these additions :)

Comment thread .ai/rules/stories-documentation.md Outdated
Co-authored-by: Najika Halsema Yoo <44980010+najikahalsema@users.noreply.github.com>
@pfulton
pfulton dismissed nikkimk’s stale review July 24, 2026 14:42

Feedback has been addressed and this now has the required amount of approvals after requested changes were made.

@pfulton pfulton added Status:Ready for merge PR has 2 approvals, all tests pass, and is ready to merge and removed Status:Ready for review PR ready for review or re-review. labels Jul 24, 2026
@rise-erpelding
rise-erpelding merged commit 7664a5d into main Jul 24, 2026
39 of 40 checks passed
@rise-erpelding
rise-erpelding deleted the rise-erpelding/docs-split-standards branch July 24, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI tooling skip_vrt Skip VRT build; mark UI Tests green without running Chromatic Status:Ready for merge PR has 2 approvals, all tests pass, and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants