Spec Studio

Every view run rewrites the view wholesale

spec:consumers.wholesale-view-rewriteBusiness Rule · featureready floor ready

Packs: pack:self-hosting-v1

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

Findings: no errors, no warnings

specs/consumers/wholesale-view-rewrite.sdp.md

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

Intent
outcome
Guarantee that whatever a reader finds in the view directory was produced by the last run over the current source.
Rule
rule line 18 · specs/consumers/wholesale-view-rewrite.sdp.md:18
A view run rewrites the view wholesale: no page written by an earlier run survives a later one, so a Spec that left the corpus leaves no page behind.
rule line 19 · specs/consumers/wholesale-view-rewrite.sdp.md:19
Pages are written to a temporary sibling of the view directory, the previous directory is removed, and the temporary is renamed into place — one rename, so no half-written view is ever readable and no temporary survives a completed run.
rule line 20 · specs/consumers/wholesale-view-rewrite.sdp.md:20
A run that cannot produce a current view removes the stale one instead of leaving it readable as current: an absent view is honest, a stale view is not.
rule.buildInvalidates line 21 · specs/consumers/wholesale-view-rewrite.sdp.md:21
Before extraction, the shared build removes generated/design-review/, generated/census/, generated/mermaid/ and generated/gherkin/, each with its temporary sibling, so a run that fails before rendering leaves no view behind; a removal failure refuses the build before extraction. Every command that enters this build, including validate and its watch runs and every publisher, has this invalidation effect, so a sibling root the command does not publish stays absent until a later publication. The Studio's root is removed beside these four, as spec:consumers.spec-studio.publisher#rule.buildInvalidates states.

no example exercises it

rule line 22 · specs/consumers/wholesale-view-rewrite.sdp.md:22
Under --check-clean the view is rendered twice from the same graph and the run refuses when the two renders diverge, removing the view it could not certify.
rule line 23 · specs/consumers/wholesale-view-rewrite.sdp.md:23
Findings never withhold the view. A run whose checks report findings still writes the current view and returns the checks' own exit code, because the view is where those findings are read in context.

5 unkeyed rules.

Verifying examples

A build that never renders still takes the old view down · spec:consumers.wholesale-view-rewrite.build-invalidates-view · ready floor ready

Executable Spec

Given an extraction root holding {corpus: "one authored spec"} and a stale view page {stalePage: "spec/probe.departed.md"}
Given the stale page is planted {planted: "before the run"}
When the {command: "build"} command runs at that root
Then the run exits {exitCode: 0}
Then the view directory survives: {viewSurvives: false}
Then the stale page survives: {staleSurvives: false}
Then a temporary view sibling survives: {temporarySurvives: false}

Open example

A run that cannot produce a current view leaves no view at all · spec:consumers.wholesale-view-rewrite.failed-run-view-removed · ready floor ready

Executable Spec

Given an extraction root holding {corpus: "one authored spec the extractor refuses"} and a stale view page {stalePage: "spec/probe.departed.md"}
Given the stale page is planted {planted: "after the build has invalidated the view"}
When the {command: "view"} command runs at that root
Then the run exits {exitCode: 1}
Then the view directory survives: {viewSurvives: false}
Then the stale page survives: {staleSurvives: false}
Then a temporary view sibling survives: {temporarySurvives: false}

Open example

A page the build's invalidation never saw still does not survive the swap · spec:consumers.wholesale-view-rewrite.late-stale-page · ready floor ready

Executable Spec

Given an extraction root holding {corpus: "one authored spec"} and a stale view page {stalePage: "spec/probe.departed.md"}
Given the stale page is planted {planted: "after the build has invalidated the view"}
When the {command: "view"} command runs at that root
Then the run exits {exitCode: 0}
Then the view directory survives: {viewSurvives: true}
Then the view holds the current page {currentPage: "index.md"}
Then the stale page survives: {staleSurvives: false}
Then a temporary view sibling survives: {temporarySurvives: false}

Open example

