Spec Studio

One diagnostic currency, its location composed from structured fields

spec:validation.diagnostic-renderingBusiness Rule · featureready floor ready

Packs: pack:self-hosting-v1

Design: 1 design entry · 1 pinned declaration · no decisions

Findings: no errors, no warnings

specs/validation/diagnostic-rendering.sdp.md

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

Intent
outcome
Let a reader locate any reported problem the same way, whichever producer or surface reported it.
Rule
rule line 16 · specs/validation/diagnostic-rendering.sdp.md:16
There is one diagnostic currency. Extraction, contract generation, and graph validation all report in the one finding shape, and no surface introduces a parallel report shape of its own.
rule line 17 · specs/validation/diagnostic-rendering.sdp.md:17
A finding's location lives in its own structured file and line fields, never baked into its message text, so a location is composed once by whoever renders it and is never rendered twice.
rule line 18 · specs/validation/diagnostic-rendering.sdp.md:18
The command-line rendering is the path and line, the severity in brackets, the validator id, and the message, in that order and separated by the same one-line punctuation for every finding.
rule line 19 · specs/validation/diagnostic-rendering.sdp.md:19
The location degrades by field rather than by placeholder: a file with a line renders both, a file without a line renders the path alone, and a finding carrying no file renders no location prefix at all.
rule line 20 · specs/validation/diagnostic-rendering.sdp.md:20
The Design Review renders the same currency in its findings table under the same composition rule, and shows an em dash where a finding carries no file, because a table cell cannot be absent the way a prefix can.

5 unkeyed rules.

Verifying examples

One finding, three location shapes, one composition rule · spec:validation.diagnostic-rendering.composed-location · ready floor ready

Executable Spec

Given a finding naming the validator {validatorId: "honesty/readiness-floor"} at severity {severity: "error"} carrying the message {message: "The stated rung is not earned."}
When the {renderer: "command-line"} renderer formats that finding once per location shape
Then the finding carrying the file {file: "specs/probe.sdp.md"} and the line {line: 7} renders {withLocation: "specs/probe.sdp.md:7 — [error] honesty/readiness-floor — The stated rung is not earned."}
Then the same finding carrying the file alone renders {fileOnly: "specs/probe.sdp.md — [error] honesty/readiness-floor — The stated rung is not earned."}
Then the same finding carrying neither renders {bare: "[error] honesty/readiness-floor — The stated rung is not earned."}

Open example

The same three location shapes, rendered as table cells · spec:validation.diagnostic-rendering.table-cell-location · ready floor ready

Executable Spec

Given a finding naming the validator {validatorId: "honesty/readiness-floor"} at severity {severity: "error"} carrying the message {message: "The stated rung is not earned | its floor refused it."}
When the {renderer: "Design Review"} renderer formats that finding once per location shape
Then the findings row carrying the file {file: "specs/probe.sdp.md"} and the line {line: 7} renders {locationRow: "| error | `honesty/readiness-floor` | The stated rung is not earned \| its floor refused it. | `specs/probe.sdp.md:7` |"}
Then the same row carrying the file alone renders {fileOnlyRow: "| error | `honesty/readiness-floor` | The stated rung is not earned \| its floor refused it. | `specs/probe.sdp.md` |"}
Then the same row carrying neither renders {absentRow: "| error | `honesty/readiness-floor` | The stated rung is not earned \| its floor refused it. | — |"}

Open example

Example space

Given a finding naming the validator {validatorId:string} at severity {severity:"warning"|"error"} carrying the message {message:string}
When the {renderer:"command-line"|"Design Review"} renderer formats that finding once per location shape
Then the finding carrying the file {file:string} and the line {line:number} renders {withLocation:string}
Then the same finding carrying the file alone renders {fileOnly:string}
Then the same finding carrying neither renders {bare:string}
Then the findings row carrying the file {file:string} and the line {line:number} renders {locationRow:string}
Then the same row carrying the file alone renders {fileOnlyRow:string}
Then the same row carrying neither renders {absentRow:string}
Design
summaryLine line 23 · specs/validation/diagnostic-rendering.sdp.md:23
validate: <errors> errors · <warnings> warnings (conformance + honesty over the one graph), written once to standard output after all findings have been written to standard error.

no citation recorded

Verification

Verifier bindings

