Inspiration
Many people who could benefit from digital services don't have smartphones. They rely on feature phones and USSD menus to access essential services.
Building a USSD application for every API is time-consuming, and guessing what an API can safely do is risky. Revenant solves this by turning existing APIs into USSD and SMS applications while refusing operations it cannot safely support.
What it does
Revenant accepts an OpenAPI 3.x specification or an MCP server's tool list.
It analyses the available operations, keeps only those within a small, documented subset, and compiles them into a menu-driven state machine made up of USSD screens. When a response is too long for a single USSD screen, SMS is used as a fallback.
Unsupported operations are listed as Buried, each with a specific refusal code and reason, such as R_FREE_TEXT, R_BINARY and R_DATETIME. Nothing is guessed or silently approximated.
Eight validators (V1–V8) check the compiled bundle against defined invariants.
The developer console, The Crypt, provides a view of the state graph, a screen inspector with character counts, validator results (Last Rites), and the list of refused operations. Séance provides a simulated USSD handset for testing the generated application.
How we built it with Kiro
Kiro was used both to structure development and as part of Revenant's actual compilation pipeline.
- Spec-driven development: Requirements, designs and implementation tasks for the compiler, runtime, validators and platform are documented in
.kiro/specs. The project contains 81 completed tasks. - Steering and hooks: Steering files establish project-wide development rules, while four agent hooks automate development activities. These include a property-test hook triggered by compiler saves.
- Property-based testing: The Kiro IDE agent implemented the runtime's stateful key-press property test (task 17, initiated through "Start task").
- Headless Kiro integration: During compilation, Revenant runs
kiro-cliwith a restricted custom agent (ussd-annotator). The agent can only write toannotations.jsonand connects to our validator MCP server. Kiro is responsible for annotations and labels only; the merge step cannot introduce new operations. - Evidence: We retained evidence of actual runs on 16 and 22 November, a prompt-injection test, and an attempted write outside
annotations.jsonthat was blocked by the agent's permission rules. Seedocs/KIRO_EVIDENCE.mdand.kiro/evidence/.
Challenges
- MCP startup timeouts: Starting the validator MCP server can be slow on a busy machine. Kiro timed out twice, so the application falls back to a deterministic annotator and explicitly reports when this happens.
- State graph rendering: The graph initially appeared blank because the error-exit state was positioned far outside the visible area.
- Fully refused specifications: The Buried operations table initially appeared empty when a specification contained no supported operations. Testing exposed both issues, and both have been fixed.
Limits
- USSD environment: Interactions currently run in an emulator labelled simulated handset.
- Demo upstream: The demonstration service and its PIN are mocked, not connected to a real booking system.
- Hosting: The hosted demo runs on a free tier. The first load after inactivity can take 30–60 seconds, and sample specifications are read-only.
What's next
My next priorities are to pass a longer Kiro startup timeout through the compilation stage and test generated applications on a real USSD gateways.
Built With
- docker
- fastapi
- kiro
- kiro-cli
- playwright
- python
- react
- render
- sqlite
- typescript
- vite