order-lifecycle-patterns
OfficialMake order workflows explicit and auditable
Authorcellarwood
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Orders represented as scattered flags and frontend-driven events lead to missed gates, duplicate work, and poor auditability; this Skill defines clear state machines and operational rules to prevent those failures and make order behavior predictable and debuggable.
Core Features & Use Cases
- Explicit state modeling: Encourage a finite state enum with documented allowed transitions and durable history to avoid overlapping booleans and ambiguous status.
- Separation of concerns: Keep payment, generation, approval, and fulfillment logic independent so one subsystem cannot silently bypass another.
- Idempotency and replay safety: Use idempotency keys and event IDs to make retries and duplicate webhooks no-ops when appropriate.
- Observability and testing: Log transitions with causation metadata and test every allowed and disallowed transition, including concurrent and duplicate event scenarios.
- Use Case: Apply these patterns to Figurio's custom figurine flow to ensure deposit and balance gates, generation previews, explicit approval steps, and safe production release.
Quick Start
Configure the backend order state machine to require validated transitions, record actor and event metadata on every change, and enforce distinct payment and approval gates before production release.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: order-lifecycle-patterns Download link: https://github.com/cellarwood/figurio/archive/main.zip#order-lifecycle-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.