Changes in 1a81ad1

1a81ad1 Add break: pause an item's work and resume it later (#299)

main workflow run

vs cb46232 Let an entity unset a defaulted key with none (#301)

6 new65 unchanged1 volatile

Full gallery

breaks Examples new

examples/breaks.nowline
nowline v1

// Breaks: work that pauses and resumes. Search, wallet and observability
// work each stop for a stretch while other waves run, and the warehouse
// migration waits on a legal sign-off (the `legal` anchor). A `break` is a
// line under an item: it takes two of after:, before: and duration:, and the
// item keeps its total duration. Details live in specs/break.md.

roadmap marketplace-release "Marketplace release" author:"Product Engineering" start:2026-01-05 scale:1w calendar:full

wave foundations "Foundations"
wave build "Build"
wave launch "Launch"
wave harden "Harden"

anchor legal "Legal sign-off" date:2026-02-23

swimlane platform "Platform"
  item auth "Auth service split" duration:3w wave:foundations status:done
  item payments-api "Payments API v2" duration:6w wave:build status:in-progress remaining:60%
  item rate-limits "Rate limits" duration:2w wave:launch
  item failover "Regional failover" duration:3w wave:harden

// Two weeks in Foundations, then nothing until Launch opens, two weeks in
// Launch, then nothing until Harden opens. The work after each pause belongs
// to the wave that ends it.
swimlane web "Web"
  item search "Search rebuild" duration:6w wave:foundations status:in-progress
    break after:2w before:launch
    break after:2w before:harden

// The first 5w are the last work in Foundations, so the pause opens no gap:
// one plain bar that crosses the Foundations/Build boundary.
swimlane mobile "Mobile"
  item wallet "Wallet integration" duration:9w wave:foundations status:in-progress
    break after:5w before:build
  item store-release "App store release" duration:4w wave:launch

// No wave: background work. The pause only times the resume.
swimlane ops "Ops"
  item observability "Observability rollout" duration:6w status:in-progress
    break after:3w before:launch

// A pause held by an anchor: 2w of work, then nothing until legal signs off.
swimlane data "Data"
  item warehouse "Warehouse migration" duration:5w status:in-progress
    break after:2w before:legal
  item dashboards "Dashboards" duration:2w

milestone beta "Beta" after:build
milestone ga "GA" after:harden

break-pairs Tests new

tests/break-pairs.nowline
nowline v1

// Fixture for every valid break pair (specs/break.md §3.4). Stresses: how
// each pair of after:, before: and duration: places a pause. Every item is
// 4w of work (the sized one is 4w of effort) alone in its own lane, so the
// stretches line up against the same date columns.
//
// What to look for when rendering this:
//   - Each lane shows two stretches (three for "Both references") joined by
//     a dotted line, and the work adds up to 4w.
//   - The pause starts and ends where the pair says: on the dated anchors
//     "review" (Jan 19), "mid" (Feb 2) and "ship" (Mar 2), after 2w of work, 1w before the
//     end of the work, or a fixed 3w after the stop.
//   - "Offset past the work" has no gap: its stop is past the end of the
//     work, so it is one plain bar (the collapse cases are in
//     break-collapse.nowline).
//
// Error pairs (each is NL.E1200 to NL.E1205, so they stay comments):
//   break after:1w before:1w              // two split points in the work
//   break before:1w after:review          // two stop points
//   break after:1w duration:1w before:2w  // all three keys
//   break after:1w                        // one key
//   break size:2w duration:1w             // size is not a pause key
//   break after:1w before:next-ship       // a milestone with no date

roadmap break-pairs "Break pairs" start:2026-01-05 scale:1w calendar:full

anchor review date:2026-01-19
anchor mid date:2026-02-02
anchor ship date:2026-03-02

size l effort:4w

swimlane l1 "after offset, duration"
  item offset-duration "Stop after 2w, pause 3w" duration:4w
    break after:2w duration:3w

swimlane l2 "after offset, before ref"
  item offset-ref "Stop after 2w, resume on ship" duration:4w
    break after:2w before:ship

swimlane l3 "before offset, duration"
  item left-duration "Stop with 1w left, pause 3w" duration:4w
    break before:1w duration:3w

swimlane l4 "after ref, duration"
  item ref-duration "Stop on review, pause 2w" duration:4w
    break after:review duration:2w

swimlane l5 "after ref, before ref"
  item both-refs "Stop on review, resume on ship" duration:4w
    break after:review before:ship

swimlane l6 "duration, before ref"
  item duration-ref "Pause 2w, resume on mid" duration:4w
    break duration:2w before:mid

swimlane l7 "Date stop"
  item date-stop "Stop on a date" duration:4w
    break after:2026-01-19 duration:2w

swimlane l7b "Date resume"
  item date-resume "Resume on a date" duration:4w
    break after:2w before:2026-03-02

swimlane l8 "Sized, percent"
  item percent "Half the effort, then 1w off" size:l
    break after:50% duration:1w

swimlane l9 "Both references"
  item three "Two pauses" duration:4w
    break after:1w before:review
    break after:1w before:ship

swimlane l10 "Offset past the work"
  item plain "Stop past the end" duration:4w
    break after:10w duration:1w

break-collapse Tests new

tests/break-collapse.nowline
nowline v1

// Fixture for collapsed breaks (specs/break.md §4.2). Stresses: a break that
// opens no gap draws nothing, and moves no pixels. Each item below has a
// break, and each draws as ONE plain bar with normal rounded corners, no
// seam, no dotted line and no extra tooltip line, exactly as the "Plain bar"
// control does. Items outside a wave draw hatched, as background work.
//
// What to look for when rendering this:
//   - Every lane is one plain bar. A pause that covers the start only
//     delays it: "Pause over the start" begins a week late, "Two pauses
//     over the start" two weeks late (the second extends the first).
//   - "Wallet integration" crosses the Foundations/Build boundary as one bar:
//     its break collapses, yet the last 4w belong to Build (specs/break.md
//     Example 2), so Foundations closes at 5w, not 9w.
//   - "Tail hold" stays inside Foundations: a pause that names a wave but
//     comes after all the work moves nothing.
//
// What collapses:
//   offset past the work    break after:10w duration:1w
//   stop at the end         break after:4w duration:1w
//   resume before the stop  break after:2w before:2026-01-12
//   pause over the start    break before:4w duration:1w
//   pauses over the start   break before:4w duration:1w  (twice: extends)
//   a pause at the start of an after: date

roadmap break-collapse "Collapsed breaks" start:2026-01-05 scale:1w calendar:full

wave foundations "Foundations"
wave build "Build"

swimlane control "Plain bar"
  item plain "Plain bar" duration:4w

swimlane past "Offset past the work"
  item past-work "Offset past the work" duration:4w
    break after:10w duration:1w

swimlane at-end "Stop at the end"
  item stop-end "Stop at the end" duration:4w
    break after:4w duration:1w

swimlane before-stop "Resume before the stop"
  item resume-early "Resume before the stop" duration:4w
    break after:2w before:2026-01-12

swimlane over-start "Pause over the start"
  item start-gap "Pause over the start" duration:4w
    break before:4w duration:1w
  item two-windows "Two pauses over the start" duration:4w
    break before:4w duration:1w
    break before:4w duration:1w

swimlane dated-start "Pause over a dated start"
  item dated "Pause over a dated start" duration:3w after:2026-01-19
    break duration:1w before:2026-01-26

swimlane moves "Moves membership"
  item wallet "Wallet integration" duration:9w wave:foundations status:in-progress
    break after:5w before:build

swimlane stays "Pause after all the work"
  item tail "Tail hold" duration:3w wave:foundations
    break after:3w before:build

break-waves Tests new

tests/break-waves.nowline
nowline v1

// Fixture for breaks across waves (specs/break.md §9 Examples 1, 2 and 4;
// the approved waves mock). Stresses: per-stretch wave membership.
//
// What to look for when rendering this:
//   - "Search rebuild" is three stretches on one row (Foundations, Launch,
//     Harden), the title wrapped inside the first and the later two bare,
//     joined by a dotted line along the bottom edge.
//   - "Wallet integration" is ONE plain 9w bar with normal rounded corners:
//     its break opens no gap (Foundations closes when the first 5w end), yet
//     the bar crosses the Foundations/Build boundary because its last 4w are
//     members of Build.
//   - "Observability rollout" is unwaved background work: two hatched
//     stretches, its caption spilled into the first gap, no wave held open.
//   - Wave boundary marks cross the hatched stretches, never the gap.

roadmap breaks-waves "Breaks across several waves" start:2026-01-05 scale:1w calendar:full

wave foundations "Foundations"
wave build "Build"
wave launch "Launch"
wave harden "Harden"

swimlane platform "Platform"
  item auth "Auth service split" duration:3w wave:foundations status:done
  item payments "Payments API v2" duration:6w wave:build status:in-progress remaining:60%
  item rate-limits "Rate limits" duration:2w wave:launch
  item failover "Regional failover" duration:3w wave:harden

swimlane web "Web"
  item search "Search rebuild" duration:6w wave:foundations status:in-progress
    break after:2w before:launch
    break after:2w before:harden

swimlane mobile "Mobile"
  item wallet "Wallet integration" duration:9w wave:foundations status:in-progress
    break after:5w before:build
  item store "App store release" duration:4w wave:launch

// No wave: background work. before:<wave> only times the resume.
swimlane ops "Ops"
  item obs "Observability rollout" duration:6w status:in-progress
    break after:3w before:launch

break-anchors Tests new

tests/break-anchors.nowline
nowline v1

// Fixture for breaks resumed by anchors (specs/break.md §9 Example 3; the
// approved anchors mock). Stresses: a pause that ends on a dated anchor.
//
// What to look for when rendering this:
//   - "Warehouse migration" is three stretches on one row (2w, 2w, the last
//     1w); each pause ends exactly on its anchor line (legal, freeze).
//   - Its caption spills into the first gap, and the dotted connector runs
//     under it along the bottom edge.
//   - "Dashboards", the next item in the lane, starts where the last
//     stretch ends (Apr 20) on the same row: a caption in the first gap
//     reserves nothing past the hull.

roadmap breaks-anchors "Several breaks" start:2026-01-05 scale:1w calendar:full

anchor legal date:2026-02-23
anchor freeze date:2026-04-13

swimlane platform "Platform"
  item auth "Auth service split" duration:3w status:done
  item payments "Payments API v2" duration:8w status:in-progress remaining:40%
  item rate-limits "Rate limits" duration:2w

swimlane data "Data"
  item warehouse "Warehouse migration" duration:5w status:in-progress owner:data
    break after:2w before:legal
    break after:2w before:freeze
  item dashboards "Dashboards" duration:2w

break-stress Tests new

tests/break-stress.nowline
nowline v1

// Stress fixture for breaks (specs/break.md §6, §7). Stresses: everything an
// item with breaks has to share a row with, on a business calendar drawn with
// `non-working:show`, so every stretch paints across shaded weekend bands.
//
// The pause on "Inside" is 12d, not a whole number of weeks, so the Design
// wave closes mid-week: a wave boundary that lands on a weekend under
// `non-working:show` is a known engine A/C divergence unrelated to breaks.
//
// What to look for when rendering this:
//   - Many stretches: "Many stretches" is six hatched stretches (background
//     work) with five dotted gaps, boundary marks only across stretches.
//   - Slivers: "Sliver" starts and ends with a stretch under 3 px wide, still
//     drawn, never dropped, and the caption spills clear of both.
//   - The three caption placements: "Inside" (title wrapped inside the first
//     stretch, label chips under it), "Gap" (spilled into the first pause)
//     and "Last" (the pause is too short, so it spills right of the last
//     stretch and pushes the next item to the next row).
//   - Capacity: the "Staffed" lane's underline reads zero load over the
//     pause of "Staffed item", which holds capacity:1 beside a steady item.
//   - Styled, linked, footnoted: one item with breaks carries a style, a
//     link icon and a footnote; the icon and footnote sit in the first
//     stretch, later stretches are bare.
//   - Arrows: "Feeder" -> "Broken" lands on Broken's first stretch and
//     "Broken" -> "Consumer" leaves its last, a vertical leg may cross a gap.
//   - Group and parallel: items with breaks inside a group and inside a
//     parallel track, the container brackets spanning the last stretch.
//   - `before:`: "Late" has a red overflow tail on its LAST stretch only; the
//     cap falls inside an earlier pause.

config

style loud "Loud"
  bg: red
  fg: navy
  text: white
  border: dashed

default roadmap non-working:show

roadmap break-stress "Break stress" start:2026-01-05 scale:1w calendar:business

label urgent "Urgent"
label review "Needs review"

anchor cap "Cap" date:2026-02-02

wave design "Design"
wave build "Build"

swimlane many "Many stretches"
  item many-stretches "Many stretches" duration:12w
    break after:2d duration:3d
    break after:2d duration:3d
    break after:2d duration:3d
    break after:2d duration:3d
    break after:2d duration:3d

swimlane slivers "Slivers"
  item sliver "Sliver" duration:2w wave:design
    break after:0.2d duration:1w
    break before:0.2d duration:1w

swimlane captions "Caption placements"
  item inside "Inside: a title that wraps within its first stretch" duration:8w wave:design labels:[urgent, review]
    break after:5w duration:12d
  item gap "Gap" duration:6w wave:build status:in-progress
    break after:1w duration:3w
  item last "Last" duration:3w wave:build
    break after:1w duration:1d
  item after-last "After last" duration:2w wave:build

swimlane staffed "Staffed" capacity:2
  parallel
    item staffed-item "Staffed item" duration:4w capacity:1 wave:design
      break after:1w duration:2w
    item steady "Steady" duration:4w capacity:1 wave:design

swimlane styled "Styled, linked, footnoted"
  item decorated "Decorated item" duration:6w style:loud link:https://example.com/plan wave:design
    break after:3w duration:2w

swimlane feed "Arrows in"
  item feeder "Feeder" duration:2w wave:design
swimlane flow "Arrows through"
  item broken "Broken" duration:5w after:feeder wave:design
    break after:2d duration:2w
swimlane sink "Arrows out"
  item consumer "Consumer" duration:2w after:broken wave:build

swimlane containers "Group and parallel"
  group handoff "Handoff"
    item in-group "In a group" duration:4w wave:design
      break after:1w duration:1w
    item next-in-group "Next" duration:1w wave:design
  parallel tracks "Tracks"
    item in-track "In a track" duration:4w wave:build
      break after:1w duration:1w
    item other-track "Other track" duration:5w wave:build

swimlane capped "Overflow"
  item late "Late" duration:5w before:cap wave:design
    break after:1w duration:2w

footnote fn "Pauses are working weeks" on:decorated