docs(design): write the diagram system into DESIGN.md - #12649
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 4 of 7 protections blocking · waiting on 👀 reviews, 🤖 CI, ⛓️ dependency and 🙋 you
🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 🤖 Continuous IntegrationWaiting for
This rule is failing.
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 3 satisfied protections🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
🟡 Changes recommended
DESIGN.md contains inline code spans that include triple backticks (```), which breaks Markdown rendering and should be fixed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR documents the diagrams design system in DESIGN.md (roles, kinds, and paint rules), aligns contributor guidance in AGENTS.md, and normalizes diagram-related prose/comments to American English across the supporting implementation and lint/test files.
Changes:
- Add a comprehensive “Diagrams” section to
DESIGN.mdand update STRICT rules/self-correction guidance accordingly. - Update
AGENTS.mdwith the diagrams rule summary and thepnpm check:diagram-tokenscommand. - Normalize “colour” → “color” wording and add cross-references to the new
DESIGN.mdsection in relevant code/docs comments.
File summaries
| File | Description |
|---|---|
| src/util/diagramSvg.ts | Updates documentation comments and adds a pointer to the new DESIGN.md “Diagrams” section. |
| src/styles/theme.css | Clarifies diagram token comments and normalizes spelling in comments. |
| src/styles/index.css | Normalizes spelling in the diagrams comment block. |
| src/components/GitGraph.astro | Normalizes spelling in component docs/comments. |
| scripts/check-diagram-tokens.test.mjs | Normalizes spelling in test descriptions/comments. |
| scripts/check-diagram-tokens.mjs | Normalizes spelling in CLI help/output and rule labels/comments. |
| plugins/remark-graphviz.ts | Normalizes spelling in plugin documentation comments. |
| plugins/remark-graphviz.test.ts | Normalizes spelling in test descriptions/comments. |
| DESIGN.md | Adds the diagrams design-system documentation and updates STRICT rules/self-correction entries. |
| AGENTS.md | Adds diagrams guidance and documents the new safety check command. |
Review details
Suppressed comments (2)
DESIGN.md:281
- This code span includes triple backticks, which will terminate the inline code early and render incorrectly; wrap it with a longer backtick delimiter.
- ` ```dot ` fences, rendered by `plugins/remark-graphviz.ts`
DESIGN.md:457
- This inline code span contains triple backticks (```), which breaks Markdown rendering; use a longer delimiter so the fence marker is shown as intended.
- A color attribute inside a ` ```dot ` fence → replace it with the role that says what the
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
DESIGN.md did not contain the word "diagram", and that silence is the whole reason this drifted: the diagram surface became the single largest violation of this document's own STRICT rules — no hex outside `tokens.css`, every dark remap in `theme.css`, components consume semantic tokens — while the document said nothing about it either way. A lint stops a color reaching a fence; only this explains what to write instead. The new section carries the role table, the three layout kinds, how a role becomes a surface/border/label, and the four surfaces that share the vocabulary. It also records the two judgment calls a reader would otherwise have to reverse-engineer: why `queued` and `mergify` share one accent, and why diagram borders lift toward white on dark when "the product palette does not flip" three sections above. The STRICT rules and the self-correction list gain the diagram case, and the SVG-hex exemption now says explicitly that diagrams are not covered by it. `AGENTS.md` gets the short version and the new command, per this file's own instruction to keep the two aligned. Also normalizes the diagram code to the site's American spelling. The three commits below this one were written in British English, which no other file in the repo uses — and the lint prints its guidance to contributors of a site that says "color". It is a style pass rather than a fix, folded in here because this is the commit that codifies house style; it changes no behavior, and the tests and the lint pass unchanged. Change-Id: Id961fd51cd73f70a9cab6ebc897c457e6dbfc581
ff56a82 to
5c91b2f
Compare
Revision history
|
|
Re-pushed to address the review: ff56a82 → 5c91b2f (compare).
Worth recording: the single-backtick form was not actually broken. CommonMark closes a code span on a backtick run of the same length as the opener, so the run of 3 inside was skipped —
|
DESIGN.md did not contain the word "diagram", and that silence is the whole
reason this drifted: the diagram surface became the single largest violation of
this document's own STRICT rules — no hex outside
tokens.css, every dark remapin
theme.css, components consume semantic tokens — while the document saidnothing about it either way. A lint stops a color reaching a fence; only this
explains what to write instead.
The new section carries the role table, the three layout kinds, how a role
becomes a surface/border/label, and the four surfaces that share the vocabulary.
It also records the two judgment calls a reader would otherwise have to
reverse-engineer: why
queuedandmergifyshare one accent, and why diagramborders lift toward white on dark when "the product palette does not flip" three
sections above. The STRICT rules and the self-correction list gain the diagram
case, and the SVG-hex exemption now says explicitly that diagrams are not
covered by it.
AGENTS.mdgets the short version and the new command, per this file's owninstruction to keep the two aligned.
Also normalizes the diagram code to the site's American spelling. The three
commits below this one were written in British English, which no other file in
the repo uses — and the lint prints its guidance to contributors of a site that
says "color". It is a style pass rather than a fix, folded in here because this
is the commit that codifies house style; it changes no behavior, and the tests
and the lint pass unchanged.