Portable, durable goal semantics for Pi workers. It owns goal relationships, completion contracts, review state, evidence, and context-window (CW) lineage. It does not require Herdr, tmux, a terminal, or /tmp.
- Atomic, cross-process goal store (
.pi/goals/state.jsonby default; override withPI_GOALS_STORE). - Nested goals with stable
id,parentId, androotIdlineage. - Statuses:
draft,active,paused,blocked,review-ready,accepted,interrupted. - Evidence is durable and
acceptedgoals cannot be silently reopened. - Pi widget and commands:
/goal-create,/goal-child,/goal-status,/goal-review, and/goal-accept. - A worker receives its binding through
PI_GOAL_ID,PI_CONTEXT_WINDOW_ID, andPI_PARENT_CONTEXT_WINDOW_ID. - Optional Herdr materializer:
bin/goal-herdr-delegate.mjscreates a child goal, a persistent Herdr pane, and a Pi child context, then writes the pane binding back to the goal.
The store treats execution locations as optional bindings. An adapter may attach its own opaque location metadata plus the child context-window ID:
{
"kind": "adapter-defined",
"location": { "id": "opaque-worker-location" },
"childContextWindowId": "cw_..."
}A child context receives a bounded parent handoff, an explicit tool policy, and a distinct session identity. It streams lifecycle state and completion evidence through its adapter, while only a reviewed summary is handed back to the parent context. The portable engine does not require any particular execution surface or transport.
npm test