Atris

Assemble the monthly customer newsletter.
Done by an agent. Checked twice.

A newsletter ready to send inside every length and link rule, with a stated reason for each update left out.

Have Atris do this for you›

1

Real files in

  • newsletter_rules.md
    The house rules for the newsletter: which updates qualify, the layout, the link rule and the length limits. 26 lines, 2 KB.
  • updates.csv
    Twenty six updates sent in by five teams for one month, with internal notes, wrong dates, missing and unsafe links, and two updates sent in twice, one pair disagreeing on a figure. 27 lines, 5 KB.

Sample data written by Atris. Not a real company.

2

Three steps

  1. 1.Sort the updates
  2. 2.Write the newsletter
  3. 3.Account for every update

Claude Sonnet 5.5, 46 seconds. No web. It never saw the check.

3

Checked twice

  • ✓Passed: 8 of 8 rows of included.csv hold the update the rules choose with its place number and its section, in the order the rules set
  • ✓Passed: 18 of 18 left out updates carry the reason the rules give
  • ✓Passed: 26 of 26 updates are accounted for exactly once
  • ✓Passed: 8 of 8 newsletter items sit under the right section with exactly one link, the one from their own update
  • ✓Passed: The newsletter is 223 words (limit 420), the subject 28 characters (limit 50), the intro 23 words (limit 40), the longest item 28 words (limit 45) and it ends with the required closing line
  • ✓Passed: 12 of 12 figures in the items come from the update behind the item and the figures two copies disagree on (38, 83) are not used
  • ✓Passed: 1 of 1 notes for a left out copy give both figures the copies disagree on

Second review by Claude Opus 5.5: pass.

Then we broke a copy of the output 8 ways on purpose. The check caught 8.

What it wrote. Lines 1 to 12 of left_out.csv, copied from the file.
update_id,reason,note
U02,duplicate,"Same link as U03, which is newer; the two copies disagree on the template count (U02 says 38, U03 says 83) so the newsletter uses neither figure."
U04,bad_link,"The link starts with http:// instead of https://."
U05,over_limit,"Low priority, and the 8 places went to high and normal priority updates."
U06,wrong_month,"Dated 2026-10-28, which is outside November 2026."
U07,internal,"Audience is internal, not customers."
U10,over_limit,"Normal priority but older than the four normal items chosen, so it missed the 8-item limit."
U11,no_link,"The link is blank."
U12,bad_link,"The link host is bit.example, not a wickerby.example address."
U14,duplicate,"Same link as U15, which is newer; both give the same figure of 60 places per city."
U16,wrong_month,"Dated 2026-12-01, which is outside November 2026."
U17,bad_link,"The host is wickerby.example.promo-site.example, which does not end in .wickerby.example."

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 46 seconds.

What the second review verified

  • I re-applied the selection rules myself. Thirteen updates got through the filters. The 8 chosen are the 4 high-priority ones (U13, U09, U03, U01) and the 4 newest normal ones (U23 on 27 Nov, U22 on 26 Nov, U15 on 25 Nov, U08 on 16 Nov). That leaves U10, U18, U05, U19 and U26 out as over_limit, which matches left_out.csv.
  • Duplicates are handled correctly. U03 (18 Nov) is kept over U02, and the newsletter says only 'New inspection templates are live', using neither 38 nor 83; the U02 note gives both. U15 is kept over U14, and the matching figure '60 per city' stays.
  • I counted lengths with a script. The subject is 28 characters (limit 50), the intro is 23 words (limit 40), the longest item is 28 words (U01, limit 45) and the whole newsletter is 222–223 words (limit 420). The closing line matches the rules exactly.
  • All 26 updates are listed exactly once: 8 included and 18 left out. Every left-out reason is the first rule the update fails, for example U24 is internal (not no_link), U17's promo-site host is bad_link and U21 has no date so it is wrong_month. Each item has one link and it is its own update's link.

