Spec Studio

A few custom elements filter, search, open and copy on a rendered page

spec:consumers.spec-studio.page-elementsContract · storyready floor ready

Changed since the base graph base da4b141: design.copy; design.filter

Base input: schema 0.11.0, 405 Specs.

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

Design: 6 design entries · 6 pinned declarations · 1 decision

Findings: no errors, no warnings

specs/consumers/spec-studio.page-elements.sdp.md

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

The build renders every page whole, so these elements add behavior to markup that is already there rather than rendering views of their own. A browser refuses a module script on a page opened through file://, so they ship as one classic script.

Intent
outcome
Give the Studio's pages their few interactions through custom elements that enhance markup the build wrote, so a page with its script filters, searches and copies, and every page but the search page still reads in full without it.
Contract
rule.oneScript line 21 · specs/consumers/spec-studio.page-elements.sdp.md:21
The elements ship in one classic script, assets/studio.js, with no module syntax and nothing loaded at run time; the build bundles it from the package's source, with the concept matcher.

no example exercises it

rule.enhanceOnly line 22 · specs/consumers/spec-studio.page-elements.sdp.md:22
Each element enhances markup the build wrote and renders no graph value of its own, except that the search results element renders values from the search index its page embeds.

no example exercises it

rule.noRequest line 23 · specs/consumers/spec-studio.page-elements.sdp.md:23
No element requests anything on a page opened through file://; the stamp element requests stamp.json only over http or https.

no example exercises it

rule.nativeControls line 24 · specs/consumers/spec-studio.page-elements.sdp.md:24
Every control an element adds is a native button, link, select or input with a text label, reachable from the keyboard in reading order.

no example exercises it

rule.liveCounts line 25 · specs/consumers/spec-studio.page-elements.sdp.md:25
An element that changes what a page shows says so in words in a polite live region, such as how many rows a filter shows.

no example exercises it

0 unkeyed rules.

Design
search line 28 · specs/consumers/spec-studio.page-elements.sdp.md:28
sdp-search with page-root, the relative path from its page to the page-set root: wraps the search field's form and, on submit, opens <page-root>search.html#q=<term> with the term percent-encoded.

no citation recorded

searchResults line 29 · specs/consumers/spec-studio.page-elements.sdp.md:29
sdp-search-results: on the search page, reads the index from the sdp-data element, matches the fragment's term and each term the person types, writes the results spec:consumers.spec-studio.search designs, and keeps the term in the fragment.

no citation recorded

filter line 30 · specs/consumers/spec-studio.page-elements.sdp.md:30
sdp-filter: wraps a hidden form of labelled select elements, each with data-filter="<name>" and an any option, and the rows marked data-row. On upgrade it shows the form, hides each row whose data-<name> differs from a chosen value, and writes <shown> of <total> shown in its output element; a row whose attribute holds several space-separated values, such as its Packs, matches when one of them equals the choice. When a followed link or a fragment change targets an element inside a row it hides, it returns every control to any, adds to its output that the filter was cleared to show that target, and scrolls the target into view.

no citation recorded

expander line 31 · specs/consumers/spec-studio.page-elements.sdp.md:31
sdp-expander: adds Open all and Close all buttons for the details elements inside it, and on load and on each fragment change opens every details that holds the fragment's target and scrolls the target into view.

no citation recorded

copy line 32 · specs/consumers/spec-studio.page-elements.sdp.md:32
sdp-copy with text, or with for naming a text area on its page: a Copy button whose accessible name includes the text or the text area's label; it copies that text and says Copied, and where the clipboard is unavailable it selects the text so the person can copy it.

no citation recorded

stamp line 33 · specs/consumers/spec-studio.page-elements.sdp.md:33
sdp-stamp with page-root: served over http or https, it requests <page-root>stamp.json and, when it loads, shows its corpus commit, engine and build time as text; otherwise it shows nothing.

no citation recorded

Verification

