How it works
From an idea to a use case, to code, to production, and back to the map.
- You, your team or your client write use cases, in the editor or as files.
- The map is stored as files in your repository and, in Sypnia Cloud, in the Cases server.
- Code is written per case from its generated skeleton; commits say which case they touch.
- The check compares the code with the map on every change.
- The runtime runs each area and sends outcomes on; Telemetry reports each case, so the map shows how each flow behaves.
One flow, from the idea to production
Someone writes the use case
The bakery owner writes, in the editor: «A customer orders bread for tomorrow and picks it up in the morning.» Cases turns it into a case: an actor (customer), a goal, how it starts (in the app, at «Shop › Order for tomorrow»), how it ends (
OrderPlaced) and the first failure she thinks of: that bread is sold out. A programmer or the coding agent fills in the details: the payload types, the data it reads and writes, who is allowed.The code is written per case
npx @sypnia/cases generatewrites the case’s skeleton from the file: its typed input, its outcomes and failures, the tables it may touch. A person or the agent writes the rules inside, with Sypnorm:ctx.dbto read and write,ctx.outcome('OrderPlaced', …)to end. Without Sypnorm, commits carry a trailerCase: order-for-tomorrow, and the check reads them.The check keeps code and map together
cases checkruns in the terminal and in CI. It fails when the code does something no case says (a scope error), when a promised case is not built, when code and case disagree (drift), when a case has no way to start, and when events form a loop nobody said how to stop.The runtime runs it
Each area runs as one service. Its starts become real: routes for
in_app, endpoints forexternal, jobs forscheduled, subscriptions forevent. Each outcome goes back to whoever waits, to every case that listens (through an outbox saved with the data), and always to Telemetry (Running cases).
What lives where
| Thing | Where it lives | Who can read it |
|---|---|---|
| The map | cases/ in your repository (open format); in Sypnia Cloud also in the Cases server | anyone with the files; in Cloud, the workspace’s members |
| Proposals, comments, approvals | the Cases server | the workspace’s members and invited reviewers |
| Links to Data, Telemetry, Git, Agent | read live from those products, never copied | the same people who can read those products |
| The outbox, deliveries and dead letters | the sypnia_cases schema of your app’s own database | your app’s team, in the map and in Telemetry |