runbookify
← All plans
Compliance, Quality & Risk / Incident & Near-miss Reporting

Near-miss Trend & Heatmap Dashboard: See the Next Incident Before It Happens

Turn your incident and near-miss log into trends, a location-and-category heatmap, and an AI-drafted hotspot watch list for the safety committee — with your EHS manager approving the narrative before it ships in the committee pack.

BeginnerAn afternoonBuilds onNext.jsSupabaseResend
What you'll build

A web tool where you import your incident and near-miss log, the app computes trends and a location/category heatmap, AI drafts a hotspot watch list and trend narrative, your EHS manager edits and approves it, and the tool publishes a committee dashboard, emails a monthly digest via Resend, and exports the aggregated trend CSV.

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 Supabase account (free)
  • A Vercel account (free)
  • A Resend account (free)
  • Your incident / near-miss log as a CSV or Google Sheet (date, area, type, severity, cause)
  • Optional: hours-worked or headcount by area, if you normalize by exposure
  • Claude Code or any AI coding agent

The problem this kills

Your incident and near-miss log is full of signal, and almost none of it reaches the safety committee in time to matter. Every month someone exports the log into a spreadsheet, builds the same pivot tables by hand, eyeballs which areas had more events than usual, and pastes a few charts into a deck the night before the meeting. By the time leadership sees the trend, it's a lagging metric — the thing already happened.

Worse, near-misses get buried under recordables, so the early warnings (the slip that didn't cause a fall, the guard that was found open) never get the spotlight they deserve. Hotspots emerge slowly across area, shift, and cause, and a human staring at a flat spreadsheet rarely catches the pattern until it's a claim. You don't need a six-figure EHS platform to fix this, and you don't need to be a developer.

What you'll build

A simple internal web tool. You import your incident / near-miss log — the columns you already keep: date, area, type, severity, and cause — from a CSV or Google Sheet. The tool dedupes on incident ID, separates near-miss from recordable events, and computes the trends that matter: frequency by area, by type, by time of day, and by severity, with each period compared to the prior one so rising trends light up. If you have hours-worked or headcount, it normalizes by exposure so a busy area isn't unfairly flagged. It renders a location-and-category heatmap you can actually read at a glance.

Then AI drafts a plain-language trend narrative and a hotspot watch list of emerging areas to watch — clearly marked as a draft. Your EHS manager reviews it, edits the wording, and clicks Approve. Only then does the tool publish the committee dashboard, email a monthly committee digest via Resend, and let you export the aggregated trend CSV.

What's inside the Implementation Plan

The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — how you log incidents today, what your area/type/severity/cause values actually are and how they're named, whether you track hours by area, how you define near-miss versus recordable, your typical and peak event volumes, your reporting cadence, and your messy edge cases — and then it tailors the data model, the trend math, and every later step to your answers. This is not a generic template; the agent reflects a short spec back to you and waits for your thumbs-up before it builds anything. From there it walks the agent through the import, the dedupe-and-classify logic, the trend and heatmap computation, the AI-drafted watch list, the EHS review-and-approve screen, the published dashboard, the Resend monthly digest, and the trend CSV export — each step with a ready-to-copy prompt. There's also a fallback so you can build the whole thing today even with no API to your incident system.

The governance it includes (this is the point)

This is real safety reporting that goes to leadership, so it ships with the controls a serious EHS function needs: login so only your team can use it, row-level security so you only ever see your own organization's incidents, a complete audit trail of who edited and approved which narrative and when, a hard human-approval gate so the AI-drafted watch list and trend story can't be published or emailed until your EHS manager signs off, and duplicate guards keyed on incident ID so the same event can't be counted twice and quietly inflate a trend. The AI narrative is always clearly marked as a draft until a person approves it.

Who it's for

EHS managers and safety committees who report trends to leadership and want to act before the lagging metrics move. If you can describe how your team logs an incident and what "a bad month in the warehouse" looks like, you can build this.

You've got this — start with the plan, paste the first prompt, answer the interview, and you'll watch your first heatmap and hotspot watch list take shape the same afternoon.

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.