@smayan-kulkarni/pi-decision-graph
v0.84.1
Published
Temporal decision graph: captures the agent's decisions, why, and file changes into a project-local store.
Readme
pi-decision-graph
Records the agent's decisions — what it did, why, and which files it touched — into a
project-local SQLite store (.pi/decision-graph.db), so later sessions can query the history
instead of re-deriving it.
Install
pi install npm:@smayan-kulkarni/pi-decision-graphWhat it does
- Captures every assistant Decision (message + tool calls) as it happens, no extra model calls.
- Registers
record_decision_why, so the agent can record its own rationale in its own words. - Once the store has Decisions, registers
query_decisions, letting the agent ask "why did this file/line change?" and get the answer from history instead of re-reading diffs. - Nudges the agent to consult the graph after compaction, when raw context is gone but the store isn't.
Requires Node ≥22.19 (for node:sqlite) — already satisfied by any Pi install.
No configuration needed. The store lives at .pi/decision-graph.db in the project.
