Business approval workflows
Models commercial approvals around the document actually reviewed, with thresholds and responsibilities that remain valid at execution.
approval-workflows
See how it helpsWhen is it useful?
Use it when discounts, order values or financial actions determine who must approve and whether a previous approval still applies.
What does it help you do?
- Binds approval to the document revision and content hash.
- Routes decisions by value thresholds, sequence and quorum.
- Rechecks validity before execution and prevents self-approval.
Try asking this
Require fresh approval when an approved quote’s discount changes. Raise the discount after approval and attempt order creation. The old approval must be invalid, with a clear new review task for the changed quote.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Approval Workflows
When to Use
Use when implementing business or security approval flows—such as discount/quote approvals, purchase orders, refunds/payouts, role elevations, or sensitive production operations.
Core Principle: An Approval Is Bound to a Specific Version & Payload
An approval is never a blank check on a mutable record. If Sales Rep A gets approval for a 5% discount on Quote #104 and then edits Quote #104 to a 40% discount before converting it to an order, an unbound status = 'approved' flag allows fraud!
1. Payload Hash & Revision Binding
Every approval_requests and approval_decisions record must bind to the exact state of the subject:
- Subject Version & Canonical Snapshot Hash:
- Compute a deterministic digest (
subject_version+payload_sha256over the canonicalized approval-relevant fields: line items, unit prices, discount, currency, counterparty, terms). - Freeze the subject record against direct edits while
status = 'pending_approval'or'approved'. - Re-Approval Trigger Rule: If any material field covered by
payload_sha256is modified (or if the price/discount moves in a risk-increasing direction), automatically transition the record back todraft/pending_approvaland mark prior approvalssuperseded.
- Compute a deterministic digest (
2. Separation of Duties (SoD) & Conflict-of-Interest Rules
Enforce SoD invariants at the database/service boundary:
- No Self-Approval:
decision.approver_id !== request.requester_idANDdecision.approver_id !== resource.created_by_idANDdecision.approver_id !== resource.owner_id(unless an explicit, documented single-owner workspace exception is configured). - Distinct Multi-Approver Quorum (Four-Eyes / $M$-of-$N$): When a high-value threshold requires 2 approvals (e.g., Sales Director + Finance Controller), the same person holding both roles cannot sign off on both steps (
COUNT(DISTINCT approver_id) >= required_approvers).
3. Tiered Thresholds & Sequential / Parallel Routing
Model threshold rules declaratively:
- Tier 1 (
discount <= 10%andtotal <= 10,000): Auto-approved (no_approval_required). - Tier 2 (
discount <= 25%ortotal <= 50,000): Requiressales_managerof the rep's department. - Tier 3 (
discount > 25%ortotal > 50,000): Sequential approval—Step 1:sales_manager, Step 2:finance_director.
4. Expiration & Execution Re-Verification
- Attach an
expires_attimestamp to approvals where business validity is time-sensitive (e.g., quote price lock or temporary payout sign-off). - At execution time (converting the approved quote to an order or disbursing funds), atomically verify in a single transaction that
approval.status === 'approved',approval.payload_sha256 === currentPayloadHash(resource), andapproval.expires_at > NOW().
Included files 1
SKILL.md
About this skill package
approval-workflows
approval-workflows: Make access rules explicit and enforce them on the server, with permission scenarios and audit evidence.
Show less
approval-workflows
approval-workflows: Make access rules explicit and enforce them on the server, with permission scenarios and audit evidence.
Includes the complete skill and its supporting files (1 files). The exact authored scope is preserved below.
Original skill description (source language)
Use when designing and enforcing threshold-based, multi-step, and quorum approval workflows with strict Separation of Duties (no self-approval) and cryptographic/version payload binding.
Install the skill, review its source and trust settings, then enable it for the relevant project or agent.
Requirements
- Orqestria installed on your computer.
