skyfallsin/pi-bot

★ 0Forks 0JavaScriptGitHub ↗Compare

README

pi-bot

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.

Current vertical slice

  • Atomic, cross-process goal store (.pi/goals/state.json by default; override with PI_GOALS_STORE).
  • Nested goals with stable id, parentId, and rootId lineage.
  • Statuses: draft, active, paused, blocked, review-ready, accepted, interrupted.
  • Evidence is durable and accepted goals 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, and PI_PARENT_CONTEXT_WINDOW_ID.
  • Optional Herdr materializer: bin/goal-herdr-delegate.mjs creates a child goal, a persistent Herdr pane, and a Pi child context, then writes the pane binding back to the goal.

Execution bindings

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.

Test

npm test

Contributors

skyfallsin

Issues