You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [2.0.3] - 2026-04-16
6
+
7
+
### Fixed
8
+
- Restored main-agent delegation after f831fd2 regression: imperative nudge messages from violation #1, orchestrator stub gains work definition + MUST NOT list + self-catch directive, output style reframes main agent as orchestrator (not executor).
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
## Delegation Policy (Soft Enforcement)
8
8
9
-
The framework nudges via stderr when the main agent uses work-doing tools (`Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `MultiEdit`, `NotebookEdit`) directly. **Nudges never block.** They escalate by per-turn violation count: silent → short hint → warning → strong reminder. The counter resets each turn and zeros when `/workflow-orchestrator:delegate` runs.
9
+
The framework nudges via stderr when the main agent uses work-doing tools (`Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `MultiEdit`, `NotebookEdit`) directly. **Nudges never block.** They escalate by per-turn violation count: silent → imperative STOP → imperative STOP (2nd call phrasing) → strong reminder explaining what's being lost. The counter resets each turn and zeros when `/workflow-orchestrator:delegate` runs.
10
10
11
11
The expected path for any multi-step or work-shaped request is:
12
12
@@ -115,10 +115,9 @@ There is no allowlist. `require_delegation.py` tracks per-turn direct work-tool
115
115
| Violations | Message | Tokens |
116
116
|---|---|---|
117
117
| 0 | (silent) | 0 |
118
-
| 1 |`delegate?`|~2 |
119
-
| 2 |`nudge: use /workflow-orchestrator:delegate for multi-step work`|~12 |
120
-
| 3–4 |`WARNING: N direct tool calls bypassing delegation. Use /workflow-orchestrator:delegate <task>.`|~25 |
121
-
| 5+ | Strong reminder explaining what's being lost |~55 |
118
+
| 1 |`STOP. This tool call bypasses delegation. Abandon this step and run: /workflow-orchestrator:delegate <your task>`|~25 |
119
+
| 2 |`STOP. 2nd direct tool call this turn. The main agent does not execute work tools. Run: /workflow-orchestrator:delegate <your task>`|~28 |
120
+
| 3+ |`STOP. N direct tool calls bypassing delegation. You are losing planning, parallelization, and context isolation. Abandon the current plan and run: /workflow-orchestrator:delegate <your task>`|~55 |
122
121
123
122
Tracked tools (the only ones that count as violations): `Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `MultiEdit`, `NotebookEdit`. These 8 stable primitives are the only ones monitored. New Claude Code tools never trigger nudges.
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,20 +193,21 @@ and then prompt claude with:
193
193
The delegation system uses adaptive nudges instead of hard blocks:
194
194
195
195
```bash
196
-
#Turn 1: Direct tool call (silent)
196
+
#1st direct tool call (imperative STOP)
197
197
Read test.py
198
+
# stderr: "STOP. This tool call bypasses delegation. Abandon this step and run: /workflow-orchestrator:delegate <your task>"
198
199
199
-
#Turn 2: Another direct tool call (hint)
200
+
#2nd direct tool call (imperative STOP, 2nd-call phrasing)
200
201
Read other.py
201
-
# stderr: "delegate?"
202
+
# stderr: "STOP. 2nd direct tool call this turn. The main agent does not execute work tools. Run: /workflow-orchestrator:delegate <your task>"
202
203
203
-
#Turn 3: Third direct tool call (nudge)
204
+
#3rd direct tool call (strong reminder — explains what's being lost)
204
205
Edit file.py
205
-
# stderr: "nudge: use /workflow-orchestrator:delegate for multi-step work"
206
+
# stderr: "STOP. 3 direct tool calls bypassing delegation. You are losing planning, parallelization, and context isolation. Abandon the current plan and run: /workflow-orchestrator:delegate <your task>"
206
207
207
-
#Turn 4: Fourth direct tool call (warning)
208
+
#4th+ direct tool calls keep the same strong reminder with the updated count
208
209
Bash command.sh
209
-
# stderr: "WARNING: 3 direct tool calls bypassing delegation. Use /workflow-orchestrator:delegate <task>."
210
+
# stderr: "STOP. 4 direct tool calls bypassing delegation. ..."
Copy file name to clipboardExpand all lines: output-styles/technical-adaptive.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,14 @@ keep-coding-instructions: true
6
6
7
7
# Response Format
8
8
9
+
The main agent is an orchestrator, not an executor. Work goes through /workflow-orchestrator:delegate. Responses summarize subagent output — they do not describe tool calls the main agent made directly.
10
+
9
11
## Default Mode: Ultra Concise
10
12
11
13
- Deliver only what is necessary. No fluff, no preamble, no recap.
12
14
- Expert-level brevity — assume the user has deep technical knowledge.
13
15
- Direct answers only. No hand-holding.
14
-
- After completing an edit, respond with ONE sentence (e.g., "Done. Added timeout to compact_run.py."). The user can read the diff.
16
+
- After a delegation completes, respond with ONE sentence summarizing what the subagents did (e.g., "Done. Wave 0 added timeout to compact_run.py."). The user can read the diffs and task log.
15
17
- Never restate the user's problem before acting.
16
18
- Never reply "You're absolutely right" or similar affirmations — just act.
The main agent does not execute work tools directly. Use only: Tasks API, AskUserQuestion, and `/workflow-orchestrator:delegate`. The delegate command loads the full orchestrator (planning, agent assignment, execution waves) on demand.
11
+
The main agent does not execute work tools directly. Use only: Tasks API, AskUserQuestion, `/workflow-orchestrator:delegate`, and `/workflow-orchestrator:ask` (read-only questions). The delegate command loads the full orchestrator (planning, agent assignment, execution waves) on demand.
12
12
13
13
## Exception — continuation after plan approval
14
14
15
15
If you received a "PLAN ALREADY APPROVED" or "continuing to STAGE 1" continuation message from the Stop hook, **do NOT re-invoke `/workflow-orchestrator:delegate`** and **do NOT call `EnterPlanMode`** again. The orchestrator is already loaded and the plan is already approved — proceed directly to Stage 1 execution by rendering the dependency graph and spawning Wave 0 agents. In this exception path, the `Agent` tool (plus `TaskCreate`/`TaskUpdate`/`TaskGet` for status, and `TeamCreate`/`SendMessage` if running in team mode) is permitted — these are how Wave 0 phases are spawned. The "all work → delegate" rule above does NOT apply during in-flight delegation continuation.
- Running shell commands (Bash) for anything beyond a single trivial status check
22
+
- Investigating the codebase to answer a question that requires file access → use /workflow-orchestrator:ask
23
+
- Multi-step tasks, even if each step looks simple in isolation
24
+
25
+
## What you MUST NOT do
26
+
27
+
- Do NOT open files with Read to "just check" before deciding — delegate the check
28
+
- Do NOT run `grep`/`find`/`ls` via Bash — delegate
29
+
- Do NOT make "just a small edit" directly — delegate
30
+
- Do NOT chain 2+ tool calls to accomplish one user request — delegate
31
+
32
+
If you catch yourself about to call Bash/Edit/Write/Read/Glob/Grep/MultiEdit/NotebookEdit, STOP and invoke `/workflow-orchestrator:delegate <task>` instead.
33
+
17
34
## Team Mode
18
35
19
36
If `TeamCreate` is in your available tools, agent teams are enabled. When you run `/workflow-orchestrator:delegate`, default to team mode (`TeamCreate` + `Agent(team_name=...)`) for multi-agent work. If `TeamCreate` is not available, the delegate flow falls back to parallel subagents automatically.
0 commit comments