Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Automation strategy/Orchestration-and-antipatterns
Reference · Automation strategy

Orchestration-and-antipatterns

Part of Automation strategy. Install the skill and your agent reads this page when it needs the depth.

Orchestration strategy & anti-patterns — depth for §4–§5

Engine-agnostic policy. These are the guarantees you require of an automation before it ships and the failure modes you audit for when a fleet is breaking. The per-platform recipes (which node, which toggle, exact retry settings) live in ../../automation-flows/SKILL.md and each platform skill — this file is the discipline, not the wiring.

The orchestration guarantees

1. Idempotency & dedup

Event delivery is at-least-once: webhooks are re-sent, retries replay, users double-click. Assume every event can arrive two or more times. A non-idempotent write executed twice = double charge, duplicate row, duplicate email.

Bad:  event → create record                    (re-delivery → two records)
Good: event → seen(key)? → if new: create → mark key seen

2. Error paths, retries & backoff

Every automation has a defined destination for failure. Classify the error first:

Distinguishing the two is the single highest-leverage error decision — blind retry-everything is a common cause of both runaway bills and masked auth failures.

3. Dead-letter

After retries are exhausted, the failed item must land somewhere durable and inspectable — a queue, a table, the platform's "incomplete executions" store — with enough context (the payload, the error, the timestamp) to diagnose and replay it. Failures dropped on the floor are silent data loss; you find out when a customer does.

4. Observability & alerting

5. Secrets handling

6. Versioning & environments

7. Avoid fan-out storms

Anti-patterns — detection & remediation

Anti-pattern How you notice it Remediation
No error path first API blip and the run just stops; found out from a customer define a failure destination + retry policy + alert before shipping
Silent failure dashboards green, but the work isn't happening; false confidence alert on failure AND on silence (heartbeat / dead-man's-switch)
No kill-switch a misfiring flow floods a downstream system and there's no fast stop every outward-writing automation gets a documented pause/disable toggle (and whoever's on-call knows where it is)
Over-automation maintenance time exceeds the manual time it replaced re-run the §1 gate; retire it or revert to a checklist
Automating a broken process the automation "works" but the outputs are still wrong, just faster stop, standardize the process on paper, then re-encode
Hidden single point of failure it breaks when one person leaves or one personal token expires service accounts, documented dependencies, no personal-account glue
No owner nobody can say how it works or notices when it breaks assign an owner + a one-page runbook (what it does, deps, how to pause, how to replay)
Choosing platform by familiarity the bill "exploded"; billing unit mismatched the run shape re-select by billing unit for the real shape (see platform matrix)
Retry-everything runaway run counts, masked auth failures classify transient vs permanent; only retry transient, with backoff + cap
Secrets inline credentials visible in an export/screenshot; can't rotate cleanly move to credential store/vault, reference by name, plan rotation

Fleet-health audit ("our automations keep breaking")

When someone arrives with a fleet that keeps breaking rather than one flow, walk this list — the breakage is almost always a missing discipline, not a bad node:

  1. Inventory & ownership — is there a list of every automation with a named owner? Orphans first.
  2. Error paths — how many have a real failure destination + alert vs die silently?
  3. Idempotency — which do non-idempotent writes with no dedup key? (double-processing symptoms)
  4. Observability — is anything watching run rates and heartbeats, or do you learn from customers?
  5. Secrets/expiry — any recent breaks that trace to an expired token or a personal account?
  6. Environments — are people editing prod directly with no snapshot/rollback?
  7. Fan-out / loops — any echo loops or bursts tripping rate limits?

Fix the systemic gap (usually error paths + observability + ownership) rather than patching flows one at a time. Then feed the corrected guarantees into the build skill as requirements.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.