Verifier bindings

  • test:protocol.studio-copy-source · anchored · test anchor binding present · test/studio-diagram-core.test.ts:191

    External run evidence from test/studio-diagram-core.test.ts

    Test anchors: test:protocol.studio-copy-source, test:protocol.studio-diagram-core. Specs verified by those bindings: spec:consumers.spec-studio.diagram-kinds.edge-routing, spec:consumers.spec-studio.diagram-kinds.legibility, spec:consumers.spec-studio.diagram-kinds.mermaid-source, spec:consumers.spec-studio.diagram-kinds.requirement-trace, spec:consumers.spec-studio.diagrams, spec:consumers.spec-studio.page-elements.

    Run 1: external run evidence from vitest 4.1.10

    Build: CI 380 · Branch: feature/roadmap-and-slices-v0 · Commit: 34909918bf0be0e849959644401797191cae379f · Start: 2026-10-22T17:40:31.456Z · Stop: 2026-10-22T17:42:16.171Z

    NameSuiteResultDuration
    wraps by code point and shortens shared segments without collisionsshared diagram corepassed8.25 ms
    wraps boxes within the width budget and writes an instruction only for final wide drawingsshared diagram corepassed6.1 ms
    routes forward, backward and same-band edges with distinct ports and no shared segmentsshared diagram corepassed14.15 ms
    fails closed when routing cannot fit, retaining complete text and no partial sourceshared diagram corepassed50.17 ms
    serializes full identities, exact claims, reasons, counts and folds as inert Mermaid datashared diagram corepassed1.98 ms
    copies the current value of the labelled textarea and selects that same area on clipboard failurenot recordedpassed55.84 ms
    keeps the full box and edge bound routable with obstacles, separate lanes and edge labelsnot recordedpassed430.81 ms
    offers deterministic Mermaid source for each existing drawing and pins the safe text syntaxnot recordedpassed5.63 ms
    folds reason-bearing trace groups without attributing a member reason to the groupnot recordedpassed8.01 ms
    uses the full band budget for a single context and routes adjacent bands inside itnot recordedpassed0.59 ms
    prints exact short relation words and reserves keys for wording that cannot fitnot recordedpassed6.46 ms
    names viewport and instruction ids for trace and secondary viewsnot recordedpassed3.43 ms
    names the architecture syntax and serializes aliases in displayed box ordernot recordedpassed0.34 ms
    routes the current Protocol architecture and recorded adopter architecture with distinct ports and segmentsnot recordedpassed74.94 ms
    extends overflow rails past earlier labels on the adopter's dense tracesnot recordedpassed4.75 ms
    keeps high-degree boxes inside their cells when contexts share a gridnot recordedpassed1.15 ms
    folds nine refining verifiers with their tests within the band budget and keeps every text rownot recordedpassed2.68 ms
    names folded declared refiners by their relation and claim without an internal subtitlenot recordedpassed2.03 ms
    keeps examples apart from refiners when dense requirement groups foldnot recordedpassed1.09 ms
    names refines folds in plain words and preserves directionnot recordedpassed1.31 ms
    names satisfies folds in plain words and preserves directionnot recordedpassed1.09 ms
    names verifies folds in plain words and preserves directionnot recordedpassed1.46 ms
    keeps a short drawing unfolded even with many boxes and incident edgesnot recordedpassed1.77 ms
    packs disjoint endpoint intervals into shared horizontal lanesnot recordedpassed0.89 ms
    uses a legend key before spending overflow width on exact wordsnot recordedpassed1.18 ms
  • test:protocol.studio-page-elements · anchored · test anchor binding present · test/studio-elements.test.ts:26

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

    Test anchors: test:protocol.studio-page-elements. Specs verified by those bindings: spec:consumers.spec-studio.page-elements, spec:consumers.spec-studio.search.

    Run 1: external run evidence from vitest 4.1.10

    Build: CI 380 · Branch: feature/roadmap-and-slices-v0 · Commit: 34909918bf0be0e849959644401797191cae379f · Start: 2026-10-22T17:40:31.456Z · Stop: 2026-10-22T17:42:16.171Z

    NameSuiteResultDuration
    offers a prompt before searching and puts a real miss before the field listStudio page interactionspassed2.06 ms
    writes singular counts, readable fields, code-span titles and linked entry keysStudio page interactionspassed3.05 ms
    cuts long excerpts at word boundaries around the termStudio page interactionspassed0.42 ms
    copies the requested text and reports successful clipboard writesStudio page interactionspassed0.81 ms
    selects copy text when the clipboard is missing or rejects accessStudio page interactionspassed0.52 ms
    decodes entry fragments literally and refuses malformed fragment escapesStudio page interactionspassed0.29 ms
    filters all filters together and accepts space-separated row valuesStudio page interactionspassed0.35 ms
    clears the filter when a link or fragment targets a row it hidesStudio page interactionspassed6.32 ms
    round-trips term fragments including punctuation, spaces and UnicodeStudio page interactionspassed0.9 ms
    matches entry tokens, and non-string values only by their coined keyStudio page interactionspassed0.86 ms
    keeps a node whose only match is a tokenized coined entry keyStudio page interactionspassed0.59 ms
    reads authored values at most twice per search, regardless of the entry countStudio page interactionspassed3.32 ms
    links addressed hits to the entry and other hits to their section or narrativeStudio page interactionspassed0.5 ms
    groups entries beneath each node and pages fifty nodes at a timeStudio page interactionspassed7.16 ms
    renders node words, independent rungs, bindings, locations and escaped textStudio page interactionspassed2.57 ms
    requests a stamp only over HTTP and HTTPS and shows only its text fieldsStudio page interactionspassed0.61 ms
    loads the built classic bundle without imports and defines the page and view elementsStudio page interactionspassed1.95 ms
    names a question copy control with the full entry address and updates itStudio page interactionspassed1.42 ms
    uses the navigation search input, announces the empty prompt and reveals paging progressStudio page interactionspassed9.52 ms
    enhances a diagram through its view box, preserves links on click and removes handlersnot recordedpassed2.61 ms
