Procurement approval

Decide whether one proposed procurement request is allowed under an explicit procurement policy before any spend flow starts, refusing budget overages and unapproved payees instead of guessing.

You’re reading version 0.1.8. Go to the current version

Overview

Procurement Policy Check is the pre-spend decision gate. It answers one question, is this procurement request allowed under the supplied procurement policy, and it answers it deterministically. It never moves money; pay and the payment rails own execution, and this skill's sealed decision is what a caller carries into that flow.

In the manual

Runner

  • decide

Declared by its execution profile. Read the profile

SKILL.md

Procurement Policy Check

Procurement Policy Check is the pre-spend decision gate. It answers one question, is this procurement request allowed under the supplied procurement policy, and it answers it deterministically. It never moves money; pay and the payment rails own execution, and this skill's sealed decision is what a caller carries into that flow.

Procedure

  1. Native data.digest binds the exact procurement request and procurement policy before any judgment.
  2. Deterministic rules apply in order: the payee must be in approved_payees, the request currency must match the policy currency, and the amount must fit both remaining_budget and request_cap. The first failed rule refuses with a named refused_reason.
  3. An in-policy amount that reaches approval_threshold returns needs_human with the policy's human_lane (default procurement-review); approval below the threshold is approved.
  4. A policy missing any required authority field refuses with missing_policy_authority and findings; nothing is inferred or invented.

spend_executed is always false. The decision packet carries both input digests so a downstream spend can prove which request and policy were decided.

Output

procurement_approval (runx/procurement-policy-check.approval.v1) carries decision (approved, refused, needs_human), reason, payee, amount, currency, ceiling_amount, human_lane, refused_reason, policy_ids, validation, and the two digests.

Inputs are procurement_request and procurement_policy.

Published execution profile

The execution profile published with 0.1.8, shown as its exact bytes.

Runner
  • decide
Profile digestsha256:3541938999b048c64b771933d249ccdbcc126e5a579051c1950606a04d6d1629
skill: procurement-policy-check
version: "0.1.8"

catalog:
  kind: graph
  audience: operator
  visibility: public
  category: payments
  role: canonical
  execution: read
  completion: runtime_receipt
  approval: none

harness:
  files: [fixtures/support/composed.graph]
  cases:
    - name: procurement-policy-check-approves-in-policy
      operator_journeys:
        - mode: standalone
          confusors: [pay, invoice-pay]
          request: Decide whether this procurement request is allowed under the procurement policy before any money moves.
          expected_outcome: Return an approval decision bound to the exact request and policy digests, with no spend executed.
        - mode: composed
          request: Continue from this already decided procurement approval into the spend flow.
          expected_outcome: Reuse the sealed approval decision without re-deciding policy.
          prior_evidence:
            - The procurement request, procurement policy, and sealed decision supplied by the prior step.
          must_not_repeat:
            - Do not re-derive the policy decision already sealed.
      inputs:
        procurement_request:
          payee: sourcey
          amount: 125
          currency: USD
          purpose: generate public llms.txt docs for a maintained OSS project
        procurement_policy:
          currency: USD
          remaining_budget: 300
          request_cap: 200
          approved_payees: [sourcey, runx]
          approval_threshold: 200
      expect:
        status: sealed
        steps: [digest-request, digest-policy, decide]
        step_outputs:
          decide:
            subset:
              procurement_approval:
                data:
                  schema: runx/procurement-policy-check.approval.v1
                  decision: approved
                  payee: sourcey
                  ceiling_amount: 200
                  human_lane: null
                  refused_reason: null
                  spend_executed: false
                  validation: { status: pass, findings: [] }
        receipt: { schema: runx.receipt.v1 }

    - name: procurement-policy-check-refuses-unapproved-payee
      inputs:
        procurement_request:
          payee: unknown-ai-tool
          amount: 450
          currency: USD
          purpose: buy unreviewed credits
        procurement_policy:
          currency: USD
          remaining_budget: 300
          request_cap: 200
          approved_payees: [sourcey, runx]
          approval_threshold: 200
      expect:
        status: sealed
        steps: [digest-request, digest-policy, decide]
        step_outputs:
          decide:
            subset:
              procurement_approval:
                data:
                  decision: refused
                  refused_reason: unapproved_payee
                  spend_executed: false
        receipt: { schema: runx.receipt.v1 }

    - name: procurement-policy-check-routes-threshold-to-human
      inputs:
        procurement_request:
          payee: runx
          amount: 200
          currency: USD
          purpose: annual plan renewal
        procurement_policy:
          currency: USD
          remaining_budget: 500
          request_cap: 400
          approved_payees: [sourcey, runx]
          approval_threshold: 200
          human_lane: finance-review
      expect:
        status: sealed
        steps: [digest-request, digest-policy, decide]
        step_outputs:
          decide:
            subset:
              procurement_approval:
                data:
                  decision: needs_human
                  human_lane: finance-review
                  spend_executed: false
        receipt: { schema: runx.receipt.v1 }

    - name: procurement-policy-check-refuses-missing-policy
      inputs:
        procurement_request:
          payee: sourcey
          amount: 125
          currency: USD
        procurement_policy:
          currency: USD
      expect:
        status: sealed
        steps: [digest-request, digest-policy, decide]
        step_outputs:
          decide:
            subset:
              procurement_approval:
                data:
                  decision: refused
                  refused_reason: missing_policy_authority
                  validation: { status: fail }
        receipt: { schema: runx.receipt.v1 }

