Skip to content

Screens and personas

An event model is not only about data. It also says who does each thing and what they see while they do it. This page explains the three ideas that carry that: actors, screens and policies.

Every row on a board belongs to an actor, so that the board always shows who does what. Studio has three kinds:

Kind What it represents
UI Actor A person using screens.
System Actor The system acting on its own. Each module has one, and it owns the module’s automations.
Chat Actor A conversation with an AI agent, given a system prompt.

In the Storefront, the UI actor is the Shopper. The shopper’s row holds the screens they see and the commands they ask for. The system’s row holds what the shop does without being asked, such as emptying the basket after checkout.

A persona describes one kind of person in the domain: who they are, what they want to get done, and which roles they hold. A UI actor on the board can be given a persona, which ties the row to a real person’s goals.

Acme Commerce has six personas:

Persona Part of the business What they do
Shopper Storefront Browses, fills a basket, checks out and follows orders.
Merchandiser Catalog Curates the catalog: decides what is sold, at what price and when a product is withdrawn.
SalesRep Sales Works incoming orders and may discount up to 15%.
SalesManager Sales Approves what a rep may not, and sees the pipeline.
Buyer Purchasing Chooses suppliers, submits purchase orders and receives the goods.
WarehouseClerk Warehouse Reserves, picks, packs, dispatches and counts stock.

Personas are useful far beyond the board. Specifications can be written as a persona, a screen preview can show a screen as that persona sees it, and a brainstorming conversation can speak as a persona.

A screen is what a person looks at and clicks. In an event model, a screen is tied to a slice in one of two ways:

  • On a state change, the screen is where the command is asked for. A button on the screen issues it.
  • On a state view, the screen shows what the read model holds.

The Checkout screen shows the draft built so far, and its buttons ask for the next steps. The board notices when a screen and a model do not fit: a command that no screen issues, a screen with nothing behind it, or a field that the read model does not hold.

Screens can be drawn in several ways, from a rough sketch to a working prototype:

  • Sketches, mockups and images capture an idea quickly.
  • A prototype is a real screen built from components, filled with data from the model.
  • A template gives a whole module or feature a common frame, so screens look like they belong to the same application.
  • The application’s UI profile decides how all of this looks: the component libraries, the styling and the ready-made blueprints.

Studio can preview a screen with sample data, so that a team can see the result before anything is built. Read more in Design screens.

A policy is a named rule that admits some callers and turns the rest away. Policies belong to the whole application. A command or a query, or a whole feature or module, asks for a policy by name.

A policy states a requirement, such as callers must hold the SalesManager role, and can add custom logic when a requirement needs more than roles or claims. The application’s roles and identity details are defined in the application’s settings, and personas hold the roles.

POLICY IsSalesManager PERSONA SalesManager PERSONA SalesRep COMMAND RejectOrder COMMAND RejectOrder EVENT OrderRejected DENIED Nothing recorded
In Acme Sales, RejectOrder asks for the policy IsSalesManager. The same request has a different outcome for each persona.

Studio uses these rules everywhere a model is examined:

  • A specification can name who is calling, and expect a command to be denied.
  • See as a caller shows which actions and data each screen offers a given caller.
  • A preview as a persona hides or disables what the persona’s policies do not allow, and says why.
  • A finding points at a command that reads recorded state but that nothing authorizes.