Design view

Requirement drawing

  • Declared verifying examples: no declared verifying example.
Requirement drawing for spec:consumers.spec-studio.page-elements
The diagram as text
  • spec:consumers.spec-studio.page-elements: A few custom elements filter, search, open and copy on a rendered page · declared Spec
  • spec:consumers.spec-studio.components: The Studio's custom elements each hold one view the build renders · declared Spec
  • component:protocol.studio-elements: optional browser behavior and proposal handoff · anchored code · src/studio-elements/index.ts:13
  • impl:protocol.studio-copy: copies text with selection fallback and failure feedback · anchored code · src/studio-elements/copy.ts:22
  • impl:protocol.studio-expander: opens fragment ancestors and expands disclosures for print · anchored code · src/studio-elements/expander.ts:16
  • impl:protocol.studio-filter: filters build-rendered rows through their recorded attributes · anchored code · src/studio-elements/filter.ts:25
  • impl:protocol.studio-search-form: routes search forms through page-root URLs and fragments · anchored code · src/studio-elements/search.ts:18
  • impl:protocol.studio-search-results: ranks and renders concept, entry and file search hits · anchored code · src/studio-elements/search-results.ts:95
  • impl:protocol.studio-stamp: resolves published stamps and source links in the browser · anchored code · src/studio-elements/stamp.ts:30
  • test:protocol.studio-copy-source: test:protocol.studio-copy-source · anchored test binding · binding present · test/studio-diagram-core.test.ts:191
  • test:protocol.studio-page-elements: test:protocol.studio-page-elements · anchored test binding · binding present · test/studio-elements.test.ts:26
  • spec:consumers.spec-studio.page-elements refines spec:consumers.spec-studio.components · declared
  • component:protocol.studio-elements satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-copy satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-expander satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-filter satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-search-form satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-search-results satisfies spec:consumers.spec-studio.page-elements · anchored
  • impl:protocol.studio-stamp satisfies spec:consumers.spec-studio.page-elements · anchored
  • test:protocol.studio-copy-source verifies spec:consumers.spec-studio.page-elements · anchored
  • test:protocol.studio-page-elements verifies spec:consumers.spec-studio.page-elements · anchored
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred syntax: requirementDiagram. Chosen syntax: flowchart TB because folds require exact labels unavailable in requirement syntax.

Decisions

