GitHub ↗
Verified v1
PF
Reuse patterns

Where PolicyFuse fits

PolicyFuse is most useful when an application has a consequential action that should proceed only after a bounded natural-language policy is interpreted under validator consensus.

AI agents

Agent action permissions

Authorize an agent action only when its exact tool call, target, amount or operation fields satisfy a versioned mandate. Bind the authorization to the downstream agent executor as consumer.

Marketplaces

Listing or payout policy gates

Evaluate whether an exact listing, service action, or release condition satisfies immutable marketplace policy before the marketplace attaches its own consequence.

DAOs

Governance mandate checks

Bind an exact proposed administrative action to a policy version and require every consequential rule to PASS before presenting a current authorization to the execution layer.

Enterprise workflow

Semantic approval primitive

Represent policies such as procurement or delegation rules as immutable versions while keeping actual payment or execution outside PolicyFuse.

Developer platforms

Reusable policy middleware

Use PolicyFuse as a neutral semantic gate shared by multiple apps. Each app passes its own consumer address and exact canonical action core.

Ambiguous requests

Repair-first UX

Instead of collapsing uncertainty into denial, surface REPAIR_REQUIRED, collect better clarification, create a new revision, and preserve the original action binding.

Pattern: downstream execution

consumer.ts
// 1. Finalize PolicyFuse evaluation.
// 2. Read the ALLOW authorization from durable state.
// 3. Recompute/retain your exact actionCoreDigest.
const ok = await isAuthorizationCurrentFor(
  authorizationId,
  myConsumerAddress,
  actionCoreDigest,
);

if (!ok) throw new Error('Not authorized');

// 4. Apply application-specific replay protection.
// 5. Execute your application's own consequence.

Pattern: repair UX

  1. Show the exact rule(s) that evaluated UNKNOWN where your product can expose them safely.
  2. Ask for clarification that resolves missing context without changing the consequence-bearing action.
  3. Call repair_intent to create a new immutable revision.
  4. Evaluate the new revision; never mutate the original intent into a different action.