Repository navigation
Diagrams: architecture, flowchart, data flow, sequence and schema (DECISIONS 281, 282) - #122
Merged
Merged
Conversation
…CISIONS 269 and 270) Five React components on one engine (diagram-core.ts, no React inside it), the HTML skill's diagram module, the diagram tokens, foundations' Diagrams section and the AGENTS.md rules, and review round 56. Built by Opus from Fable's decision. Tests written, not run (DECISIONS 271). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: review round 56 was taken on main, so the diagrams round is 64; the contrast tests keep both blocks; the size table, the skill parts and the manifest are regenerated. DECISIONS 269 and 270 are main's own numbers now, so the diagrams cite 281 and 282. The skill index's budget is 12,550 (the diagram line on top of main's 12,398). The skill's usage example names an "api service", not CIMIP's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A composed figure keeps its stop and its list: the attribute updater pairs each tree element with the next DOM element of its tag and class, so the JSON script is passed over. - The author's data is checked at the model's boundary: text is made a string; the heading, a line's kind, a side and a key take one of their values or the default, with a warning; a track is a whole number. Element and attribute names are checked, and every value in the ink is escaped. - React: a caller's ref is set beside the figure's own; on the root only the state's attributes are written, so a caller's hidden and ARIA stay. - The stack's end lanes are allocated across each overlapping set; a third lane is reported. Two stems between one pair take the quarter points, in the stack and in the drawn layout. A stem's label tries the middle and then the thirds. A stack that still overlaps draws no lines. - A route that would leave the drawing fails the fit. - A decision's words wrap at 62% of the track (the border-box). A sequence's least width uses its measured participants. - A measured decision never shows its box's border, traced or in forced colours. - The composer finds figures with its own tag reader in the held body, so examples in a textarea, comment or script are left alone and an unquoted class works. - Polish: the roving stop moves by two attributes in the skill; the plan, sentences, key and list are worked out once per model; a gutter is scored by its own lines; development checks are off in a React production build. A second Basalt.diagram call rewrites the markup. The list carries every kind's word and the sequence's bands as sub-headings. The usage example defines both ends. - The diagram module's cap goes from 82,300 to 87,200 bytes (87,119 now). The test files are unchanged in this commit (the owner skipped them for now). Nothing here has been run in a browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d 282) Neon's code review and Fable's pixel review of 8c9233c, and the decider's answers to the builder's questions. - No-script list in the HTML skill: the open rule is important, so the core's [hidden] rule no longer closes it. - A stack that still overlaps draws no lines and is dressed as the no-script form: no line in the key, no key hint, no stops, the list open ("Hide the list"); it closes again when lines return, unless the reader opened it. Fixed seats (rail, trunk, end lines) take a line of their own as the gap grows, and a group's first member's grown gap is the group's margin, so Neon's wiped cases draw. - Labels are seated against each run's place before the half-pixel snap: the CIMIP flowchart is stacked to 959 and drawn at every whole width from 960 to 1104. - .basalt-diagram[hidden] hides; the list's code has no box in the skill. - Opposite end lines from one card leave up first; the end gutter is measured from the drawing's end, not a group's inside; turn-backs share a gutter's lanes with its jogs, dropped foreign keys take no lane, and a lane order that lays one run on another scores worst. - A labelled line in a 40px first or last row gets space-3 above and below when that is all it needs, so a one-row diagram can draw. - The React figure installs the hardware-key listener for its hint. - Decider's answers: Mono details break only at spaces; the schema key starts with "Primary key" and "Foreign key"; the copy changes; phase sub-headings one level under "Messages". - Polish: notes keep their case, schema table names are sub-headings, id-keyed records have no prototype, a zero-width figure waits to be shown, the walkthrough says its shots are labelled by the window. - The skill module stays under its 87,200 cap (87,158): the before-script rules use :is(), and the skill build writes the core's type roles and shorter private property names. Tests were not run or edited (the owner paused them). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bmjcoding
marked this pull request as ready for review
November 23, 2026 02:32
bmjcoding
added a commit
that referenced
this pull request
Nov 23, 2026
…wn clock The owner lifted the test skip for diagrams. Each file run by name, alone: React diagrams 44/44, diagram-motion 65/65, bundle 103/103; the skill's diagrams 15/15, diagram-motion 11/11, compose 112/112; the six token files 243/243; the packed consumer passes. Code: - An entrance drawn again while its animations are paused (seeked, or posed) is rebuilt paused at the same moment, and "whole" is read on its own clock, not the page's (Neon's finding 8.2: a seeked figure narrowed restarted its lines). - The skill writes a one-form mark's image once (no --_md copy); the focal card's dark form falls back to the light one. No pixel change. Tests: - #122's half-finished patch applied where it still fit; its crossing fixture crosses once, not twice, so it says so. Two harness fixes: a pixel read scrolls its element into view; a line count leaves out the key's swatches. - Motion: the uncomposed skill page composed; the seek-and-narrow test reads the clock that paused animations keep; the print test really stops script (the painted page reopened with script off); the hydration test really server-renders and hydrates; the frames test checks every word at 4.5:1; the narrow test starts a run and checks it stays on its message; development errors run in a development build; the mark pixel test frames the owner's file in the same SVG (it caught a shifted box and a colour change). - Added: all 17 motion tokens, the mark-words warning, a 40-message sequence, traced ink and the pause before loops resume, the run's dot in forced colours, and each print's mark form by its ground. Budgets: diagram 91000 to 91250 and diagram-motion 26200 to 26850. Fix round 1 had already taken them over (91205, 26621, unrun); this round added 1 and 180 bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Five diagram types for Basalt: architecture, flowchart, data flow, sequence and database schema. Each ships as a React component (
ArchitectureDiagram,FlowchartDiagram,DataFlowDiagram,SequenceDiagram,SchemaDiagram) on one shared engine, and as the HTML skill'sdiagrammodule. Also in this PR: the diagram tokens, a "Diagrams" section indocs/foundations.md, the matchingAGENTS.mdrule and review round 64. The examples are CIMIP's own flows, drawn from its docs and schema.Who decided what
diagram-designreference to Basalt's primitives. He chose these five types for CIMIP's real flows and confirmed the lead's prototype: "yeah these are pretty solid apart from the little issues with the text overlapping... but yeah send these to the council, great first run." This was a handoff (DECISIONS 281).diagram-design(MIT) supplied the types and ideas. None of its colours, sizes or CSS are used.What the decision holds
Review
8c9233c9)e1a35bce)Fix round 2 was not re-reviewed by any seat. It was the last round, at the owner's request ("too much waiting"). The lead checked that lint, both typechecks and the build pass, rebuilt round 64's 122 screenshots, and looked at them in both themes at 1440 and 390.
Fable's answers that are built here:
Not fixed:
Tests
The tests are written but have not run. The owner paused tests (DECISIONS 271), then skipped test work for this build. Some are already stale:
diagrams.test.mjs:371expects the old "The one transaction" wording;basalt-diagram-substring);These are in the backlog for the full run on main.
Sizes
styles.cssgrows about 9.4% minified.diagrammodule's cap is 87,200; it measures 87,158.diagram-focal-rule-contrast, was confirmed by the decider.Merging main
Main was merged in once. Review round 56 was taken on main, so this is round 64. DECISIONS 269 and 270 were also taken on main, so the diagrams cite 281 and 282.
The walkthrough is built with
npm run review -- 64.Final positions, as written
Neon (drafter): object
object
I agree with the overall direction — the measured fit rule, derived ports/routes/groups/foreign keys, the 3:1 flowchart contour, shared buses and computed crossing cuts, ink-only tracing without tap-to-trace, static HTML before script, keeping
diagram-structureanddiagram-edge-dimonborder-inputunder more contrast, andCanvasText/Canvasfor the focal node in forced colours all improve on Draft A. Three concrete defects in the spec would break the build or its own examples and need fixing before implementation:Sections 1.8 and 1.11 (edge-label seating rejects two CIMIP examples at every width). Measured in Chromium on Geist Mono
text-xs,"trim"is28.8pxbare (36.8pxplated),"responder"is64.8px(72.8pxplated), and"observer"is57.6px(65.6pxplated). Under 1.8, an above/below label sitsspace-1-5(6px) from the line; growing its box byspace-1(4px) reaches2pxfrom the line, which overlaps an8 × 8size-diagram-headarrowhead (±4px) vertically by 2px. Combined with centering on the full node-to-node run and box-based node hit-testing, Data flowtrimin its fixedspace-12(48px) gap and Flowchartresponderandobserverin their fixedspace-16(64px) gap each get 0 of 6 clean seats at every width (including 1,440px). By 1.8 ("No seat, no drawn layout"), neither example can ever enter the drawn layout, contradicting 1.11 ("On the 1,104px page row at 1440 all five are drawn").space-2(8px) clear of the line (so thespace-1-grown box clears the ±4px head vertically), compute middle/thirds along the clear shaft (excluding the 8px head), and test node collisions against each node's drawn contour (diamond polygon / capsule curve, matching 1.5) rather than its bounding box. With those three rules,"trim"seats cleanly atcx = 28([9.6, 46.4]in[0, 48]), and"responder"and"observer"seat cleanly from Flowchart's 880px minimum through 1,440px.Section 1.17 (forced colours erases the focal node's text in Chromium). Section 1.17 applies
forced-color-adjust: noneonly to the SVG and swatches ("Nodes are HTML and take theirs from the system") while styling the focal nodeCanvasTextwithCanvasink. In Chromium underforcedColors: "active", an HTML element whose background differs fromCanvaswithoutforced-color-adjust: nonereceives a solidCanvasbackplate behind its text — paintingCanvastext onto aCanvasbackplate. Verified by pixel inspection: all 1,624 pixels in the focal text box render solid(0, 0, 0)in forced-dark and(255, 255, 255)in forced-light (1.00:1, completely invisible), the same backplate issuedocs/foundations.md(§Lines, states and actions) solves withforced-color-adjust: noneon lit rows.CanvasText/Canvasinversion, and explicitly setforced-color-adjust: noneon the focal HTML node (including the focal schema table and stacked sequence focal chip), with the focal table'sdiagram-focal-ruleset toCanvasand its outer edge toCanvasTextunder@media (forced-colors: active).Sections 1.11, 1.12 and 1.13 (the 640px stack cap distorts stacked diamonds to 10:1 and over-stretches intermediate stacks). Because the fit rule keeps Flowchart stacked up to 879px and Data flow stacked up to 1,079px, the 640px cap (
size-breakpoint-container-lg) now governs a wide band of tablet and split-screen widths. Even at 607px (decision/proof/flow-stack-639.png),"Who is deciding?"and"First decision?"flatten to 607×64 slivers (at 640px, 640×64 — 10:1), where the diamond is only2.4pxthick at thex = 12pxrail — barely thicker than the 2px rail itself — and stacked cards stretch across empty space far from their end-lane bypasses.size-breakpoint-container(480px) (existing token; all CIMIP stacked cards fit with room to spare) and floor a stacked diamond's height atmax(space-16, width / 5)(72px at 390, 96px at 480) so it stays a recognizable diamond with a clean shoulder for the rail and trunk.Two small non-blocking cleanups worth folding in at the same time: in 1.13's stacked-route table, Row 1 ("both on the spine or both branches") omits
branch → next spine(whichderive-check.mjsroutes straight down — "The next card, except spine → branch" fixes it); and in Section 7, the390 ↔ 900focus-survival test leaves Flowchart (880), Data flow (1,080) and Schema (1,060) stacked at a 900px viewport (852px figure) while Sequence/Schema drop roving stops when stacked — test390 ↔ 1440for layout switches and specify moving focus to the disclosure toggle if a focused Sequence/Schema node narrows into its stop-free stack.Astra (checker): object
object
Canvas. Focal words useCanvasink, so that comparison always gives 1:1. Measure those words against their paintedCanvasTextfill at 4.5:1, and measure the fill against the surroundingCanvasat 3:1.Fable revised the decision on all six objections (
answers.mdin the council folder).🤖 Generated with Claude Code