@oh-my-pi/pi-coding-agent 16.4.4 → 16.4.6
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 +62 -0
- package/dist/cli.js +3799 -3729
- package/dist/types/async/job-manager.d.ts +8 -0
- package/dist/types/cli/bench-cli.d.ts +1 -7
- package/dist/types/cli/usage-cli.d.ts +1 -0
- package/dist/types/commands/usage.d.ts +7 -0
- package/dist/types/config/settings-schema.d.ts +19 -9
- package/dist/types/config/settings.d.ts +3 -2
- package/dist/types/discovery/helpers.d.ts +2 -2
- package/dist/types/extensibility/extensions/types.d.ts +36 -0
- package/dist/types/irc/bus.d.ts +4 -0
- package/dist/types/modes/components/__tests__/pause-screen.test.d.ts +1 -0
- package/dist/types/modes/components/ask-dialog.d.ts +27 -0
- package/dist/types/modes/components/custom-editor.d.ts +3 -8
- package/dist/types/modes/components/index.d.ts +2 -1
- package/dist/types/modes/components/model-browser.d.ts +100 -0
- package/dist/types/modes/components/model-hub.d.ts +52 -0
- package/dist/types/modes/components/pause-screen.d.ts +43 -0
- package/dist/types/modes/components/session-selector.d.ts +13 -0
- package/dist/types/modes/components/tool-execution.d.ts +2 -0
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +2 -1
- package/dist/types/modes/controllers/input-controller.d.ts +2 -0
- package/dist/types/modes/interactive-mode.d.ts +3 -0
- package/dist/types/modes/queue-input.d.ts +8 -0
- package/dist/types/modes/shared.d.ts +1 -1
- package/dist/types/modes/types.d.ts +4 -0
- package/dist/types/session/agent-session.d.ts +1 -1
- package/dist/types/session/agent-storage.d.ts +57 -0
- package/dist/types/session/session-context.d.ts +9 -0
- package/dist/types/task/executor.d.ts +26 -13
- package/dist/types/task/index.d.ts +12 -11
- package/dist/types/task/label.d.ts +4 -0
- package/dist/types/task/repair-args.d.ts +8 -8
- package/dist/types/task/types.d.ts +31 -56
- package/dist/types/tools/ask.d.ts +12 -0
- package/dist/types/tools/conflict-detect.d.ts +17 -1
- package/dist/types/tools/job.d.ts +16 -0
- package/package.json +12 -12
- package/scripts/build-binary.ts +0 -1
- package/scripts/compile-binary.ts +4 -3
- package/src/async/job-manager.ts +9 -0
- package/src/cli/bench-cli.ts +7 -26
- package/src/cli/usage-cli.ts +11 -0
- package/src/commands/usage.ts +13 -2
- package/src/commit/agentic/tools/analyze-file.ts +2 -3
- package/src/config/settings-schema.ts +18 -7
- package/src/config/settings.ts +13 -4
- package/src/discovery/helpers.ts +3 -4
- package/src/extensibility/custom-tools/loader.ts +70 -37
- package/src/extensibility/extensions/types.ts +46 -0
- package/src/irc/bus.ts +61 -20
- package/src/modes/components/__tests__/pause-screen.test.ts +143 -0
- package/src/modes/components/advisor-config.ts +32 -22
- package/src/modes/components/ask-dialog.ts +888 -0
- package/src/modes/components/custom-editor.test.ts +58 -1
- package/src/modes/components/custom-editor.ts +42 -11
- package/src/modes/components/index.ts +2 -1
- package/src/modes/components/model-browser.ts +769 -0
- package/src/modes/components/model-hub.ts +2002 -0
- package/src/modes/components/pause-screen.ts +208 -0
- package/src/modes/components/session-selector.ts +299 -42
- package/src/modes/components/tool-execution.ts +2 -0
- package/src/modes/components/usage-row.ts +5 -6
- package/src/modes/controllers/event-controller.ts +8 -2
- package/src/modes/controllers/extension-ui-controller.ts +252 -5
- package/src/modes/controllers/input-controller.ts +140 -6
- package/src/modes/controllers/selector-controller.ts +160 -97
- package/src/modes/controllers/tan-command-controller.ts +1 -1
- package/src/modes/controllers/todo-command-controller.ts +1 -2
- package/src/modes/interactive-mode.ts +8 -0
- package/src/modes/queue-input.ts +132 -0
- package/src/modes/shared.ts +1 -1
- package/src/modes/theme/theme.ts +3 -3
- package/src/modes/types.ts +4 -0
- package/src/modes/utils/ui-helpers.ts +50 -24
- package/src/prompts/agents/scout.md +0 -1
- package/src/prompts/agents/task.md +1 -1
- package/src/prompts/system/subagent-system-prompt.md +1 -5
- package/src/prompts/system/subagent-yield-reminder.md +10 -0
- package/src/prompts/system/task-label.md +23 -0
- package/src/prompts/tools/job.md +1 -1
- package/src/prompts/tools/task-summary.md +3 -0
- package/src/prompts/tools/task.md +17 -18
- package/src/session/agent-session.ts +186 -49
- package/src/session/agent-storage.ts +330 -3
- package/src/session/history-storage.ts +1 -34
- package/src/session/session-context.test.ts +73 -0
- package/src/session/session-context.ts +43 -26
- package/src/slash-commands/builtin-registry.ts +18 -0
- package/src/task/agents.ts +2 -0
- package/src/task/executor.ts +159 -46
- package/src/task/index.ts +377 -239
- package/src/task/label.ts +38 -0
- package/src/task/render.ts +74 -22
- package/src/task/repair-args.ts +20 -31
- package/src/task/spawn-policy.test.ts +4 -4
- package/src/task/types.ts +46 -66
- package/src/tools/ask.ts +233 -40
- package/src/tools/conflict-detect.ts +102 -5
- package/src/tools/index.ts +1 -0
- package/src/tools/irc.ts +20 -11
- package/src/tools/job.ts +158 -18
- package/src/tools/write.ts +70 -6
- package/src/vibe/runtime.ts +1 -1
- package/src/web/search/providers/browser-headers.ts +30 -13
- package/dist/types/modes/components/model-selector.d.ts +0 -37
- package/dist/types/tools/bash-command-fixup.d.ts +0 -3
- package/src/modes/components/model-selector.ts +0 -1291
- package/src/tools/bash-command-fixup.ts +0 -4
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
type SkillPromptDetails,
|
|
47
47
|
} from "../../session/messages";
|
|
48
48
|
import type { SessionContext } from "../../session/session-context";
|
|
49
|
+
import { replaceTabs } from "../../tools/render-utils";
|
|
49
50
|
import { buildSkillCommandPrompt, invokeSkillCommandFromText, isKnownSkillCommand } from "../skill-command";
|
|
50
51
|
import { createAssistantMessageComponent } from "./interactive-context-helpers";
|
|
51
52
|
import {
|
|
@@ -557,14 +558,35 @@ export class UiHelpers {
|
|
|
557
558
|
// hand it back to the controller so a follow-up `todo` update keeps
|
|
558
559
|
// displacing instead of stacking. Idle rebuilds (resume / compaction)
|
|
559
560
|
// fall through to the seal path so the snapshot freezes as history.
|
|
560
|
-
if (todoSnapshot && this.ctx.
|
|
561
|
+
if (todoSnapshot && this.ctx.viewSession.isStreaming) {
|
|
561
562
|
this.ctx.eventController?.inheritDisplaceableTodo(todoSnapshot);
|
|
562
563
|
todoSnapshot = null;
|
|
563
564
|
} else {
|
|
564
565
|
resolveTodoSnapshot();
|
|
565
566
|
}
|
|
566
567
|
|
|
567
|
-
|
|
568
|
+
// Entries still in `pendingTools` are toolCalls whose result never landed
|
|
569
|
+
// during the replay — with `keepDanglingToolCalls` these are exactly the
|
|
570
|
+
// turn's in-flight calls (assistant turn persisted at message_end, tool
|
|
571
|
+
// still executing). While the viewed session streams, keep them tracked so
|
|
572
|
+
// the live event stream routes `tool_execution_update`/`_end` into the
|
|
573
|
+
// rebuilt components instead of dropping the result; their args are final,
|
|
574
|
+
// so mark them complete. Idle rebuilds have no result coming: seal so the
|
|
575
|
+
// blocks freeze as history instead of pinning the live region, then clear
|
|
576
|
+
// so reconstructed historical components never leak into live tracking.
|
|
577
|
+
// (`rebuildChatFromMessages` builds its context WITHOUT dangling calls and
|
|
578
|
+
// restores its own preserved live components afterwards — for that caller
|
|
579
|
+
// the map is empty here either way.)
|
|
580
|
+
if (this.ctx.viewSession.isStreaming) {
|
|
581
|
+
for (const [toolCallId, component] of this.ctx.pendingTools) {
|
|
582
|
+
component.setArgsComplete(toolCallId);
|
|
583
|
+
}
|
|
584
|
+
} else {
|
|
585
|
+
for (const component of this.ctx.pendingTools.values()) {
|
|
586
|
+
component.seal();
|
|
587
|
+
}
|
|
588
|
+
this.ctx.pendingTools.clear();
|
|
589
|
+
}
|
|
568
590
|
this.ctx.ui.requestRender();
|
|
569
591
|
}
|
|
570
592
|
|
|
@@ -586,8 +608,14 @@ export class UiHelpers {
|
|
|
586
608
|
this.ctx.pendingPythonComponents = [];
|
|
587
609
|
|
|
588
610
|
// Live display uses the compacted transcript tail; export/resume callers
|
|
589
|
-
// can still request the full inline compaction history.
|
|
590
|
-
|
|
611
|
+
// can still request the full inline compaction history. Mid-turn rebuilds
|
|
612
|
+
// (focus attach/unfocus while a tool executes) keep dangling toolCalls so
|
|
613
|
+
// the in-flight call re-renders as pending instead of vanishing;
|
|
614
|
+
// renderSessionContext then keeps it in `pendingTools` for live routing.
|
|
615
|
+
const context = this.ctx.viewSession.buildTranscriptSessionContext({
|
|
616
|
+
collapseCompactedHistory: true,
|
|
617
|
+
keepDanglingToolCalls: this.ctx.viewSession.isStreaming,
|
|
618
|
+
});
|
|
591
619
|
this.ctx.renderSessionContext(context, {
|
|
592
620
|
updateFooter: true,
|
|
593
621
|
populateHistory: !this.ctx.focusedAgentId,
|
|
@@ -650,35 +678,33 @@ export class UiHelpers {
|
|
|
650
678
|
this.ctx.pendingMessagesContainer.disposeChildren();
|
|
651
679
|
const queuedMessages = this.ctx.viewSession.getQueuedMessages() as QueuedMessages;
|
|
652
680
|
|
|
653
|
-
const steeringMessages
|
|
654
|
-
for (const message of queuedMessages.steering) {
|
|
655
|
-
steeringMessages.push({ message, label: "Steer" });
|
|
656
|
-
}
|
|
681
|
+
const steeringMessages = [...queuedMessages.steering];
|
|
657
682
|
for (const entry of this.ctx.compactionQueuedMessages as CompactionQueuedMessage[]) {
|
|
658
|
-
if (entry.mode === "steer")
|
|
659
|
-
steeringMessages.push({ message: entry.text, label: "Steer" });
|
|
660
|
-
}
|
|
683
|
+
if (entry.mode === "steer") steeringMessages.push(entry.text);
|
|
661
684
|
}
|
|
662
685
|
|
|
663
|
-
const followUpMessages
|
|
664
|
-
for (const message of queuedMessages.followUp) {
|
|
665
|
-
followUpMessages.push({ message, label: "Follow-up" });
|
|
666
|
-
}
|
|
686
|
+
const followUpMessages = [...queuedMessages.followUp];
|
|
667
687
|
for (const entry of this.ctx.compactionQueuedMessages as CompactionQueuedMessage[]) {
|
|
668
|
-
if (entry.mode === "followUp")
|
|
669
|
-
followUpMessages.push({ message: entry.text, label: "Follow-up" });
|
|
670
|
-
}
|
|
688
|
+
if (entry.mode === "followUp") followUpMessages.push(entry.text);
|
|
671
689
|
}
|
|
672
690
|
|
|
673
|
-
const
|
|
674
|
-
|
|
691
|
+
const groups = [
|
|
692
|
+
{ label: "Steering", messages: steeringMessages },
|
|
693
|
+
{ label: "After yield", messages: followUpMessages },
|
|
694
|
+
].filter(group => group.messages.length > 0);
|
|
695
|
+
if (groups.length > 0) {
|
|
675
696
|
this.ctx.pendingMessagesContainer.addChild(new Spacer(1));
|
|
676
|
-
for (const
|
|
677
|
-
const
|
|
678
|
-
this.ctx.pendingMessagesContainer.addChild(new TruncatedText(
|
|
697
|
+
for (const group of groups) {
|
|
698
|
+
const heading = theme.fg("muted", `${group.label}${theme.sep.dot}${group.messages.length}`);
|
|
699
|
+
this.ctx.pendingMessagesContainer.addChild(new TruncatedText(heading, 1, 0));
|
|
700
|
+
for (let index = 0; index < group.messages.length; index++) {
|
|
701
|
+
const message = replaceTabs(group.messages[index] ?? "").replace(/\r?\n/g, " ↵ ");
|
|
702
|
+
const queuedText = theme.fg("dim", ` ${index + 1}. ${message}`);
|
|
703
|
+
this.ctx.pendingMessagesContainer.addChild(new TruncatedText(queuedText, 1, 0));
|
|
704
|
+
}
|
|
679
705
|
}
|
|
680
706
|
const dequeueKey = this.ctx.keybindings.getDisplayString("app.message.dequeue") || "Alt+Up";
|
|
681
|
-
const hintText = theme.fg("dim",
|
|
707
|
+
const hintText = theme.fg("dim", ` ${theme.tree.hook} ${dequeueKey} to edit`);
|
|
682
708
|
this.ctx.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));
|
|
683
709
|
}
|
|
684
710
|
}
|
|
@@ -13,5 +13,5 @@ You MUST maintain hyperfocus on the assigned task. NEVER deviate from it.
|
|
|
13
13
|
- You SHOULD prefer edits to existing files over creating new ones.
|
|
14
14
|
- You NEVER create documentation files (*.md) unless explicitly requested.
|
|
15
15
|
- You MUST follow the assignment and the instructions given to you. They were given for a reason.
|
|
16
|
-
- When you delegate further with the `task` tool,
|
|
16
|
+
- When you delegate further with the `task` tool, pick the most specific `agent` type for each spawn; use the general-purpose worker only when no listed specialist fits.
|
|
17
17
|
</directives>
|
|
@@ -3,10 +3,6 @@ ROLE
|
|
|
3
3
|
|
|
4
4
|
{{agent}}
|
|
5
5
|
|
|
6
|
-
{{#if role}}
|
|
7
|
-
You are specializing as: **{{role}}**. Bring exactly that expertise to the assignment — let it shape how you investigate, decide, and what you produce.
|
|
8
|
-
{{/if}}
|
|
9
|
-
|
|
10
6
|
{{#if context}}
|
|
11
7
|
CONTEXT
|
|
12
8
|
===================================
|
|
@@ -42,7 +38,7 @@ You can reach other live agents via the `irc` tool. Your id is `{{ircSelfId}}`.
|
|
|
42
38
|
{{ircPeers}}
|
|
43
39
|
|
|
44
40
|
Use `irc` only for quick coordination, never long-form content. Address peers by id or use `"all"` to broadcast.
|
|
45
|
-
- Discovery: the roster above shows each peer
|
|
41
|
+
- Discovery: the roster above shows each peer and what it is doing now; `irc` op:"list" refreshes it.
|
|
46
42
|
- Coordination: before you edit a file or start work a sibling may already own, message that peer first — overlapping edits collide.
|
|
47
43
|
- Follow-up: answer a peer's question with a short reply (set `replyTo`); use `await` only when you genuinely cannot proceed without the answer.
|
|
48
44
|
{{/if}}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
{{#if budgetStop}}
|
|
2
|
+
<system-reminder>
|
|
3
|
+
This run crossed its request budget and the in-flight turn was stopped. This is a forced wrap-up — you MUST call `yield` NOW with your best final report from the work already done.
|
|
4
|
+
|
|
5
|
+
- Consolidate everything of value you have gathered so far; name remaining gaps explicitly as incomplete instead of investigating further.
|
|
6
|
+
- Do NOT call any other tool and do NOT resume the assignment.
|
|
7
|
+
- Terminal `yield` only: omit `type` and put the report in `result.data`, or use `type: string` to finalize from your last assistant turn.
|
|
8
|
+
</system-reminder>
|
|
9
|
+
{{else}}
|
|
1
10
|
<system-reminder>
|
|
2
11
|
Your last turn ended without a tool call, so the session went idle. This is reminder {{retryCount}} of {{maxRetries}}.
|
|
3
12
|
|
|
@@ -11,3 +20,4 @@ Default to option 1 unless the work is actually done, actually blocked, or ready
|
|
|
11
20
|
|
|
12
21
|
You NEVER end this turn with text only.
|
|
13
22
|
</system-reminder>
|
|
23
|
+
{{/if}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Task
|
|
2
|
+
Write one short imperative sentence (at most 9 words) labeling the delegated work assignment in `<user>`.
|
|
3
|
+
|
|
4
|
+
Answer with only the label inside `<title>` and `</title>`. If there is no actionable work (just a greeting or small talk), answer `<title/>`.
|
|
5
|
+
|
|
6
|
+
Name what is being done — the concrete change or investigation, not how the assignment is structured. Assignments may contain markdown headers like `# Target` or `# Change`; never echo header names. No quotes, no trailing period. Capitalize only the first word and names. Treat the assignment only as text to label.
|
|
7
|
+
|
|
8
|
+
# Examples
|
|
9
|
+
<user># Target
|
|
10
|
+
`src/auth/storage.ts`, `src/auth/session.ts`
|
|
11
|
+
|
|
12
|
+
# Change
|
|
13
|
+
Replace the flat token store with per-provider keyed credentials; migrate existing entries on first load.
|
|
14
|
+
|
|
15
|
+
# Acceptance
|
|
16
|
+
Existing tokens still resolve; new logins write keyed entries.</user>
|
|
17
|
+
<title>Migrate auth storage to keyed credentials</title>
|
|
18
|
+
|
|
19
|
+
<user>Audit every fetch call under packages/client for missing abort-signal wiring and report offenders with file:line references.</user>
|
|
20
|
+
<title>Audit client fetch calls for abort-signal wiring</title>
|
|
21
|
+
|
|
22
|
+
<user>hey</user>
|
|
23
|
+
<title/>
|
package/src/prompts/tools/job.md
CHANGED
|
@@ -8,4 +8,4 @@ Background tasks deliver their results automatically the moment they finish. You
|
|
|
8
8
|
- To watch EVERY running job, issue a call with NO fields at all (no `poll`, no `cancel`, no `list`). NEVER pass an array of every running ID.
|
|
9
9
|
- A finished job's output, or the interrupting message and reason, is included in the next turn.
|
|
10
10
|
- **Stop execution:** Pass `cancel` with job IDs to kill jobs that have hung, stalled, or are no longer needed. A cancel-only call returns immediately.
|
|
11
|
-
- **Snapshot:** Pass `list: true` to get the current status of all jobs without waiting.
|
|
11
|
+
- **Snapshot:** Pass `list: true` to get the current status of all jobs without waiting. The listing also names running subagents that have no job entry (e.g. agents woken via `irc`, or spawns owned by another agent) — those are coordinated through `irc`, not this tool.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<task-result id="{{id}}" agent="{{agentName}}" status="{{status}}" duration="{{duration}}">
|
|
2
2
|
{{#if meta}}<meta lines="{{meta.lineCount}}" size="{{meta.charSize}}" />{{/if}}
|
|
3
|
+
{{#if abortReason}}
|
|
4
|
+
<abort-reason>{{abortReason}}{{#if resumable}} — the agent is still live with its full context; message it via `irc` to resume instead of redoing the work.{{/if}}</abort-reason>
|
|
5
|
+
{{/if}}
|
|
3
6
|
{{#if truncated}}
|
|
4
7
|
<preview full-output="agent://{{id}}">
|
|
5
8
|
{{preview}}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
{{#if asyncEnabled}}{{#if batchEnabled}}Delegate work to background subagents by passing multiple items in a single `tasks[]` batch.{{else}}Delegate work to ONE background subagent per call.{{/if}}
|
|
2
|
-
Execution does not block your turn: you receive agent and job IDs immediately, and the final results deliver themselves when the subagents finish.{{
|
|
2
|
+
Execution does not block your turn: you receive agent and job IDs immediately, and the final results deliver themselves when the subagents finish.{{#if hasBlockingAgents}}
|
|
3
|
+
Exception: agents marked BLOCKING below run inline — their results return in this call, while non-blocking items in the same batch still spawn as background jobs.{{/if}}{{else}}{{#if batchEnabled}}Run subagents synchronously by passing items in a `tasks[]` batch.{{else}}Run ONE subagent synchronously per call.{{/if}}
|
|
3
4
|
Execution blocks your turn: the call only returns once the work is completely finished.{{/if}}
|
|
4
5
|
|
|
5
|
-
#
|
|
6
|
-
- **
|
|
7
|
-
- **No overhead:** Each
|
|
8
|
-
- **One-pass agents:** Prefer agents that investigate **and** edit in a single pass; only spin a read-only discovery step (e.g. `scout`) when the affected files are genuinely unknown.
|
|
6
|
+
# Task Design
|
|
7
|
+
- **Agent typing:** Choose each item's `agent` type first. Read-only research MUST use `agent: "scout"`, which runs on a faster model. Use the default worker only when no listed specialist fits.
|
|
8
|
+
- **No overhead:** Each `task` MUST instruct its agent to skip formatters, linters, and project-wide test suites. You will run those once at the end.
|
|
9
|
+
- **One-pass agents:** Prefer agents that investigate **and** edit in a single pass; only spin a read-only discovery step (e.g. `agent: "scout"`) when the affected files are genuinely unknown.
|
|
9
10
|
|
|
10
11
|
# Inputs
|
|
11
|
-
- `agent` (optional): The base agent type to use (e.g., `scout`, `reviewer`). Defaults to `{{defaultAgent}}`{{#if defaultAgentIsGeneric}} (the general-purpose worker){{/if}} — omit it for the default worker instead of passing `agent: "{{defaultAgent}}"`.{{#if allowedAgentsText}} Current spawn policy allows: {{allowedAgentsText}}.{{/if}}
|
|
12
12
|
{{#if batchEnabled}}
|
|
13
13
|
- `context`: Shared project state, constraints, and contracts. Applies to the entire batch; do not duplicate this background into individual tasks.
|
|
14
14
|
- `tasks[]`: Array of subagents to spawn.
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `role`: The specialist this subagent embodies. Tailor per spawn; do not clone a generic worker.
|
|
15
|
+
- `name`: A stable CamelCase identifier (≤32 chars), used to address the agent (IRC, job ids). Generated automatically if omitted.
|
|
16
|
+
- `agent`: The agent type running this item (e.g. `scout`, `reviewer`). Omitting it gives you the general-purpose worker (`{{defaultAgent}}`) — NEVER pass that name explicitly. Only omit it after checking the agent list below and finding no specialist that fits.{{#if allowedAgentsText}} Current spawn policy allows: {{allowedAgentsText}}.{{/if}}
|
|
17
|
+
- `task`: Complete, self-contained instructions. One-liners or missing acceptance criteria are PROHIBITED.
|
|
19
18
|
{{#if isolationEnabled}}
|
|
20
19
|
- `isolated`: Run in a dedicated worktree and return patches. Isolated agents are destroyed upon completion and cannot be addressed afterward.
|
|
21
20
|
{{/if}}
|
|
22
21
|
{{else}}
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `role`: The specialist this subagent embodies. Tailor per spawn; do not clone a generic worker.
|
|
22
|
+
- `name`: A stable CamelCase identifier (≤32 chars), used to address the agent (IRC, job ids). Generated automatically if omitted.
|
|
23
|
+
- `agent`: The agent type to spawn (e.g. `scout`, `reviewer`). Omitting it gives you the general-purpose worker (`{{defaultAgent}}`) — NEVER pass that name explicitly. Only omit it after checking the agent list below and finding no specialist that fits.{{#if allowedAgentsText}} Current spawn policy allows: {{allowedAgentsText}}.{{/if}}
|
|
24
|
+
- `task`: Complete, self-contained instructions. One-liners or missing acceptance criteria are PROHIBITED.
|
|
27
25
|
{{#if isolationEnabled}}
|
|
28
26
|
- `isolated`: Run in a dedicated worktree and return patches. Isolated agents are destroyed upon completion and cannot be addressed afterward.
|
|
29
27
|
{{/if}}
|
|
@@ -33,9 +31,9 @@ Execution blocks your turn: the call only returns once the work is completely fi
|
|
|
33
31
|
Subagents start blank. They have no access to your conversation history.
|
|
34
32
|
{{#if ircEnabled}}- **Steering delivery:** Parent-to-subagent IRC is delivered immediately as steering; subagents blocked in `job poll` / `irc wait` do not need to poll separately for it.{{/if}}
|
|
35
33
|
{{#if batchEnabled}}
|
|
36
|
-
- Pass large payloads using `local://<path>` URIs,
|
|
34
|
+
- Pass large payloads using `local://<path>` URIs, NEVER inline text.
|
|
37
35
|
{{else}}
|
|
38
|
-
- Write shared project state ONCE to a `local://` file (e.g., `local://ctx.md`) and reference that URL in
|
|
36
|
+
- Write shared project state ONCE to a `local://` file (e.g., `local://ctx.md`) and reference that URL in each `task`.
|
|
39
37
|
{{/if}}
|
|
40
38
|
|
|
41
39
|
# Format Contracts
|
|
@@ -46,7 +44,7 @@ The `context` field MUST follow this format:
|
|
|
46
44
|
# Contract ← shared interfaces
|
|
47
45
|
{{/if}}
|
|
48
46
|
|
|
49
|
-
The `
|
|
47
|
+
The `task` field MUST follow this format:
|
|
50
48
|
# Target ← exact files and symbols; explicit non-goals
|
|
51
49
|
# Change ← step-by-step add/remove/rename; APIs and patterns
|
|
52
50
|
# Acceptance ← observable result; no project-wide commands
|
|
@@ -55,8 +53,9 @@ The `assignment` field MUST follow this format:
|
|
|
55
53
|
{{#if spawningDisabled}}
|
|
56
54
|
Agent spawning is currently disabled.
|
|
57
55
|
{{else}}
|
|
56
|
+
Pick the most specific agent for each task. Use the default worker only when no specialist below fits.
|
|
58
57
|
{{#list agents join="\n"}}
|
|
59
|
-
### {{name}}{{#if readOnly}} (READ-ONLY: no edit/write/command tools){{/if}}
|
|
58
|
+
### {{name}}{{#if readOnly}} (READ-ONLY: no edit/write/command tools){{/if}}{{#if blocking}} (BLOCKING: runs inline; its result returns in this call){{/if}}
|
|
60
59
|
{{description}}
|
|
61
60
|
{{#if readOnly}}Use ONLY for investigation and reporting; do the edits yourself or assign them to a writing agent.{{/if}}
|
|
62
61
|
{{/list}}
|