runbookify
← All plans
Human Resources / Compensation & Payroll Prep

Bonus & Commission Calculation Sheet

Build an internal tool that turns your comp-plan rules and performance results into accurate, explainable per-person bonus and commission payouts - with the full math shown, an approval gate before anything reaches payroll, and a clean payroll CSV at the end.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Auth, Storage, RLS)Resend (email notifications)
What you'll build

A login-protected tool where you load plan rules and results, see each employee's payout computed with every step shown, review totals and outliers, get an approver's sign-off, and export a payroll-ready CSV - with a full audit trail.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Supabase account
  • A free Vercel account
  • A free Resend account
  • Your comp-plan rules (targets, rates, tiers, caps, proration) and a recent set of performance/sales results

The problem this kills

Variable pay lives in a spreadsheet that one person understands and everyone else fears. Every cycle, a formula gets dragged one row too few, a tier threshold is off by a dollar, a mid-quarter hire gets a full payout instead of a prorated one, and the file lands in payroll before anyone notices. Then the disputes start: "Why is my commission lower than last quarter?" and you have no clean way to show the math, because the math is buried in nested IF statements no one can read aloud.

The damage is real - overpayments you can't easily claw back, underpayments that erode trust, and hours of your week spent defending numbers instead of producing them. Worse, there's no record of who approved what, so when finance or an auditor asks, you're reconstructing decisions from memory and email threads.

What you'll build

A small, secure web app - just for your team - that takes three things: your plan rules (eligibility, targets, rate tiers, accelerators, caps, proration), the performance or sales results per person, and your eligible-employee roster. It computes every payout, then shows you the work: attainment percent, which tier each person landed in, the accelerator applied, the cap that kicked in, the proration factor for partial-period employees - line by line, in plain numbers a person can read.

You get a review screen with running totals and automatically flagged outliers (suspiciously high payouts, people with missing results, caps hit). Nothing moves until a designated approver signs off. Adjustments and exceptions require a reason on the record. Only then does the tool produce a payroll CSV in the exact one-time-payment columns your payroll system expects.

What's inside the Implementation Plan

The plan is a complete, paste-and-go runbook for Claude Code. It opens by interviewing you about your business - your actual comp plans, the names and shapes of your data, your tier and cap rules, your proration policy, your messiest edge cases - and tailors the data model and every calculation to your answers, so you get a tool built around how you pay people, not a generic template. From there it walks you step by step: set up the database, build the login, load rules and results, build the calculation engine with visible math, the review-and-approve screen, the audit trail, and the payroll export. Every step ends with a ready-to-copy prompt.

The governance it includes (this is the point)

  • Login so only your team can open the tool.
  • Row-level security so each organization only ever sees its own people and payouts.
  • A complete audit trail - who loaded what, who changed what, who approved, and when.
  • A hard human-in-the-loop approval gate - the tool drafts every payout and shows the math; a person reviews and approves before a single number is committed or exported to payroll.
  • Duplicate guards - one payout per employee per plan period, so the same person can't be paid twice for the same cycle.

Who it's for

HR comp specialists and finance partners who own variable pay and are tired of defending a fragile spreadsheet. If you calculate bonuses or commissions, field payout disputes, and want numbers that are accurate, explainable, and dispute-proof - without hiring a developer - this is for you.

You've got this - paste the first prompt and let the interview tailor the rest.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.