Bounded optimization for persistent Imp.Playbook parameters.
The proposer receives training trajectories only. Challenger promotion requires improvement on source- and group-disjoint promotion and audit splits, bounded retained growth, and a content/provenance leakage audit. Every callback runs under a declared reservation and returns authoritative usage accounting.
This is an Elixir-native adaptation of the incremental context-learning loop explored by Dynamic Cheatsheet and ACE. It uses Imp's normal program parameter and trajectory contracts; it is not a second agent-memory runtime.
compile/6 never mutates a serving process. It returns a Result containing
the baseline, challenger, decision, audit scores, usage, and exact rollback
state. Application code must review that result and explicitly install
result.program (or persist and restore its completed checkpoint).
Summary
Functions
Proposes, evaluates, and transactionally promotes one playbook delta.
Builds a validated optimizer configuration.
Returns low-scoring training observations from a proposer request.
Reads and verifies a completed playbook optimizer checkpoint.
Restores a completed checkpoint against fresh runtime-bound program callbacks.
Returns active and historical retained semantic bytes.
Returns a compact, data-only challenger review before deployment.
Returns the exact pre-promotion program preserved by a result.
Atomically writes a verified completed checkpoint as owner-readable JSON.
Types
Functions
@spec compile(t(), struct(), [row()], [row()], [row()], keyword()) :: {:ok, struct()} | {:error, term()}
Proposes, evaluates, and transactionally promotes one playbook delta.
Builds a validated optimizer configuration.
Returns low-scoring training observations from a proposer request.
The result stays grounded in the exact training rows and admitted trajectories
passed to the proposer. Observations are ordered from lowest score to highest;
use below: to set the exclusive score threshold (default 1.0). Promotion
and audit rows are never present in the request produced by this optimizer.
Reads and verifies a completed playbook optimizer checkpoint.
@spec restore(map(), struct(), Imp.ProgramParameters.name()) :: {:ok, struct()} | {:error, term()}
Restores a completed checkpoint against fresh runtime-bound program callbacks.
@spec retained_bytes(Imp.Playbook.t()) :: non_neg_integer()
Returns active and historical retained semantic bytes.
Returns a compact, data-only challenger review before deployment.
Returns the exact pre-promotion program preserved by a result.
Atomically writes a verified completed checkpoint as owner-readable JSON.