No description
  • TypeScript 63.7%
  • JavaScript 15.5%
  • Shell 14.2%
  • Python 6.4%
  • PowerShell 0.2%
Find a file
Carl-Friedrich Braun 29e7f8f9f0 feat(executing-from-todos): wire three-correction-rule into the execution loop
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.
2026-05-27 09:02:58 +02:00
agents feat: merge user agent dir; migrate workflow from beads to todos 2026-05-15 14:00:19 +02:00
bin feat: merge user agent dir; migrate workflow from beads to todos 2026-05-15 14:00:19 +02:00
docs docs(plans): firmware-kb v2 implementation plan 2026-05-22 10:48:22 +02:00
extensions fix(omlx-models): align active model with server default after registry refresh 2026-05-22 09:20:52 +02:00
intercepted-commands chore: scaffold pi-stuff with curated extensions and extended todos 2026-05-15 13:43:11 +02:00
plumbing-commands chore: scaffold pi-stuff with curated extensions and extended todos 2026-05-15 13:43:11 +02:00
scripts chore(scripts): add idempotent skills restructure helper 2026-05-19 17:05:27 +02:00
skills feat(executing-from-todos): wire three-correction-rule into the execution loop 2026-05-27 09:02:58 +02:00
tests feat(todos): allow dots in slug ids (beads dotted sub-ids) 2026-05-18 12:27:49 +02:00
vendor chore: scaffold pi-stuff with curated extensions and extended todos 2026-05-15 13:43:11 +02:00
.gitignore chore: ignore Python pycache artifacts 2026-05-27 08:45:47 +02:00
AGENTS.md docs(agents): inline skill guidance, drop using-skills loader 2026-05-19 17:04:44 +02:00
LICENSE chore: scaffold pi-stuff with curated extensions and extended todos 2026-05-15 13:43:11 +02:00
package-lock.json fix(extensions): rewrite omlx overflow errors to trigger pi's overflow path 2026-05-16 13:46:00 +02:00
package.json fix(extensions): rewrite omlx overflow errors to trigger pi's overflow path 2026-05-16 13:46:00 +02:00
README.md feat(todos): TUI tree view, blocked/ready badges, filter cycle 2026-05-15 13:46:40 +02:00
THIRDPARTY.md chore(skills): vendor apple-mail from upstream 2026-05-16 12:41:19 +02:00
tsconfig.json chore: scaffold pi-stuff with curated extensions and extended todos 2026-05-15 13:43:11 +02:00

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 a depth field per item.
  • filter: "ready" | "blocked" | "epics" | "roots" — works on list, 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.
  • parent and depends_on ids 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 log is 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.ts references claude-haiku-4-5 for its breakout-condition summary. For a strictly local setup, swap the model id in that file.
  • This repo's extensions and pi-hermes-memory use 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.