Atris

Analyze a staff survey export.
Run by an agent. It did not pass.

Leaders can see how many people answered, the average score for each team and what the written comments are about, with every comment accounted for.

Have Atris do this for you›

1

Real files in

  • survey_export.csv
    Sixty four rows from a staff survey with three score questions, a team name and a free text comment. 65 lines, 6 KB.
  • themes.md
    The list of six comment themes with the words that point to each one. 14 lines, 827 bytes.

Sample data written by Atris. Not a real company.

2

Three steps

  1. 1.Read and clean the answers
  2. 2.Count, average and group
  3. 3.Write the results

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

3

Did not pass

  • ✗Failed: 5 of 6 rows in by_team.csv have the right number of people (61 counted from 64 rows, small teams folded into other teams)
  • ✗Failed: 15 of 18 averages equal the averages rebuilt from the usable scores
  • ✓Passed: 33 of 33 comments appear once in comments.csv, word for word
  • ✓Passed: 24 of 24 comments with signal words carry exactly the themes those words point to
  • ✓Passed: 9 of 9 comments with no signal word carry one theme from the list
  • ✓Passed: summary.md has 4 of 4 opening counts right (64 received, 61 counted, 33 comments, 8 scores not usable) and 6 of 6 theme counts equal to comments.csv
  • ✓Passed: 6 of 6 quotes in summary.md are comments from the export, word for word
What it wrote. Lines 1 to 8 of by_team.csv, copied from the file.
team,responses,q1_workload_is_manageable_avg,q2_manager_supports_me_avg,q3_tools_let_me_do_my_job_avg
customersupport,16,2.71,4.06,3.57
engineering,13,3.42,2.82,4.00
operations,11,2.73,3.27,2.36
sales,14,3.43,3.14,2.31
other teams,7,3.00,3.14,3.86
all,61,3.07,3.36,3.19

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. The input files are sample data written by Atris, with the problems a real week has planted in them.

Run 3 of 3 on 1 December 2026. The agent took 52 seconds. Run 1 did not pass the check. Run 2 passed the check but not the second review. 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 this run does not show

  • All three runs failed, each for a different reason: a question name put in quote marks, a false claim about the next lowest score and a team name written without its space.
  • The last failure traces to the flow itself. It said to remove the spaces in team names when it meant only the stray ones, so the worker's reading was fair.

Open every file

flow.md · the three steps the agent followed
# Analyze a staff survey export

function: data
for: the person who reports survey results to the leadership team
goal: Leaders can see how many people answered, the average score for each team and what the written comments are about, with every comment accounted for.

## 1. Read and clean the answers
Read input/survey_export.csv and input/themes.md. Apply these rules:
- One person is one respondent_code. When a code appears more than once, keep only the row with the
  latest submitted_at and drop the earlier rows whole, comment included.
- Team names differ in capital letters and stray spaces. Remove the spaces and use lowercase.
- The columns whose names start with q hold scores. A score is usable only when it is a whole number
  from 1 to 5. Anything else (blank, text, 0, 6, 3.5) is not usable and is left out of averages.
- A comment is empty when it is blank or is only one of these in any letter case: n/a, na, none,
  no comment, a single dash.

## 2. Count, average and group
- Count the kept responses for each team. A team with fewer than 4 kept responses is not shown on its
  own. Its responses go into one row named `other teams`, together with responses that have no team.
- For each team row and for everyone together (a last row named `all`), work out the average of each
  score column over the usable scores only.
- File every comment that is not empty under themes from input/themes.md. A comment that has signal
  words gets every theme whose signal words it has and no other theme. A comment with no signal word
  gets the one theme that fits its meaning best, or `other` when none fits.

