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/strategy-agent-swarm.md
View on GitHub# Strategy: agent-swarm (parallel independent jobs)
Parallel multi-agent execution for batch operations, independent work packages, and mass migrations.
## Constraints
- **Independent execution**: Each worker task must be completely independent with zero shared in-memory state.
- **Caller Workspace Isolation**: Swarm runs within the provided `--workdir` (default: cwd); it does not create git worktrees. The caller must provide an isolated worktree when write isolation is needed.
- **Background stdin**: Append `< /dev/null` to background commands to prevent `SIGTTIN` hangs.
- **Idempotence**: Post-processing commands must be safe to rerun with `--resume`.
- **Concurrency caps**: Limit Copilot CLI to `--workers 2` to prevent throttling; Gemini/Claude supports 5-10.
- **Tool Restrictions**: Worker subprocesses must not execute `git` write commands directly.
## Quick start
```bash
# Execute batch job with resume support
python3 scripts/swarm_run.py \
--engine claude \
--job ./resources/jobs/my_job.job.md \
--files-from checklist.md \
--resume --workers 5
```
## Workflow
1. **Partition**: Break work into discrete, independent task files with bounded scopes.
2. **Select Engine**: Choose CLI backend (`claude`, `copilot`, `agy`).
3. **Dispatch**: Run `swarm_run.py --job <job-file> --files-from <list>`.
4. **Inspect**: Review intermediate logs in `.swarm-run/` and resolve failed workers via `--resume`.
5. **Merge**: Run mechanical test suites across all completed worker outputs.
## Verification
```bash
# Validate batch execution plan without making LLM calls
python3 scripts/swarm_run.py --job ./resources/jobs/my_job.job.md --dry-run --files-from checklist.md
# Run test suite on completed batch outputs
pytest tests/
```
## Engine Optimization
- **Copilot CLI**: Ignores `-p` with stdin; `swarm_run.py` prepends prompt to file content. Concurrency max 2.
- **Agy / Claude**: Accepts `-p` normally; supports high concurrency (`--workers 5`).
- **Post-Command Serial Execution**: If workers write to a shared store or summary file, pass `--post-serial` to execute `post_cmd` serially under a cross-platform threading lock.
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 |