What this run does not show

  • The 26 updates were written for this run with planted bad links, copies and wrong dates. A real month has updates that are harder to place.
  • The check tests which updates were chosen and their order, links, lengths and figures. How well the items are written is read only by the second review.
  • Nothing was sent. The run does not show how the newsletter looks in a mail program.

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
# Assemble the monthly customer newsletter

function: marketing
for: the marketer who sends the customer newsletter each month
goal: The month's newsletter is ready to send with the right updates in the right order, inside every length and link rule and every update not used has a stated reason.

## 1. Sort the updates
Read input/newsletter_rules.md and input/updates.csv. Put every update through the tests in the order the rules give them and keep the first reason that rules it out. Then apply the limit on the number of items.

## 2. Write the newsletter
Write output/newsletter.md in the layout the rules give: the subject line, the intro, the sections in order with one `### ` item for each chosen update, then the closing line. Write each item from its own row only. Use no figure that is not in that row and do not work out new figures. Keep inside every length limit. Count with a script, not by eye.

## 3. Account for every update
Write output/included.csv with columns position,update_id,section, in the order the items appear in the newsletter.
Write output/left_out.csv with columns update_id,reason,note. reason is one of the reason words in the rules. note is one plain sentence a colleague could read.
Every update in updates.csv appears in exactly one of the two files.

## Done looks like
- The newsletter holds only updates the rules allow, in the order the rules set.
- Every item has one link and it is the link from its own update.
- Included and left out updates together equal the whole list.
input/newsletter_rules.md · 26 lines, 2 KB
# Wickerby customer newsletter: house rules

Issue month: November 2026

## Which updates can go in
Test each update in this order. The first test it fails is its reason for being left out.

1. `internal`: the audience is not customers.
2. `wrong_month`: the date is not in the issue month. An update with no date cannot be placed, so it is also wrong_month.
3. `no_link`: the link is blank.
4. `bad_link`: the link does not start with https:// or its host is not wickerby.example or a name ending in .wickerby.example.
5. `duplicate`: among the updates still standing, two with the same link are the same news sent in twice. Keep the one with the later date. If the dates are equal keep the lower update_id. If the two copies give different figures for the same thing, use neither figure in the newsletter and give both figures in the note for the copy you leave out.
6. `over_limit`: the newsletter holds at most 8 items. Choose high priority before normal before low. Inside one priority choose the newest first, then the lower update_id.

## Layout
- Line 1: `Subject: ` and a subject of at most 50 characters.
- An intro of at most 40 words.
- Sections in this order: Product, Customers, Events, Company. Each section is a `## ` heading. Leave out a section with no items. Ignore capitals and stray spaces in the section column.
- Inside a section, items go in the order they were chosen: high priority first, then newest.
- Each item is a `### ` heading and one paragraph of at most 45 words.
- Each item holds exactly one link, the link from its update, written as a markdown link at the end of the paragraph. No other links anywhere.
- The last line is exactly: `You get this email because you are a Wickerby customer. Unsubscribe: {{unsubscribe_link}}`

