pi-todotools

June 9, 2026 · View on GitHub

ci license: MIT

Structured todo tools for the pi coding agent. The extension registers todowrite and todoread, persists todo state in the session, renders a sidebar widget, and appends workflow-first prompt guidance.

This package is the standalone extraction of senpi-mono's former builtin todotools extension.

Behavior

CaseResult
Agent calls todowritereplaces the complete todo list, persists it as sanepi.todo-state, and refreshes the todo sidebar
Agent calls todoreadreturns the current todo list as JSON
Session reloads or tree navigation changesreconstructs the latest branch-local todo state from custom entries or historical todowrite results
All todos are completed or cancelledhides the sidebar

Tools

todowrite

Creates or replaces the structured task list. Each call must pass the full list.

{
  "todos": [
    {
      "content": "src/utils/validation.ts: Add validateEmail() for input sanitization - expect boolean result",
      "status": "in_progress",
      "priority": "high"
    },
    {
      "content": "validation.test.ts: Add invalid-email regression test - expect foo to fail",
      "status": "pending",
      "priority": "medium"
    }
  ]
}

todoread

Reads the current todo list for the active coding session.

{}

Installation

The package targets the pi coding agent. Pi loads extensions from ~/.pi/agent/extensions/, project .pi/extensions/, or via the --extension / -e CLI flag.

# 1. From npm (once published)
pi install npm:pi-todotools

# 2. From git
pi install git:github.com/code-yeongyu/pi-todotools

# 3. Manual placement
git clone https://github.com/code-yeongyu/pi-todotools ~/.pi/agent/extensions/pi-todotools
cd ~/.pi/agent/extensions/pi-todotools && npm install

# 4. Dev / one-shot test
pi -e /path/to/pi-todotools/src/index.ts

After installation, restart pi or run /reload inside an interactive session.

Development

npm install
npm test
npm run typecheck
npm run check
npm pack --dry-run
pi -e ./src/index.ts

Branch rules and releases

  • main is protected by .github/branch-ruleset.json.
  • CI runs Node 20 and 22 on Ubuntu and macOS.
  • Releases are GitHub Releases tagged as v<semver>.
  • Publishing runs from the publish workflow after a GitHub Release is published.

Origin

Extracted from packages/coding-agent/src/core/extensions/builtin/todotools in code-yeongyu/senpi-mono.

License

MIT.

  • senpi — the fork/runtime these extensions are extracted from.
  • Ultraworkers Discord — community link from the senpi README.
  • Dori — the product powered by senpi under the hood.

Acknowledgements

  • Mario Zechner (@badlogic) — author of pi-mono and the pi-coding-agent extension API this package targets.
  • Yeongyu Kim (@code-yeongyu) — maintainer of the senpi fork and this extracted extension.