Spec Studio

Every graph reference resolves

spec:validation.referential-integrityBusiness Rule · storyready floor ready

Packs: pack:self-hosting-v1

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

Findings: no errors, no warnings

specs/validation/referential-integrity.sdp.md

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

Intent
outcome
Keep derived graph relationships trustworthy by refusing references to absent nodes.
Rule
rule line 15 · specs/validation/referential-integrity.sdp.md:15
Every edge endpoint and every Pack model reference must resolve to a node in the derived graph; an unresolved reference is a conformance error.
rule line 16 · specs/validation/referential-integrity.sdp.md:16
The finding names the unique nearest known id within edit distance two as a suggestion, and stays silent when no id is that near or two candidates tie, because resolving ambiguity silently is never the check's job.

2 unkeyed rules.

Verifying examples

An unrelated missing target is a bare conformance error · spec:validation.referential-integrity.dangling-target · ready floor ready

Executable Spec

Given the graph holds one spec {presentId: "spec:probe.create-order"}
Given the spec declares a dependsOn relation to {targetId: "spec:probe.fulfilment-policy"}
When the graph is validated
Then the report names {findingId: "conformance/referential-integrity"} at severity {severity: "error"}
Then the finding offers the nearest-id suggestion: {suggested: false}

Open example

A unique near miss earns a did-you-mean suggestion · spec:validation.referential-integrity.did-you-mean · ready floor ready

Executable Spec

Given the graph holds one spec {presentId: "spec:probe.create-order"}
Given the spec declares a dependsOn relation to {targetId: "spec:probe.create-ordr"}
When the graph is validated
Then the report names {findingId: "conformance/referential-integrity"} at severity {severity: "error"}
Then the finding offers the nearest-id suggestion: {suggested: true}

Open example

Example space

Given the graph holds one spec {presentId:string}
Given the spec declares a dependsOn relation to {targetId:string}
When the graph is validated
Then the report names {findingId:string} at severity {severity:"warning"|"error"}
Then the finding offers the nearest-id suggestion: {suggested:boolean}
Verification

Verifier bindings

Example space

  • presentId · string · declared by the graph holds one spec {presentId}
  • targetId · string · declared by the spec declares a dependsOn relation to {targetId}

Bound points

ExamplepresentIdtargetId
spec:validation.referential-integrity.dangling-target"spec:probe.create-order""spec:probe.fulfilment-policy"
spec:validation.referential-integrity.did-you-mean"spec:probe.create-order""spec:probe.create-ordr"

Oracle binding: none

Coverage

presentId: "spec:probe.create-order" · spec:validation.referential-integrity.dangling-target, spec:validation.referential-integrity.did-you-mean · not enumerable

targetId: "spec:probe.fulfilment-policy" · spec:validation.referential-integrity.dangling-target; "spec:probe.create-ordr" · spec:validation.referential-integrity.did-you-mean · not enumerable

Unbound

  • presentId: None
  • targetId: None
Design view

Requirement drawing

Requirement drawing for spec:validation.referential-integrity
  • E10: refines, verifies · declared