runners:
  decide:
    default: true
    inputs:
      procurement_request:
        type: object
        required: true
        description: One proposed procurement request with payee, amount, currency, and purpose.
        schema:
          additionalProperties: false
          properties:
            payee: { type: string, minLength: 1, maxLength: 500 }
            amount: { type: number, exclusiveMinimum: 0 }
            currency: { type: string, minLength: 1, maxLength: 10 }
            purpose: { type: string, maxLength: 2000 }
      procurement_policy:
        type: object
        required: true
        description: Explicit procurement authority; missing fields refuse instead of guessing.
        schema:
          additionalProperties: false
          properties:
            currency: { type: string, minLength: 1, maxLength: 10 }
            remaining_budget: { type: number, exclusiveMinimum: 0 }
            request_cap: { type: number, exclusiveMinimum: 0 }
            approved_payees:
              type: array
              maxItems: 500
              items: { type: string, minLength: 1, maxLength: 500 }
            approval_threshold: { type: number, exclusiveMinimum: 0 }
            human_lane: { type: string, minLength: 1, maxLength: 200 }
    examples:
      - procurement_request:
          payee: sourcey
          amount: 125
          currency: USD
          purpose: generate public llms.txt docs
        procurement_policy:
          currency: USD
          remaining_budget: 300
          request_cap: 200
          approved_payees: [sourcey, runx]
          approval_threshold: 200
    result_from: [decide]
    steps:
      - id: digest-request
        tool: data.digest
        inputs:
          value: $input.procurement_request

      - id: digest-policy
        tool: data.digest
        inputs:
          value: $input.procurement_policy

      - id: decide
        label: apply the procurement policy deterministically
        inputs:
          procurement_request: $input.procurement_request
          procurement_policy: $input.procurement_policy
          request_digest: $steps.digest-request.digest_result.digest
          policy_digest: $steps.digest-policy.digest_result.digest
        tool: { module: procurement-policy-check.mjs, export: decideProcurement }
        outputs:
          procurement_approval:
            type: object
        artifacts:
          named_emits:
            procurement_approval: procurement_approval
          packets:
            procurement_approval: runx/procurement-policy-check.approval.v1

Published package and test evidence.

This exact version passed its recorded harness run: 5 checks passed · 0 failed.

Test result

Harness resultPassed
Tested version0.1.8
Recorded result5 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Declared cases4
Test recordOpen the recorded run
Inspect receipt referencessha256:d110ea4f929511a7b6a73fc26051042e02421b887b5d58029ba2b15565af723dsha256:9bf8e962ae7e0a237d4b35103b0252361ec77259ecff43600de586fdf6b716b9sha256:bbcb76180e1aff310ab462e26218b92cd2aa87ebe3d1bca892cd994a375e3969sha256:7b808838b2994fa5e12bbf39676e3bf07bdcb6dbd37e1e6c584474a417430a31sha256:48c423458a844bd578da9a7ce956ccba98cae793291101d3dbfab36266107f04

Package identity

Published revision0.1.8
Content digestsha256:3d8fbfc7beca51eeb9e70f7611071eb7e3ea747a276e497e0c8df81098ba54b5
SKILL.md digestsha256:838a8fffdfa8d6223ee5d0454b93ded27fd5b165b5000a6c075052f651732d0a
Execution profile digestsha256:3541938999b048c64b771933d249ccdbcc126e5a579051c1950606a04d6d1629
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 25 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.8ViewingContent digest sha256:3d8fbfc7beca51eeb9e70f7611071eb7e3ea747a276e497e0c8df81098ba54b5