Draft follow-up emails from call notes.
Done by an agent. Checked twice.
Each call gets a follow-up email ready to send that carries every promise with a real date and nothing extra.
Real files in
- C-301.md
A seller's rough notes from a second call with a dental group, with one offer the buyer turned down. 20 lines, 1 KB. - C-302.md
Notes from a renewal call where a promise was changed part way through and the buyer's name is spelled two ways. 19 lines, 995 bytes. - C-303.md
Notes from a short first call with a bakery owner who made no commitments. 16 lines, 743 bytes. - C-304.md
Notes from a call with two buyers at a care home group, one without an email address. One offer was dropped. 18 lines, 947 bytes. - C-305.md
Notes from a short call with a new contact at a hotel group, with one promise that has no date. 14 lines, 708 bytes. - C-306.md
Notes from a contract call with a print works, with deadlines given as weekdays and days of the month. 15 lines, 665 bytes.
Sample data written by Atris. Not a real company.
Three steps
- 1.Read each call and list the promises
- 2.Turn every deadline into a real date
- 3.Write one email per call
Claude Sonnet 5.5, 1 min 3 s. No web. It never saw the check.
Checked twice
- Passed: 6 of 6 calls have an email addressed to the buyer named in the notes
- Passed: 20 of 20 promises in the notes are listed with the right owner and the due date worked out from the call date
- Passed: 0 rows in promises.csv are not a promise in the notes (withdrawn, repeated or made up)
- Passed: 20 of 20 quotes appear word for word in the notes of their call
- Passed: 20 of 20 promises are carried into the right email, the 17 dated ones with the date written in full
- Passed: 3 of 3 withdrawn promises are left out of the emails
- Passed: 28 of 28 numbers and dates in the emails are stated in the notes of that call or are a due date worked out from the call date
Second review by Claude Opus 5.5: pass.
Then we broke a copy of the output 8 ways on purpose. The check caught 8.
call_id,owner,promise,due_date,quote C-301,us,Send the written quote for 260 seats,2026-11-26,I'll send the written quote for 260 seats by Thursday. C-301,us,Send the SSO setup guide to Jude,2026-11-25,setup guide over to Jude tomorrow. C-301,them,Tomas sends the current rota spreadsheet for one clinic,2026-11-27,Tomas will send over the current rota spreadsheet for one clinic by the end of this week C-301,us,"Send the calendar invite for the next call (Tuesday 1 December, 2pm)",2026-11-24,I'll send the calendar invite today. C-302,us,Give a real update on ticket 48213 (overtime report bug),2026-11-27,a real update on the ticket by Friday. C-302,us,Check with manager whether the extra 60 seats can be held at the same rate,,I said I'd check with my manager C-302,us,Send the renewal paperwork once Anselm confirms the seat count,,I'll send the renewal paperwork once he confirms C-302,them,Anselm confirms the final seat count,2026-12-09,"Anselm will confirm the final seat count on the 9th, straight after their board meets." C-303,us,Ask manager about a small team discount and come back to Signe,2026-11-28,I will ask my manager about a small team discount and come back to C-303,us,Set up a 14 day sandbox with her three bakeries loaded,2026-11-30,I'll set up a 14 day sandbox with her three bakeries
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 made stricter after it. It 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 1 of 1 on 1 December 2026. The agent took 1 min 3 s.
What the second review verified
- Recomputed all 17 due dates from the call dates. For example, C-304 on Thursday 2026-11-26: 'within 2 weeks' gives 2026-12-10, 'by Tuesday' gives 2026-12-01 and 'end of month' gives 2026-11-30. C-302 on 2026-11-24: 'the 9th' gives 2026-12-09.
- Every quote in promises.csv appears word for word on a single line of its call notes, for example 'Anselm will confirm the final seat count on the 9th, straight after their board meets.' in C-302.
- Promises that were withdrawn or replaced are left out of both the CSV and the emails: the vet chain case study (C-301), sending the renewal paperwork on Monday (C-302, now 'once he confirms') and the onsite visit (C-304).
- Each email is addressed to the first buyer-side person with an email address (C-304 goes to o.fenn@tarnvalleycare.example because Lucinda has none in the notes). Each is under 200 words (75–108), carries every CSV promise for its call with full dates, and leaves out the prices and the 10% discount.
What this run does not show
- The check holds a list of the 20 promises in the notes, marked by hand before the run. It confirms the words are in the notes. A person still chose what counts as a promise.
- The six call notes were written by Atris so that each promise is stated plainly. Real notes are vaguer.
- The first check had a price line that tested nothing because no email held a price. It now tests every number and date in the emails. Tone is read only by the second review.
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 8 of 8. The check was made stricter after the first try at this, and the same untouched output was graded again.
Open every file
flow.md · the three steps the agent followed
# Draft follow-up emails from call notes function: sales for: the seller who has to follow up after every customer call goal: Every call has a follow-up email ready to send that carries every promise made on the call with a real date and nothing that was not said. ## 1. Read each call and list the promises Read every file in input/calls/. Each one is a seller's notes from one call: a header with the call id, the date and who was there, then rough notes. A promise is something a person on the call said they will do or send after the call. One row per thing promised. owner is `us` when the seller's side made it and `them` when the buyer's side made it. - If a promise was withdrawn, turned down or replaced later in the same notes, it is not a promise any more. Leave it out. If something replaced it, carry the replacement. - An agreed meeting is not a promise. Sending the invite for it is. - A price, a discount or a fact that was stated is not a promise. Write output/promises.csv with columns call_id,owner,promise,due_date,quote. promise is a short plain sentence. quote is the words in the notes that record the promise, copied exactly from one place in the notes. ## 2. Turn every deadline into a real date due_date is written like 2026-03-05, worked out from the date of the call: - today is the call date. tomorrow is the day after. - by or on a weekday means the first such day after the call date. - end of this week means the Friday of the call's week. - within or in a number of days or weeks is counted from the call date. - the 9th or any day of the month means the next such day on or after the call date. - end of month means the last day of the call's month. Leave due_date blank when no day was given or when the day depends on something that has not happened yet. ## 3. Write one email per call Write output/emails/<call id>.md for each call, for example output/emails/C-101.md. First line `To: ` and the email address of the first person on the buyer's side who has one in the notes. Second line `Subject: `. Then a blank line and the email, under 200 words, signed by the seller. The email restates every promise from that call in promises.csv: what we will do and what they said they would do. Name each promised thing with the same words the notes use. Where a promise has a due date, write the date in full like 5 March 2026. Do not mention a promise that was withdrawn. Do not put in a price, a discount, a total or a date that the notes do not state or that step 2 did not give. ## Done looks like - Every promise in the notes is in promises.csv once and every quote can be found in the notes. - Every call has one email, addressed to the buyer, that carries each of its promises. - No email promises anything the notes do not.
input/calls/C-301.md · 20 lines, 1 KB
Call: C-301 Date: 2026-11-24 (Tuesday) Account: Pellham Dental Group Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Tomas Varela, operations director (tomas.varela@pellhamdental.example); Jude Amari, IT Second call. 14 clinics, about 260 staff on rotas. Today it is spreadsheets plus group texts, and two clinics double booked hygienists last month which is what got Tomas moving. - Tomas wants a number he can take to the partners. Told him list is $9 per seat per month and that 10% off applies if they pay the year up front. I'll send the written quote for 260 seats by Thursday. - Jude asked about single sign on with their identity provider. We support it. I will get our SSO setup guide over to Jude tomorrow. - I offered to send the vet chain case study. Later in the call Tomas said no need, he read it on our site already. So skip that. - Tomas will send over the current rota spreadsheet for one clinic by the end of this week so we can load it into the demo. - Next call agreed for Tuesday 1 December at 2pm. I'll send the calendar invite today. Mood: good. Jude quiet but not hostile. Partners meet mid December.
input/calls/C-302.md · 19 lines, 995 bytes
Call: C-302 Date: 2026-11-24 (Tuesday) Account: Corvane Logistics Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Anselm Dratch, HR lead (anselm.dratch@corvane.example) Renewal chat with Anslem. They are on 120 seats at $8.50. Second warehouse opens in February and he thinks they need 180 seats. - He is still annoyed about the overtime report bug, ticket 48213, open three weeks. I promised him a real update on the ticket by Friday. - He asked if the extra 60 seats can come in at the same $8.50. I said I'd check with my manager whether we can hold that rate. Did not give him a date. - Told him I'd send the renewal paperwork on Monday. Then he asked me to hold off: no point until the seat count is final. Agreed. So NOT Monday. I'll send the renewal paperwork once he confirms the number. - Anselm will confirm the final seat count on the 9th, straight after their board meets. Risk: the bug. If support has nothing by Friday this renewal gets harder.
input/calls/C-303.md · 16 lines, 743 bytes
Call: C-303 Date: 2026-11-25 (Wednesday) Account: Hadley and Voss Bakeries Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Signe Marklund, owner (signe@hadleyvoss.example) First call, 20 min. 3 bakeries, 45 staff, early shifts start 3am. She does the rota herself on paper on Sunday nights and hates it. - Money is tight. I gave her list, $9 per seat per month. She asked if small teams get a discount. I said I can't promise one but I will ask my manager about a small team discount and come back to her within 3 days. - She wants to try it before paying anything. I'll set up a 14 day sandbox with her three bakeries loaded, by Monday. Signe made no commitments herself. She wants to see the sandbox first.
input/calls/C-304.md · 18 lines, 947 bytes
Call: C-304 Date: 2026-11-26 (Thursday) Account: Tarn Valley Care Homes Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Lucinda Ray, head of nursing; Obadiah Fenn, procurement (o.fenn@tarnvalleycare.example) Big one. 22 homes, about 900 seats. Talked $7.25 per seat at that volume on a 3 year term. Nothing agreed on price yet and I promised nothing on it. - Security review comes first. Obadiah has a form, 80 questions. He will send the security questionnaire form tomorrow. - I committed to return the completed questionnaire within 2 weeks. He wrote that down. - Lucinda cares about night shift handover. I'll record a 5 minute video walkthrough of the handover screen and send it by Tuesday. - Lucinda to share the list of 6 pilot homes by end of month. - I floated coming up for an onsite visit. Obadiah said not needed before contract, so dropped. Obadiah is the one who signs. Lucinda is the one who cares.
input/calls/C-305.md · 14 lines, 708 bytes
Call: C-305 Date: 2026-11-27 (Friday) Account: Brackwater Hotels Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Ines Calloway, general manager for operations (ines.calloway@brackwater.example) 15 minutes. Our old contact left in October and Ines inherited the project. She is polite and not yet convinced. No pricing discussed. - She wants to hear from other hotels. I'll introduce her by email to two hotel customers as references, today before I log off. - She asked whether we connect to Quillpay, their payroll system. I did not know. I'll confirm the Quillpay answer by Wednesday. - Ines will bring their finance director to the next call. No date set for that call yet.
input/calls/C-306.md · 15 lines, 665 bytes
Call: C-306 Date: 2026-11-30 (Monday) Account: Ostrava Print Works Seller: Rina Okoye, Larkfield (rina.okoye@larkfield.example) Buyer side: Bram Teller, plant manager (bram@ostravaprint.example) Contract stage. 75 seats, start date 1 January. He asked for 15% off. I held at 10% and he took it. - He needs net 45 payment terms or finance will not approve. Fine by us. I'll send the revised order form with net 45 by Wednesday. - Bram to return the signed order form by the 15th. - Training for 4 supervisors. I'll send him dates for the onboarding session by Friday. Session itself would be the week of 4 January. Nothing else open. Should close this month.
output/emails/C-301.md · written by the agent, 19 lines
To: tomas.varela@pellhamdental.example Subject: Follow-up from our call: quote, SSO guide and rota spreadsheet Hi Tomas, Thanks for the time today. Here is what we each said we would do. From us: - The written quote for 260 seats will reach you by 26 November 2026. - Jude will get our SSO setup guide on 25 November 2026. - I am sending the calendar invite today (24 November 2026) for our next call, Tuesday 1 December at 2pm. From you: - You will send the current rota spreadsheet for one clinic by 27 November 2026, so we can load it into the demo. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/emails/C-302.md · written by the agent, 19 lines
To: anselm.dratch@corvane.example Subject: Follow-up from our renewal call Hi Anselm, Thanks for talking today. Here is where we each stand. From us: - A real update on ticket 48213 (the overtime report bug) by 27 November 2026. - I will check with my manager whether we can hold that rate for the extra 60 seats. I do not have a date for that yet. - I will send the renewal paperwork once you confirm the seat count. I will not send it before then. From you: - You will confirm the final seat count on 9 December 2026, straight after your board meets. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/emails/C-303.md · written by the agent, 14 lines
To: signe@hadleyvoss.example Subject: Follow-up: your sandbox and the small team discount question Hi Signe, Thanks for your time today. Here is what I said I would do. - I will ask my manager about a small team discount and come back to you within 3 days, by 28 November 2026. I can't promise one. - I will set up a 14 day sandbox with your three bakeries loaded by 30 November 2026, so you can try it before paying anything. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/emails/C-304.md · written by the agent, 19 lines
To: o.fenn@tarnvalleycare.example Subject: Follow-up: security questionnaire, handover video and pilot homes Hi Obadiah, Thanks to you and Lucinda for the call. Here is what we each said we would do. From you and Lucinda: - Obadiah will send the security questionnaire form on 27 November 2026. - Lucinda will share the list of 6 pilot homes by 30 November 2026. From us: - I will return the completed questionnaire within 2 weeks, by 10 December 2026. - I will record a 5 minute video walkthrough of the handover screen and send it by 1 December 2026. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/emails/C-305.md · written by the agent, 18 lines
To: ines.calloway@brackwater.example Subject: Follow-up: hotel references and Quillpay Hi Ines, Thanks for the call. Here is what we each said we would do. From us: - I will introduce you by email to two hotel customers as references on 27 November 2026. - I will confirm the Quillpay answer, whether we connect to your payroll system, by 2 December 2026. From you: - You will bring your finance director to the next call. We have not set a date for that call yet. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/emails/C-306.md · written by the agent, 18 lines
To: bram@ostravaprint.example Subject: Follow-up: revised order form and onboarding dates Hi Bram, Thanks for the call. Here is what we each said we would do. From us: - I will send the revised order form with net 45 by 2 December 2026. - I will send you dates for the onboarding session by 4 December 2026. From you: - You will return the signed order form by 15 December 2026. Best, Rina Okoye Larkfield rina.okoye@larkfield.example
output/promises.csv · written by the agent, 21 lines
call_id,owner,promise,due_date,quote C-301,us,Send the written quote for 260 seats,2026-11-26,I'll send the written quote for 260 seats by Thursday. C-301,us,Send the SSO setup guide to Jude,2026-11-25,setup guide over to Jude tomorrow. C-301,them,Tomas sends the current rota spreadsheet for one clinic,2026-11-27,Tomas will send over the current rota spreadsheet for one clinic by the end of this week C-301,us,"Send the calendar invite for the next call (Tuesday 1 December, 2pm)",2026-11-24,I'll send the calendar invite today. C-302,us,Give a real update on ticket 48213 (overtime report bug),2026-11-27,a real update on the ticket by Friday. C-302,us,Check with manager whether the extra 60 seats can be held at the same rate,,I said I'd check with my manager C-302,us,Send the renewal paperwork once Anselm confirms the seat count,,I'll send the renewal paperwork once he confirms C-302,them,Anselm confirms the final seat count,2026-12-09,"Anselm will confirm the final seat count on the 9th, straight after their board meets." C-303,us,Ask manager about a small team discount and come back to Signe,2026-11-28,I will ask my manager about a small team discount and come back to C-303,us,Set up a 14 day sandbox with her three bakeries loaded,2026-11-30,I'll set up a 14 day sandbox with her three bakeries C-304,them,Obadiah sends the security questionnaire form,2026-11-27,questionnaire form tomorrow. C-304,us,Return the completed security questionnaire,2026-12-10,I committed to return the completed questionnaire within 2 weeks. C-304,us,Record and send a 5 minute video walkthrough of the handover screen,2026-12-01,I'll record a 5 minute video walkthrough of the handover C-304,them,Lucinda shares the list of 6 pilot homes,2026-11-30,Lucinda to share the list of 6 pilot homes by end of month. C-305,us,Introduce Ines by email to two hotel customers as references,2026-11-27,I'll introduce her by email to two hotel customers as C-305,us,Confirm whether we connect to Quillpay,2026-12-02,Quillpay answer by Wednesday. C-305,them,Ines brings their finance director to the next call,,Ines will bring their finance director to the next call. C-306,us,Send the revised order form with net 45,2026-12-02,form with net 45 by Wednesday. C-306,them,Bram returns the signed order form,2026-12-15,Bram to return the signed order form by the 15th. C-306,us,Send Bram dates for the onboarding session,2026-12-04,I'll send him dates for the onboarding session by Friday.
check.py · the check, written before the run
"""Checks the promise list and the emails against the call notes.
The list below names each promise in the notes by a word or two that the notes use for it, who made it
and how its deadline was said. The check first confirms those words are in the notes, then works out
each due date from the call date, then looks for every promise in promises.csv and in the email.
"""
import csv, re, sys
from datetime import date, timedelta
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)
# call, owner, words that name it (first match wins, in this order), deadline as said, words the email should use
PROMISES = [
("C-301", "us", ["quote"], "thursday", ["quote"]),
("C-301", "us", ["sso", "single sign"], "tomorrow", ["sso", "single sign"]),
("C-301", "them", ["spreadsheet"], "end of this week", ["spreadsheet"]),
("C-301", "us", ["invite"], "today", ["invite"]),
("C-302", "us", ["ticket", "bug"], "friday", ["ticket", "bug", "48213"]),
("C-302", "us", ["paperwork"], "", ["paperwork"]),
("C-302", "us", ["8.50", "rate"], "", ["8.50", "rate"]),
("C-302", "them", ["seat count"], "the 9", ["seat count", "number of seats", "seat number"]),
("C-303", "us", ["discount"], "3 days", ["discount"]),
("C-303", "us", ["sandbox"], "monday", ["sandbox"]),
("C-304", "us", ["completed", "return"], "2 weeks", ["questionnaire"]),
("C-304", "them", ["questionnaire"], "tomorrow", ["questionnaire"]),
("C-304", "us", ["video", "walkthrough"], "tuesday", ["video", "walkthrough"]),
("C-304", "them", ["pilot"], "end of month", ["pilot"]),
("C-305", "us", ["reference", "introduce"], "today", ["reference", "introduc"]),
("C-305", "us", ["quillpay"], "wednesday", ["quillpay"]),
("C-305", "them", ["finance director"], "", ["finance director"]),
("C-306", "us", ["net 45", "revised"], "wednesday", ["net 45"]),
("C-306", "them", ["signed"], "the 15", ["sign"]),
("C-306", "us", ["onboarding", "training"], "friday", ["onboarding", "training"]),
]
WITHDRAWN = {"C-301": ["case study"], "C-302": ["30 November"], "C-304": ["onsite", "on-site", "site visit"]}
DAYS = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
MONTHS = "January February March April May June July August September October November December".split()
def due(call_date, said):
if not said: return None
if said == "today": return call_date
if said == "tomorrow": return call_date + timedelta(days=1)
if said in DAYS: return call_date + timedelta(days=(DAYS.index(said) - call_date.weekday() - 1) % 7 + 1)
if said == "end of this week": return call_date + timedelta(days=4 - call_date.weekday())
if said == "end of month": return (call_date.replace(day=28) + timedelta(days=4)).replace(day=1) - timedelta(days=1)
m = re.match(r"(\d+) (days|weeks)", said)
if m: return call_date + timedelta(days=int(m.group(1)) * (7 if m.group(2) == "weeks" else 1))
m = re.match(r"the (\d+)", said); d = call_date
while d.day != int(m.group(1)): d += timedelta(days=1)
return d
def flat(text): return re.sub(r"\s+", " ", text).strip().lower()
notes, when, buyer = {}, {}, {}
for p in sorted((root/"input/calls").glob("*.md")):
t = p.read_text(); cid = re.search(r"^Call:\s*(\S+)", t, re.M).group(1)
notes[cid] = t; when[cid] = date.fromisoformat(re.search(r"^Date:\s*(\d{4}-\d\d-\d\d)", t, re.M).group(1))
buyer[cid] = re.search(r"[\w.+-]+@[\w.-]+\w", re.search(r"^Buyer side:(.*)$", t, re.M).group(1)).group(0).lower()
for cid, _, words, said, _ in PROMISES: # the list above must itself be true to the notes
assert any(w in flat(notes[cid]) for w in words), (cid, words)
assert not said or said.replace("the ", "") in flat(notes[cid]), (cid, said)
path = root/"output/promises.csv"
if not path.exists():
say(False, "output/promises.csv was not written"); sys.exit(1)
rows = list(csv.DictReader(path.open()))
emails = {cid: ((root/"output/emails"/f"{cid}.md").read_text() if (root/"output/emails"/f"{cid}.md").exists() else "") for cid in notes}
to = sum(1 for cid, e in emails.items() if re.search(r"^To:.*" + re.escape(buyer[cid]), e, re.M | re.I))
say(to == len(notes), f"{to} of {len(notes)} calls have an email addressed to the buyer named in the notes")
found, spare = {}, 0
for r in rows:
cid = (r.get("call_id") or "").strip(); text = flat((r.get("promise") or "") + " " + (r.get("quote") or ""))
hit = next((i for i, (c, _, words, _, _) in enumerate(PROMISES) if c == cid and i not in found and any(w in text for w in words)), None)
if hit is None: spare += 1
else: found[hit] = r
def row_ok(i):
cid, owner, _, said, _ = PROMISES[i]; r = found.get(i); d = due(when[cid], said)
return bool(r) and (r.get("owner") or "").strip().lower() == owner and (r.get("due_date") or "").strip() == (d.isoformat() if d else "")
good = sum(1 for i in range(len(PROMISES)) if row_ok(i))
say(good == len(PROMISES), f"{good} of {len(PROMISES)} promises in the notes are listed with the right owner and the due date worked out from the call date")
say(spare == 0 and len(rows) == len(PROMISES), f"{spare} rows in promises.csv are not a promise in the notes (withdrawn, repeated or made up)")
real = sum(1 for r in rows if len(flat(r.get("quote") or "")) >= 8 and flat(r.get("quote") or "") in flat(notes.get((r.get("call_id") or "").strip(), "")))
say(real == len(rows) and rows != [], f"{real} of {len(rows)} quotes appear word for word in the notes of their call")
def in_email(i):
cid, _, _, said, words = PROMISES[i]; e = flat(emails[cid]); d = due(when[cid], said)
return any(w in e for w in words) and (d is None or flat(f"{d.day} {MONTHS[d.month - 1]} {d.year}") in e)
carried = sum(1 for i in range(len(PROMISES)) if in_email(i))
dated = sum(1 for _, _, _, said, _ in PROMISES if said)
say(carried == len(PROMISES), f"{carried} of {len(PROMISES)} promises are carried into the right email, the {dated} dated ones with the date written in full")
gone = sum(1 for cid, words in WITHDRAWN.items() if emails[cid] and not any(w.lower() in flat(emails[cid]) for w in words))
say(gone == len(WITHDRAWN), f"{gone} of {len(WITHDRAWN)} withdrawn promises are left out of the emails")
amounts = [(cid, a) for cid, e in emails.items() for a in re.findall(r"\$\s?\d[\d,]*(?:\.\d+)?|\d+(?:\.\d+)?\s?%", e)]
said_ok = sum(1 for cid, a in amounts if re.search(re.escape(a.replace(" ", "").replace(",", "")) + r"(?!\d|\.\d)", notes[cid].replace(" ", "").replace(",", "")))
def figures(text): return [float(x.rstrip(",").replace(",", "")) for x in re.findall(r"(?<![\w.])\d[\d,]*(?:\.\d+)?", re.sub(r"\S+@\S+", " ", text))]
DAY = r"(\d{1,2}) (" + "|".join(MONTHS) + r")(?: (\d{4}))?"
claims = good = 0
for cid, e in emails.items():
dues = [d for d in (due(when[cid], said) for c, _, _, said, _ in PROMISES if c == cid) if d] + [when[cid]]
spoken = {(int(a), b) for a, b, _ in re.findall(DAY, notes[cid])}
for a, b, y in re.findall(DAY, e):
claims += 1
good += any(d.day == int(a) and MONTHS[d.month - 1] == b and (not y or d.year == int(y)) for d in dues) or (not y and (int(a), b) in spoken)
stated = set(figures(notes[cid]))
for x in figures(re.sub(DAY, " ", e)): claims += 1; good += x in stated
say(claims > 0 and good == claims and said_ok == len(amounts) and all(emails.values()), f"{good} of {claims} numbers and dates in the emails are stated in the notes of that call or are a due date worked out from the call date")
sys.exit(0 if ok else 1)
C-301.md: sample data written by Atris. Fingerprint 1c16067fb021.
C-302.md: sample data written by Atris. Fingerprint 7b0ae4fce286.
C-303.md: sample data written by Atris. Fingerprint 88c4de464dd0.
C-304.md: sample data written by Atris. Fingerprint 162dc35f2385.
C-305.md: sample data written by Atris. Fingerprint 84769cec7aea.
C-306.md: sample data written by Atris. Fingerprint 927a25259c6c.
C-301.md: written by the agent. Fingerprint 7f8cfc338274.
C-302.md: written by the agent. Fingerprint 8b145ad77373.
C-303.md: written by the agent. Fingerprint 3878fa9f91b5.
C-304.md: written by the agent. Fingerprint cbc78515cec2.
C-305.md: written by the agent. Fingerprint aee4df877f05.
C-306.md: written by the agent. Fingerprint c41e1a0de36a.
promises.csv: written by the agent. Fingerprint 8ae06c54c8fe.