---
title: "Derive scope from recorded facts · Agent Wranglers"
url: https://agentwranglers.se/playbook/compliance/scope-and-ownership/scope-from-facts
updated: 2026-10-20
licence: "All rights reserved"
---

# Derive scope from recorded facts

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Scope and ownership](https://agentwranglers.se/playbook/compliance/scope-and-ownership)
- Rule: Store the facts that decide which laws apply, such as headcount, turnover, countries served and product types, and compute each threshold in code.
- How: Keep a small facts file next to the register. Write each threshold as a named function with a link to the article it comes from. The EU size test in Recommendation 2003/361 is a common one. A company stops being small at 50 staff, or when both turnover and balance sheet pass 10 million euros. NIS2 uses that line. Count staff and money of partner and linked companies too, as the Recommendation says. A status changes only after the line is crossed in two years in a row. When a function's answer differs from the register, the build fails, so a change in facts forces a new decision.
- Check: A unit test sets headcount to 50 for one year in a copy of the facts file, and the size stays small. With 50 for two years in a row, the size changes from small to medium. The register check then fails until the NIS2 entry is updated.

Example:

```js
export const isSmallEnterprise = ({ staff, turnoverEur, balanceSheetEur }) =>
  staff < 50 && (turnoverEur <= 10_000_000 || balanceSheetEur <= 10_000_000);
```

```python
def is_small_enterprise(staff: int, turnover_eur: int, balance_sheet_eur: int) -> bool:
    return staff < 50 and (turnover_eur <= 10_000_000 or balance_sheet_eur <= 10_000_000)
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers compliance playbook: https://agentwranglers.se/playbook/compliance/scope-and-ownership/scope-from-facts`.

- Previous: [Keep a register of every duty that applies](https://agentwranglers.se/playbook/compliance/scope-and-ownership/obligations-register)
- Next: [Give every duty one named owner](https://agentwranglers.se/playbook/compliance/scope-and-ownership/named-owners)
- [Scope and ownership](https://agentwranglers.se/playbook/compliance/scope-and-ownership)
