Spec Studio

An architecture within the bound draws in one diagram, the same bytes twice

spec:consumers.spec-studio.diagrams.within-boundExample / Scenario · storyready floor ready

Packs: pack:self-hosting-v1, pack:spec-studio-v1

Design: no design entries · no pinned declarations · no decisions

Findings: no errors, no warnings

specs/consumers/spec-studio.diagrams.within-bound.sdp.md

No open questions and no blocking questions; implementation binding none, verifier binding present, and expected-outcome oracle none.

Intent
outcome
Execute the grid, the text equivalent and determinism on an architecture that fits one drawing.
assumptions
  • The world builds the layout's input directly: the components are named component:probe.c01 and on, assigned in turn to the first contexts in code-unit order and the first layers in the closed order, and the uses edges join distinct component pairs taken in id order until the count is reached. It lays the input out twice through the engine's layout and compares the two SVG strings.
Behavior

Examples

Given an architecture of {components: 12} components spread over {contexts: 3} contexts and {layers: 4} layers, with {edges: 20} uses edges between components
When the build lays the architecture diagram out twice
Then the two drawings are byte-identical: {identical: true}
Then the diagram folds by {fold: "nothing"}
Then the first drawing holds {drawn: 12} boxes
Then its text equivalent names {named: 32} boxes and edges
Verification

Verifier bindings

  • test:protocol.studio-diagram-within-bound · anchored · test anchor binding present · test/studio-s1.test.ts:669

    External run evidence from test/studio-s1.test.ts

    Test anchors: test:protocol.studio-architecture-planned-apart, test:protocol.studio-coverage-literal, test:protocol.studio-coverage-number, test:protocol.studio-diagram-folds-context, test:protocol.studio-diagram-folds-layer, test:protocol.studio-diagram-within-bound, test:protocol.studio-lenses, test:protocol.studio-tests-coverage-row. Specs verified by those bindings: spec:consumers.agent-surface.example-space-coverage, spec:consumers.agent-surface.example-space-coverage.number-not-enumerable, spec:consumers.agent-surface.example-space-coverage.uncovered-literal, spec:consumers.spec-studio.data.recipe-answers, spec:consumers.spec-studio.diagrams, spec:consumers.spec-studio.diagrams.folds-by-context, spec:consumers.spec-studio.diagrams.folds-by-layer, spec:consumers.spec-studio.diagrams.within-bound, spec:consumers.spec-studio.lenses, spec:consumers.spec-studio.lenses.architecture, spec:consumers.spec-studio.lenses.architecture.planned-apart, spec:consumers.spec-studio.lenses.evidence, spec:consumers.spec-studio.lenses.packs, spec:consumers.spec-studio.lenses.tests, spec:consumers.spec-studio.lenses.tests.coverage-row.

    Run 1: external run evidence from vitest 4.1.10

    Build: CI 433 · Branch: fix/second-review-pass · Commit: 6375b6e431a7cf885a49befec76d7876cd3e538c · Start: 2026-11-04T07:12:23.076Z · Stop: 2026-11-04T07:15:49.695Z

    NameSuiteResultDuration
    bounds and folds 12 componentsStudio diagramspassed38.91 ms
    bounds and folds 45 componentsStudio diagramspassed10.32 ms
    bounds and folds 50 componentsStudio diagramspassed15.96 ms
    keeps every edge in an open text fallbackStudio diagramspassed2.87 ms
    orders grid contexts and layers and wraps cells within the fixed width budgetStudio diagramspassed6.4 ms
    draws planned-use edges dashed independently of planned box outlinesStudio diagramspassed0.87 ms
    checks the edge bound even when boxes fitStudio diagramspassed1 ms
    places folded contexts and layers in their own bands below the gridStudio diagramspassed6.46 ms
    places outgoing relation bands above the subject and folds ties in relation orderStudio diagramspassed17.11 ms
    folds trace relation groups and leaves member overflow as textStudio diagramspassed4.36 ms
    keeps recipe and diagram edges in code-unit order under forced Czech collationStudio lensespassed140.45 ms
    publishes all five ordered lenses and honest evidence without scriptStudio lensespassed63.22 ms
    reads verifier binding from the delivery fact and gives absent coverage its own filter valueStudio lensespassed23.92 ms
    labels a primitive-only space with no examples not measurable and hides it under coveredStudio lensespassed23.07 ms
    classifies 'number' with points [ '1' ] and mixed=false as 'not-measurable'Studio lensespassed20.73 ms
    classifies 'string' with points [ '"a"' ] and mixed=false as 'not-measurable'Studio lensespassed16.4 ms
    classifies 'boolean' with points [ 'true' ] and mixed=false as 'not-measurable'Studio lensespassed12.61 ms
    classifies '"a"|"b"' with points [] and mixed=false as 'uncovered'Studio lensespassed8.17 ms
    classifies '"a"|"b"' with points [ '"a"' ] and mixed=false as 'uncovered'Studio lensespassed18.43 ms
    classifies '"a"|"b"' with points [ '"a"', '"b"' ] and mixed=false as 'covered'Studio lensespassed27.57 ms
    classifies '"a"|"b"' with points [ '"a"' ] and mixed=true as 'uncovered'Studio lensespassed15.7 ms
    classifies '"a"|"b"' with points [ '"a"', '"b"' ] and mixed=true as 'covered'Studio lensespassed22 ms
    renders member subjects, code spans, used-by counts, differences and empty componentsStudio lensespassed20.76 ms
    describes evidence sources as not trackedStudio lensespassed4.48 ms
    executes the bound example against a fresh worldAn architecture within the bound draws in one diagram, the same bytes twice (spec:consumers.spec-studio.diagrams.within-bound)passed29.06 ms
    executes the bound example against a fresh worldAn architecture over the bound folds by context (spec:consumers.spec-studio.diagrams.folds-by-context)passed20.56 ms
    executes the bound example against a fresh worldOne context over the bound folds by layer (spec:consumers.spec-studio.diagrams.folds-by-layer)passed17.6 ms
    executes the bound example against a fresh worldA component design no anchor realizes draws planned beside the built one (spec:consumers.spec-studio.lenses.architecture.planned-apart)passed23.36 ms
    executes the bound example against a fresh worldA Spec's row on the tests lens counts its exercised keyed rules (spec:consumers.spec-studio.lenses.tests.coverage-row)passed18.81 ms
    executes the bound example against a fresh worldA literal no example binds is reported uncovered, and an unbound child is named (spec:consumers.agent-surface.example-space-coverage.uncovered-literal)passed6.94 ms
    executes the bound example against a fresh worldA number slot is not enumerable and reports no uncovered value (spec:consumers.agent-surface.example-space-coverage.number-not-enumerable)passed4.54 ms
    reuses the build's reader and validation findings during Studio recipe evaluationnot recordedpassed5.98 ms
    documents the component and member fields recipe 17 addsnot recordedpassed2.16 ms
    evaluates each shipped recipe once for its assigned parameters and shares Pack totals, with base falsenot recordedpassed23.69 ms
    evaluates each shipped recipe once for its assigned parameters and shares Pack totals, with base truenot recordedpassed26.3 ms
    keeps label lines bounded and orders member depths numerically with outside units lastnot recordedpassed2.61 ms
    labels planned uses, reports unreadable designs and keeps unknown structure visiblenot recordedpassed14.99 ms
    gives unstated context and layer folds addressable text descriptionsnot recordedpassed1.68 ms
    names a single edge relation once in the legend and preserves its text equivalentnot recordedpassed3.44 ms
    names solid and planned uses once without repeating edge labelsnot recordedpassed1.02 ms