## 3. Write the results
Write output/by_team.csv with columns team,responses and one column per score column named after it
with `_avg` added. Team rows first, then `other teams`, then `all`. Averages with two decimals.
Write output/comments.csv with columns response_id,team,themes,comment, one row per comment. The comment
is copied exactly as it is in the export. themes holds the theme names in the order of the themes file,
joined with a semicolon.
Write output/summary.md for the leadership team. Start with these four lines, each with its number:
`Responses received:` (rows in the export), `Responses counted:` (after dropping earlier answers),
`Comments grouped:` and `Scores not usable:` (among counted responses). Then one line per theme in the
form `theme name: count` followed by one comment from that theme inside double quotes, copied exactly.
The count is the number of comments that carry the theme. Then two or three sentences, never more than
three, on the lowest average and the team it belongs to, using only numbers from by_team.csv. Before you
call any average lowest, next lowest or highest, compare it with every row and every score column in
by_team.csv. Use double quotes in summary.md only around a comment copied from the export. Name a
question by its column name with no quotes.

## Done looks like
- Every person is counted once and every comment that is not empty appears once in comments.csv.
- Every average can be rebuilt from the export.
- Every quote in summary.md is a real comment, word for word.
input/survey_export.csv · 65 lines, 6 KB
response_id,respondent_code,submitted_at,team,tenure,q1_workload_is_manageable,q2_manager_supports_me,q3_tools_let_me_do_my_job,comment
S-9001,R609928,2026-11-09 09:53,Customer Support,over 5 years,2,3,2,The ticketing system crashes at least twice a week.
S-9002,R573032,2026-11-09 10:13,engineering,under 1 year,3,3,3,
S-9003,R998855,2026-11-09 11:37,finance,1 to 3 years,3,4,3,Month end close needs a third person. Two of us can not do it in five days.
S-9004,R574606,2026-11-09 12:46, Sales,1 to 3 years,3,3,N/A,My manager is supportive but the workload is not sustainable.
S-9005,R899023,2026-11-09 17:58, Customer Support,over 5 years,2,5,4,
S-9006,R451052,2026-11-09 18:28,OPERATIONS,over 5 years,2,2,3,Equipment in the warehouse is old and the scanners keep failing.
S-9007,R360505,2026-11-09 23:17,Sales,over 5 years,4,4,3,
S-9008,R247250,2026-11-09 23:25,Operations,over 5 years,4,4,1,
S-9009,R468102,2026-11-09 23:55,Sales ,over 5 years,4,4,3,
S-9010,R727546,2026-11-10 00:31,Operations,1 to 3 years,3,3,3,N/A
S-9011,R509724,2026-11-10 01:58, Customer Support,1 to 3 years,4,5,2,No career conversations since I joined.
S-9012,R126333,2026-11-10 06:38,Engineering,under 1 year,4,,5,I can not remember the last time I took a full lunch break.
S-9013,R669945,2026-11-10 07:04,Operations,under 1 year,3,2,3,"I got a raise this year and I am grateful, thank you."
S-9014,R372829,2026-11-10 09:39, Customer Support,over 5 years,N/A,4,2,-
S-9015,R412207,2026-11-10 09:44, Sales,1 to 3 years,3,4,4,The software we use for quotes is ten years old. Customers notice.
S-9016,R318953,2026-11-10 12:21,OPERATIONS,under 1 year,3,4,3,Wages for night shifts are below what the depot across town offers.
S-9017,R835649,2026-11-10 15:15,Operations ,over 5 years,3,3,1,Training budget was cut and it shows. We learn everything the hard way.
S-9018,R416639,2026-11-10 18:22,ENGINEERING,1 to 3 years,3.5,3,4,
S-9019,R980758,2026-11-10 19:32,Legal,over 5 years,4,2,5,Salary bands should be published.
S-9020,R171411,2026-11-10 21:57,SALES,1 to 3 years,5,4,1,Leadership should share the plan for next year. Rumors fill the gap.
S-9021,R199517,2026-11-10 22:08, Customer Support,3 to 5 years,3,4,6,"I do not know who decides what, and decisions get reversed a lot."
S-9022,R989912,2026-11-10 22:27,SALES,1 to 3 years,2,3,2,Overtime is constant and the pay does not reflect it.
S-9023,R284925,2026-11-11 03:34,Customer Support ,1 to 3 years,3,4,5,Promotion decisions feel random and my manager could not explain the last one.
S-9024,R691313,2026-11-11 06:26,Sales ,under 1 year,4,2,4,We were promised a cost of living adjustment in January and it never came.
S-9025,R977654,2026-11-11 06:54,Operations,under 1 year,5,3,2,
S-9026,R634304,2026-11-11 08:55, Sales,under 1 year,4,3,3,My salary has not moved in two years even though my targets went up.
S-9027,R638409,2026-11-11 10:27, Sales,3 to 5 years,2,3,2,
S-9028,R634304,2026-11-11 10:30, Sales,under 1 year,5,3,3,My salary has not moved in two years even though my targets went up.
S-9029,R122556,2026-11-11 13:58,Finance,1 to 3 years,2,5,5,Better tools for reporting please. I build the same spreadsheet every Monday.
S-9030,R122556,2026-11-11 14:28,finance,1 to 3 years,2,5,5,Better tools for reporting please. I build the same spreadsheet every Monday.
S-9031,R604830,2026-11-11 14:59,Customer Support,1 to 3 years,3,4,5,
S-9032,R757219,2026-11-11 15:02,CUSTOMER SUPPORT,1 to 3 years,1,3,4,no comment
S-9033,R468640,2026-11-11 17:58,Engineering,3 to 5 years,4,2,5,My manager gives clear feedback and I always know where I stand.
S-9034,R622757,2026-11-11 18:16,Finance ,1 to 3 years,2,4,4,Hours are fine most weeks but month end is brutal.
S-9035,R665521,2026-11-11 20:32,Customer Support,under 1 year,2,5,4,Too much overtime at quarter end. We are understaffed on the phones.
S-9036,R656543,2026-11-11 20:34,Engineering,3 to 5 years,5,3,4,I would stay longer if there was a path beyond my current role.
S-9037,R931627,2026-11-11 21:18, Customer Support,1 to 3 years,3,5,3,The office is too cold.
S-9038,R898837,2026-11-12 00:29,Engineering,1 to 3 years,4,2,5,
S-9039,R719138,2026-11-12 01:36,Engineering,3 to 5 years,3,0,5,The bonus plan is impossible to understand.
S-9040,R769301,2026-11-12 07:00, Sales,over 5 years,3,3,2,Feedback only comes at review time. I would like it sooner.
S-9041,R478247,2026-11-12 08:28,Operations,under 1 year,1,5,3,None
S-9042,R640518,2026-11-12 10:35,Customer Support,3 to 5 years,3,5,3,
S-9043,R811151,2026-11-12 12:15, Operations,under 1 year,1,5,1,n/a
S-9044,R572460,2026-11-12 13:28,,over 5 years,3,2,3,
S-9045,R506735,2026-11-12 15:54,Engineering,1 to 3 years,4,3,4,
S-9046,R120261,2026-11-12 19:57,,under 1 year,4,3,3,
S-9047,R108815,2026-11-12 20:36,Customer Support,1 to 3 years,,4,4,
S-9048,R764726,2026-11-12 22:41,Customer Support,3 to 5 years,2,2,5,
S-9049,R316820,2026-11-13 01:44,Customer Support,1 to 3 years,3,5,3,Great team. I like coming to work.
S-9050,R367636,2026-11-13 02:06,Engineering ,1 to 3 years,2,2,4,
S-9051,R445542,2026-11-13 02:44,Engineering ,1 to 3 years,3,2,3,
S-9052,R178614,2026-11-13 04:16,Sales ,over 5 years,3,3,3,Deadlines are set without asking the people who do the work.
S-9053,R364931,2026-11-13 04:41,Engineering,over 5 years,3,2,3,Mentoring from senior engineers has been the best part of this job.
S-9054,R392216,2026-11-13 05:58,customer support,over 5 years,3,3,,Free parking would be nice.
S-9055,R941603,2026-11-13 06:02,Sales,1 to 3 years,3,3,1,Two people left and were not replaced. The rest of us cover their accounts.
S-9056,R802834,2026-11-13 07:18,Engineering,1 to 3 years,2,5,3,I would like a clear path to promotion. Nobody can tell me what the next level needs.
S-9057,R982941,2026-11-13 07:50,engineering,3 to 5 years,4,4,4,New laptop took five weeks to arrive. I shared a desk machine until then.
S-9058,R814908,2026-11-13 08:55,sales,under 1 year,4,3,1,
S-9059,R464444,2026-11-13 15:30,Operations,over 5 years,3,3,4,
S-9060,R890459,2026-11-13 16:06,Legal,3 to 5 years,3,2,4,
S-9061,R846410,2026-11-13 20:24,Sales,1 to 3 years,3,2,1,
S-9062,R924322,2026-11-14 00:41,CUSTOMER SUPPORT,1 to 3 years,4,4,4,Leadership changes priorities every month so half our work gets thrown away.
S-9063,R656348,2026-11-14 01:41,operations,3 to 5 years,3,4,3,Our laptop refresh is overdue and the training on the new system was one video.
S-9064,R656348,2026-11-16 01:41,operations,3 to 5 years,2,2,2,
input/themes.md · 14 lines, 827 bytes
# Comment themes

