---
title: "Write the moderation policy as one table · Agent Wranglers"
url: https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/policy-table
id: TNS-2
level: Recommended
updated: 2026-10-22
tokens: 1164
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Write the moderation policy as one table of reasons and actions

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Reports and queues](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: TNS-2
- Level: Recommended
- Chapter: [Reports and queues](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues.md)
- Rule: Keep the content rules as one versioned table in the code. Each row names a reason, its severity, the default action and the legal or contract ground.
- Check: A unit test fails when a row lacks a reason, severity, action or ground. A test renders the terms page and finds every reason from the table. Every decision record in the last 30 days holds a policy version.
- How: The same table drives the report form, the queue order, the moderator's buttons and each statement of reasons. Then the terms, the tools and the yearly report never drift apart. Article 14 of the Digital Services Act asks the terms to describe your moderation. Generate that section of the terms from the table, as [Decide which Digital Services Act tier you are in](https://agentwranglers.se/playbook/compliance/online-platforms/dsa-tier.md) expects. Typical reasons are spam, harassment, hate, sexual content, violence, self-harm, scams, intellectual property and child safety. Mark which reasons are illegal content and which only break your terms, since the ground in the statement differs. Store the table version on every decision, so an old decision shows the rules of its day.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export const POLICY_VERSION = '2026-10-01';
export const POLICY = [
  { reason: 'child-safety', severity: 1, action: 'remove-and-report', ground: 'law', illegal: true },
  { reason: 'threat-to-life', severity: 1, action: 'remove-and-alert-police', ground: 'law', illegal: true },
  { reason: 'scam', severity: 2, action: 'remove', ground: 'terms 4.2', illegal: false },
  { reason: 'spam', severity: 3, action: 'hide', ground: 'terms 4.1', illegal: false },
];
```

### Python example

```python
POLICY_VERSION = "2026-10-01"
POLICY = [
    {"reason": "child-safety", "severity": 1, "action": "remove-and-report", "ground": "law", "illegal": True},
    {"reason": "threat-to-life", "severity": 1, "action": "remove-and-alert-police", "ground": "law", "illegal": True},
    {"reason": "scam", "severity": 2, "action": "remove", "ground": "terms 4.2", "illegal": False},
    {"reason": "spam", "severity": 3, "action": "hide", "ground": "terms 4.1", "illegal": False},
]
```

## Sources

- [Digital Services Act Article 14](https://eur-lex.europa.eu/eli/reg/2022/2065/oj)

## Related rules

- TNS-1 [Put a report button on every piece of user content](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/report-button.md) in Trust and safety
- CMP-62 [Decide which Digital Services Act tier you are in](https://agentwranglers.se/playbook/compliance/online-platforms/dsa-tier.md) in Compliance and governance
- TNS-4 [Work the queue in order of harm and deadline](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/queue-priority.md) in Trust and safety
- TNS-8 [Warn before you suspend and count every strike](https://agentwranglers.se/playbook/trust-and-safety/decisions-and-appeals/strikes-and-suspensions.md) in Trust and safety
- TNS-10 [Have a second person decide each appeal](https://agentwranglers.se/playbook/trust-and-safety/decisions-and-appeals/appeal-review.md) in Trust and safety

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/policy-table">Agent Wranglers trust and safety playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Put a report button on every piece of user content](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/report-button.md)
- Next: [Gather every report and flag in one queue](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues/one-moderation-queue.md)
- [Reports and queues](https://agentwranglers.se/playbook/trust-and-safety/reports-and-queues.md)
