{"id":"hr-leave-balance-table-from-ledger","audience":"hr","category":"people-work","track":"people","level":"intermediate","technique":"constraints","title":"Work out leave balances from a ledger and show the math","free":false,"task":"Calculate each employee's remaining PTO as of Nov 9 and return a table with the header Employee | Accrued | Used | Remaining | Over cap?. Remaining = Accrued minus Used, in days. Over cap? is Yes if Remaining is more than the 10-day carry-over cap, else No. Show numbers only in the first four columns. Sort by Remaining, largest first. Plain text, no bold. After the table, one line: Over cap: followed by the names, or None. HR reviews before any message goes out.","materialLabel":"PTO ledger (attached to your prompt automatically)","material":"PTO ledger, calendar year 2026. Accrued is the total for the year to date.\n\nEmployee | Accrued | Used entries\nBianca Ruiz | 15 | 3, 2.5, 1\nTheo Grant | 15 | 5, 5\nSunita Rao | 15 | 1, 1, 0.5\nMarkus Wolf | 12.5 | 4, 3.5, 1.5\nEvelyn Cho | 15 | 7, 3, 1\n\nNote: Half-day entries are already written as .5. The ledger shows Theo Grant's second 5 twice because of a duplicate; it was entered once in the system (so total used is 5, not 10). The carry-over cap is 10 days.\nOld cap in the 2024 handbook was 5 days.","rules":[{"type":"maxWords","max":120},{"type":"plainText"}],"mistakes":[{"title":"Double-counting Theo","why":"The AI uses Used 10 for Theo.","fix":"Say: \"The duplicate 5 counts once, so Theo used 5.\"","checks":["r1"]},{"title":"Wrong cap","why":"The AI uses the old 5 day cap.","fix":"Say: \"The cap is 10 days; ignore the 2024 handbook.\"","checks":["r2"]},{"title":"Sort and header","why":"The AI keeps ledger order or changes columns.","fix":"Say: \"Exact header, sorted by Remaining largest first.\"","checks":["r0"]},{"title":"Trusting the AI to count words","why":"AI is bad at counting. Ask for a total word limit and it often lands over it.","fix":"Cap each part instead, for example: \"each line under 15 words.\"","checks":["maxWords"]},{"title":"Markdown","why":"The AI bolds words or adds headings.","fix":"Say: \"Plain text, no bold, no headings.\"","checks":["plainText"]}],"promptHints":[{"label":"Exact header","patterns":["employee \\|","remaining","over cap"]},{"label":"Math","patterns":["accrued minus used","remaining"]},{"label":"Sort","patterns":["largest first"]},{"label":"Cap","patterns":["10-day","10 days"]},{"label":"Last line","patterns":["over cap:"]}],"hint":"Give the header, the formula, the cap, the sort order and the last line.","mission":"Work out each person's remaining PTO as of Nov 9.","musts":["Remaining is accrued minus used","Over means above 10 days","Sort by Remaining, largest first"],"rubricLabels":["Has the header Employee | Accrued | Used | Remaining | Over cap? and one row per employee sorted by Remaining largest first (Sunita, Theo, Bianca, Evelyn, Markus)","Remaining values are right: Sunita 12.5, Theo 10, Bianca 8.5, Evelyn 4, Markus 3.5, with Theo's duplicate entry counted once (Used 5)","Over cap? is Yes only for Sunita (12.5 over the 10-day cap) and the last line is exactly \"Over cap: Sunita Rao\""]}