Check a privacy notice against the checklist.
Done by an agent. Checked twice.
A verdict on every required statement, with the exact words quoted and each gap, contradiction and leftover placeholder listed.
Real files in
- checklist.md
A company's written checklist of 19 statements a privacy notice must make, most with lettered parts. 82 lines, 3 KB. - privacy_notice.md
A 14 section customer privacy notice for an online shop, with gaps, a stale date, two places that contradict each other and two unfilled placeholders. 70 lines, 5 KB.
Sample data written by Atris. Not a real company.
Three steps
- 1.Read the checklist and the notice
- 2.Test every item, part by part
- 3.Write the result and the gap list
Claude Sonnet 5.5, 1 min. No web. It never saw the check.
Checked twice
- Passed: 19 of 19 checklist items have exactly one row
- Passed: 19 of 19 verdicts equal the verdict worked out from the notice (9 present, 5 partial, 3 missing, 2 conflict)
- Passed: 5 of 5 partial items name exactly the lettered parts that are not met
- Passed: 16 of 16 quotes are found word for word in the section named and 3 of 3 missing items claim no quote
- Passed: 2 of 2 conflicts give both answers the notice gives
- Passed: gaps.md names 10 of 10 items that are not fully met and 2 of 2 placeholders left in the notice, with 11 of 11 figures in it found in the notice or the checklist
- Passed: gaps.md opens by saying it is a first pass for a person to decide and not legal advice
Second review by Claude Opus 5.5: pass.
Then we broke a copy of the output 6 ways on purpose. The check caught 6.
- N-02 (conflict): Section 1 gives privacy@fernhollow.example and Section 14 gives privacyteam@fernhollowsupply.example for privacy questions; the checklist needs one email address. - N-03 (partial, b): Section 0 says "Last updated: March 3, 2025."; the checklist needs a date no more than 12 months before the review date of 2026-12-01, and this date is older than that. - N-05 (partial, c): Section 3 covers what comes from the customer and what is collected automatically but says nothing about other companies; the checklist needs it to say what comes from other companies, or that nothing does. - N-08 (conflict): Section 6 says order records are kept 24 months after your last purchase and Section 10 says 36 months after your last order; the checklist needs one period. - N-09 (partial, c): Section 8 lists copy, deletion and marketing opt-out; the checklist also needs the right to have information corrected, which the notice does not mention. - N-11 (missing): The notice does not say that we confirm who the person is before acting on a request; the checklist needs that statement. - N-12 (missing): The notice does not say that service, price or quality will not change because someone used a privacy right (Section 8 only says "We treat every customer fairly", which is a different subject); the checklist needs that statement. - N-13 (partial, b): Section 13 says the store is not meant for children but gives no age; the checklist needs the age in years below which a person counts as a child. - N-16 (partial, b): Section 12 says information is stored on servers in the United States but the transfer countries are the placeholder [LIST COUNTRIES]; the checklist needs the countries or regions named. - N-18 (missing): The notice gives no way to complain about our answer and names no team or regulator for complaints; the checklist needs one.
How this was run
An AI agent on Claude Sonnet 5.5 was given a folder with the files below and a three-step flow, and nothing else. It had no web access and never saw the check. The check was written before the run and works the answer out again from the input files. Then Claude Opus 5.5 reviewed the result against the inputs. The input files are sample data written by Atris, with the problems a real week has planted in them.
Run 2 of 2 on 1 December 2026. The agent took 1 min. Run 1 passed both checks and the job was run again later. Each run starts clean. Between runs the written flow was made clearer, or a check was corrected or made stricter. Nobody edits the output.
What the second review verified
- All 19 items appear once, in checklist order. The counts in gaps.md add up to 19 (9 present, 2 conflict, 5 partial, 3 missing), and I recounted each status from the CSV.
- N-02 and N-08 are marked as conflicts correctly. Section 1 gives privacy@fernhollow.example and Section 14 gives privacyteam@fernhollowsupply.example. Section 6 says order records are kept for '24 months after your last purchase' and Section 10 says '36 months after your last order'.
- N-03 is partial on part b, which is correct. 'Last updated: March 3, 2025.' is about 21 months before the review date of 2026-12-01, so it fails the 12-month test. N-09 is missing the right to correction, N-13 gives no age, N-16 has the placeholder [LIST COUNTRIES], and N-11, N-12 and N-18 are rightly marked missing. 'We treat every customer fairly' is a different subject from the no-penalty rule.
- I ran a script to check every quote. All 16 appear word for word in the section the CSV names. The only bracketed placeholders in the notice are [X.X] in section 0 and [LIST COUNTRIES] in Section 12, and gaps.md lists both.
What this run does not show
- Each checklist item is tested by a word pattern, so the check cannot tell whether a statement is clear enough for a regulator.
- The notice and the checklist are samples and the checklist is one company's own list, not the text of any law.
- Run 1 passed and run 2 is a fresh run under a stricter check that also tests the figures in the gap list.
Would the check catch a wrong answer?
A check that cannot fail proves nothing. After the run we took a copy of the output, broke it one small way at a time and ran the check again. It caught 6 of 6.
Open every file
flow.md · the three steps the agent followed
# Check a privacy notice against the checklist function: legal for: the compliance or legal lead who signs off a privacy notice before it is published goal: Every checklist item has a verdict on this notice, backed by the exact words, so the gaps can be fixed before it goes live. ## 1. Read the checklist and the notice Read input/checklist.md and input/privacy_notice.md from start to finish. The checklist is the company's own written list. Each item has an id and one or more lettered parts. The notice is divided into numbered sections. The lines above Section 1 are section 0. This is a first pass for a person who decides. Do not give legal advice and do not judge anything the checklist does not ask. ## 2. Test every item, part by part Search the whole notice for each part, not only the section with the matching heading. Then give each item exactly one status: - `conflict` when the checklist says two different answers are a conflict and the notice gives two. - `present` when every part is met in plain words. - `partial` when at least one part is met and at least one is not. - `missing` when no part is met. A part is not met when the words are about a different subject, when a date or number fails the test the checklist sets, or when the notice has an unfilled placeholder in square brackets where the answer should be. For every status except `missing`, copy the full sentence that best supports the verdict. A quote is one unbroken passage copied character for character from the notice. ## 3. Write the result and the gap list Write output/checklist_result.csv with columns item_id,status,not_met,section,quote,note. One row per checklist item, in checklist order. - not_met: the letters of the parts that are not met, like b or b c. Empty for `present` and `conflict`. - section: the number of the section the quote comes from. Empty with quote for `missing`. - note: one plain sentence. For `conflict` it must give both answers and the section of each. Write output/gaps.md for the lead. The first line must read exactly: First pass for a person to decide. Not legal advice. Then the number of items with each status. Then one line for every item that is not `present`: the item id, what the notice says now and what the checklist needs. Then a part called Placeholders that lists every unfilled placeholder in square brackets left in the notice, with its section. Use only numbers that are in the notice or the checklist, plus your own counts. Do not work out new ones. ## Done looks like - Every checklist item appears once with a status. - Every quote can be found word for word in the section named. - gaps.md lists every item that is not fully met and every placeholder left in the notice.
input/checklist.md · 82 lines, 3 KB
# Privacy notice checklist Owner: Legal and Compliance. Version 6. Review date: 2026-12-01 Use this checklist every time a customer privacy notice is written or changed. It is our own list of what a notice must say. An item is met only when the notice says it in plain words. A heading on its own does not count, and words about a different subject do not count. Some items have lettered parts. Every part must be met. ## N-01 Who the company is (a) The company's full legal name. (b) A postal address. ## N-02 Privacy contact (a) One email address for privacy questions. If the notice gives two different email addresses for privacy questions, that is a conflict. ## N-03 Date of the notice (a) A "last updated" date. (b) That date is no more than 12 months before the review date at the top of this checklist. ## N-04 What is collected The notice lists the kinds of personal information collected, and the list covers at least: (a) contact details, (b) payment details, (c) device or browsing data. ## N-05 Where it comes from (a) Says what comes from the customer. (b) Says what is collected automatically. (c) Says what comes from other companies, or says that nothing comes from other companies. ## N-06 What it is used for (a) Says what the information is used for. ## N-07 Who receives it (a) Names the kinds of companies that receive personal information. (b) Says in plain words whether personal information is sold. ## N-08 How long it is kept (a) Says how long order records are kept, as a period of time. If the notice gives two different periods for the same records, that is a conflict. ## N-09 Customer rights The notice lists all four: (a) get a copy of your information, (b) have it deleted, (c) have it corrected, (d) opt out of marketing. ## N-10 How to make a request (a) At least two ways to send a request. (b) How long we take to answer, as a number of days. ## N-11 Identity check (a) Says that we confirm who the person is before we act on a request. ## N-12 No penalty for using a right (a) Says that we will not refuse service, charge a different price or give worse service because a person used a privacy right. ## N-13 Children (a) Says whether the service is meant for children. (b) Gives the age, in years, below which a person counts as a child. ## N-14 Cookies (a) Says that cookies or similar tools are used. (b) Says how to refuse them or turn them off. ## N-15 Security (a) Says how personal information is protected. ## N-16 Storage and transfers abroad (a) Says where personal information is stored. (b) Names the countries or regions it may be transferred to. ## N-17 Changes to the notice (a) Says the notice may change. (b) Says how customers will be told. ## N-18 Complaints (a) Says how to complain if a customer is unhappy with our answer, naming a person or team inside the company or an outside regulator. ## N-19 Stopping marketing (a) Says how to stop marketing emails.
input/privacy_notice.md · 70 lines, 5 KB
# Fernhollow Outdoor Supply Privacy Notice Last updated: March 3, 2025. Version [X.X] This notice explains what personal information Fernhollow collects when you shop with us, why we collect it and what you can do about it. ## 1. Who we are We are Fernhollow Outdoor Supply Co., a retailer of camping and hiking gear. Our registered office is at 1420 Quarry Lane, Bend, OR 97701. We run the online store at fernhollow.example and four shops in Oregon. If you have a question about this notice, write to privacy@fernhollow.example. ## 2. Information we collect We collect the following kinds of personal information: - Contact details: your name, email address, phone number and delivery address. - Payment details: the last four digits of your card, the card type and your billing address. Full card numbers go straight to our payment processor and never reach our systems. - Order history: what you bought, when, and any returns or repairs. - Device and browsing data: your IP address, browser type and the pages you view on our site. - Loyalty details: your Trailhead Club number and points balance, if you join. ## 3. Where the information comes from Most of the information comes directly from you, when you place an order, create an account, join the Trailhead Club or contact our support team. We also collect device and browsing data automatically when you visit our site, using the tools described in Section 7. ## 4. How we use information We use your information to take payment and deliver your order, to answer your questions, to run the Trailhead Club, to keep our site working and safe, and to meet our tax and accounting duties. With your permission we also use your email address to send offers. Every marketing email has an unsubscribe link at the bottom, and you can also turn offers off in your account settings. ## 5. Who we share it with We share personal information only with companies that help us run the store: payment processors, delivery carriers, our email service, our website host and the firm that handles repairs. Each of them may use the information only to do that work for us. We do not sell your personal information, and we do not share it with other companies for their own advertising. ## 6. How long we keep it We keep order records for 24 months after your last purchase, so that we can handle returns, repairs and warranty claims. We keep the records that tax law requires for as long as that law says. We delete support messages one year after a case is closed. ## 7. Cookies and similar tools Our site uses cookies and similar tools to remember your basket, keep you signed in and measure which pages are used. You can refuse cookies that are not needed for the site to work by using the cookie settings link at the bottom of every page, or by changing your browser settings. ## 8. Your choices and rights You can ask us for a copy of the personal information we hold about you. You can ask us to delete it, unless we must keep it by law. You can opt out of marketing at any time. We treat every customer fairly and we value your trust. ## 9. How to make a request Send a request through the form at fernhollow.example/privacy-request or by email to the address in Section 1. Tell us which request you are making and your order number if you have one. We answer every request within 30 days. ## 10. Your account You can see your order history, saved delivery addresses and marketing choices in your account at any time. If you close your account, we remove your saved addresses straight away. We keep order records for 36 months after your last order and then delete them. ## 11. Keeping information safe We protect personal information with encryption when it travels between your browser and our site, access controls that limit which staff can see customer records, and regular testing of our systems. No system is perfectly secure, and we will tell you if a breach puts your information at risk. ## 12. Where information is stored We store personal information on servers in the United States. Some of our service companies work from other countries, so we may transfer information to [LIST COUNTRIES]. ## 13. Other things to know Our store is not meant for children, and we do not knowingly collect personal information from them. We may change this notice from time to time. When we do, we will post the new version on this page and email account holders at least 14 days before a major change takes effect. ## 14. Contact us Fernhollow Outdoor Supply Co. 1420 Quarry Lane, Bend, OR 97701 Privacy questions: privacyteam@fernhollowsupply.example Customer support: help@fernhollow.example
output/checklist_result.csv · written by the agent, 20 lines
item_id,status,not_met,section,quote,note N-01,present,,1,"We are Fernhollow Outdoor Supply Co., a retailer of camping and hiking gear.","Full legal name is given here and a postal address (1420 Quarry Lane, Bend, OR 97701) is given in the next sentence of Section 1." N-02,conflict,,1,"If you have a question about this notice, write to privacy@fernhollow.example.",Section 1 gives privacy@fernhollow.example but Section 14 gives privacyteam@fernhollowsupply.example for privacy questions. N-03,partial,b,0,"Last updated: March 3, 2025.",The date is given but it is more than 12 months before the checklist review date of 2026-12-01. N-04,present,,2,We collect the following kinds of personal information:,"The list in Section 2 covers contact details, payment details and device and browsing data." N-05,partial,c,3,"Most of the information comes directly from you, when you place an order, create an account, join the Trailhead Club or contact our support team.","Customer-provided and automatic collection are stated, but the notice does not say whether anything comes from other companies." N-06,present,,4,"We use your information to take payment and deliver your order, to answer your questions, to run the Trailhead Club, to keep our site working and safe, and to meet our tax and accounting duties.",Uses are stated in plain words. N-07,present,,5,"We share personal information only with companies that help us run the store: payment processors, delivery carriers, our email service, our website host and the firm that handles repairs.","Kinds of recipients are named, and the next sentence says it does not sell personal information." N-08,conflict,,6,"We keep order records for 24 months after your last purchase, so that we can handle returns, repairs and warranty claims.",Section 6 says order records are kept 24 months after the last purchase but Section 10 says 36 months after the last order. N-09,partial,c,8,You can ask us for a copy of the personal information we hold about you.,"Copy, deletion and marketing opt-out are listed, but the right to have information corrected is not mentioned." N-10,present,,9,Send a request through the form at fernhollow.example/privacy-request or by email to the address in Section 1.,Two ways to send a request are given and the same section says requests are answered within 30 days. N-11,missing,,,,Nothing in the notice says we confirm who the person is before acting on a request. N-12,missing,,,,"Nothing in the notice says service, price or quality will not change because a person used a privacy right; the Section 8 line about treating customers fairly is a different subject." N-13,partial,b,13,"Our store is not meant for children, and we do not knowingly collect personal information from them.",It says the store is not meant for children but gives no age below which a person counts as a child. N-14,present,,7,"You can refuse cookies that are not needed for the site to work by using the cookie settings link at the bottom of every page, or by changing your browser settings.",Section 7 says cookies and similar tools are used and how to refuse them. N-15,present,,11,"We protect personal information with encryption when it travels between your browser and our site, access controls that limit which staff can see customer records, and regular testing of our systems.",Protection measures are described. N-16,partial,b,12,We store personal information on servers in the United States.,"Storage location is given, but the transfer countries are an unfilled placeholder, [LIST COUNTRIES]." N-17,present,,13,"When we do, we will post the new version on this page and email account holders at least 14 days before a major change takes effect.",The previous sentence says the notice may change and this one says how customers will be told. N-18,missing,,,,The notice gives no way to complain about our answer and names no internal team or outside regulator for complaints. N-19,present,,4,"Every marketing email has an unsubscribe link at the bottom, and you can also turn offers off in your account settings.",Unsubscribe link and account settings are named.
output/gaps.md · written by the agent, 23 lines
First pass for a person to decide. Not legal advice. ## Counts (19 checklist items) - present: 9 - conflict: 2 - partial: 5 - missing: 3 ## Items that are not present - N-02 (conflict): Section 1 gives privacy@fernhollow.example and Section 14 gives privacyteam@fernhollowsupply.example for privacy questions; the checklist needs one email address. - N-03 (partial, b): Section 0 says "Last updated: March 3, 2025."; the checklist needs a date no more than 12 months before the review date of 2026-12-01, and this date is older than that. - N-05 (partial, c): Section 3 covers what comes from the customer and what is collected automatically but says nothing about other companies; the checklist needs it to say what comes from other companies, or that nothing does. - N-08 (conflict): Section 6 says order records are kept 24 months after your last purchase and Section 10 says 36 months after your last order; the checklist needs one period. - N-09 (partial, c): Section 8 lists copy, deletion and marketing opt-out; the checklist also needs the right to have information corrected, which the notice does not mention. - N-11 (missing): The notice does not say that we confirm who the person is before acting on a request; the checklist needs that statement. - N-12 (missing): The notice does not say that service, price or quality will not change because someone used a privacy right (Section 8 only says "We treat every customer fairly", which is a different subject); the checklist needs that statement. - N-13 (partial, b): Section 13 says the store is not meant for children but gives no age; the checklist needs the age in years below which a person counts as a child. - N-16 (partial, b): Section 12 says information is stored on servers in the United States but the transfer countries are the placeholder [LIST COUNTRIES]; the checklist needs the countries or regions named. - N-18 (missing): The notice gives no way to complain about our answer and names no team or regulator for complaints; the checklist needs one. ## Placeholders - Section 0: `[X.X]` (the version number in "Last updated: March 3, 2025. Version [X.X]") - Section 12: `[LIST COUNTRIES]` (where information may be transferred)
check.py · the check, written before the run
"""Tests every lettered part of the checklist against the notice text itself, then compares with the agent's verdicts.
Each part below is a small search of the notice. Nothing is a stored answer: edit the notice and the
expected verdict changes with it.
"""
import csv, re, sys
from datetime import date
from pathlib import Path
root = Path(sys.argv[1]); ok = True
def say(passed, text):
global ok; ok = ok and passed; print(("PASS " if passed else "FAIL ") + text)
def norm(s):
s = (s or "").replace("“", '"').replace("”", '"').replace("’", "'").replace("‘", "'")
return re.sub(r"\s+", " ", s).strip()
notice = (root / "input/privacy_notice.md").read_text()
checklist = (root / "input/checklist.md").read_text()
items = re.findall(r"^## (N-\d+) ", checklist, re.M)
parts_of = {m.group(1): re.findall(r"^\(([a-z])\)", m.group(2), re.M)
for m in re.finditer(r"^## (N-\d+) .*\n((?:(?!^## ).*\n?)*)", checklist, re.M)}
y, mo, d = map(int, re.search(r"Review date: (\d{4})-(\d{2})-(\d{2})", checklist).groups())
review = date(y, mo, d)
split = re.split(r"^## (\d+)\. .*$", notice, flags=re.M)
sections = {"0": norm(split[0])}
sections.update({split[i]: norm(split[i + 1]) for i in range(1, len(split), 2)})
flat = norm(notice)
has = lambda pattern, text=flat: re.search(pattern, text, re.I) is not None
def sentence(pattern):
return next((s for s in re.split(r"(?<=[.!?]) ", flat) if re.search(pattern, s, re.I)), "")
MONTHS = "January February March April May June July August September October November December".split()
def updated_ok():
m = re.search(r"Last updated: (\w+) (\d{1,2}), (\d{4})", notice)
if not m:
return None
when = date(int(m.group(3)), MONTHS.index(m.group(1)) + 1, int(m.group(2)))
return (review - when).days <= 365
privacy_mail = sorted({e.rstrip(".") for e in re.findall(r"[\w.-]+@[\w.-]+", notice) if "privacy" in e.lower()})
kept = sorted(set(re.findall(r"keep order records for (\d+) (?:months|years)", flat, re.I)))
abroad = sentence(r"\btransfer\b")
tests = { # item -> {part letter: is it met}
"N-01": {"a": has(r"\b(Co|Inc|LLC|Ltd)\.?\b"), "b": has(r"\d+ \w+ (Lane|Street|Road|Avenue)[^.\n]*\b[A-Z]{2} \d{5}", notice)},
"N-02": {"a": len(privacy_mail) >= 1},
"N-03": {"a": updated_ok() is not None, "b": bool(updated_ok())},
"N-04": {"a": has(r"contact details"), "b": has(r"payment details"), "c": has(r"(device|browsing) (and browsing )?data")},
"N-05": {"a": has(r"comes directly from you|you give us|you provide"), "b": has(r"automatically"),
"c": has(r"from (other companies|third parties|our partners|data brokers)|(nothing|no information) comes from other")},
"N-06": {"a": has(r"we use your information to")},
"N-07": {"a": has(r"payment processors|delivery carriers"), "b": has(r"(do not|never|don't) sell|we sell")},
"N-08": {"a": len(kept) >= 1},
"N-09": {"a": has(r"\bcopy of the personal information"), "b": has(r"ask us to delete|have it deleted|erase"),
"c": has(r"\bcorrect(ed|ion)?\b|fix (any )?(errors|mistakes)|put right"), "d": has(r"opt out of marketing")},
"N-10": {"a": has(r"through the form.{0,80} or by email|by email.{0,80} or (by )?(phone|post|the form)"), "b": has(r"within \d+ days")},
"N-11": {"a": has(r"(confirm|verify|check) (your|their|the person's|who) (identity|you are)")},
"N-12": {"a": has(r"(will not|won't|do not|never) (refuse|deny|charge)[^.]*(right|request)")},
"N-13": {"a": has(r"not meant for children|not intended for children|meant for children"), "b": has(r"under (the age of )?\d+|\d+ years (old|of age)|aged? \d+")},
"N-14": {"a": has(r"uses cookies"), "b": has(r"refuse cookies|cookie settings|browser settings")},
"N-15": {"a": has(r"encryption|access controls")},
"N-16": {"a": has(r"store personal information (on servers )?in"), "b": bool(abroad) and not re.search(r"\[[^\]]+\]", abroad)},
"N-17": {"a": has(r"may change this notice"), "b": has(r"post the new version|email account holders")},
"N-18": {"a": has(r"\bcomplain|\bcomplaint|regulator|attorney general|ombudsman")},
"N-19": {"a": has(r"unsubscribe")},
}
clashes = {"N-02": privacy_mail if len(privacy_mail) > 1 else [], "N-08": kept if len(kept) > 1 else []}
want = {}
for item in items:
met = tests[item]
assert sorted(met) == sorted(parts_of[item]), item
if clashes.get(item):
want[item] = ("conflict", "")
elif all(met.values()):
want[item] = ("present", "")
elif any(met.values()):
want[item] = ("partial", " ".join(k for k in sorted(met) if not met[k]))
else:
want[item] = ("missing", " ".join(sorted(met)))
path = root / "output/checklist_result.csv"
if not path.exists():
say(False, "output/checklist_result.csv was not written"); sys.exit(1)
got = {}
for r in csv.DictReader(path.open(newline="")):
got.setdefault((r.get("item_id") or "").strip(), []).append(r)
once = sum(1 for i in want if len(got.get(i, [])) == 1)
say(once == len(want) and set(got) == set(want), f"{once} of {len(want)} checklist items have exactly one row")
row = {i: (got.get(i) or [{}])[0] for i in want}
right = sum(1 for i, (st, _) in want.items() if norm(row[i].get("status")).lower() == st)
tally = {s: sum(1 for st, _ in want.values() if st == s) for s in ("present", "partial", "missing", "conflict")}
say(right == len(want), f"{right} of {len(want)} verdicts equal the verdict worked out from the notice "
f"({tally['present']} present, {tally['partial']} partial, {tally['missing']} missing, {tally['conflict']} conflict)")
partial = [i for i, (st, _) in want.items() if st == "partial"]
letters = lambda s: " ".join(sorted(re.findall(r"[a-z]", (s or "").lower())))
gaps = sum(1 for i in partial if letters(row[i].get("not_met")) == want[i][1])
say(gaps == len(partial), f"{gaps} of {len(partial)} partial items name exactly the lettered parts that are not met")
need = [i for i, (st, _) in want.items() if st != "missing"]
def quoted(i):
q = norm(row[i].get("quote")).strip('"').strip()
sec = "".join(re.findall(r"\d+", row[i].get("section") or ""))
return len(q) >= 15 and sec in sections and q in sections[sec]
found = sum(1 for i in need if quoted(i))
blank = sum(1 for i, (st, _) in want.items() if st == "missing" and not norm(row[i].get("quote")))
say(found == len(need) and blank == len(want) - len(need),
f"{found} of {len(need)} quotes are found word for word in the section named and {blank} of {len(want) - len(need)} missing items claim no quote")
clash = [i for i, (st, _) in want.items() if st == "conflict"]
both = sum(1 for i in clash if all(v in (row[i].get("quote") or "") + " " + (row[i].get("note") or "") for v in clashes[i]))
say(both == len(clash), f"{both} of {len(clash)} conflicts give both answers the notice gives")
gapfile = (root / "output/gaps.md").read_text() if (root / "output/gaps.md").exists() else ""
open_items = [i for i, (st, _) in want.items() if st != "present"]
named = sum(1 for i in open_items if i in gapfile)
holes = sorted(set(re.findall(r"\[[A-Z][A-Z .]*\]", notice)))
seen = sum(1 for h in holes if h in gapfile)
# Every figure of two or more digits in gaps.md must be in the notice or the checklist or be a count of the verdicts.
NUM = r"(?<![\w.-])\d(?:[\d,]*\d)?(?:\.\d+)?(?![\w-])"
known = {x.replace(",", "") for x in re.findall(r"\d[\d,]*(?:\.\d+)?", notice + " " + checklist)} | {str(len(want))}
known |= {str(sum(1 for st, _ in want.values() if st == v)) for v in ("present", "partial", "missing", "conflict")}
used = [x for x in re.findall(NUM, re.sub(r"\d{4}-\d{2}-\d{2}", " ", gapfile)) if len(x) >= 2]
real = sum(1 for x in used if x.replace(",", "") in known)
say(named == len(open_items) and seen == len(holes) and real == len(used),
f"gaps.md names {named} of {len(open_items)} items that are not fully met and {seen} of {len(holes)} placeholders left in the notice, "
f"with {real} of {len(used)} figures in it found in the notice or the checklist")
first = next((ln.strip() for ln in gapfile.splitlines() if ln.strip()), "")
say(first == "First pass for a person to decide. Not legal advice.", "gaps.md opens by saying it is a first pass for a person to decide and not legal advice")
sys.exit(0 if ok else 1)
checklist.md: sample data written by Atris. Fingerprint 97be4faa4de3.
privacy_notice.md: sample data written by Atris. Fingerprint ef83c4094dfe.
checklist_result.csv: written by the agent. Fingerprint a143c2694a1b.
gaps.md: written by the agent. Fingerprint 8c615d5d35cc.