Renewal decision

Decide whether a vendor renewal should renew, renegotiate, or cancel, emitting only a bounded spend ceiling for approved renew paths.

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

Overview

renewal-decision is a procurement judgment skill. It reads a vendor contract, usage and spend actuals, a renewal offer, and a procurement policy, then decides whether to renew, renegotiate, or cancel. It does not move money, mint authority, or send notice to the vendor.

The output is a typed renewal decision plus an optional bounded AttenuationRequest ceiling carried as data. A downstream driver may hand that ceiling to the core spend/refund accepting runner, which owns child grant minting, reservation, settlement, and receipt sealing. Vendor notice is likewise a separate governed send-as run named by the downstream driver.

SKILL.md

Renewal Decision

renewal-decision is a procurement judgment skill. It reads a vendor contract, usage and spend actuals, a renewal offer, and a procurement policy, then decides whether to renew, renegotiate, or cancel. It does not move money, mint authority, or send notice to the vendor.

The output is a typed renewal decision plus an optional bounded AttenuationRequest ceiling carried as data. A downstream driver may hand that ceiling to the core spend/refund accepting runner, which owns child grant minting, reservation, settlement, and receipt sealing. Vendor notice is likewise a separate governed send-as run named by the downstream driver.

What This Skill Does

  1. Reads the current vendor projection through the registry:runx/data-store@0.1.2 operation contract.
  2. Matches the renewal offer to vendor_contract.vendor_id.
  3. Computes usage alignment from supplied usage_actuals; it never invents missing units, cost, or spend.
  4. Applies procurement_policy.max_renewal_pct to vendor_contract.contract_value.
  5. Emits decision.action as renew, renegotiate, or cancel.
  6. Emits a bounded ceiling only when the action is renew and the offer is at or beneath the policy cap.
  7. Appends the decision event with a CAS append_event using a stable idempotency key keyed by vendor_id.

Inputs

yaml
vendor_contract:
  vendor_id: string
  contract_ref: string
  current_terms: object
  contract_value:
    amount: number
    currency: string
  expiry: string
usage_actuals:
  periods: array
  units_consumed: number
  cost_per_unit: number
renewal_offer:
  amount:
    amount: number
    currency: string
  currency: string
  terms: object
  expiry: string
procurement_policy:
  min_usage_units: number
  max_renewal_pct: number
  approval_threshold:
    amount: number
    currency: string

Output

yaml
decision:
  action: renew | renegotiate | cancel
  reason: string
  confidence: low | medium | high
bounded_ceiling:
  schema: runx.attenuation_request.v1
  form: data
  amount:
    amount: number
    currency: string
  scopes: [spend.reserve, spend.settle, receipt.seal]
  counterparty: string
  idempotency_key: string
  downstream_runner: registry:runx/spend@0.1.1
escalation_packet:
  approval_required: boolean
  lane: human_approval
  reason: string
data_store:
  package_ref: registry:runx/data-store@0.1.2
  read_projection: object
  append_event: object
observations: object

bounded_ceiling is null when the decision is renegotiate or cancel. The ceiling is also null when the vendor cannot be matched, usage is below policy minimum, or the offer exceeds the allowed renewal percentage.

Decision Rules

  • Renew only when the vendor matches, usage is at or above min_usage_units, the renewal amount is within contract_value * (1 + max_renewal_pct / 100), and the offer currency matches the contract currency.
  • Renegotiate when usage is healthy but price, terms, or currency exceed the policy bounds.
  • Cancel when usage is below the minimum or the vendor cannot be matched to the contract.
  • Stop instead of guessing when contract value, renewal amount, vendor identity, usage units, or policy cap is missing.

Data-Store Handoff