Requirement drawing for spec:validation.referential-integrityverifies · anchoredverifies · anchoredverifies · anchoredsatisfies · anchoredsatisfies · anchoredsatisfies · anchoredrefines · declaredrefines · declaredrefines, verifies · declaredE10Intended Specsspec:validation.prose-mentionsEvery Spec id written inprose resolves…validation.prose-mentionsdeclared Specspec:validation.referential-integrityEvery graph referenceresolves…validation.referential-integritydeclared SpecDeclared verifying examplesspec:validation.referential-integrity.dangling-targetAn unrelated missing targetis a bare conformance error…validation.referential-integrity.dangling-targetdeclared Specspec:validation.referential-integrity.did-you-meanA unique near miss earns adid-you-mean suggestion…validation.referential-integrity.did-you-meandeclared SpecSatisfying or referencingunitsimpl:protocol.entry-address-resolutionresolves entry addressesfor prose validation andcitation readers…protocol.entry-address-resolutionanchored codeimpl:protocol.prose-mentionschecks that prose mentionsresolve and warns once perunbacked Spec pair…protocol.prose-mentionsanchored codeimpl:protocol.referential-integritychecks every graph edgeendpoint and Pack modelreference resolves…protocol.referential-integrityanchored codeTest or oracle bindings4 test bindings · anchored, folded4 test bindings · anchoredOutside the selected setspec:validation.two-check-familiesValidation separateswell-formedness fromnon-pretending…validation.two-check-familiesdeclared Spec
The diagram as text
  • spec:validation.referential-integrity: Every graph reference resolves · declared Spec
  • spec:validation.prose-mentions: Every Spec id written in prose resolves · declared Spec
  • spec:validation.referential-integrity.dangling-target: An unrelated missing target is a bare conformance error · declared Spec
  • spec:validation.referential-integrity.did-you-mean: A unique near miss earns a did-you-mean suggestion · declared Spec
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending · declared Spec
  • impl:protocol.entry-address-resolution: resolves entry addresses for prose validation and citation readers · anchored code · src/graph/entry-address.ts:6
  • impl:protocol.prose-mentions: checks that prose mentions resolve and warns once per unbacked Spec pair · anchored code · src/validate/validators.ts:1370
  • impl:protocol.referential-integrity: checks every graph edge endpoint and Pack model reference resolves · anchored code · src/validate/validators.ts:183
  • test:protocol.entry-locations: test:protocol.entry-locations · anchored test binding · binding present · test/entry-locations.test.ts:14
  • test:protocol.prose-mentions: verifies prose-mention resolution and the unbacked-pair warning · anchored test binding · binding present · test/validators.test.ts:1321
  • test:protocol.referential-integrity.dangling-target: the dangling-target point verifies the unresolved-reference error · anchored test binding · binding present · test/self-hosting-validators.test.ts:748
  • test:protocol.referential-integrity.did-you-mean: the near-miss point verifies the unique did-you-mean suggestion · anchored test binding · binding present · test/self-hosting-validators.test.ts:764
  • spec:validation.prose-mentions refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity refines spec:validation.two-check-families · declared
  • spec:validation.referential-integrity.dangling-target refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.dangling-target verifies spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.did-you-mean refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.did-you-mean verifies spec:validation.referential-integrity · declared
  • impl:protocol.entry-address-resolution satisfies spec:validation.prose-mentions · anchored
  • impl:protocol.prose-mentions satisfies spec:validation.prose-mentions · anchored
  • impl:protocol.referential-integrity satisfies spec:validation.referential-integrity · anchored
  • test:protocol.entry-locations verifies spec:validation.prose-mentions · anchored
  • test:protocol.prose-mentions verifies spec:validation.prose-mentions · anchored
  • test:protocol.referential-integrity.dangling-target verifies spec:validation.referential-integrity.dangling-target · anchored
  • test:protocol.referential-integrity.did-you-mean verifies spec:validation.referential-integrity.did-you-mean · 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

No decision record named.

Runtime
  • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

  • impl:protocol.referential-integrity · checks every graph edge endpoint and Pack model reference resolves · src/validate/validators.ts:183

    Component: component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · 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:validation.referential-integrity
The diagram as text
  • spec:validation.prose-mentions: Every Spec id written in prose resolves
  • spec:validation.referential-integrity: Every graph reference resolves
  • spec:validation.referential-integrity.dangling-target: An unrelated missing target is a bare conformance error
  • spec:validation.referential-integrity.did-you-mean: A unique near miss earns a did-you-mean suggestion
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending
  • spec:validation.referential-integrity refines spec:validation.two-check-families · declared
  • spec:validation.prose-mentions refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.dangling-target refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.did-you-mean refines spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.dangling-target verifies spec:validation.referential-integrity · declared
  • spec:validation.referential-integrity.did-you-mean verifies spec:validation.referential-integrity · 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

Distance 2

Distance 3

Distance 4

Distance 5

Relations

Relation and directionOther endClaimReasonExercised keys
refines · outgoingValidation separates well-formedness from non-pretending
spec:validation.two-check-families · resolves
declaredNoneNone
refines · incomingEvery Spec id written in prose resolves
spec:validation.prose-mentions · resolves
declaredNoneNone
refines · incomingAn unrelated missing target is a bare conformance error
spec:validation.referential-integrity.dangling-target · resolves
declaredNoneNone
refines · incomingA unique near miss earns a did-you-mean suggestion
spec:validation.referential-integrity.did-you-mean · resolves
declaredNoneNone
verifies · incomingAn unrelated missing target is a bare conformance error
spec:validation.referential-integrity.dangling-target · resolves
declaredNoneNone
verifies · incomingA unique near miss earns a did-you-mean suggestion
spec:validation.referential-integrity.did-you-mean · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • impl:protocol.referential-integrity · checks every graph edge endpoint and Pack model reference resolves · src/validate/validators.ts:183 · role validator · component component:protocol.validate · layer domain · context protocol

Design reference: none

Verifier binding: present

Expected-outcome oracle: none

Runtime observation: not tracked.

Run results: not recorded in the graph.

Findings

None.

Composing (0)

Composing needs the script.