Inspiration
Insurance denial letters are written to be hard to read, and the consequences of misreading them are real. In ACA marketplace plans, fewer than 1% of denied claims are appealed (KFF, 2024). In Medicare Advantage, only about 11.5% of denied prior authorization requests were appealed in 2024, yet about 80% of those appeals were partially or fully overturned (KFF). People don't lose because they're wrong. They lose because they don't know what the letter means, what to say, or when the deadline is.
What it does
Appeal Pilot turns a confusing denial letter into a plan you can act on today. Pick a sample letter (or upload a single-page one) and you get:
- A deadline banner first, with days remaining
- A plain-English explanation of why the claim was denied, with the jargon translated
- An Action Kit: a ready-to-edit appeal letter, a word-for-word phone script with replies to common objections, and a calendar (.ics) file with the deadline and reminders already set
Editing any fact or the deadline updates the letter and calendar instantly. Deadlines are labeled honestly: exact, estimated (for example "within 180 days of this notice", with the math shown), or missing, in which case you enter the date yourself.
How we built it
We used the Devpost Learn skills with Claude Code and wrote scope, PRD and spec documents before any code (they're in the repo's devpost/ folder). The stack is Next.js, TypeScript, Tailwind CSS, Zod and Vitest, deployed on Vercel. Two server routes call Gemini Flash: one reads the letter (image or one-page PDF) into validated JSON, and one writes the explanation and the kit. The key design rule is that the AI reads and writes, and code does the math: all date arithmetic is deterministic TypeScript, covered by unit tests.
Challenges we ran into
- Language models are unreliable at calendar math, so we moved every date calculation into tested code, with date-only arithmetic to avoid timezone off-by-one bugs.
- A relative deadline with an unreadable letter date must never be guessed, so it falls back to "missing".
- Letters are untrusted input: we added prompt-injection defenses, server-side file and page-count checks, rate limiting, and security headers.
- Model availability and traffic spikes: we added retries with backoff and a fallback model.
- Getting sample files and share-preview URLs to work on Vercel took more debugging than expected.
Accomplishments that we're proud of
- A complete, end-to-end flow: letter in, deadline on your calendar out
- A tested date engine and calendar generator (32 passing tests)
- Honest handling of uncertainty (estimated versus exact deadlines, editable facts, no outcome promises)
- A full pre-deploy audit that caught real issues, including a broken citation link
What we learned
Plan first, then build: the spec made it much easier to direct the coding agent without it breaking working parts. We also learned to give the AI only the language work and keep anything that must be exactly right in code, and to verify an agent's claims ourselves (a broken source link and several model names needed human checking).
What's next for Appeal Pilot
Multi-page letters, hospital bill line-item checks, state-specific external review guidance, PDF export, and explanations in more languages. Optional accounts to save cases would need encrypted storage before we'd add them.
Note: this demo uses synthetic letters only. Uploads are sent to an AI service for analysis, so please don't upload real medical information. Appeal Pilot provides guidance and templates, not legal or medical advice.
Built With
- claude-code
- gemini-api
- nextjs
- node.js
- pdf-lib
- react
- tailwindcss
- typescript
- vercel
- vitest
- zod
Log in or sign up for Devpost to join the conversation.