Spec Studio

A Pack node keeps its members in authored order

spec:extraction.pack-member-orderBusiness Rule · storyready floor ready

Packs: pack:self-hosting-v1

Design: no design entries · no pinned declarations · 1 decision

Findings: no errors, no warnings

specs/extraction/pack-member-order.sdp.md

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

Intent
problem
A Pack manifest lists its members in the order its author chose to read them, and the graph loses that order: the serialized edges sort by from, type, and to, and the reader's Pack context sorts members by id, so an adopter reads the manifest file to recover a reading order the graph was given.
outcome
Carry a Pack's members in the manifest's authored order through the serialized graph, the reader's Pack context, and the Design Review's Pack page, while the edges keep their global sort.
Rule
rule.authoredMembers line 19 · specs/extraction/pack-member-order.sdp.md:19
A Pack node carries members, the manifest's specs list in authored order, a repeat included where the carrier admits one. The belongsTo edges re-express the same list, one edge per entry, so the members of a Pack node and the sources of its belongsTo edges are one list read twice and never disagree in a derived graph.

spec:extraction.pack-member-order.manifest-order-kept · enabled

rule line 20 · specs/extraction/pack-member-order.sdp.md:20
members is always present on a Pack node, and an empty manifest list derives members: []. The serialized Pack node writes its fields in the order id, nodeType, claim, title, framing, file, members, modelRefs, order, omitting an absent optional field.
rule line 21 · specs/extraction/pack-member-order.sdp.md:21
Nodes keep their sort by id and edges keep their sort by from, type, and to. Authored member order is content of the Pack node, as authored entry order is content of a Spec's open sections, so two derivations of one commit stay byte-identical and two manifests that list the same members in different orders derive different Pack nodes.
rule line 22 · specs/extraction/pack-member-order.sdp.md:22
The reader's Pack context lists one member row per entry of members, in that order, and its verifier gaps follow the same order. The Design Review's Pack page renders its member table and its verifier gap list in that order.
rule line 23 · specs/extraction/pack-member-order.sdp.md:23
A repeated member is kept only where its carrier admits it. TypeScript keeps repetitions in members and reader rows, and pack-coherence reports the duplicate belongsTo edge. Markdown refuses a repeated manifest member with extract/invalid-frontmatter and the message duplicate entry in specs.

4 unkeyed rules.

Verifying examples

A manifest's member order survives into the graph and the reader · spec:extraction.pack-member-order.manifest-order-kept · ready floor ready

Executable Spec

Given a Markdown Pack manifest whose specs list reads {manifestOrder: "spec:probe.zeta, spec:probe.alpha, spec:probe.mid"}
When the graph is derived and serialized
Then the serialized Pack node lists the members {serializedMembers: "spec:probe.zeta, spec:probe.alpha, spec:probe.mid"}
Then the serialized belongsTo edges run from {edgeSources: "spec:probe.alpha, spec:probe.mid, spec:probe.zeta"}
Then the reader's Pack context lists the members {readerMembers: "spec:probe.zeta, spec:probe.alpha, spec:probe.mid"}

Open example

Example space

Given a Markdown Pack manifest whose specs list reads {manifestOrder:string}
When the graph is derived and serialized
Then the serialized Pack node lists the members {serializedMembers:string}
Then the serialized belongsTo edges run from {edgeSources:string}
Then the reader's Pack context lists the members {readerMembers:string}
Verification

