Spec Studio

A corpus checks the register tokens its prose cites

spec:validation.external-registersUse Case / Behavior · storyready floor ready

Changed since the base graph base da4b141: relation.refines:spec:validation.corpus-rules

Base input: schema 0.11.0, 405 Specs.

Packs: pack:adopter-speed-v1, pack:self-hosting-v1

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

Findings: no errors, no warnings

specs/validation/external-registers.sdp.md

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

A corpus written against an earlier design cites that design's numbered things by token: its decisions, laws, scenarios, and the extensions the corpus itself adds. The first adopter keeps such a register as a table in its design README and checks the tokens its Specs cite against it with a script that reads the carriers a second way (libar-platform/design/tools/check.py). A register is the corpus's own data and never the Protocol's. A token stays prose: the carrier gains no grammar for it and the graph mints no node for it. Recipe 50 reads the tokens the Specs already hold as text, finds them by a pattern the corpus gives, checks them against a register file the corpus passes, and answers with findings, so the check runs as a rules file on the one validation path. Which registers a corpus may cite, and so which files it passes, is its owner's ruling.

Intent
problem
A corpus that cites the tokens of an outside register checks them with a script that reads its carriers a second way, or does not check them at all.
outcome
Check the tokens a corpus cites from an outside register against a register file it supplies, as a rules file, with no new grammar and no graph node.
Behavior
rule.tokensStayProse line 27 · specs/validation/external-registers.sdp.md:27
A register token stays prose: the carrier gains no grammar for it, the graph holds no node or edge for it, and no Protocol validator reads it.

no example exercises it

rule.registerAsData line 28 · specs/validation/external-registers.sdp.md:28
External registers, recipe 50, takes the register as data, a file the corpus passes with --params register=@PATH, and the pattern that finds the register's tokens in text, and reads the graph and nothing else.

spec:validation.external-registers.unknown-and-retired · enabled

rule.textRead line 29 · specs/validation/external-registers.sdp.md:29
It reads every string entry search walks in each Spec, the narrative and every section value with the keys an author coins, open questions and their fields and example steps included, plus each Spec's title and the reason of each relation it declares; it reads no id, fixed field name, Pack manifest, file or source.

no example exercises it

rule.citation line 30 · specs/validation/external-registers.sdp.md:30
Each match of the pattern in one of those strings cites the matched text as a token, at that Spec and entry.

spec:validation.external-registers.unknown-and-retired · enabled

rule.unknownToken line 31 · specs/validation/external-registers.sdp.md:31
A cited token the register does not list is an unknown-token finding, once per citing Spec and token.

spec:validation.external-registers.unknown-and-retired · enabled

rule.retiredToken line 32 · specs/validation/external-registers.sdp.md:32
A cited token the register retires is a retired-token finding, once per citing Spec and token.

spec:validation.external-registers.unknown-and-retired · enabled

rule.uncitedToken line 33 · specs/validation/external-registers.sdp.md:33
When the caller passes uncited: true, each token the register holds that no Spec cites is an uncited-token finding; a retired token is never one.

spec:validation.external-registers.uncited-on-request · enabled

rule.asRulesFile line 34 · specs/validation/external-registers.sdp.md:34
The answer carries its findings, so the shipped file runs unchanged as a rules file at the severity the corpus passes; a corpus that checks several registers calls the recipe once per register through recipes from a rules file of its own, because one rules file is named once.

spec:validation.external-registers.uncited-on-request · enabled, spec:validation.external-registers.unknown-and-retired · enabled

rule line 35 · specs/validation/external-registers.sdp.md:35
The recipe reports and refuses nothing, and states no register: what an outside design may be cited for stays the corpus's own text.

1 unkeyed rule.

Verifying examples

A held token no Spec cites fails a rules run only when the caller asks · spec:validation.external-registers.uncited-on-request · ready floor ready

Executable Spec

Given a probe corpus whose Spec cites the tokens {cited: "E-1"}
Given a register file that holds {held: "E-1 E-2"} and retires {retired: ""}
When the shipped external-registers file runs as a rules file with the pattern for E-numbers and uncited {uncited: true}
Then the command exits {exitCode: 1}
Then the corpus findings carry the rule ids {ruleIds: "uncited-token"}

Open example

A cited token the register lacks or retires fails a rules run · spec:validation.external-registers.unknown-and-retired · ready floor ready

Executable Spec