Runtime
  • component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    • component:protocol.projections · read-only output, layout and owned publication · src/projections/design-review.ts:29 · layer edge · context protocol
    • component:protocol.reader · the typed graph contract and body evaluator · src/reader/reader.ts:671 · layer application · context protocol
  • impl:protocol.studio-copy · copies text with selection fallback and failure feedback · src/studio-elements/copy.ts:22

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.studio-expander · opens fragment ancestors and expands disclosures for print · src/studio-elements/expander.ts:16

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.studio-filter · filters build-rendered rows through their recorded attributes · src/studio-elements/filter.ts:25

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.studio-search-form · routes search forms through page-root URLs and fragments · src/studio-elements/search.ts:18

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.studio-search-results · ranks and renders concept, entry and file search hits · src/studio-elements/search-results.ts:95

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.studio-stamp · resolves published stamps and source links in the browser · src/studio-elements/stamp.ts:30

    Component: component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · layer edge · context protocol

    Uses

    None.

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.page-elements
The diagram as text
  • spec:consumers.spec-studio.components: The Studio's custom elements each hold one view the build renders
  • spec:consumers.spec-studio.diagram-kinds.mermaid-source: A diagram offers Mermaid source as copyable text
  • spec:consumers.spec-studio.page-elements: A few custom elements filter, search, open and copy on a rendered page
  • spec:consumers.spec-studio.search: Search finds a Spec, a Pack, an entry or a bound file by a word
  • spec:consumers.spec-studio.shell: The Studio's shell frames every page with navigation, a rail and a canvas
  • spec:decisions.studio-web-components: The Studio is built from custom elements, not a framework
  • spec:consumers.spec-studio.page-elements decidedBy spec:decisions.studio-web-components · declared
  • spec:consumers.spec-studio.page-elements dependsOn spec:consumers.spec-studio.search · declared
  • spec:consumers.spec-studio.page-elements dependsOn spec:consumers.spec-studio.shell · declared
  • spec:consumers.spec-studio.page-elements refines spec:consumers.spec-studio.components · declared
  • spec:consumers.spec-studio.diagram-kinds.mermaid-source dependsOn spec:consumers.spec-studio.page-elements · 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

Distance 1

Relations

Relation and directionOther endClaimReasonExercised keys
decidedBy · outgoingThe Studio is built from custom elements, not a framework
spec:decisions.studio-web-components · resolves
declaredNoneNone
dependsOn · outgoingSearch finds a Spec, a Pack, an entry or a bound file by a word
spec:consumers.spec-studio.search · resolves
declaredNoneNone
dependsOn · outgoingThe Studio's shell frames every page with navigation, a rail and a canvas
spec:consumers.spec-studio.shell · resolves
declaredNoneNone
refines · outgoingThe Studio's custom elements each hold one view the build renders
spec:consumers.spec-studio.components · resolves
declaredNoneNone
dependsOn · incomingA diagram offers Mermaid source as copyable text
spec:consumers.spec-studio.diagram-kinds.mermaid-source · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • component:protocol.studio-elements · optional browser behavior and proposal handoff · src/studio-elements/index.ts:13 · role interaction · layer edge · context protocol
  • impl:protocol.studio-copy · copies text with selection fallback and failure feedback · src/studio-elements/copy.ts:22 · role interaction · component component:protocol.studio-elements · layer edge · context protocol
  • impl:protocol.studio-expander · opens fragment ancestors and expands disclosures for print · src/studio-elements/expander.ts:16 · role interaction · component component:protocol.studio-elements · layer edge · context protocol
  • impl:protocol.studio-filter · filters build-rendered rows through their recorded attributes · src/studio-elements/filter.ts:25 · role interaction · component component:protocol.studio-elements · layer edge · context protocol
  • impl:protocol.studio-search-form · routes search forms through page-root URLs and fragments · src/studio-elements/search.ts:18 · role interaction · component component:protocol.studio-elements · layer edge · context protocol
  • impl:protocol.studio-search-results · ranks and renders concept, entry and file search hits · src/studio-elements/search-results.ts:95 · role projection · component component:protocol.studio-elements · layer edge · context protocol
  • impl:protocol.studio-stamp · resolves published stamps and source links in the browser · src/studio-elements/stamp.ts:30 · role interaction · component component:protocol.studio-elements · layer edge · context protocol

Design reference: none

Verifier binding: present

  • test:protocol.studio-copy-source · anchored · test/studio-diagram-core.test.ts:191 · test anchor
  • test:protocol.studio-page-elements · anchored · test/studio-elements.test.ts:26 · 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.