Automation Shape Routing — Workflow vs NTM 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 NTM) 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. |
| NTM swarm |
Long-lived, human-in-the-loop multi-agent run |
ntm / *-with-ntm — persistent tmux panes, robot API, mail/locks, attach + nudge + kill/relaunch. |
| 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:
- Is there real orchestration at all? (fan-out / barrier / multi-stage, OR a
loop with parallelism to exploit) — if no → plain skill. Stop.
- 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 → NTM swarm.
- 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 → NTM
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:
- The primary axis is control-plane vs in-session, not "parallel vs serial."
NTM 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 NTM when
you need the control plane (attach/steer, persistence, multi-vendor); choose
in-session native (Workflow/Task) when you don't.
- 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 (NTM → 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 NTM-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; NTM 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 NTM (long-lived, attachable, open-ended edits, fluid population):
the *-with-ntm 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. |
| NTM swarm |
ntm + vibing-with-ntm |
Stand up + tend a persistent, human-attachable tmux swarm. |
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.
1---2name: automation-shape-routing-33description: Front door for agent automation — decide the SHAPE (Workflow vs NTM vs skill), then hand off. Triggers: "build automation", "convert skills to workflows", "which shape".4---56# Automation Shape Routing — Workflow vs NTM vs Skill78> **The trap this kills:** "I built a lot of skills; they should become9> workflows." Mostly false. Most orchestration-looking skills are either10> long-lived/human-attachable (stay NTM) or hard-sequential (stay skills). The11> win is the routing rule, not a migration project.1213## The three shapes1415| Shape | What it is | Mechanism |16|---|---|---|17| **Workflow** | Deterministic, reproducible orchestration of subagents | Claude `Workflow` tool — `agent({schema})`, `parallel()`, `pipeline()`, `phase()`, loop-until-budget. In-process, headless, ~16 concurrent. |18| **NTM swarm** | Long-lived, human-in-the-loop multi-agent run | `ntm` / `*-with-ntm` — persistent tmux panes, robot API, mail/locks, attach + nudge + kill/relaunch. |19| **Plain skill** | One model reasoning through a procedure or knowledge | A single `SKILL.md`. No fan-out, or a strictly sequential edit-loop. |2021## The decision rule (three axes)2223Ask in order:24251. **Is there real orchestration at all?** (fan-out / barrier / multi-stage, OR a26 loop with parallelism to exploit) — if **no** → **plain skill**. Stop.272. **Must a human attach and steer mid-run?** Or does it run for *hours*, do28 open-ended *file edits*, juggle a *fluid population* (rate limits, kill/29 relaunch, prompt-cache rounds), or relay between *cross-model* panes? — if30 **yes** → **NTM swarm**.313. Otherwise — fixed DAG, agents return **structured JSON** (not free-form edits32 needing review), no attach needed, you want it **reproducible + headless** →33 **Workflow**.3435**One-line litmus:**36> deterministic DAG + structured JSON + no human-attach + headless-wanted → **Workflow**37> long-lived + attachable + open-ended file edits / fluid population → **NTM**38> no fan-out, or hard-sequential edit loop → **plain skill**3940## Spike-validated nuances (2026-05-29)4142A live three-legged spike (`~/dev/agentops-3cat-spike/`) measured the same task on43all three backends. Two findings refine the rule:44451. **The primary axis is control-plane vs in-session, not "parallel vs serial."**46 **NTM is a control-plane** that *runs Claude/Codex/Gemini as panes* — it is not a47 peer of the native runtimes, it is the supervisor tier above them. Choose NTM when48 you need the control plane (attach/steer, persistence, multi-vendor); choose49 in-session native (Workflow/Task) when you don't.502. **Parallel buys quality/independence, NOT wall-clock — at small N.** Measured: a51 3-way Workflow fan-out **tied** a single sequential agent on wall-clock (191s vs52 180s) and cost **~2.7× the tokens** — because the synthesis barrier eats the53 parallel gain. What it bought was depth + independent fresh-eyes (the sequential54 leg self-reported "monoculture" bias). So: reach for parallel `Workflow` when you55 want *independent verification / fresh eyes*, not for speed. For speed, you need56 large N **and** no barrier — use `pipeline()` (no barrier), not `parallel()`.5758Degradation (NTM → Claude-native → beads floor) is governed by the59`OrchestrationPort` selector; opt out entirely with `AGENTOPS_ORCHESTRATION=off` →60beads floor, which always works.6162## Two traps to avoid6364- **Don't workflow-ify a sequential edit-loop.** If each pass must see the prior65 pass's edits (progressive-deepening reapply, audit-fix-rescan), there's no66 concurrency to win — a Workflow wrapper adds a process boundary for nothing.67 *Exception:* it graduates to a `loop-until-budget` Workflow only once each step68 returns **structured output** instead of free-form edits, and you want it69 headless/reproducible.70- **Don't NTM-ify a clean fan-out, and don't Workflow-ify an attach-and-steer71 run.** The Workflow tool is in-process and cannot be tmux-attached; NTM is72 built for exactly the live-steering Workflow can't do. Picking wrong fights the73 tool the whole way.7475## Worked examples7677**→ Workflow** (deterministic fan-out / synthesize, structured returns):78`council` (N judges → consensus — near-trivial port), the **planning half** of79`rpi`, judge/refutation panels, any "fan out N analyses → triangulate" task.8081**→ Stay NTM** (long-lived, attachable, open-ended edits, fluid population):82the `*-with-ntm` family (hypothesis research, cross-model review swarms, browser83testing), plus `swarm`/`crank` in full epic-execution mode — they touch the84working tree and need wave-validity gating + human review.8586**→ Stay plain skill** (no exploitable parallelism, or knowledge/one-shot):87deliberately one-at-a-time loops (progressive reapply, multi-pass bug hunting);88all reference docs; all single-shot transforms (jargon scrub, README authoring).8990## Canonical Workflow template9192`.claude/workflows/operating-loop.js` is the worked example — a real Workflow-tool93script using `agent(prompt,{schema})` with JSON schemas, `parallel([thunks])`94barriers (framing-lenses / judges / refutation / slices), `phase()` markers,95budget-scaled `FANOUT`, and bounded re-plan/retry. **Start from it when porting a96Workflow.** It is also the proof that the AgentOps operating loop has *two*97conformant runtimes (skill-driven via `rpi`/`crank`/`swarm`/`council`, and98Workflow-driven via this script) — the basis of the `agentops-core-sdk`99portability thesis. See `operating-loop-workflow` for the install+run path.100101## Handoff — after the verdict, invoke the next skill102103This skill is the **front door**. It does not build; it routes. Once the shape is104decided, hand off:105106| Verdict | Next | What it does |107|---|---|---|108| **plain skill** | `skill-builder` | Scaffold a new `SKILL.md` against the unified template → then `skill-auditor` → `heal-skill`. |109| **Workflow** | `workflow-builder` | Scaffold a new `.claude/workflows/*.js` from the operating-loop.js template. |110| **NTM swarm** | `ntm` + `vibing-with-ntm` | Stand up + tend a persistent, human-attachable tmux swarm. |111112State the verdict and the deciding axis in one line, then invoke the chosen113builder. Do not scaffold here.114115## Contract note (SDK)116117A Workflow is a **composite capability** (an orchestration of sub-capabilities118with typed control flow); a skill is a **leaf**. The portable contract for this —119a `shape: skill|workflow` discriminator, a `StepGraph`, a `control_flow` enum, a120`budget`, and an `OrchestrationPort` *interface* — is net-new SDK work. Port the121**shape, not the engine**: keep concrete orchestrators (Codex subagents, swarm122dispatch, scheduler — BC4/BC5) behind adapters.