$ cat ~/map/inception.md
inception
A curator LLM replaces pi's compaction, rewriting old history every few turns to keep the context dense.
extensions✓ Oct 23
Facts
- repository
- github.com/pxp888/inception ↗
- GitHub Stars
- ★ 0
- Forks
- 0
- license
- —
- npm / mo
- —
- last push
- Oct 23, 2026
install
pi --extension /path/to/inception/.pi/extensions/inception/index.ts## TL;DR
An extension that replaces pi's compaction with a Context Gardener: every N turns a curator model rewrites the history older than a protected head into a compact factual replacement, keeping the newest turns verbatim.
## Key points
- $Scheduled curation runs on turn_end: when the frequency is reached and history exists outside the protected head, the curator model is called and a compaction entry is committed from the turn boundary, so in-flight runs stay alive.
- $Flags: --inception-frequency (default 3; each model call counts as a turn), --inception-protected-head (default 5 newest turns left untouched), and --inception-model to pick a cheaper curator as provider/modelId.
- $pi's own threshold and overflow compactions and /compact are intercepted via session_before_compact and curated the same way; if curation fails or returns nothing, pi's default routine runs instead.
- $The curator sees the newest turns read-only, never performs the objective, and never writes code; its prompt prioritizes the objective, implementation state, discoveries, decisions, and open questions.
- $Each pass is iterative — the previous curated state is the input, so discoveries survive repeated compactions.
- $Curator calls disable prompt-cache writes and use a fresh session id (one-off prompts).
- $The protected head is a soft guarantee: under hard context pressure it may yield, because letting pi's default cut run beats overflowing.
- $Install by copying both index.ts and boundary.ts into .pi/extensions/inception/ — one location per machine, or pi rejects the duplicate --inception-* flags; tests run under plain node with node --test.
## FAQ
Q Does the curator see my newest conversation?
Read-only, yes: the newest turns (the protected head, five by default) stay verbatim in context and are shown to the curator so it can judge what old state they still need, but they are outside its editing scope.
Q What happens if the curator model fails?
If curation fails or returns nothing, pi's default compaction routine runs instead.
## References
- README (curator prompt, install, flags, how it works) ↗
- Initial test results (linked from the README) ↗
## Related entries
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ motus
Redacts exact secret values from pi tool output, blocks the commands and files that print them, and fails closed.
$ Pi Taste
Local preference-learning extension that distills accepted and rejected turns into one readable taste.md.
## Guides
Last updated: Oct 23, 2026