Roll up goal progress from status notes.
Done by an agent. Checked twice.
One status for every company goal, worked out the same way from team notes, with every off track goal named and owned.
Real files in
- goals.csv
The company goal list for the quarter: 32 goals with owner, start value, target and dates, plus one repeated row and one goal with no target. 34 lines, 4 KB. - engineering.md
The engineering team's weekly status note, which also reports on a goal another team owns. 10 lines, 543 bytes. - finance.md
The finance team's status note, two weeks old. 8 lines, 320 bytes. - marketing.md
The marketing team's weekly status note, one line for each goal. 10 lines, 562 bytes. - product.md
The product team's weekly status note, one line for each goal. 9 lines, 445 bytes. - sales.md
The sales team's weekly status note, one line for each goal. 10 lines, 642 bytes. - support.md
The support team's weekly status note, with one goal that is not on the goal list. 10 lines, 414 bytes.
Sample data written by Atris. Not a real company.
Three steps
- 1.Read the goals and the notes
- 2.Work out progress and status
- 3.Write the rollup
Claude Sonnet 5.5, 1 min 17 s. No web. It never saw the check.
Checked twice
- Passed: 32 of 32 goals appear once in rollup.csv with the team and the owner from the goal list
- Passed: 32 of 32 statuses equal the status worked out again from the goal list and the notes
- Passed: 32 of 32 expected percents and 25 of 25 progress percents equal the recomputed ones as whole numbers with halves rounded up
- Passed: 6 of 6 status counts in rollup.md are right: 11 on_track, 5 at_risk, 6 off_track, 3 done, 6 no_update, 1 no_target
- Passed: 11 of 11 off track and at risk goals are named in rollup.md with their owner
- Passed: 4 of 4 data problems are named in rollup.md: repeated rows, unknown goals, stale notes and goals with two values
- Passed: 98 of 98 figures in rollup.md come from the goal's own row, its note line, a rule or the percents worked out here
Second review by Claude Opus 5.5: pass.
Then we broke a copy of the output 6 ways on purpose. The check caught 6.
on_track: 11 at_risk: 5 off_track: 6 done: 3 no_update: 6 no_target: 1 Total goals: 32 ## Off track and at risk - G-03 (off_track) Book 60 first meetings with clinics, owner Bram Okonkwo: Gap is more than 25 points (now 21, start 0, target 60: progress 35.0%, expected 62.6%, gap 27.6 points). - G-09 (off_track) Run 4 regional events, owner Leif Andrade: Due date 2026-11-15 is before the as-of date 2026-11-27 and the goal is not done (now 3, start 0, target 4: progress 75.0%, expected 100.0%, gap 25.0 points). - G-13 (off_track) Raise weekly active clinics to 70 percent, owner Dmitri Vasko: Gap is more than 25 points (now 61, start 58, target 70: progress 25.0%, expected 62.6%, gap 37.6 points).
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 3 of 3 on 1 December 2026. The agent took 1 min 17 s. Run 1 passed the check but not the second review. Run 2 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
- As-of date 2026-11-27 (latest week ending). finance.md, dated 2026-11-13, is 14 days older, so it was correctly treated as stale and G-27 to G-30 are no_update
- Recomputed all 32 progress and expected percents. Examples: G-24 is 82/80 = 102.5%, rounded to 103; G-18 is 23/40 = 57.5%, rounded to 58; G-11 is 62.5%, rounded to 63; G-32 is (86-88)/(95-88) = -28.6%, rounded to -29; G-05 expected is 57/122 days = 46.7%, rounded to 47
- Statuses follow the rule order. G-09 is off_track because it was due 2026-11-15 (its gap is exactly 25.0). G-15 is done even though it is overdue. G-05 and G-18 are at_risk only because of a blocker, which is quoted. G-12 uses Product's line (13), not Engineering's (15). The counts are 11, 5, 6, 3, 6 and 1, which add up to 32 unique goals
- Data problems lists all four: G-22 appears twice in goals.csv, G-41 is in support.md but not in goals.csv, finance.md is stale, and G-12 has lines in two notes with both values given. Owner names come from goals.csv (Callum Reyes-Ito, not the note's spelling 'Calum')
What this run does not show
- Statuses follow fixed percent rules written in the flow. The check cannot tell whether those rules suit a given goal.
- The sample notes use one fixed line shape for each goal. Real status notes are looser and would need reading.
- The first run left a required column blank and the check missed it. The second review caught it and the check now tests that column.
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. 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
# Roll up goal progress from status notes function: leadership for: the chief of staff who reports on company goals each week goal: Every company goal has one status worked out the same way, so the leadership meeting starts from facts and not from opinions. ## 1. Read the goals and the notes Read input/goals.csv and every team note in input/notes/. Each note has a "Week ending" date and one line for each goal with "Now:" (the current value) and "Blocker:". The as-of date is the latest week ending date across all notes. - A goal row repeated with the same values counts once. - A note whose week ending date is more than 7 days before the as-of date is stale. Do not use its lines. - When two notes give a line for the same goal, use the line from the team that owns the goal in goals.csv. - A goal has a blocker when its line says anything other than "none" after "Blocker:". ## 2. Work out progress and status For each goal: - progress = (now minus start_value) divided by (target_value minus start_value), as a percent. This works for goals that go down as well as up. It can be below 0 or above 100. - expected = days from start_date to the as-of date, divided by days from start_date to due_date, as a percent, and never above 100. - gap = expected minus progress, in points. Use the unrounded numbers to decide the status. Give each goal the first status that applies: 1. `no_target` when target_value is blank. 2. `no_update` when no usable note line exists for the goal, or the line has no number after "Now:". 3. `done` when progress is 100 or more. 4. `off_track` when the due_date is before the as-of date, or the gap is more than 25 points. 5. `at_risk` when the gap is more than 10 points, or the goal has a blocker. 6. `on_track` in every other case. ## 3. Write the rollup Write output/rollup.csv with columns goal_id,team,owner,progress_pct,expected_pct,status,reason. One row for each goal in goals.csv. team and owner are as written in goals.csv. The two percents are whole numbers, with halves rounded up, so 62.5 becomes 63 and 102.5 becomes 103. Fill expected_pct for every goal, whatever its status. Leave only progress_pct blank, and only for no_target and no_update. reason is one plain sentence with the numbers used. When a blocker decides the status, quote the blocker. Write output/rollup.md for the leadership meeting: - First, six lines with the count for each status, written like `on_track: 12`. - "Off track" and "At risk": one line for each goal with its goal_id, the goal, the owner and the reason. - "No update and no target": one line for each goal with its goal_id, owner and why. - "Data problems": one line for each of these that you find: a repeated goal row, a goal_id in a note that is not in goals.csv, a stale note (name the file), and a goal with lines in two notes (give both values and say which one was used). Do not soften a status and do not add a goal, a cause or a fix that the files do not give. ## Done looks like - Every goal in goals.csv has exactly one row and one status in rollup.csv. - The six counts in rollup.md add up to the number of goals. - Every off track and at risk goal is named with its owner.
input/goals.csv · 34 lines, 4 KB
goal_id,team,owner,goal,measure,start_value,target_value,start_date,due_date G-01,Sales,Odette Marsh,"Close 1,200,000 in new contracts",new contract value,0,1200000,2026-10-01,2026-12-31 G-02,Sales,Odette Marsh,Raise win rate to 30 percent,win rate percent,22,30,2026-10-01,2026-12-31 G-03,Sales,Bram Okonkwo,Book 60 first meetings with clinics,first meetings held,0,60,2026-10-01,2026-12-31 G-04,Sales,Bram Okonkwo,Cut the average sales cycle to 45 days,days from first meeting to signature,62,45,2026-07-01,2026-12-31 G-05,Sales,Odette Marsh,Sign 3 reseller partners,partners signed,0,3,2026-10-01,2027-01-31 G-06,Marketing,Yusra Petrov,"Grow monthly site visits to 90,000",monthly site visits,64000,90000,2026-07-01,2026-12-31 G-07,Marketing,Yusra Petrov,Publish 12 customer stories,stories published,0,12,2026-10-01,2026-12-31 G-08,Marketing,Leif Andrade,Bring cost per lead down to 85,cost per lead,120,85,2026-10-01,2026-12-31 G-09,Marketing,Leif Andrade,Run 4 regional events,events run,0,4,2026-10-01,2026-11-15 G-10,Marketing,Yusra Petrov,"Reach 5,000 newsletter readers",newsletter readers,3100,5000,2026-10-01,2026-12-31 G-11,Product,Henrike Solberg,Ship the mobile booking app,milestones finished of 8,0,8,2026-10-01,2026-12-31 G-12,Product,Henrike Solberg,Cut onboarding time to 10 days,days from signature to first booking,21,10,2026-07-01,2026-12-31 G-13,Product,Dmitri Vasko,Raise weekly active clinics to 70 percent,percent of clinics active each week,58,70,2026-10-01,2026-12-31 G-14,Product,Dmitri Vasko,Finish 20 customer interviews,interviews done,0,20,2026-11-01,2026-12-15 G-15,Product,Henrike Solberg,Launch the pricing page test,tests launched,0,1,2026-10-01,2026-11-15 G-16,Engineering,Callum Reyes-Ito,Cut page load time to 1.5 seconds,seconds to load the booking page,3.2,1.5,2026-10-01,2026-12-31 G-17,Engineering,Callum Reyes-Ito,Reach 99.9 percent uptime,uptime percent,99.5,99.9,2026-07-01,2026-12-31 G-18,Engineering,Anneli Fairweather,Close 40 security review findings,findings closed,0,40,2026-10-01,2026-12-31 G-19,Engineering,Anneli Fairweather,Move all customers to the new database,percent of customers moved,0,100,2026-10-01,2027-01-31 G-20,Engineering,Callum Reyes-Ito,Cut cloud cost per customer to 38,monthly cloud cost per customer,52,38,2026-10-01,2026-12-31 G-21,Engineering,Anneli Fairweather,Hire 4 engineers,engineers hired,0,4,2026-10-01,2026-12-31 G-22,Support,Marisol Achterberg,Answer first replies within 2 hours,median hours to first reply,5.5,2,2026-10-01,2026-12-31 G-22,Support,Marisol Achterberg,Answer first replies within 2 hours,median hours to first reply,5.5,2,2026-10-01,2026-12-31 G-23,Support,Marisol Achterberg,Raise the satisfaction score to 4.6,satisfaction score out of 5,4.2,4.6,2026-07-01,2026-12-31 G-24,Support,Jonty Varga,Write 80 help articles,articles published,0,80,2026-10-01,2026-12-31 G-25,Support,Jonty Varga,Cut repeat tickets to 8 percent,percent of tickets reopened,15,8,2026-10-01,2026-12-31 G-26,Support,Marisol Achterberg,Train 6 agents on billing questions,agents trained,0,6,2026-11-01,2026-12-15 G-27,Finance,Priyanka Deshmane,Close the books in 5 working days,working days to close,11,5,2026-10-01,2026-12-31 G-28,Finance,Priyanka Deshmane,Collect 95 percent of invoices in 30 days,percent collected in 30 days,81,95,2026-07-01,2026-12-31 G-29,Finance,Tobias Lindgren,Move payroll to the new provider,moves finished,0,1,2026-10-01,2026-11-15 G-30,Finance,Tobias Lindgren,"Cut software spend by 60,000 a year",yearly saving found,0,60000,2026-10-01,2026-12-31 G-31,Marketing,Leif Andrade,Improve brand awareness,aided awareness percent in survey,31,,2026-10-01,2026-12-31 G-32,Sales,Bram Okonkwo,Renew 95 percent of contracts due,percent of due contracts renewed,88,95,2026-10-01,2026-12-31
input/notes/engineering.md · 10 lines, 543 bytes
# Engineering status note Week ending 2026-11-26. Written by Calum Reyes-Ito. - G-16 Page load time. Now: 2.1. Blocker: none. - G-17 Uptime. Now: 99.82. Blocker: none. - G-18 Security findings. Now: 23. Blocker: waiting on the outside testers' report, which Corwin has promised for December 4. - G-20 Cloud cost per customer. Now: 49. The reserved capacity deal is not signed. Blocker: none. - G-21 Hiring. Now: 2. Two offers out. Blocker: none. - G-12 Onboarding time. Now: 15. This is what our setup logs show for November. Blocker: none.
input/notes/finance.md · 8 lines, 320 bytes
# Finance status note Week ending 2026-11-13. Written by Priyanka Deshmane. - G-27 Days to close. Now: 8. Blocker: none. - G-28 Invoices collected in 30 days. Now: 88. Blocker: none. - G-29 Payroll move. Now: 0. Blocker: the new provider has not sent the bank forms. - G-30 Software spend. Now: 22,000. Blocker: none.
input/notes/marketing.md · 10 lines, 562 bytes
# Marketing status note Week ending 2026-11-27. Written by Yusra Petrov. - G-06 Site visits. Now: 86,200. Blocker: none. - G-07 Customer stories. Now: 12. The last two went live on Tuesday. Blocker: none. - G-08 Cost per lead. Now: 104. Paid search is still the expensive part. Blocker: none. - G-09 Regional events. Now: 3. The fourth was cancelled when the venue fell through. Blocker: none. - G-10 Newsletter readers. Now: 4,420. Blocker: none. - G-31 Brand awareness. Now: 34. The October survey is back. Nobody has set a number to aim for. Blocker: none.
input/notes/product.md · 9 lines, 445 bytes
# Product status note Week ending 2026-11-27. Written by Henrike Solberg. - G-11 Mobile booking app. Now: 5. Milestone 5 was sign in. Blocker: none. - G-12 Onboarding time. Now: 13. Median over the last 30 days of new customers. Blocker: none. - G-13 Weekly active clinics. Now: 61. Flat for three weeks. Blocker: none. - G-14 Customer interviews. Now: 14. Blocker: none. - G-15 Pricing page test. Now: 1. Launched November 12. Blocker: none.
input/notes/sales.md · 10 lines, 642 bytes
# Sales status note Week ending 2026-11-27. Written by Odette Marsh. - G-01 New contracts. Now: 790,000. Two renewals with upsell closed this week. Blocker: none. - G-02 Win rate. Now: 26.5. Rolling 90 days. Blocker: none. - G-03 First meetings with clinics. Now: 21. Bram was out for a week and the list we bought was poor. Blocker: none. - G-04 Sales cycle. Now: 51. Was 53 last week. Blocker: none. - G-05 Reseller partners. Now: 2. Third one is agreed in principle. Blocker: the reseller contract template has been with legal since November 9. - G-32 Renewals. Now: 86. We lost two renewals to a cheaper tool this month. Blocker: none.
input/notes/support.md · 10 lines, 414 bytes
# Support status note Week ending 2026-11-27. Written by Marisol Achterberg. - G-22 First reply time. Now: 3.1. Blocker: none. - G-23 Satisfaction score. Now: 4.5. Blocker: none. - G-24 Help articles. Now: 82. Blocker: none. - G-25 Repeat tickets. Now: not measured yet, the report is being rebuilt. Blocker: none. - G-26 Billing training. Now: 1. Blocker: none. - G-41 New phone system. Now: 60. Blocker: none.
output/rollup.csv · written by the agent, 33 lines
goal_id,team,owner,progress_pct,expected_pct,status,reason G-01,Sales,Odette Marsh,66,63,on_track,"Gap is -3.2 points, 10 or less, and no blocker (now 790000, start 0, target 1200000: progress 65.8%, expected 62.6%)." G-02,Sales,Odette Marsh,56,63,on_track,"Gap is 6.4 points, 10 or less, and no blocker (now 26.5, start 22, target 30: progress 56.2%, expected 62.6%)." G-03,Sales,Bram Okonkwo,35,63,off_track,"Gap is more than 25 points (now 21, start 0, target 60: progress 35.0%, expected 62.6%, gap 27.6 points)." G-04,Sales,Bram Okonkwo,65,81,at_risk,"Gap is more than 10 points (now 51, start 62, target 45: progress 64.7%, expected 81.4%, gap 16.7 points)." G-05,Sales,Odette Marsh,67,47,at_risk,"Gap is -19.9 points, not above 10, but the note gives a blocker (now 2, start 0, target 3: progress 66.7%, expected 46.7%). Blocker: ""the reseller contract template has been with legal since November 9.""" G-06,Marketing,Yusra Petrov,85,81,on_track,"Gap is -4.0 points, 10 or less, and no blocker (now 86200, start 64000, target 90000: progress 85.4%, expected 81.4%)." G-07,Marketing,Yusra Petrov,100,63,done,"Progress is 100% or more (now 12, start 0, target 12: progress 100.0%, expected 62.6%)." G-08,Marketing,Leif Andrade,46,63,at_risk,"Gap is more than 10 points (now 104, start 120, target 85: progress 45.7%, expected 62.6%, gap 16.9 points)." G-09,Marketing,Leif Andrade,75,100,off_track,"Due date 2026-11-15 is before the as-of date 2026-11-27 and the goal is not done (now 3, start 0, target 4: progress 75.0%, expected 100.0%, gap 25.0 points)." G-10,Marketing,Yusra Petrov,69,63,on_track,"Gap is -6.8 points, 10 or less, and no blocker (now 4420, start 3100, target 5000: progress 69.5%, expected 62.6%)." G-11,Product,Henrike Solberg,63,63,on_track,"Gap is 0.1 points, 10 or less, and no blocker (now 5, start 0, target 8: progress 62.5%, expected 62.6%)." G-12,Product,Henrike Solberg,73,81,on_track,"Gap is 8.7 points, 10 or less, and no blocker (now 13, start 21, target 10: progress 72.7%, expected 81.4%)." G-13,Product,Dmitri Vasko,25,63,off_track,"Gap is more than 25 points (now 61, start 58, target 70: progress 25.0%, expected 62.6%, gap 37.6 points)." G-14,Product,Dmitri Vasko,70,59,on_track,"Gap is -10.9 points, 10 or less, and no blocker (now 14, start 0, target 20: progress 70.0%, expected 59.1%)." G-15,Product,Henrike Solberg,100,100,done,"Progress is 100% or more (now 1, start 0, target 1: progress 100.0%, expected 100.0%)." G-16,Engineering,Callum Reyes-Ito,65,63,on_track,"Gap is -2.1 points, 10 or less, and no blocker (now 2.1, start 3.2, target 1.5: progress 64.7%, expected 62.6%)." G-17,Engineering,Callum Reyes-Ito,80,81,on_track,"Gap is 1.4 points, 10 or less, and no blocker (now 99.82, start 99.5, target 99.9: progress 80.0%, expected 81.4%)." G-18,Engineering,Anneli Fairweather,58,63,at_risk,"Gap is 5.1 points, not above 10, but the note gives a blocker (now 23, start 0, target 40: progress 57.5%, expected 62.6%). Blocker: ""waiting on the outside testers' report, which Corwin has promised for December 4.""" G-19,Engineering,Anneli Fairweather,,47,no_update,No note has a line for this goal. G-20,Engineering,Callum Reyes-Ito,21,63,off_track,"Gap is more than 25 points (now 49, start 52, target 38: progress 21.4%, expected 62.6%, gap 41.2 points)." G-21,Engineering,Anneli Fairweather,50,63,at_risk,"Gap is more than 10 points (now 2, start 0, target 4: progress 50.0%, expected 62.6%, gap 12.6 points)." G-22,Support,Marisol Achterberg,69,63,on_track,"Gap is -5.9 points, 10 or less, and no blocker (now 3.1, start 5.5, target 2: progress 68.6%, expected 62.6%)." G-23,Support,Marisol Achterberg,75,81,on_track,"Gap is 6.4 points, 10 or less, and no blocker (now 4.5, start 4.2, target 4.6: progress 75.0%, expected 81.4%)." G-24,Support,Jonty Varga,103,63,done,"Progress is 100% or more (now 82, start 0, target 80: progress 102.5%, expected 62.6%)." G-25,Support,Jonty Varga,,63,no_update,"The line in support.md has no number after Now: (it says ""not measured yet, the report is being rebuilt."")." G-26,Support,Marisol Achterberg,17,59,off_track,"Gap is more than 25 points (now 1, start 0, target 6: progress 16.7%, expected 59.1%, gap 42.4 points)." G-27,Finance,Priyanka Deshmane,,63,no_update,"The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists." G-28,Finance,Priyanka Deshmane,,81,no_update,"The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists." G-29,Finance,Tobias Lindgren,,100,no_update,"The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists." G-30,Finance,Tobias Lindgren,,63,no_update,"The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists." G-31,Marketing,Leif Andrade,,63,no_target,"No target_value is set in goals.csv, so progress cannot be worked out; the note says Now: 34 but nobody has set a number to aim for." G-32,Sales,Bram Okonkwo,-29,63,off_track,"Gap is more than 25 points (now 86, start 88, target 95: progress -28.6%, expected 62.6%, gap 91.2 points)."
output/rollup.md · written by the agent, 41 lines
# Goal progress rollup, as of 2026-11-27 on_track: 11 at_risk: 5 off_track: 6 done: 3 no_update: 6 no_target: 1 Total goals: 32 ## Off track and at risk - G-03 (off_track) Book 60 first meetings with clinics, owner Bram Okonkwo: Gap is more than 25 points (now 21, start 0, target 60: progress 35.0%, expected 62.6%, gap 27.6 points). - G-09 (off_track) Run 4 regional events, owner Leif Andrade: Due date 2026-11-15 is before the as-of date 2026-11-27 and the goal is not done (now 3, start 0, target 4: progress 75.0%, expected 100.0%, gap 25.0 points). - G-13 (off_track) Raise weekly active clinics to 70 percent, owner Dmitri Vasko: Gap is more than 25 points (now 61, start 58, target 70: progress 25.0%, expected 62.6%, gap 37.6 points). - G-20 (off_track) Cut cloud cost per customer to 38, owner Callum Reyes-Ito: Gap is more than 25 points (now 49, start 52, target 38: progress 21.4%, expected 62.6%, gap 41.2 points). - G-26 (off_track) Train 6 agents on billing questions, owner Marisol Achterberg: Gap is more than 25 points (now 1, start 0, target 6: progress 16.7%, expected 59.1%, gap 42.4 points). - G-32 (off_track) Renew 95 percent of contracts due, owner Bram Okonkwo: Gap is more than 25 points (now 86, start 88, target 95: progress -28.6%, expected 62.6%, gap 91.2 points). - G-04 (at_risk) Cut the average sales cycle to 45 days, owner Bram Okonkwo: Gap is more than 10 points (now 51, start 62, target 45: progress 64.7%, expected 81.4%, gap 16.7 points). - G-05 (at_risk) Sign 3 reseller partners, owner Odette Marsh: Gap is -19.9 points, not above 10, but the note gives a blocker (now 2, start 0, target 3: progress 66.7%, expected 46.7%). Blocker: "the reseller contract template has been with legal since November 9." - G-08 (at_risk) Bring cost per lead down to 85, owner Leif Andrade: Gap is more than 10 points (now 104, start 120, target 85: progress 45.7%, expected 62.6%, gap 16.9 points). - G-18 (at_risk) Close 40 security review findings, owner Anneli Fairweather: Gap is 5.1 points, not above 10, but the note gives a blocker (now 23, start 0, target 40: progress 57.5%, expected 62.6%). Blocker: "waiting on the outside testers' report, which Corwin has promised for December 4." - G-21 (at_risk) Hire 4 engineers, owner Anneli Fairweather: Gap is more than 10 points (now 2, start 0, target 4: progress 50.0%, expected 62.6%, gap 12.6 points). ## No update and no target - G-19 (no_update), owner Anneli Fairweather: No note has a line for this goal. - G-25 (no_update), owner Jonty Varga: The line in support.md has no number after Now: (it says "not measured yet, the report is being rebuilt."). - G-27 (no_update), owner Priyanka Deshmane: The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists. - G-28 (no_update), owner Priyanka Deshmane: The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists. - G-29 (no_update), owner Tobias Lindgren: The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists. - G-30 (no_update), owner Tobias Lindgren: The only note line for this goal is in finance.md (week ending 2026-11-13), which is stale against the as-of date 2026-11-27, so no usable line exists. - G-31 (no_target), owner Leif Andrade: No target_value is set in goals.csv, so progress cannot be worked out; the note says Now: 34 but nobody has set a number to aim for. ## Data problems - Repeated goal row: G-22 appears more than once in goals.csv with the same values; counted once. - Goal not in goals.csv: G-41 appears in support.md; not used. - Stale note: finance.md has week ending 2026-11-13, more than 7 days before 2026-11-27; its lines were not used. - Goal with lines in two notes: G-12: engineering.md (week ending 2026-11-26) gives Now 15 and product.md (week ending 2026-11-27) gives Now 13; used product.md, the note from the owning team (Product).
check.py · the check, written before the run
"""Works out every goal's status again from the goal list and the notes and compares it with the rollup."""
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 d(s): return date.fromisoformat(s.strip())
def fnum(s):
m = re.match(r"\s*(-?\d[\d,]*(?:\.\d+)?)", s or "")
return float(m.group(1).replace(",", "")) if m else None
goals, repeated = {}, []
for r in csv.DictReader((root/"input/goals.csv").open()):
if r["goal_id"] in goals: repeated.append(r["goal_id"])
goals[r["goal_id"]] = r
notes = {}
for p in sorted((root/"input/notes").glob("*.md")):
text = p.read_text(); week = d(re.search(r"Week ending (\d{4}-\d\d-\d\d)", text).group(1)); lines = {}
for ln in text.splitlines():
m = re.match(r"-\s*(G-\d+)\b(.*)", ln)
if not m: continue
now = re.search(r"Now:\s*(.*)", m.group(2)); blk = re.search(r"Blocker:\s*(.*)", m.group(2))
lines[m.group(1)] = (fnum(now.group(1)) if now else None, (blk.group(1).strip() if blk else "none"))
notes[p.stem] = (week, lines)
as_of = max(w for w, _ in notes.values())
stale = [t for t, (w, _) in notes.items() if (as_of - w).days > 7]
fresh = {t: l for t, (w, l) in notes.items() if t not in stale}
unknown = sorted({g for _, l in notes.values() for g in l} - set(goals))
want, twice = {}, {}
for gid, g in goals.items():
have = [(t, l[gid]) for t, l in fresh.items() if gid in l]
if len(have) > 1: twice[gid] = [v[0] for _, v in have]
own = [v for t, v in have if t == g["team"].lower()] or [v for _, v in have]
line = own[0] if own else None
start = float(g["start_value"]); s, due = d(g["start_date"]), d(g["due_date"])
exp = min(100.0, (as_of - s).days / (due - s).days * 100)
prog = None
if g["target_value"].strip() == "": st = "no_target"
elif line is None or line[0] is None: st = "no_update"
else:
prog = (line[0] - start) / (float(g["target_value"]) - start) * 100
blocked = not re.match(r"(none|no\b|n/a|-)", line[1].lower())
if prog >= 100: st = "done"
elif due < as_of or exp - prog > 25: st = "off_track"
elif exp - prog > 10 or blocked: st = "at_risk"
else: st = "on_track"
want[gid] = (st, prog, exp)
path = root/"output/rollup.csv"
if not path.exists():
say(False, "output/rollup.csv was not written"); sys.exit(1)
rows = list(csv.DictReader(path.open())); got = {r.get("goal_id", ""): r for r in rows}
once = sum(1 for gid, g in goals.items() if sum(1 for r in rows if r.get("goal_id") == gid) == 1
and (got[gid].get("owner") or "").strip() == g["owner"] and (got[gid].get("team") or "").strip() == g["team"])
say(once == len(goals) and len(rows) == len(goals), f"{once} of {len(goals)} goals appear once in rollup.csv with the team and the owner from the goal list")
right = sum(1 for gid, (st, _, _) in want.items() if (got.get(gid, {}).get("status") or "").strip() == st)
say(right == len(want), f"{right} of {len(want)} statuses equal the status worked out again from the goal list and the notes")
def close(cell, v): return fnum(cell) is not None and fnum(cell) == int(v + 0.5 + 1e-9) if v >= 0 else fnum(cell) is not None and abs(fnum(cell) - v) <= 0.5 + 1e-9
measured = [gid for gid, (_, p, _) in want.items() if p is not None]
pct = sum(1 for gid in measured if close(got.get(gid, {}).get("progress_pct"), want[gid][1]))
exp_ok = sum(1 for gid in want if close(got.get(gid, {}).get("expected_pct"), want[gid][2]))
say(pct == len(measured) and exp_ok == len(want), f"{exp_ok} of {len(want)} expected percents and {pct} of {len(measured)} progress percents equal the recomputed ones as whole numbers with halves rounded up")
md = (root/"output/rollup.md").read_text() if (root/"output/rollup.md").exists() else ""
names = ["on_track", "at_risk", "off_track", "done", "no_update", "no_target"]
counts = {n: sum(1 for st, _, _ in want.values() if st == n) for n in names}
good = sum(1 for n in names if (m := re.search(rf"{n}\W{{0,6}}(\d+)", md)) and int(m.group(1)) == counts[n])
say(good == 6, f"{good} of 6 status counts in rollup.md are right: " + ", ".join(f"{counts[n]} {n}" for n in names))
flagged = [gid for gid, (st, _, _) in want.items() if st in ("off_track", "at_risk")]
named = sum(1 for gid in flagged if any(gid in ln and goals[gid]["owner"] in ln for ln in md.splitlines()))
say(named == len(flagged), f"{named} of {len(flagged)} off track and at risk goals are named in rollup.md with their owner")
probs = [(g, g in md) for g in repeated] + [(g, g in md) for g in unknown] + [(t, f"{t}.md" in md) for t in stale]
for gid, vals in twice.items():
probs.append((gid, any(gid in ln and all(re.search(rf"(?<![\d.]){v:g}(?![\d])", ln) for v in vals) for ln in md.splitlines())))
found = sum(1 for _, hit in probs if hit)
say(found == len(probs) and probs, f"{found} of {len(probs)} data problems are named in rollup.md: repeated rows, unknown goals, stale notes and goals with two values")
# figures in the write-up: each must come from the goal's own row, its note lines or the percents worked out here
FIG = r"(?<![\w.-])\d(?:[\d,]*\d)?(?:\.\d+)?(?![\w-])"
def figs(text): return [float(x.replace(",", "")) for x in re.findall(FIG, text)]
note_text = {}
for p in sorted((root/"input/notes").glob("*.md")):
for ln in p.read_text().splitlines():
m = re.match(r"-\s*(G-\d+)\b", ln)
if m: note_text.setdefault(m.group(1), []).append(ln)
RULES = {7.0, 10.0, 25.0, 100.0}
def fits(f, gids):
if f in RULES: return True
for gid in gids:
if gid in goals and f in figs(" ".join(goals[gid].values())): return True
if f in figs(" ".join(note_text.get(gid, []))): return True
st, prog, exp = want.get(gid, (None, None, None))
worked = [v for v in (prog, exp, (exp - prog) if prog is not None and exp is not None else None) if v is not None]
if any(abs(f - abs(v)) <= 0.051 or (f == int(f) and abs(f - abs(v)) <= 0.5) for v in worked): return True
return False
used = traced = 0
for ln in md.splitlines():
gids = re.findall(r"G-\d+", ln)
for f in figs(ln):
used += 1
traced += fits(f, gids) if gids else (f in RULES or f in {float(c) for c in counts.values()} or f == len(goals))
say(used >= 20 and traced == used, f"{traced} of {used} figures in rollup.md come from the goal's own row, its note line, a rule or the percents worked out here")
sys.exit(0 if ok else 1)
goals.csv: sample data written by Atris. Fingerprint 71129de1af19.
engineering.md: sample data written by Atris. Fingerprint 7701f245d78c.
finance.md: sample data written by Atris. Fingerprint a5b1de94e1e1.
marketing.md: sample data written by Atris. Fingerprint c269520c8036.
product.md: sample data written by Atris. Fingerprint 5a6b7823b4b3.
sales.md: sample data written by Atris. Fingerprint 1ec7e2cd0e57.
support.md: sample data written by Atris. Fingerprint d09ebe2f1c27.
rollup.csv: written by the agent. Fingerprint c037d850ade5.
rollup.md: written by the agent. Fingerprint 5787dd50e774.