Agent Teams Command — 安德智能体集群指挥系统 (V8.1)
Strategic intent and final integration remain serial; owned execution runs in dynamically scaled parallel squadrons (5, 10, 50, 100+ agents). Use the Ender lens for commander intent and squad autonomy, Palantir for operational objects/actions, and von Neumann for executable process architecture. Detailed patterns: references/ender-palantir-command-patterns.md; examples: references/classic-campaigns.md.
Usage Template
Provide: mission, time SLA, task list candidate, workstreams, scaling tier (5/10/50/100+), dependencies, acceptance criteria, token budget (ETC limit), permissions, runtime capabilities, and integration owner.
Workflow
- Mission Intake & Scale Triage: Analyze mission complexity and select the smallest supported tier: Tier 1 (Squad: 5 agents), Tier 2 (Squadron: 10 agents), Tier 3 (Battle Group: 50 agents), or Tier 4 (Fleet: 100+ agents). If the runtime exposes fewer slots, cap the active fleet to that observed limit.
- Pre-flight Task List & Token Gate: Generate structured task list with explicit owner, territory, expected output, verification command, and token budget (ETC).
- Territory Mapping: Partition work into non-overlapping directories or git worktrees. Every worker gets strictly exclusive write boundaries.
If dependencies, write ownership, or verification commands are ambiguous, return NEEDS_INPUT or INSUFFICIENT_EVIDENCE. Do not launch parallel workers before pre-flight task list and token ledger are fully reconciled.
- Launch Workers: Dispatch workers in parallel across isolated worktrees. Each receives a typed
context_manifest containing only its objective, dependencies, territory, inputs, output schema, budget, and verifier.
- Typed IPC & Command Board: Workers report state transitions (
pending -> active -> review -> accepted -> closed) to shared command board.
- Independent Verification: Evaluator and reviewer agents verify worker outputs against objective criteria. No worker self-certification.
- Serial Integration & Join Gate: Integrator aggregates verified artifacts and receipts in dependency order. Do not merge private branch transcripts into the integration context. Run regression tests.
- Durable Write-back & Cleanup: Persist execution receipts, update system logs, and clean up temporary worktree branches.
For high-risk operations or cross-repo modifications, require independent review and human approval. Prepare a rollback plan before applying writes.
Audit total token consumption against the mission-declared TCLR: verified tasks resolved per 10,000 effective tokens consumed. Higher is better; do not invent a universal threshold. Verify all workstreams reached accepted or closed state, no file ownership conflicts occurred, and the declared regression suite passed.
max_attempts: 2. Stop on repeated failure signature or NO_PROGRESS. If a worker stalls or fails, reassign territory or downgrade to serial execution rather than launching unbudgeted retries.
Persist {mission_id, run_id, status, attempt, budget, token_ledger, task_list, worker_fleet, context_manifest, command_board, evidence, unknowns, next_action} in durable storage.
Failure Protocol
NEEDS_INPUT: Ambiguous mission scope or overlapping territory; prompt for clarification before launch.
INSUFFICIENT_EVIDENCE: Missing verification command or unverified worker output; reject merge.
BLOCKED_PERMISSION: Worker lacks required tool or file write permission; escalate to commander.
BLOCKED_DEPENDENCY: Upstream task failed; suspend dependent workers until resolved.
VERIFY_FAILED: Artifact fails independent evaluation; reject and trigger bounded repair.
NO_PROGRESS: Worker produces duplicate errors after 2 attempts; stop worker and flag for review.
BUDGET_STOP: Token consumption exceeds allocated ETC budget; trigger automatic halt. max_attempts: 2.
Output Contract
Return status, result (worker fleet summary, task resolution ledger, and verified artifacts), evidence (source receipts, lint receipts, and integration logs), unknowns, and next_action including approval or rollback when relevant.
Edge Cases
- File Collision: Two workers attempt to modify the same file -> Integrator serializes execution and assigns one canonical owner.
- Worker Runaway: Worker exceeds token budget without progress -> Heartbeat monitor triggers instant
BUDGET_STOP kill.
- Context Drift: Worker hallucinates outside its assigned territory -> Reviewer rejects output and logs territory violation.
Success Metrics
- 100% of pre-flight tasks resolved with verifiable evidence.
- Zero file write collisions across concurrent workers.
- Total token expenditure remains within allocated ETC budget.
- Wall-clock time reduced significantly compared to single-agent baseline.
Quality Gates
1---2name: agent-teams-command3description: Use when work has genuinely independent streams or distinct builder, evaluator, domain, and integration roles that require bounded multi-agent command scaled from 5 to 100+ agents.4---56# Agent Teams Command — 安德智能体集群指挥系统 (V8.1)78<skill_contract>9 <input>A mission with independently ownable workstreams, time SLA requirements, pre-flight task list, token budget, interfaces, permissions, and an integration owner.</input>10 <output>An isolated worker fleet (5 to 100+ agents), typed IPC ledger, pre-allocated token ledger, serial integration, cleanup, and evidence receipts.</output>11 <done>Pre-flight task list is 100% reconciled, integrated artifacts pass mission checks, token consumption is within TCLR boundaries, and cleanup gates pass.</done>12 <non_goals>Parallelism without a task list, unbounded token burn, overlapping writers, or worker self-certification.</non_goals>1314Strategic intent and final integration remain serial; owned execution runs in dynamically scaled parallel squadrons (5, 10, 50, 100+ agents). Use the Ender lens for commander intent and squad autonomy, Palantir for operational objects/actions, and von Neumann for executable process architecture. Detailed patterns: `references/ender-palantir-command-patterns.md`; examples: `references/classic-campaigns.md`.1516## Usage Template1718Provide: mission, time SLA, task list candidate, workstreams, scaling tier (5/10/50/100+), dependencies, acceptance criteria, token budget (ETC limit), permissions, runtime capabilities, and integration owner.1920## Workflow2122<intake>23241. **Mission Intake & Scale Triage**: Analyze mission complexity and select the smallest supported tier: Tier 1 (Squad: 5 agents), Tier 2 (Squadron: 10 agents), Tier 3 (Battle Group: 50 agents), or Tier 4 (Fleet: 100+ agents). If the runtime exposes fewer slots, cap the active fleet to that observed limit.252. **Pre-flight Task List & Token Gate**: Generate structured task list with explicit owner, territory, expected output, verification command, and token budget (ETC).263. **Territory Mapping**: Partition work into non-overlapping directories or git worktrees. Every worker gets strictly exclusive write boundaries.2728</intake>2930<unknowns_gate>3132If dependencies, write ownership, or verification commands are ambiguous, return `NEEDS_INPUT` or `INSUFFICIENT_EVIDENCE`. Do not launch parallel workers before pre-flight task list and token ledger are fully reconciled.3334</unknowns_gate>3536<execute>37381. **Launch Workers**: Dispatch workers in parallel across isolated worktrees. Each receives a typed `context_manifest` containing only its objective, dependencies, territory, inputs, output schema, budget, and verifier.392. **Typed IPC & Command Board**: Workers report state transitions (`pending` -> `active` -> `review` -> `accepted` -> `closed`) to shared command board.403. **Independent Verification**: Evaluator and reviewer agents verify worker outputs against objective criteria. No worker self-certification.414. **Serial Integration & Join Gate**: Integrator aggregates verified artifacts and receipts in dependency order. Do not merge private branch transcripts into the integration context. Run regression tests.425. **Durable Write-back & Cleanup**: Persist execution receipts, update system logs, and clean up temporary worktree branches.4344For high-risk operations or cross-repo modifications, require independent review and human approval. Prepare a rollback plan before applying writes.4546</execute>4748<evaluate>4950Audit total token consumption against the mission-declared TCLR: verified tasks resolved per 10,000 effective tokens consumed. Higher is better; do not invent a universal threshold. Verify all workstreams reached `accepted` or `closed` state, no file ownership conflicts occurred, and the declared regression suite passed.5152</evaluate>5354<retry_policy>5556`max_attempts: 2`. Stop on repeated failure signature or `NO_PROGRESS`. If a worker stalls or fails, reassign territory or downgrade to serial execution rather than launching unbudgeted retries.5758</retry_policy>5960<state_contract>6162Persist `{mission_id, run_id, status, attempt, budget, token_ledger, task_list, worker_fleet, context_manifest, command_board, evidence, unknowns, next_action}` in durable storage.6364</state_contract>6566## Failure Protocol6768- `NEEDS_INPUT`: Ambiguous mission scope or overlapping territory; prompt for clarification before launch.69- `INSUFFICIENT_EVIDENCE`: Missing verification command or unverified worker output; reject merge.70- `BLOCKED_PERMISSION`: Worker lacks required tool or file write permission; escalate to commander.71- `BLOCKED_DEPENDENCY`: Upstream task failed; suspend dependent workers until resolved.72- `VERIFY_FAILED`: Artifact fails independent evaluation; reject and trigger bounded repair.73- `NO_PROGRESS`: Worker produces duplicate errors after 2 attempts; stop worker and flag for review.74- `BUDGET_STOP`: Token consumption exceeds allocated ETC budget; trigger automatic halt. `max_attempts: 2`.7576## Output Contract7778Return `status`, `result` (worker fleet summary, task resolution ledger, and verified artifacts), `evidence` (source receipts, lint receipts, and integration logs), `unknowns`, and `next_action` including approval or rollback when relevant.7980## Edge Cases8182- **File Collision**: Two workers attempt to modify the same file -> Integrator serializes execution and assigns one canonical owner.83- **Worker Runaway**: Worker exceeds token budget without progress -> Heartbeat monitor triggers instant `BUDGET_STOP` kill.84- **Context Drift**: Worker hallucinates outside its assigned territory -> Reviewer rejects output and logs territory violation.8586## Success Metrics8788- 100% of pre-flight tasks resolved with verifiable evidence.89- Zero file write collisions across concurrent workers.90- Total token expenditure remains within allocated ETC budget.91- Wall-clock time reduced significantly compared to single-agent baseline.9293## Quality Gates9495- [ ] Pre-flight task list and token ledger reconciled before execution.96- [ ] Exclusive write territories assigned to all active workers.97- [ ] Independent reviewer verified all deliverables (no self-certification).98- [ ] Integrator executed serial merge with passing regression suite.99- [ ] High-risk operations received independent review, human approval, and rollback readiness.100- [ ] Worktrees cleaned up and durable receipts written to system log.101102</skill_contract>