@melihmucuk/pi-crew 1.0.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/LICENSE +21 -0
- package/README.md +199 -0
- package/agents/code-reviewer.md +145 -0
- package/agents/planner.md +142 -0
- package/agents/quality-reviewer.md +164 -0
- package/agents/scout.md +58 -0
- package/agents/worker.md +81 -0
- package/dist/agent-discovery.d.ts +34 -0
- package/dist/agent-discovery.js +527 -0
- package/dist/bootstrap-session.d.ts +11 -0
- package/dist/bootstrap-session.js +63 -0
- package/dist/crew-manager.d.ts +43 -0
- package/dist/crew-manager.js +235 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +27 -0
- package/dist/integration/register-command.d.ts +3 -0
- package/dist/integration/register-command.js +51 -0
- package/dist/integration/register-renderers.d.ts +2 -0
- package/dist/integration/register-renderers.js +50 -0
- package/dist/integration/register-tools.d.ts +3 -0
- package/dist/integration/register-tools.js +25 -0
- package/dist/integration/tool-presentation.d.ts +30 -0
- package/dist/integration/tool-presentation.js +29 -0
- package/dist/integration/tools/crew-abort.d.ts +2 -0
- package/dist/integration/tools/crew-abort.js +79 -0
- package/dist/integration/tools/crew-done.d.ts +2 -0
- package/dist/integration/tools/crew-done.js +28 -0
- package/dist/integration/tools/crew-list.d.ts +2 -0
- package/dist/integration/tools/crew-list.js +72 -0
- package/dist/integration/tools/crew-respond.d.ts +2 -0
- package/dist/integration/tools/crew-respond.js +30 -0
- package/dist/integration/tools/crew-spawn.d.ts +2 -0
- package/dist/integration/tools/crew-spawn.js +42 -0
- package/dist/integration/tools/tool-deps.d.ts +8 -0
- package/dist/integration/tools/tool-deps.js +1 -0
- package/dist/integration.d.ts +3 -0
- package/dist/integration.js +8 -0
- package/dist/runtime/delivery-coordinator.d.ts +17 -0
- package/dist/runtime/delivery-coordinator.js +60 -0
- package/dist/runtime/subagent-registry.d.ts +13 -0
- package/dist/runtime/subagent-registry.js +55 -0
- package/dist/runtime/subagent-state.d.ts +34 -0
- package/dist/runtime/subagent-state.js +34 -0
- package/dist/status-widget.d.ts +3 -0
- package/dist/status-widget.js +84 -0
- package/dist/subagent-messages.d.ts +30 -0
- package/dist/subagent-messages.js +58 -0
- package/dist/tool-registry.d.ts +76 -0
- package/dist/tool-registry.js +17 -0
- package/docs/architecture.md +883 -0
- package/package.json +52 -0
- package/prompts/pi-crew:review.md +168 -0
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@melihmucuk/pi-crew",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Non-blocking subagent orchestration for pi coding agent",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/",
|
|
8
|
+
"agents/",
|
|
9
|
+
"prompts/",
|
|
10
|
+
"docs/architecture.md"
|
|
11
|
+
],
|
|
12
|
+
"author": "Melih Mucuk",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"pi-package",
|
|
16
|
+
"ai",
|
|
17
|
+
"agents",
|
|
18
|
+
"subagent",
|
|
19
|
+
"orchestration",
|
|
20
|
+
"coding-agent"
|
|
21
|
+
],
|
|
22
|
+
"pi": {
|
|
23
|
+
"extensions": [
|
|
24
|
+
"./dist/index.js"
|
|
25
|
+
],
|
|
26
|
+
"prompts": [
|
|
27
|
+
"./prompts"
|
|
28
|
+
],
|
|
29
|
+
"video": "https://monkeys-team.ams3.cdn.digitaloceanspaces.com/pi-crew-demo.mp4"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"build": "npm run clean && tsc",
|
|
34
|
+
"typecheck": "tsc --noEmit"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@mariozechner/pi-ai": "*",
|
|
38
|
+
"@mariozechner/pi-agent-core": "*",
|
|
39
|
+
"@mariozechner/pi-coding-agent": "*",
|
|
40
|
+
"@mariozechner/pi-tui": "*",
|
|
41
|
+
"@sinclair/typebox": "*"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@mariozechner/pi-ai": "^0.64.0",
|
|
45
|
+
"@mariozechner/pi-agent-core": "^0.64.0",
|
|
46
|
+
"@mariozechner/pi-coding-agent": "^0.64.0",
|
|
47
|
+
"@mariozechner/pi-tui": "^0.64.0",
|
|
48
|
+
"@sinclair/typebox": "^0.34.49",
|
|
49
|
+
"@types/node": "^22.19.3",
|
|
50
|
+
"typescript": "^5.9.3"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run parallel code and quality reviews to ensure high standards and catch issues early.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Parallel Review
|
|
6
|
+
|
|
7
|
+
## Input
|
|
8
|
+
|
|
9
|
+
**Additional instructions**: `$ARGUMENTS`
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
|
|
13
|
+
This is an orchestration prompt.
|
|
14
|
+
Your job is to determine review scope with minimal context gathering, prepare a short review brief, spawn the reviewer subagents, wait for both results, and merge them into one final report.
|
|
15
|
+
|
|
16
|
+
Do not do the reviewers' job.
|
|
17
|
+
|
|
18
|
+
## Operating Boundaries
|
|
19
|
+
|
|
20
|
+
- Do not read full files before spawning subagents.
|
|
21
|
+
- Do not dump raw diffs into the prompt.
|
|
22
|
+
- Do not inspect every changed file manually.
|
|
23
|
+
- Collect only enough git context to determine scope and produce a short summary.
|
|
24
|
+
- Detailed diff reading, file reading, and issue analysis belong to the subagents.
|
|
25
|
+
- Use targeted extra reads only when file names and diff stats are insufficient.
|
|
26
|
+
|
|
27
|
+
## Required Workflow
|
|
28
|
+
|
|
29
|
+
### 1) Determine scope
|
|
30
|
+
|
|
31
|
+
Default scope, unless the user specifies otherwise:
|
|
32
|
+
|
|
33
|
+
- recent commits
|
|
34
|
+
- staged changes
|
|
35
|
+
- unstaged changes
|
|
36
|
+
- untracked files
|
|
37
|
+
|
|
38
|
+
Collect:
|
|
39
|
+
|
|
40
|
+
- repo root
|
|
41
|
+
- current branch
|
|
42
|
+
- `git status --short`
|
|
43
|
+
- `git log --oneline --decorate -n 5`
|
|
44
|
+
- `git diff --stat --cached`
|
|
45
|
+
- `git diff --stat`
|
|
46
|
+
- untracked file list
|
|
47
|
+
|
|
48
|
+
Do not collect full diffs by default.
|
|
49
|
+
Use `git diff --cached` or `git diff` only if diff stats and file names are insufficient.
|
|
50
|
+
|
|
51
|
+
Recent commit range:
|
|
52
|
+
|
|
53
|
+
- use `HEAD~3..HEAD` if at least 3 commits exist
|
|
54
|
+
- otherwise use the widest reachable history range
|
|
55
|
+
|
|
56
|
+
For that range, collect:
|
|
57
|
+
|
|
58
|
+
- `git diff --stat <range>`
|
|
59
|
+
- `git diff --name-only <range>`
|
|
60
|
+
|
|
61
|
+
Use `git diff <range>` only if needed for a short summary.
|
|
62
|
+
|
|
63
|
+
If the user gives a commit, branch, file, or extra focus area, include it as additional context.
|
|
64
|
+
|
|
65
|
+
### 2) Prepare subagent context
|
|
66
|
+
|
|
67
|
+
Prepare a short brief with:
|
|
68
|
+
|
|
69
|
+
- review scope
|
|
70
|
+
- commit range
|
|
71
|
+
- staged/unstaged/untracked state
|
|
72
|
+
- changed files
|
|
73
|
+
- one-line summary per file or file group
|
|
74
|
+
- additional user instructions
|
|
75
|
+
|
|
76
|
+
Summary rules:
|
|
77
|
+
|
|
78
|
+
- infer first from file paths, status codes, and diff stats
|
|
79
|
+
- read only specific files or hunks if needed
|
|
80
|
+
- keep it short
|
|
81
|
+
- do not perform review analysis here
|
|
82
|
+
|
|
83
|
+
### 3) Spawn reviewers
|
|
84
|
+
|
|
85
|
+
Call `crew_list` first and verify:
|
|
86
|
+
|
|
87
|
+
- `code-reviewer`
|
|
88
|
+
- `quality-reviewer`
|
|
89
|
+
|
|
90
|
+
Spawn both in parallel.
|
|
91
|
+
Each task must include:
|
|
92
|
+
|
|
93
|
+
- repo root
|
|
94
|
+
- review scope
|
|
95
|
+
- commit range
|
|
96
|
+
- staged/unstaged/untracked info
|
|
97
|
+
- changed files
|
|
98
|
+
- short change summary
|
|
99
|
+
- user instructions
|
|
100
|
+
- explicit instruction to inspect diffs and files itself
|
|
101
|
+
- explicit instruction to follow its own output format strictly
|
|
102
|
+
|
|
103
|
+
### 4) Wait
|
|
104
|
+
|
|
105
|
+
Do not produce a final response until both subagents return.
|
|
106
|
+
Do not synthesize partial results.
|
|
107
|
+
Wait for two separate `crew-result` messages.
|
|
108
|
+
|
|
109
|
+
### 5) Merge reports
|
|
110
|
+
|
|
111
|
+
Final output must be in the same language as the user's prompt.
|
|
112
|
+
Use the structure below directly. Do not read any subagent definition files just to reconstruct the format.
|
|
113
|
+
|
|
114
|
+
Order:
|
|
115
|
+
|
|
116
|
+
#### A. Consensus Findings
|
|
117
|
+
|
|
118
|
+
**[SEVERITY] Category: Brief title**
|
|
119
|
+
File: `path/to/file.ts:123` or `path/to/file.ts` (section)
|
|
120
|
+
Issue: Clear merged explanation
|
|
121
|
+
Context/Impact: Runtime or maintenance impact
|
|
122
|
+
Suggestion: Clear fix direction
|
|
123
|
+
Reported by: `code-reviewer`, `quality-reviewer`
|
|
124
|
+
|
|
125
|
+
Rules:
|
|
126
|
+
|
|
127
|
+
- do not repeat the same issue
|
|
128
|
+
- merge equivalent findings
|
|
129
|
+
- if needed, use the stronger justified severity
|
|
130
|
+
|
|
131
|
+
#### B. Code Review Findings
|
|
132
|
+
|
|
133
|
+
**[SEVERITY] Category: Brief title**
|
|
134
|
+
File: `path/to/file.ts:123`
|
|
135
|
+
Issue: ...
|
|
136
|
+
Context: ...
|
|
137
|
+
Suggestion: ...
|
|
138
|
+
Reported by: `code-reviewer`
|
|
139
|
+
|
|
140
|
+
#### C. Quality Review Findings
|
|
141
|
+
|
|
142
|
+
**[SEVERITY] Category: Brief title**
|
|
143
|
+
File: `path/to/file.ts` (functionName or section, line range if identifiable)
|
|
144
|
+
Issue: ...
|
|
145
|
+
Impact: ...
|
|
146
|
+
Suggestion: ...
|
|
147
|
+
Reported by: `quality-reviewer`
|
|
148
|
+
|
|
149
|
+
#### D. Final Summary
|
|
150
|
+
|
|
151
|
+
**Combined Review Summary**
|
|
152
|
+
Files reviewed: [count or list]
|
|
153
|
+
Consensus findings: [count]
|
|
154
|
+
Code review findings: [count by severity]
|
|
155
|
+
Quality review findings: [count by severity]
|
|
156
|
+
Strong signals: [titles found by both reviewers or `none`]
|
|
157
|
+
Overall assessment: [short clear assessment]
|
|
158
|
+
|
|
159
|
+
## Synthesis Rules
|
|
160
|
+
|
|
161
|
+
- do not repeat overlapping issues
|
|
162
|
+
- merge close variants into one item
|
|
163
|
+
- do not invent resolution for reviewer conflicts
|
|
164
|
+
- if both say `No issues found.`, say so explicitly
|
|
165
|
+
- if only one reviewer reports an issue, do not present it as consensus
|
|
166
|
+
- sort by severity
|
|
167
|
+
- no unnecessary introduction
|
|
168
|
+
- review only, no code changes
|