Phases, releasing and changing
Release a slice of work, and change what was released without rewriting it. We learn as we work, which is why the slices are small.
Release a Phase #
A Phase can be released only once it is proven: every story in it green, each Scenario with its tickets done and a passing run. A Phase with no stories has nothing proven, so it cannot be released. When something is not proven, Barnspek says what:
$ vendor/bin/barnspek release-phase --area-of-business=reservations
Barn: …/hotel
first bookings can't be released until it is proven. These aren't proven yet:
- guest: book-a-room-for-a-run-of-nights (story, expressed)
- guest: cancel-their-booking (story, rough)
Each scenario needs its tickets done and a passing run (scenario-bridge run).
Once everything is proven, release-phase lists what the release will lock, and asks before it goes ahead. --yes agrees without being asked.
$ vendor/bin/barnspek release-phase --area-of-business=reservations --yes
Barn: …/hotel
Releasing first bookings locks these, so they change only through an elaboration afterwards:
- phase: first bookings
- role: guest
- story: book a room for a run of nights
- scenario: book a room for three nights
- subject: room
- fact: is-available
- subject: booking
- fact: is-confirmed
- action: book a room for three nights
- action parameter: nights
Phase released: first bookings (reservations)
Start the next one with: create-phase --area-of-business=reservations --title=... --meaning=...
The next Phase can then begin. Only one Phase per area of business is being built at a time, so a new one can be made only after the active one is released.
$ vendor/bin/barnspek create-phase --area-of-business=reservations \
--title="changing plans" --meaning="guests can cancel"
Barn: …/hotel
Phase created: changing plans
id: 01a1cb3e-…
Change a released story #
A released story’s wording and Scenarios no longer change directly. Asking Barnspek to change them tells you what to do instead:
$ vendor/bin/barnspek reword --area-of-business=reservations \
--story=book-a-room-for-a-run-of-nights --goal=zzz
Barn: …/hotel
Story 'book-a-room-for-a-run-of-nights' is released, so its wording no longer changes directly. Elaborate it in the open Phase instead: barnspek elaborate-story --area-of-business=reservations --story=book-a-room-for-a-run-of-nights --goal=... --reward=...
That is an elaboration: the story, opened in the Phase being worked on now. It can reword the story, add Scenarios, amend a Scenario (a whole new case that replaces the old one) and retire a Scenario that no longer holds. Each story has at most one elaboration per Phase.
$ vendor/bin/barnspek elaborate-story --area-of-business=reservations \
--story=book-a-room-for-a-run-of-nights --goal="book a room for any run of nights"
Barn: …/hotel
Elaborated book-a-room-for-a-run-of-nights in changing plans.
Add or amend its Scenarios with create-scenario ("elaboration": true, or "amends": "<scenario>"),
or retire one with: retire-scenario --area-of-business=reservations --story=book-a-room-for-a-run-of-nights --scenario=...
It is merged into the story when the Phase is released.
- Add a Scenario:
create-scenario --file=…, with"elaboration": truein the JSON. - Amend a Scenario: the same, with
"amends": "<scenario slug>". - Retire a Scenario:
retire-scenario --area-of-business=… --story=… --scenario=…. - Undo a pending change:
withdraw-from-elaboration.elaborate-story --revisechanges the wording of an elaboration already open.
Until its Phase is released, the released record stays as it was. scenario-bridge run-all --released, which runs
the Scenarios of the released Phases, skips any that are being amended or retired, so those Phases stay green while the new
behaviour is built. When the Phase is released, the elaboration is merged into the story. Its additions and amendments hold from then on, what it retired stops
holding, and what it replaced is kept as history. An elaboration that only rewords or retires has nothing to build, so it never holds
its Phase back; one that adds or amends must be proven like any other work.
Record impact #
A story’s Scenarios prove its goal. Its impact says whether its reward followed. It is recorded for each Phase the story shipped in, as a dated, attributed observation, in one of four states:
| State | Meaning |
|---|---|
evaluating | Released, but too early to say. This is never stored: a released story with no answer is evaluating. |
achieved | The reward was delivered. |
none | The story works as specified, and did not deliver its reward. |
superseded | The reward no longer matters: the need moved on, or another story answers it. |
List the released stories whose reward nobody has settled, then record what was observed:
$ vendor/bin/barnspek outstanding-impacts --area-of-business=reservations
Barn: …/hotel
1 released story has a reward nobody has settled yet:
first bookings — book-a-room-for-a-run-of-nights: evaluating
Record what was observed with: record-impact --area-of-business=reservations --story=... --phase=... --state=... --observation=... --source=... --who=...
$ vendor/bin/barnspek record-impact --area-of-business=reservations \
--story=book-a-room-for-a-run-of-nights --state=achieved \
--observation="A returning guest booked a room in one visit" \
--source=on-their-behalf --who="the front desk manager"
Barn: …/hotel
Recorded the impact of book-a-room-for-a-run-of-nights in first bookings: achieved.
--source | Who says so |
|---|---|
role | The role itself. |
on-their-behalf | Someone speaking for the role: a client, a manager, a support desk. |
measured | A measure, such as analytics or logs. |
team | The team. |
achieved is settled only when the role, or someone speaking for them, says so. From a measure or the team it
reads “achieved, awaiting the role’s word” and keeps being asked about. none and superseded are settled
whoever says them. Once settled, an impact takes no more observations. If value later slips, that is a failing Scenario or a new
elaboration, never a reopened impact.
$ vendor/bin/barnspek outstanding-impacts --area-of-business=reservations
Barn: …/hotel
Every released story of 'reservations' has its reward settled.