Example space

  • validatorId · string · declared by a finding naming the validator {validatorId} at severity {severity} carrying the message {message}
  • severity · "warning" | "error" · declared by a finding naming the validator {validatorId} at severity {severity} carrying the message {message}
  • message · string · declared by a finding naming the validator {validatorId} at severity {severity} carrying the message {message}
  • renderer · "command-line" | "Design Review" · declared by the {renderer} renderer formats that finding once per location shape

Bound points

ExamplevalidatorIdseveritymessagerenderer
spec:validation.diagnostic-rendering.composed-location"honesty/readiness-floor""error""The stated rung is not earned.""command-line"
spec:validation.diagnostic-rendering.table-cell-location"honesty/readiness-floor""error""The stated rung is not earned | its floor refused it.""Design Review"

Oracle binding: none

Coverage

validatorId: "honesty/readiness-floor" · spec:validation.diagnostic-rendering.composed-location, spec:validation.diagnostic-rendering.table-cell-location · not enumerable

message: "The stated rung is not earned." · spec:validation.diagnostic-rendering.composed-location; "The stated rung is not earned | its floor refused it." · spec:validation.diagnostic-rendering.table-cell-location · not enumerable

Unbound

  • validatorId: None
  • severity: None
  • message: None
  • renderer: None
Design view

Requirement drawing

Requirement drawing for spec:validation.diagnostic-rendering
The diagram as text
  • spec:validation.diagnostic-rendering: One diagnostic currency, its location composed from structured fields · declared Spec
  • spec:validation.diagnostic-rendering.composed-location: One finding, three location shapes, one composition rule · declared Spec
  • spec:validation.diagnostic-rendering.table-cell-location: The same three location shapes, rendered as table cells · declared Spec
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending · declared Spec
  • impl:protocol.diagnostic-rendering-cli: composes structured finding fields into the one command-line diagnostic form · anchored code · src/cli/output.ts:23
  • impl:protocol.diagnostic-rendering-design-review: renders structured finding locations in the Design Review table · anchored code · src/projections/design-review-context.ts:208
  • impl:protocol.validate-summary: prints validate's findings and its summary line · anchored code · src/cli/validate-view-command.ts:23
  • impl:protocol.validation-contracts: conformance/honesty family currency and finding shapes · anchored code · src/validate/contracts.ts:5
  • test:protocol.diagnostic-rendering.composed-location: the composed-location point verifies the one rendering rule and both degradations · anchored test binding · binding present · test/self-hosting-projections.test.ts:1277
  • test:protocol.diagnostic-rendering.table-cell-location: the table-cell point verifies the same composition rule on the Design Review's twin · anchored test binding · binding present · test/self-hosting-projections.test.ts:1292
  • spec:validation.diagnostic-rendering refines spec:validation.two-check-families · declared
  • spec:validation.diagnostic-rendering.composed-location refines spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.composed-location verifies spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.table-cell-location refines spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.table-cell-location verifies spec:validation.diagnostic-rendering · declared
  • impl:protocol.diagnostic-rendering-cli satisfies spec:validation.diagnostic-rendering · anchored
  • impl:protocol.diagnostic-rendering-design-review satisfies spec:validation.diagnostic-rendering · anchored
  • impl:protocol.validate-summary satisfies spec:validation.diagnostic-rendering · anchored
  • impl:protocol.validation-contracts satisfies spec:validation.diagnostic-rendering · anchored
  • test:protocol.diagnostic-rendering.composed-location verifies spec:validation.diagnostic-rendering.composed-location · anchored
  • test:protocol.diagnostic-rendering.table-cell-location verifies spec:validation.diagnostic-rendering.table-cell-location · 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.cli · entry points, shared build and publication · src/cli/build-command.ts:32 · layer edge · context protocol

    Uses

    • component:protocol.adapters · external runtime and source adapters · src/adapters/vitest.ts:23 · layer adapter · context protocol
    • component:protocol.codegen · contracts and registrar output · src/codegen/contracts.ts:633 · layer application · context protocol
    • component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol
    • component:protocol.graph · the one graph and its semantic decisions · src/graph/schema.ts:34 · layer domain · context protocol
    • component:protocol.import · canonical conversion with a fidelity boundary · src/import/import.ts:45 · layer application · context protocol
    • component:protocol.model · the authored contracts and stable ids · src/model/anchors.ts:100 · layer domain · context protocol
    • 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
    • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol
  • component:protocol.projections · read-only output, layout and owned publication · src/projections/design-review.ts:29 · layer edge · context protocol

    Uses

    • component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol
    • component:protocol.graph · the one graph and its semantic decisions · src/graph/schema.ts:34 · layer domain · context protocol
    • component:protocol.model · the authored contracts and stable ids · src/model/anchors.ts:100 · layer domain · context protocol
    • component:protocol.notation · the leaf step codec · src/notation/slots.ts:261 · layer domain · context protocol
    • component:protocol.reader · the typed graph contract and body evaluator · src/reader/reader.ts:671 · layer application · context protocol
    • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol
  • component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

  • impl:protocol.diagnostic-rendering-cli · composes structured finding fields into the one command-line diagnostic form · src/cli/output.ts:23

    Component: component:protocol.cli · entry points, shared build and publication · src/cli/build-command.ts:32 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.diagnostic-rendering-design-review · renders structured finding locations in the Design Review table · src/projections/design-review-context.ts:208

    Component: component:protocol.projections · read-only output, layout and owned publication · src/projections/design-review.ts:29 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.validate-summary · prints validate's findings and its summary line · src/cli/validate-view-command.ts:23

    Component: component:protocol.cli · entry points, shared build and publication · src/cli/build-command.ts:32 · layer edge · context protocol

    Uses

    None.

  • impl:protocol.validation-contracts · conformance/honesty family currency and finding shapes · src/validate/contracts.ts:5

    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.diagnostic-rendering
