@nicknisi/pi-adr0.3.0
Injects the repo's ADR index (docs/decisions/) into the system prompt as a steering veto list
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@nicknisi/pi-adr
Injects the repo's ADR index (docs/decisions/) into the system prompt as a steering veto list, so the agent knows which directions are already settled before it proposes anything.
What it adds
before_agent_starthook — walks up from cwd to the nearest ancestor withdocs/decisions/and puts a framing sentence plus the sorted filename list in adecision_recordssystem prompt section (event.systemPromptOptions.sections), so pi records a small transcript delta instead of replacing the whole prompt and prompt caching keeps working. Filenames only (~10 tokens per ADR); full files are read on demand by the agent. Recomputed per prompt, so it's never stale. No-ops when nodocs/decisions/exists.
No slash commands, tools, keybindings, widgets, or config.
Pairs with a user-level prompt template (~/.pi/agent/prompts/adr.md, not part of this package) that writes the next numbered ADR from the current conversation on /adr.
Conventions
- ADRs are
NNNN-kebab-title.mddirectly indocs/decisions/. The filename is the veto — make titles descriptive ("no package service primitive", not "refactor approach"). - Superseded ADRs move to
docs/decisions/superseded/, which drops them out of the injected list (the readdir is non-recursive; no status parsing). - Template files (
0000-*) are excluded.
Install
pi install npm:@nicknisi/pi-adr
Dependencies
Peer dep on @earendil-works/pi-coding-agent (provided by the pi runtime). No runtime dependencies.