Verifier bindings

  • spec:extraction.pack-member-order.manifest-order-kept · A manifest's member order survives into the graph and the reader · declared · example enabled · specs/extraction/pack-member-order.manifest-order-kept.sdp.md

    External run evidence from test/self-hosting-pack-member-order.test.ts

    Test anchors: test:protocol.pack-member-order. Specs verified by those bindings: spec:extraction.pack-member-order, spec:extraction.pack-member-order.manifest-order-kept.

    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 worldA manifest's member order survives into the graph and the reader (spec:extraction.pack-member-order.manifest-order-kept)passed24.27 ms
    keeps repeated members in the graph, reader, member table and gap listPack member orderpassed40.51 ms
    carries an empty members list for an empty manifestPack member orderpassed6.91 ms
    derives empty members when specs is undefinedPack member orderpassed0.37 ms
    derives empty members when specs is not an arrayPack member orderpassed0.32 ms
    serializes framing, file, members and modelRefs in the ruled field orderPack member orderpassed0.26 ms
  • test:protocol.roadmap-priority · checks Pack priority extraction, comparison and Studio change notes · anchored · test anchor binding present · test/roadmap-priority.test.ts:44

    External run evidence from test/roadmap-priority.test.ts

    Test anchors: test:protocol.roadmap-priority. Specs verified by those bindings: spec:carrier.markdown-pack-authoring, spec:consumers.design-diff, spec:consumers.spec-studio.diff-page, spec:consumers.spec-studio.pack-page, spec:extraction.pack-member-order, spec:model.pack-aggregate.

    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
    derives equal Markdown and TypeScript Pack nodes and edges, serializes order last, and exposes it through the readerroadmap priority manifestpassed45.69 ms
    refuses the invalid Markdown value readingroadmap priority manifestpassed1.85 ms
    refuses the invalid Markdown value arbitraryroadmap priority manifestpassed1.57 ms
    refuses the invalid Markdown value trueroadmap priority manifestpassed1.49 ms
    refuses the invalid Markdown value nullroadmap priority manifestpassed1.94 ms
    refuses the invalid Markdown value []roadmap priority manifestpassed1.71 ms
    refuses the invalid Markdown value {}roadmap priority manifestpassed1.43 ms
    refuses the invalid TypeScript value "reading"roadmap priority manifestpassed7.24 ms
    refuses the invalid TypeScript value "arbitrary"roadmap priority manifestpassed2.88 ms
    refuses the invalid TypeScript value trueroadmap priority manifestpassed3.36 ms
    refuses the invalid TypeScript value nullroadmap priority manifestpassed3.31 ms
    refuses the invalid TypeScript value []roadmap priority manifestpassed9.61 ms
    refuses the invalid TypeScript value {}roadmap priority manifestpassed3.83 ms
    refuses the invalid TypeScript value undefinedroadmap priority manifestpassed2.87 ms
    refuses the invalid TypeScript value chosenOrderroadmap priority manifestpassed4.04 ms
    names a removed Pack by its order meaning (priority true)roadmap priority design diffpassed19.39 ms
    names a removed Pack by its order meaning (priority false)roadmap priority design diffpassed17.38 ms
    names an added roadmap and preserves manifest order in its member deltaroadmap priority design diffpassed26.27 ms
    labels Pack membership by its order meaning (priority true)roadmap priority design diffpassed15.16 ms
    labels Pack membership by its order meaning (priority false)roadmap priority design diffpassed6.39 ms
    states order values when a change is not a known roadmap transitionroadmap priority design diffpassed11.93 ms
    documents the order comparison fields, default and diagnostic in the recipe contractroadmap priority design diffpassed1.3 ms
    compares a priority transition to true without a membership editroadmap priority design diffpassed10.9 ms
    compares a priority transition to false without a membership editroadmap priority design diffpassed6.76 ms
    reads an absent order as reading order in a base schema that predates the fieldroadmap priority design diffpassed14.49 ms
    marks the absent side of an added or removed roadmap as null (true)roadmap priority design diffpassed10.48 ms
    marks the absent side of an added or removed roadmap as null (false)roadmap priority design diffpassed4.24 ms
    diagnoses an unknown order at the base without reporting an order changeroadmap priority design diffpassed3.41 ms
    diagnoses an unknown order at the head without reporting an order changeroadmap priority design diffpassed4.06 ms
    still compares membership and member order when the base order is unknownroadmap priority design diffpassed5.37 ms
    still compares membership and member order when the head order is unknownroadmap priority design diffpassed9.28 ms
    keeps an order-only change in the selected Pack's comparison scoperoadmap priority design diffpassed3.1 ms
    shows no roadmap transition for a membership-only change (priority true)roadmap priority design diffpassed8.38 ms
    shows no roadmap transition for a membership-only change (priority false)roadmap priority design diffpassed7.43 ms
    shows the roadmap transition to true on the diff and Pack pagesroadmap priority design diffpassed8.78 ms
    shows the roadmap transition to false on the diff and Pack pagesroadmap priority design diffpassed17.15 ms

Example space

  • manifestOrder · string · declared by a Markdown Pack manifest whose specs list reads {manifestOrder}

Bound points

ExamplemanifestOrder
spec:extraction.pack-member-order.manifest-order-kept"spec:probe.zeta, spec:probe.alpha, spec:probe.mid"

Oracle binding: none

Coverage

manifestOrder: "spec:probe.zeta, spec:probe.alpha, spec:probe.mid" · spec:extraction.pack-member-order.manifest-order-kept · not enumerable

Unbound

  • manifestOrder: None
Design view

Requirement drawing

