Spec Studio

Census renders the runtime taxonomy without becoming a registry

spec:consumers.census-pageUse Case / Behavior · featureready floor ready

Packs: pack:self-hosting-v1

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

Findings: no errors, no warnings

specs/consumers/census-page.sdp.md

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

Intent
outcome
Give maintainers one disposable graph-derived census that exposes the complete runtime taxonomy, foreign values, readiness divergence, binding flavor, structural bindings and their attributes, and current findings without creating another source of truth.
Behavior
rule line 24 · specs/consumers/census-page.sdp.md:24
renderCensus is a pure Reader -> pages projection with no filesystem or clock access; every page, row, and finding is deterministically sorted so equal reader data produces byte-identical output.
rule line 25 · specs/consumers/census-page.sdp.md:25
Spec kind rows and their display labels, altitude rows, and readiness rows derive from SPEC_KINDS, SPEC_KIND_DISPLAY_LABELS, SPEC_ALTITUDES, and SPEC_READINESS; graph node, claim, delivery-fact, and edge rows derive from graphNodeTypes, graphClaims, deliveryFactNames, and graphEdgeTypes. Every exported runtime category renders even at count zero; no projection-owned taxonomy list is maintained. The structural section's layer rows derive from CODE_ANCHOR_LAYERS.
rule line 26 · specs/consumers/census-page.sdp.md:26
A foreign value outside an exported runtime taxonomy renders as a deterministic unrecognized row sorted by its literal value rather than disappearing or being coerced into a known category.
rule line 27 · specs/consumers/census-page.sdp.md:27
Stated readiness and structurally derived readiness render as separate dimensions, including a count for Specs that have not structurally reached the first derived rung; the census never resolves or confers readiness.
rule line 28 · specs/consumers/census-page.sdp.md:28
Anchor flavor groups binding nodes by node type, id namespace and outgoing edge type, counting each outgoing edge occurrence; a binding node with no outgoing edge has a no binding edge row, so a missing binding is stated rather than inferred.
rule line 29 · specs/consumers/census-page.sdp.md:29
The structural section counts memberOf, uses and references edges, with code units counted apart; it lists component members, uses fan-in and fan-out including members, references, and uses cycles as data rather than findings. Dangling structural references are read from the validation report.
rule line 30 · specs/consumers/census-page.sdp.md:30
With no structural edge or role, layer or context attribute, the section states that no structural binding exists. Otherwise it lists every closed layer value even at zero and the role and context values the graph holds, each with the units that carry it.
rule line 31 · specs/consumers/census-page.sdp.md:31
Findings come only from reader.findings(), the one validation report exposed as data; the projection never re-runs or re-implements validation.
rule line 32 · specs/consumers/census-page.sdp.md:32
The census is regenerable and disposable under generated/census/index.md; it confers nothing, writes no canonical source, and never becomes a second registry or truth store.
rule line 33 · specs/consumers/census-page.sdp.md:33
After the shared build, publication uses the explicit sdp census surface and owns only generated/census/. It is not a child of or an extra write inside Design Review's transaction.
rule line 34 · specs/consumers/census-page.sdp.md:34
A census run writes its complete page set to generated/census.tmp/, removes the prior census root, and renames the temporary root into place. The shared build invalidates this root and all sibling projection roots before extraction, as spec:consumers.wholesale-view-rewrite#rule.buildInvalidates states, so failure leaves honest absence rather than stale output that looks current.
rule line 35 · specs/consumers/census-page.sdp.md:35
sdp census --check-clean renders an independent twin, refuses divergent renders, and compares the current generated root with the new render. Missing or drifted output returns nonzero and is removed; clean output is replaced wholesale with byte-identical content.
rule line 36 · specs/consumers/census-page.sdp.md:36
When extraction succeeds but graph validation reports errors, census still publishes the labelled diagnostic projection and returns the nonzero validation exit code.

13 unkeyed rules.

Example space

Given a graph containing known runtime categories, foreign taxonomy values, bindings, readiness divergence, and findings
When the census projection renders and publishes through the explicit census command
Then every runtime category remains visible including zero-count rows
Then foreign values render as deterministic unrecognized rows
Then stated and derived readiness remain separate dimensions
Then findings equal the values returned by reader.findings()
Then generated/census/index.md is the only current census page
Then a clean independent render is byte-identical
Verification

