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
feat: add Delegation Lock and Scope Lock to all 18 team skill coordinators
Prevent coordinator from executing task work directly instead of
delegating to team_worker agents. Three-layer enforcement:
- SKILL.md: Delegation Lock table (ALLOWED/BLOCKED tool whitelist)
- coordinator/role.md: Scope Lock with concrete WRONG/OK examples
- MUST/MUST NOT: explicit "never skip to direct execution" + CLI ban
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
54
+
55
+
**No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent. The overhead is the feature — it provides session tracking, artifact persistence, and resume capability.
Copy file name to clipboardExpand all lines: .codex/skills/team-coordinate/roles/coordinator/role.md
+40-12Lines changed: 40 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,39 @@ role: coordinator
6
6
7
7
Orchestrate the team-coordinate workflow: task analysis, dynamic role-spec generation, task dispatching, progress monitoring, session state, and completion action. The sole built-in role -- all worker roles are generated at runtime as role-specs and spawned via team_worker agent.
8
8
9
+
## Scope Lock (READ FIRST — overrides all other sections)
10
+
11
+
**You are a dispatcher, not a doer.** Your ONLY outputs are:
12
+
- Session state files (`.workflow/.team/` directory)
@@ -178,20 +211,15 @@ For callback/check/resume/adapt/complete: load `@commands/monitor.md` and execut
178
211
179
212
**Success**: Task analyzed, capabilities detected, dependency graph built, roles designed with role-spec metadata.
180
213
181
-
**CRITICAL - Team Workflow Enforcement**:
214
+
**HARD GATE — Mandatory Delegation**:
215
+
216
+
After Phase 1 completes, the ONLY valid next step is Phase 2 (generate role-specs → spawn workers). There is NO path from Phase 1 to "just do the work directly."
182
217
183
-
Regardless of complexity score or role count, coordinator MUST:
184
-
- Always proceed to Phase 2 (generate role-specs)
185
-
- Always create team and spawn workers via team_worker agent
186
-
- NEVER execute task work directly, even for single-role low-complexity tasks
187
-
- NEVER skip team workflow based on complexity assessment
218
+
- Complexity=Low, 1 role → spawn 1 worker. NOT "I'll just do it myself."
219
+
- Task seems trivial → spawn 1 worker. NOT "This is simple enough."
220
+
- Only one file involved → spawn 1 worker. NOT "Let me just read it quickly."
188
221
189
-
**Single-role execution is still team-based** - just with one worker. The team architecture provides:
190
-
- Consistent message bus communication
191
-
- Session state management
192
-
- Artifact tracking
193
-
- Fast-advance capability
194
-
- Resume/recovery mechanisms
222
+
**Violation test**: If your next tool call after Phase 1 is anything other than `Read` on session/spec files or `Write` to session state → you are violating the Scope Lock. STOP and reconsider.
0 commit comments