richfrem/agent-plugins-skills / plugins/agent-orchestration/.apm/skills/orchestrating-agent-work
orchestrating-agent-work
VerifiedInteractive 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.
references/graph-planning.md
View on GitHub# Graph planning (compile and validate a DAG manifest)
Architects, topologically validates, and compiles token-budgeted execution graphs (DAGs) into `graph-manifest.json`.
## Constraints
- **Ingest Before Interview**: Read caller briefs or task specifications first; ask user questions only on unresolved topological gaps.
- **Zero Parallel Mutations**: Side-effecting mutations must always form a strict linear chain.
- **Read-Only DAGs Valid**: Graphs with zero mutations (pure parallel reads and join barriers) are valid for spikes and discovery.
- **Deterministic Gates**: Use `verifier_gate` with `tier: "deterministic_script"` before expensive model calls.
- **Executable Commands**: graph execution ([graph-execution.md](graph-execution.md)) runs every `command_or_eval` with `bash -c`. Model-tier nodes must call a CLI inside the command and write output to `$GRAPH_SCRATCH_DIR`; never put a bare prompt in `command_or_eval`.
- **Gate Irreversible Actions**: Nodes with external side effects set `reversible: false` and depend on the approval gate.
## Quick start
```bash
# Validate compiled manifest against schema and acyclicity rules
python3 scripts/validate_manifest.py graph-manifest.json
```
## Workflow
1. **Ingest & Gap Analysis**: Read any existing task briefs, specifications, or `--decision <path>` artifact. When `--decision <path>` is present, skip all pattern-level questions and immediately focus the interview on nodes, barriers, verifiers, and mutations.
2. **Topological Interview**: Interview user only on unresolved gaps (fan-out opportunities, join barriers, verifier scripts, failure escalation).
3. **Enforce Topology Rules**:
- Fan-out only stateless, read-only tasks.
- Total ordering on all `sequential_mutation` nodes.
- Converge parallel branches at a `sync_barrier` whose command checks the workers' output contracts.
- Allocate `fast_engine` for leaf nodes and `frontier_engine` for synthesis.
- Give each fallback the same `type` as its primary and, for mutations, the same preceding mutations.
4. **Compile Manifest**: Author `graph-manifest.json` adhering to `graph-manifest-schema.json`. For each `verifier_hash`, hash the first file named in the command (`shasum -a 256 scripts/verify.py`), or the command string when it names no file. Write a Mermaid diagram of the DAG next to the manifest (or in the task plan) and show it to the caller.
5. **Validate & Handoff**: Run `validate_manifest.py` (add `--check-approval-none` when the graph will run with `--approval none`). Hand off the manifest path, its SHA256 (`shasum -a 256 graph-manifest.json`), the intended `--approval` mode, and the workspace flag. The human approves that SHA; any later manifest edit requires re-approval.
## Verification
```bash
# Deterministic manifest validation
python3 scripts/validate_manifest.py graph-manifest.json
# Additionally required for manifests that will run with --approval none
python3 scripts/validate_manifest.py graph-manifest.json --check-approval-none
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |