Spec Studio

A keyed TypeScript step keeps its key through import to Markdown

spec:carrier.step-keys.typescript-keyed-step-imports-keyedExample / Scenario · storyready floor ready

Packs: pack:adopter-speed-v1, pack:self-hosting-v1

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

Findings: no errors, no warnings

specs/carrier/step-keys.typescript-keyed-step-imports-keyed.sdp.md

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

Intent
outcome
Execute the step marker in the TypeScript carrier: a keyed step string keeps its contract key across a rewording, and importing the carriers to Markdown writes the marker and extracts to the same step keys and step text.
Behavior

Examples

Given the {carrier: "TypeScript"} carriers of a parent whose example space declares the Given steps {vocabulary: "[#cartSize] a customer has a cart with {items:number} line items"}
Given a child example of that parent whose Given steps read {example: "a customer has a cart with {items: 2} line items"}
When the contracts are generated, the step lines are reworded by replacing {before: "a customer has a cart with"} with {after: "the cart holds"}, and the contracts are generated again
Then the first extraction finding's message contains {extractMessage: ""}
Then the child contract binds its first Given step as {bindingKey: "cartSize"} and then as {rewordedBindingKey: "cartSize"}
Then the carriers imported to Markdown write the parent's first Given step as {importedStep: "Given [#cartSize] the cart holds {items:number} line items"} and keep every step key and step text: {keptOnImport: true}
Verification

Verifier bindings

  • test:protocol.step-keys.typescript-keyed-step-imports-keyed · anchored · test anchor binding present · test/self-hosting-step-keys.test.ts:449

    External run evidence from test/self-hosting-step-keys.test.ts

    Test anchors: test:protocol.step-keys.conflicting-example-key-withheld, test:protocol.step-keys.gherkin-keyed-step-stays-bound, test:protocol.step-keys.key-equal-to-a-skeleton-withheld, test:protocol.step-keys.malformed-marker-refused, test:protocol.step-keys.renamed-key-breaks, test:protocol.step-keys.repeated-key-refused, test:protocol.step-keys.reworded-keyed-step-stays-bound, test:protocol.step-keys.reworded-unkeyed-step-breaks, test:protocol.step-keys.two-keys-on-one-step-refused, test:protocol.step-keys.typescript-keyed-step-imports-keyed. Specs verified by those bindings: spec:carrier.step-keys, spec:carrier.step-keys.conflicting-example-key-withheld, spec:carrier.step-keys.gherkin-keyed-step-stays-bound, spec:carrier.step-keys.key-equal-to-a-skeleton-withheld, spec:carrier.step-keys.malformed-marker-refused, spec:carrier.step-keys.renamed-key-breaks, spec:carrier.step-keys.repeated-key-refused, spec:carrier.step-keys.reworded-keyed-step-stays-bound, spec:carrier.step-keys.reworded-unkeyed-step-breaks, spec:carrier.step-keys.two-keys-on-one-step-refused, spec:carrier.step-keys.typescript-keyed-step-imports-keyed, spec:extraction.executable-contracts.

    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

    NameSuiteResultDuration
    executes the bound example against a fresh worldAn example marker that disagrees with its vocabulary withholds the contract (spec:carrier.step-keys.conflicting-example-key-withheld)passed22.63 ms
    executes the bound example against a fresh worldA keyed Gherkin step keeps its binding across a rewording (spec:carrier.step-keys.gherkin-keyed-step-stays-bound)passed1217.15 ms
    executes the bound example against a fresh worldA step key equal to another step's skeleton withholds the contract (spec:carrier.step-keys.key-equal-to-a-skeleton-withheld)passed28 ms
    executes the bound example against a fresh worldA step marker whose key is off the grammar refuses the carrier (spec:carrier.step-keys.malformed-marker-refused)passed770.98 ms
    executes the bound example against a fresh worldRenaming a step key breaks the binding (spec:carrier.step-keys.renamed-key-breaks)passed645.28 ms
    executes the bound example against a fresh worldOne key on two vocabulary steps refuses the carrier (spec:carrier.step-keys.repeated-key-refused)passed585.85 ms
    executes the bound example against a fresh worldA keyed step reworded in its vocabulary and its example keeps its binding (spec:carrier.step-keys.reworded-keyed-step-stays-bound)passed671.38 ms
    executes the bound example against a fresh worldThe same rewording without a key breaks the binding (spec:carrier.step-keys.reworded-unkeyed-step-breaks)passed654.66 ms
    executes the bound example against a fresh worldTwo keys on one step refuse the carrier (spec:carrier.step-keys.two-keys-on-one-step-refused)passed726.16 ms
    executes the bound example against a fresh worldA keyed TypeScript step keeps its key through import to Markdown (spec:carrier.step-keys.typescript-keyed-step-imports-keyed)passed666.12 ms
Design view

Requirement drawing

  • Satisfying or referencing units: no recorded binding.
Requirement drawing for spec:carrier.step-keys.typescript-keyed-step-imports-keyed
The diagram as text
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed: A keyed TypeScript step keeps its key through import to Markdown · declared Spec
  • spec:carrier.step-keys: An example step may carry a key that survives rewording · declared Spec
  • test:protocol.step-keys.typescript-keyed-step-imports-keyed: test:protocol.step-keys.typescript-keyed-step-imports-keyed · anchored test binding · binding present · test/self-hosting-step-keys.test.ts:449
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed refines spec:carrier.step-keys · declared
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed verifies spec:carrier.step-keys · declared
  • test:protocol.step-keys.typescript-keyed-step-imports-keyed verifies spec:carrier.step-keys.typescript-keyed-step-imports-keyed · 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

No decision record named.

Runtime

No implementation neighborhood recorded.

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:carrier.step-keys.typescript-keyed-step-imports-keyed
  • E2: verifies · declared
The diagram as text
  • spec:carrier.step-keys: An example step may carry a key that survives rewording
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed: A keyed TypeScript step keeps its key through import to Markdown
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed refines spec:carrier.step-keys · declared
  • spec:carrier.step-keys.typescript-keyed-step-imports-keyed verifies spec:carrier.step-keys · 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
refines · outgoingAn example step may carry a key that survives rewording
spec:carrier.step-keys · resolves
declaredNoneNone
verifies · outgoingAn example step may carry a key that survives rewording
spec:carrier.step-keys · resolves
declaredNonestepMarker, contractKey

Bindings

Implementation binding: none

Design reference: none

Verifier binding: present

  • test:protocol.step-keys.typescript-keyed-step-imports-keyed · anchored · test/self-hosting-step-keys.test.ts:449 · 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.