# prime-commitment-observer A Prime Agent extension that remembers unfinished user requests across turns without making the foreground model manage a task registry. ## behavior The extension keeps one append-only, branch-aware ledger in the session file. A small observer model runs after completed agent turns and classifies each request as `open`, `active`, `waiting`, `blocked`, `done`, `cancelled`, or `superseded`. Before a user-originated turn, Prime receives one hidden `` context block when the pending set changed. Internal wakes such as child completion notices and background command completions never create another block. Closing the final request emits one clear marker so an older snapshot cannot remain authoritative. This is a lightweight semantic ledger. It does not infer test results or claim verified completion from command strings. The observer judges the user messages and the completed assistant response. ## requirements This version requires a Prime Agent build whose `before_agent_start` extension event includes `source`. The extension uses it to distinguish user input from internal wakes. ## install From a clone: ```bash git clone git@knot.gaze.systems:did:plc:gyggh67fdq2hukuabczwhm3w prime-commitment-observer cd prime-commitment-observer prime-agent package install . ``` The package manager records the checkout in `~/.prime/agent/settings.json`. Keep the checkout in place while it is installed. Reload extensions or restart Prime Agent. ## configuration ```bash export PRIME_COMMITMENT_OBSERVER_PROVIDER=deepseek export PRIME_COMMITMENT_OBSERVER_MODEL=deepseek-v4-flash export PRIME_COMMITMENT_OBSERVER_TIMEOUT_MS=60000 ``` Optional variables: - `PRIME_COMMITMENT_OBSERVER_API_KEY` - `PRIME_COMMITMENT_OBSERVER_BASE_URL` - `PRIME_COMMITMENT_OBSERVER_TEMPERATURE` - `PRIME_COMMITMENT_OBSERVER_MAX_TOKENS` Without an explicit API key, the observer uses Prime Agent's configured credentials. ## manual control `/threads` lists the ledger. Manual mutations stay in the extension command surface: ```text /threads done /threads dismiss [reason] /threads reopen /threads drop /threads edit /threads reconcile ``` The foreground model is not given thread ids and has no `threads` skill. ## development ```bash npm test npm run check ```