I wrote this post as part of my entry to the Kiroween 2026 hackathon (Costume Contest category).
Live app: https://grave-recall.pages.dev/
Repository: https://github.com/Class-now/grave-recall
Demo video (2:05): https://youtu.be/oWstLmleS7A
The problem: "143 due" does not feel like anything
I am a second-year student of foreign languages at a university in Tokyo, and I study English and French at the same time. I know spaced repetition works. I still skip it.
The reason is not the algorithm. Every flashcard app I have used shows my backlog as a number in a red badge. "143 due" is abstract, so closing the tab costs nothing. What I wanted was an interface that made forgetting visible.
Forgetting is already a ghost story. Something you buried comes back when you stop paying attention. So for Kiroween I built Grave Recall: a spaced-repetition app where every word is a grave, and the words you are forgetting rise as ghosts.
One rule: no decoration without data
Before any code existed, I wrote one rule into the project's steering files and called it function-first horror:
Every spooky element must encode a real value from the memory model. If an effect cannot name its data source, it does not ship.
That rule killed my first concept (cobwebs, bats, lightning) in about ten minutes, because none of them could answer "what does this show?". What survived:
| Effect | Data it shows | Formula |
|---|---|---|
| Ghost opacity | Chance you have forgotten the word | clamp(1 − retrievability, 0.15, 0.95) |
| Ghost drift speed | How overdue the card is | grows with days past due |
| Tombstone cracks and moss | Card stability | pale and cracked when fragile, dark and mossy when solid |
| Fog | Your total debt | overdue ÷ all cards, clamped to 5–60% |
| Moon phase | Today's progress | reviews done ÷ daily goal |
| Crow's red eye | Your streak | lit from day three |
| Full-screen scream | Forgetting a word you knew well | a lapse when stability > 20 days |
Under the costume there is a real scheduler, an FSRS-style model with stability, difficulty and retrievability:
R(t) = exp(−ln(10/9) · t / S) With this constant, stability S is exactly the number of days after which recall probability drops to 90%. That makes the tombstones honest: a stone that looks solid really is a word you will probably remember next month.
The result is a graveyard you can read from across the room. You can tell which words are fading and how far behind you are without opening a single card.
Why Kiro CLI, and why headless
I used Kiro CLI for the whole project, run without a UI:
kiro-cli chat --no-interactive --trust-all-tools "Do Task 5 from .kiro/specs/grave-recall/tasks.md" An outer loop ran one spec task per invocation, then checked the diff with npm run typecheck, npx vitest run and npm run build before committing. I chose the CLI over the IDE for repeatability: the same prompt, the same steering, a clean exit code, and a diff I could check mechanically. If a task failed the gates, the next run got the failure output and nothing else.
All of the application code was written by Kiro. My job was the vision, the spec review and the gates.
Step 1: a spec that can be argued with
I started from a one-page vision document. From it, Kiro produced the three spec files in .kiro/specs/grave-recall/:
- requirements.md: 29 user stories in 9 epics, plus 3 non-functional requirements, each with numbered acceptance criteria in EARS notation.
- design.md: module boundaries, the data model, the scheduler math with 11 named weights, error handling, the testing strategy, and correctness properties P-01 to P-13.
- tasks.md: 14 ordered tasks, each listing its prerequisites and the acceptance criteria it satisfies.
EARS ("When the user grades a card, the system shall…") turned vague ideas into sentences that could contradict each other, and several bugs were caught that way, before any code. My favourite was an off-by-one hiding in plain sight: the scheduler's grades are 0–3, the keyboard's are 1–4. The requirements had to say both without contradiction, and the design ended up naming the store as the single place where the conversion happens.
The biggest benefit was traceability. When a test and the design disagreed, there was a numbered sentence to point at. I fixed the spec instead of arguing with the code.
Step 2: steering is where taste becomes rules
The project has four steering files, all inclusion: always:
-
product.md: the product pillars and the effect-to-meaning table. -
tech.md: stack, coding standards, the scheduler contract(CardState, Grade, Date) → ScheduleResult, and a dependency policy (exact pins, nothing that 20 lines can replace). -
structure.md: the directory layout and module rules, for example "src/scheduler/is an island and imports nothing from outside its folder". -
spooky-design-system.md: colour tokens with WCAG contrast guarantees, a type scale, 10 animations each with a reduced-motion substitute, 8 synthesised sounds each with a caption key, and the Effect-to-Data Master Table.
The fourth file mattered most. An agent cannot guess how transparent a ghost should be, and it should not have to. The file says opacity = clamp(1 − retrievability, 0.15, 0.95), so it does not guess. That is also why the visual language stayed consistent when I switched models between tasks.
My takeaway: steering beats prompting. Rules I would otherwise repeat in every prompt ("no audio files", "the scheduler imports nothing", "every effect needs a data source") were written once and held across every session and every model.
Step 3: property-based tests as a language for the agent
The design document defines 13 correctness properties, and Kiro implemented them with fast-check next to the code they guard. A few examples:
- Failing a card resets its interval to one day and increments lapses.
- Difficulty always stays in [1, 10] and moves in the right direction.
- Retrievability stays in [0, 1], decreases over time, and equals 1 at t = 0.
- Exporting and re-importing the whole app state gives an identical state.
The generators cover the full valid input space (stability from 0.01 to 365 days, all four card states, dates over ten years), so every run checks thousands of card histories I would never write by hand.
Here is the lesson I did not expect. "Implement the formula in §4.4" leaves room for interpretation. "For all card states, difficulty stays in [1, 10]" does not. Properties are a precise way to talk to an AI agent.
They also caught the spec being wrong. The design said Easy must always give a strictly longer interval than Good. Intervals are rounded to whole days, so at tiny stabilities the two can tie. fast-check found that case within seconds, and the property in the suite is now the honest one: Easy ≥ Good ≥ Hard. The code was fine. The sentence was wrong.
Step 4: agents, hooks, MCP and a power
Once the app worked, I asked Kiro to build the tooling around the spec, and that is in the repository too.
Two custom agents in .kiro/agents/:
-
gravediggeris the implementer. It loads the steering files and specs as resources and replaces--trust-all-toolswith explicit permissions: writes insidesrc/,public/anddocs/, plus the three gate commands. -
design-wardenis a read-only reviewer. Given a diff, it checks every visual or audio effect against the Master Table and reports three kinds of finding: an effect with no data source, a hard-coded colour or duration outside the tokens, and a sound with no caption key. It ends withVERDICT: PASSorFAIL.
Five hooks, with the scripts in scripts/kiro-hooks/:
- On spawn, the agent gets
git statusand the next unchecked task. - Before a write, one hook blocks imports from outside
src/scheduler/into the scheduler, and another blocks audio files, because every sound is synthesised. - After a write in
src/, a hook runs the type checker andvitest relatedon the changed file, and another checks that the English and Japanese locale tables have the same keys.
The guard logic has its own tests, and I watched the audio guard work for real: it stopped a write to public/probe.mp3. One practical note: hooks fire only on Kiro CLI's v3 engine, so headless runs need --agent-engine v3.
MCP: the Playwright MCP server, headless, so design-warden can open the served build and take a screenshot next to the code it reviews.
A power: powers/function-first-horror/ packages the reusable part of the project. It contains a generic steering file for the "every effect declares its data source" rule, a CSS token template, and the design-warden agent. Another spooky project can install it and get the rule together with the reviewer that enforces it.
Step 5: a second spec for the costume, and the one exception
The first build passed every gate and still looked wrong. The graveyard was a grid of stones inside a plain box, the fog was an opaque slab, and at 1280×720 the bottom of the scene was cut off. The rule had done its job too well: with nothing allowed that did not encode data, there was no night to put the data in.
I did not loosen the rule in a prompt, where the next session would forget it. I asked Kiro for a second spec, .kiro/specs/costume-polish/, with eight tasks (the page frame and title, the sky and hills, the gate and fence, layered fog, glowing ghosts, parchment cards with candles, the ledger, and fitting the scene into 720p), and for a new section in the design-system steering called Decorative backdrop. It draws a line that an agent and a reviewer can both check: scenery may exist without a data source only if it never moves and never changes with state. Anything that moves, glows, fades or makes a sound is still data. The sky, the hills and the dead trees are allowed to be just scenery. The ghosts are not.
Kiro ran the eight tasks one per invocation through the same gates. The suite grew from 411 to 633 tests as the new components brought their own, and the JavaScript stayed at about 31 KB gzipped. The exception made the rule stronger, because now it had a written edge instead of an unwritten one.
Working on a budget
I built the first half on Kiro's free tier of 50 credits a month. The steering files and the full spec cost 4.36 credits. Tasks 1–3 brought the total to 16.8. A cheaper model stopped mid-task twice, so I moved the mechanical tasks (utilities, i18n tables, the store, persistence) to Claude Haiku 4.5 and kept auto for the steering, the spec and the scheduler core, where reasoning quality matters.
The budget turned out to be a design tool. It forced me to write tasks small enough for a small model to finish, and small tasks are easier to review anyway.
Scary and accessible at the same time
A jumpscare is an accessibility problem by definition. Instead of one "turn off the fun" switch, Grave Recall has two independent ones:
- Reduced motion follows
prefers-reduced-motion, and every animation in the design system has a written substitute. - Coward mode replaces the scream with a soft chime and removes the flash, and changes nothing else.
Every one of the eight sounds has a caption in an ARIA live region, contrast meets WCAG AA, the whole app works from the keyboard, and the UI is available in English and Japanese. Fear is a user preference. Access is not.
Numbers
- 29 user stories, 14 tasks, 13 correctness properties, plus an 8-task costume spec
- 680 Vitest tests passing, including the fast-check properties
- 2 runtime dependencies (Preact and
@preact/signals) - About 32 KB of JavaScript, gzipped
- 0 audio files and 0 image assets for the scene: SVG and Web Audio synthesis only
- No account and no server: localStorage with JSON export and import
What does not work yet
- No sync. The graveyard lives in one browser's localStorage. JSON export and import move it by hand, and a cleared browser is a real graveyard.
- Default weights. The scheduler uses FSRS-style default weights, not ones fitted to my own review history. After a few months of reviews they should be tuned per user.
- One tester. I am the main user so far. The starter crypts (100 English and 50 French words) were written for this project, and the app has not met a classroom yet.
- Landscape first. The scene is composed for a window around 1280×720. On a narrow phone screen it works, but the graveyard gets cramped.
What I learned
- A spec is the cheapest place to find a bug. Two acceptance criteria that contradict each other cost one edit. The same contradiction in code costs a debugging session.
- Properties are prompts with teeth. They are precise, they are checked on every run, and they catch the spec as often as the code.
- Steering is a design system for agents. If your taste can be written as a table, an agent can follow it, and a reviewer agent can enforce it.
- Constraints make things distinctive. "No decoration without data" produced a stranger and more useful interface than free rein would have.
Try it
Open https://grave-recall.pages.dev/, pick the French or English starter crypt, and press Space. If a word screams at you, you knew it once.
The whole .kiro directory is in the repository: https://github.com/Class-now/grave-recall. Delete src/, replay the tasks, and Kiro should build the graveyard again.
Built for Kiroween 2026. #kiroween