A page from an earlier run does not survive the next one · spec:consumers.wholesale-view-rewrite.stale-page-removed · ready floor ready

Executable Spec

Given an extraction root holding {corpus: "one authored spec"} and a stale view page {stalePage: "spec/probe.departed.md"}
Given the stale page is planted {planted: "before the run"}
When the {command: "view"} command runs at that root
Then the run exits {exitCode: 0}
Then the view directory survives: {viewSurvives: true}
Then the view holds the current page {currentPage: "index.md"}
Then the stale page survives: {staleSurvives: false}
Then a temporary view sibling survives: {temporarySurvives: false}

Open example

Example space

Given an extraction root holding {corpus:"one authored spec"|"one authored spec the extractor refuses"} and a stale view page {stalePage:string}
Given the stale page is planted {planted:"before the run"|"after the build has invalidated the view"}
When the {command:"view"|"build"} command runs at that root
Then the run exits {exitCode:number}
Then the view directory survives: {viewSurvives:boolean}
Then the view holds the current page {currentPage:string}
Then the stale page survives: {staleSurvives:boolean}
Then a temporary view sibling survives: {temporarySurvives:boolean}
Verification

Verifier bindings

Example space

  • corpus · "one authored spec" | "one authored spec the extractor refuses" · declared by an extraction root holding {corpus} and a stale view page {stalePage}
  • stalePage · string · declared by an extraction root holding {corpus} and a stale view page {stalePage}
  • planted · "before the run" | "after the build has invalidated the view" · declared by the stale page is planted {planted}
  • command · "view" | "build" · declared by the {command} command runs at that root

Bound points

ExamplecorpusstalePageplantedcommand
spec:consumers.wholesale-view-rewrite.build-invalidates-view"one authored spec""spec/probe.departed.md""before the run""build"
spec:consumers.wholesale-view-rewrite.failed-run-view-removed"one authored spec the extractor refuses""spec/probe.departed.md""after the build has invalidated the view""view"
spec:consumers.wholesale-view-rewrite.late-stale-page"one authored spec""spec/probe.departed.md""after the build has invalidated the view""view"
spec:consumers.wholesale-view-rewrite.stale-page-removed"one authored spec""spec/probe.departed.md""before the run""view"

Oracle binding: none

Coverage

stalePage: "spec/probe.departed.md" · spec:consumers.wholesale-view-rewrite.build-invalidates-view, spec:consumers.wholesale-view-rewrite.failed-run-view-removed, spec:consumers.wholesale-view-rewrite.late-stale-page, spec:consumers.wholesale-view-rewrite.stale-page-removed · not enumerable

Unbound

  • corpus: None
  • stalePage: None
  • planted: None
  • command: None
Design view

Requirement drawing