Requirement drawing for spec:extraction.pack-member-order
The diagram as text
  • spec:extraction.pack-member-order: A Pack node keeps its members in authored order · declared Spec
  • spec:extraction.pack-member-order.manifest-order-kept: A manifest's member order survives into the graph and the reader · declared Spec
  • spec:extraction.derive-graph: Carrier reification derives the one graph · declared Spec
  • impl:protocol.markdown-yaml-policy: bounded YAML scalars and relation-target forms · anchored code · src/extract/markdown-yaml-policy.ts:33
  • impl:protocol.open-section-order: preserves authored open-section and model-term order and Pack field order · anchored code · src/extract/serialize.ts:105
  • impl:protocol.pack-coherence: checks Pack membership agreement and uniqueness and model-reference kinds · anchored code · src/validate/validators.ts:1102
  • impl:protocol.pack-design-page: renders the Pack page from the Pack design · anchored code · src/projections/design-review-pages.ts:120
  • impl:protocol.pack-member-order: keeps manifest member order on the Pack node · anchored code · src/extract/derive.ts:153
  • impl:protocol.reader: typed graph queries, entry adapters and context joins · anchored code · src/reader/reader.ts:687
  • test:protocol.pack-member-order: verifies manifest order in the graph, reader and Pack page · anchored test binding · binding present · test/self-hosting-pack-member-order.test.ts:108
  • test:protocol.roadmap-priority: checks Pack priority extraction, comparison and Studio change notes · anchored test binding · binding present · test/roadmap-priority.test.ts:44
  • spec:extraction.pack-member-order refines spec:extraction.derive-graph · declared
  • spec:extraction.pack-member-order.manifest-order-kept refines spec:extraction.pack-member-order · declared
  • spec:extraction.pack-member-order.manifest-order-kept verifies spec:extraction.pack-member-order · declared
  • impl:protocol.markdown-yaml-policy satisfies spec:extraction.pack-member-order · anchored
  • impl:protocol.open-section-order satisfies spec:extraction.pack-member-order · anchored
  • impl:protocol.pack-coherence satisfies spec:extraction.pack-member-order · anchored
  • impl:protocol.pack-design-page satisfies spec:extraction.pack-member-order · anchored
  • impl:protocol.pack-member-order satisfies spec:extraction.pack-member-order · anchored
  • impl:protocol.reader satisfies spec:extraction.pack-member-order · anchored
  • test:protocol.pack-member-order verifies spec:extraction.pack-member-order.manifest-order-kept · anchored
  • test:protocol.roadmap-priority verifies spec:extraction.pack-member-order · 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

  • A roadmap states advisory priority in the graph

    A roadmap is a Pack whose manifest states order: priority; its members' authored order is the corpus's advisory priority, first entry first. order is an optional manifest field whose one lawful value is priority, and a Pack without it keeps the reading order every Pack has. Priority is preference among bodies of work and nothing more: it carries no date, no dependency, no status and no gate, and no check, recipe or page treats a place on a roadmap as permission, obligation or sequence. Everything a roadmap shows about an entry, what it still needs and what holds it, is read from the graph each time. A corpus may keep several roadmaps, and a Spec may be listed on any number of them.

Runtime
  • 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
  • component:protocol.reader · the typed graph contract and body evaluator · src/reader/reader.ts:671 · 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.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

  • impl:protocol.markdown-yaml-policy · bounded YAML scalars and relation-target forms · src/extract/markdown-yaml-policy.ts:33

    Component: component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol

    Uses

    None.

  • impl:protocol.open-section-order · preserves authored open-section and model-term order and Pack field order · src/extract/serialize.ts:105

    Component: component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol

    Uses

    None.

  • impl:protocol.pack-coherence · checks Pack membership agreement and uniqueness and model-reference kinds · src/validate/validators.ts:1102

    Component: component:protocol.validate · one finding currency and ordered checks · src/validate/validators.ts:72 · layer domain · context protocol

    Uses

    None.

  • impl:protocol.pack-design-page · renders the Pack page from the Pack design · src/projections/design-review-pages.ts:120

    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.pack-member-order · keeps manifest member order on the Pack node · src/extract/derive.ts:153

    Component: component:protocol.extract · the carrier and source pipeline · src/extract/index.ts:192 · layer application · context protocol

    Uses

    None.

  • impl:protocol.reader · typed graph queries, entry adapters and context joins · src/reader/reader.ts:687

    Component: component:protocol.reader · the typed graph contract and body evaluator · src/reader/reader.ts:671 · layer application · context protocol

    Uses

    • impl:protocol.delivery-facts · computes delivery facts from resolving binding edges · src/graph/delivery-facts.ts:65
    • impl:protocol.next-rung-floor · evaluates the floor for a target rung and names the targets that break a dependency · src/validate/readiness-floor.ts:603

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:extraction.pack-member-order

Shown as text: this drawing exceeds the height budget of 2000 pixels after folding.

