Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/claude-code/skills/dpolens/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: >-
Search this organisation's privacy policies and the privacy law that applies to it, through
DPOLens, and cite the clause. Use when writing or changing code that collects, stores, logs,
shares or deletes personal data, when choosing a retention period, when adding a field or a
column that holds personal data, when sending data to another service, and when asked what a
policy or the law requires.
column that holds personal data, when sending personal data to another service, and when
asked what a policy or the law requires.
---

# DPOLens
Expand Down
24 changes: 18 additions & 6 deletions evals/trigger-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,24 @@ added on its own, so that only the instructions the server sends when it connect
| Questions about the rules | 9 of 9 | 9 of 9 |

The server's instructions did the work: without the skill, every task that should search still
did, before editing. The one difference is `product-viewed-event`, and the skill's description
is the likely reason. It says to use DPOLens "when sending data to another service", which that
task does with data about no one, where the server's instructions say "personal data". Without
the plugin, the task never searched. The plugin is still what
[Get started](https://dpolens.com/docs/get-started) installs, for its commands and for keeping
the token in the system's credential store.
did, before editing. The one difference is `product-viewed-event`, and it had two ways in. The
skill's description said to use DPOLens "when sending data to another service", which that task
does with data about no one, where the server's instructions say "personal data". And in one of
its three runs, Claude Code reached DPOLens through the plugin's `/policy-check` command, which
it chose to run on its own. Without the plugin, the task never searched.

The skill's description now says "when sending personal data to another service", and the plugin
arm was run again with that one change, on 17 and 18 November 2026. It searched in 36 of 36 runs
of tasks that touch personal data, all before the first edit, in 1 of 45 runs of tasks that do
not, and in 9 of 9 runs of questions about the rules. `product-viewed-event` searched in none of
its three runs, and `/policy-check` never ran on its own. The one search that should not have
happened was `session-length` ("Make sessions last 7 days instead of 30"), in one of its three
runs, asking "how long can session records and login tokens be retained". The rerun's instance
had no law chosen, so every search came back as an error. That does not change the count: a run
is scored on the call, and the call comes before the answer.

The plugin is still what [Get started](https://dpolens.com/docs/get-started) installs, for its
commands and for keeping the token in the system's credential store.

## How it is measured

Expand Down
4 changes: 2 additions & 2 deletions scripts/client_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def skill() -> str:
Search this organisation's privacy policies and the privacy law that applies to it, through
DPOLens, and cite the clause. Use when writing or changing code that collects, stores, logs,
shares or deletes personal data, when choosing a retention period, when adding a field or a
column that holds personal data, when sending data to another service, and when asked what a
policy or the law requires.
column that holds personal data, when sending personal data to another service, and when
asked what a policy or the law requires.
---

# DPOLens
Expand Down
24 changes: 23 additions & 1 deletion tests/unit/test_client_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import pytest
import yaml

from dpolens_mcp.instructions import SENTENCES
from dpolens_mcp.instructions import SEARCH, SENTENCES, TRIGGER, community_search
from dpolens_mcp.settings import Settings

REPO = Path(__file__).resolve().parents[2]
Expand Down Expand Up @@ -110,6 +110,28 @@ def test_the_skill_says_when_to_use_it(self) -> None:
assert "personal data" in front
assert "retention" in front

def test_what_says_when_to_search_names_only_personal_data(self) -> None:
"""Data about nobody, such as a page view sent to analytics, is no reason to search.

An assistant reads these before it decides whether to call DPOLens, so a bare "data"
in any of them widens when it does. The lines are joined first, so "personal" at the
end of one line and "data" at the start of the next are still one phrase.
"""
skill = (CLIENTS / "claude-code" / "skills" / "dpolens" / "SKILL.md").read_text(
encoding="utf-8"
)
when = {
"the skill's description": yaml.safe_load(skill.split("---")[1])["description"],
"the instructions' trigger": TRIGGER,
"search_policies": SEARCH,
"search_policies on a community version": community_search(30),
}
bare = re.compile(r"(?<!personal )\bdata\b", re.IGNORECASE)

found = {name: bare.findall(" ".join(text.split())) for name, text in when.items()}

assert all(not words for words in found.values()), found


class TestNothingCarriesACredential:
@pytest.mark.parametrize(
Expand Down
Loading