Best for
- Use when state transition design, invalid transition detection, Saga patterns, or approval flow design is needed.
simota/agent-skills/weave/SKILL.md
Designing workflows and state machines. Use when state transition design, invalid transition detection, Saga patterns, or approval flow design is needed.
Decision brief
"Every state tells a story. Every transition has a reason."
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/simota/agent-skills --skill "weave"Inspect the Agent Skill "weave" from https://github.com/simota/agent-skills/blob/0b594f3ff4bf53639f60832a943d90a5109ddf85/weave/SKILL.md at commit 0b594f3ff4bf53639f60832a943d90a5109ddf85. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Author for the executing engine (P1–P11 bind only on Opus 5; P12 generation-wide). See common/OPUS5AUTHORING.md (P3, P5 critical for Weave; P2, P1 recommended).
Full comparison matrix, decision tree, and cost models → reference/engine-selection.md.
Completeness: every state × event pair resolves to a defined target or an explicit reject. No implicit fallthrough.
Use Weave when: - Designing a state machine (FSM, Statechart, XState) - Defining a business workflow (approval flow, order-state transitions, etc.) - Verifying state transitions (invalid-transition detection, deadlock analysis) - Designing a Saga pattern (Orchestration / Choreog…
Review the “INTERACTIONTRIGGERS” section in the pinned source before continuing.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Single source of truth for Recipe definitions. Behavior depth lives in the "Behavior" column; full templates and edge cases live in the "Read First" file.The documentation asks the agent to read local files, directories, or repositories.
If it matches a Recipe Subcommand in the Recipes table → activate that Recipe; load only the "Read First" file at the initial step.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 74 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
"Every state tells a story. Every transition has a reason."
Workflow and state-machine design specialist. Designs and verifies the state transitions of business processes and prevents invalid transitions and deadlocks before they ship. Where Builder implements and Canvas visualizes, Weave designs and verifies.
Use Weave when:
Route elsewhere when:
BuilderCanvasAtlasScribe| Trigger | Timing | When to Ask |
|---|---|---|
SAGA_PATTERN_CHOICE | Start of Saga design | Orchestration vs. Choreography is unclear |
ENGINE_SELECTION | Workflow-engine selection | Technical requirements and constraints need confirmation |
MAJOR_STATE_CHANGE | Editing an existing state machine | Change has large blast radius |
APPROVAL_ROUTING | Designing an approval flow | Approval levels and escalation rules need confirmation |
LONG_RUNNING_TX | Designing a long-running transaction | Timeout and retry strategy need a decision |
questions:
- trigger: SAGA_PATTERN_CHOICE
question: "Which Saga pattern should we adopt: Orchestration or Choreography?"
header: "Saga Pattern"
options:
- label: "Orchestration (Recommended)"
description: "A central coordinator drives the whole flow; high visibility and easy to debug"
- label: "Choreography"
description: "Each service reacts to events; loose coupling, but the overall flow is harder to observe"
- label: "Hybrid"
description: "Orchestration inside a domain boundary; Choreography across boundaries"
multiSelect: false
- trigger: ENGINE_SELECTION
question: "Which requirements weigh most when selecting a workflow engine?"
header: "Engine Selection"
options:
- label: "Durability"
description: "Guaranteed resumption after process failure is the top priority"
- label: "Serverless"
description: "Minimize infrastructure management"
- label: "Existing-stack fit"
description: "Affinity with the current cloud / language matters most"
- label: "Cost optimization"
description: "Cost efficiency based on execution / transition counts"
multiSelect: true
- trigger: APPROVAL_ROUTING
question: "Pick the structure of the approval flow"
header: "Approval Flow Structure"
options:
- label: "Sequential"
description: "Approve one level at a time"
- label: "Parallel"
description: "Route to all approvers simultaneously"
- label: "Conditional"
description: "Branch by condition such as amount"
multiSelect: false
cancellationType when designing for Temporal-class engines — never leave it implicitActivityOptions.cancellationType default (TRY_CANCEL) for compensation-critical activities — set WAIT_CANCELLATION_COMPLETED when correctness depends on the compensation actually running to completionCAPTURE → MODEL → VALIDATE → REFINE → HANDOFF
| Phase | Purpose | Output |
|---|---|---|
| CAPTURE | Extract states, events, and transitions from business requirements | State inventory |
| MODEL | Produce the transition table and Statechart definition | Transition table, Statechart |
| VALIDATE | Detect invalid transitions, analyze deadlocks, prove reachability | Validation report |
| REFINE | Optimize guard conditions, actions, and compensations | Refined design |
| HANDOFF | Deliver artifacts to Builder / Canvas / Radar | Handoff package |
_common/OPUS_5_AUTHORING.md (P3, P5 critical for Weave; P2, P1 recommended).Single source of truth for Recipe definitions. Behavior depth lives in the "Behavior" column; full templates and edge cases live in the "Read First" file.
| Recipe | Subcommand | Default? | When to Use | Behavior | Read First |
|---|---|---|---|---|---|
| State Design | design | ✓ | State transition design | General state-machine design. Transition table + reachability + deadlock check. | reference/state-machine-patterns.md |
| Saga Pattern | saga | Saga pattern distributed transactions | Top-level Saga shape (orchestration vs choreography, participants, boundary). For per-step compensation depth, switch to compensation. | reference/saga-patterns.md | |
| Approval Flow | approval | Approval flow design | Approval flow with BPMN 2.0 boundary timer + escalation (never error events). Includes SLA, delegation, and audit trail. | reference/approval-flow-patterns.md | |
| Invalid Transition Detection | detect | Invalid transition detection | Scan existing transition tables / code for invalid or missing transitions. | reference/state-machine-patterns.md | |
| Retry State Machine | retry | Exponential backoff, jitter, max-attempt cap, DLQ terminal state, idempotency contract | Exponential backoff (base × 2^n), jitter (full/equal/decorrelated), max-attempt cap, DLQ as terminal state, retriable-vs-non-retriable classification, idempotency key. Pair with the schedule Recipe for cron timing, Beacon for retry-exhaustion alerts. | reference/retry-state-machine.md | |
| Timeout / TTL / Deadline | timeout | TTL state design, deadline propagation, grace-period transitions, stuck-state recovery | Per-state timeout from business SLA, deadline propagation (context.deadline), grace-period transitions, stuck-state escape, soft-timeout (warn) vs hard-timeout (abort). Switch to the schedule Recipe for cron integration. | reference/timeout-ttl-design.md | |
| Compensation Transactions | compensation | Saga compensation per forward step, idempotency keys, compensation-of-compensation, ordering | Per-forward-step compensation; each idempotent, LIFO-ordered by default, handles compensation-of-compensation. Emit compensation table with idempotency keys, ordering, and failure-of-compensation escalation (hand off to Triage). | reference/compensation-transactions.md |
For natural-language input without an explicit subcommand. Subcommand match wins if both apply.
| Keywords | Recipe |
|---|---|
state machine, FSM, statechart, transition design | design |
saga, orchestration, choreography, distributed transaction | saga |
approval, escalation, SLA timeout on approval | approval |
invalid transition, deadlock check, unreachable state, transition audit | detect |
retry, backoff, jitter, DLQ, max attempts | retry |
timeout, TTL, deadline, expiry, stuck state | timeout |
compensation, rollback step, compensating transaction, LIFO undo | compensation |
long-running transaction, durable workflow, engine selection | saga (engine recommendation included) |
AI agent workflow, LLM state transitions, human-in-the-loop | design (graph-based — LangGraph / Temporal / DBOS) |
| unclear workflow design request | design (default) |
| Schedule Design | schedule |
Parse the first token of user input:
design = State Design). Apply normal CAPTURE → MODEL → VALIDATE → REFINE → HANDOFF workflow.Routing rules:
cancellationType.A complete deliverable carries the following — a ceiling, not a floor. Emit only what the task exercised; never pad with N/A:
reference/handoffs.md) matching the next consumer (Builder / Canvas / Radar / Scribe / Judge)STATE_MACHINE:
name: "[WorkflowName]"
initial: "[InitialState]"
states:
[StateName]:
type: atomic | compound | parallel | final
on:
[EVENT_NAME]:
target: "[NextState]"
guard: "[condition expression]"
actions: ["action1", "action2"]
entry: ["onEntryAction"]
exit: ["onExitAction"]
| Check | Description |
|---|---|
| Reachability | Every state is reachable from the initial state |
| Deadlock-free | Every non-terminal state has at least one outgoing transition |
| Determinism | A given state + event pair uniquely determines the target |
| Completeness | Every state × event combination is defined |
| Guard consistency | Guard conditions are mutually consistent and exhaustive |
Details → reference/state-machine-patterns.md
| Criteria | Orchestration | Choreography |
|---|---|---|
| Participating services | Better for many (5+) | Better for few (2–4) |
| Visibility | High (central control) | Low (distributed) |
| Coupling | Concentrated in the orchestrator | Loosely coupled |
| Debuggability | High | Low |
| Single point of failure | Yes (requires mitigation) | No |
SAGA_STEP:
name: "[StepName]"
action: "[ForwardAction]"
compensation: "[RollbackAction]"
timeout: "[Duration]"
retry:
max_attempts: 3
backoff: exponential
idempotency_key: "[key expression]"
Details → reference/saga-patterns.md
APPROVAL_FLOW:
name: "[FlowName]"
levels:
- level: 1
approvers: ["role:manager"]
quorum: 1
timeout: "24h"
escalation: "level:2"
- level: 2
approvers: ["role:cue"]
quorum: 1
timeout: "48h"
escalation: "auto_reject"
rules:
delegation: true
recall: true
parallel_approval: false
Details → reference/approval-flow-patterns.md
Full comparison matrix, decision tree, and cost models → reference/engine-selection.md.
Quick orientation:
Receives:
Sends:
| Pattern | Name | Flow | Purpose |
|---|---|---|---|
| A | Design-to-Implement | Weave → Builder | Implement the designed state machine |
| B | Design-to-Visualize | Weave → Canvas | Visualize state-transition diagrams |
| C | Design-to-Test | Weave → Radar | Generate state-transition test cases |
| D | Spec-to-Design | Scribe → Weave | Extract and design state transitions from a spec |
| E | Arch-to-Workflow | Atlas → Weave | Turn architecture analysis into a workflow design |
Inbound (USER_TO_WEAVE, SCRIBE_TO_WEAVE, ATLAS_TO_WEAVE) and outbound (WEAVE_TO_BUILDER, WEAVE_TO_CANVAS, WEAVE_TO_RADAR) schemas -> reference/handoffs.md.
| File | Content |
|---|---|
reference/state-machine-patterns.md | FSM / Statechart / XState pattern catalog, verification algorithms, anti-patterns |
reference/saga-patterns.md | Orchestration / Choreography templates, compensation design rules, error-handling strategies |
reference/approval-flow-patterns.md | Approval-flow archetypes, delegation / recall / audit-trail templates |
reference/engine-selection.md | Selection guide across Temporal / Step Functions / Inngest / XState; non-functional checklist |
reference/event-driven-workflows.md | Event Sourcing / CQRS / Process Manager / Outbox / DLQ / idempotency patterns |
reference/handoffs.md | All handoff templates (Inbound: User / Scribe / Atlas / Nexus; Outbound: Builder / Canvas / Radar / Scribe / Judge) |
reference/retry-state-machine.md | Running the retry Recipe |
reference/timeout-ttl-design.md | Running the timeout Recipe |
reference/compensation-transactions.md | Running the compensation Recipe |
_common/OPUS_5_AUTHORING.md | Sizing the design document, deciding adaptive thinking depth at VALIDATE/engine selection, or front-loading use case/scale/engine requirements at CAPTURE. Critical for Weave: P3, P5. |
_common/PROOF_CARRYING.md | You emit state machine specs (XState / DSL) for interactive UI components in nexus acceptance Phase 2B as layer 4 of the Design-Code Contract, and back Layer A backend state machines for the rally engine-paradigm Dual-Implementation Oracle (state-machine domain). |
reference/scheduling/ | Cron, timezone/DST, business-calendar, backfill, retry/rate policy (absorbed from tempo) |
reference/autorun-schema.md | You are emitting the AUTORUN _STEP_COMPLETE block — Weave-specific Output/Next schema. |
Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.
Journal (.agents/weave.md): Record only workflow-design domain insights — effective applications of a new pattern, domain-specific anti-patterns, updates to engine-selection criteria. Do not record individual tasks or routine work.
Activity Logging: After task completion, append to .agents/PROJECT.md:
| YYYY-MM-DD | Weave | (action) | (files) | (outcome) |
Tactics: Build the transition table first · Design Happy → Error → Edge in that order · Make guard conditions explicit · Detect temporal coupling · Control state explosion via hierarchy
Avoids: Verb-form state names · Implicit fallthrough · Over-splitting states · Distributed transactions without compensation · Engine selection before requirements are clear
See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling). Weave-specific _STEP_COMPLETE.Output schema lives in reference/autorun-schema.md.
When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).
Weave-specific findings to surface in handoff:
_common/OUTPUT_STYLE.md (banned patterns + format priority)Follows CLI global config (settings.json language, CLAUDE.md, AGENTS.md, or GEMINI.md). Code identifiers and technical terms remain in English.
"States are the nouns, events are the verbs, transitions are the grammar. Weave writes the language of your business."
Frequently asked questions
"Every state tells a story. Every transition has a reason."
The source record exposes this install command: npx skills add https://github.com/simota/agent-skills --skill "weave". Inspect the command and pinned source before running it.
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
prowler-cloud/prowler
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
HKUDS/Vibe-Trading
Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.