Skip to content

How it works

From an idea to a use case, to code, to production, and back to the map.

Applies to EngineCloud
View as Markdown
On this page
  1. One flow, from the idea to production
  2. Someone writes the use case
  3. The map is approved
  4. The code is written per case
  5. The check keeps code and map together
  6. The runtime runs it
  7. Production reports per case
  8. Changes go back to the map
  9. What lives where
Figure. Sypnia Cases in the middle of a project. The map is plain files; the server, the editor and the links read and write the same files.
  1. You, your team or your client write use cases, in the editor or as files.
  2. The map is stored as files in your repository and, in Sypnia Cloud, in the Cases server.
  3. Code is written per case from its generated skeleton; commits say which case they touch.
  4. The check compares the code with the map on every change.
  5. 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

  1. 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.

  2. The map is approved

    The new case is a proposal. The owner and the programmer approve it; the map gets a new version. That version is now the scope: building it is in scope, building anything else is not.

  3. The code is written per case

    npx @sypnia/cases generate writes 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.db to read and write, ctx.outcome('OrderPlaced', …) to end. Without Sypnorm, commits carry a trailer Case: order-for-tomorrow, and the check reads them.

  4. The check keeps code and map together

    cases check runs 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.

  5. The runtime runs it

    Each area runs as one service. Its starts become real: routes for in_app, endpoints for external, jobs for scheduled, subscriptions for event. 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).

  6. Production reports per case

    In Sypnia Cloud, every case shows how often it runs, how it ends, its errors and its latency, from Sypnia Telemetry. Real clicks confirm the navigation map. An ending or a path the map does not describe shows up as a gap.

  7. Changes go back to the map

    New ideas, bugs that reveal a missing failure, a client asking for more: each one starts as a proposal on the map, not as code.

What lives where

ThingWhere it livesWho can read it
The mapcases/ in your repository (open format); in Sypnia Cloud also in the Cases serveranyone with the files; in Cloud, the workspace’s members
Proposals, comments, approvalsthe Cases serverthe workspace’s members and invited reviewers
Links to Data, Telemetry, Git, Agentread live from those products, never copiedthe same people who can read those products
The outbox, deliveries and dead lettersthe sypnia_cases schema of your app’s own databaseyour app’s team, in the map and in Telemetry
  1. One flow, from the idea to production
  2. Someone writes the use case
  3. The map is approved
  4. The code is written per case
  5. The check keeps code and map together
  6. The runtime runs it
  7. Production reports per case
  8. Changes go back to the map
  9. What lives where

    Search pages, sections and terms