From aa550ff174f949259caea6c6cff557d2979abf9a Mon Sep 17 00:00:00 2001 From: Artiom Bell Date: Fri, 13 Mar 2026 22:25:39 -0700 Subject: [PATCH 1/3] Externalize pi-backtask as plugin submodule --- .gitmodules | 3 +++ README.md | 57 +++++++++++++++++++++++++++++++++++++++++++-- justfile | 17 +++++++++++--- plugins/pi-backtask | 1 + 4 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 plugins/pi-backtask diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7c81923 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugins/pi-backtask"] + path = plugins/pi-backtask + url = https://github.com/artiombell/pi-backtask.git diff --git a/README.md b/README.md index 383a0e2..6424656 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ bun install | **tool-counter-widget** | `extensions/tool-counter-widget.ts` | Live-updating above-editor widget showing per-tool call counts with background colors | | **subagent-widget** | `extensions/subagent-widget.ts` | `/sub ` command that spawns background Pi subagents; each gets its own streaming live-progress widget | | **tilldone** | `extensions/tilldone.ts` | Task discipline system — define tasks before starting work; tracks completion state across steps; shows persistent task list in footer with live progress | +| **pi-backtask** | `plugins/pi-backtask/pi-backtask.ts`| External plugin submodule from [`artiombell/pi-backtask`](https://github.com/artiombell/pi-backtask). Claude Code style task list + background jobs (`Ctrl+T`, `Ctrl+B`, `/task`, `/bg`). | | **agent-team** | `extensions/agent-team.ts` | Dispatcher-only orchestrator: the primary agent delegates all work to named specialist agents via `dispatch_agent`; shows a grid dashboard | | **system-select** | `extensions/system-select.ts` | `/system` command to interactively switch between agent personas/system prompts from `.pi/agents/`, `.claude/agents/`, `.gemini/agents/`, `.codex/agents/` | | **damage-control** | `extensions/damage-control.ts` | Real-time safety auditing — intercepts dangerous bash patterns and enforces path-based access controls from `.pi/damage-control-rules.yaml` | @@ -135,10 +136,12 @@ just ext-agent-chain # Sequential pipeline orchestrator with step chainin just ext-pi-pi # Meta-agent that builds Pi agents using parallel experts just ext-session-replay # Scrollable timeline overlay of session history just ext-theme-cycler # Theme cycler + minimal footer +just ext-pi-backtask # Task list + background jobs (Ctrl+T/Ctrl+B) just all # Open every extension in its own terminal window ``` -The `open` recipe allows you to spin up a new terminal window with any combination of stacked extensions (omit `.ts`): +The `open` recipe allows you to spin up a new terminal window with stacked extensions. +Pass bare extension names (omit `.ts`) or explicit `.ts` paths. ```bash just open purpose-gate minimal tool-counter-widget @@ -146,11 +149,61 @@ just open purpose-gate minimal tool-counter-widget --- +### External source (`pi-backtask`) + +`pi-backtask` is maintained as a standalone plugin repo and vendored here as a git submodule under `plugins/pi-backtask`. + +When cloning this repository, initialize submodules before launching that extension: + +```bash +git submodule update --init --recursive +``` + + +### Backtask quickstart (`pi-backtask`) + +`pi-backtask` mirrors Claude Code style task tracking and background jobs inside Pi. + +Optional: share task lists across terminal sessions by setting an explicit list id: + +```bash +export PI_BACKTASK_LIST_ID=my-project +``` + +Launch it: + +```bash +just ext-pi-backtask +``` + +Core commands: + +```bash +/task add Investigate flaky training metrics +/task start 1 +/task done 1 +/task list + +/bg run "pytest tests/unit/test_metrics.py -q" +/bg agent "Review this file and propose refactor steps" +/bg list +/bg kill 2 +``` + +Keyboard shortcuts: +- `Ctrl+T` toggle task-list footer +- `Ctrl+B` toggle background-task widget + +--- + + ## Project Structure ``` pi-vs-cc/ -├── extensions/ # Pi extension source files (.ts) — one file per extension +├── extensions/ # Pi extension source files (.ts) for this playground +├── plugins/ # External extension/plugin submodules +│ └── pi-backtask/ # Standalone plugin from github.com/artiombell/pi-backtask ├── specs/ # Feature specifications for extensions ├── .pi/ │ ├── agent-sessions/ # Ephemeral session files (gitignored) diff --git a/justfile b/justfile index 2d69dfe..36aeb8a 100644 --- a/justfile +++ b/justfile @@ -75,14 +75,24 @@ ext-session-replay: ext-theme-cycler: pi -e extensions/theme-cycler.ts -e extensions/minimal.ts +# 17. Pi backtask: background task runner + persistent task list (Ctrl+B/Ctrl+T) +ext-pi-backtask: + pi -e plugins/pi-backtask/pi-backtask.ts -e extensions/theme-cycler.ts + + # utils -# Open pi with one or more stacked extensions in a new terminal: just open minimal tool-counter +# Open pi with one or more stacked extensions in a new terminal. +# Accepts extension names (e.g. minimal) or explicit .ts paths (e.g. plugins/pi-backtask/pi-backtask.ts). open +exts: #!/usr/bin/env bash args="" for ext in {{exts}}; do - args="$args -e extensions/$ext.ts" + if [[ "$ext" == */* || "$ext" == *.ts ]]; then + args="$args -e $ext" + else + args="$args -e extensions/$ext.ts" + fi done cmd="cd '{{justfile_directory()}}' && pi$args" escaped="${cmd//\\/\\\\}" @@ -104,4 +114,5 @@ all: just open system-select minimal theme-cycler just open damage-control minimal theme-cycler just open agent-chain theme-cycler - just open pi-pi theme-cycler \ No newline at end of file + just open pi-pi theme-cycler + just open plugins/pi-backtask/pi-backtask.ts theme-cycler \ No newline at end of file diff --git a/plugins/pi-backtask b/plugins/pi-backtask new file mode 160000 index 0000000..e8933ef --- /dev/null +++ b/plugins/pi-backtask @@ -0,0 +1 @@ +Subproject commit e8933ef11609b44ab7da65bf38ad3ead65db0909 From 9003dcfb33779c1cec23a0ee4012a6e313424bff Mon Sep 17 00:00:00 2001 From: Artiom Bell Date: Fri, 13 Mar 2026 22:52:51 -0700 Subject: [PATCH 2/3] Adopt gob-backed pi-backtask plugin update --- README.md | 12 +++++++++++- plugins/pi-backtask | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6424656..7a42831 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ bun install | **tool-counter-widget** | `extensions/tool-counter-widget.ts` | Live-updating above-editor widget showing per-tool call counts with background colors | | **subagent-widget** | `extensions/subagent-widget.ts` | `/sub ` command that spawns background Pi subagents; each gets its own streaming live-progress widget | | **tilldone** | `extensions/tilldone.ts` | Task discipline system — define tasks before starting work; tracks completion state across steps; shows persistent task list in footer with live progress | -| **pi-backtask** | `plugins/pi-backtask/pi-backtask.ts`| External plugin submodule from [`artiombell/pi-backtask`](https://github.com/artiombell/pi-backtask). Claude Code style task list + background jobs (`Ctrl+T`, `Ctrl+B`, `/task`, `/bg`). | +| **pi-backtask** | `plugins/pi-backtask/pi-backtask.ts`| External plugin submodule from [`artiombell/pi-backtask`](https://github.com/artiombell/pi-backtask). Uses `gob` as backend for `/bg` commands; non-intrusive (no fullscreen takeover). | | **agent-team** | `extensions/agent-team.ts` | Dispatcher-only orchestrator: the primary agent delegates all work to named specialist agents via `dispatch_agent`; shows a grid dashboard | | **system-select** | `extensions/system-select.ts` | `/system` command to interactively switch between agent personas/system prompts from `.pi/agents/`, `.claude/agents/`, `.gemini/agents/`, `.codex/agents/` | | **damage-control** | `extensions/damage-control.ts` | Real-time safety auditing — intercepts dangerous bash patterns and enforces path-based access controls from `.pi/damage-control-rules.yaml` | @@ -164,6 +164,16 @@ git submodule update --init --recursive `pi-backtask` mirrors Claude Code style task tracking and background jobs inside Pi. +Dependency for background jobs: + +```bash +brew tap juanibiapina/taps +brew install gob +``` + +`pi-backtask` uses `gob add/list/stop/stdout` under the hood and does not launch `gob tui`. + + Optional: share task lists across terminal sessions by setting an explicit list id: ```bash diff --git a/plugins/pi-backtask b/plugins/pi-backtask index e8933ef..f530c6c 160000 --- a/plugins/pi-backtask +++ b/plugins/pi-backtask @@ -1 +1 @@ -Subproject commit e8933ef11609b44ab7da65bf38ad3ead65db0909 +Subproject commit f530c6cb4d0b88082507a778b9498705119ac154 From b0498c77de44e903d18ac8582fea22f2698295b9 Mon Sep 17 00:00:00 2001 From: Artiom Bell Date: Fri, 13 Mar 2026 23:09:18 -0700 Subject: [PATCH 3/3] Expand backtask docs and examples --- README.md | 25 ++++++++++++++++++++++--- plugins/pi-backtask | 2 +- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7a42831..8609252 100644 --- a/README.md +++ b/README.md @@ -171,8 +171,7 @@ brew tap juanibiapina/taps brew install gob ``` -`pi-backtask` uses `gob add/list/stop/stdout` under the hood and does not launch `gob tui`. - +`pi-backtask` uses `gob add/list/stop/stdout` under the hood and does not launch `gob tui` (non-fullscreen integration). Optional: share task lists across terminal sessions by setting an explicit list id: @@ -186,18 +185,38 @@ Launch it: just ext-pi-backtask ``` -Core commands: +Command reference: ```bash +# Task list /task add Investigate flaky training metrics /task start 1 /task done 1 +/task pending 1 /task list +# Background execution /bg run "pytest tests/unit/test_metrics.py -q" /bg agent "Review this file and propose refactor steps" /bg list /bg kill 2 +/bg clear +``` + +Workflow examples: + +```bash +# Example: run tests in background while continuing chat +/task add Validate feature branch before merge +/task start 1 +/bg run "pytest tests/unit/test_metrics.py -q" +/bg list + +# Example: delegate analysis to background agent +/task add Audit websocket reconnection behavior +/task start 2 +/bg agent "Audit websocket reconnection path and list concrete failure modes" +/bg list ``` Keyboard shortcuts: diff --git a/plugins/pi-backtask b/plugins/pi-backtask index f530c6c..eb27442 160000 --- a/plugins/pi-backtask +++ b/plugins/pi-backtask @@ -1 +1 @@ -Subproject commit f530c6cb4d0b88082507a778b9498705119ac154 +Subproject commit eb27442b766c63834cbc1b14df9bff621d922c42