automation-shape-routing
Front door for agent automation — decide the SHAPE (Workflow vs ATM vs skill), then hand off. Triggers: "build automation", "convert skills to workflows", "which shape".
What this skill does
# Automation Shape Routing — Workflow vs ATM vs Skill
> **The trap this kills:** "I built a lot of skills; they should become
> workflows." Mostly false. Most orchestration-looking skills are either
> long-lived/human-attachable (stay ATM) or hard-sequential (stay skills). The
> win is the routing rule, not a migration project.
## The three shapes
| Shape | What it is | Mechanism |
|---|---|---|
| **Workflow** | Deterministic, reproducible orchestration of subagents | Claude `Workflow` tool — `agent({schema})`, `parallel()`, `pipeline()`, `phase()`, loop-until-budget. In-process, headless, ~16 concurrent. |
| **ATM swarm** | Long-lived, human-in-the-loop multi-agent run | `atm` (the CLI) driven by [`/using-atm`](../using-atm/SKILL.md) — persistent tmux panes running whole `/rpi`/`/evolve` loops over a bead queue, with attach + nudge + kill/relaunch and mail/locks coordination. |
| **Plain skill** | One model reasoning through a procedure or knowledge | A single `SKILL.md`. No fan-out, or a strictly sequential edit-loop. |
## The decision rule (three axes)
Ask in order:
1. **Is there real orchestration at all?** (fan-out / barrier / multi-stage, OR a
loop with parallelism to exploit) — if **no** → **plain skill**. Stop.
2. **Must a human attach and steer mid-run?** Or does it run for *hours*, do
open-ended *file edits*, juggle a *fluid population* (rate limits, kill/
relaunch, prompt-cache rounds), or relay between *cross-model* panes? — if
**yes** → **ATM swarm**.
3. Otherwise — fixed DAG, agents return **structured JSON** (not free-form edits
needing review), no attach needed, you want it **reproducible + headless** →
**Workflow**.
**One-line litmus:**
> deterministic DAG + structured JSON + no human-attach + headless-wanted → **Workflow**
> long-lived + attachable + open-ended file edits / fluid population → **ATM**
> no fan-out, or hard-sequential edit loop → **plain skill**
## Spike-validated nuances (2026-05-29)
A live three-legged spike (`~/dev/agentops-3cat-spike/`) measured the same task on
all three backends. Two findings refine the rule:
1. **The primary axis is control-plane vs in-session, not "parallel vs serial."**
**ATM is a control-plane** that *runs Claude/Codex/Gemini as panes* — it is not a
peer of the native runtimes, it is the supervisor tier above them. Choose ATM when
you need the control plane (attach/steer, persistence, multi-vendor); choose
in-session native (Workflow/Task) when you don't.
2. **Parallel buys quality/independence, NOT wall-clock — at small N.** Measured: a
3-way Workflow fan-out **tied** a single sequential agent on wall-clock (191s vs
180s) and cost **~2.7× the tokens** — because the synthesis barrier eats the
parallel gain. What it bought was depth + independent fresh-eyes (the sequential
leg self-reported "monoculture" bias). So: reach for parallel `Workflow` when you
want *independent verification / fresh eyes*, not for speed. For speed, you need
large N **and** no barrier — use `pipeline()` (no barrier), not `parallel()`.
Degradation (ATM → Claude-native → beads floor) is governed by the
`OrchestrationPort` selector; opt out entirely with `AGENTOPS_ORCHESTRATION=off` →
beads floor, which always works.
## Two traps to avoid
- **Don't workflow-ify a sequential edit-loop.** If each pass must see the prior
pass's edits (progressive-deepening reapply, audit-fix-rescan), there's no
concurrency to win — a Workflow wrapper adds a process boundary for nothing.
*Exception:* it graduates to a `loop-until-budget` Workflow only once each step
returns **structured output** instead of free-form edits, and you want it
headless/reproducible.
- **Don't ATM-ify a clean fan-out, and don't Workflow-ify an attach-and-steer
run.** The Workflow tool is in-process and cannot be tmux-attached; ATM is
built for exactly the live-steering Workflow can't do. Picking wrong fights the
tool the whole way.
## Worked examples
**→ Workflow** (deterministic fan-out / synthesize, structured returns):
`council` (N judges → consensus — near-trivial port), the **planning half** of
`rpi`, judge/refutation panels, any "fan out N analyses → triangulate" task.
**→ Stay ATM** (long-lived, attachable, open-ended edits, fluid population):
the `*-with-atm` family (hypothesis research, cross-model review swarms, browser
testing), plus `swarm`/`crank` in full epic-execution mode — they touch the
working tree and need wave-validity gating + human review.
**→ Stay plain skill** (no exploitable parallelism, or knowledge/one-shot):
deliberately one-at-a-time loops (progressive reapply, multi-pass bug hunting);
all reference docs; all single-shot transforms (jargon scrub, README authoring).
## Canonical Workflow template
`.claude/workflows/operating-loop.js` is the worked example — a real Workflow-tool
script using `agent(prompt,{schema})` with JSON schemas, `parallel([thunks])`
barriers (framing-lenses / judges / refutation / slices), `phase()` markers,
budget-scaled `FANOUT`, and bounded re-plan/retry. **Start from it when porting a
Workflow.** It is also the proof that the AgentOps operating loop has *two*
conformant runtimes (skill-driven via `rpi`/`crank`/`swarm`/`council`, and
Workflow-driven via this script) — the basis of the `agentops-core-sdk`
portability thesis. See `operating-loop-workflow` for the install+run path.
## Handoff — after the verdict, invoke the next skill
This skill is the **front door**. It does not build; it routes. Once the shape is
decided, hand off:
| Verdict | Next | What it does |
|---|---|---|
| **plain skill** | `skill-builder` | Scaffold a new `SKILL.md` against the unified template → then `skill-auditor` → `heal-skill`. |
| **Workflow** | `workflow-builder` | Scaffold a new `.claude/workflows/*.js` from the operating-loop.js template. |
| **ATM swarm** | `atm` + [`/using-atm`](../using-atm/SKILL.md) | Stand up + tend an ATM swarm running AgentOps loops (`/rpi`/`/evolve`) over a bead queue. |
State the verdict and the deciding axis in one line, then invoke the chosen
builder. Do not scaffold here.
## Contract note (SDK)
A Workflow is a **composite capability** (an orchestration of sub-capabilities
with typed control flow); a skill is a **leaf**. The portable contract for this —
a `shape: skill|workflow` discriminator, a `StepGraph`, a `control_flow` enum, a
`budget`, and an `OrchestrationPort` *interface* — is net-new SDK work. Port the
**shape, not the engine**: keep concrete orchestrators (Codex subagents, swarm
dispatch, scheduler — BC4/BC5) behind adapters.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.