Verifier bindings

  • test:protocol.census-page · verifies census taxonomy, findings, and structural-binding projection · anchored · test anchor binding present · test/census.test.ts:150

    External run evidence from test/census.test.ts

    Test anchors: test:protocol.census-page. Specs verified by those bindings: spec:consumers.census-page.

    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
    renders the checkout fixture as the reviewed golden pagethe derived census/taxonomy projectionpassed125.03 ms
    labels the index as diagnostic when the real reader reports validation errorsthe derived census/taxonomy projectionpassed44.85 ms
    is byte-identical under reordered graph inputthe derived census/taxonomy projectionpassed0.92 ms
    keeps every exported runtime taxonomy category visible at zerothe derived census/taxonomy projectionpassed0.98 ms
    renders component rollups and uses cycles deterministicallythe derived census/taxonomy projectionpassed1.44 ms
    renders dangling structural references from reader findings without re-deriving themthe derived census/taxonomy projectionpassed0.49 ms
    renders a dangling structural reference produced by the real extraction pipelinethe derived census/taxonomy projectionpassed6.19 ms
    renders foreign taxonomy values as deterministic unrecognized rowsthe derived census/taxonomy projectionpassed0.56 ms
    counts stated and derived readiness in separate dimensionsthe derived census/taxonomy projectionpassed0.49 ms
    sources its findings only from reader.findings()the derived census/taxonomy projectionpassed0.4 ms
    renders anchor flavor from node type, namespace, and binding edgethe derived census/taxonomy projectionpassed0.32 ms
    renders the role, layer, and context taxonomies and the references table from the graphthe derived census/taxonomy projectionpassed21.95 ms
    renders attribute-only structure, a foreign layer value, and empty tables deterministicallythe derived census/taxonomy projectionpassed0.82 ms
    groups twenty thousand units sharing one role and one context into one bucket each, in id orderthe derived census/taxonomy projectionpassed174.02 ms
    creates each attribute bucket once, however many units share the valuethe derived census/taxonomy projectionpassed320.72 ms
    keeps the explicit empty state while still counting units apart from edgesthe derived census/taxonomy projectionpassed0.56 ms
    publishes diagnostic output for validation errors and returns nonzerosdp census publicationpassed39.92 ms
    creates the explicit generated/census surface by wholesale temporary-directory replacementsdp census publicationpassed36.79 ms
    refuses drift under --check-clean and removes output that cannot read as currentsdp census publicationpassed74.84 ms
    refuses a diverging --check-clean twin without publishing stale or partial outputsdp census publicationpassed83.77 ms
    invalidates stale census output before a controlled failed buildsdp census publicationpassed7.16 ms

Example space

None.

Bound points

No bound example points recorded.

Oracle binding: none

Coverage

Unbound

None.

Design view

Requirement drawing

  • Declared verifying examples: no declared verifying example.
Requirement drawing for spec:consumers.census-page
The diagram as text
  • spec:consumers.census-page: Census renders the runtime taxonomy without becoming a registry · declared Spec
  • spec:consumers.projections-model: Projections fan out from one graph without becoming truth stores · declared Spec
  • impl:protocol.census-page: renders the derived census and runtime taxonomy projection · anchored code · src/projections/census.ts:21
  • impl:protocol.census-page-cli: publishes the census through the explicit sdp census surface · anchored code · src/cli/census-command.ts:66
  • test:protocol.census-page: verifies census taxonomy, findings, and structural-binding projection · anchored test binding · binding present · test/census.test.ts:150
  • spec:consumers.census-page refines spec:consumers.projections-model · declared
  • impl:protocol.census-page satisfies spec:consumers.census-page · anchored
  • impl:protocol.census-page-cli satisfies spec:consumers.census-page · anchored
  • test:protocol.census-page verifies spec:consumers.census-page · anchored
Mermaid source

Copyable source; the Studio draws static SVG.

Preferred and chosen syntax: requirementDiagram; exact refines, satisfies and verifies, with claim words in nodes and per-edge comments.

