docs(claude-md): make docs/STYLE.md discoverable and add a verify.sh docs step - #2387
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
docs/STYLE.mdis the spec for how a docs page is written. Nothing in the repo said so, so an agent writing a page had no reason to open it.What went wrong
While writing the docs page for #2383 I never read
docs/STYLE.md. The page passed every check I ran and still broke ten of its rules: the first sentence restated the frontmatter description, bothaltattributes were byte-identical to the<Frame>caption, five clauses were design rationale, three sentences made TablePro the subject,you canappeared twice, a**Label**bullet list stood in for a table, prose restated the table directly above it, and a load-bearing<Note>carried a fact with no other home.It also shipped two false claims, which is the failure
STYLE.md§9 exists to stop.Four gaps, not one forgetful agent
1.
docs/STYLE.mdis referenced nowhere. Not inCLAUDE.md, not in.claude/rules/, not in the fix-issue skill.grep -rn "STYLE.md"outside the file itself returns nothing.2.
verify.sh lintprints a false pass signal. It ends withdocs: clean: 266 references check out. That isscripts/check-doc-symbols.shcheckingCLAUDE.mdand.claude/for stale symbols; it never opensdocs/. The label reads exactly like docs validation, and I reported "docs: clean" on that basis.3.
verify.shhad no docs step. The two scripts that do readdocs/(check-writing-style.sh,check-docs-against-source.py) were in no playbook. I only met the second one when CI failed onCmd+ReturnvsCmd+Enter.4.
.claude/rules/had no entry fordocs/. Four rule files fire on path globs for plugins, sync, UI lifecycle and MCP. Docs had none.What this changes
.claude/rules/docs-authoring.md(new) fires ondocs/**/*.mdx,docs/docs.json,docs/snippets/,docs/images/. It names STYLE.md, names the two scripts, states plainly that theagent docs:line does not coverdocs/, and lists the eight rules no script enforces with the defect behind each.verify.sh docs(new step) runs both docs scripts and reports the failing check with itsfile:linerather than the twenty passes above it. Tested by reintroducing the exact bug it exists to catch:verify.sh lintrelabels its lineagent docs:and carries a comment saying what it covers and what to run fordocs/.CLAUDE.mdMandatory Rule 3 gains the pointer to STYLE.md, theverify.sh docscommand, and the distinction between the two checks.The fix-issue skill gains one Phase 3 bullet: read STYLE.md before writing, write the page last.
docs/STYLE.md§9 gains the scar this PR came from. The section already said "verify before you write"; it did not say the ordering half. A page written early states what the code did that morning, a later commit in the same branch changes the code, and nobody re-reads the page.Verification
bash -n verify.shshellcheck --severity=warning verify.shverify.sh docson a clean treeverify.sh docswith the bug reintroduceddocs/scripts/check-writing-style.shdocs/ matches the house styledocs/scripts/check-docs-against-source.pydocs/ agrees with the sourceSplit out of #2386 so that PR stays a feature change.