Dependency-aware task management extension for Pi Coding Agent.
This extension provides:
- A persistent task store under
~/.pi/tasks/<list-id>/ - Bidirectional dependency links (
blockedByandblocks) - Dependency-aware status transitions (blocked tasks cannot move to
in_progressorcompleted) - A live task widget in the Pi UI
- A
/list-taskscommand for markdown task overviews - A
/clear-taskscommand to remove all tasks in the active list
Create a task.
Required fields:
subject(string, non-empty)addBlockedBy(string array, can be[])
Optional fields:
description(string, defaults to"")activeForm(string, defaults tosubject)metadata(object, defaults to{})
Example:
{
"subject": "Implement auth middleware",
"description": "Add JWT verification and role checks",
"activeForm": "Implementing auth middleware",
"addBlockedBy": ["2"],
"metadata": { "priority": "high", "component": "api" }
}Update task status, assignment, text fields, and dependencies.
Required field:
taskId(string, non-empty)
Optional fields:
status(pending|in_progress|completed)owner(string; empty string clears owner)subject(string, non-empty)description(string)activeForm(string)addBlockedBy(string array; appended and deduplicated)addBlocks(string array; appended and deduplicated)
Notes:
- Dependencies are validated; missing task IDs cause errors.
- Reciprocal links are maintained automatically.
Get one task with formatted details.
Input:
{
"taskId": "3"
}Return all tasks as structured data (in details.tasks) with computed isBlocked.
Input:
{}Return tasks that are ready to execute in parallel now.
Inclusion rule:
statusispendingisBlockedisfalse(all dependencies completed)
Input:
{}Delete all tasks in the current list.
Input:
{}Displays a markdown summary of all tasks, including:
- Status symbol (
✓,■,□,⚠) - Owner (if present)
- Blocked-by dependency labels
- Aggregated counts for done / in-progress / open
Deletes all tasks in the active list and refreshes the widget immediately.
- On session start, the extension resolves the active list ID from:
PI_TASK_LIST_IDenvironment variable (if set)- Previously persisted session entry
- A generated UUID
- The resolved list ID is persisted in session state (
pi-taskgraph-state) and used for subsequent tool calls. - Task JSON files are stored at
~/.pi/tasks/<list-id>/<task-id>.json.
From local dev:
pi install ./
pi remove ./Use this repo directly as an extension entrypoint:
pi --extension "$(pwd)/extensions/index.ts"- Node.js 18+
- npm
npm installnpx tsc --noEmitRun all tests:
npm testRun in watch mode:
npx vitestRun one test file:
npx vitest src/task-store.core.test.ts- Create a dependency task with
task_create. - Create a second task with
task_create. - Add dependency with
task_update+addBlockedBy. - Try setting blocked task to
in_progress(should fail). - Mark dependency task
completed. - Set blocked task to
in_progress(should succeed). - Call
task_listandget_batch_of_tasksto verifyisBlockedand parallel-ready results. - Run
/list-tasksto verify markdown output and counts.