Skip to content
Back to skills

Orchestrating Agent Work

ASecurity

Interactive orchestrator for complex engineering work. Analyzes the task, conducts a diagnostic interview to select the appropriate execution strategy (Directed Acyclic Graph versus Loop, and which Loop type), plans the artifact, and supervises execution and verification. Use for "how should I orchestrate this", "plan this workflow", "should this be a DAG or a loop", "run these jobs in parallel", "delegate this to a worker agent", or "run/resume this graph manifest". Not for single trivial ed...

  • 8 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 9, 2026
ai-agentspythonrustbashnoderefactoringgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add richfrem/agent-plugins-skills --skill orchestrating-agent-work --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orchestrating Agent Work?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orchestrating Agent Work
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-orchestrating-agent-work/badge)](https://www.skillsdirectory.com/skills/richfrem-orchestrating-agent-work)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: orchestrating-agent-work
plugin: agent-orchestration
description: >
  Interactive orchestrator for complex engineering work. Analyzes the task, conducts a
  diagnostic interview to select the appropriate execution strategy (Directed Acyclic Graph
  versus Loop, and which Loop type), plans the artifact, and supervises execution and verification.
  Use for "how should I orchestrate this", "plan this workflow", "should this be a DAG or a loop",
  "run these jobs in parallel", "delegate this to a worker agent", or "run/resume this graph
  manifest". Not for single trivial edits or skill self-improvement.
allowed-tools: Bash, Read, Write, Glob, Grep
---

# Orchestrating Agent Work (`orchestrating-agent-work`)

Interactive front door: analyze the task, conduct diagnostic interview, select Graph vs. Loop, plan, execute, and verify.

## Contents

- [Dependencies](#dependencies) • [Constraints](#constraints) • [Quick Start](#quick-start) • [Workflow](#workflow) • [Strategies](#strategies) • [Verification](#verification) • [References](#references)

## Dependencies

Python 3.8+ (standard library only); sibling skills `cli-agent` and `evaluating-agent-outcomes` for the learning loop.

## Constraints

- **Interactive Confirmation**: Ask at most 3 questions (one per turn) for ambiguous dimensions; present structured choices with `Option A [Recommended]`; human confirms or overrides selection before planning.
- **Topology First (Graph vs. Loop)**: Choose Graph (DAG) for distinct steps, parallel fan-out reads, or ordering barriers; choose Loop for iterative delegation.
- **Trust but Verify**: Never accept worker output without running automated test suites and auditing the git diff.
- **Loop Isolation**: Inner execution loops are strictly forbidden from running `git` write commands (commits and merges stay with caller).
- **Confinement & Redirection**: Workspace mutations run in an isolated worktree; background CLI calls redirect stdin (`< /dev/null`).
- **Outcome Completion**: A worker returning is not completion; done means the assigned outcome. Review ready deliveries while independent work continues; honor a standing authorization instead of re-asking.
- **Learning Loop**: `scripts/work_loop.py run` validates the contract and budget, retrieves lessons, dispatches each attempt through `cli-agent` (claim first, atomic admission, immutable attempt ids), assesses with `evaluating-agent-outcomes`, and repairs within the attempt/token budget. Lessons, manual criteria and integration stay agent-supervised ([learning-loop.md](references/learning-loop.md)).
- **Human Gate Integrity**: Graph runs with `--approval none` require an explicit human-approved manifest SHA; never self-sign manifests you wrote.

- **Lifecycle Authority & Ask Before Stopping**: Authorized retries and automatic runner containment/rollback inside the approved plan proceed on their own and save diagnostics (`failed-diff.patch`, logs, transcript path) BEFORE rollback. Any discretionary cancel, stop, restart, retry beyond the plan, scope change, or discarding of output asks the human first.
- **Make The Run Visible**: Start a graph with `--progress-file`, inspect live `active_nodes` with `graph_runner.py --status <run-dir>` ([graph-execution.md](references/graph-execution.md#observing-a-run)), and report each finished node and failure as it happens.
- **Control Plane (Opt-In)**: `graph_runner.py` runs standalone by default. When a manifest declares `control_plane.task_id` or `--control-plane-task` is passed, it re-verifies Gate 1 APPROVED via the sibling `running-control-plane` verifier before any mutation.
- **Choose The Graph Shape From The Work**: Run the partition analysis in [graph-planning.md](references/graph-planning.md) before compiling; record the shape and reasons in `caller.planning_notes`. Reviewer choice (runtime, model, effort) belongs to the human; never pick or dispatch reviewers yourself.

## Quick Start

```bash
python3 scripts/select_strategy.py --out docs/plans/work-tasks/<task-id>/
python3 scripts/validate_manifest.py graph-manifest.json
python3 scripts/graph_runner.py graph-manifest.json --worktree .worktrees/task-<id> --approval prompt
```

## Workflow

1. **Analyze**: Ingest requirements, evaluate dependency structure, ordering barriers, concurrency, and risk ([routing-and-closure.md](references/routing-and-closure.md)).
2. **Interview & Select**: Ask 1–3 structured questions; run `select_strategy.py`; present **Graph (DAG)** vs **Loop** (Dual-Loop vs Swarm); confirm human agreement ([strategy-selection.md](references/strategy-selection.md)).
3. **Plan**:
   - **Graph (DAG)**: Compile and validate `graph-manifest.json` ([graph-planning.md](references/graph-planning.md), [topology-rules.md](references/topology-rules.md)).
   - **Dual-Loop**: Author `handoffs/task_packet_<id>.md` with atomic scope and "NO GIT" rule ([strategy-dual-loop.md](references/strategy-dual-loop.md)).
   - **Parallel Swarm**: Partition tasks into independent units; author `<id>.job.md` ([strategy-agent-swarm.md](references/strategy-agent-swarm.md)).
4. **Execute**:
   - **Graph**: Run state machine via `graph_runner.py` with worktree isolation and rollback ([graph-execution.md](references/graph-execution.md)).
   - **Dual-Loop**: Dispatch tactical coding worker into isolated worktree with stdin redirection (`< /dev/null`).
   - **Parallel Swarm**: Run `swarm_run.py` with resume support.
5. **Verify & Close**: Run test suites, audit diffs (`agent_orchestrator.py verify`), and complete retrospective survey before completion.

## Strategies

| Strategy | When to Choose | Plan Artifact | Reference |
|---|---|---|---|
| `direct` | Minimal localized edit without sub-agent overhead | Implementation plan | [routing-and-closure.md](references/routing-and-closure.md) |
| `graph` | Distinct dependent steps, parallel fan-out reads, join barriers, ordered mutations | `graph-manifest.json` | [graph-planning.md](references/graph-planning.md), [graph-execution.md](references/graph-execution.md) |
| `dual-loop` | One bounded task; outer supervisor orchestrates tactical inner worker | `handoffs/task_packet_<id>.md` | [strategy-dual-loop.md](references/strategy-dual-loop.md) |
| `agent-swarm` | Many identical independent tasks partitioned across bulk files or items | `<id>.job.md` | [strategy-agent-swarm.md](references/strategy-agent-swarm.md) |

## Verification

```bash
python3 scripts/agent_orchestrator.py verify --packet handoffs/task_packet_<id>.md --worktree .
cat "$(git rev-parse --git-common-dir)/graph-run/<graph_id>/<run_id>/state.json"
```

Consult matching section in [acceptance-criteria.md](references/acceptance-criteria.md); on failure use [fallback-tree.md](references/fallback-tree.md).

## References

- Steps: [routing-and-closure.md](references/routing-and-closure.md) • [strategy-selection.md](references/strategy-selection.md) • [graph-planning.md](references/graph-planning.md) • [graph-execution.md](references/graph-execution.md) • [generative-graph-simulation.md](references/generative-graph-simulation.md) • [delegated-dag-refactoring-playbook.md](references/delegated-dag-refactoring-playbook.md)
- Strategies: [adversarial-plan-audit.md](references/adversarial-plan-audit.md) • [strategy-dual-loop.md](references/strategy-dual-loop.md) • [strategy-agent-swarm.md](references/strategy-agent-swarm.md) • [strategy-red-team-review.md](references/strategy-red-team-review.md) • [bot-delegation-patterns.md](references/bot-delegation-patterns.md)
- Contracts: [topology-rules.md](references/topology-rules.md) • [graph-manifest-schema.json](references/graph-manifest-schema.json) • [PATTERN_GUIDE.md](references/PATTERN_GUIDE.md) • [patterns.json](references/patterns.json) • [cli-agent-executor.md](references/cli-agent-executor.md) • [learning-loop.md](references/learning-loop.md) • [dispatch-preflight.md](references/dispatch-preflight.md) • [cheapest_models.md](references/cheapest_models.md) • [post_run_survey.md](references/post_run_survey.md)
- Architecture: [orchestrating_agent_work_architecture.mmd](references/diagrams/orchestrating_agent_work_architecture.mmd) • [acceptance-criteria.md](references/acceptance-criteria.md) • [fallback-tree.md](references/fallback-tree.md)

Files in this skill

  • SKILL.md6.8 KB
  • assets/templates/dual-loop-meta-tasks.md1.6 KB
  • assets/templates/loop_retrospective_template.md1.5 KB
  • assets/templates/red_team_briefing_template.md747 B
  • assets/templates/scratchpad-template.md991 B
  • assets/templates/strategy-packet-template.md1.2 KB
  • assets/templates/workflow-retrospective-template.md1.3 KB
  • evals/evals.json7 KB
  • references/PATTERN_GUIDE.md6.2 KB
  • references/acceptance-criteria.md6.8 KB
  • references/agentic-os-reuse-map.md2.5 KB
  • references/bot-delegation-patterns.md5.2 KB
  • references/cheapest_models.json845 B
  • references/cheapest_models.md1.1 KB
  • references/cli-agent-executor.md3.5 KB
  • references/delegated-dag-refactoring-playbook.md5.5 KB
  • references/diagrams/agent_swarm.mmd1.8 KB
  • references/diagrams/dual_loop_architecture.mmd1.4 KB
  • references/diagrams/graph-planner-flow.mmd540 B
  • references/diagrams/graph_execution_state_machine.mmd823 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.