docs: PR architecture sections carry one diff diagram, not a before/after pair - #107
Merged
Conversation
…fter pair Two diagrams make the reviewer do the diffing. The mermaid-diff-diagram skill folds them into one flowchart with additions marked ✅ and removals ❌ struck through, so the change reads at a glance. The committed architecture/*.md files are untouched by this: they stay full-state classDiagram; only the PR excerpt changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FNgeJVcsXQ5sTfWLgCR4cv
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.
TL;DR
architecture/*.mdfiles changes — they stay full-stateclassDiagram. This is only about the excerpt in the PR description.CLAUDE.md.What changed
CLAUDE.md→ Architecture diagrams in PRs, item (2) of the recipe. Was: a Before mermaid block and an After mermaid block, each an excerpt. Now: one consolidated diff diagram per changed file, produced by themermaid-diff-diagramskill, fed the merge-base diagram as before and the branch's as after. Still an excerpt — only the affected classes and their immediate relationships, never the full diagram.The skill emits a
flowchart(notclassDiagram) becauseclassDiagramcan't style individual edges and its members are plain SVG text, so per-line marking is impossible there. Class boxes are emulated with HTML labels and UML semantics ride on edge labels. Every marker is layered so it degrades gracefully where a renderer strips inline styles: the ✅/❌ chip is the layer that always survives, with a highlight span,<s>strikethrough, andclassDef/linkStylecolors on top.What it looks like
Taken from #100, whose
libclass gained one export:✅ added · ❌ removed (strikethrough) · unmarked = unchanged
flowchart TB components["components"] lib["<div style='text-align:left'><b>lib</b><br/>+diff.ts splitLines lcsDiff diffText<br/>+runs.ts groupRuns runFileCount<br/>+heat.ts heatFor heatTotal heatText heatLevel hotPathSplit<br/>+heat.ts ageRange isFlatRange ageSpanLabel (treemap scale)<br/><span style='background:#22c55e55;padding:0 4px;border-radius:3px'>✅ +heat.ts orphanPaths (reads whose file left the tree)</span><br/>+sniff.ts sniffBytes BlobText MAX_BYTES<br/>+utils.ts</div>"] components -- "diffText groupRuns hotPathSplit" --> lib#100's description has already been rewritten this way.
Architecture changes
None — docs only, no package or type moves.