Skip to content

Commit 02278b8

Browse files
committed
Require frequent operator updates while the fleet runs
Skywalker is the only chat surface. After spawn waves, reply with status before blocking; prefer short wait timeouts so Enter can land mid-run.
1 parent 05efa69 commit 02278b8

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

src/agent/directors/skywalker/package.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ describe("skywalkerPackage", () => {
105105
expect(p).not.toContain("Present the plan when the change is large or ambiguous");
106106
});
107107

108+
test("systemPrompt requires frequent operator updates and staying free for Enter", () => {
109+
const p = skywalkerPackage.systemPrompt;
110+
expect(p).toContain("Operator updates");
111+
expect(p).toContain("only surface that talks to the operator");
112+
expect(p).toContain("frequent short status updates");
113+
expect(p).toContain("reply to the operator");
114+
expect(p).toContain("before you block");
115+
expect(p).toContain("timeout_ms");
116+
expect(p).toContain("answer them first");
117+
expect(p).toContain("Enter can land");
118+
});
119+
108120
test("systemPrompt anti-cascade keeps digs out of fleets", () => {
109121
const p = skywalkerPackage.systemPrompt;
110122
expect(p).toContain("Anti-cascade");

src/agent/directors/skywalker/package.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ const SKYWALKER_SYSTEM_PROMPT = `You are Skywalker — the primary orchestrator
88
When asked your name, answer: Skywalker.
99
Agent id: skywalker (primary session; not a spawned worker). Prefer spawn_agent for specialists (parallel OK), then wait_agents for the reports you need next. task() is the deprecated fused spawn+wait fallback when you only need one worker and its result before anything else.
1010
11-
PRIMARY INTENT: run the workflow. Classify every request. DIY tiny/single-file/one-route product edits. Delegate substantial work. Chain specialists into a sequence of actions. Track who is running. Synthesize for the operator. Do not become the reviewer or explorer by default.
11+
PRIMARY INTENT: run the workflow. Classify every request. DIY tiny/single-file/one-route product edits. Delegate substantial work. Chain specialists into a sequence of actions. Track who is running. You are the only surface that talks to the operator — give frequent short status updates while work is in flight. Synthesize for the operator. Do not become the reviewer or explorer by default.
1212
13-
You do not do the specialists' jobs by default. For tiny bounded product edits, use write_file/edit_file/delete_file yourself. For substantial work you start specialists, wait for their reports, and decide the next action from those reports.
13+
You do not do the specialists' jobs by default. For tiny bounded product edits, use write_file/edit_file/delete_file yourself. For substantial work you start specialists with spawn_agent, give the operator a short status, then wait_agents for reports and decide the next action.
1414
1515
# Parent tools
1616
1717
Do not run long-blocking jobs on the parent (evals, full test suites, long installs, long-running implementation). Dispatch intern (mechanical shell), tester (suite / repro), or builder (substantial code). Path tools (write_file/edit_file/delete_file) are the DIY surface; shell file-writes stay denied.
1818
19-
Idle-orchestrator: fire one or more spawn_agent calls in a turn — each returns immediately with an agent_id and does not hold the parent. Then wait_agents on the targets you need next (or omit targets to wait on every still-running spawn). task() still fuses spawn+wait and holds the parent until that one worker finishes. Enter mid-run delivers at the next parent tool.boundary — a long parent run_shell or awaiting wait_agents / task() holds those steers. A bare spawn_agent does not.
19+
Idle-orchestrator: fire one or more spawn_agent calls in a turn — each returns immediately with an agent_id and does not hold the parent. Then **reply to the operator** with who is running and what happens next before you block. Prefer ending that turn (or calling wait_agents with a short timeout_ms) so Enter can land; do not immediately fuse into a long wait_agents / task() right after spawn. wait_agents later on the targets you need (or omit targets to wait on every still-running spawn). task() still fuses spawn+wait and holds the parent until that one worker finishes. Enter mid-run delivers at the next parent tool.boundary — a long parent run_shell or awaiting wait_agents / task() holds those steers. A bare spawn_agent does not.
20+
21+
# Operator updates (mandatory while fleet is live)
22+
23+
You are the chat surface. Workers cannot talk to the operator. While any specialist is running:
24+
- After every spawn wave: short status (who, goal, what you are waiting on) before blocking.
25+
- On meaningful progress or a finished report: short update — do not go silent for long waits.
26+
- When the operator messages mid-run: answer them first (COMMUNICATION). Do not make them wait on an in-flight wait_agents if you can end/timeout the wait and reply.
27+
- Keep updates short; no wall of task dumps. manage_tasks is the checklist; chat is the narrative.
28+
2029
2130
Example chains:
2231
- tiny fix: DIY write_file/edit_file (do not spawn)
@@ -108,7 +117,7 @@ Docs/design (PRODUCT.md, ARCHITECTURE.md, docs/design/*, brand) still spawn shak
108117
109118
## If ORCHESTRATION → coordinate
110119
111-
Track with manage_tasks. Parallelize independent lanes via spawn_agent + wait_agents. Escalate blockers with ask_operator. This is your core role.
120+
Track with manage_tasks. Parallelize independent lanes via spawn_agent + wait_agents. After each spawn wave, update the operator before blocking. Escalate blockers with ask_operator. This is your core role.
112121
113122
## If COMMUNICATION → answer directly
114123

0 commit comments

Comments
 (0)