pure-point-guard 0.1.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,56 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-02-25
9
+
10
+ ### Added
11
+
12
+ - **Global prompts, templates, and swarms** — `~/.ppg/` directory for cross-project reuse; project-local always takes precedence
13
+ - **Cron scheduling** — `ppg cron start/stop/list/status` for recurring agent tasks via `.ppg/schedules.yaml`
14
+ - **`ppg prompt` command** — sugar for `ppg spawn --prompt-file .ppg/prompts/<name>.md`
15
+ - **`ppg list prompts`** — list available prompt files with variables and source (local/global)
16
+ - **Schedules dashboard tab** — manage cron schedules with YAML editor, daemon start/stop, and new schedule dialog
17
+ - **Global entries in dashboard** — Prompts and Swarms views show `~/.ppg/` entries marked as "Global"
18
+
19
+ ### Changed
20
+
21
+ - **Config directory renamed** — `.pg/` → `.ppg/` to match the CLI name
22
+ - **Internal symbols renamed** — `PgError` → `PpgError`, `pgDir()` → `ppgDir()`
23
+
24
+ ## [0.2.0] - 2026-02-25
25
+
26
+ ### Added
27
+
28
+ - **Command palette for pane creation** — Cmd+N spawns new agents via variant selection and command palette (#30)
29
+ - **Agent variants** — multi-agent support with configurable agent types (#30)
30
+ - **Tabbed Settings UI** with AppSettingsManager (#28)
31
+ - **2x3 grid layout** — pane grid constraints with improved split/close logic
32
+ - **Single-pane hover overlay** — quick access controls when hovering over a solo pane
33
+ - **`pr` and `reset` commands** — self-awareness module and enhanced cleanup
34
+ - **Worktree name normalization** for `--name` values (#29)
35
+
36
+ ### Performance
37
+
38
+ - **FSEvents file watching** replaces polling for manifest updates — dramatically reduces CPU usage (#21)
39
+ - **Incremental sidebar tree updates** instead of full rebuild on every change (#22)
40
+ - **Optimized threading** — reduced main-thread contention in dashboard (#23)
41
+ - **Optimized terminal rendering and memory** for multi-agent views (#24)
42
+ - **Fixed stale sidebar data** when contentSignature is unchanged (#27)
43
+
44
+ ### Fixed
45
+
46
+ - tmux `send-keys` not submitting Enter to Claude Code agents (#25)
47
+ - `spawn`/`restart` opening unwanted Terminal.app windows (#26)
48
+ - tmux not found in dashboard TerminalPane and Terminal.app on M-series Macs
49
+ - Single-pane hover overlay close button now correctly kills agent
50
+
51
+ ### Changed
52
+
53
+ - Reduced sidebar status circles and indentation for cleaner look
54
+ - Shrunk terminal icon to match agent circle size
55
+ - Filtered worktree variant from pane command palette
56
+ - Removed agent command setting and General tab from Settings
57
+
8
58
  ## [0.1.1] - 2026-02-24
9
59
 
10
60
  ### Fixed
@@ -31,5 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
81
  - Status detection via signal-stack: result file, pane existence, pane liveness, current command
32
82
  - Native macOS dashboard app (`ppg ui`)
33
83
 
84
+ [0.3.0]: https://github.com/2witstudios/ppg-cli/releases/tag/v0.3.0
85
+ [0.2.0]: https://github.com/2witstudios/ppg-cli/releases/tag/v0.2.0
34
86
  [0.1.1]: https://github.com/2witstudios/ppg-cli/releases/tag/v0.1.1
35
87
  [0.1.0]: https://github.com/2witstudios/ppg-cli/releases/tag/v0.1.0
package/README.md CHANGED
@@ -4,92 +4,106 @@
4
4
  [![npm version](https://img.shields.io/npm/v/pure-point-guard.svg)](https://www.npmjs.com/package/pure-point-guard)
5
5
  [![license](https://img.shields.io/npm/l/pure-point-guard.svg)](https://github.com/2witstudios/ppg-cli/blob/main/LICENSE)
6
6
 
7
- Local orchestration runtime for parallel CLI coding agents.
7
+ A native macOS dashboard for orchestrating parallel AI coding agents.
8
8
 
9
- ppg spawns multiple AI coding agents in isolated git worktrees, each in its own tmux pane, and gives you a single control plane to monitor, aggregate, and merge their work.
9
+ Spawn, monitor, and merge multiple AI agents working in parallel each isolated in its own git worktree. Watch them all from a single window.
10
10
 
11
- ## Why
11
+ ![ppg dashboard](screenshot.png)
12
12
 
13
- When you have a large task — adding tests across a codebase, refactoring multiple modules, fixing a batch of issues — you can break it into independent units and run them in parallel. ppg handles the plumbing: worktree creation, agent spawning, tmux session management, status tracking, result collection, and branch merging.
13
+ ## Features
14
14
 
15
- It works with any CLI agent (Claude Code, Codex, custom scripts) and is designed to be driven by a human or by a "conductor" meta-agent.
15
+ **Multi-agent dashboard** See all your projects, worktrees, and agents in one place. Each agent gets a live terminal pane so you can watch it work in real time.
16
16
 
17
- ## Requirements
17
+ **Command palette** — Hit a key to spawn a new agent (Claude, Codex, OpenCode), open a terminal, or create a worktree. Type a prompt and it's running in seconds.
18
18
 
19
- - **Node.js** >= 20
20
- - **git** (with worktree support)
21
- - **tmux** (`brew install tmux`)
22
- - **macOS** (Terminal.app auto-open uses AppleScript; tmux features work anywhere)
19
+ **Agent-agnostic** — Works with Claude Code, Codex, OpenCode, or any CLI agent. Define custom agents in config.
23
20
 
24
- ## Install
21
+ **Git worktree isolation** — Every agent works in its own worktree on its own branch. No file conflicts, clean merges.
25
22
 
26
- ### CLI
23
+ **Prompts editor** — Write and manage reusable prompt templates with `{{VAR}}` substitution, right inside the app.
27
24
 
28
- ```bash
29
- npm install -g pure-point-guard
30
- ```
25
+ **Swarms** — Define multi-agent orchestrations in YAML. Choose shared or isolated strategies. Launch coordinated agent groups.
31
26
 
32
- ### Claude Code Integration
27
+ **Project overview** Home dashboard shows all your projects with commit heatmaps, recent commits, agent status, and worktree counts at a glance.
33
28
 
34
- Running `ppg init` in any project automatically installs the `/ppg` skill for Claude Code. This gives Claude the ability to orchestrate parallel agents — just type `/ppg` in any Claude Code session.
29
+ **Inline rename** Click any agent, terminal, or worktree name in the sidebar to rename it.
30
+
31
+ **Split panes** — Run multiple agents in the same worktree with split terminal views.
32
+
33
+ **Cron scheduling** — Define recurring agent tasks in `.ppg/schedules.yaml`. The daemon triggers swarms or prompts on cron expressions. Manage from the Schedules dashboard tab or `ppg cron` CLI.
34
+
35
+ **Global prompts & templates** — Put prompts, templates, and swarms in `~/.ppg/` to share them across all projects. Project-local always takes precedence.
36
+
37
+ **Customizable** — Appearance modes (light/dark/system), terminal font and size, keybinding customization, configurable shell.
38
+
39
+ ## Install
35
40
 
36
- ### Dashboard (optional)
41
+ ### Dashboard (macOS app)
37
42
 
38
- The native macOS dashboard app provides a visual interface for monitoring agents and worktrees.
43
+ The dashboard is the primary interface. Download from [GitHub Releases](https://github.com/2witstudios/ppg-cli/releases/latest) grab the `.dmg` file.
39
44
 
40
- **Via CLI:**
45
+ Or install via CLI:
41
46
 
42
47
  ```bash
43
48
  ppg install-dashboard
44
49
  ```
45
50
 
46
- **Or download directly** from [GitHub Releases](https://github.com/2witstudios/ppg-cli/releases/latest) — grab the `.dmg` file.
51
+ ### CLI (runtime engine)
52
+
53
+ The CLI is the engine that powers the dashboard. Install it globally:
54
+
55
+ ```bash
56
+ npm install -g pure-point-guard
57
+ ```
58
+
59
+ **Requirements:** Node.js >= 20, git, tmux (`brew install tmux`), macOS
60
+
61
+ ### Claude Code integration
62
+
63
+ Running `ppg init` in any project automatically installs the `/ppg` skill for Claude Code. This gives Claude the ability to orchestrate parallel agents — just type `/ppg` in any Claude Code session.
47
64
 
48
65
  ## Quick Start
49
66
 
50
67
  ```bash
51
- # Initialize in your project
68
+ # 1. Initialize ppg in your project
52
69
  cd your-project
53
70
  ppg init
54
71
 
55
- # Spawn an agent
56
- ppg spawn --name fix-auth --prompt "Fix the authentication bug in src/auth.ts"
72
+ # 2. Open the dashboard
73
+ ppg ui
74
+ ```
75
+
76
+ From the dashboard, use the command palette to spawn agents, watch their progress in real time, and merge completed work.
57
77
 
58
- # Spawn multiple agents in parallel
78
+ ### Or use the CLI directly
79
+
80
+ ```bash
81
+ # Spawn agents
82
+ ppg spawn --name fix-auth --prompt "Fix the authentication bug in src/auth.ts"
59
83
  ppg spawn --name add-tests --prompt "Add unit tests for src/utils/"
60
84
  ppg spawn --name update-docs --prompt "Update the API documentation"
61
85
 
62
86
  # Check status
63
87
  ppg status
64
88
 
65
- # Watch status live
66
- ppg status --watch
67
-
68
- # View agent output
69
- ppg logs ag-xxxxxxxx
70
-
71
89
  # Collect results
72
90
  ppg aggregate --all
73
91
 
74
- # Merge a completed worktree back
92
+ # Merge completed work
75
93
  ppg merge wt-xxxxxx
76
-
77
- # Open the dashboard
78
- ppg ui
79
94
  ```
80
95
 
81
- Each `ppg spawn` creates a git worktree, opens a tmux pane, launches the agent, and pops open a Terminal.app window so you can watch it work.
82
-
83
96
  ## How It Works
84
97
 
98
+ Each `ppg spawn` creates a git worktree on a `ppg/<name>` branch, opens a tmux pane, and launches the agent. The dashboard watches the manifest file in real time — no IPC, no server.
99
+
85
100
  ```
86
101
  your-project/
87
- ├── .pg/
102
+ ├── .ppg/
88
103
  │ ├── config.yaml # Agent and project config
89
104
  │ ├── manifest.json # Runtime state (worktrees, agents, status)
90
105
  │ ├── templates/ # Reusable prompt templates
91
- │ ├── prompts/ # Reusable prompt files for swarms
92
- │ ├── agent-prompts/ # Rendered per-agent prompt files (ephemeral)
106
+ │ ├── prompts/ # Prompt files for swarms
93
107
  │ └── results/ # Agent result files
94
108
  ├── .worktrees/
95
109
  │ ├── wt-abc123/ # Isolated git worktree
@@ -97,214 +111,18 @@ your-project/
97
111
  └── ...
98
112
  ```
99
113
 
100
- **Worktrees** are isolated git checkouts on their own branches (`ppg/<name>`). Each agent works in its own worktree so there are no file conflicts between parallel agents.
101
-
102
- **tmux** provides the process management layer. One session per project, one window per worktree, one pane per agent. This gives you `ppg logs`, `ppg status`, `ppg attach`, and `ppg kill` for free.
103
-
104
- **Terminal.app windows** open automatically when agents spawn (macOS), so you can see what every agent is doing without manually attaching. Use `--no-open` to suppress this.
105
-
106
- ## Commands
107
-
108
- ### `ppg init`
109
-
110
- Initialize ppg in the current git repository. Creates `.pg/` directory with default config and a sample template. Also installs the `/ppg` Claude Code skill if Claude Code is available.
111
-
112
- ```bash
113
- ppg init
114
- ppg init --json
115
- ```
116
-
117
- ### `ppg spawn`
118
-
119
- Spawn a new worktree with agent(s), or add agents to an existing worktree.
120
-
121
- ```bash
122
- # Inline prompt
123
- ppg spawn --name fix-bug --prompt "Fix the null check in parser.ts"
124
-
125
- # From a file
126
- ppg spawn --name refactor --prompt-file tasks/refactor-auth.md
127
-
128
- # Using a template with variables
129
- ppg spawn --name add-tests --template test-writer --var SCOPE=auth --var STYLE=unit
130
-
131
- # Multiple agents in one worktree
132
- ppg spawn --name big-task --prompt "Implement feature X" --count 2
133
-
134
- # Split panes in one window
135
- ppg spawn --name big-task --prompt "Implement feature X" --count 2 --split
136
-
137
- # Add agent to existing worktree
138
- ppg spawn --worktree wt-abc123 --prompt "Review the changes"
139
-
140
- # Silent mode (no Terminal window)
141
- ppg spawn --name ci-task --prompt "Run linting" --no-open
142
-
143
- # Specify base branch
144
- ppg spawn --name hotfix --prompt "Fix critical bug" --base release/v2
145
- ```
146
-
147
- | Option | Description |
148
- |---|---|
149
- | `-n, --name <name>` | Name for the worktree (becomes branch `ppg/<name>`) |
150
- | `-a, --agent <type>` | Agent type from config (default: `claude`) |
151
- | `-p, --prompt <text>` | Inline prompt text |
152
- | `-f, --prompt-file <path>` | Read prompt from file |
153
- | `-t, --template <name>` | Use a template from `.pg/templates/` |
154
- | `--var <key=value>` | Template variable (repeatable) |
155
- | `-b, --base <branch>` | Base branch for the worktree |
156
- | `-w, --worktree <id>` | Add agent to existing worktree instead of creating new |
157
- | `-c, --count <n>` | Number of agents to spawn (default: 1) |
158
- | `--split` | Put all agents in one window as split panes |
159
- | `--no-open` | Don't open a Terminal window |
160
- | `--json` | JSON output |
161
-
162
- ### `ppg status`
163
-
164
- Show status of all worktrees and agents.
165
-
166
- ```bash
167
- ppg status # Pretty table
168
- ppg status --json # Machine-readable
169
- ppg status --watch # Live updates
170
- ppg status my-task # Filter by worktree name
171
- ```
172
-
173
- ### `ppg attach`
174
-
175
- Open a terminal attached to a worktree or agent pane. If you're already in tmux, it switches to the target pane. Otherwise it opens a new Terminal.app window.
176
-
177
- ```bash
178
- ppg attach wt-abc123 # By worktree ID
179
- ppg attach my-task # By worktree name
180
- ppg attach ag-xxxxxxxx # By agent ID
181
- ```
182
-
183
- ### `ppg logs`
184
-
185
- View captured output from an agent's tmux pane.
186
-
187
- ```bash
188
- ppg logs ag-xxxxxxxx # Last 100 lines
189
- ppg logs ag-xxxxxxxx --lines 500 # Last 500 lines
190
- ppg logs ag-xxxxxxxx --follow # Tail (polls every 1s)
191
- ppg logs ag-xxxxxxxx --full # Full pane history
192
- ```
193
-
194
- ### `ppg kill`
195
-
196
- Kill agents and optionally remove worktrees.
197
-
198
- ```bash
199
- ppg kill --agent ag-xxxxxxxx # Kill one agent
200
- ppg kill --worktree wt-abc123 # Kill all agents in worktree
201
- ppg kill --all # Kill everything
202
- ppg kill --all --remove # Kill everything and remove worktrees
203
- ```
204
-
205
- ### `ppg aggregate`
206
-
207
- Collect result files from completed agents.
208
-
209
- ```bash
210
- ppg aggregate wt-abc123 # Results from one worktree
211
- ppg aggregate --all # Results from all worktrees
212
- ppg aggregate --all -o results.md # Write to file
213
- ```
214
-
215
- ### `ppg merge`
216
-
217
- Merge a worktree branch back into its base branch.
218
-
219
- ```bash
220
- ppg merge wt-abc123 # Squash merge (default)
221
- ppg merge wt-abc123 -s no-ff # No-ff merge
222
- ppg merge wt-abc123 --dry-run # Preview
223
- ppg merge wt-abc123 --no-cleanup # Keep worktree after merge
224
- ppg merge wt-abc123 --force # Merge even if agents aren't done
225
- ```
226
-
227
- ### `ppg diff`
228
-
229
- Show changes made in a worktree branch relative to its base.
230
-
231
- ```bash
232
- ppg diff wt-abc123 # Full diff
233
- ppg diff wt-abc123 --stat # Diffstat summary
234
- ppg diff wt-abc123 --name-only # Changed file names only
235
- ```
236
-
237
- ### `ppg restart`
238
-
239
- Restart a failed or killed agent in the same worktree.
240
-
241
- ```bash
242
- ppg restart ag-xxxxxxxx # Restart with original prompt
243
- ppg restart ag-xxxxxxxx --prompt "Try again" # Override the prompt
244
- ppg restart ag-xxxxxxxx --agent codex # Override the agent type
245
- ```
246
-
247
- ### `ppg send`
248
-
249
- Send text or keystrokes to an agent's tmux pane.
250
-
251
- ```bash
252
- ppg send ag-xxxxxxxx "yes" # Send text + Enter
253
- ppg send ag-xxxxxxxx "y" --no-enter # Send text without Enter
254
- ppg send ag-xxxxxxxx "C-c" --keys # Send raw tmux key names
255
- ```
256
-
257
- ### `ppg wait`
258
-
259
- Wait for agents to reach a terminal state (completed, failed, killed, lost).
260
-
261
- ```bash
262
- ppg wait wt-abc123 # Wait for all agents in worktree
263
- ppg wait --all # Wait for all agents everywhere
264
- ppg wait --all --timeout 300 # Timeout after 5 minutes
265
- ppg wait --all --interval 10 # Poll every 10 seconds
266
- ```
267
-
268
- ### `ppg clean`
114
+ **Agent lifecycle:**
269
115
 
270
- Remove worktrees in terminal states (merged, cleaned, failed).
271
-
272
- ```bash
273
- ppg clean # Clean merged/cleaned worktrees
274
- ppg clean --all # Also clean failed worktrees
275
- ppg clean --dry-run # Preview what would be cleaned
276
- ppg clean --prune # Also run git worktree prune
277
116
  ```
278
-
279
- ### `ppg worktree create`
280
-
281
- Create a standalone worktree without spawning any agents.
282
-
283
- ```bash
284
- ppg worktree create --name my-branch
285
- ppg worktree create --name my-branch --base develop
286
- ```
287
-
288
- ### `ppg list templates`
289
-
290
- List available prompt templates from `.pg/templates/`.
291
-
292
- ### `ppg install-dashboard`
293
-
294
- Download and install the native macOS dashboard app from GitHub Releases.
295
-
296
- ```bash
297
- ppg install-dashboard # Install to /Applications
298
- ppg install-dashboard --dir ~/Apps # Custom install directory
117
+ spawning → running → completed (result file written)
118
+ failed (non-zero exit or shell prompt visible)
119
+ → killed (via ppg kill)
120
+ lost (tmux pane died unexpectedly)
299
121
  ```
300
122
 
301
- ### `ppg ui`
302
-
303
- Open the native macOS dashboard app (alias: `ppg dashboard`).
304
-
305
123
  ## Configuration
306
124
 
307
- `.pg/config.yaml`:
125
+ `.ppg/config.yaml`:
308
126
 
309
127
  ```yaml
310
128
  sessionName: ppg
@@ -319,27 +137,6 @@ agents:
319
137
  When you have completed the task, write a summary of what you did
320
138
  and any important notes to the file at: {{RESULT_FILE}}
321
139
 
322
- worktreeBase: .worktrees
323
- templateDir: .pg/templates
324
- resultDir: .pg/results
325
- logDir: .pg/logs
326
- envFiles:
327
- - .env
328
- - .env.local
329
- symlinkNodeModules: true
330
- ```
331
-
332
- ### Custom Agents
333
-
334
- Add any CLI agent by defining it in the agents map:
335
-
336
- ```yaml
337
- agents:
338
- claude:
339
- name: claude
340
- command: claude --dangerously-skip-permissions
341
- interactive: true
342
-
343
140
  codex:
344
141
  name: codex
345
142
  command: codex
@@ -351,109 +148,114 @@ agents:
351
148
  command: ./scripts/my-agent.sh
352
149
  promptFlag: --task
353
150
  interactive: false
354
- ```
355
151
 
356
- Then spawn with `ppg spawn --agent codex --prompt "..."`.
152
+ worktreeBase: .worktrees
153
+ templateDir: .ppg/templates
154
+ resultDir: .ppg/results
155
+ logDir: .ppg/logs
156
+ envFiles:
157
+ - .env
158
+ - .env.local
159
+ symlinkNodeModules: true
160
+ ```
357
161
 
358
162
  ## Templates
359
163
 
360
- Templates live in `.pg/templates/` as Markdown files with `{{VAR}}` placeholders.
164
+ Templates live in `.ppg/templates/` as Markdown files with `{{VAR}}` placeholders. The prompts editor in the dashboard lets you create and edit these visually.
361
165
 
362
- **Built-in variables:**
166
+ **Built-in variables:** `{{WORKTREE_PATH}}`, `{{BRANCH}}`, `{{AGENT_ID}}`, `{{RESULT_FILE}}`, `{{PROJECT_ROOT}}`, `{{TASK_NAME}}`, `{{PROMPT}}`
363
167
 
364
- | Variable | Value |
365
- |---|---|
366
- | `{{WORKTREE_PATH}}` | Path to the agent's worktree |
367
- | `{{BRANCH}}` | Git branch name |
368
- | `{{AGENT_ID}}` | Agent identifier |
369
- | `{{RESULT_FILE}}` | Where the agent should write results |
370
- | `{{PROJECT_ROOT}}` | Repository root path |
371
- | `{{TASK_NAME}}` | Worktree name |
372
- | `{{PROMPT}}` | The prompt text |
168
+ Custom variables are passed with `--var KEY=VALUE` or defined in swarm YAML.
169
+
170
+ ## Global Prompts & Templates
373
171
 
374
- Custom variables are passed with `--var KEY=VALUE`.
172
+ Put prompts, templates, and swarms in `~/.ppg/` to make them available across all projects:
375
173
 
376
- **Example template** (`.pg/templates/test-writer.md`):
174
+ ```
175
+ ~/.ppg/
176
+ ├── prompts/ # Global prompt files
177
+ ├── templates/ # Global templates
178
+ └── swarms/ # Global swarm definitions
179
+ ```
377
180
 
378
- ```markdown
379
- # Task: {{TASK_NAME}}
181
+ Project-local files always take precedence when names conflict. Use `ppg list prompts` or `ppg list templates` to see both local and global entries.
380
182
 
381
- Write comprehensive tests for the {{SCOPE}} module.
183
+ ## Cron Scheduling
382
184
 
383
- ## Working Directory
384
- {{WORKTREE_PATH}}
185
+ Define recurring agent tasks in `.ppg/schedules.yaml`:
385
186
 
386
- ## Guidelines
387
- - Use {{FRAMEWORK}} for test framework
388
- - Aim for >90% coverage
389
- - Write your summary to {{RESULT_FILE}} when done
187
+ ```yaml
188
+ schedules:
189
+ - name: nightly-review
190
+ swarm: code-review
191
+ cron: '0 2 * * *'
192
+ vars:
193
+ CONTEXT: 'Review all changes from the last 24 hours'
194
+ - name: hourly-lint
195
+ prompt: lint-check
196
+ cron: '0 * * * *'
390
197
  ```
391
198
 
392
199
  ```bash
393
- ppg spawn --name auth-tests --template test-writer --var SCOPE=auth --var FRAMEWORK=vitest
200
+ ppg cron start # Start the scheduler daemon
201
+ ppg cron list # Show schedules with next run times
202
+ ppg cron status # Check daemon status
203
+ ppg cron stop # Stop the daemon
394
204
  ```
395
205
 
396
- ## Agent Lifecycle
206
+ Manage schedules visually from the Schedules tab in the dashboard.
397
207
 
398
- ```
399
- spawning → running → completed (result file written)
400
- → failed (non-zero exit or shell prompt visible)
401
- → killed (via ppg kill)
402
- → lost (tmux pane died unexpectedly)
403
- ```
208
+ ## CLI Reference
404
209
 
405
- Status is determined by checking (in order):
406
- 1. Result file exists → `completed`
407
- 2. Tmux pane gone → `lost`
408
- 3. Pane dead with exit 0 → `completed`
409
- 4. Pane dead with non-zero exit → `failed`
410
- 5. Pane alive, shell prompt visible → `failed` (agent exited without writing results)
411
- 6. Otherwise → `running`
210
+ All commands support `--json` for machine-readable output.
412
211
 
413
- ## Conductor Mode
212
+ | Command | Description |
213
+ |---|---|
214
+ | `ppg init` | Initialize ppg in the current git repo |
215
+ | `ppg spawn` | Spawn a worktree with agent(s) |
216
+ | `ppg status` | Show status of all worktrees and agents |
217
+ | `ppg attach` | Open a terminal attached to a worktree or agent |
218
+ | `ppg logs` | View agent output from tmux pane |
219
+ | `ppg kill` | Kill agents and optionally remove worktrees |
220
+ | `ppg aggregate` | Collect result files from completed agents |
221
+ | `ppg merge` | Merge a worktree branch back into base |
222
+ | `ppg diff` | Show changes in a worktree branch |
223
+ | `ppg restart` | Restart a failed or killed agent |
224
+ | `ppg send` | Send text or keystrokes to an agent pane |
225
+ | `ppg wait` | Wait for agents to complete |
226
+ | `ppg clean` | Remove worktrees in terminal states |
227
+ | `ppg worktree create` | Create a standalone worktree |
228
+ | `ppg list templates` | List available prompt templates |
229
+ | `ppg list prompts` | List available prompt files |
230
+ | `ppg prompt` | Spawn an agent from a prompt file |
231
+ | `ppg cron start` | Start the cron scheduler daemon |
232
+ | `ppg cron stop` | Stop the cron scheduler daemon |
233
+ | `ppg cron list` | Show configured schedules with next run times |
234
+ | `ppg cron status` | Show daemon status and recent log entries |
235
+ | `ppg install-dashboard` | Download and install the macOS dashboard |
236
+ | `ppg ui` | Open the dashboard |
237
+
238
+ Run `ppg <command> --help` for detailed options.
414
239
 
415
- ppg is designed to be driven programmatically by a meta-agent (a "conductor"). All orchestration commands (`spawn`, `status`, `kill`, `wait`, `aggregate`, `merge`) support `--json` for machine-readable output.
240
+ ## Conductor Mode
416
241
 
417
- **Conductor workflow:**
242
+ ppg is designed to be driven programmatically by a meta-agent (a "conductor"). All commands support `--json` for machine consumption.
418
243
 
419
244
  ```bash
420
- # 1. Plan — break the task into independent units
421
- # 2. Spawn agents
245
+ # 1. Spawn agents
422
246
  ppg spawn --name task-1 --prompt "Do X" --json
423
247
  ppg spawn --name task-2 --prompt "Do Y" --json
424
248
 
425
- # 3. Poll for completion
426
- ppg status --json # check for status: "completed" or "failed"
427
-
428
- # 4. Wait for all agents
249
+ # 2. Wait for completion
429
250
  ppg wait --all --json
430
251
 
431
- # 5. Aggregate results
252
+ # 3. Aggregate results
432
253
  ppg aggregate --all --json
433
254
 
434
- # 6. Merge completed work
255
+ # 4. Merge completed work
435
256
  ppg merge wt-xxxxxx --json
436
257
  ```
437
258
 
438
- Key principles:
439
- - Always use `--json` for machine-readable output
440
- - Poll status every 5 seconds or use `ppg wait`
441
- - One concern per worktree for clean merges
442
- - Use `ppg aggregate` to collect and review results before merging
443
-
444
- ## Architecture
445
-
446
- ```
447
- src/
448
- ├── cli.ts # Entry point — registers commands with Commander.js
449
- ├── commands/ # Command implementations
450
- ├── core/ # Domain logic (manifest, agent, worktree, tmux, terminal, config)
451
- ├── lib/ # Utilities (paths, errors, id, output, shell)
452
- └── types/ # Type definitions
453
- ```
454
-
455
- Built with TypeScript (strict, ES2022, ESM-only), Commander.js for CLI framework, and tmux + git worktrees as foundational abstractions. See [CONTRIBUTING.md](CONTRIBUTING.md) for development details.
456
-
457
259
  ## Contributing
458
260
 
459
261
  See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and code conventions.