Every comment is filed under these themes. The order below is the order to list them in.

| theme | what it covers | signal words |
|---|---|---|
| pay | what people are paid and how it is decided | pay, salary, raise, bonus, wages |
| workload | how much work there is and how many people do it | workload, overtime, hours, understaffed, deadlines |
| management | how managers and leaders direct, decide and communicate | manager, leadership, feedback, priorities |
| tools | the equipment and software people work with | laptop, software, tools, system, equipment |
| growth | learning, progression and career | promotion, training, career, mentoring |
| other | anything that fits none of the themes above | (none) |

A signal word counts only as a whole word, in any letter case. "Payment" is not "pay".
output/by_team.csv · written by the agent, 7 lines
team,responses,q1_workload_is_manageable_avg,q2_manager_supports_me_avg,q3_tools_let_me_do_my_job_avg
customersupport,16,2.71,4.06,3.57
engineering,13,3.42,2.82,4.00
operations,11,2.73,3.27,2.36
sales,14,3.43,3.14,2.31
other teams,7,3.00,3.14,3.86
all,61,3.07,3.36,3.19
output/comments.csv · written by the agent, 34 lines
response_id,team,themes,comment
S-9001,customersupport,tools,The ticketing system crashes at least twice a week.
S-9003,other teams,workload,Month end close needs a third person. Two of us can not do it in five days.
S-9004,sales,workload;management,My manager is supportive but the workload is not sustainable.
S-9006,operations,tools,Equipment in the warehouse is old and the scanners keep failing.
S-9011,customersupport,growth,No career conversations since I joined.
S-9012,engineering,workload,I can not remember the last time I took a full lunch break.
S-9013,operations,pay,"I got a raise this year and I am grateful, thank you."
S-9015,sales,tools,The software we use for quotes is ten years old. Customers notice.
S-9016,operations,pay,Wages for night shifts are below what the depot across town offers.
S-9017,operations,growth,Training budget was cut and it shows. We learn everything the hard way.
S-9019,other teams,pay,Salary bands should be published.
S-9020,sales,management,Leadership should share the plan for next year. Rumors fill the gap.
S-9021,customersupport,management,"I do not know who decides what, and decisions get reversed a lot."
S-9022,sales,pay;workload,Overtime is constant and the pay does not reflect it.
S-9023,customersupport,management;growth,Promotion decisions feel random and my manager could not explain the last one.
S-9024,sales,pay,We were promised a cost of living adjustment in January and it never came.
S-9028,sales,pay,My salary has not moved in two years even though my targets went up.
S-9030,other teams,tools,Better tools for reporting please. I build the same spreadsheet every Monday.
S-9033,engineering,management,My manager gives clear feedback and I always know where I stand.
S-9034,other teams,workload,Hours are fine most weeks but month end is brutal.
S-9035,customersupport,workload,Too much overtime at quarter end. We are understaffed on the phones.
S-9036,engineering,growth,I would stay longer if there was a path beyond my current role.
S-9037,customersupport,other,The office is too cold.
S-9039,engineering,pay,The bonus plan is impossible to understand.
S-9040,sales,management,Feedback only comes at review time. I would like it sooner.
S-9049,customersupport,other,Great team. I like coming to work.
S-9052,sales,workload,Deadlines are set without asking the people who do the work.
S-9053,engineering,growth,Mentoring from senior engineers has been the best part of this job.
S-9054,customersupport,other,Free parking would be nice.
S-9055,sales,workload,Two people left and were not replaced. The rest of us cover their accounts.
S-9056,engineering,growth,I would like a clear path to promotion. Nobody can tell me what the next level needs.
S-9057,engineering,tools,New laptop took five weeks to arrive. I shared a desk machine until then.
S-9062,customersupport,management,Leadership changes priorities every month so half our work gets thrown away.
output/summary.md · written by the agent, 13 lines
Responses received: 64
Responses counted: 61
Comments grouped: 33
Scores not usable: 8

