- TypeScript 63.7%
- JavaScript 15.5%
- Shell 14.2%
- Python 6.4%
- PowerShell 0.2%
Adds explicit references to [[three-correction-rule]] at four points where session-rot is most likely: - Step 3's "code change" bullets: third failed fix on the same symptom now points to the rule by name instead of just "your signal to stop." - New subsection "Watch for session-rot triggers" added in Step 3, enumerating the five triggers and the suspend/externalize/restart procedure so the executor self-monitors during execution rather than only on test failures. - "When to Stop and Ask for Help" bullet updated similarly — apply the rule before escalating. - Integration section: three-correction-rule listed alongside the other workflow companions. Effect: when route-by-skill loads executing-from-todos, the rule is present in pi's context window from session start. Pi can self-trigger the procedure on a fired heuristic without needing an explicit operator invocation. Self-monitoring on local 35B is imperfect, but better-than-nothing — and explicit invocation by the operator remains the reliable fallback. |
||
|---|---|---|
| agents | ||
| bin | ||
| docs | ||
| extensions | ||
| intercepted-commands | ||
| plumbing-commands | ||
| scripts | ||
| skills | ||
| tests | ||
| vendor | ||
| .gitignore | ||
| AGENTS.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| THIRDPARTY.md | ||
| tsconfig.json | ||
pi-stuff
Personal Pi Coding Agent extensions and skills, tuned for working with local
LLMs. Forked and curated from
mitsuhiko/agent-stuff with a
heavier todos.ts that mirrors beads' epic-and-dependencies workflow.
Layout
extensions/ Pi extensions (TS, run by the agent process)
todos.ts Extended fork: parent + depends_on + tree action
multi-edit.ts Batch edits + Codex patch + preflight (Armin)
goal.ts Persistent objective across compaction (Armin)
prompt-editor.ts Per-mode model/thinking selector (Armin)
loop.ts Self-driving prompt loop (Armin)
review.ts Code-review command (Armin)
notify.ts Native desktop notifications (Armin)
answer.ts Q&A TUI (Armin)
session-breakdown.ts Time/cost analysis (Armin)
skills/ SKILL.md skills loaded by Pi
intercepted-commands/ Shims that route pip/python through uv
plumbing-commands/ make-release wizard
vendor/ Upstream license text
The interesting bit: extended todos.ts
Upstream todos.ts gives you a file-per-todo Kanban with claim/release. This fork adds the two parts of beads I actually missed:
| Field | What it does |
|---|---|
parent |
Single-parent tree. An "epic" is just a todo with at least one child. |
depends_on |
Cross-cutting blocker DAG. A todo is ready only when every dep is closed. |
New tool surface (the model sees these):
action: "tree"— flat parent-first listing with adepthfield per item.filter: "ready" | "blocked" | "epics" | "roots"— works onlist,list-all,tree.parent: "TODO-<hex>" | ""— set/detach parent (cycle-checked).depends_on: ["TODO-<hex>", ...]— set blockers (cycle-checked).
The agent-facing JSON for each todo gains derived fields:
{
"id": "TODO-deadbeef",
"status": "open",
"ready": false,
"blocked_by": ["TODO-aaaaaaaa"],
"is_epic": true,
"epic_progress": "1/3",
"parent": "TODO-cccccccc",
"depends_on": ["TODO-aaaaaaaa"]
}
What's enforced
- A todo can't be its own parent; parent chains can't cycle (max depth 32).
- A todo can't depend on itself; dep graph can't cycle.
- Closing a todo with open children is rejected — close the kids first or
detach them with
parent: "". Same guard runs on the TUI close action. parentanddepends_onids must exist when set.
What's deliberately NOT here
- No priorities — pull-based queues use ready/blocked as the priority signal.
- No multi-parent — tree, not DAG. Cross-cutting links go in
depends_on. - No audit log —
.pi/todos/is a git directory;git logis the audit. - No new TUI affordances yet — the model uses tool calls, the human can still
navigate with
/todos. Tree-rendering in the TUI can come later.
Local-LLM rationale
Each piece earns its spot because it helps when the model is small:
todos.ts+goal.ts— externalize state to disk; small contexts can't hold long task lists.multi-edit.ts— preflight validation catches the failures a smaller model makes more often.prompt-editor.ts— dispatch different tasks to different local models (planner vs coder).- Skills are prescriptive checklists, which small models follow better than open-ended instructions.
Companion extensions
pi-hermes-memory (chandra447/pi-hermes-memory)
Substantial separate extension (SQLite-backed persistent memory + session search + secret scanning). Not vendored here — it's ~250 KB of source with 368 tests and its own release cadence. Install peer-style instead:
pi install npm:pi-hermes-memory
Note on package scope: earendil-works/pi-mono is the current home of Pi.
Everything in this repo imports from @earendil-works/pi-coding-agent.
pi-hermes-memory still imports from the older @mariozechner/pi-coding-agent
scope. Both packages are published by Mario Zechner from the same codebase
(the GitHub org moved from badlogic to earendil-works) and recent
versions were released the same day, so they're API-compatible — but you'll
likely want to fork pi-hermes-memory and run
sed -i 's/@mariozechner/@earendil-works/g' across its src/ to align it
with the current Pi scope. Until upstream migrates, the unmodified package
may load but won't pick up newer earendil-works features.
For local-LLM use specifically, the memory + session-search angle is high value: small models forget aggressively, so an externalized retrieval layer substantially extends effective context. Less sure about the auto-learn loop — that adds tokens to every Nth turn, and the "what's worth saving" judgment is exactly the kind of thing small models do poorly. Consider starting with the memory + search tools and disabling the auto-review until you've seen it work.
Watch-outs
extensions/loop.tsreferencesclaude-haiku-4-5for its breakout-condition summary. For a strictly local setup, swap the model id in that file.- This repo's extensions and
pi-hermes-memoryuse different package scopes (see above). Coexistence should work, but if not, fork and rename imports.
Install
cd ~/devel/pi-stuff
npm install
# point Pi at the directory or publish under a private name
Then either symlink each subdir into your Pi config, or add this repo as a local Pi package (see Pi docs).
Attribution
See THIRDPARTY.md. Upstream license preserved in
vendor/mitsupi-LICENSE.