diff --git a/clients/claude-code/skills/dpolens/SKILL.md b/clients/claude-code/skills/dpolens/SKILL.md index f7c2d0d..73062e9 100644 --- a/clients/claude-code/skills/dpolens/SKILL.md +++ b/clients/claude-code/skills/dpolens/SKILL.md @@ -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 diff --git a/evals/trigger-test.md b/evals/trigger-test.md index 393399a..b6c63ef 100644 --- a/evals/trigger-test.md +++ b/evals/trigger-test.md @@ -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 diff --git a/scripts/client_text.py b/scripts/client_text.py index bba81e0..be0d17f 100644 --- a/scripts/client_text.py +++ b/scripts/client_text.py @@ -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 diff --git a/tests/unit/test_client_files.py b/tests/unit/test_client_files.py index e7cbd60..f7e57df 100644 --- a/tests/unit/test_client_files.py +++ b/tests/unit/test_client_files.py @@ -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] @@ -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"(?