pay: 7 "I got a raise this year and I am grateful, thank you."
workload: 8 "Month end close needs a third person. Two of us can not do it in five days."
management: 7 "My manager is supportive but the workload is not sustainable."
tools: 5 "The ticketing system crashes at least twice a week."
growth: 6 "No career conversations since I joined."
other: 3 "The office is too cold."

The lowest average is 2.31, for sales on q3_tools_let_me_do_my_job. The next lowest is operations on the same question at 2.36, against 3.19 for all respondents. The highest average is 4.06, for customersupport on q2_manager_supports_me.
check.py · the check, written before the run
"""Rebuilds the survey counts, averages and comment themes from the export and compares them with what the agent wrote."""
import csv, re, sys
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 num(s):
    try: return float(str(s).strip())
    except ValueError: return None
raw = list(csv.DictReader((root/"input/survey_export.csv").open()))
qcols = [c for c in raw[0] if c.startswith("q")]
kept = {}
for r in raw:
    c = r["respondent_code"].strip()
    if c not in kept or r["submitted_at"] > kept[c]["submitted_at"]: kept[c] = r
kept = list(kept.values())
for r in kept: r["t"] = " ".join(r["team"].split()).lower()
size = {}
for r in kept: size[r["t"]] = size.get(r["t"], 0) + 1
for r in kept: r["row"] = r["t"] if r["t"] and size[r["t"]] >= 4 else "other teams"
usable = lambda v: v.strip() in ("1", "2", "3", "4", "5")
want = {}
for name in sorted({r["row"] for r in kept}) + ["all"]:
    grp = [r for r in kept if name == "all" or r["row"] == name]
    want[name] = {"responses": len(grp)}
    for q in qcols:
        vals = [int(r[q]) for r in grp if usable(r[q])]
        want[name][q + "_avg"] = sum(vals) / len(vals)