This skill carries the registry:runx/data-store@0.1.2 handoff contract in the decision packet and executes the same governed data operation envelope through data.source graph steps. The package includes the data-store provider adapter catalog so the hosted publish harness can run the pinned fixture store without external services.

  • read_projection reads resource: vendor_renewals for the vendor aggregate.
  • append_event writes a renewal_decision.recorded event.
  • idempotency_key is keyed by vendor_id, renewal period, and decision.
  • expected_version is supplied by the decision packet so CAS failures are visible instead of overwritten.

The event is evidence of the judgment, not authority to spend.

Spend Handoff

The bounded ceiling is a data artifact, not an execution. A downstream driver must:

  • pass the ceiling to the core spend/refund accepting runner;
  • mint the attenuated child grant there, never here;
  • reserve, settle, and seal under the spend runner's charter;
  • fail closed when the spend request exceeds the ceiling; and
  • require the human approval lane before consuming the ceiling.

Stop Conditions

  • vendor_mismatch: the vendor identity cannot be tied to the contract.
  • usage_below_minimum: supplied usage is below the policy minimum.
  • amount_over_cap: the renewal offer exceeds the maximum renewal percentage.
  • currency_mismatch: contract and offer currencies differ.
  • missing_actuals: usage or spend evidence is incomplete.
  • missing_policy: policy cap or minimum usage is absent.
  • needs_version: the append event cannot declare an expected version.

Verification Notes

The harness carries exactly two cases:

  • renewal-decision-renew-with-bounded-ceiling seals a renew judgment with an AttenuationRequest ceiling and a CAS append event.
  • renewal-decision-stop-over-policy-cap stops at needs_agent for a low-usage, over-cap offer; no ceiling, mint, vendor notice, or append event is emitted.

The dogfood run should execute the published package after install and verify the receipt from that post-publish run, not a local harness fixture receipt.

Published execution profile

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

Runner
  • decide
Profile digestsha256:5b65c7924bbfb883074a89b89f138a299bd81d0a03d0429bb27c40df86579f66
skill: renewal-decision
version: 0.1.2
catalog:
  publisher: dh0h
  kind: graph
  audience: operator
  visibility: public
  role: context
  part_of:
    - runx/spend
  category: ops
connectors:
  store:
    operations:
      - events.append
      - projection.read
runners:
  decide:
    default: true
    inputs:
      data_source_uri:
        type: string
        required: true
        description: Logical data source holding renewal decision state; production bindings should point at the operator's vendor ledger.
      store_id:
        type: string
        required: false
        description: Optional deterministic local fixture store id.
      vendor_contract:
        type: json
        required: true
        description: vendor_contract{vendor_id,contract_ref,current_terms,contract_value,expiry}.
      usage_actuals:
        type: json
        required: true
        description: usage_actuals{periods,units_consumed,cost_per_unit}.
      renewal_offer:
        type: json
        required: true
        description: renewal_offer{amount,currency,terms,expiry}.
      procurement_policy:
        type: json
        required: true
        description: procurement_policy{min_usage_units,max_renewal_pct,approval_threshold}.
    steps:
      - id: read-vendor
        operation: store/projection.read
        input:
          data_source_uri: $input.data_source_uri
          resource: vendor_renewals
          aggregate_id: $input.vendor_contract.vendor_id
      - id: judge-renewal
        label: decide renew, renegotiate, or cancel
        agent:
          role: procurement
          task: renewal-decision
        outputs:
          decision_packet:
            required: false
        inputs:
          vendor_contract: $input.vendor_contract
          usage_actuals: $input.usage_actuals
          renewal_offer: $input.renewal_offer
          procurement_policy: $input.procurement_policy
          vendor_projection: $steps.read-vendor.provider_operation.result.projection
        artifacts:
          named_emits:
            renewal_decision_packet: decision_packet
      - id: append-decision
        operation: store/events.append
        idempotency_key: $steps.judge-renewal.decision_packet.data_store.append_event.idempotency_key
        input:
          data_source_uri: $input.data_source_uri
          resource: vendor_renewals
          aggregate_id: $input.vendor_contract.vendor_id
          expected_version: $steps.judge-renewal.decision_packet.data_store.append_event.expected_version
          event: $steps.judge-renewal.decision_packet.data_store.append_event.event
