@basementuniverse/kanbn 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -223,7 +223,7 @@ Workspace-scoped. See [multiple boards](multiple-boards.md).
223
223
 
224
224
  ### `sprints`
225
225
 
226
- A list of sprints. Each sprint will have `start`, `name` and `description` properties.
226
+ A list of sprints. Each sprint will have `start`, `name` and `description` properties. See [sprints](sprints.md).
227
227
 
228
228
  A board can declare its own `sprints` in its front matter, which **replaces** the workspace list for that board entirely. See [multiple boards](multiple-boards.md#per-board-sprints).
229
229
 
package/docs/index.md CHANGED
@@ -13,6 +13,7 @@ To get started quickly, check out the [Quick Start](quick-start.md) guide.
13
13
  - [Contributors](contributors.md) — an optional list of who works on a workspace, and who "you" are
14
14
  - [Actions](actions.md) — declarative rules that fire when a task is created, moved, updated or finished
15
15
  - [Views](views.md) — custom board layouts, columns and lanes
16
+ - [Sprints](sprints.md) — named time windows that `status`, `burndown` and `history` report through
16
17
  - [Filtering and Sorting](filtering-and-sorting.md) — the filter and sorter model shared by `find`, `sort` and views
17
18
  - [Advanced Configuration](advanced-configuration.md)
18
19
  - [Migrating to 2.0.0](migration-2.0.md) — separate config files and custom folder locations
@@ -0,0 +1,175 @@
1
+ # Sprints
2
+
3
+ A sprint in Kanbn is nothing more than **a named point in time**. Each sprint has a start date, and
4
+ runs until the next sprint starts; the last sprint in the list is the current one, and runs up to
5
+ now. Nothing stores an end date or a duration, and there is no way for a sprint to be "closed" -
6
+ starting the next sprint is what ends the previous one, and any end date you see in reporting output
7
+ is derived from the next sprint's start.
8
+
9
+ Tasks are never assigned to a sprint. A sprint is a window that reporting commands measure through,
10
+ so which sprint a task belongs to is worked out from its dates (`created`, `started`, `completed`,
11
+ `due`) rather than being recorded anywhere on the task. This means sprints cost nothing to add
12
+ retrospectively, and moving a boundary re-slices history rather than invalidating it.
13
+
14
+ Sprints live in the [`sprints`](index-structure.md#sprints) index option:
15
+
16
+ ```yaml
17
+ sprints:
18
+ -
19
+ start: 2026-07-01T09:00:00.000Z
20
+ name: 'Foundation Sprint'
21
+ description: 'Baseline product and infrastructure work.'
22
+ -
23
+ start: 2026-07-08T09:00:00.000Z
24
+ name: 'Workflow Sprint'
25
+ ```
26
+
27
+ `start` and `name` are required, `description` is optional.
28
+
29
+ ## Starting a sprint
30
+
31
+ ```bash
32
+ kanbn sprint --name "Workflow Sprint" --description "Core team workflow and onboarding features."
33
+ ```
34
+
35
+ `kanbn sp` is the short alias. The sprint always starts *now* - there is no option to backdate one
36
+ from the CLI, so a sprint that should have started last Monday is a front matter edit.
37
+
38
+ | Option | Effect |
39
+ | --- | --- |
40
+ | `--name`, `-n` | Sprint name. If omitted, auto-named `Sprint {n}` from the number of existing sprints |
41
+ | `--description`, `-d` | Optional description, shown in `kanbn status` output |
42
+ | `--interactive`, `-i` | Prompt for name and (optionally) description |
43
+ | `--board`, `-b` | Run from the context of another board (see [below](#sprints-and-multiple-boards)) |
44
+
45
+ There is no command to rename, re-date or delete a sprint. All three are edits to the `sprints`
46
+ list in the board's front matter, which is deliberate: the sprint list is a small hand-maintainable
47
+ piece of history, and `kanbn sprint` only ever appends to it.
48
+
49
+ ## Reading a sprint
50
+
51
+ Three commands take a `--sprint N|"name"` option (`-p` in every case). A sprint can be selected by
52
+ 1-based number or by exact name; an unknown number or name is an error, not an empty result.
53
+
54
+ ### `kanbn status --sprint`
55
+
56
+ Adds a `sprint` section to the status output for the selected sprint, defaulting to the current one:
57
+
58
+ ```bash
59
+ kanbn status --sprint 2
60
+ kanbn status --sprint "Workflow Sprint"
61
+ ```
62
+
63
+ ```yaml
64
+ sprint:
65
+ number: 2
66
+ name: 'Workflow Sprint'
67
+ start: 2026-07-08T09:00:00.000Z
68
+ end: 2026-07-15T09:00:00.000Z
69
+ current: 3
70
+ description: 'Core team workflow and onboarding features.'
71
+ durationDelta: 604800000
72
+ durationMessage: '1 week'
73
+ created: # tasks created during the sprint, with their total workload
74
+ started: # tasks started during the sprint
75
+ completed: # tasks completed during the sprint
76
+ due: # tasks due during the sprint
77
+ ```
78
+
79
+ Each of those four groups lists the matching task ids with their column and workload, plus a summed
80
+ `workload`. Any [custom date fields](index-structure.md#customfields) you have declared get a group
81
+ of their own too.
82
+
83
+ `current` and `end` only appear when you're looking at a sprint other than the current one: `current`
84
+ is the number of the sprint that is running now, and `end` is the moment the sprint you asked about
85
+ stopped, which is the next sprint's `start`. The current sprint has no `end`, because it hasn't
86
+ ended - its `durationDelta` and `durationMessage` are measured up to now, and will be larger every
87
+ time you run the command until the next sprint starts.
88
+
89
+ ### `kanbn burndown --sprint`
90
+
91
+ ```bash
92
+ kanbn burndown --sprint "Workflow Sprint"
93
+ kanbn burndown --sprint 1 --sprint 2
94
+ ```
95
+
96
+ Plots remaining workload across the sprint window. `--sprint` can be repeated to draw a chart per
97
+ sprint. With no `--sprint` or `--date` at all, burndown uses the current sprint - and if no sprints
98
+ are defined, it falls back to all time, from the earliest task date to now.
99
+
100
+ ### `kanbn history --sprint`
101
+
102
+ ```bash
103
+ kanbn history --sprint 2
104
+ ```
105
+
106
+ Filters the event listing down to events that fall inside the sprint window. Repeatable, and
107
+ combinable with `--assigned`, `--task` and `--date`.
108
+
109
+ Gantt charts don't use sprints at all.
110
+
111
+ ## Sprints and multiple boards
112
+
113
+ Sprints are workspace-level by default: every board reads the workspace list, so one sprint cadence
114
+ covers the whole workspace and `kanbn sprint -b design` appends to that shared list (and says so in
115
+ verbose mode).
116
+
117
+ A board that declares its own `sprints` in its front matter **replaces** the workspace list for
118
+ itself entirely - it can no longer see workspace sprints, so `kanbn status -b design -p "Foundation
119
+ Sprint"` will fail to find one that only exists at workspace level. Sprints started on such a board
120
+ are auto-named `{Board name} Sprint {n}` so two boards' sprints can't be confused. Forking is never
121
+ implicit; it stays a deliberate front matter edit. See
122
+ [multiple boards](multiple-boards.md#per-board-sprints).
123
+
124
+ `--sprint` can't be combined with `--all-boards`, because sprint numbers and names are relative to
125
+ one board's list.
126
+
127
+ ## Keeping the list sane
128
+
129
+ The "current sprint is the last one" and "a sprint runs until the next one starts" rules both assume
130
+ the list is in chronological order. `kanbn validate` emits a `sprints-out-of-order` warning if it
131
+ isn't - worth checking after hand-editing dates.
132
+
133
+ ## Example workflow
134
+
135
+ A team working in weekly sprints, reviewing at the end of each one.
136
+
137
+ Start the first sprint on the Monday:
138
+
139
+ ```bash
140
+ kanbn sprint -n "Foundation Sprint" -d "Baseline product and infrastructure work."
141
+ ```
142
+
143
+ Work the week normally - `kanbn add`, `kanbn move`, `kanbn comment`. Nothing needs to reference the
144
+ sprint; the dates Kanbn stamps on tasks as they're created, started and completed are what the
145
+ sprint reporting reads.
146
+
147
+ Check progress mid-week:
148
+
149
+ ```bash
150
+ kanbn status --due
151
+ kanbn burndown --normalise auto
152
+ ```
153
+
154
+ With no `--sprint`, both default to the current sprint, so this is the "how is this week going"
155
+ view.
156
+
157
+ On the following Monday, review what the week actually contained, then start the next sprint:
158
+
159
+ ```bash
160
+ kanbn status --sprint "Foundation Sprint"
161
+ kanbn history --sprint "Foundation Sprint"
162
+ kanbn sprint -n "Workflow Sprint" -d "Core team workflow and onboarding features."
163
+ ```
164
+
165
+ Starting the second sprint closes the first one at that moment, and the reports above stay valid
166
+ for it forever - `kanbn status -p 1` and `kanbn burndown -p 1` will show the same window next month.
167
+
168
+ Comparing two sprints later on:
169
+
170
+ ```bash
171
+ kanbn burndown -p "Foundation Sprint" -p "Workflow Sprint"
172
+ ```
173
+
174
+ The [`example/basic`](../example/basic) workspace ships with three sprints defined, so every command
175
+ on this page can be run there as-is.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basementuniverse/kanbn",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "A CLI Kanban application",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/main.js CHANGED
@@ -4426,7 +4426,7 @@ class Kanbn {
4426
4426
  start: sprints[sprintIndex].start,
4427
4427
  };
4428
4428
  if (currentSprint - 1 !== sprintIndex) {
4429
- if (sprintIndex === sprints.length - 1) {
4429
+ if (sprintIndex !== sprints.length - 1) {
4430
4430
  result.sprint.end = sprints[sprintIndex + 1].start;
4431
4431
  }
4432
4432
  result.sprint.current = currentSprint;