The diagram as text
  • spec:carrier.markdown-pack-authoring: A Pack has a Markdown manifest carrier
  • spec:consumers.pack-design: The Pack context carries the Pack's design
  • spec:consumers.spec-studio.data: The Studio renders from the reader's values and embeds only what its script reads
  • spec:consumers.spec-studio.lenses.packs: The Packs lens groups every Spec by the Packs that hold it
  • spec:decisions.roadmap-priority: A roadmap states advisory priority in the graph
  • spec:extraction.derive-graph: Carrier reification derives the one graph
  • spec:extraction.determinism: Committed source derives byte-identical output
  • spec:extraction.pack-member-order: A Pack node keeps its members in authored order
  • spec:extraction.pack-member-order.manifest-order-kept: A manifest's member order survives into the graph and the reader
  • spec:extraction.pack-member-order constrainedBy spec:extraction.determinism · declared
  • spec:extraction.pack-member-order decidedBy spec:decisions.roadmap-priority · declared
  • spec:extraction.pack-member-order dependsOn spec:carrier.markdown-pack-authoring · declared
  • spec:extraction.pack-member-order refines spec:extraction.derive-graph · declared
  • spec:consumers.pack-design dependsOn spec:extraction.pack-member-order · declared
  • spec:consumers.spec-studio.data dependsOn spec:extraction.pack-member-order · declared
  • spec:consumers.spec-studio.lenses.packs dependsOn spec:extraction.pack-member-order · declared — the lens lists each Pack's members in the order its manifest gives
  • spec:extraction.pack-member-order.manifest-order-kept refines spec:extraction.pack-member-order · declared
  • spec:extraction.pack-member-order.manifest-order-kept verifies spec:extraction.pack-member-order · declared

Rests on

Rested on by

Distance 1

Distance 2

Distance 3

Distance 4

Distance 5

Distance 6

Distance 7

Distance 8

Relations

Relation and directionOther endClaimReasonExercised keys
constrainedBy · outgoingCommitted source derives byte-identical output
spec:extraction.determinism · resolves
declaredNoneNone
decidedBy · outgoingA roadmap states advisory priority in the graph
spec:decisions.roadmap-priority · resolves
declaredNoneNone
dependsOn · outgoingA Pack has a Markdown manifest carrier
spec:carrier.markdown-pack-authoring · resolves
declaredNoneNone
refines · outgoingCarrier reification derives the one graph
spec:extraction.derive-graph · resolves
declaredNoneNone
dependsOn · incomingThe Pack context carries the Pack's design
spec:consumers.pack-design · resolves
declaredNoneNone
dependsOn · incomingThe Studio renders from the reader's values and embeds only what its script reads
spec:consumers.spec-studio.data · resolves
declaredNoneNone
dependsOn · incomingThe Packs lens groups every Spec by the Packs that hold it
spec:consumers.spec-studio.lenses.packs · resolves
declaredthe lens lists each Pack's members in the order its manifest givesNone
refines · incomingA manifest's member order survives into the graph and the reader
spec:extraction.pack-member-order.manifest-order-kept · resolves
declaredNoneNone
verifies · incomingA manifest's member order survives into the graph and the reader
spec:extraction.pack-member-order.manifest-order-kept · resolves
declaredNoneauthoredMembers

Bindings

Implementation binding: present

  • impl:protocol.markdown-yaml-policy · bounded YAML scalars and relation-target forms · src/extract/markdown-yaml-policy.ts:33 · role codec · component component:protocol.extract · layer application · context protocol
  • impl:protocol.open-section-order · preserves authored open-section and model-term order and Pack field order · src/extract/serialize.ts:105 · role codec · component component:protocol.extract · layer application · context protocol
  • impl:protocol.pack-coherence · checks Pack membership agreement and uniqueness and model-reference kinds · src/validate/validators.ts:1102 · role validator · component component:protocol.validate · layer domain · context protocol
  • impl:protocol.pack-design-page · renders the Pack page from the Pack design · src/projections/design-review-pages.ts:120 · role projection · component component:protocol.projections · layer edge · context protocol
  • impl:protocol.pack-member-order · keeps manifest member order on the Pack node · src/extract/derive.ts:153 · role extractor · component component:protocol.extract · layer application · context protocol
  • impl:protocol.reader · typed graph queries, entry adapters and context joins · src/reader/reader.ts:687 · role reader · component component:protocol.reader · layer application · context protocol

Design reference: none

Verifier binding: present

  • spec:extraction.pack-member-order.manifest-order-kept · A manifest's member order survives into the graph and the reader · declared · specs/extraction/pack-member-order.manifest-order-kept.sdp.md · example enabled
  • test:protocol.roadmap-priority · checks Pack priority extraction, comparison and Studio change notes · anchored · test/roadmap-priority.test.ts:44 · 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.