Gate 1 is met as of 2026-09-07. RFC-0001's dependency order says gates 5–8 are horizontals that "start as soon as gate 1 holds", so this opens gate 5.
Verified absent, not assumed
memory appears 0 times in packages/sdk/src/spec.ts. A step cannot declare it.
- Every
memory match in kernel/**/*.rs is MemoryJournal — the in-memory test journal — or a // SAFETY: comment. None of it is gate 5's concept.
relayhistory appears only in kernel/DESIGN.md. Nothing consumes it.
Scope: slice 1 of the gate, deliberately
Gate 5's full "Done when" requires a behavioural result — "an agent avoiding a mistake recorded in a previous run's trajectory, with the citation in its output" — which needs relayhistory wired in and an eval. That is not one PR.
This issue is the substrate only, and stops short on purpose:
- A
memory: declaration on a step in the spec — scope (script | agent), query, budget — in both packages/sdk/src/spec.ts and the kernel dialect, kept in parity the way spec-parity already enforces.
- The kernel records the injected pack as a journal fact: what was requested, what was injected, and what it cost against the step's budget. Same discipline as every other kernel concept — if it is not in the journal it did not happen, and replay must reproduce it.
- Budget accounting is exact under resume, matching gate 1's rule that a resumed run's spend equals one execution of each step. An injected pack must not be charged twice.
Explicitly NOT in scope: any relayhistory call, any retrieval implementation, any behavioural claim about pack quality. A stub provider returning a fixed pack is correct here. Retrieval quality is gate 5's hard part and gets its own issue once the substrate is replayable.
Suggested acceptance
Following #212's shape — pin the property, not the API:
- A crash-resume test where a step declaring
memory: is killed after injection but before completion, resumes, and the journal shows the pack injected once with the budget charged once.
- A replay test: replaying the journal reproduces the identical injected pack without calling the provider again, because the pack is a recorded fact rather than a re-derived one.
- Spec parity holds: the SDK and kernel dialects accept the same
memory: shape, and the existing parity test proves it.
The first test is the deliverable; the rest exists to make it pass.
Note on ordering
I picked gate 5 over gate 7 because gate 9 depends on 5 + 8, so it is on the critical path while routing is standalone. That is the RFC's reasoning, not a product decision I own — say so and I will repoint the lane at gate 7 instead.
Ledger: https://claude.ai/code/artifact/1edcf8ae-af0c-4115-b953-df5bd8cdd0c9
Gate 1 is met as of 2026-09-07. RFC-0001's dependency order says gates 5–8 are horizontals that "start as soon as gate 1 holds", so this opens gate 5.
Verified absent, not assumed
memoryappears 0 times inpackages/sdk/src/spec.ts. A step cannot declare it.memorymatch inkernel/**/*.rsisMemoryJournal— the in-memory test journal — or a// SAFETY:comment. None of it is gate 5's concept.relayhistoryappears only inkernel/DESIGN.md. Nothing consumes it.Scope: slice 1 of the gate, deliberately
Gate 5's full "Done when" requires a behavioural result — "an agent avoiding a mistake recorded in a previous run's trajectory, with the citation in its output" — which needs relayhistory wired in and an eval. That is not one PR.
This issue is the substrate only, and stops short on purpose:
memory:declaration on a step in the spec —scope(script|agent),query,budget— in bothpackages/sdk/src/spec.tsand the kernel dialect, kept in parity the wayspec-parityalready enforces.Explicitly NOT in scope: any relayhistory call, any retrieval implementation, any behavioural claim about pack quality. A stub provider returning a fixed pack is correct here. Retrieval quality is gate 5's hard part and gets its own issue once the substrate is replayable.
Suggested acceptance
Following #212's shape — pin the property, not the API:
memory:is killed after injection but before completion, resumes, and the journal shows the pack injected once with the budget charged once.memory:shape, and the existing parity test proves it.The first test is the deliverable; the rest exists to make it pass.
Note on ordering
I picked gate 5 over gate 7 because gate 9 depends on 5 + 8, so it is on the critical path while routing is standalone. That is the RFC's reasoning, not a product decision I own — say so and I will repoint the lane at gate 7 instead.
Ledger: https://claude.ai/code/artifact/1edcf8ae-af0c-4115-b953-df5bd8cdd0c9