signed-policy-agentic-commerce

signed-policy-agentic-commerce is a command for Claude Code from PostOakLabs/ainumbers. It costs 28 tokens per session (1,361 once invoked), scanned A, original, MIT.

A worked workflow for making a purchasing agent follow a signed spending policy. It tests both a purchase over the policy limit and one within the limit, then records the outcomes for later checking.

In plain words
What is it for?
Use it to test signed spending limits, escalation handling, compliant and non-compliant purchases, and replayable evidence of the decisions.
Why use it?
It shows whether an automated purchase was governed by an explicit mandate and whether an over-limit action was escalated instead of proceeding normally.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ainumbers plugin — 1 skill, 5 commands shipped together

Good fit Use it to test signed spending limits, escalation handling, compliant and non-compliant purchases, and replayable evidence of the decisions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/postoaklabs/ainumbers/signed-policy-agentic-commerce
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/PostOakLabs/ainumbers

Made for: Claude Code.

Or install ainumbers, the plugin that ships this one along with the rest of its 1 skill, 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for signed-policy-agentic-commerce

README.md
[![agentmods](https://agentmods.dev/badge/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce/github.svg)](https://agentmods.dev/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce)
Your own site
<a href="https://agentmods.dev/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce"><img src="https://agentmods.dev/badge/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for signed-policy-agentic-commerce

Your own site · 80×15
<a href="https://agentmods.dev/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce"><img src="https://agentmods.dev/badge/commands/postoaklabs/ainumbers/signed-policy-agentic-commerce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01361
Opus 5.5 $0.00011 $0.00544
Sonnet 5.5 $0.00006 $0.00272
Haiku 4.5 $0.00003 $0.00136

Measured 21d ago against content hash 2250a2a87c66, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

signed-policy-agentic-commerce scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent-kit/claude-plugin/commands/signed-policy-agentic-commerce.md · 26 lines

How it starts

The opening of the file, as written. The whole thing — 26 lines — stays where its author put it; the contents beside it link to each section on GitHub.

An agent buys under a signed policy and proves the policy governed

Act as a procurement agent operating under a signed spend policy. Produce a receipt that proves the policy governed every step. Every server call goes to https://mcp.ainumbers.co/mcp.

The Work Mandate below is synthetic and its signing key comes from a published test seed, so anyone can re-derive the key and re-sign the mandate: take the SHA-256 digest of the ASCII string ainumbers-showcase-mandate-test-key as the 32-byte Ed25519 seed, which yields did:key:z6MknHY2vWeuwJBynEVZEzqfNFuQhBKKUDEyPMdT3Ly9ZVCm. Send the mandate exactly as written, because a single changed byte invalidates the signature. It is valid from 27 September 2026 to 27 September 2028.

MANDATE = {"chaingraph_version":"0.4.0","mandate_type":"work_mandate","tool_id":"work-mandate","generated_at":"2026-09-27T00:00:00Z","policy_parameters":{},"output_payload":{"mandate_type":"work_mandate","scope":{"tool_ids":[],"chains":["agent-commerce-conformance","escalation-sla-supervised-autonomy-receipt"]},"conditions":[],"escalation_triggers":[],"validity":{"not_before":"2026-09-27T00:00:00Z","not_after":"2028-09-27T00:00:00Z"},"principal":{"id":"did:key:z6MknHY2vWeuwJBynEVZEzqfNFuQhBKKUDEyPMdT3Ly9ZVCm"}},"execution_hash":"3c4509eea7acc8c8298cb155ad4ca2a931c2fa4296b57d1cc89d01a92ba1f1cc","audit_signature":{"proof":{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","verificationMethod":"did:key:z6MknHY2vWeuwJBynEVZEzqfNFuQhBKKUDEyPMdT3Ly9ZVCm","proofPurpose":"assertionMethod","created":"2026-09-27T00:00:00Z","proofValue":"zfvEY9FAuQLwwMeGqp7a8vpj68aMnYFsRuLrZMfGsfWqLWoC2LZpT7h91qdXoSxjMCckGaZqg3wmVikgMDPZR9o1"}}}

  1. Call find_chain with "agent commerce conformance" and pick the entry whose chain_name is agent-commerce-conformance. List its four steps from that result and say which ones are callable server-side.
  2. Call run_chain with chain agent-commerce-conformance, compute "server" and no mandate. Report every step's execution_hash and the composite execution_hash. This is the baseline nobody authorised.
  3. Call run_chain again on the same chain with compute "server" and mandate MANDATE. Report every step's execution_hash and the composite. Then explain the difference: run_chain verifies the §16 eddsa-jcs-2022 signature, takes mandate_hash from the mandate's own execution_hash, and folds that hash into each step's policy_parameters and into the composite preimage under §22.5 conditional presence. The run without a mandate stays byte-identical to the pre-binding baseline, so the two composites differing is the proof that a policy was in force.
  4. Recompute the mandated composite yourself. Call verify_execution_hash with policy_parameters taken from that run's composite_artifact.policy_parameters, with output_payload built as { chain, steps } from the same artifact's output_payload, and with claimed_hash set to the composite execution_hash. Leave step_compliance_flags out of output_payload, because §22.8.2 adjacent metadata sits outside the hash preimage. Confirm valid is true and that mandate_hash is one of the policy_parameters you just hashed. Then repeat the step 3 call unchanged and confirm the composite and dedupe.input_hash come back identical.
  5. Call run_chain with chain escalation-sla-supervised-autonomy-receipt, compute "server", the same MANDATE and escalation_transport "resolve_handle". This chain carries a §21 gate on art-67. Report the run status, the gate decision with the value it read, which step was skipped, and the escalation record with its record_hash. Confirm the record carries the same mandate_hash as the step receipts, so the open item names the policy it was opened under.
  6. Change one character inside MANDATE's scope, such as the last letter of the first chain name, and call run_chain on agent-commerce-conformance again. Quote the error verbatim and say at which point the run stopped.
  7. Open the ledger_url from the mandated commerce run in step 3. Report what the §21 gate replay shows and whether the §16 signature check and the mandate_hash binding pass in the browser.
  8. Now show the counterparty would accept the agent: on https://ainumbers.co/chaingraph/art-129-webbotauth-signature-verifier.html, use the page's WebMCP tool on the page's own synthetic sample to verify a WebBotAuth signed request header. Record the execution_hash and confirm DevTools shows no request leaving the tab.
  9. Call build_session_receipt over four hashes in call order: the unmandated composite, the mandated composite, the escalated chain's composite, and the in-page identity hash. Anchor the root with anchor_hash on https://anchor.ainumbers.co/mcp using the FreeTSA RFC 3161 authority. Return the session root, the anchor receipt, and a five-line summary covering who authorised the work, which code ran, where the gate halted it, the mandate hash that binds all of it, and what a person still has to close out through the open resolve handle. If a named tool is not in your tool list, call call_tool with { "name": "", "arguments": { … } }. It runs the same validation and returns the same receipt.

Read the full file on GitHub · 26 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago Changed · +5 lines 2250a2a87c66
  2. 26d ago Changed 582281c04d46
  3. 1mo ago First seen · 21 lines · 28 tokens per session scan A 7fdfba141a3d

Subscribe to this mod's changes

signed-policy-agentic-commerce is a command published in the GitHub repository PostOakLabs/ainumbers (11 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 1,361 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.