AQL Sampling Plan Helper: Stop Guessing How Many Units to Inspect
Enter a received lot size and your AQL level, and the tool computes the right sample size and accept/reject numbers, records the defects you found, and recommends accept or reject — with your quality lead approving the disposition before it's logged.
A web tool where an inspector enters a lot size and AQL level, the tool returns the correct sample size and accept/reject thresholds from your standard, records the defects found, recommends accept or reject, your quality lead approves the disposition (release or quarantine), and the inspection record exports as a clean CSV.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A Resend account (free)
- Your AQL sampling table / standard (e.g. ANSI/ASQ Z1.4 or ISO 2859-1)
- A list or sheet of received lots (lot ID, supplier, lot size)
- Claude Code or any AI coding agent
The problem this kills
A truck backs in, a lot of 4,000 units lands on the dock, and someone has to decide: how many do we actually inspect, and how many defects are too many before we reject the whole thing? The right answer lives in a dog-eared AQL table taped to the wall — find your lot-size row, read across to the code letter, jump to your AQL column, and read off the sample size and the accept and reject numbers. Get the row wrong and you either over-inspect (slow, expensive) or under-inspect (defects walk straight onto your shelves).
In real receiving, that lookup gets done from memory, from a photocopy, or not at all. Inspectors disagree on the numbers. Borderline lots get waved through because nobody flagged them for tightened inspection. Results get scribbled on the packing slip and never make it into a system. And when a customer complaint or an audit asks "how did you decide to accept lot #L-2291?", there's no record of the sample size, the defects found, who approved it, or when.
You don't need a $40k quality module to fix this. You can build a small, reliable tool — in an afternoon — that does the table lookup correctly every time, captures the result, and forces a quality lead to sign off before the lot is released or quarantined.
What you'll build
A simple, login-protected web app for your QC, receiving, and quality team:
- An inspector enters a lot ID, supplier, lot size, and AQL level.
- The tool reads your AQL sampling table and returns the correct sample size, accept number (Ac), and reject number (Re) — no more squinting at a photocopy.
- The inspector records the defects found in the sample (and can split them by defect type if you want).
- The tool recommends accept or reject by comparing defects against Ac/Re, and flags borderline lots for tightened inspection per your rules.
- A quality lead reviews and approves the accept/reject decision and the disposition — release or quarantine — before anything is recorded.
- Every inspection is saved with a full audit trail and exports as a clean CSV inspection record in the exact columns your system expects.
What's inside the Implementation Plan
The plan is a complete, paste-and-go runbook for an AI coding agent (like Claude Code). You don't write code — you paste the plan, answer a few questions, and watch the tool get built.
It opens by interviewing you about your business. Before a single screen is built, the plan makes the agent ask about your actual process: which AQL standard you use (ANSI/ASQ Z1.4, ISO 2859-1, or your own table), your normal AQL levels and inspection level, how you name lots and suppliers, your typical and peak lot sizes, your exact accept/reject and tightened-inspection rules, and your messy edge cases — short lots, mixed pallets, re-inspections. Then it reflects a short tailored spec back to you for a thumbs-up. The result is a tool shaped around how you inspect, not a generic template.
From there the plan walks the agent through building the database, the AQL lookup logic for your standard, the inspector screens, the recommendation engine, the approval gate, email notifications, and the CSV export — each step ending in a ready-to-copy prompt.
The governance it includes (this is the point)
This isn't a throwaway spreadsheet — it's an auditable quality control. Built in from the start:
- Login so only your team can use it.
- Row-level security so people only ever see their own organization's lots and inspections.
- A complete audit trail — who entered the inspection, who approved the disposition, and exactly when.
- A hard human-in-the-loop approval gate — the tool drafts the accept/reject recommendation, but a quality lead must review and approve before the disposition (release or quarantine) is ever recorded.
- Duplicate guards so the same lot + inspection can't be processed or recorded twice.
Who it's for
QC inspectors who do the receiving check, quality managers who own the accept/reject call, and receiving teams who need the lot dispositioned fast and correctly. If you've ever read an AQL table off the wall and hoped you got the row right, this is for you.
You've got this — paste the first prompt and let the agent build it with you.