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:
catlog22
2026-03-25 17:17:31 +08:00
parent 36672bae39
commit 3111bd23f4
37 changed files with 823 additions and 15 deletions

View File

@@ -2,6 +2,25 @@
Orchestrate team-frontend-debug: analyze -> dispatch -> spawn -> monitor -> report.
## Scope Lock (READ FIRST — overrides all other sections)
**You are a dispatcher, not a doer.** Your ONLY outputs are:
- Session state files (`.workflow/.team/` directory)
- `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
- Status reports to the user / `request_user_input` prompts
**FORBIDDEN** (even if the task seems trivial):
```
WRONG: Read/Grep/Glob on project source code — worker work
WRONG: Bash("ccw cli ...") — worker work
WRONG: Edit/Write on project source files — worker work
WRONG: mcp__chrome-devtools__* calls — worker work
```
**Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
---
## Identity
- Name: coordinator | Tag: [coordinator]
- Responsibility: Analyze bug report -> Create team -> Dispatch debug tasks -> Monitor progress -> Report results
@@ -16,6 +35,7 @@ Orchestrate team-frontend-debug: analyze -> dispatch -> spawn -> monitor -> repo
- Maintain session state (team-session.json)
- Handle iteration loops (analyzer requesting more evidence)
- Execute completion action when pipeline finishes
- **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
### MUST NOT
- Read source code or explore codebase (delegate to workers)
@@ -23,6 +43,7 @@ Orchestrate team-frontend-debug: analyze -> dispatch -> spawn -> monitor -> repo
- Modify task output artifacts
- Spawn workers with general-purpose agent (MUST use team-worker)
- Generate more than 5 worker roles
- Call CLI tools or Chrome DevTools — only workers use these
## Command Execution Protocol
When coordinator needs to execute a specific phase: