outcomeGherkin view renders any Spec as a disposable read shape
spec:consumers.gherkin-viewPacks: pack:self-hosting-v1
Design: no design entries · no pinned declarations · 3 decisions
Findings: no errors, no warnings
specs/consumers/gherkin-view.sdp.md
No open questions and no blocking questions; implementation binding present, verifier binding present, and expected-outcome oracle none.
Intent
- Give maintainers a generated Gherkin-shaped page for reading any Spec, without making it a carrier, changing the default carrier or claiming conversion back to the authored Spec.
Behavior
ruleline 23 ·specs/consumers/gherkin-view.sdp.md:23renderGherkinViewis a pureReader -> pagesprojection with no filesystem or clock access; equal reader data produces byte-identical pages.ruleline 24 ·specs/consumers/gherkin-view.sdp.md:24- Every Spec renders as one Gherkin-shaped page plus one deterministic index. Pages use
spec/<id body>.feature.md, with thespec:namespace removed from the id. Packs are not projected. The projection never uses.sdp.gherkinand never claims round-trip parity. ruleline 25 ·specs/consumers/gherkin-view.sdp.md:25- Each page says it is generated and disposable. A page for a kind the Gherkin carrier does not carry has a
# LOSSY:comment in its header giving that kind's reason, and content Gherkin cannot carry honestly is marked the same way rather than invented as structure. ruleline 26 ·specs/consumers/gherkin-view.sdp.md:26- Description prose lands only on the narrative and keyed description bullets under the prose-ownership decision,
spec:decisions.prose-ownership; the projection never emits DocStrings, DataTables, Scenario Outlines, Examples tables, backgrounds, star steps or leading conjunctions. ruleline 27 ·specs/consumers/gherkin-view.sdp.md:27- Every emitted record is ordered by deterministic code-unit order independent of graph input order. Hostile characters are escaped so they cannot close a fence or invent a DocString.
ruleline 28 ·specs/consumers/gherkin-view.sdp.md:28- After the shared build, publication owns only
generated/gherkin/and uses the explicitsdp gherkinsurface. It is not a child of or an extra write inside Design Review's transaction, and it shares no publication bus or hidden side channel with other projections. ruleline 29 ·specs/consumers/gherkin-view.sdp.md:29- A Gherkin-view run writes its complete page set to
generated/gherkin.tmp/, removes the prior Gherkin-view root, and renames the temporary root into place. The shared build invalidates this root and all sibling projection roots before extraction, asspec:consumers.wholesale-view-rewrite#rule.buildInvalidatesstates, so failure leaves honest absence rather than stale output that looks current. A failed publish removes any live or temporary Gherkin-view root it cannot certify. ruleline 30 ·specs/consumers/gherkin-view.sdp.md:30sdp gherkin --check-cleanrenders 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.ruleline 31 ·specs/consumers/gherkin-view.sdp.md:31- When extraction succeeds but graph validation reports errors, the Gherkin view still publishes the labelled diagnostic projection and returns the nonzero validation exit code.
ruleline 32 ·specs/consumers/gherkin-view.sdp.md:32- The projection adds no Gherkin-specific Reader accessors and confers nothing back into the graph.
10 unkeyed rules.
Example space
Given a graph containing behavior, example, and refused-kind Specs with hostile titles When the Gherkin-view projection renders and publishes through the explicit gherkin command Then each Spec page is a visibly generated Gherkin-shaped read Then refused-kind pages carry the per-kind lie-reason as lossy commentary Then a clean independent render is byte-identical Then hostile characters cannot close a fence or invent a DocString Then generated/gherkin/ is the only current Gherkin-view root Then validation errors label the index as a diagnostic projection Then no page uses the .sdp.gherkin suffix
Verification
Verifier bindings
- test:protocol.gherkin-view · verifies the generated Gherkin-shaped READ projection · anchored · test anchor binding present ·
test/gherkin-view.test.ts:20External run evidence from
test/gherkin-view.test.tsTest anchors:
test:protocol.gherkin-view. Specs verified by those bindings: spec:consumers.gherkin-view.Run 1: external run evidence from vitest 4.1.10
Build: CI 391 · Branch: cursor/media-plan-and-articles-09b1 · Commit: 076cd4f1f85640d8236e5cca1bffffa68ab79a33 · Start: 2026-10-31T15:32:20.471Z · Stop: 2026-10-31T15:34:02.073Z
Name Suite Result Duration double-renders byte-identically and sorts independently of input order the generated Gherkin-shaped READ projection passed 3.27 ms labels the index as diagnostic when validation errors are present the generated Gherkin-shaped READ projection passed 0.46 ms marks refused kinds with the ruled lie-reason and never uses .sdp.gherkin the generated Gherkin-shaped READ projection passed 0.37 ms marks escaped relation reasons as lossy commentary in relation order without changing tags the generated Gherkin-shaped READ projection passed 4.88 ms marks every populated section that a canonical Gherkin shape cannot represent the generated Gherkin-shaped READ projection passed 0.62 ms escapes hostile characters so they cannot close a fence or invent a DocString the generated Gherkin-shaped READ projection passed 0.35 ms renders the checkout-v1 corpus as a disposable generated view the generated Gherkin-shaped READ projection passed 133.62 ms publishes diagnostic output for validation errors and returns nonzero sdp gherkin publication passed 24.21 ms surfaces the explicit command in help and names Gherkin on bad input sdp gherkin publication passed 0.45 ms publishes only generated/gherkin wholesale and regenerates byte-identically without tmp residue sdp gherkin publication passed 17.44 ms passes --check-clean only when twin renders and the published bytes agree sdp gherkin publication passed 19.63 ms refuses perturbed published bytes and removes both live and temporary roots sdp gherkin publication passed 17.56 ms refuses divergent --check-clean twins and removes both publication roots sdp gherkin publication passed 20.96 ms removes planted stale live and tmp output when the authored corpus fails sdp gherkin publication passed 6.04 ms
Example space
None.
Bound points
No bound example points recorded.
Oracle binding: none
Coverage
Unbound
None.
Given
a graph containing behavior, example, and refused-kind Specs with hostile titles
When
the Gherkin-view projection renders and publishes through the explicit gherkin command
Then
each Spec page is a visibly generated Gherkin-shaped read refused-kind pages carry the per-kind lie-reason as lossy commentary a clean independent render is byte-identical hostile characters cannot close a fence or invent a DocString generated/gherkin/ is the only current Gherkin-view root validation errors label the index as a diagnostic projection no page uses the .sdp.gherkin suffix
Composing needs the script.
Design view
Requirement drawing
- Declared verifying examples: no declared verifying example.
The diagram as text
- spec:consumers.gherkin-view: Gherkin view renders any Spec as a disposable read shape · declared Spec
- spec:consumers.projections-model: Projections fan out from one graph without becoming truth stores · declared Spec
- impl:protocol.gherkin-kind-policy: shared Gherkin kind-refusal and loss explanations · anchored code ·
src/extract/gherkin-kind-honesty.ts:6 - impl:protocol.gherkin-view: renders a generated Gherkin-shaped READ projection of any Spec · anchored code ·
src/projections/gherkin-view.ts:19 - impl:protocol.gherkin-view-cli: publishes the Gherkin view through the explicit sdp gherkin surface · anchored code ·
src/cli/gherkin-command.ts:66 - test:protocol.gherkin-view: verifies the generated Gherkin-shaped READ projection · anchored test binding · binding present ·
test/gherkin-view.test.ts:20 - spec:consumers.gherkin-view refines spec:consumers.projections-model · declared
- impl:protocol.gherkin-kind-policy satisfies spec:consumers.gherkin-view · anchored
- impl:protocol.gherkin-view satisfies spec:consumers.gherkin-view · anchored
- impl:protocol.gherkin-view-cli satisfies spec:consumers.gherkin-view · anchored
- test:protocol.gherkin-view verifies spec:consumers.gherkin-view · 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
- Carrier universality is bounded by honest kind structure
In order, first, Gherkin remains an honest canonical per-ID option only for
behavior(Feature) andexample(ordinary Scenario); the other six kinds stay Markdown because a Gherkin mapping would lie against the kind-evidence table —workflowhas no distinct Gherkin root and Feature mapping erases the kind;rulecollides withRule:already consumed as inlinebehavior.rules;constraintneeds machine-readable targets a Scenario cannot own;modelneeds keyed terms;decisionneeds context/decision/rationale/consequences (and supersedes) that Feature structure cannot distinguish;contractshares the behavior family row but Feature cannot structurally mark the kind. Second, rich content is ruled by physical form: Feature and Scenario description prose (keyed description bullets and remaining non-heading prose) is lawful only as free prose on the prose owners the prose-ownership law (MD-19) names — narrative or description on the typed owner — never a new field and never a parser-within-a-parser beyond enumerated constructs; Gherkin DocStrings and DataTables remain refused. Third, "universal" means per-ID carriers plus a generated Gherkin-shaped READ projection of any Spec (visibly generated, disposable, lossy commentary allowed for refused kinds), not one default authored carrier for everything and not a lossless codec. Fourth, the corpus default does not flip: Markdown remains the default Spec carrier; a default flip is refused before full honest round-trip exists. Fifth, Packs are out of this ruling; the Pack syntax ruling (MD-25) remains the Pack carrier law. - Prose belongs to typed graph owners
Free prose is stored as a narrative or a description on its typed owner; unowned prose is refused.
- 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.extract· the carrier and source pipeline ·src/extract/index.ts:192· layer application · context protocol Uses
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.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.gherkin-kind-policy· shared Gherkin kind-refusal and loss explanations ·src/extract/gherkin-kind-honesty.ts:6Component:
component:protocol.extract· the carrier and source pipeline ·src/extract/index.ts:192· layer application · context protocol Uses
None.
impl:protocol.gherkin-view· renders a generated Gherkin-shaped READ projection of any Spec ·src/projections/gherkin-view.ts:19Component:
component:protocol.projections· read-only output, layout and owned publication ·src/projections/design-review.ts:29· layer edge · context protocol Uses
impl:protocol.gherkin-kind-policy· shared Gherkin kind-refusal and loss explanations ·src/extract/gherkin-kind-honesty.ts:6
impl:protocol.gherkin-view-cli· publishes the Gherkin view through the explicitsdp gherkinsurface ·src/cli/gherkin-command.ts:66Component:
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
The diagram as text
- spec:consumers.gherkin-view: Gherkin view renders any Spec as a disposable read shape
- 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.carrier-universality: Carrier universality is bounded by honest kind structure
- spec:decisions.prose-ownership: Prose belongs to typed graph owners
- spec:decisions.shipped-projections-frozen: The shipped projections stay frozen
- spec:consumers.gherkin-view decidedBy spec:decisions.carrier-universality · declared
- spec:consumers.gherkin-view decidedBy spec:decisions.prose-ownership · declared — description prose stays on its typed graph owner
- spec:consumers.gherkin-view decidedBy spec:decisions.shipped-projections-frozen · declared
- spec:consumers.gherkin-view dependsOn spec:consumers.wholesale-view-rewrite · declared — the shared build invalidates the projection roots before this publisher renders
- spec:consumers.gherkin-view 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
- refines · spec:consumers.projections-model · stated ready, floor ready
- dependsOn · spec:consumers.wholesale-view-rewrite · stated ready, floor ready
- decidedBy · spec:decisions.carrier-universality · stated ready, floor ready
- decidedBy · spec:decisions.prose-ownership · stated ready, floor ready
- decidedBy · spec:decisions.shipped-projections-frozen · stated ready, floor ready
Rested on by
No Spec rests on this Spec.
Relations
| Relation and direction | Other end | Claim | Reason | Exercised keys |
|---|---|---|---|---|
| decidedBy · outgoing | Carrier universality is bounded by honest kind structurespec:decisions.carrier-universality · resolves | declared | None | None |
| decidedBy · outgoing | Prose belongs to typed graph ownersspec:decisions.prose-ownership · resolves | declared | description prose stays on its typed graph owner | None |
| decidedBy · outgoing | The shipped projections stay frozenspec:decisions.shipped-projections-frozen · resolves | declared | None | None |
| dependsOn · outgoing | Every view run rewrites the view wholesalespec:consumers.wholesale-view-rewrite · resolves | declared | the shared build invalidates the projection roots before this publisher renders | None |
| refines · outgoing | Projections fan out from one graph without becoming truth storesspec:consumers.projections-model · resolves | declared | None | None |
Bindings
Implementation binding: present
impl:protocol.gherkin-kind-policy· shared Gherkin kind-refusal and loss explanations ·src/extract/gherkin-kind-honesty.ts:6· role decider · component component:protocol.extract· layer application · context protocolimpl:protocol.gherkin-view· renders a generated Gherkin-shaped READ projection of any Spec ·src/projections/gherkin-view.ts:19· role projection · component component:protocol.projections· layer edge · context protocolimpl:protocol.gherkin-view-cli· publishes the Gherkin view through the explicit `sdp gherkin` surface ·src/cli/gherkin-command.ts:66· role publisher · component component:protocol.cli· layer edge · context protocol
Design reference: none
Verifier binding: present
- test:protocol.gherkin-view · verifies the generated Gherkin-shaped READ projection · anchored ·
test/gherkin-view.test.ts:20· 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.