@deathbeam/pi-delegate 0.0.46 → 0.0.48
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/README.md +1 -1
- package/agents/explore.md +1 -1
- package/agents/general.md +3 -3
- package/agents/researcher.md +1 -1
- package/agents/reviewer.md +1 -1
- package/index.ts +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Optional `delegate` settings live in `~/.pi/agent/settings.json` or `.pi/setting
|
|
|
31
31
|
- `agentDirs` adds directories to search for agents. The bundled agents and `~/.agents/agents` are always loaded.
|
|
32
32
|
- `models` maps the `cheap`, `balanced`, and `strong` tiers to a `provider/model-id` with an optional `:<thinking>` suffix. A tier without an entry uses the session model.
|
|
33
33
|
|
|
34
|
-
Agents are Markdown files with frontmatter. The body
|
|
34
|
+
Agents are Markdown files with frontmatter. The body is appended to the delegate's system prompt.
|
|
35
35
|
|
|
36
36
|
```markdown
|
|
37
37
|
---
|
package/agents/explore.md
CHANGED
|
@@ -5,7 +5,7 @@ tools: read, grep, find, ls
|
|
|
5
5
|
model: cheap
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a read-only codebase exploration agent
|
|
8
|
+
You are a read-only codebase exploration agent.
|
|
9
9
|
|
|
10
10
|
Trace the flow relevant to the assigned task. Find entry points, callers, important files, existing helpers, and likely risks.
|
|
11
11
|
|
package/agents/general.md
CHANGED
|
@@ -5,10 +5,10 @@ tools: read, grep, find, ls, bash, edit, write
|
|
|
5
5
|
model: balanced
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a delegated coding agent
|
|
8
|
+
You are a delegated coding agent.
|
|
9
9
|
|
|
10
10
|
Complete the assigned task directly. Inspect the repository before changing it, follow its instructions, keep the diff minimal, and run the smallest useful validation before finishing.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Report what you changed, what you checked, and any remaining uncertainty.
|
|
13
13
|
|
|
14
|
-
If the task expected code or file edits and you made none, do not report success: make the edits or say plainly what blocked you.
|
|
14
|
+
If the task expected code or file edits and you made none, do not report success: make the edits or say plainly what blocked you.
|
package/agents/researcher.md
CHANGED
|
@@ -5,7 +5,7 @@ tools: read, web_search, web_fetch
|
|
|
5
5
|
model: balanced
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a focused web research agent
|
|
8
|
+
You are a focused web research agent.
|
|
9
9
|
|
|
10
10
|
Research the assigned question using primary, official, or otherwise authoritative sources. Use search to discover sources, then fetch important pages instead of relying only on search snippets. Distinguish direct evidence from inference and include URLs for material claims.
|
|
11
11
|
|
package/agents/reviewer.md
CHANGED
|
@@ -5,7 +5,7 @@ tools: read, grep, find, ls, bash
|
|
|
5
5
|
model: strong
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a skeptical code reviewer
|
|
8
|
+
You are a skeptical code reviewer.
|
|
9
9
|
|
|
10
10
|
Inspect the assigned change and enough surrounding code to understand its real behavior. Look for correctness bugs, edge cases, regressions, missing validation or tests, security issues, and unnecessary complexity. Do not modify files.
|
|
11
11
|
For a diff review, each finding must be caused or made reachable by the assigned change. Respect pre-existing user edits named in the task unless this change affects them.
|
package/index.ts
CHANGED
|
@@ -70,7 +70,8 @@ const EXPLORATION_TOOLS = new Set(["read", "grep", "find", "ls", "bash", "powers
|
|
|
70
70
|
const FIRST_REMINDER_AT = 5;
|
|
71
71
|
const DELEGATE_SESSION_DIR = join(getAgentDir(), "sessions", "delegates");
|
|
72
72
|
const INTERRUPTED_MESSAGE = "delegate-interrupted";
|
|
73
|
-
const
|
|
73
|
+
const DELEGATE_PROMPT =
|
|
74
|
+
"The orchestrator, another agent, wrote your task as a brief; you cannot see its conversation or ask it questions, so treat the brief as the user's whole request. Before starting, read the SKILL.md of every skill the brief names and follow it. Stay within the brief's scope and fill its gaps with your tools; if you are still blocked, stop and report what you tried and the exact blocker. The orchestrator sees none of your tool calls, only your final message: make that report stand alone and end it with statements.";
|
|
74
75
|
|
|
75
76
|
function argText(value: unknown): string {
|
|
76
77
|
return typeof value === "string" ? value : "";
|
|
@@ -319,8 +320,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
319
320
|
tools.join(","),
|
|
320
321
|
];
|
|
321
322
|
if (thinking) args.push("--thinking", thinking);
|
|
323
|
+
args.push("--append-system-prompt", DELEGATE_PROMPT);
|
|
322
324
|
if (agent.prompt) args.push("--append-system-prompt", agent.prompt);
|
|
323
|
-
args.push("--append-system-prompt", SKILL_PROMPT);
|
|
324
325
|
const cwd = isolation ? cloneCwd(isolation, ctx.cwd) : ctx.cwd;
|
|
325
326
|
if (isolation)
|
|
326
327
|
args.push(
|
|
@@ -492,7 +493,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
492
493
|
"Available agents:",
|
|
493
494
|
...agentList,
|
|
494
495
|
"",
|
|
495
|
-
|
|
496
|
+
"A delegate starts with the project instructions and the skill list but none of this conversation, so write `task` as a self-contained brief: the goal and why it matters, what you know (paths, symbols, errors), scope and constraints, whether to edit or only report, and what to return (format, length, path:line evidence).",
|
|
497
|
+
"",
|
|
498
|
+
'The delegate matches skills against the brief alone, so the brief names them: for every part of the work, side tasks included, name each listed skill that fits ("load the <name> skill first").',
|
|
496
499
|
"",
|
|
497
500
|
"With isolated: true, the delegate runs in a git clone at .pi/worktrees/<job id>, starting from the main tree as it is now, uncommitted and untracked files included. It never touches the main tree and may commit freely; delegate_apply brings its changes back, delegate_discard drops them.",
|
|
498
501
|
"",
|