Given a probe corpus whose Spec cites the tokens {cited: "E-1 E-7 E-9"}
Given a register file that holds {held: "E-1 E-2"} and retires {retired: "E-7"}
When the shipped external-registers file runs as a rules file with the pattern for E-numbers and uncited {uncited: false}
Then the command exits {exitCode: 1}
Then the corpus findings carry the rule ids {ruleIds: "retired-token, unknown-token"}

Open example

Example space

Given a probe corpus whose Spec cites the tokens {cited:string}
Given a register file that holds {held:string} and retires {retired:string}
When the shipped external-registers file runs as a rules file with the pattern for E-numbers and uncited {uncited:boolean}
Then the command exits {exitCode:number}
Then the corpus findings carry the rule ids {ruleIds:string}
Design
registerFile line 38 · specs/validation/external-registers.sdp.md:38
{ "tokens": [token] }, where each token is a non-empty string the register holds, or { "token": "<string>", "retired": <boolean> }, retired when retired is true and held otherwise; other keys of the file and of a token object are the corpus's own and ignored, so a register may carry its own columns.

no citation recorded

registerParams line 39 · specs/validation/external-registers.sdp.md:39
recipe 50 takes params.register, the register file's object, params.pattern, params.severity, "error" by default or "warning", and params.uncited, false by default; register and pattern have no sample, and a missing or malformed parameter returns { diagnostics: [{ parameter, problem }] } and no findings, which fails the file as a rules file.
patternParam line 40 · specs/validation/external-registers.sdp.md:40
params.pattern is the source of a JavaScript regular expression compiled with the flags gu, whose whole match is the token; a pattern that does not compile, that matches the empty string, or that fails to match each of the register's tokens whole is a diagnostic, as is a token the register lists twice.

no citation recorded

registerAnswer line 41 · specs/validation/external-registers.sdp.md:41
{ input: { pattern, severity, uncited }, totals: { specs, citations, tokens, unknown, retired, uncited }, tokens, findings }, where specs counts the Specs read, citations the matches, tokens the distinct cited tokens, and the last three the findings of each rule id.

no citation recorded

tokenRow line 42 · specs/validation/external-registers.sdp.md:42
{ token, held, retired, citations, specs } for each distinct cited token in code-unit order, where specs lists the citing Specs by id and an unknown token has held and retired false.

no citation recorded

tokenFinding line 43 · specs/validation/external-registers.sdp.md:43
{ validatorId, subjectId, relatedId, severity, message, file, path, line } for unknown-token and retired-token, where subjectId is the citing Spec, relatedId the token, file the Spec's carrier, path the first citing text, in the order the title, the narrative and sections as entry search walks them, then relation reasons as authored, written title, a text path in the form the prose-mention check writes, such as narrative, behavior.rules[2] or design.<key>, or relation.<type>.<target>, and line that text's recorded line, left out when not located; findings sort by Spec id, then token.

no citation recorded

tokenMessages line 44 · specs/validation/external-registers.sdp.md:44
<spec> cites <token>, which the register does not list for unknown-token, <spec> cites <token>, which the register retires for retired-token, and <token> is held by the register and no Spec cites it for uncited-token.

no citation recorded

uncitedFinding line 45 · specs/validation/external-registers.sdp.md:45
{ validatorId: "uncited-token", subjectId, severity, message }, where subjectId is the token; these findings follow the others, in the register's order.

no citation recorded

Verification

Verifier bindings

  • spec:validation.external-registers.uncited-on-request · A held token no Spec cites fails a rules run only when the caller asks · declared · example enabled · specs/validation/external-registers.uncited-on-request.sdp.md

    External run evidence from test/self-hosting-external-registers.test.ts

    Test anchors: test:protocol.external-registers.uncited-on-request, test:protocol.external-registers.unknown-and-retired. Specs verified by those bindings: spec:validation.external-registers, spec:validation.external-registers.uncited-on-request, spec:validation.external-registers.unknown-and-retired.

    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
    executes the bound example against a fresh worldA cited token the register lacks or retires fails a rules run (spec:validation.external-registers.unknown-and-retired)passed25.88 ms
    executes the bound example against a fresh worldA held token no Spec cites fails a rules run only when the caller asks (spec:validation.external-registers.uncited-on-request)passed5.61 ms
  • spec:validation.external-registers.unknown-and-retired · A cited token the register lacks or retires fails a rules run · declared · example enabled · specs/validation/external-registers.unknown-and-retired.sdp.md