Design view

Requirement drawing

  • Satisfying or referencing units: no recorded binding.
Requirement drawing for spec:consumers.spec-studio.diagrams.within-bound
The diagram as text
  • spec:consumers.spec-studio.diagrams.within-bound: An architecture within the bound draws in one diagram, the same bytes twice · declared Spec
  • spec:consumers.spec-studio.diagrams: A diagram is laid out from graph values into SVG with a text equivalent · declared Spec
  • test:protocol.studio-diagram-within-bound: test:protocol.studio-diagram-within-bound · anchored test binding · binding present · test/studio-s1.test.ts:669
  • spec:consumers.spec-studio.diagrams.within-bound refines spec:consumers.spec-studio.diagrams · declared
  • spec:consumers.spec-studio.diagrams.within-bound verifies spec:consumers.spec-studio.diagrams · declared
  • test:protocol.studio-diagram-within-bound verifies spec:consumers.spec-studio.diagrams.within-bound · anchored
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred and chosen syntax: requirementDiagram; exact refines, satisfies and verifies, with claim words in nodes and per-edge comments.

Decisions

No decision record named.

Runtime

No implementation neighborhood recorded.

Runtime observation: not tracked.

Evidence

Runtime observation: not tracked.

Build attestations: not tracked.

Deployments: not tracked.

Bills of materials: not tracked.

Impact
Relations of spec:consumers.spec-studio.diagrams.within-bound
  • E2: verifies · declared
The diagram as text
  • spec:consumers.spec-studio.diagrams: A diagram is laid out from graph values into SVG with a text equivalent
  • spec:consumers.spec-studio.diagrams.within-bound: An architecture within the bound draws in one diagram, the same bytes twice
  • spec:consumers.spec-studio.diagrams.within-bound refines spec:consumers.spec-studio.diagrams · declared
  • spec:consumers.spec-studio.diagrams.within-bound verifies spec:consumers.spec-studio.diagrams · declared
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred syntax: flowchart. Chosen syntax: labelled flowchart, preserving exact relations, claims and folds.

Rests on

Rested on by

No Spec rests on this Spec.

Relations

Relation and directionOther endClaimReasonExercised keys
refines · outgoingA diagram is laid out from graph values into SVG with a text equivalent
spec:consumers.spec-studio.diagrams · resolves
declaredNoneNone
verifies · outgoingA diagram is laid out from graph values into SVG with a text equivalent
spec:consumers.spec-studio.diagrams · resolves
declaredNonebuildTime, layoutInputs, sameBytes, architectureGrid, textEquivalent

Bindings

Implementation binding: none

Design reference: none

Verifier binding: present

  • test:protocol.studio-diagram-within-bound · anchored · test/studio-s1.test.ts:669 · test anchor

Expected-outcome oracle: none

Runtime observation: not tracked.

Run results: not recorded in the graph.

Findings

None.

Composing (0)

Composing needs the script.