pi-messenger 0.8.0 → 0.8.1
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 +10 -0
- package/README.md +21 -1
- package/crew/agents/crew-planner.md +10 -1
- package/crew/handlers/plan.ts +6 -3
- package/crew/handlers/review.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.1] - 2026-01-30
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Parallelism-aware planning** - Planner prompt now includes a dedicated Parallel Execution section teaching DAG thinking, independent work streams, critical path minimization, and real data flow dependencies. Plans should produce wider dependency graphs with more concurrent waves instead of linear chains.
|
|
7
|
+
- **Parallelism-aware review** - Both the automated planning loop reviewer and the manual plan review (`action: "review"`) now evaluate plans for unnecessary sequential dependencies and critical path length.
|
|
8
|
+
- PRD truncation applied consistently to both explicit `prd` parameter and auto-discovered PRD files (100KB limit).
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Stale README agent list referenced removed "analysts" instead of the actual 5 agents.
|
|
12
|
+
|
|
3
13
|
## [0.8.0] - 2026-01-30
|
|
4
14
|
|
|
5
15
|
### Added
|
package/README.md
CHANGED
|
@@ -225,6 +225,26 @@ The `plan` action runs a multi-pass planning loop: the planner drafts tasks, a r
|
|
|
225
225
|
|
|
226
226
|
**No special format required** -- just put your docs in the project. The planner finds and reads markdown files, READMEs, and code comments.
|
|
227
227
|
|
|
228
|
+
### How Work Execution Works
|
|
229
|
+
|
|
230
|
+
Crew doesn't run tasks sequentially. Tasks form a dependency graph, and the work handler executes them in **waves** based on what's ready:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Wave 1: task-1 (no deps) ─┐
|
|
234
|
+
task-3 (no deps) ─┤── run in parallel
|
|
235
|
+
│
|
|
236
|
+
Wave 2: task-2 (→ task-1) ─┤── task-1 done, task-2 unblocked
|
|
237
|
+
task-4 (→ task-3) ─┘── task-3 done, task-4 unblocked
|
|
238
|
+
|
|
239
|
+
Wave 3: task-5 (→ task-2, task-4) ── both deps done
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
A task is **ready** when its status is pending and all its dependencies are completed. Each wave picks all ready tasks (up to `concurrency.workers`), spawns parallel workers, waits for them to finish, then checks what's newly unblocked. Independent tasks — those that don't depend on each other — run concurrently in the same wave.
|
|
243
|
+
|
|
244
|
+
The planner structures tasks to maximize this parallelism. Foundation work (types, config, schemas) has no dependencies so it starts immediately. Features that don't touch each other get separate dependency chains so they can run in parallel. Tasks that need shared work done first (tests, integration, docs) depend on the tasks that produce it.
|
|
245
|
+
|
|
246
|
+
A single `work` call runs one wave. Autonomous mode (`autonomous: true`) runs waves back-to-back until everything is done or blocked.
|
|
247
|
+
|
|
228
248
|
### Autonomous Mode
|
|
229
249
|
|
|
230
250
|
Run tasks continuously until completion:
|
|
@@ -310,7 +330,7 @@ pi_messenger({ action: "crew.install" })
|
|
|
310
330
|
```
|
|
311
331
|
|
|
312
332
|
**What gets installed:**
|
|
313
|
-
- **5 agents** in `~/.pi/agent/agents/` (planner,
|
|
333
|
+
- **5 agents** in `~/.pi/agent/agents/` (planner, worker, reviewer, interview-generator, plan-sync)
|
|
314
334
|
- **1 skill** in `~/.pi/agent/skills/` (pi-messenger-crew quick reference)
|
|
315
335
|
|
|
316
336
|
To remove:
|
|
@@ -64,13 +64,22 @@ Synthesize everything you've found. Identify:
|
|
|
64
64
|
Create a task breakdown following the exact output format below. Guidelines:
|
|
65
65
|
|
|
66
66
|
- **4-8 tasks** typically (scale with complexity)
|
|
67
|
-
- First tasks should have **no dependencies** to enable parallel start
|
|
68
67
|
- Each task should be **completable in one work session**
|
|
69
68
|
- Group related work but keep tasks focused
|
|
70
69
|
- End with testing and documentation tasks
|
|
71
70
|
- Include specific files to create/modify when known
|
|
72
71
|
- Include acceptance criteria in task descriptions
|
|
73
72
|
|
|
73
|
+
### Parallel Execution
|
|
74
|
+
|
|
75
|
+
Tasks execute in waves — all tasks whose dependencies are met run concurrently. Structure your breakdown to maximize parallelism:
|
|
76
|
+
|
|
77
|
+
- **Think in dependency graphs, not sequences.** Tasks form a DAG, not a numbered list. Two tasks that don't touch the same files or types should be independent.
|
|
78
|
+
- **Identify independent work streams.** Backend and frontend, types and implementation, different modules — these often have separate chains that can run in parallel. A server task and a CSS task don't depend on each other.
|
|
79
|
+
- **Minimize the critical path.** The longest dependency chain determines total execution time. If a 10-task plan has a single chain of 10, it's sequential. If it has two chains of 5, it's twice as fast.
|
|
80
|
+
- **Dependencies should reflect real data flow.** Task B depends on Task A only if B imports types, calls functions, or reads files that A creates. Conceptual ordering ("settings before server") isn't a dependency unless the server literally imports from the settings module.
|
|
81
|
+
- **Front-load foundation tasks with no dependencies** so multiple streams can start from wave 1.
|
|
82
|
+
|
|
74
83
|
## Output Format
|
|
75
84
|
|
|
76
85
|
Your final output MUST include both formats:
|
package/crew/handlers/plan.ts
CHANGED
|
@@ -16,7 +16,6 @@ import { discoverCrewAgents } from "../utils/discover.js";
|
|
|
16
16
|
import { loadCrewConfig } from "../utils/config.js";
|
|
17
17
|
import { parseVerdict, type ParsedReview } from "../utils/verdict.js";
|
|
18
18
|
import * as store from "../store.js";
|
|
19
|
-
import { getCrewDir } from "../store.js";
|
|
20
19
|
|
|
21
20
|
const PRD_PATTERNS = [
|
|
22
21
|
"PRD.md", "prd.md",
|
|
@@ -139,6 +138,9 @@ export async function execute(
|
|
|
139
138
|
});
|
|
140
139
|
}
|
|
141
140
|
prdContent = fs.readFileSync(fullPath, "utf-8");
|
|
141
|
+
if (prdContent.length > MAX_PRD_SIZE) {
|
|
142
|
+
prdContent = prdContent.slice(0, MAX_PRD_SIZE) + "\n\n[Content truncated]";
|
|
143
|
+
}
|
|
142
144
|
} else {
|
|
143
145
|
const discovered = discoverPRD(cwd);
|
|
144
146
|
if (!discovered) {
|
|
@@ -161,7 +163,7 @@ export async function execute(
|
|
|
161
163
|
});
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
const config = loadCrewConfig(getCrewDir(cwd));
|
|
166
|
+
const config = loadCrewConfig(store.getCrewDir(cwd));
|
|
165
167
|
const maxPasses = Math.max(1, config.planning.maxPasses);
|
|
166
168
|
const hasReviewer = availableAgents.some(a => a.name === "crew-reviewer");
|
|
167
169
|
|
|
@@ -386,7 +388,8 @@ Evaluate this plan against the PRD:
|
|
|
386
388
|
2. Task granularity — is each task completable in one work session?
|
|
387
389
|
3. Dependencies — correct and complete dependency chain?
|
|
388
390
|
4. Gaps — missing tasks, edge cases, security concerns?
|
|
389
|
-
5.
|
|
391
|
+
5. Parallelism — are there unnecessary sequential dependencies? Tasks that don't share files or types should be independent. Flag any chain that could be split into concurrent streams.
|
|
392
|
+
6. Critical path — what's the longest dependency chain? Could it be shortened by restructuring?
|
|
390
393
|
|
|
391
394
|
Output your verdict as SHIP, NEEDS_WORK, or MAJOR_RETHINK with detailed feedback.`;
|
|
392
395
|
}
|
package/crew/handlers/review.ts
CHANGED
|
@@ -216,7 +216,8 @@ Review this plan for:
|
|
|
216
216
|
2. Task granularity - Are tasks appropriately sized?
|
|
217
217
|
3. Dependencies - Are dependencies correct and complete?
|
|
218
218
|
4. Gaps - Are there missing tasks or edge cases?
|
|
219
|
-
5.
|
|
219
|
+
5. Parallelism - Are there unnecessary sequential dependencies? Tasks that don't share files or types should be independent.
|
|
220
|
+
6. Critical path - What's the longest dependency chain? Could it be shortened?
|
|
220
221
|
|
|
221
222
|
Output your verdict as SHIP (plan is solid), NEEDS_WORK (minor adjustments), or MAJOR_RETHINK (fundamental issues).`;
|
|
222
223
|
|