Example space

  • cited · string · declared by a probe corpus whose Spec cites the tokens {cited}
  • held · string · declared by a register file that holds {held} and retires {retired}
  • retired · string · declared by a register file that holds {held} and retires {retired}
  • uncited · boolean · declared by the shipped external-registers file runs as a rules file with the pattern for E-numbers and uncited {uncited}

Bound points

Examplecitedheldretireduncited
spec:validation.external-registers.uncited-on-request"E-1""E-1 E-2"""true
spec:validation.external-registers.unknown-and-retired"E-1 E-7 E-9""E-1 E-2""E-7"false

Oracle binding: present · oracle:protocol.external-registers · test/self-hosting-external-registers.test.ts:29

Coverage

cited: "E-1" · spec:validation.external-registers.uncited-on-request; "E-1 E-7 E-9" · spec:validation.external-registers.unknown-and-retired · not enumerable

held: "E-1 E-2" · spec:validation.external-registers.uncited-on-request, spec:validation.external-registers.unknown-and-retired · not enumerable

retired: "" · spec:validation.external-registers.uncited-on-request; "E-7" · spec:validation.external-registers.unknown-and-retired · not enumerable

uncited: true · spec:validation.external-registers.uncited-on-request; false · spec:validation.external-registers.unknown-and-retired · not enumerable

Unbound

  • cited: None
  • held: None
  • retired: None
  • uncited: None
Design view

Requirement drawing

Requirement drawing for spec:validation.external-registers
Requirement drawing for spec:validation.external-registerssatisfies · anchoredmodels · anchoredrefines · declaredrefines, verifies · declaredrefines, verifies · declaredverifies · anchoredverifies · anchoredIntended Specsspec:validation.external-registersA corpus checks theregister tokens its prosecites…validation.external-registersdeclared SpecDeclared verifying examplesspec:validation.external-registers.uncited-on-requestA held token no Spec citesfails a rules run only whenthe caller asks…validation.external-registers.uncited-on-requestdeclared Specspec:validation.external-registers.unknown-and-retiredA cited token the registerlacks or retires fails arules run…validation.external-registers.unknown-and-retireddeclared SpecSatisfying or referencingunitsimpl:protocol.external-registers-recipeasserts realization of theshipped external-registersrecipe…protocol.external-registers-recipeanchored codeTest or oracle bindingsoracle:protocol.external-registersoracle:protocol.external-registers…protocol.external-registersanchored oracle bindingtest:protocol.external-registers.uncited-on-requesttest:protocol.external-registers.uncited-on-request…protocol.external-registers.uncited-on-requestanchored test binding ·binding presenttest:protocol.external-registers.unknown-and-retiredtest:protocol.external-registers.unknown-and-retired…protocol.external-registers.unknown-and-retiredanchored test binding ·binding presentOutside the selected setspec:validation.corpus-rulesCorpus-authored rules runon the one validation path…validation.corpus-rulesdeclared Spec
The diagram as text
  • spec:validation.external-registers: A corpus checks the register tokens its prose cites · declared Spec
  • spec:validation.external-registers.uncited-on-request: A held token no Spec cites fails a rules run only when the caller asks · declared Spec
  • spec:validation.external-registers.unknown-and-retired: A cited token the register lacks or retires fails a rules run · declared Spec
  • spec:validation.corpus-rules: Corpus-authored rules run on the one validation path · declared Spec
  • impl:protocol.external-registers-recipe: asserts realization of the shipped external-registers recipe · anchored code · test/external-registers.test.ts:9
  • oracle:protocol.external-registers: oracle:protocol.external-registers · anchored oracle binding · test/self-hosting-external-registers.test.ts:29
  • test:protocol.external-registers.uncited-on-request: test:protocol.external-registers.uncited-on-request · anchored test binding · binding present · test/self-hosting-external-registers.test.ts:128
  • test:protocol.external-registers.unknown-and-retired: test:protocol.external-registers.unknown-and-retired · anchored test binding · binding present · test/self-hosting-external-registers.test.ts:122
  • spec:validation.external-registers refines spec:validation.corpus-rules · declared — external-register checks run as corpus-selected rules
  • spec:validation.external-registers.uncited-on-request refines spec:validation.external-registers · declared
  • spec:validation.external-registers.uncited-on-request verifies spec:validation.external-registers · declared
  • spec:validation.external-registers.unknown-and-retired refines spec:validation.external-registers · declared
  • spec:validation.external-registers.unknown-and-retired verifies spec:validation.external-registers · declared
  • impl:protocol.external-registers-recipe satisfies spec:validation.external-registers · anchored
  • oracle:protocol.external-registers models spec:validation.external-registers · anchored
  • test:protocol.external-registers.uncited-on-request verifies spec:validation.external-registers.uncited-on-request · anchored
  • test:protocol.external-registers.unknown-and-retired verifies spec:validation.external-registers.unknown-and-retired · anchored