Requirement drawing for spec:consumers.wholesale-view-rewrite
The diagram as text
  • spec:consumers.wholesale-view-rewrite: Every view run rewrites the view wholesale · declared Spec
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view: A build that never renders still takes the old view down · declared Spec
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed: A run that cannot produce a current view leaves no view at all · declared Spec
  • spec:consumers.wholesale-view-rewrite.late-stale-page: A page the build's invalidation never saw still does not survive the swap · declared Spec
  • spec:consumers.wholesale-view-rewrite.stale-page-removed: A page from an earlier run does not survive the next one · declared Spec
  • spec:consumers.design-review: Design Review renders graph context without becoming a gate · declared Spec
  • impl:protocol.build-pipeline-emit: stages build outputs, checks determinism and invalidates projections · anchored code · src/cli/build-command.ts:251
  • impl:protocol.wholesale-view-rewrite: publishes each Design Review as one wholesale temporary-directory replacement · anchored code · src/cli/validate-view-command.ts:128
  • test:protocol.wholesale-view-rewrite.build-invalidates-view: the build point verifies the up-front invalidation on a command that renders no view · anchored test binding · binding present · test/self-hosting-projections.test.ts:1064
  • test:protocol.wholesale-view-rewrite.failed-run-view-removed: the failed-run point verifies that an uncertifiable view is removed, not left readable · anchored test binding · binding present · test/self-hosting-projections.test.ts:1032
  • test:protocol.wholesale-view-rewrite.late-stale-page: the late-page point verifies that the swap itself evicts what invalidation missed · anchored test binding · binding present · test/self-hosting-projections.test.ts:996
  • test:protocol.wholesale-view-rewrite.stale-page-removed: the stale-page point verifies the wholesale rewrite of the view directory · anchored test binding · binding present · test/self-hosting-projections.test.ts:960
  • spec:consumers.wholesale-view-rewrite refines spec:consumers.design-review · declared
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.late-stale-page refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.late-stale-page verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.stale-page-removed refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.stale-page-removed verifies spec:consumers.wholesale-view-rewrite · declared
  • impl:protocol.build-pipeline-emit satisfies spec:consumers.wholesale-view-rewrite · anchored
  • impl:protocol.wholesale-view-rewrite satisfies spec:consumers.wholesale-view-rewrite · anchored
  • test:protocol.wholesale-view-rewrite.build-invalidates-view verifies spec:consumers.wholesale-view-rewrite.build-invalidates-view · anchored
  • test:protocol.wholesale-view-rewrite.failed-run-view-removed verifies spec:consumers.wholesale-view-rewrite.failed-run-view-removed · anchored
  • test:protocol.wholesale-view-rewrite.late-stale-page verifies spec:consumers.wholesale-view-rewrite.late-stale-page · anchored
  • test:protocol.wholesale-view-rewrite.stale-page-removed verifies spec:consumers.wholesale-view-rewrite.stale-page-removed · 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
  • impl:protocol.build-pipeline-emit · stages build outputs, checks determinism and invalidates projections · src/cli/build-command.ts:251

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

    Uses

    None.

  • impl:protocol.wholesale-view-rewrite · publishes each Design Review as one wholesale temporary-directory replacement · src/cli/validate-view-command.ts:128

    Component: component:protocol.cli · entry points, shared build and publication · src/cli/build-command.ts:32 · 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.wholesale-view-rewrite
  • E5: verifies · declared (4 unit edges)
The diagram as text
  • spec:consumers.census-page: Census renders the runtime taxonomy without becoming a registry
  • spec:consumers.command-line: Every verb answers --help, and one verb writes every projection root
  • spec:consumers.design-review: Design Review renders graph context without becoming a gate
  • spec:consumers.gherkin-view: Gherkin view renders any Spec as a disposable read shape
  • spec:consumers.mermaid-view: Mermaid renders bounded one-hop and Pack diagrams without becoming a graph browser
  • spec:consumers.obsidian-vault: An Obsidian vault lets a person iterate on designs from the one graph
  • spec:consumers.spec-studio.publisher: sdp studio publishes the Studio as one page set
  • spec:consumers.wholesale-view-rewrite: Every view run rewrites the view wholesale
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view: A build that never renders still takes the old view down
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed: A run that cannot produce a current view leaves no view at all
  • spec:consumers.wholesale-view-rewrite.late-stale-page: A page the build's invalidation never saw still does not survive the swap
  • spec:consumers.wholesale-view-rewrite.stale-page-removed: A page from an earlier run does not survive the next one
  • spec:extraction.determinism: Committed source derives byte-identical output
  • spec:consumers.wholesale-view-rewrite dependsOn spec:extraction.determinism · declared — check-clean refuses when two renders of one graph differ
  • spec:consumers.wholesale-view-rewrite refines spec:consumers.design-review · declared
  • spec:consumers.census-page dependsOn spec:consumers.wholesale-view-rewrite · declared — the shared build invalidates the projection roots before this publisher renders
  • spec:consumers.command-line dependsOn spec:consumers.wholesale-view-rewrite · declared — each root the verb writes is written and invalidated as every view run's is
  • spec:consumers.gherkin-view dependsOn spec:consumers.wholesale-view-rewrite · declared — the shared build invalidates the projection roots before this publisher renders
  • spec:consumers.mermaid-view dependsOn spec:consumers.wholesale-view-rewrite · declared — the shared build invalidates the projection roots before this publisher renders
  • spec:consumers.obsidian-vault dependsOn spec:consumers.wholesale-view-rewrite · declared — the shared build's invalidation removes the five projection roots and never the vault
  • spec:consumers.spec-studio.publisher dependsOn spec:consumers.wholesale-view-rewrite · declared — the Studio's root is written, invalidated and certified the way the shipped roots are
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.late-stale-page refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.stale-page-removed refines spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.build-invalidates-view verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.failed-run-view-removed verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.late-stale-page verifies spec:consumers.wholesale-view-rewrite · declared
  • spec:consumers.wholesale-view-rewrite.stale-page-removed verifies spec:consumers.wholesale-view-rewrite · 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
