Inspiration
Every Halloween creature is stitched together from parts that were never meant to meet. We asked: what if a virtual pet was stitched together the same way — not from body parts, but from live, incompatible APIs? A cryptocurrency market for a heart. The weather over your house for a face. The actual air you are breathing, in his lungs. And — the rule that makes him a creature instead of a dashboard — when an API dies, the organ dies with it, in public. Pete never fakes a reading.
What it does
Patchwork Pete is one shared pet who moves in with each visitor. You choose where he lives — any country or city on Earth, your own location, or a capital — and from that moment his mood is that place's real weather and his breathing is that place's real air quality.
He is built for the people who live among dashboards — makers, developers, the weather-app checkers and portfolio watchers — and turns the feeds they already follow into one living, glanceable creature. Pete coughs when your air turns bad: a signal you feel before you parse a number. His stomach mirrors your own GitHub output for the day. His heart is the market, beating under his stage whether you watch it or not. And because every reading is labelled with the source that actually served it — and a dead source greys the organ instead of being papered over — Pete is also a small, honest instrument: an ambient display that can only ever show you the truth as its sources reported it.
- Heart — Bitcoin's market (CoinGecko, with labelled Coinbase and Kraken fallbacks) sets the tempo of the gold ECG line under his stage.
- Face / Mood — live weather where he lives (Open-Meteo, with MET Norway and wttr.in fallbacks), down to condition, temperature, wind, humidity and pressure.
- Lungs — real air quality where he lives (Open-Meteo Air Quality): PM2.5, PM10, US and EU AQI. Bad air makes Pete cough, wraps his chamber in smoke, and drops his breathing score.
- Brain — Wikipedia feeds him one fact at a time; Teach Pete stitches in a new one, and he remembers what he learned this visit.
- Stomach — GitHub commits are his food. His keeper commits his Lab Journal — real readings from his own live site — back into his own repository several times a day, so the creature literally eats his own documented life.
- Voice — your browser's speech synthesis, pitched down deep and haunted, speaking lines computed from his real state.
- Diary — written from his computed state, and always labelled with its true source.
A four-step guided tour walks a first-time visitor through all of it, then the Data Menu opens every organ's actual reading — the numbers, the source that served them, when they were read, and a stale badge when a reading is a last-good one on loan. The first time all five organs read alive in a visit, lightning strikes his chamber: IT'S ALIVE! It can never fire while an organ is dead — Pete does not pretend.
How we built it
A single Node.js + Express service with zero build step. Each organ is an isolated adapter behind one reading interface ({ organ, source, ok, data, error, fetchedAt }); a deterministic, pure-function state engine turns readings into scores — the same readings in, the same Pete out, verified by 79 automated tests, including a property-based suite that fuzzes the engine with randomized readings. Language models may narrate (the diary); code decides. Every outbound call is timed, retried with backoff, cached per organ, and served stale-while-error with its original timestamp rather than replaced by an invention.
The hard lesson of the build: from a shared cloud IP, primary APIs rate-limit you into the ground — CoinGecko, Open-Meteo and unauthenticated GitHub all failed persistently from our host while working fine elsewhere. The fix became a feature: every organ now carries labelled fallback sources, and the Specimen Ledger on the page names the exact source that served each reading. Provenance is part of the exhibit.
The interface is a "Liquid Glass Manor": glass panels over OLED black and midnight blue, black-and-gold typography (Playfair Display / Inter), a synthesized soundscape — wind, a rare bell, and an original music-box melody generated live in Web Audio, no audio files — and a spooky voice, all synthesized in the browser.
Challenges we ran into
- Shared-IP rate limits (above): solved with retries, stale-while-error, per-source fallbacks, and a background refresher — plus the honesty rules that make a degraded reading visible instead of hidden.
- A stomach that reads GitHub: the events feed no longer carries commit lists, so the adapter finds today's pushed repos from the feed, then counts real commits per repo through the commits API — with an explicitly labelled per-push fallback when that API refuses.
- "Today" is a local idea: the stomach counts commits in the local day of wherever the visitor housed Pete, so the cache is keyed by timezone and midnight is computed per zone.
- Design discipline: a design-intelligence pass (contrast ratios, 44px touch targets, SVG iconography, focus visibility) initially suggested a playful orange theme for "a virtual pet". We documented in the repo's DESIGN.md why that was rejected — the tool advises; the creature's locked gothic-luxury direction decides.
Accomplishments we're proud of
- A pet whose failure modes are the feature: dead organs go grey, Pete limps, and the error text is the real one.
- Labelled multi-source fallbacks with on-page provenance for every reading.
- The Lab Journal loop: Pete's stomach eats commits that are his own journal — a closed, honest circle between the site and its repo.
- 79 passing tests, including a per-adapter dead-organ simulation (each source killed locally: Pete limps, the part greys, the diary names the loss), honesty tests (fields a source did not return are absent from the page, never filled in), and a property-based suite (fast-check) that throws 2,500 randomized organ readings at the state engine and holds it to its invariants on every draw.
- A fully synthesized haunted soundscape (wind, bell, original music-box melody) and voice — zero audio assets.
What we learned
That "sewn from incompatible APIs" is not a metaphor but an engineering discipline: one strict interface, deterministic state, and a refusal to paper over failure will carry a creature made of seven strangers' data. And that honesty, done visibly, reads as craft to a visitor — the stale badge and the grey organ build more trust than a green checkmark would.
What's next for Patchwork Pete
- NASA FIRMS fire hotspots wired into the lungs, so Pete coughs at real wildfires near his home, not only at city pollution.
- An AI-written diary (Gemini) narrating his computed state — the adapter and labelling already exist; it needs only its key.
- More organs to stitch on: a seismic skin that trembles with real earthquakes near his home is first in line.
How Kiro was used
Patchwork Pete was built entirely with the Kiro CLI on a headless server — no IDE, no GUI. The repository's /.kiro directory is not decoration; every piece of it was exercised in live sessions, and two of the sessions below changed the project in ways we did not expect.
Spec-driven development. Pete was specified before he was coded: two specs (organ-adapters, pet-state-model), each with requirements, design and a task list, written against the steering rules. On December 1 both specs were re-run through live Kiro CLI sessions — the agent re-read each spec against the shipped code and reconciled the drift it found. There was real drift, in both directions of honesty: the lungs adapter had gained a WAQI fallback in code that the spec still forbade ("the lungs SHALL have no fallback sources"), and the state model's design doc had never caught up with the awaiting-home state the code implements as its first priority. The specs are now exact, and every task in both is checked — by the agent, in session, with the test suite green. Against vibe coding, the difference was concrete: drift between intent and implementation became a findable defect with a checklist, not a feeling.
Steering. One steering doc, stitch-architecture.md, binds every change: one organ, one adapter; no organ may fake a reading; every fallback is labelled with the source that actually answered; deterministic state — models narrate, code decides. The strategy that made the biggest difference was making the honesty rules constitutional rather than per-prompt: in the December 1 reconciliation, the agent preserved WAQI's null timezone in the spec precisely because the steering doc forbids inventing fields a source did not return.
Custom agents. The repo ships a workspace agent, .kiro/agents/pete-keeper.json — Pete's keeper. It carries the steering doc as a loaded resource and an honesty-first prompt, and it ran the December 1 sessions, including the property-based testing work below.
Agent hooks — including the one that didn't work. The repo also carries an IDE-format hook (organ-tests-on-save.kiro.hook, run npm test when an organ file is edited). We tested it live in the CLI and it does not fire there — the CLI engine does not process .kiro.hook files, and the repo's hook README now says so plainly. The CLI-native form of the same workflow lives in the keeper agent: a postToolUse hook that runs the full test suite after every file write. That one is verified, not asserted: in a session where the agent was explicitly forbidden from running any command, it edited src/organs/stomach.js — and the hook ran the suite on its own, 74/74, with the verification recorded in that session's own commit message. The session also taught us the hook's default 10-second timeout is too short for a real suite; the shipped config sets 60.
Property-based testing. The state engine is pure and deterministic, so it is property-tested with fast-check: randomized organ readings are generated in the real adapter shape, and the invariants must hold for every draw — the overall state is always a known state; scores are null (awaiting) or within 0–100; a dead organ always greys its part and makes Pete limp; an awaiting organ always wins (awaiting-home) no matter what the other organs report; and the same readings in always produce a deep-equal Pete out. 79 tests pass in total — and writing the properties taught us something the unit tests never had: our first generator, not the engine, was wrong (fast-check's date generator produced invalid dates), which is exactly the kind of false alarm property-based testing exists to separate from real defects.
What we deliberately did not use. MCP and Kiro Powers played no part in this build: the project's work — API adapters, a pure state engine, a static front end — never needed external tool extension, and bolting MCP on for the write-up would have been decoration. We would rather show five Kiro features used for real than seven used for show.
Built With
- coingecko
- express.js
- github-api
- javascript
- kiro
- node.js
- open-meteo
- render
- web-audio-api
- web-speech-api
- wikipedia-api