Mermaid source

Copyable source; the Studio draws static SVG.

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

Decisions

No decision record named.

Runtime
  • impl:protocol.external-registers-recipe · asserts realization of the shipped external-registers recipe · test/external-registers.test.ts:9

    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:validation.external-registers
The diagram as text
  • spec:consumers.agent-surface.recipe-parameters: Recipes take parameters as data and ship as runnable files
  • spec:consumers.agent-surface.register-recipes: Register questions stay executable graph recipes
  • spec:consumers.spec-studio.register-input: An outside register is a named Studio input, so a cited token links to its entry
  • spec:validation.corpus-rules: Corpus-authored rules run on the one validation path
  • spec:validation.external-registers: A corpus checks the register tokens its prose cites
  • spec:validation.external-registers.uncited-on-request: A held token no Spec cites fails a rules run only when the caller asks
  • spec:validation.external-registers.unknown-and-retired: A cited token the register lacks or retires fails a rules run
  • spec:validation.external-registers dependsOn spec:consumers.agent-surface.recipe-parameters · declared — the register arrives as data through `--params register=@PATH`
  • spec:validation.external-registers dependsOn spec:consumers.agent-surface.register-recipes · declared — the recipe reads the strings entry search walks, with its entry paths and lines
  • spec:validation.external-registers dependsOn spec:validation.corpus-rules · declared — the recipe answers with findings and runs as a rules file
  • spec:validation.external-registers refines spec:validation.corpus-rules · declared — external-register checks run as corpus-selected rules
  • spec:consumers.spec-studio.register-input dependsOn spec:validation.external-registers · declared — the input is the register file and pattern the external-registers recipe already reads
  • spec:validation.external-registers.uncited-on-request refines spec:validation.external-registers · declared
  • spec:validation.external-registers.unknown-and-retired refines spec:validation.external-registers · declared
  • spec:validation.external-registers.uncited-on-request verifies spec:validation.external-registers · declared
  • spec:validation.external-registers.unknown-and-retired verifies spec:validation.external-registers · 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
dependsOn · outgoingRecipes take parameters as data and ship as runnable files
spec:consumers.agent-surface.recipe-parameters · resolves
declaredthe register arrives as data through --params register=@PATHNone
dependsOn · outgoingRegister questions stay executable graph recipes
spec:consumers.agent-surface.register-recipes · resolves
declaredthe recipe reads the strings entry search walks, with its entry paths and linesNone
dependsOn · outgoingCorpus-authored rules run on the one validation path
spec:validation.corpus-rules · resolves
declaredthe recipe answers with findings and runs as a rules fileNone
refines · outgoingCorpus-authored rules run on the one validation path
spec:validation.corpus-rules · resolves
declaredexternal-register checks run as corpus-selected rulesNone
dependsOn · incomingAn outside register is a named Studio input, so a cited token links to its entry
spec:consumers.spec-studio.register-input · resolves
declaredthe input is the register file and pattern the external-registers recipe already readsNone
refines · incomingA held token no Spec cites fails a rules run only when the caller asks
spec:validation.external-registers.uncited-on-request · resolves
declaredNoneNone
refines · incomingA cited token the register lacks or retires fails a rules run
spec:validation.external-registers.unknown-and-retired · resolves
declaredNoneNone
verifies · incomingA held token no Spec cites fails a rules run only when the caller asks
spec:validation.external-registers.uncited-on-request · resolves
declaredNoneuncitedToken, asRulesFile
verifies · incomingA cited token the register lacks or retires fails a rules run
spec:validation.external-registers.unknown-and-retired · resolves
declaredNoneregisterAsData, citation, unknownToken, retiredToken, asRulesFile

Bindings

Implementation binding: present

  • impl:protocol.external-registers-recipe · asserts realization of the shipped external-registers recipe · test/external-registers.test.ts:9

Design reference: none

Verifier binding: present

Expected-outcome oracle: present

  • oracle:protocol.external-registers · test/self-hosting-external-registers.test.ts:29

Runtime observation: not tracked.

Run results: not recorded in the graph.

Findings

None.

Composing (0)

Composing needs the script.