feat(atlas): mandate parallel delegation and add per-model variants

Atlas was delegating tasks one-by-one because the workflow framed parallel
as a conditional ("if tasks can run in parallel..."), letting models default
to the safer sequential path. The new shared ATLAS_PARALLEL_BY_DEFAULT block
flips the default: parallel is mandatory; sequential requires a NAMED
blocking dependency (input dependency or file conflict).

Adds two new prompt variants — kimi (K2.6 thinking-mode calibration:
commitment framing + concrete budgets) and opus-4-7 (counters 4.7's lower
default subagent count and literal-following bias). Recalibrates default
(Claude 4.6 family), gpt (GPT-5.5 outcome-first / decision rules over
absolutes), and gemini (preserves TOOL_CALL_MANDATE; replaces stale
session_id with task_id). All five variants share the parallel mandate
positioned BEFORE the workflow so "mandate above" references resolve.

Strengthens the orchestrator-direct-edit reminder hooks
(ORCHESTRATOR_DELEGATION_REQUIRED + DIRECT_WORK_REMINDER) with the central
challenge "Do you ACTUALLY need to be the one doing this?" — replacing the
previous bullet-heavy framing.

Tests now parametrized over all 5 variants. Adds prompt-routing.test
covering GPT/Gemini/Kimi/Opus 4.7/default routing and edge cases, plus a
session_id rejection test (every variant must use task_id for retries).
This commit is contained in:
YeonGyu-Kim
2026-05-08 16:50:41 +09:00
parent 770825422d
commit c01a89ba43
17 changed files with 918 additions and 604 deletions
+8 -8
View File
@@ -1096,7 +1096,7 @@ session_id: ses_untrusted_999
)
// then
expect(output.output).toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).toContain("DELEGATION REQUIRED")
expect(output.output).toContain("task")
expect(output.output).toContain("task")
})
@@ -1117,7 +1117,7 @@ session_id: ses_untrusted_999
)
// then
expect(output.output).toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).toContain("DELEGATION REQUIRED")
})
test("should NOT append reminder when orchestrator writes inside .sisyphus/", async () => {
@@ -1138,7 +1138,7 @@ session_id: ses_untrusted_999
// then
expect(output.output).toBe(originalOutput)
expect(output.output).not.toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).not.toContain("DELEGATION REQUIRED")
})
test("should NOT append reminder when non-orchestrator writes outside .sisyphus/", async () => {
@@ -1162,7 +1162,7 @@ session_id: ses_untrusted_999
// then
expect(output.output).toBe(originalOutput)
expect(output.output).not.toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).not.toContain("DELEGATION REQUIRED")
cleanupMessageStorage(nonOrchestratorSession)
})
@@ -1226,7 +1226,7 @@ session_id: ses_untrusted_999
// then
expect(output.output).toBe(originalOutput)
expect(output.output).not.toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).not.toContain("DELEGATION REQUIRED")
})
test("should NOT append reminder when orchestrator writes inside .sisyphus with mixed separators", async () => {
@@ -1247,7 +1247,7 @@ session_id: ses_untrusted_999
// then
expect(output.output).toBe(originalOutput)
expect(output.output).not.toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).not.toContain("DELEGATION REQUIRED")
})
test("should NOT append reminder for absolute Windows path inside .sisyphus\\", async () => {
@@ -1268,7 +1268,7 @@ session_id: ses_untrusted_999
// then
expect(output.output).toBe(originalOutput)
expect(output.output).not.toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).not.toContain("DELEGATION REQUIRED")
})
test("should append reminder for Windows path outside .sisyphus\\", async () => {
@@ -1287,7 +1287,7 @@ session_id: ses_untrusted_999
)
// then
expect(output.output).toContain("ORCHESTRATOR, not an IMPLEMENTER")
expect(output.output).toContain("DELEGATION REQUIRED")
})
})
})
+30 -42
View File
@@ -6,24 +6,18 @@ export const DIRECT_WORK_REMINDER = `
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
You just performed direct file modifications outside \`.sisyphus/\`.
**You just edited a source file directly.**
**You are an ORCHESTRATOR, not an IMPLEMENTER.**
Did you ACTUALLY need to be the one doing that?
As an orchestrator, you should:
- **DELEGATE** implementation work to subagents via \`task\`
- **VERIFY** the work done by subagents
- **COORDINATE** multiple tasks and ensure completion
- If this was a tiny verification fix during subagent review → fine, continue.
- If this was implementation work of any size → **you violated orchestrator protocol.** Real work goes through \`task()\`. Revert the change and delegate it via \`task()\`. The subagent has the context, the tools, and the model for that work — you do not.
You should NOT:
- Write code directly (except for \`.sisyphus/\` files like plans and notepads)
- Make direct file edits outside \`.sisyphus/\`
- Implement features yourself
**Atlas does not implement. Atlas orchestrates.** Every direct edit erodes the
delegation pipeline you exist to run, and steals work the subagent is paid to do.
**If you need to make changes:**
1. Use \`task\` to delegate to an appropriate subagent
2. Provide clear instructions in the prompt
3. Verify the subagent's work after completion
Going forward: \`task()\` for implementation. Fan out in PARALLEL when independent
tasks remain — do not dispatch them one at a time.
---
`
@@ -168,47 +162,41 @@ export const ORCHESTRATOR_DELEGATION_REQUIRED = `
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
**STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**
**STOP. Atlas does not edit source code.**
You (Atlas) are attempting to directly modify a file outside \`.sisyphus/\`.
Path attempted: \`$FILE_PATH\`
**Path attempted:** $FILE_PATH
Ask yourself, honestly, before this write goes through:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. **Do you ACTUALLY need to be the one doing this?**
If a subagent could do it via \`task()\` — and the answer is almost always yes — you are stealing the subagent's work.
**THIS IS FORBIDDEN** (except for VERIFICATION purposes)
2. **Is this STRICTLY a small verification fix on subagent output?**
(≤ a couple of lines, fixing something the subagent left wrong during review.)
If yes, fine. If no — STOP this edit. Delegate it.
As an ORCHESTRATOR, you MUST:
1. **DELEGATE** all implementation work via \`task\`
2. **VERIFY** the work done by subagents (reading files is OK)
3. **COORDINATE** - you orchestrate, you don't implement
If you are about to write more than a trivial verification patch, or you are touching code no subagent has produced yet, **you are implementing**. That is forbidden.
**ALLOWED direct file operations:**
- Files inside \`.sisyphus/\` (plans, notepads, drafts)
- Reading files for verification
- Running diagnostics/tests
**Implementing yourself is the single most expensive failure mode of this role.**
Atlas is paid to ORCHESTRATE. The subagents are paid to IMPLEMENT. Every direct edit erodes the delegation pipeline you exist to run.
**FORBIDDEN direct file operations:**
- Writing/editing source code
- Creating new files outside \`.sisyphus/\`
- Any implementation work
Correct action — delegate via \`task()\`. Fan out in PARALLEL when multiple independent items remain (one message, multiple \`task()\` calls — never one-by-one):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**IF THIS IS FOR VERIFICATION:**
Proceed if you are verifying subagent work by making a small fix.
But for any substantial changes, USE \`task\`.
**CORRECT APPROACH:**
\`\`\`
\`\`\`typescript
task(
category="...",
category="quick",
load_skills=[],
prompt="[specific single task with clear acceptance criteria]"
run_in_background=false,
prompt="[6 sections: TASK / EXPECTED OUTCOME / REQUIRED TOOLS / MUST DO / MUST NOT DO / CONTEXT]"
)
\`\`\`
DELEGATE. DON'T IMPLEMENT.
Allowed direct operations:
- \`.sisyphus/\` files (plans, notepads)
- Reading any file (verification)
- Running commands (verification)
Everything else: DELEGATE.
---
`