Decisions

  • Bindings are optional, plural, and may reference a design

    On a code anchor, satisfies is optional and plural; on a test anchor, verifies is plural and non-empty. The constant form accepts one ref(…) or a fresh array literal of them. Each resolving target confers its fact, and implemented stays a whole-Spec fact. An anchored edge references runs from a CodeNode to a Spec, from references?: readonly SpecId[] on a code anchor; it may target any Spec, decisions included, confers no delivery fact, moves no readiness floor, and the drift alarm ignores it. It says this code answers to that design without claiming to realize it: the unit follows the design without realizing any of its promises, or realizes part of a Spec whose remaining promises no unit yet realizes, so a change to the design asks the code to follow. A design that builds on existing code states that by a typed relation to the Spec the code satisfies, never by a reference from the code. A target named in both satisfies and references is an error. An identity-only code anchor, with no satisfies and no references, is lawful: it mints a CodeNode for structure and for byFile, and nothing else.

  • Architectural significance is annotated where it is realized

    Architectural significance is annotated on the anchor of the unit that realizes it. A code anchor may carry role, the architectural pattern the unit plays; a component: anchor may additionally carry layer, one of edge, application, domain, adapter, or infrastructure, and context, its bounded context. The component: anchor is anchored architecture: it is the declared component, and there is no separate architecture file, because the anchor sits where the component is realized. It is not the original design's declared Component that could exist before code; an unrealized component lives in Specs and never as an invented CodeNode. A role is a free, corpus-owned vocabulary whose taxonomy the census renders with counts from the graph; service, decider, projection, read-model, codec, contract, barrel, and utility are the lineage set, not a closed list. layer is a closed set, and a value outside it is an envelope error; layer or context on a non-component anchor is an envelope error. All three attributes are optional, and omission is lawful.

  • The shipped projections stay frozen

    Re-specifying the shipped Design Review, census, Mermaid, or Gherkin projection is refused. These four projections are the ruled read surfaces over the one graph. A later decision Spec that supersedes this one replaces the ruling whole; a decision Spec that refines this one narrows it for one projection or one rendering and leaves the rest frozen. Either passes the ADR three-part test.

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
  • impl:protocol.census-page · renders the derived census and runtime taxonomy projection · src/projections/census.ts:21

    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.census-page-cli · publishes the census through the explicit sdp census surface · src/cli/census-command.ts:66

    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.census-page
The diagram as text
  • spec:consumers.census-page: Census renders the runtime taxonomy without becoming a registry
  • spec:consumers.projections-model: Projections fan out from one graph without becoming truth stores
  • spec:consumers.wholesale-view-rewrite: Every view run rewrites the view wholesale
  • spec:decisions.anchor-binding-grain: Bindings are optional, plural, and may reference a design
  • spec:decisions.architectural-annotation: Architectural significance is annotated where it is realized
  • spec:decisions.shipped-projections-frozen: The shipped projections stay frozen
  • spec:consumers.census-page decidedBy spec:decisions.anchor-binding-grain · declared — the census renders the references edges ruled by this decision
  • spec:consumers.census-page decidedBy spec:decisions.architectural-annotation · declared — the census renders the structural edges and the role, layer and context attributes ruled by this decision
  • spec:consumers.census-page decidedBy spec:decisions.shipped-projections-frozen · 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.census-page refines spec:consumers.projections-model · 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

No Spec rests on this Spec.

Relations

Relation and directionOther endClaimReasonExercised keys
decidedBy · outgoingBindings are optional, plural, and may reference a design
spec:decisions.anchor-binding-grain · resolves
declaredthe census renders the references edges ruled by this decisionNone
decidedBy · outgoingArchitectural significance is annotated where it is realized
spec:decisions.architectural-annotation · resolves
declaredthe census renders the structural edges and the role, layer and context attributes ruled by this decisionNone
decidedBy · outgoingThe shipped projections stay frozen
spec:decisions.shipped-projections-frozen · resolves
declaredNoneNone
dependsOn · outgoingEvery view run rewrites the view wholesale
spec:consumers.wholesale-view-rewrite · resolves
declaredthe shared build invalidates the projection roots before this publisher rendersNone
refines · outgoingProjections fan out from one graph without becoming truth stores
spec:consumers.projections-model · resolves
declaredNoneNone

Bindings

Implementation binding: present

  • impl:protocol.census-page · renders the derived census and runtime taxonomy projection · src/projections/census.ts:21 · role projection · component component:protocol.projections · layer edge · context protocol
  • impl:protocol.census-page-cli · publishes the census through the explicit `sdp census` surface · src/cli/census-command.ts:66 · role publisher · component component:protocol.cli · layer edge · context protocol

Design reference: none

Verifier binding: present

  • test:protocol.census-page · verifies census taxonomy, findings, and structural-binding projection · anchored · test/census.test.ts:150 · 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.