## Length
The whole newsletter is at most 420 words, not counting the subject line.
Count words by the spaces between them, after taking out link addresses and markdown marks. Link text and headings count.
input/updates.csv · 27 lines, 5 KB
update_id,date,team,section,priority,audience,title,detail,link
U01,2026-11-03,Product,Product,high,customers,Rent reminders by text,Tenants can now get a text three days before rent is due. Early users saw late payments fall from 14 percent to 9 percent.,https://wickerby.example/updates/rent-text-reminders
U02,2026-11-05,Product,product,normal,customers,New inspection templates,"We added 38 new inspection templates, including a mid-tenancy check and a move-out list.",https://wickerby.example/updates/inspection-templates
U03,2026-11-18,Support,Product,high,customers,Inspection templates have landed,"83 new inspection templates are live, including a mid-tenancy check and a move-out list.",https://wickerby.example/updates/inspection-templates
U04,2026-11-09,Product,Product,normal,customers,Bank feeds for two more banks,"Bank feeds now cover 11 banks, up from 9.",http://wickerby.example/updates/bank-feeds
U05,2026-11-10,Product,Product,low,customers,Dark mode on mobile,The mobile app now has a dark mode. Turn it on under Settings.,https://wickerby.example/updates/dark-mode
U06,2026-10-28,Product,Product,high,customers,Faster statements,Owner statements now build in under 10 seconds.,https://wickerby.example/updates/fast-statements
U07,2026-11-12,Product,Product,high,internal,Pricing change for 2027,Plan prices rise 6 percent on 1 February 2027. Do not share before the customer letter goes out.,https://wickerby.example/internal/pricing-2027
U08,2026-11-16,Product,Product,normal,customers,Deposit scheme sync,Deposits now sync with all three approved deposit schemes each night.,https://wickerby.example/updates/deposit-sync
U09,2026-11-20,Customers,Customers,high,customers,How one agent cut empty days,A lettings agent with 420 homes cut the empty days between tenancies from 21 to 12 by using automatic viewing slots.,https://wickerby.example/stories/empty-days
U10,2026-11-06,Customers,Customers,normal,customers,Customer advisory group,Twelve customers joined our advisory group. The first session set the top three requests for 2027.,https://wickerby.example/stories/advisory-group
U11,2026-11-14,Customers,customers ,normal,customers,Top tip: bulk rent reviews,Raise rent reviews for a whole building in one go from the Buildings tab.,
U12,2026-11-22,Marketing,Customers,low,customers,Rate us,Leave us a rating on your favourite software site.,https://bit.example/wkby-rating
U13,2026-11-24,Events,Events,high,customers,Winter webinar on the 2027 rules,"A 45 minute webinar on the 2027 rental rules, on 9 December 2026 at 1pm. Free for customers.",https://events.wickerby.example/winter-webinar
U14,2026-11-11,Events,EVENTS,normal,customers,Roadshow dates,"We are visiting Leeds, Bristol and Glasgow in January. Places are limited to 60 per city.",https://events.wickerby.example/roadshow
U15,2026-11-25,Events,Events,normal,customers,Roadshow dates announced,"Join us in Leeds, Bristol and Glasgow in January. Places are limited to 60 per city.",https://events.wickerby.example/roadshow
U16,2026-12-01,Events,Events,high,customers,Spring summit,Save the date for the spring summit.,https://events.wickerby.example/summit
U17,2026-11-19,Events,Events,low,customers,Office hours,Drop in sessions with the support team every Thursday at 10am.,https://wickerby.example.promo-site.example/office-hours
U18,2026-11-02,People,Company,normal,customers,New support hours,"Phone support is now open from 8am to 7pm on weekdays, two hours longer than before.",https://wickerby.example/company/support-hours
U19,2026-11-13,People,Company,low,customers,We are hiring,Six open roles in support and engineering.,https://wickerby.example/company/careers
U20,2026-11-17,People,Company,normal,internal,Office move,The Leeds team moves to the new office on 14 December.,https://wickerby.example/internal/office-move
U21,,Product,Product,normal,customers,Keyboard shortcuts,Press ? on any screen to see the shortcuts.,https://wickerby.example/updates/shortcuts
U22,2026-11-26,Finance,Company,normal,customers,Security audit passed,Our yearly security audit finished with no high risk findings.,https://wickerby.example/company/security-audit
U23,2026-11-27,Product,Product,normal,customers,Photos on repair requests,Tenants can attach up to 5 photos to a repair request.,https://wickerby.example/updates/repair-photos
U24,2026-11-04,Marketing,Company,low,internal,Brand refresh timeline,New logo files arrive in January.,
U25,2026-11-23,Customers,Customers,normal,customers,Charity week,"Customers and staff raised £8,400 for housing charities during charity week.",
U26,2026-11-30,Product,Product,low,customers,Arrears report export,The arrears report can now be exported to a spreadsheet.,https://wickerby.example/updates/arrears-export
output/included.csv · written by the agent, 9 lines
position,update_id,section
1,U03,Product
2,U01,Product
3,U23,Product
4,U08,Product
5,U09,Customers
6,U13,Events
7,U15,Events
8,U22,Company
output/left_out.csv · written by the agent, 19 lines
update_id,reason,note
U02,duplicate,"Same link as U03, which is newer; the two copies disagree on the template count (U02 says 38, U03 says 83) so the newsletter uses neither figure."
U04,bad_link,"The link starts with http:// instead of https://."
U05,over_limit,"Low priority, and the 8 places went to high and normal priority updates."
U06,wrong_month,"Dated 2026-10-28, which is outside November 2026."
U07,internal,"Audience is internal, not customers."
U10,over_limit,"Normal priority but older than the four normal items chosen, so it missed the 8-item limit."
U11,no_link,"The link is blank."
U12,bad_link,"The link host is bit.example, not a wickerby.example address."
U14,duplicate,"Same link as U15, which is newer; both give the same figure of 60 places per city."
U16,wrong_month,"Dated 2026-12-01, which is outside November 2026."
U17,bad_link,"The host is wickerby.example.promo-site.example, which does not end in .wickerby.example."
U18,over_limit,"Normal priority but older than the four normal items chosen, so it missed the 8-item limit."
U19,over_limit,"Low priority, and the 8 places went to high and normal priority updates."
U20,internal,"Audience is internal, not customers."
U21,wrong_month,"No date is given, so it cannot be placed in November 2026."
U24,internal,"Audience is internal, not customers."
U25,no_link,"The link is blank."
U26,over_limit,"Low priority, and the 8 places went to high and normal priority updates."
output/newsletter.md · written by the agent, 45 lines
Subject: Wickerby news: November 2026

