pure-point-guard 0.2.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pure-point-guard",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Pure Point Guard — local orchestration runtime for parallel CLI coding agents",
6
6
  "bin": {
@@ -46,6 +46,7 @@
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
48
  "commander": "^14.0.0",
49
+ "cron-parser": "^5.5.0",
49
50
  "execa": "^9.5.2",
50
51
  "nanoid": "^5.1.5",
51
52
  "proper-lockfile": "^4.1.2",
@@ -55,8 +56,8 @@
55
56
  "devDependencies": {
56
57
  "@types/node": "^22.13.4",
57
58
  "@types/proper-lockfile": "^4.1.4",
58
- "tsx": "^4.19.3",
59
59
  "tsup": "^8.4.0",
60
+ "tsx": "^4.19.3",
60
61
  "typescript": "^5.7.3",
61
62
  "vitest": "^3.0.6"
62
63
  },
@@ -8,6 +8,6 @@ user-invocable: true
8
8
 
9
9
  Read and follow the conductor hub instructions in `~/.claude/skills/ppg-conductor/SKILL.md`.
10
10
 
11
- Run pre-flight checks. Classify the user's request as swarm or batch mode. Decompose into concrete tasks with descriptive names and self-contained prompts. Spawn immediately — do not ask for confirmation. Drive the full conductor loop: spawn, poll, aggregate, (merge if batch), summarize.
11
+ Run pre-flight checks. Classify the user's request as swarm or batch mode. Decompose into concrete tasks with descriptive names and self-contained prompts. Spawn immediately — do not ask for confirmation. Drive the full conductor loop: spawn, poll, aggregate, (agents create PRs), summarize.
12
12
 
13
13
  If the user provides no arguments (just `/ppg`), ask what they'd like to parallelize.
@@ -46,8 +46,9 @@ After classifying the mode:
46
46
  - **Always use `--no-open`** to suppress Terminal.app windows (you're driving programmatically, not watching panes)
47
47
  - **Poll every 5 seconds** — `ppg status --json` in a loop until all agents reach a terminal state
48
48
  - **One concern per worktree** — in batch mode, each task gets its own isolated worktree for clean merges
49
- - **Surface results and let the user decide next steps** present what agents produced, then ask: create PRs, merge directly, review diffs, or do nothing
50
- - **Never auto-merge or auto-PR** — always stop after presenting results and wait for the user to choose
49
+ - **Agents create PRs** agents handle the full lifecycle (commit, push, PR creation). Conductor reads PR URLs from result files and presents them.
50
+ - **Surface PR links and let the user decide next steps** — present PR URLs and summaries from agent results, then ask what to do next
51
+ - **Prefer `gh pr merge` over `ppg merge`** — for integration, prefer remote merge via `gh pr merge <url> --squash --delete-branch`. `ppg merge` is a power-user tool for local squash merge.
51
52
  - **Report failures clearly** — if an agent fails, show its ID, the error, and offer to re-spawn or skip
52
53
  - **Never auto-resolve merge conflicts** — escalate to the user with the conflict details
53
54
  - **Prompt quality matters** — each agent prompt must be self-contained with full context. The agent has no memory of this conversation.
@@ -4,7 +4,7 @@ Quick reference for all ppg commands relevant to conductor workflows. Always use
4
4
 
5
5
  ## ppg init
6
6
 
7
- Initialize ppg in the current git repository. Creates `.pg/` directory structure, default config, empty manifest, and sample template.
7
+ Initialize ppg in the current git repository. Creates `.ppg/` directory structure, default config, empty manifest, and sample template.
8
8
 
9
9
  ```bash
10
10
  ppg init --json
@@ -12,7 +12,7 @@ ppg init --json
12
12
 
13
13
  **JSON output:**
14
14
  ```json
15
- { "success": true, "projectRoot": "/path/to/repo", "sessionName": "ppg-repo", "pgDir": "/path/to/repo/.pg" }
15
+ { "success": true, "projectRoot": "/path/to/repo", "sessionName": "ppg-repo", "ppgDir": "/path/to/repo/.pg" }
16
16
  ```
17
17
 
18
18
  **Errors:** `NOT_GIT_REPO`, `TMUX_NOT_FOUND`
@@ -49,7 +49,7 @@ ppg spawn --name <name> --prompt-file /path/to/prompt.md --json --no-open
49
49
  | `-a, --agent <type>` | Agent type from config (default: `claude`) |
50
50
  | `-p, --prompt <text>` | Inline prompt text |
51
51
  | `-f, --prompt-file <path>` | Path to file containing prompt |
52
- | `-t, --template <name>` | Template name from `.pg/templates/` |
52
+ | `-t, --template <name>` | Template name from `.ppg/templates/` |
53
53
  | `--var <KEY=value>` | Template variable (repeatable) |
54
54
  | `-b, --base <branch>` | Base branch (default: current branch) |
55
55
  | `-w, --worktree <id>` | Add agent to existing worktree instead of creating new one |
@@ -109,7 +109,7 @@ ppg status --watch # Live-refresh in terminal
109
109
  "status": "running",
110
110
  "tmuxTarget": "ppg-repo:1",
111
111
  "prompt": "...",
112
- "resultFile": "/path/.pg/results/ag-xyz12345.md",
112
+ "resultFile": "/path/.ppg/results/ag-xyz12345.md",
113
113
  "startedAt": "2025-01-01T00:00:00.000Z"
114
114
  }
115
115
  },
@@ -166,7 +166,7 @@ ppg aggregate <worktree-id> --json # Specific worktree
166
166
  }
167
167
  ```
168
168
 
169
- Results come from `.pg/results/<agentId>.md`. If no result file exists, falls back to tmux pane capture.
169
+ Results come from `.ppg/results/<agentId>.md`. If no result file exists, falls back to tmux pane capture.
170
170
 
171
171
  ## ppg pr
172
172
 
@@ -269,7 +269,7 @@ Cleanup sequence: kill tmux window, teardown env, `git worktree remove --force`,
269
269
 
270
270
  ## ppg swarm
271
271
 
272
- Run a predefined swarm template — spawns multiple agents from `.pg/swarms/` with prompts from `.pg/prompts/`.
272
+ Run a predefined swarm template — spawns multiple agents from `.ppg/swarms/` with prompts from `.ppg/prompts/`.
273
273
 
274
274
  ```bash
275
275
  # Run a swarm template (creates new worktree, spawns all agents)
@@ -487,7 +487,7 @@ ppg attach <agent-id> # Attach to agent's tmux pane
487
487
  |------|---------|----------|
488
488
  | `TMUX_NOT_FOUND` | tmux not installed | Fatal — user must install tmux |
489
489
  | `NOT_GIT_REPO` | Not inside a git repository | Fatal — user must cd to a repo |
490
- | `NOT_INITIALIZED` | `.pg/` directory missing | Auto-fix: run `ppg init --json` |
490
+ | `NOT_INITIALIZED` | `.ppg/` directory missing | Auto-fix: run `ppg init --json` |
491
491
  | `MANIFEST_LOCK` | Could not acquire manifest lock | Retry after brief delay (rare) |
492
492
  | `WORKTREE_NOT_FOUND` | Worktree ID/name not in manifest | Check `ppg status --json` for valid IDs |
493
493
  | `AGENT_NOT_FOUND` | Agent ID not in manifest | Check `ppg status --json` for valid IDs |
@@ -21,7 +21,7 @@ ppg spawn --name "<name>" --prompt "<self-contained prompt>" --json --no-open
21
21
 
22
22
  **Store a tracking table** with: worktree ID, agent IDs, name, and branch for each spawned task.
23
23
 
24
- **Swarm templates** — If a matching swarm template exists in `.pg/swarms/`, prefer `ppg swarm` over manual multi-spawn:
24
+ **Swarm templates** — If a matching swarm template exists in `.ppg/swarms/`, prefer `ppg swarm` over manual multi-spawn:
25
25
  ```bash
26
26
  # Use a predefined swarm template (much simpler than manual spawning)
27
27
  ppg swarm code-review --var CONTEXT="Review the auth module" --json --no-open
@@ -140,29 +140,29 @@ Returns:
140
140
 
141
141
  **For batch mode:**
142
142
 
143
- Present a results table:
143
+ Present a results table with PR links:
144
144
  ```
145
145
  Completed:
146
- [1] fix-auth-bug (wt-abc123) — ppg/fix-auth-bug
147
- [2] add-dark-mode (wt-def456) — ppg/add-dark-mode
146
+ [1] fix-auth-bug (wt-abc123) — PR: https://github.com/org/repo/pull/42
147
+ [2] add-dark-mode (wt-def456) — PR: https://github.com/org/repo/pull/43
148
148
 
149
149
  Failed:
150
- [3] issue-15 (wt-ghi789) — ppg/issue-15
150
+ [3] issue-15 (wt-ghi789) — no PR created
151
151
 
152
152
  What would you like to do?
153
- - Create PRs: "pr 1,2" or "pr all"
154
- - Merge directly: "merge 1,2" or "merge all"
155
- - Review diffs first: "diff 1"
153
+ - Review PRs on GitHub
154
+ - Merge remotely: "gh pr merge <url> --squash --delete-branch"
155
+ - Merge locally (power-user): "ppg merge <wt-id>"
156
+ - Iterate: send more prompts to agents
156
157
  - Do nothing for now
157
158
  ```
158
159
 
159
- **When the user chooses PRs:**
160
+ **When the user chooses remote merge:**
160
161
  ```bash
161
- ppg pr <wt-id> --json
162
+ gh pr merge <url> --squash --delete-branch
162
163
  ```
163
- This pushes the branch and creates a GitHub PR. The worktree stays alive for the PR lifecycle.
164
164
 
165
- **When the user chooses direct merge:**
165
+ **When the user chooses local merge (power-user):**
166
166
  ```bash
167
167
  ppg merge <wt-id> --json
168
168
  ```
@@ -173,10 +173,10 @@ ppg merge <wt-id> --json
173
173
  - Offer options: "resolve manually", "skip this merge", "force merge"
174
174
  - **Never auto-resolve conflicts** — the user must decide
175
175
 
176
- **Cleanup after PRs are merged externally:**
176
+ **Cleanup:**
177
177
  ```bash
178
- ppg reset --json # Refuses if unmerged work exists
179
- ppg reset --force --json # Force cleanup
178
+ ppg reset --json # Skips worktrees with open PRs
179
+ ppg reset --force --json # Force cleanup including open PRs
180
180
  ppg clean --json # Clean only terminal-state worktrees
181
181
  ```
182
182
 
@@ -81,12 +81,13 @@ Each command creates a separate worktree on its own `ppg/<name>` branch.
81
81
  **Post-completion:**
82
82
  1. Aggregate results: `ppg aggregate --all --json`
83
83
  2. Present a summary table: task name, status, branch, key findings
84
- 3. **Stop and ask the user what to do next.** Options:
85
- - Create PRs: `ppg pr <wt-id> --json` (pushes branch, creates GitHub PR)
86
- - Merge directly: `ppg merge <wt-id> --json` (squash by default)
87
- - Review diffs first: `ppg diff <wt-id> --json`
84
+ 3. **Stop and ask the user what to do next.** Agents already created PRs. Options:
85
+ - Review PRs on GitHub (present the PR URLs from result files)
86
+ - Merge remotely: `gh pr merge <url> --squash --delete-branch`
87
+ - Merge locally (power-user): `ppg merge <wt-id> --json`
88
+ - Iterate: send more prompts to agents
88
89
  - Do nothing — leave worktrees for manual review
89
- 4. After PRs are merged externally: `ppg reset --json` to clean up
90
+ 4. After PRs are merged: `ppg reset --json` to clean up (skips worktrees with open PRs)
90
91
 
91
92
  **Important:** Never auto-merge or auto-PR. Always present results and let the user choose the next step.
92
93