The diagram as text
  • spec:consumers.design-review: Design Review renders graph context without becoming a gate
  • spec:validation.corpus-rules: Corpus-authored rules run on the one validation path
  • spec:validation.diagnostic-rendering: One diagnostic currency, its location composed from structured fields
  • spec:validation.diagnostic-rendering.composed-location: One finding, three location shapes, one composition rule
  • spec:validation.diagnostic-rendering.table-cell-location: The same three location shapes, rendered as table cells
  • spec:validation.two-check-families: Validation separates well-formedness from non-pretending
  • spec:validation.diagnostic-rendering dependsOn spec:consumers.design-review · declared
  • spec:validation.diagnostic-rendering refines spec:validation.two-check-families · declared
  • spec:validation.corpus-rules dependsOn spec:validation.diagnostic-rendering · declared — corpus findings use the shared diagnostic currency
  • spec:validation.diagnostic-rendering.composed-location refines spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.table-cell-location refines spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.composed-location verifies spec:validation.diagnostic-rendering · declared
  • spec:validation.diagnostic-rendering.table-cell-location verifies spec:validation.diagnostic-rendering · 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

Relations

Relation and directionOther endClaimReasonExercised keys
dependsOn · outgoingDesign Review renders graph context without becoming a gate
spec:consumers.design-review · resolves
declaredNoneNone
refines · outgoingValidation separates well-formedness from non-pretending
spec:validation.two-check-families · resolves
declaredNoneNone
dependsOn · incomingCorpus-authored rules run on the one validation path
spec:validation.corpus-rules · resolves
declaredcorpus findings use the shared diagnostic currencyNone
refines · incomingOne finding, three location shapes, one composition rule
spec:validation.diagnostic-rendering.composed-location · resolves
declaredNoneNone
refines · incomingThe same three location shapes, rendered as table cells
spec:validation.diagnostic-rendering.table-cell-location · resolves
declaredNoneNone
verifies · incomingOne finding, three location shapes, one composition rule
spec:validation.diagnostic-rendering.composed-location · resolves
declaredNoneNone
verifies · incomingThe same three location shapes, rendered as table cells
spec:validation.diagnostic-rendering.table-cell-location · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • impl:protocol.diagnostic-rendering-cli · composes structured finding fields into the one command-line diagnostic form · src/cli/output.ts:23 · role codec · component component:protocol.cli · layer edge · context protocol
  • impl:protocol.diagnostic-rendering-design-review · renders structured finding locations in the Design Review table · src/projections/design-review-context.ts:208 · role projection · component component:protocol.projections · layer edge · context protocol
  • impl:protocol.validate-summary · prints validate's findings and its summary line · src/cli/validate-view-command.ts:23 · role codec · component component:protocol.cli · layer edge · context protocol
  • impl:protocol.validation-contracts · conformance/honesty family currency and finding shapes · src/validate/contracts.ts:5 · role contract · 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.