Inspiration

After the 2011 Tōhoku earthquake and again after the 2024 Noto earthquake in Japan, people who carried a medication list on paper could get the right medicine at shelters. Phone-only records did not help once batteries died and networks went down. The paper medicine notebook and the folded wallet card never went away for a reason, but they were left behind: handwritten, hard to read, in one language, and rarely updated.

I have egg and wheat allergies myself, so the question "what does a stranger need to know about me if I can't speak?" is a real one for me. Revenant Rx is my answer for the Resurrection category: bring the paper card back, and fix what made people stop using it.

What it does

  • You enter allergies (food or drug, with severity), current medicines (name, strength, dose, timing), conditions, an emergency contact and, if you want, a name, date of birth and blood type. Every field is optional.
  • Press Generate and an old yellowed card is "restored" into a crisp new one. You get a credit-card-size card, front and back, with a fold line and labels in Japanese and English, so a responder who reads either language can use it.
  • The QR code on the card holds the data itself as plain text, not a link. Any phone camera shows it with no network and no app, and it still works if this website disappears. In the demo I decode the QR from the card image with Apple's CoreImage to show exactly what a responder would see.
  • The app wears the Halloween costume (candlelight colors, a tombstone empty state: "Here lies your medication list. Last seen: never."), but the printed card never does. It prints black on white in large type, for a tired responder in a dark shelter.
  • Data stays in your browser's localStorage. There is no server, account or analytics. A service worker caches the app, so it opens and generates cards with no connection after the first visit (shown in the video with the network switched off).
  • The card prints its "last updated" date. The app reminds you to reprint when the saved data is 90 days old or more, or when you change a medicine. If the data is too long for one readable QR code, it says which fields to shorten instead of printing a code that will not scan.

How we built it with Kiro

I wrote a one-page brief and gave it to Kiro (kiro-cli chat). Everything is in the public repo under /.kiro.

Spec-driven development. Kiro turned the brief into requirements.md (11 requirement sections, 33 acceptance criteria), design.md (modules, the payload format, escaping rules and five correctness properties) and tasks.md (35 small tasks, each testable unit followed by its test task). Before any code was written, I ran a second Kiro session to fix the spec itself: short field codes such as ALG0 became readable keys like ALLERGY: because a person reads this text on a phone screen; the 90-day rule became one pure function, isStale(savedAt, now), so it could be tested; and the QR library became a vendored MIT package so the app has no build step. Changing the spec first was much cheaper than changing code later.

Steering. product.md, tech.md and structure.md held the rules that must not drift between sessions: the printed card is never spooky, no framework, no network, no build step, one job per module.

Property-based testing. The five properties in the design became fast-check tests: encode → decode round-trip (P-1), the payload always fits the QR limit or reports overflow (P-2), no field value can inject a new line (P-3) or a fake header/END (P-4), and staleness is monotone (P-5). With unit tests, npm test runs 40 tests and all 40 pass. These matter because a QR that decodes into the wrong medicine is worse than no card.

Agent hooks. Two hooks in .kiro/hooks: one runs the test suite whenever the encoder, decoder, QR or storage module changes; the other checks that the print stylesheet still produces a plain black-on-white card whenever print.css or card.js changes.

Stack: plain HTML, CSS and JavaScript modules, a vendored QR generator (qrcode-generator, MIT), a service worker and a web app manifest, hosted on GitHub Pages. Tests use Node's built-in test runner with fast-check.

Challenges

  • QR size. One person can have many medicines. The text format had to stay readable and still fit one QR code (version 25, error correction M, 997 bytes). The app checks this before drawing and tells you what to shorten.
  • A text format that cannot be broken. Names can contain |, newlines or the word END. The escaping rules and the P-3/P-4 property tests make sure no value can create a fake field.
  • Spooky app, plain card. The theme lives only in screen styles. A separate print stylesheet removes every color and decoration, and a hook checks it after each change.
  • Offline for real. Early on, the service worker kept serving old files after an update. Versioning the cache fixed it.

What I learned

Writing the spec with Kiro, and correcting the spec before the code, was the most useful step. Property-based tests let me state rules such as "no value can create a fake field" once and check them against many random inputs. And a safety tool should be boring where it counts: the part a responder reads is plain on purpose.

What's next

Test the printed card with people who take daily medicines and with shelter staff, add more languages for the labels, and add a simple way to print several family members' cards on one sheet. These are plans, not done work.

Credits and AI disclosure

Kiro generated the spec, steering files and application code. Claude (Anthropic, via Claude Code) reviewed Kiro's output, fixed bugs it found (the print view, hidden banners, the stale service-worker cache), wrote the two hook files in Kiro's hook format, and helped write the README, this text and the video captions. The sample data in the video is fictional. Revenant Rx does not give medical advice; the card holder is responsible for what is on the card. License: MIT.

Built With

Share this project:

Updates

Submission history