Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "plugins/pi-backtask"]
path = plugins/pi-backtask
url = https://github.com/artiombell/pi-backtask.git
86 changes: 84 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <task>` 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). 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` |
Expand Down Expand Up @@ -135,22 +136,103 @@ 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
```

---

### 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.

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` (non-fullscreen integration).

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
```

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:
- `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)
Expand Down
17 changes: 14 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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//\\/\\\\}"
Expand All @@ -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
just open pi-pi theme-cycler
just open plugins/pi-backtask/pi-backtask.ts theme-cycler
1 change: 1 addition & 0 deletions plugins/pi-backtask
Submodule pi-backtask added at eb2744