harness:
  cases:
    - name: renewal-decision-renew-with-bounded-ceiling
      inputs:
        data_source_uri: tenant://renewal-decision/vendor-ledger
        store_id: renewal-decision-harness-v1
        vendor_contract:
          vendor_id: vendor:acme-observability
          contract_ref: contract:acme-observability:2026
          current_terms:
            service: observability platform
            plan: business
            seats: 42
            renewal_notice_days: 30
          contract_value:
            amount: 100000
            currency: USD
          expiry: 2026-08-31
        usage_actuals:
          periods:
            - period: 2026-04
              units_consumed: 1180
              spend: 9200
            - period: 2026-05
              units_consumed: 1240
              spend: 9450
            - period: 2026-06
              units_consumed: 1275
              spend: 9500
          units_consumed: 3695
          cost_per_unit: 7.62
        renewal_offer:
          amount:
            amount: 112000
            currency: USD
          currency: USD
          terms:
            term_months: 12
            price_increase_pct: 12
            support_tier: business
          expiry: 2026-08-15
        procurement_policy:
          min_usage_units: 3000
          max_renewal_pct: 15
          approval_threshold:
            amount: 100000
            currency: USD
      env:
        RUNX_DATA_SOURCES: '{"data_sources":{"tenant://renewal-decision/vendor-ledger":{"adapter":"data.local","resources":{"vendor_renewals":{"kind":"event_stream","partition_key":"aggregate_id"}}}}}'
      caller:
        answers:
          judge-renewal:
            decision_packet:
              decision:
                action: renew
                reason: Active usage exceeds the minimum, vendor identity matches the contract, and the $112000 offer is within the 15% renewal cap over the $100000 contract value.
                confidence: high
              bounded_ceiling:
                schema: runx.attenuation_request.v1
                form: data
                amount:
                  amount: 112000
                  currency: USD
                currency: USD
                scopes:
                  - spend.reserve
                  - spend.settle
                  - receipt.seal
                counterparty: vendor:acme-observability
                idempotency_key: renewal-decision:vendor:acme-observability:2026-08:renew
                expires_at: 2026-08-15T00:00:00Z
                downstream_runner: registry:runx/spend@0.1.1
              escalation_packet:
                approval_required: true
                lane: human_approval
                reason: Renewal is within policy but exceeds the approval threshold, so a human must approve before C3 consumes the ceiling.
                notice_runner: governed send-as run named by the downstream driver after approval
              data_store:
                package_ref: registry:runx/data-store@0.1.2
                data_source_uri: tenant://renewal-decision/vendor-ledger
                store_id: renewal-decision-harness-v1
                read_projection:
                  runner: read_projection
                  resource: vendor_renewals
                  aggregate_id: vendor:acme-observability
                append_event:
                  runner: append_event
                  resource: vendor_renewals
                  aggregate_id: vendor:acme-observability
                  expected_version: 0
                  idempotency_key: renewal-decision:vendor:acme-observability:2026-08:renew
                  event:
                    type: renewal_decision.recorded
                    payload:
                      action: renew
                      contract_ref: contract:acme-observability:2026
                      offer_amount:
                        amount: 112000
                        currency: USD
                      cap_pct: 15
                      usage_units: 3695
                      bounded_ceiling_ref: attenuation:renewal-decision:vendor:acme-observability:2026-08
              observations:
                verdict: renew
                matched_vendor_id: vendor:acme-observability
                sealed_contract_reference: contract:acme-observability:2026
                usage_alignment: 3695 units exceeds the 3000 unit minimum.
                spend_variance: 12% increase is within the 15% cap.
                policy_cap_check: pass
                aggregate_id: vendor:acme-observability
                appended_version: 1
                stop_reason: null
                harness_cases:
                  - renewal-decision-renew-with-bounded-ceiling
                  - renewal-decision-stop-over-policy-cap
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
      operator_journeys:
        - mode: standalone
          confusors:
            - purchase-approval
            - spend
          request: Decide whether to renew, renegotiate or cancel this vendor.
          expected_outcome: Return the decision and a bounded spend ceiling only for an approved renewal.
        - mode: composed
          request: Continue this renewal-decision work from evidence already gathered upstream.
          expected_outcome: Return the decision and a bounded spend ceiling only for an approved renewal.
          prior_evidence:
            - The vendor contract and renewal policy already read.
          must_not_repeat:
            - Do not sign or cancel the contract.
    - name: renewal-decision-stop-over-policy-cap
      inputs:
        data_source_uri: tenant://renewal-decision/vendor-ledger
        store_id: renewal-decision-harness-v1
        vendor_contract:
          vendor_id: vendor:legacy-crm
          contract_ref: contract:legacy-crm:2026
          current_terms:
            service: crm
            plan: team
            seats: 25
          contract_value:
            amount: 50000
            currency: USD
          expiry: 2026-09-30
        usage_actuals:
          periods:
            - period: 2026-04
              units_consumed: 240
              spend: 4100
            - period: 2026-05
              units_consumed: 210
              spend: 4050
            - period: 2026-06
              units_consumed: 190
              spend: 4020
          units_consumed: 640
          cost_per_unit: 19.02
        renewal_offer:
          amount:
            amount: 65000
            currency: USD
          currency: USD
          terms:
            term_months: 12
            price_increase_pct: 30
          expiry: 2026-09-15
        procurement_policy:
          min_usage_units: 1000
          max_renewal_pct: 10
          approval_threshold:
            amount: 40000
            currency: USD
      env:
        RUNX_DATA_SOURCES: '{"data_sources":{"tenant://renewal-decision/vendor-ledger":{"adapter":"data.local","resources":{"vendor_renewals":{"kind":"event_stream","partition_key":"aggregate_id"}}}}}'
      expect:
        status: needs_agent

