Skip to content

USM — Tutorial

This is the tutorial part of the USM — User Story Map guide. See also Short info and samples.

Pick one user and one outcome they need. You do not need to know the final screen design.

A traveler wants a confirmed reservation, rather than a search box, an API and a notification service considered separately. A story map keeps that whole outcome visible. Arrange the major activities in a meaningful order and place stories beneath the activity they support. A person joining the team should be able to narrate the journey from the map.

A persona describes a relevant kind of participant and their needs. An activity groups a substantial part of the journey; a story describes an outcome small enough to discuss and deliver. Acceptance criteria give examples of the conditions under which that story is satisfied. Avoid letting technical implementation tasks replace the user’s language at the top of the map.

For a first release, search can be basic, payment can be deferred and confirmation can be a simple page. The slice still needs a way to complete a reservation. A release containing only sophisticated search leaves the original user goal unfinished. Review the slice by walking a realistic example through every selected activity.

Keep exceptional journeys visible too. A traveler who finds no seats needs a useful next step; a support specialist may need to inspect an existing reservation. These cases can share parts of the map without sharing the same goal. Connect stories to screens and requirements after their meaning is clear. The story map explains why a capability matters; the linked models provide the detail needed to design and verify it.

A journey becomes a useful first release. Four activity cards form a journey; a release line selects one story per activity; optional features move to a later slice.

Pause and predict: Could the traveler complete the goal if confirmation were left for a later release?

This is the text storyboard for a proposed short illustrated film. The written walkthrough and exercises are available now; a published movie will be added after its scenes, captions and model references have been reviewed.

There is no model command — story maps are authored as .usm.json files under .contextbrew/usm/ (or on the Studio canvas). Create .contextbrew/usm/books.usm.json:

{
"kind": "usm-file",
"schemaVersion": "0.2.0",
"title": "Bookstore User Story Map",
"columns": ["Discovery", "Delivery"],
"releases": [{ "kind": "release", "id": "v1.0", "name": "MVP" }],
"personas": [
{
"kind": "persona",
"id": "P1",
"name": "Customer",
"stories": [
{
"kind": "user-story",
"id": "US-001",
"title": "Browse book catalog",
"priority": 1,
"column": "Discovery",
"release": "v1.0",
"acceptanceCriteria": [
{
"kind": "acceptance-criteria",
"id": "AC-US1-01",
"description": "Given books exist, when I view the catalog, then I see a list of books"
},
{
"kind": "acceptance-criteria",
"id": "AC-US1-02",
"description": "Given no books exist, when I view the catalog, then I see an empty state message"
}
]
}
]
},
{
"kind": "persona",
"id": "P2",
"name": "Admin",
"stories": [
{
"kind": "user-story",
"id": "US-002",
"title": "Add book to catalog",
"priority": 1,
"acceptanceCriteria": [
{
"kind": "acceptance-criteria",
"id": "AC-US2-01",
"description": "Given a valid ISBN, when I submit the form, then the book is added to the catalog"
}
]
}
]
}
]
}
Terminal window
ctxbrew usm validate .contextbrew/usm/books.usm.json

Coming from another tool? Featmap JSON and TextUSM-style indented .usm.md files import directly — see Import / export below.

The USM canvas provides a visual story mapping interface:

  1. Create persona columns across the top
  2. Add story cards under each persona
  3. Define acceptance criteria on each story card
  4. Drag stories into release swimlanes to plan delivery
  5. Link stories to DDD aggregates and CBRL requirements

Acceptance criteria are the bridge between user needs and generated tests. ContextBrew converts each criterion into a Gherkin scenario:

{
"kind": "user-story",
"id": "US-001",
"title": "Browse book catalog",
"acceptanceCriteria": [
{
"kind": "acceptance-criteria",
"id": "AC-US1-03",
"description": "Given I am on the catalog page, when I search for 'TypeScript', then only matching books appear"
}
]
}

This becomes:

Scenario: Search filters book catalog
Given I am on the catalog page
When I search for "TypeScript"
Then only matching books appear

Stories are grouped into releases for planning — the releases array names them, and each story’s release field places it:

{
"kind": "usm-file",
"schemaVersion": "0.2.0",
"title": "Bookstore User Story Map",
"columns": ["Discovery", "Delivery"],
"releases": [
{ "kind": "release", "id": "v1.0", "name": "MVP" },
{ "kind": "release", "id": "v1.1", "name": "Enhancements" }
],
"personas": []
}

Set "priority": 1 on the stories that must ship first — the field is part of the story record your teammates (and agents) read.

Terminal window
ctxbrew usm validate <file> # Parse the file; exit 1 on any error
ctxbrew usm stats <file> # Collection sizes (personas, stories…)
ctxbrew usm export <file> # Canonical DSL (or --format json|yaml)
ctxbrew usm import <file> # Canonicalization pass
ctxbrew usm diff <before> <after> # Semantic diff (report only)
ctxbrew schema usm # Print the normative JSON Schema

USM imports Featmap JSON and TextUSM-style indented .usm.md files, and exports the same indented text format — import → export → import is stable — plus a readable user-guide projection. The Spec Kit, Kiro, OpenSpec, BMAD, and spec-workflow-mcp workspace imports also produce USM story maps alongside CBRL requirements. Details: Import & Export.