unusable = sum(1 for r in kept for q in qcols if not usable(r[q]))
themes = {}
for line in (root/"input/themes.md").read_text().splitlines():
    cells = [c.strip() for c in line.strip().strip("|").split("|")]
    if len(cells) == 3 and cells[0] not in ("theme", "") and not set(cells[0]) <= set("-"):
        themes[cells[0]] = [] if "none" in cells[2] else [w.strip().lower() for w in cells[2].split(",")]
def by_words(text):
    words = set(re.findall(r"[a-z']+", text.lower()))
    return [t for t, sig in themes.items() if words & set(sig)]
empty = {"", "n/a", "na", "none", "no comment", "-"}
comments = {r["response_id"]: r for r in kept if r["comment"].strip().lower() not in empty}
p1, p2 = root/"output/by_team.csv", root/"output/comments.csv"
if not p1.exists() or not p2.exists():
    say(False, "output/by_team.csv and output/comments.csv were not both written"); sys.exit(1)
got = {" ".join(r.get("team", "").split()).lower(): r for r in csv.DictReader(p1.open())}
rc = sum(1 for k, w in want.items() if k in got and num(got[k].get("responses")) == w["responses"])
say(rc == len(want) and set(got) == set(want), f"{rc} of {len(want)} rows in by_team.csv have the right number of people ({len(kept)} counted from {len(raw)} rows, small teams folded into other teams)")
cells = [(k, q + "_avg") for k in want for q in qcols]
ar = sum(1 for k, c in cells if k in got and num(got[k].get(c)) is not None and abs(num(got[k][c]) - want[k][c]) <= 0.0051)
say(ar == len(cells), f"{ar} of {len(cells)} averages equal the averages rebuilt from the usable scores")
grows = list(csv.DictReader(p2.open()))
gc = {r.get("response_id", "").strip(): r for r in grows}
word = sum(1 for k, r in comments.items() if k in gc and (gc[k].get("comment") or "").strip() == r["comment"].strip())
say(word == len(comments) and len(grows) == len(comments), f"{word} of {len(comments)} comments appear once in comments.csv, word for word")
def got_themes(k): return [t.strip().lower() for t in (gc[k].get("themes") or "").split(";") if t.strip()] if k in gc else None
sig = {k: by_words(r["comment"]) for k, r in comments.items() if by_words(r["comment"])}
sr = sum(1 for k, t in sig.items() if got_themes(k) == t)
say(sr == len(sig), f"{sr} of {len(sig)} comments with signal words carry exactly the themes those words point to")
rest = [k for k in comments if k not in sig]
rr = sum(1 for k in rest if got_themes(k) and len(got_themes(k)) == 1 and got_themes(k)[0] in themes)
say(rr == len(rest), f"{rr} of {len(rest)} comments with no signal word carry one theme from the list")
summary = (root/"output/summary.md").read_text() if (root/"output/summary.md").exists() else ""
def stated(label):
    m = re.search(re.escape(label) + r"\D{0,12}?(\d+)", summary, re.I)
    return int(m.group(1)) if m else None