dependsOn · outgoingCommitted source derives byte-identical output
spec:extraction.determinism · resolves
declaredcheck-clean refuses when two renders of one graph differNone
refines · outgoingDesign Review renders graph context without becoming a gate
spec:consumers.design-review · resolves
declaredNoneNone
dependsOn · incomingCensus renders the runtime taxonomy without becoming a registry
spec:consumers.census-page · resolves
declaredthe shared build invalidates the projection roots before this publisher rendersNone
dependsOn · incomingEvery verb answers --help, and one verb writes every projection root
spec:consumers.command-line · resolves
declaredeach root the verb writes is written and invalidated as every view run's isNone
dependsOn · incomingGherkin view renders any Spec as a disposable read shape
spec:consumers.gherkin-view · resolves
declaredthe shared build invalidates the projection roots before this publisher rendersNone
dependsOn · incomingMermaid renders bounded one-hop and Pack diagrams without becoming a graph browser
spec:consumers.mermaid-view · resolves
declaredthe shared build invalidates the projection roots before this publisher rendersNone
dependsOn · incomingAn Obsidian vault lets a person iterate on designs from the one graph
spec:consumers.obsidian-vault · resolves
declaredthe shared build's invalidation removes the five projection roots and never the vaultNone
dependsOn · incomingsdp studio publishes the Studio as one page set
spec:consumers.spec-studio.publisher · resolves
declaredthe Studio's root is written, invalidated and certified the way the shipped roots areNone
refines · incomingA build that never renders still takes the old view down
spec:consumers.wholesale-view-rewrite.build-invalidates-view · resolves
declaredNoneNone
refines · incomingA run that cannot produce a current view leaves no view at all
spec:consumers.wholesale-view-rewrite.failed-run-view-removed · resolves
declaredNoneNone
refines · incomingA page the build's invalidation never saw still does not survive the swap
spec:consumers.wholesale-view-rewrite.late-stale-page · resolves
declaredNoneNone
refines · incomingA page from an earlier run does not survive the next one
spec:consumers.wholesale-view-rewrite.stale-page-removed · resolves
declaredNoneNone
verifies · incomingA build that never renders still takes the old view down
spec:consumers.wholesale-view-rewrite.build-invalidates-view · resolves
declaredNoneNone
verifies · incomingA run that cannot produce a current view leaves no view at all
spec:consumers.wholesale-view-rewrite.failed-run-view-removed · resolves
declaredNoneNone
verifies · incomingA page the build's invalidation never saw still does not survive the swap
spec:consumers.wholesale-view-rewrite.late-stale-page · resolves
declaredNoneNone
verifies · incomingA page from an earlier run does not survive the next one
spec:consumers.wholesale-view-rewrite.stale-page-removed · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • impl:protocol.build-pipeline-emit · stages build outputs, checks determinism and invalidates projections · src/cli/build-command.ts:251 · role service · component component:protocol.cli · layer edge · context protocol
  • impl:protocol.wholesale-view-rewrite · publishes each Design Review as one wholesale temporary-directory replacement · src/cli/validate-view-command.ts:128 · role publisher · component component:protocol.cli · layer edge · 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.