Here is what is new at Wickerby this month: product updates, a customer story, upcoming events and a note on our security audit.

## Product

### Inspection templates have landed

New inspection templates are live, including a mid-tenancy check and a move-out list. [See the templates](https://wickerby.example/updates/inspection-templates)

### Rent reminders by text

Tenants can now get a text three days before rent is due. Early users saw late payments fall from 14 percent to 9 percent. [Read about text reminders](https://wickerby.example/updates/rent-text-reminders)

### Photos on repair requests

Tenants can attach up to 5 photos to a repair request. [See how it works](https://wickerby.example/updates/repair-photos)

### Deposit scheme sync

Deposits now sync with all three approved deposit schemes each night. [Read about deposit sync](https://wickerby.example/updates/deposit-sync)

## Customers

### How one agent cut empty days

A lettings agent with 420 homes cut the empty days between tenancies from 21 to 12 by using automatic viewing slots. [Read the story](https://wickerby.example/stories/empty-days)

## Events

### Winter webinar on the 2027 rules

A 45 minute webinar on the 2027 rental rules, on 9 December 2026 at 1pm. Free for customers. [Join the webinar](https://events.wickerby.example/winter-webinar)

### Roadshow dates announced

Join us in Leeds, Bristol and Glasgow in January. Places are limited to 60 per city. [See the roadshow](https://events.wickerby.example/roadshow)

## Company

### Security audit passed

Our yearly security audit finished with no high risk findings. [Read more](https://wickerby.example/company/security-audit)

You get this email because you are a Wickerby customer. Unsubscribe: {{unsubscribe_link}}
check.py · the check, written before the run
"""Chooses the updates again from the rules, then checks the newsletter's order, links, lengths and figures against the update rows."""
import csv, re, sys
from pathlib import Path
from urllib.parse import urlparse
root = Path(sys.argv[1]); ok = True
def say(passed, text):
    global ok; ok = ok and passed; print(("PASS " if passed else "FAIL ") + text)
rules = (root/"input/newsletter_rules.md").read_text(encoding="utf-8")
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
m = re.search(r"Issue month:\s*(\w+) (\d{4})", rules); issue = "%s-%02d" % (m.group(2), months.index(m.group(1)) + 1)
home = re.search(r"host is not (\S+) or", rules).group(1)
cap = int(re.search(r"at most (\d+) items", rules).group(1))
lim_subject = int(re.search(r"subject of at most (\d+) characters", rules).group(1)); lim_intro = int(re.search(r"intro of at most (\d+) words", rules).group(1))
lim_item = int(re.search(r"paragraph of at most (\d+) words", rules).group(1)); lim_all = int(re.search(r"at most (\d+) words, not counting", rules).group(1))
order = [s.strip() for s in re.search(r"in this order:\s*([^.]+)\.", rules).group(1).split(",")]
closing = re.search(r"last line is exactly: `([^`]+)`", rules).group(1)
ups = list(csv.DictReader((root/"input/updates.csv").open(encoding="utf-8")))
def figs(t): return {n.rstrip(".,").replace(",", "") for n in re.findall(r"\d[\d,.]*", t)}
reason, standing = {}, []
for u in ups:
    host = urlparse(u["link"].strip()).netloc.lower()
    if u["audience"].strip().lower() != "customers": reason[u["update_id"]] = "internal"
    elif not u["date"].strip().startswith(issue): reason[u["update_id"]] = "wrong_month"
    elif not u["link"].strip(): reason[u["update_id"]] = "no_link"
    elif not u["link"].strip().startswith("https://") or not (host == home or host.endswith("." + home)): reason[u["update_id"]] = "bad_link"
    else: standing.append(u)
kept, disputed, twin = {}, {}, {}
for u in sorted(standing, key=lambda u: (u["date"], [-ord(c) for c in u["update_id"]]), reverse=True):
    link = u["link"].strip()
    if link in kept:
        reason[u["update_id"]] = "duplicate"; k = kept[link]
        diff = figs(u["title"] + " " + u["detail"]) ^ figs(k["title"] + " " + k["detail"])
        if diff: disputed[k["update_id"]] = diff; twin[u["update_id"]] = diff
    else: kept[link] = u
rank = {"high": 0, "normal": 1, "low": 2}
pool = sorted(kept.values(), key=lambda u: (rank[u["priority"].strip().lower()], [-ord(c) for c in u["date"]], u["update_id"]))
for u in pool[cap:]: reason[u["update_id"]] = "over_limit"
def sect(u): return next(s for s in order if s.lower() == u["section"].strip().lower())
chosen = sorted(pool[:cap], key=lambda u: order.index(sect(u)))  # stable, so the chosen order holds inside a section
want = [u["update_id"] for u in chosen]; row = {u["update_id"]: u for u in ups}
npath, ipath, lpath = root/"output/newsletter.md", root/"output/included.csv", root/"output/left_out.csv"
if not npath.exists() or not ipath.exists() or not lpath.exists():
    say(False, "newsletter.md, included.csv and left_out.csv were not all written"); sys.exit(1)
inc = [r for r in csv.DictReader(ipath.open(encoding="utf-8")) if (r.get("update_id") or "").strip()]
got = [r["update_id"].strip() for r in inc]
placed = sum(1 for n, (r, w) in enumerate(zip(inc, want), 1) if r["update_id"].strip() == w and (r.get("position") or "").strip() == str(n)
             and (r.get("section") or "").strip().lower() == sect(row[w]).lower())
say(got == want and placed == len(want), f"{placed} of {len(want)} rows of included.csv hold the update the rules choose with its place number and its section, in the order the rules set")
left = {(r.get("update_id") or "").strip(): r for r in csv.DictReader(lpath.open(encoding="utf-8")) if (r.get("update_id") or "").strip()}
reasons = sum(1 for k, v in reason.items() if (left.get(k, {}).get("reason") or "").strip().lower() == v)
say(reasons == len(reason), f"{reasons} of {len(reason)} left out updates carry the reason the rules give")
once = sum(1 for u in ups if (u["update_id"] in got) + (u["update_id"] in left) == 1 and got.count(u["update_id"]) <= 1)
say(once == len(ups), f"{once} of {len(ups)} updates are accounted for exactly once")
text = npath.read_text(encoding="utf-8"); lines = text.splitlines()
def seen_words(t):
    t = re.sub(r"\[([^\]]*)\]\([^)]*\)", r"\1", t); t = re.sub(r"https?://\S+", " ", t)
    return len(re.sub(r"[#*_>`]", " ", t).split())
items, section, intro, subject = [], "", [], ""
for line in lines:
    if line.lower().startswith("subject:") and not subject: subject = line.split(":", 1)[1].strip(); continue
    if line.startswith("### "): items.append({"section": section, "head": line[4:], "body": ""}); continue
    if line.startswith("## "): section = line[3:].strip(); continue
    if line.strip() == closing: continue
    if items: items[-1]["body"] += line + "\n"
    elif not section and not line.startswith("#"): intro.append(line)
def links(t): return re.findall(r"https?://[^\s)>\]]+", t)
by_link = {u["link"].strip(): u["update_id"] for u in chosen}
for it in items: it["id"] = by_link.get(links(it["body"])[0]) if len(links(it["body"])) == 1 else None
good = sum(1 for it, w in zip(items, want) if it["id"] == w and it["section"].lower() == sect(row[w]).lower())
say(len(items) == len(want) and good == len(want) and len(links(text)) == len(want),
    f"{good} of {len(want)} newsletter items sit under the right section with exactly one link, the one from their own update")
body_text = "\n".join(l for l in lines if not l.lower().startswith("subject:"))
longest = max([seen_words(it["body"]) for it in items] or [0]); n_all = seen_words(body_text); n_intro = seen_words(" ".join(intro))
last = next((l.strip() for l in reversed(lines) if l.strip()), "")
say(0 < n_all <= lim_all and 0 < len(subject) <= lim_subject and 0 < n_intro <= lim_intro and 0 < longest <= lim_item and last == closing,
    f"The newsletter is {n_all} words (limit {lim_all}), the subject {len(subject)} characters (limit {lim_subject}), the intro {n_intro} words (limit {lim_intro}), the longest item {longest} words (limit {lim_item}) and it ends with the required closing line")
used = sourced = barred = 0
for it in items:
    if not it["id"]: continue
    u = row[it["id"]]; have = figs(u["title"] + " " + u["detail"] + " " + u["date"].replace("-", " "))
    for f in figs(re.sub(r"https?://[^\s)>\]]+", " ", it["head"] + " " + it["body"])):
        used += 1; sourced += f in have or f.lstrip("0") in {h.lstrip("0") for h in have}
        barred += f in disputed.get(it["id"], set())
all_disputed = sorted(set().union(*disputed.values())) if disputed else []
say(len(items) == len(want) and used > 0 and sourced == used and barred == 0,
    f"{sourced} of {used} figures in the items come from the update behind the item and the figures two copies disagree on ({', '.join(all_disputed)}) are not used")
noted = sum(1 for k, d in twin.items() if d <= figs(left.get(k, {}).get("note") or ""))
say(noted == len(twin), f"{noted} of {len(twin)} notes for a left out copy give both figures the copies disagree on")
sys.exit(0 if ok else 1)

newsletter_rules.md: sample data written by Atris. Fingerprint cf8a4c7ad6e4.

updates.csv: sample data written by Atris. Fingerprint 434509e25a47.

included.csv: written by the agent. Fingerprint a42ee9194aea.

left_out.csv: written by the agent. Fingerprint b995b614daf0.

newsletter.md: written by the agent. Fingerprint ac25a9513ddb.


More marketing work, and every other desk job

For agentsGitHub
What is AtrisBlogApp StorePricingPrivacyTerms