<< All versions

Skill v1.0.1

currentAutomated scan100/100
monkilabs/opencastle/orchestration-protocols

+2 new

──Details
PublishedAugust 29, 2026 at 06:39 AM
Content Hashsha256:9b5cb8d75d382fab...
Git SHAf297837635b1
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 4.5 KB)
SKILL.md4.5 KBactive
SKILL.md · 123 lines · 4.5 KB

version: "1.0.1" name: orchestration-protocols description: "Coordinate multiple agents: parallel spawning, health monitoring, circuit breakers, escalation. Use for parallel agents, agent timeouts, fan-out tasks, multi-agent delegation."


Orchestration Protocols

Runtime patterns for delegated agents.

Active Steering

Intervene early on:

SignalAction
Failing tests/buildsCheck dependency resolution; revert if builds break
Unexpected file changesRevert; enforce partition
Scope creepRedirect to scoped files only
Circular behaviorHalt; switch approach
Intent misunderstandingClarify prompt; re-delegate

When redirecting, state why + how:

"Don't modify libs/data/src/lib/product.ts — shared across features. Add the new query in libs/data/src/lib/reviews.ts."

Sub-agents: steer live, within the first 5 min. Background agents: no live steering — front-load prompt specificity, partition constraints, acceptance criteria checklists.

Background Agents

Run autonomously in isolated Git worktrees. Reserve for well-scoped tasks >5 min with clear acceptance criteria.

  • Spawn: Delegate Session → Background → Select agent → Enter prompt
  • Interrupted: opencastle convoy resume picks up where the run stopped

Parallel Research Protocol

Spawn parallel research sub-agents if: ≥3 independent questions AND answers span multiple codebase areas — else handle sequentially.

Spawn Strategy

RuleDetail
Divide by topic/areaEach researcher owns a coherent domain
Max 3–5 researchersMore: diminishing returns, token waste
Focused scope per agentExplicit dirs, file patterns, or questions
Economy/Standard tierManage cost for research sub-agents

Prompt template:

Research: [specific question]
Scope: [files/directories to search]
Return: key findings, relevant file paths (with line numbers), patterns, unanswered questions

Result Merge Protocol

  1. Collect all results into single context
  2. Checkpoint: verify every researcher returned a result (no timeout/error); re-run failures before proceeding.
  3. Deduplicate (same file/pattern counts once)
  4. Resolve conflicts — specific evidence beats general observations
  5. Synthesize into concise context block for implementation prompts
  6. Checkpoint: confirm synthesized block covers every original question; mark unanswered as blockers.

Batch Reviews

  • Group by domain (UI, data); run fast reviews in parallel for independent outputs
  • Review sequentially when outputs share partition boundary
  • Combine related artifacts into one panel question when sharing acceptance criteria

Context Compaction

Summarize prior phase output before passing to next agent. Extract: files changed, key decisions, verification (pass/fail), blockers. Discard: raw tool output, reasoning traces, failed attempts.

Template:

### Prior Phase Output
**Phase [N] — [Agent Name] — [Task Title]**
- Files changed: [list]
- Decisions: [key decisions affecting downstream work]
- Verification: [lint ✅ | types ✅ | tests ✅]
- Blockers: [none | list]

Health & Recovery Reference

Health thresholds, escalation path, Error Recovery Playbook, Circuit Breaker: see REFERENCE.md.

CLI (spawn & monitor)

Use OpenCastle CLI (npx opencastle or bin/cli.mjs):

bash
opencastle convoy run --file convoy.yml --dry-run
opencastle convoy run --file convoy.yml --verbose
opencastle convoy resume
opencastle convoy
opencastle convoy retry

Post-run verification (copy-paste checks):

Convoy records to .opencastle/convoy.db and .opencastle/logs/; there is no plain-text run log to tail.

bash
opencastle convoy --json # last run's status, machine-readable
opencastle convoy run --status # current convoy state from convoy.db
tail -n 50 .opencastle/logs/events.ndjson | jq -c 'select(.outcome != "success")'

Validation & Verification Checkpoints

PhaseCheckCommand / Action
Pre-spawnInputs present (task, scope, ACs)`test -s convoy.yml \\exit 1`
During-runWatch for failuresopencastle convoy run --status
Pre-mergeNo task left failed or gate-failed`opencastle convoy --json \jq -e '.failed == 0'`
Dead lettersQueue is emptyopencastle convoy run --dlq-list
Post-mergeLint + smoke tests passnpm run lint && npm test -- -t "smoke"
BlockerAny failureBlock merge; reopen to original researcher(s)
← v1.0.0All versions