# Policy rules (/docs/typescript/guides/policy-rules)



Every scan method accepts `policyOverrides` — additive rules evaluated on
top of your app's saved policy, not a replacement for it. A matched rule
contributes **directives** to the result's `policy` field; your
application decides what to actually do with them, the same way it
decides what to do with `action`.

```ts
const result = await tawa.analyze(userInput, {
  policyOverrides: [
    {
      id: "block-finance-tool-for-guests",
      when: { tool_name: "transfer_funds", caller_role: "guest" },
      directives: ["block"],
    },
  ],
});

console.log(result.policy?.directives); // e.g. ["block"]
console.log(result.policy?.matchedRuleIds); // ["block-finance-tool-for-guests"]
```

<Callout type="info">
  See [Policy rules](/docs/api/policy-rules) in the API Reference for the
  full rule schema, every matchable key, and directives with built-in
  meaning — this page only covers the TypeScript override syntax.
</Callout>

## Acting on the verdict [#acting-on-the-verdict]

A matched rule's `directives` are a signal, not an automatic decision — see
[Enforcing a policy](/docs/typescript/guides/enforcing-policy) for the exact
pattern in the raw SDK and the Vercel AI SDK.

Your own vocabulary of directive strings (`"strip_system_prompt"`,
`"require_human_review"`, ...) is branched on wherever you enforce the
policy, the same way the
[agent protection cookbook](/docs/typescript/cookbook/agent-protection) does
for `"disable_tools:"`.
