AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Compensation Saga Runtime

skill-hsienw-ai-agent-engineering-playbook-compensation-saga-runtime · by HsienW

Design and review compensation and Saga runtime behavior for agent workflows. Use when handling multi-step side effects, rollback plans, irreversible actions, compensation ordering, manual escalation, cancellation cleanup, or audit-linked recovery flows.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-hsienw-ai-agent-engineering-playbook-compensation-saga-runtime

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-hsienw-ai-agent-engineering-playbook-compensation-saga-runtime)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
16d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Compensation Saga Runtime? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Compensation Saga Runtime

Skill Interface

  • Name: compensation-saga-runtime.
  • Description: Design and review compensation and Saga runtime behavior for multi-step side effects, rollback plans, irreversible actions, compensation ordering, manual escalation, cancellation cleanup, and audit-linked recovery flows.
  • Parameters: Completed side-effecting steps, failure point, reversible and irreversible actions, dependency order, audit trail, idempotency keys, retry and timeout policy, manual escalation rules, and verification cases.
  • Instructions: Use this skill when an agent workflow performs side effects across several steps. Build compensation from completed steps, run it in policy-defined order, record failures, mark irreversible actions, and test cancellation, duplicate compensation, timeout, and audit reconstruction.

Compensation defines recovery for completed side effects when a later step fails or the user cancels.

Core Types

type CompensationAction = {
  actionId: string;
  description: string;
  execute: () => Promise;
  isReversible: boolean;
};

type CompensationPlan = {
  taskId: string;
  completedSteps: string[];
  failurePoint: string;
  actions: CompensationAction[];
};

Planning Rules

  • Build compensation plans from completed side-effecting steps only.
  • Never compensate steps that did not execute.
  • Run compensation in reverse dependency order unless a domain policy says

otherwise.

  • Mark irreversible actions and escalate them for manual handling.
  • Store compensation events in the same audit trail as the original operation.
  • Pair compensation with idempotency so retries do not duplicate rollback work.

Execution Rules

  • A failed compensation must not be silently swallowed.
  • Compensation failure should record state, reason code, and manual follow-up.
  • Cancellation may require compensation when side effects already happened.
  • Compensation should have its own timeout, retry policy, and idempotency key.
  • The runtime should distinguish original failure from compensation failure.

Common Scenarios

  • A resource was reserved and the user cancelled: release the reservation.
  • A status was changed and a later notification failed: decide whether to keep

the status or restore it based on policy.

  • An irreversible notification was sent: mark as irreversible and create a

correction or manual follow-up.

  • A downstream create succeeded but later enrichment failed: keep the created

resource and retry enrichment if policy allows.

Verification

Test reverse-order compensation, irreversible actions, compensation timeout, compensation failure escalation, duplicate compensation requests, cancellation after side effect, and audit trail reconstruction.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.