mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-25 19:48:33 +08:00
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>
This commit is contained in:
@@ -51,6 +51,30 @@ Parse `$ARGUMENTS`:
|
||||
- Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
|
||||
- No `--role` → `roles/coordinator/role.md`, execute entry router
|
||||
|
||||
## Delegation Lock
|
||||
|
||||
**Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
|
||||
|
||||
Before calling ANY tool, apply this check:
|
||||
|
||||
| Tool Call | Verdict | Reason |
|
||||
|-----------|---------|--------|
|
||||
| `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
|
||||
| `request_user_input` | ALLOWED | User interaction |
|
||||
| `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
|
||||
| `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
|
||||
| `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
|
||||
| `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
|
||||
| `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
|
||||
| `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
|
||||
| `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
|
||||
|
||||
**If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
|
||||
|
||||
**No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
|
||||
|
||||
---
|
||||
|
||||
## Shared Constants
|
||||
|
||||
- **Session prefix**: `RD`
|
||||
|
||||
Reference in New Issue
Block a user