Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

pi × monition — trigger-shaped memory without Claude in the stack

Hackathon build (2026-08-13): porting monition — a trigger-shaped takeaway store that injects hard-won lessons into an agent's context only when the situation matches — from Claude Code onto the pi coding harness, running an open-weight model (Kimi K3 via OpenRouter). No Anthropic calls in the runtime conversation path.

Why this beats a "default" memory system

Always-on memory files (MEMORY.md) pay their token cost every turn; RAG-style recall injects anything semantically near the prompt. Monition rows are trigger-shaped: each row owns what fires when (lexical phrases, semantic threshold, or deterministic tool-call predicates), and a scoring gate learns from helpful/noise ratings. The demo shows both sides:

  1. Fires: "Summarize this paper: https://arxiv.org/pdf/…" → the arXiv row lands in context → the model fetches /abs/ instead of confabulating over PDF binary.
  2. Fires on a silent failure: "Set up a pre-commit hook" in fixture-repo/ (which has core.hooksPath set) → without the row the model writes .git/hooks/pre-commit, claims success, and the hook never runs. With the row it checks core.hooksPath first.
  3. Stays silent: "Which PDF library should I use for invoices?" — semantically adjacent (scores 0.61 against the arXiv row), but below the row's 0.70 threshold. A naive RAG recall would have injected it.
  4. (Stretch) Fires on a tool call, not the prompt: a tool_call-triggered row guards git push — something prompt-similarity memory structurally cannot do, delivered via pi's tool_call extension event.

How it works

you type into pi
   └─ .pi/extensions/monition.ts        (pi `input` event)
        └─ monition prompt-hook          (same executor Claude Code's hook runs)
             └─ synthetic SQLite store   (monition/store.db, 4 demo rows)
        └─ {action: "transform", text: prompt + fired takeaways}
   └─ Kimi K3 via OpenRouter answers with the takeaway in context

The extension is ~80 lines and fail-open: if monition errors or stays silent, the prompt passes through untouched. Debug log: /tmp/pi-monition-bridge.log; /monition inside pi shows bridge status.

Fixture repo

fixture-repo/ ships without its .git (nested repos don't clone). Run ./scripts/setup-fixture.sh once after cloning to init it with core.hooksPath=.githooks — that misconfiguration is the demo.

Run it

npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pipx install monition            # or: pip install monition
cd pi-monition-demo && pi        # /login → OpenRouter; /model → Kimi K3

The extension pins MONITION_STORE to this repo's store, so a machine-wide monition install won't leak into (or get polluted by) the demo.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages