Some people can't speak and can barely move. Many of them can still press one switch. Dot-Dash lets them type in Morse code with that one switch, and the browser speaks the message out loud.
I built it alone for Kiroween 2026 (Resurrection category): the telegraph key from 1844, brought back as a voice.
- Try it: https://hussnain-butt.github.io/dot-dash/ (free, no login, nothing to install)
- Code: https://github.com/Hussnain-Butt/dot-dash (MIT)
- Video: https://www.youtube.com/watch?v=vt2H2i0CAqY
Turn your sound on and press the space bar: a quick tap is a dot, a press about three times longer is a dash. Key .-- .- - . .-. (WATER), pausing between letters, then .-.-, and the browser says "I need water".
This post is about building it with Kiro, and what I learned.
Why I used the terminal
The Kiro IDE doesn't start on my PC: Windows Smart App Control blocks one of its unsigned native modules. I kept that security feature on and built the whole project in the Kiro CLI, with the V3 engine (kiro-cli --v3).
What I noticed first: every file write and every git command asked for my approval, so I always knew what reached GitHub. (Near the end I allowed reads, writes and npm commands, and kept git manual.) Two terminal lessons:
-
/spec newworks only when typed inside the TUI. From the command line,kiro-cli chat --mode specstarts Kiro's Spec agent. - Send long prompts from a small
.cmdfile. Text pasted into the TUI inside an embedded terminal panel never reached Kiro.
Who wrote what: Kiro wrote every file in the repo. I used Claude Code to help write prompts and as a second reviewer. It never wrote app code, and its findings went back to Kiro as fix prompts.
Specs for the hard logic
A one-switch decoder sounds simple, but the timing is hard: a slow dot versus a quick dash, or a thinking pause versus a word break, for someone whose presses drift as they tire. So everything with subtle behaviour went through a spec before any code, and the rest were plain prompts.
The decoder spec has 11 requirements, and every acceptance criterion is in EARS form: WHEN something happens, THE system SHALL do something. This one lets a user undo with the switch alone:
### 8. Undo As a user who makes mistakes, I want to undo my last letter and my last word, each with one action. Acceptance criteria: 8.1 WHEN the user enters the Morse error prosign (eight dots, `........`), THE decoder SHALL delete the last emitted letter, so a one-switch user can undo with the switch alone. Kiro's first draft ended with seven open questions, and my answers became decisions: start at about 5 words a minute, learn dots and dashes as two weighted moving averages, and show □ for an unknown code.
Then Kiro wrote design.md: the formulas for the adaptive timing engine, the full Morse table, the undo rules and 12 properties for property-based tests. Before any code, I reviewed it with Claude Code as a second reviewer. The review found five bugs:
- J was coded as
.--., which is P. - The "ambiguous zone" spanned the whole gap between the dot and dash averages, and the more common symbol won there. A slightly short dash would have been read as a dot, and Kiro's own round-trip property would have failed.
- Every new symbol reset the "two erase signs in a row" flag, so undoing a word could never happen.
- A letter was committed only at the next press or after a long idle timer, so the R of WATER would have appeared seconds late. A pure
tick(now)fixed it. - The scale property allowed any factor, so fast timings would hit the 40 ms tremor floor and fail for no real reason.
Kiro fixed all five in one run for 6.31 credits. The whole decoder spec, from requirements to tasks, cost about 17.6 credits. My first lesson: on logic that is easy to get subtly wrong, read the design closely before anyone writes code, an agent included.
One quirk: Kiro saved this first spec to .kiro/spec/, but its own code reads .kiro/specs/. The folder was renamed outside Kiro, the only change in the repo that Kiro didn't make.
The second spec, speak-screen, has 7 EARS requirements for speech, six quick phrases, the timing store and the screen. Kiro's own Spec agent wrote it, and it ran a format validator on its files until they passed.
Hooks: rules Kiro can't skip
Steering tells Kiro what I want. Hooks check that it happened. I have two, and Kiro wrote both scripts.
The Stop hook runs npm run build (tsc && vite build) and then npm test at the end of every Kiro turn, and exits with an error if either fails. A broken task can't look finished.
The second hook protects a promise the app makes: no runtime network calls. This is the whole hook file, .kiro/hooks/block-network-calls.json:
{ "version": "v1", "hooks": [ { "name": "Block runtime network calls under src/", "trigger": "PreToolUse", "matcher": "^(fs_write|fs_append|str_replace)$", "action": { "type": "command", "command": "node .kiro/hooks/no-network-calls.mjs" } } ] } For any write under src/, no-network-calls.mjs scans the new text. If it finds fetch(, XMLHttpRequest, WebSocket, EventSource, sendBeacon or a URL import, it exits with code 2 and the write is blocked. Both hooks fired in real runs: in one run the guard checked 37 file writes, and the Stop hook ran the build and tests when the turn ended.
My second lesson: a steering rule is something I hope Kiro remembers. A hook makes it something Kiro can't skip.
Steering, one agent and four properties
There are 7 steering files. Five use inclusion always, because every task needs them: product, tech, structure, accessibility and the hackathon rules. Accessibility, for example, asks for 44 × 44 px targets and undo one action away.
Two use fileMatch. morse-timing.md loads only for src/morse/** and tests/**, and visual-design.md only for src/ui/** and tests/ui/**. The 1:3:3:7 timing ratios don't need to be in context while Kiro styles a button, and the palette doesn't while it tunes the decoder.
The custom agent, .kiro/agents/dot-dash.json, loads all seven steering files and the README. Its prompt says to work test-first and to finish one spec task, with passing tests and a clean build, before starting the next. Every December run used --agent dot-dash, except the deploy run and the Spec-mode run.
design.md defines 12 properties. On my credit budget I kept the four that guard the most: a round trip from text to Morse timing and back (P1), decoding with a learned timing (P2), no crash on random, out-of-order or negative timestamps (P3), and a round trip of the saved timing profile (P12). All four pass. This is P12, in fast-check:
fc.assert( fc.property(profileGen, (original: TimingProfile) => { const json = serializeProfile(original); const restored = deserializeProfile(json); expect(restored).toEqual(original); }) ); Kiro's first decoder tests used hand-worked timestamps, and five failed: one keyed B as three 240 ms presses, which is S. On Claude Haiku 4.5, Kiro kept changing the tests, and I cancelled the run after 24 minutes. Claude Code's review found the decoder right and the tests wrong. Kiro's fix was a keying helper that turns a Morse string such as .- -... into presses with ideal timing. The decoder tests and the properties use it.
In the browser, real key presses on a busy machine drifted by 50 to 70 ms and turned a dot into a dash ("WATTR"), so Claude Code's checks of the live app used Playwright's fake clock. The project ends with 181 Vitest tests.
Credits: the cheapest model wasn't the cheapest run
I worked on Kiro's Free plan (50 credits a month), plus the hackathon's 4,000 credits from 3 Dec, when December's free credits ran out. The whole project used about 167 credits.
kiro-cli chat --list-models shows each model's credit multiplier, and --model picks one per run. I used Auto, Claude Haiku 4.5, Claude Sonnet 4.5 and MiniMax M2.5.
MiniMax M2.5 runs at 0.25x, and it wrote my deploy workflow for 1.23 credits. Then I gave it a bigger task: four app modules. Five input-capture tests failed, because the input adapter called performance.now() directly and the tests couldn't control time. MiniMax went in circles for over 20 minutes, re-reading files and re-sending its growing context. It burned 21.5 credits and hit my monthly limit.
With the cause written into the prompt, Claude Sonnet 4.5 fixed the same problem for 5 credits. It added an optional clock to the input options and used a fake clock in the tests.
My rules for a small budget now:
- One Kiro task per prompt, test first.
- Put the cause in the prompt, not only the symptom.
- Stop a run once it is 50% past its estimate, whatever the model costs.
Honest limits and what's next
I haven't tested Dot-Dash with people who use AAC (augmentative and alternative communication), or with real assistive switches. An assistive switch that sends a space-bar press or a click should work like the space bar, but I don't own one, so that is untested. Testing with real users and real switches comes first. Next come the features I cut to fit 50 credits a month, starting with Urdu Morse and Urdu speech.
Dot-Dash is free, MIT-licensed and needs nothing but a browser. Try it at https://hussnain-butt.github.io/dot-dash/, and open the .kiro folder at https://github.com/Hussnain-Butt/dot-dash to see everything in this post. If you use AAC, or work with people who do, I would like to hear what breaks. I built Dot-Dash for Kiroween 2026: a technology from 1844, giving a voice back in 2026.