facts = {"Responses received:": len(raw), "Responses counted:": len(kept), "Comments grouped:": len(comments), "Scores not usable:": unusable}
tcount = {t: sum(1 for k in gc if t in (got_themes(k) or [])) for t in themes}
tgood = sum(1 for t in themes if re.search(r"^\W*" + re.escape(t) + r"\W*:\W*%d\b" % tcount[t], summary, re.I | re.M))
good = sum(1 for k, v in facts.items() if stated(k) == v)
say(good == 4 and tgood == len(themes), f"summary.md has {good} of 4 opening counts right ({len(raw)} received, {len(kept)} counted, {len(comments)} comments, {unusable} scores not usable) and {tgood} of {len(themes)} theme counts equal to comments.csv")
quotes = [q for q in re.findall(r"[\"“]([^\"“”\n]{12,})[\"”]", summary)]
real = sum(1 for q in quotes if any(q.strip() == r["comment"].strip() for r in comments.values()))
say(len(quotes) >= len([t for t in themes if tcount[t]]) and real == len(quotes), f"{real} of {len(quotes)} quotes in summary.md are comments from the export, word for word")
sys.exit(0 if ok else 1)

survey_export.csv: sample data written by Atris. Fingerprint f9011fb3e029.

themes.md: sample data written by Atris. Fingerprint 3d4377e7fcbd.

by_team.csv: written by the agent. Fingerprint 87f0f7149acc.

comments.csv: written by the agent. Fingerprint ecc1e0d9d2a8.

summary.md: written by the agent. Fingerprint a3daf639ef8b.


More data and analysis work, and every other desk job

For agentsGitHub
What is AtrisBlogApp StorePricingPrivacyTerms