@melihmucuk/pi-crew 1.0.7 → 1.0.9
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/agents/code-reviewer.md +18 -6
- package/agents/planner.md +9 -1
- package/agents/quality-reviewer.md +20 -13
- package/agents/scout.md +33 -26
- package/dist/agent-discovery.d.ts +0 -5
- package/dist/agent-discovery.js +1 -1
- package/dist/bootstrap-session.d.ts +13 -4
- package/dist/bootstrap-session.js +25 -16
- package/dist/index.js +37 -7
- package/dist/integration/register-command.d.ts +2 -2
- package/dist/integration/register-command.js +5 -5
- package/dist/integration/register-renderers.js +3 -0
- package/dist/integration/register-tools.d.ts +2 -2
- package/dist/integration/register-tools.js +2 -2
- package/dist/integration/tool-presentation.d.ts +2 -3
- package/dist/integration/tool-presentation.js +7 -8
- package/dist/integration/tools/crew-abort.d.ts +1 -1
- package/dist/integration/tools/crew-abort.js +3 -3
- package/dist/integration/tools/crew-done.d.ts +1 -1
- package/dist/integration/tools/crew-done.js +2 -2
- package/dist/integration/tools/crew-list.d.ts +1 -1
- package/dist/integration/tools/crew-list.js +3 -3
- package/dist/integration/tools/crew-respond.d.ts +1 -1
- package/dist/integration/tools/crew-respond.js +6 -7
- package/dist/integration/tools/crew-spawn.d.ts +1 -1
- package/dist/integration/tools/crew-spawn.js +17 -14
- package/dist/integration/tools/tool-deps.d.ts +3 -2
- package/dist/integration.d.ts +2 -2
- package/dist/integration.js +3 -3
- package/dist/runtime/crew-runtime.d.ts +61 -0
- package/dist/{crew-manager.js → runtime/crew-runtime.js} +84 -58
- package/dist/runtime/delivery-coordinator.d.ts +16 -7
- package/dist/runtime/delivery-coordinator.js +46 -20
- package/dist/runtime/subagent-registry.d.ts +1 -0
- package/dist/runtime/subagent-registry.js +3 -0
- package/dist/runtime/subagent-state.d.ts +2 -0
- package/dist/status-widget.d.ts +2 -2
- package/dist/status-widget.js +3 -3
- package/dist/subagent-messages.d.ts +5 -2
- package/dist/subagent-messages.js +5 -4
- package/docs/architecture.md +106 -843
- package/package.json +1 -1
- package/prompts/pi-crew-plan.md +82 -123
- package/prompts/pi-crew-review.md +64 -115
- package/dist/crew-manager.d.ts +0 -44
package/package.json
CHANGED
package/prompts/pi-crew-plan.md
CHANGED
|
@@ -11,171 +11,130 @@ description: Run parallel subagents to investigate a codebase and produce an imp
|
|
|
11
11
|
## Role
|
|
12
12
|
|
|
13
13
|
This is an orchestration prompt.
|
|
14
|
-
|
|
14
|
+
Understand the task, gather minimal orientation context, delegate discovery to scout subagents, collect their findings, delegate planning to a planner subagent, and relay the planner's result to the user.
|
|
15
15
|
|
|
16
|
-
Do not perform deep
|
|
16
|
+
Do not perform deep investigation yourself.
|
|
17
17
|
Do not write the plan yourself.
|
|
18
|
-
Do not modify
|
|
18
|
+
Do not modify files.
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
- Do not read full source files before spawning scouts.
|
|
23
|
-
- Do not perform broad codebase searches yourself.
|
|
24
|
-
- Gather only enough context to understand what the task is and how to split the discovery work across scouts.
|
|
25
|
-
- Detailed file reading, pattern analysis, and dependency tracing belong to the scouts.
|
|
26
|
-
- Plan creation belongs to the planner.
|
|
27
|
-
|
|
28
|
-
## Required Workflow
|
|
29
|
-
|
|
30
|
-
### 1) Understand the task
|
|
20
|
+
## Task Resolution
|
|
31
21
|
|
|
32
22
|
Determine the task from:
|
|
33
23
|
|
|
34
|
-
-
|
|
35
|
-
- the current conversation context
|
|
24
|
+
- additional instructions, if provided
|
|
25
|
+
- otherwise the current conversation context
|
|
36
26
|
|
|
37
|
-
If the task is still unclear
|
|
27
|
+
If the task is still unclear, ask the user to clarify before proceeding.
|
|
38
28
|
|
|
39
|
-
Identify
|
|
29
|
+
Identify any user-provided references that subagents may need, including file paths, images, documents, screenshots, or URLs. Include them explicitly in subagent tasks. Do not assume subagents can access this conversation context unless you pass it along.
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
## Orientation Context
|
|
42
32
|
|
|
43
|
-
|
|
33
|
+
Gather only enough context to assign focused scout tasks.
|
|
44
34
|
|
|
45
|
-
|
|
46
|
-
- key config files (package.json, go.mod, Cargo.toml, etc.) to identify language, framework, dependencies
|
|
47
|
-
- README or AGENTS.md if present, for project conventions
|
|
35
|
+
Start with:
|
|
48
36
|
|
|
49
|
-
|
|
37
|
+
- top-level project structure
|
|
38
|
+
- key config files to identify language, framework, and dependencies
|
|
39
|
+
- README or AGENTS.md if present
|
|
50
40
|
|
|
51
|
-
If
|
|
41
|
+
If needed, do lightweight exploration to find the relevant areas:
|
|
52
42
|
|
|
53
|
-
- browse
|
|
54
|
-
- read a few lines of entry points or index files
|
|
55
|
-
- run targeted searches
|
|
43
|
+
- browse directories
|
|
44
|
+
- read a few lines of entry points or index files
|
|
45
|
+
- run targeted searches for task-related terms
|
|
56
46
|
|
|
57
|
-
|
|
47
|
+
Stop once you can assign specific scout scopes.
|
|
48
|
+
Do not trace call chains, analyze implementations, or read full files.
|
|
58
49
|
|
|
59
|
-
|
|
50
|
+
## Scout Execution
|
|
60
51
|
|
|
61
52
|
Call `crew_list` first and verify `scout` is available.
|
|
62
53
|
|
|
63
|
-
Spawn
|
|
64
|
-
|
|
65
|
-
- the project root path
|
|
66
|
-
- the specific area or question to investigate
|
|
67
|
-
- enough framing so the scout knows what to look for
|
|
68
|
-
|
|
69
|
-
Strategic scout allocation:
|
|
70
|
-
|
|
71
|
-
- If the task touches a single area, one scout may suffice.
|
|
72
|
-
- If the task spans multiple areas (e.g., API + database + frontend), spawn a separate scout per area.
|
|
73
|
-
- If the task requires understanding an existing pattern before proposing changes, dedicate a scout to "find existing patterns/conventions for X".
|
|
74
|
-
- Do not spawn more than 4 scouts. Each scout should have a distinct, non-overlapping investigation focus.
|
|
75
|
-
|
|
76
|
-
Each scout task must include:
|
|
77
|
-
|
|
78
|
-
- the user's original task (so the scout understands **why** it is investigating)
|
|
79
|
-
- project root path
|
|
80
|
-
- the orientation context you already gathered (language, framework, key dependencies, project structure, conventions) so the scout does not repeat this work
|
|
81
|
-
- clear investigation scope (which directories, files, or concepts to explore)
|
|
82
|
-
- what specific information to return (types, interfaces, data flow, dependencies, etc.)
|
|
83
|
-
- any external references from the user (file paths, image paths, documents) that are relevant to this scout's scope, with instructions to inspect them
|
|
84
|
-
- explicit instruction that it is read-only
|
|
54
|
+
Spawn up to 4 scouts in parallel. Each scout must have a distinct, non-overlapping focus.
|
|
85
55
|
|
|
86
|
-
|
|
56
|
+
Each scout task should include:
|
|
87
57
|
|
|
88
|
-
|
|
58
|
+
- the user's task
|
|
59
|
+
- project root
|
|
60
|
+
- minimal orientation context already gathered
|
|
61
|
+
- explicit investigation scope
|
|
62
|
+
- the specific information to return
|
|
63
|
+
- any relevant user-provided references
|
|
64
|
+
- explicit read-only instruction
|
|
89
65
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Do not predict or fabricate scout findings.
|
|
93
|
-
Wait for all `crew-result` messages.
|
|
66
|
+
If the task touches one area, one scout may be enough.
|
|
67
|
+
If it spans multiple areas, split scouts by area or question.
|
|
94
68
|
|
|
95
|
-
Scout
|
|
69
|
+
## Scout Waiting and Recovery
|
|
96
70
|
|
|
97
|
-
|
|
71
|
+
Wait for all spawned scouts to return.
|
|
72
|
+
Do not synthesize partial findings.
|
|
73
|
+
Do not fabricate scout results.
|
|
74
|
+
Do not poll repeatedly while waiting; results arrive asynchronously.
|
|
98
75
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
76
|
+
If a scout fails or times out, retry once.
|
|
77
|
+
If a scout returns without useful findings, reformulate the task and spawn a replacement scout.
|
|
78
|
+
If a retried or replacement scout still fails, proceed with the findings you have and note the gap for the planner.
|
|
102
79
|
|
|
103
|
-
|
|
80
|
+
## Planner Execution
|
|
104
81
|
|
|
105
82
|
Call `crew_list` first and verify `planner` is available.
|
|
106
83
|
|
|
107
|
-
Before spawning the planner
|
|
108
|
-
|
|
109
|
-
- Remove duplicate information that multiple scouts reported.
|
|
110
|
-
- Drop generic observations that are not relevant to the task.
|
|
111
|
-
- Keep all specific findings: file paths, function signatures, type definitions, data flows, constraints, and patterns.
|
|
112
|
-
- Organize by area, not by scout. If two scouts reported on overlapping areas, merge their findings under one heading.
|
|
113
|
-
- If scouts reported conflicting information, include both and flag the contradiction.
|
|
114
|
-
|
|
115
|
-
Then spawn the planner subagent with:
|
|
116
|
-
|
|
117
|
-
- the user's original task description (verbatim)
|
|
118
|
-
- any additional user instructions or constraints
|
|
119
|
-
- all external references from the user (file paths, image paths, screenshots, documents, URLs) with instructions to inspect them directly
|
|
120
|
-
- the processed scout findings, organized by area
|
|
121
|
-
- project root path
|
|
122
|
-
- language, framework, key dependencies
|
|
123
|
-
- relevant conventions or constraints discovered by scouts
|
|
124
|
-
- any gaps in discovery (scouts that failed or returned empty) so the planner knows what was not investigated
|
|
125
|
-
- explicit instruction that comprehensive context has been pre-gathered by scouts, and the planner should rely on the provided findings first; it should only perform its own discovery if the provided context is insufficient for a specific aspect
|
|
126
|
-
|
|
127
|
-
The planner is an interactive subagent. It will respond with one of:
|
|
128
|
-
|
|
129
|
-
- **Blocking Questions**: questions that need user input before a plan can be made
|
|
130
|
-
- **Implementation Plan**: the complete plan
|
|
131
|
-
- **No plan needed**: the task is trivial enough that a plan adds no value
|
|
132
|
-
|
|
133
|
-
### 6) Relay planner output
|
|
134
|
-
|
|
135
|
-
When the planner responds:
|
|
84
|
+
Before spawning the planner:
|
|
136
85
|
|
|
137
|
-
|
|
86
|
+
- remove duplicate scout findings
|
|
87
|
+
- drop irrelevant generic observations
|
|
88
|
+
- organize findings by area
|
|
89
|
+
- preserve specific facts, constraints, paths, interfaces, and conflicts
|
|
138
90
|
|
|
139
|
-
|
|
91
|
+
Spawn the planner with:
|
|
140
92
|
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
93
|
+
- the user's task
|
|
94
|
+
- additional instructions or constraints
|
|
95
|
+
- relevant user-provided references
|
|
96
|
+
- processed scout findings
|
|
97
|
+
- project root
|
|
98
|
+
- language, framework, dependencies
|
|
99
|
+
- relevant conventions
|
|
100
|
+
- any discovery gaps
|
|
145
101
|
|
|
146
|
-
|
|
102
|
+
The planner is interactive. It may return:
|
|
147
103
|
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
104
|
+
- Blocking Questions
|
|
105
|
+
- Implementation Plan
|
|
106
|
+
- No plan needed
|
|
151
107
|
|
|
152
|
-
|
|
108
|
+
## Relay
|
|
153
109
|
|
|
154
|
-
|
|
155
|
-
- Briefly explain why no plan is needed.
|
|
156
|
-
- Using the scout findings, suggest that the task can be implemented directly and summarize the relevant context the scouts gathered that would help with implementation.
|
|
110
|
+
Do not rewrite subagent output that is already visible as a steering message.
|
|
157
111
|
|
|
158
|
-
|
|
112
|
+
If the planner returns blocking questions:
|
|
113
|
+
- ask the user to answer them
|
|
114
|
+
- relay the user's response with `crew_respond`
|
|
115
|
+
- wait for the next planner response
|
|
159
116
|
|
|
160
|
-
|
|
161
|
-
-
|
|
117
|
+
If the planner returns an implementation plan:
|
|
118
|
+
- tell the user the plan is ready and ask for approval or feedback
|
|
119
|
+
- relay any feedback with `crew_respond`
|
|
120
|
+
- wait for the updated planner response
|
|
162
121
|
|
|
163
|
-
|
|
122
|
+
If the planner returns no plan needed:
|
|
123
|
+
- close the planner with `crew_done`
|
|
124
|
+
- briefly tell the user no plan is needed and that the task can be implemented directly
|
|
164
125
|
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
- When relaying user feedback to the planner via `crew_respond`, include the user's words verbatim plus any necessary context from the conversation.
|
|
126
|
+
If the user approves the plan:
|
|
127
|
+
- close the planner with `crew_done`
|
|
128
|
+
- confirm that the plan is finalized
|
|
169
129
|
|
|
170
130
|
## Language
|
|
171
131
|
|
|
172
|
-
|
|
173
|
-
When spawning scouts and the planner, instruct them to respond in the same language as the user's prompt.
|
|
132
|
+
Respond to the user in the same language as the user's request.
|
|
174
133
|
|
|
175
|
-
##
|
|
134
|
+
## Rules
|
|
176
135
|
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
136
|
+
- Do not investigate deeply yourself; delegate to scouts.
|
|
137
|
+
- Do not write, modify, or finalize the plan yourself; use the planner.
|
|
138
|
+
- Never answer planner questions on behalf of the user.
|
|
139
|
+
- Never fabricate subagent results.
|
|
140
|
+
- Always wait for explicit user approval before finalizing the plan.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run parallel code and quality reviews
|
|
2
|
+
description: Run parallel code and quality reviews by gathering minimal context and orchestrating reviewer subagents.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Parallel Review
|
|
@@ -11,29 +11,22 @@ description: Run parallel code and quality reviews to ensure high standards and
|
|
|
11
11
|
## Role
|
|
12
12
|
|
|
13
13
|
This is an orchestration prompt.
|
|
14
|
-
|
|
14
|
+
Determine review scope with minimal context gathering, prepare a short neutral brief, spawn the reviewer subagents, wait for their results, and merge them into one final report.
|
|
15
15
|
|
|
16
|
-
Do not
|
|
16
|
+
Do not perform the review yourself.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Scope Rules
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
20
|
+
- If the user specifies a scope (commit, branch, files, PR, or focus area), that scope overrides the default scope.
|
|
21
|
+
- Otherwise, default scope includes:
|
|
22
|
+
- recent commits
|
|
23
|
+
- staged changes
|
|
24
|
+
- unstaged changes
|
|
25
|
+
- untracked files
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Context Gathering
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Default scope, unless the user specifies otherwise:
|
|
32
|
-
|
|
33
|
-
- recent commits
|
|
34
|
-
- staged changes
|
|
35
|
-
- unstaged changes
|
|
36
|
-
- untracked files
|
|
29
|
+
Collect only enough context to define scope and prepare a short brief.
|
|
37
30
|
|
|
38
31
|
Collect:
|
|
39
32
|
|
|
@@ -45,130 +38,86 @@ Collect:
|
|
|
45
38
|
- `git diff --stat`
|
|
46
39
|
- untracked file list
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
Use `git diff --cached` or `git diff` only if diff stats and file names are insufficient.
|
|
50
|
-
|
|
51
|
-
Recent commit range:
|
|
41
|
+
For recent commits:
|
|
52
42
|
|
|
53
43
|
- use `HEAD~3..HEAD` if at least 3 commits exist
|
|
54
44
|
- otherwise use the widest reachable history range
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
Collect for that range:
|
|
57
47
|
|
|
58
48
|
- `git diff --stat <range>`
|
|
59
49
|
- `git diff --name-only <range>`
|
|
60
50
|
|
|
61
|
-
|
|
51
|
+
Rules:
|
|
62
52
|
|
|
63
|
-
|
|
53
|
+
- Do not read full files before spawning subagents.
|
|
54
|
+
- Do not dump raw diffs into the prompt.
|
|
55
|
+
- Do not inspect every changed file manually.
|
|
56
|
+
- Use full diffs or targeted reads only when file names and diff stats are insufficient to produce a short neutral summary.
|
|
57
|
+
- Keep the brief short and descriptive, not analytical.
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
## Subagent Preparation
|
|
66
60
|
|
|
67
|
-
|
|
61
|
+
Call `crew_list` first and verify that both are available:
|
|
68
62
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
63
|
+
- `code-reviewer`
|
|
64
|
+
- `quality-reviewer`
|
|
65
|
+
|
|
66
|
+
Prepare one short brief for both reviewers including:
|
|
67
|
+
|
|
68
|
+
- repo root
|
|
69
|
+
- resolved review scope
|
|
70
|
+
- commit range if any
|
|
71
|
+
- staged / unstaged / untracked status
|
|
72
72
|
- changed files
|
|
73
|
-
-
|
|
73
|
+
- short summary per file or file group
|
|
74
74
|
- additional user instructions
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
## Execution
|
|
77
77
|
|
|
78
|
-
-
|
|
79
|
-
- read only specific files or hunks if needed
|
|
80
|
-
- keep it short
|
|
81
|
-
- do not perform review analysis here
|
|
78
|
+
Spawn `code-reviewer` and `quality-reviewer` in parallel.
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
If one reviewer is unavailable or fails to start, report that clearly and continue with the reviewer that is available.
|
|
84
81
|
|
|
85
|
-
|
|
82
|
+
Do not produce a final report until all successfully spawned reviewers have returned a result.
|
|
83
|
+
Do not poll or repeatedly check active subagents while waiting; results will be delivered asynchronously.
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
- `quality-reviewer`
|
|
85
|
+
## Merge
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
Each task must include:
|
|
87
|
+
Write the final response in the same language as the user's request.
|
|
92
88
|
|
|
93
|
-
|
|
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
|
|
89
|
+
Structure:
|
|
102
90
|
|
|
103
|
-
###
|
|
91
|
+
### Consensus Findings
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
Do not synthesize partial results.
|
|
107
|
-
Wait for two separate `crew-result` messages.
|
|
93
|
+
Merge only findings that are clearly the same issue reported by both reviewers.
|
|
108
94
|
|
|
109
|
-
###
|
|
95
|
+
### Code Review Findings
|
|
110
96
|
|
|
111
|
-
|
|
112
|
-
Use the structure below directly. Do not read any subagent definition files just to reconstruct the format.
|
|
97
|
+
Include findings reported only by `code-reviewer`.
|
|
113
98
|
|
|
114
|
-
|
|
99
|
+
### Quality Review Findings
|
|
115
100
|
|
|
116
|
-
|
|
101
|
+
Include findings reported only by `quality-reviewer`.
|
|
117
102
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
### Final Summary
|
|
104
|
+
|
|
105
|
+
Include:
|
|
106
|
+
|
|
107
|
+
- review scope
|
|
108
|
+
- which reviewers ran
|
|
109
|
+
- consensus findings count
|
|
110
|
+
- code review findings count
|
|
111
|
+
- quality review findings count
|
|
112
|
+
- overall assessment
|
|
124
113
|
|
|
125
114
|
Rules:
|
|
126
115
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
|
169
|
-
|
|
170
|
-
## IMPORTANT
|
|
171
|
-
|
|
172
|
-
- DO NOT perform any code review or quality review analysis yourself.
|
|
173
|
-
- SPAWN the subagents with the review context and WAIT for their results.
|
|
174
|
-
- NEVER PREDICT or FABRICATE results for subagents that have not yet reported back to you.
|
|
116
|
+
- Do not repeat overlapping findings.
|
|
117
|
+
- Do not invent reviewer output, evidence, or counts.
|
|
118
|
+
- Do not present a single-reviewer finding as consensus.
|
|
119
|
+
- If both reviewers report no issues, say so explicitly.
|
|
120
|
+
- If one reviewer failed or was unavailable, say so explicitly.
|
|
121
|
+
- Review only. Do not make code changes.
|
|
122
|
+
- Do not analyze code, infer issues, or produce findings yourself. Only orchestrate reviewers and merge their reported results.
|
|
123
|
+
- Never fabricate subagent results. Wait for all successfully spawned reviewers to return.
|
package/dist/crew-manager.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
|
-
import type { AgentConfig } from "./agent-discovery.js";
|
|
3
|
-
import { type AbortableAgentSummary, type ActiveAgentSummary } from "./runtime/subagent-state.js";
|
|
4
|
-
export type { AbortableAgentSummary, ActiveAgentSummary, } from "./runtime/subagent-state.js";
|
|
5
|
-
export interface AbortOwnedResult {
|
|
6
|
-
abortedIds: string[];
|
|
7
|
-
missingIds: string[];
|
|
8
|
-
foreignIds: string[];
|
|
9
|
-
}
|
|
10
|
-
interface AbortOptions {
|
|
11
|
-
reason: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class CrewManager {
|
|
14
|
-
private extensionResolvedPath;
|
|
15
|
-
private registry;
|
|
16
|
-
private delivery;
|
|
17
|
-
private overflowAbortControllers;
|
|
18
|
-
onWidgetUpdate: (() => void) | undefined;
|
|
19
|
-
constructor(extensionResolvedPath: string);
|
|
20
|
-
activateSession(sessionId: string, isIdle: () => boolean, pi: ExtensionAPI): void;
|
|
21
|
-
spawn(agentConfig: AgentConfig, task: string, cwd: string, ownerSessionId: string, ctx: ExtensionContext, pi: ExtensionAPI): string;
|
|
22
|
-
private attachSessionListeners;
|
|
23
|
-
private attachSpawnedSession;
|
|
24
|
-
/**
|
|
25
|
-
* Single owner for post-prompt and terminal state transitions.
|
|
26
|
-
* Publishes the outcome, updates state, and disposes finished subagents.
|
|
27
|
-
*/
|
|
28
|
-
private settleAgent;
|
|
29
|
-
private disposeAgent;
|
|
30
|
-
private runPromptCycle;
|
|
31
|
-
private spawnSession;
|
|
32
|
-
respond(id: string, message: string, pi: ExtensionAPI, callerSessionId: string): {
|
|
33
|
-
error?: string;
|
|
34
|
-
};
|
|
35
|
-
done(id: string, callerSessionId: string): {
|
|
36
|
-
error?: string;
|
|
37
|
-
};
|
|
38
|
-
abort(id: string, pi: ExtensionAPI, opts: AbortOptions): boolean;
|
|
39
|
-
abortOwned(ids: string[], callerSessionId: string, pi: ExtensionAPI, opts: AbortOptions): AbortOwnedResult;
|
|
40
|
-
abortAllOwned(callerSessionId: string, pi: ExtensionAPI, opts: AbortOptions): string[];
|
|
41
|
-
abortForOwner(ownerSessionId: string, pi: ExtensionAPI): void;
|
|
42
|
-
getAbortableAgents(): AbortableAgentSummary[];
|
|
43
|
-
getActiveSummariesForOwner(ownerSessionId: string): ActiveAgentSummary[];
|
|
44
|
-
}
|