Published package and test evidence.

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

Test result

Harness resultPassed
Tested version0.1.2
Recorded result2 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Declared cases2
Test recordOpen the recorded run
Inspect receipt referencessha256:ec9796605c972179d615590580153f761cf4df1cb1a83f488c6a99d8a903381csha256:31af0bbb078a7b9e6703d78c877473a853a85de17b2a485a93c572ec08d37efb

Package identity

Published revision0.1.2
Content digestsha256:d748b36ff91d6513cc996ec1ec28973f3a424b4bf85a5a07c12d3c705b8b2c2f
SKILL.md digestsha256:c99a1cd9b4315d87cf89b95b878ddd62d8d88fb78448e765033f74d4dc68b30e
Execution profile digestsha256:5b65c7924bbfb883074a89b89f138a299bd81d0a03d0429bb27c40df86579f66
Publisher identityUnverified publisher · dh0h
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · Declareddh0h · 25 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.2ViewingContent digest sha256:d748b36ff91d6513cc996ec1ec28973f3a424b4bf85a5a07c12d3c705b8b2c2f
  2. sha-7640d1bb2cbeContent digest sha256:7640d1bb2cbe812bf95185a495288c6784b3bef8b97db6081301e0afd4efa1a1
  3. sha-f6cd8003f0fbContent digest sha256:f6cd8003f0fbe8c5839a041648eade6db84a3a4b4c30ae8f235eba2f0b5d2fed
  4. sha-760ccf6f6afbContent digest sha256:760ccf6f6afb0c6cf70663fa69be1b3cfbfc812ec0ff5f89eae8a801bd65ccc4
  5. sha-d99755363352Content digest sha256:d9975536335201494c5f815a1154fa0eb22309d2cf304b943e8ddebc1495cf54