outcomeA scripted body returns claim-decoded context, pre-shaped by the body
spec:consumers.agent-surface.scripted-context-bodyPacks: pack:self-hosting-v1
Design: no design entries · no pinned declarations · no decisions
Findings: no errors, no warnings
specs/consumers/agent-surface.scripted-context-body.sdp.md
No open questions and no blocking questions; implementation binding none, verifier binding present, and expected-outcome oracle none.
Given
an extraction root the front door derives in process on the invocation
the corpus binds the spec {specId: "spec:orders.create-order"} to one anchored verifier and one declared-only verifierWhen
the agent scripts a body {body: "composing that spec's verifier bindings"} through the front doorThen
the front door exits {exitCode: 0} with an empty error stream
the printed answer is exactly the body's pre-shaped return {printedAnswer: "spec:orders.create-order.empty-cart is a declared verifier · spec:orders.create-order.valid-cart is an enabled verifier"}
the anchored verifier {anchoredVerifierId: "spec:orders.create-order.valid-cart"} decodes as enabled while the declared-only verifier {declaredVerifierId: "spec:orders.create-order.empty-cart"} does notComposing needs the script.
Intent
- Execute the whole path an agent uses — a root, the extractor, the graph, the injected reader, one scripted body — and read back the decode a hand-rolled join gets wrong.
Behavior
Examples
Given an extraction root the front door derives in process on the invocation
Given the corpus binds the spec {specId: "spec:orders.create-order"} to one anchored verifier and one declared-only verifier
When the agent scripts a body {body: "composing that spec's verifier bindings"} through the front door
Then the front door exits {exitCode: 0} with an empty error stream
Then the printed answer is exactly the body's pre-shaped return {printedAnswer: "spec:orders.create-order.empty-cart is a declared verifier · spec:orders.create-order.valid-cart is an enabled verifier"}
Then the anchored verifier {anchoredVerifierId: "spec:orders.create-order.valid-cart"} decodes as enabled while the declared-only verifier {declaredVerifierId: "spec:orders.create-order.empty-cart"} does notVerification
Verifier bindings
- test:protocol.agent-surface.scripted-context-body · the scripted-body point verifies the front door's claim-decoded, pre-shaped return · anchored · test anchor binding present ·
test/self-hosting-consumers.test.ts:244External run evidence from
test/self-hosting-consumers.test.tsTest anchors:
test:protocol.agent-surface.demand-map-entries,test:protocol.agent-surface.scripted-context-body,test:protocol.reader.changeset-entry,test:protocol.reader.concept-entry,test:protocol.reader.file-entry. Specs verified by those bindings: spec:consumers.agent-surface, spec:consumers.agent-surface.demand-map-entries, spec:consumers.agent-surface.scripted-context-body, spec:consumers.reader, spec:consumers.reader.changeset-entry, spec:consumers.reader.concept-entry, spec:consumers.reader.file-entry.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
Name Suite Result Duration executes the bound example against a fresh world A scripted body returns claim-decoded context, pre-shaped by the body (spec:consumers.agent-surface.scripted-context-body) passed 55.03 ms executes the bound example against a fresh world One body reaches every entry point the demand map names, and no symbol entry (spec:consumers.agent-surface.demand-map-entries) passed 23.29 ms executes the bound example against a fresh world A concept recorded only inside a Spec's sections is still reached, and the field is named (spec:consumers.reader.concept-entry) passed 12.65 ms executes the bound example against a fresh world A source file reaches the Spec its binding names, and a carrier reaches its own Spec (spec:consumers.reader.file-entry) passed 11.95 ms executes the bound example against a fresh world A changeset names what it reaches, why, and what it cannot see (spec:consumers.reader.changeset-entry) passed 18.11 ms
Design view
Requirement drawing
- Satisfying or referencing units: no recorded binding.
The diagram as text
- spec:consumers.agent-surface.scripted-context-body: A scripted body returns claim-decoded context, pre-shaped by the body · declared Spec
- spec:consumers.agent-surface: Agents script a visible typed graph · declared Spec
- test:protocol.agent-surface.scripted-context-body: the scripted-body point verifies the front door's claim-decoded, pre-shaped return · anchored test binding · binding present ·
test/self-hosting-consumers.test.ts:244 - spec:consumers.agent-surface.scripted-context-body refines spec:consumers.agent-surface · declared
- spec:consumers.agent-surface.scripted-context-body verifies spec:consumers.agent-surface · declared
- test:protocol.agent-surface.scripted-context-body verifies spec:consumers.agent-surface.scripted-context-body · 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
- E2: verifies · declared
The diagram as text
- spec:consumers.agent-surface: Agents script a visible typed graph
- spec:consumers.agent-surface.scripted-context-body: A scripted body returns claim-decoded context, pre-shaped by the body
- spec:consumers.agent-surface.scripted-context-body refines spec:consumers.agent-surface · declared
- spec:consumers.agent-surface.scripted-context-body verifies spec:consumers.agent-surface · 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.agent-surface · stated ready, floor ready
Rested on by
No Spec rests on this Spec.
Relations
| Relation and direction | Other end | Claim | Reason | Exercised keys |
|---|---|---|---|---|
| refines · outgoing | Agents script a visible typed graphspec:consumers.agent-surface · resolves | declared | None | None |
| verifies · outgoing | Agents script a visible typed graphspec:consumers.agent-surface · resolves | declared | None | None |
Bindings
Implementation binding: none
Design reference: none
Verifier binding: present
- test:protocol.agent-surface.scripted-context-body · the scripted-body point verifies the front door's claim-decoded, pre-shaped return · anchored ·
test/self-hosting-consumers.test.ts:244· 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.