@softure-ai/skills 0.2.0 → 0.3.0

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.
Files changed (51) hide show
  1. package/README.md +4 -0
  2. package/WORKFLOW.md +6 -2
  3. package/package.json +1 -1
  4. package/scripts/install.mjs +5 -0
  5. package/skills/softure-archive/SKILL.md +76 -24
  6. package/skills/softure-archive/references/example-archive.md +106 -0
  7. package/skills/softure-code-review/SKILL.md +68 -18
  8. package/skills/softure-code-review/references/example-review.md +108 -0
  9. package/skills/softure-frame/SKILL.md +129 -40
  10. package/skills/softure-frame/references/diagnostic-lens.md +85 -0
  11. package/skills/softure-frame/references/examples.md +111 -0
  12. package/skills/softure-frame/references/pushback.md +38 -0
  13. package/skills/softure-impl-review/SKILL.md +138 -76
  14. package/skills/softure-impl-review/references/example-review.md +127 -0
  15. package/skills/softure-impl-review/references/rubric.md +120 -0
  16. package/skills/softure-impl-review/references/triage.md +124 -0
  17. package/skills/softure-implement/SKILL.md +116 -49
  18. package/skills/softure-implement/references/phase-commit.md +214 -0
  19. package/skills/softure-implement/references/worked-example.md +201 -0
  20. package/skills/softure-init/SKILL.md +57 -41
  21. package/skills/softure-init/references/example.md +96 -0
  22. package/skills/softure-init/references/templates.md +73 -0
  23. package/skills/softure-lesson/SKILL.md +47 -19
  24. package/skills/softure-lesson/references/examples.md +65 -0
  25. package/skills/softure-new/SKILL.md +100 -43
  26. package/skills/softure-new/references/example-change.md +149 -0
  27. package/skills/softure-new/references/placement.md +60 -0
  28. package/skills/softure-plan/SKILL.md +182 -50
  29. package/skills/softure-plan/references/plan-example.md +206 -0
  30. package/skills/softure-plan/references/progress-format.md +56 -2
  31. package/skills/softure-plan/references/questioning.md +162 -0
  32. package/skills/softure-plan-review/SKILL.md +211 -83
  33. package/skills/softure-plan-review/references/lenses.md +121 -0
  34. package/skills/softure-plan-review/references/review-example.md +184 -0
  35. package/skills/softure-prd/SKILL.md +130 -71
  36. package/skills/softure-prd/references/example-prd.md +233 -0
  37. package/skills/softure-prd/references/leak-lint.md +43 -0
  38. package/skills/softure-prd/references/prd-template.md +219 -0
  39. package/skills/softure-research/SKILL.md +73 -33
  40. package/skills/softure-research/references/example-research.md +106 -0
  41. package/skills/softure-research/references/fan-out.md +61 -0
  42. package/skills/softure-roadmap/SKILL.md +211 -65
  43. package/skills/softure-roadmap/references/example-roadmap.md +203 -0
  44. package/skills/softure-roadmap/references/interview.md +132 -0
  45. package/skills/softure-roadmap/references/slicing.md +118 -0
  46. package/skills/softure-rule-review/SKILL.md +83 -19
  47. package/skills/softure-rule-review/references/example-report.md +73 -0
  48. package/skills/softure-rule-review/references/scorecard.md +129 -0
  49. package/skills/softure-shape/SKILL.md +163 -53
  50. package/skills/softure-shape/references/example-shape-notes.md +192 -0
  51. package/skills/softure-shape/references/question-bank.md +248 -0
@@ -2,12 +2,15 @@
2
2
  name: softure-roadmap
3
3
  description: >
4
4
  Slice an accepted PRD (or a list of feedback items) into `context/foundation/roadmap.md`:
5
- thin vertical slices with stable IDs, dependencies, ownership of hot files for parallel
6
- work, unknowns, baselines, and an at-a-glance table that orchestrators parse. Optionally
7
- opens a change folder for every ready item. Use after softure-prd, when feedback must be
8
- turned into work, or to revise the order. Triggers: "make a roadmap", "slice the PRD",
9
- "what do we build first", "order the work",
10
- "turn feedback into roadmap items".
5
+ checks the PRD is ready, inventories the codebase, asks at most three framing questions
6
+ (what to optimise for, what proves the idea first, what most likely stalls it), then writes
7
+ thin vertical slices with stable IDs, dependencies, ownership of hot files for parallel work,
8
+ unknowns, baselines, and an at-a-glance table that orchestrators parse. Self-reviews before
9
+ writing and ends with one recommended next item. Also queues thematic roadmaps, promotes
10
+ them and closes a finished roadmap. Optionally opens a change folder for every ready item.
11
+ Use after softure-prd, when feedback must be turned into work, or to revise the order.
12
+ Triggers: "make a roadmap", "slice the PRD", "what do we build first", "order the work",
13
+ "turn feedback into roadmap items", "close the roadmap".
11
14
  argument-hint: "[--revise] [--open-changes] [--queue <slug> | --promote <slug> | --close] [--from-feedback <path>] [--auto]"
12
15
  allowed-tools:
13
16
  - Read
@@ -16,6 +19,7 @@ allowed-tools:
16
19
  - Write
17
20
  - Edit
18
21
  - Bash
22
+ - Agent
19
23
  - AskUserQuestion
20
24
  ---
21
25
 
@@ -28,25 +32,40 @@ built, reviewed and merged on its own, and safe to run in parallel where the roa
28
32
  The format is a contract: `softure-worktree` and `softure-worktree-manager` parse it
29
33
  (WORKFLOW §5). Follow it exactly.
30
34
 
35
+ **Posture: a tech lead who arrives with a proposal.** Read the PRD, inventory the code, then
36
+ recommend. Ask the owner only the few calls the material cannot settle, each with a
37
+ recommendation and real alternatives. Never ask what the files already answer; never decide the
38
+ framing silently.
39
+
40
+ The roadmap names, orders and sizes slices. It does not choose libraries, design schemas or plan
41
+ steps (that is `softure-plan`), and it never estimates in time.
42
+
31
43
  ## Inputs
32
44
 
33
- - `context/foundation/prd.md` with `status: accepted`. If missing, stop and point to
34
- `softure-prd`. Alternatively, `--from-feedback <path>` takes notes or screenshots and a
35
- short slice is made without a PRD; record that in the header.
36
- - `context/workflow.json` (for `language`, `maxParallel`, `migrations`).
37
- - If an existing `roadmap.md` has items not yet `done`, this is **revise mode**. Never
38
- renumber IDs and never drop an `in_progress` item. Move a finished roadmap to
39
- `context/foundation/archive/<YYYY-MM-DD>-roadmap.md` before starting a new one.
45
+ - `context/foundation/prd.md`. If missing, stop and point to `softure-prd`. Alternatively,
46
+ `--from-feedback <path>` takes notes or screenshots and a short slice is made without a PRD;
47
+ record that in the header, and make every item trace to a feedback point instead of an FR.
48
+ - `context/workflow.json` (for `language`, `worktree.maxParallel`, `migrations`, `research.sources`).
49
+ - Read when present: `context/foundation/shape-notes.md` (appetite, rabbit holes and no-gos shape
50
+ the order), `context/foundation/lessons.md` (rules about ordering or readiness are priors), the
51
+ stack documents listed in `research.sources`, and `context/foundation/roadmaps/*.md` (ID
52
+ prefixes already taken).
53
+ - An existing `roadmap.md` decides the mode; see "Existing roadmap" below.
54
+
55
+ Read the PRD in full, not in excerpts.
40
56
 
41
57
  ## Modes
42
58
 
43
59
  - **main** (default): writes `context/foundation/roadmap.md`, the one roadmap that is executed.
60
+ - **`--revise`**: edits the existing main roadmap in place (see "Existing roadmap").
44
61
  - **`--queue <slug>`**: writes a queued thematic roadmap per WORKFLOW §5.1:
45
62
  `context/foundation/roadmaps/roadmap-<slug>.md` (`status: waiting`, `backlog:`, `trigger:`), plus
46
63
  `context/backlog/roadmap-<slug>/README.md` (table `| ID | Entry | Title | Condition | Kind |`, where Kind
47
64
  is `start`, `dependency` or `owner`) and one `<change-id>/change.md` per item (§4 format, `status: backlog`,
48
65
  `## Intent`, `## Context` with the item block, `## Constraints`). Use this for every theme that is not
49
- next in line. Several queued roadmaps can exist; each has its own ID prefix.
66
+ next in line. Several queued roadmaps can exist; each has its own ID prefix. The slug is English
67
+ and names the **reason the items wait** (`roadmap-payments`: they need a provider account), not
68
+ the page they touch: a page-named roadmap turns into a bin for every later edit of that page.
50
69
  - **`--promote <slug>`**: the owner makes a queued roadmap the main one. Archive the current main
51
70
  roadmap, `git mv` the queued file to `roadmap.md`, set `status: ready`, and take its ready entries
52
71
  (`git mv …/change.md context/changes/<id>/backlog-input.md`, then the `softure-new` format).
@@ -60,50 +79,148 @@ The format is a contract: `softure-worktree` and `softure-worktree-manager` pars
60
79
  `foundation/archive/<YYYY-MM-DD>-roadmap.md`, clean up the promoted roadmap's backlog folder and
61
80
  index row, and commit. Do not promote the next roadmap in the same step: that is `--promote`, the
62
81
  owner's call. In `--auto`, a failing gate stops the close and is reported; it is never forced.
82
+ A sample `## Summary` is at the end of [references/example-roadmap.md](references/example-roadmap.md).
83
+
84
+ ## Existing roadmap
85
+
86
+ | What is there | Do |
87
+ |---|---|
88
+ | no `roadmap.md` | main mode |
89
+ | every row `done` / `done_code` | it is finished: run `--close` first (recommended), then write the new one |
90
+ | rows still open | **revise mode** (recommended); "archive and start over" only on the owner's explicit choice, and every open row must first be carried to the new roadmap or a queued one |
91
+
92
+ Revise mode rules: never renumber an ID; new items take the next free number of the prefix; never
93
+ drop or re-status an `in_progress`, `ready_to_merge`, `done` or `done_code` row; remove a row only
94
+ when it is `proposed` or `ready` with no folder in `changes/` and no branch; bump `version`; set
95
+ `prd_version` to the PRD's; name every item whose `PRD refs` cite an FR the new PRD version changed.
96
+ Overwriting a roadmap without archiving it is never an option. In `--auto`: revise in place.
63
97
 
64
98
  ## Procedure
65
99
 
66
- 1. **List the capabilities** from the FRs (or feedback points). Group points that change the
67
- same user-visible behaviour.
68
- 2. **Slice vertically.** Each item delivers one observable outcome end to end (data → logic →
100
+ 1. **Readiness check.** Score the PRD, one point each:
101
+ - the summary names the problem, who has it and the outcome (no TODO);
102
+ - at least one `must` FR has Given/When/Then acceptance;
103
+ - goals or success metrics carry a number (baseline and target);
104
+ - no open question gates a `must` FR.
105
+
106
+ Show the four signals and the score, plus the PRD `status` and the count of open questions.
107
+ With 3 or 4 points and `status: accepted`, continue. Otherwise name each missing signal and
108
+ what it will do to the roadmap ("FR-5 has no acceptance: its item will be `blocked`"), then
109
+ ask: "Finish the PRD first (Recommended) / Proceed: thin areas become blocked items / Cancel".
110
+ `--auto`: proceed, write the roadmap with `status: draft`, make every item over a thin area
111
+ `blocked (PRD gap: <what>)`, and record the decision.
112
+
113
+ 2. **Codebase baseline.** Find out what already exists instead of asking. Probe each layer: UI,
114
+ server/API, data (driver, migrations), auth, mail and other integrations, deploy/CI, tests,
115
+ observability. Skip a layer a stack document already states and cite that document. When the
116
+ `Agent` tool is available, run the probes in parallel, one short prompt each: *"Inventory the
117
+ <layer> of this repository in under 100 words: verdict present, partial (scaffolded but not
118
+ wired) or absent; cite a file for anything present; do not speculate or edit files."* Without
119
+ it, run them in sequence. Show a one-screen summary and ask once "Does this match? Correct or
120
+ add anything". `--auto`: use the probes as they are, and say so in `## Decisions (auto)`. The
121
+ baseline decides which foundations may exist: a `present` layer is never scaffolded again.
122
+
123
+ 3. **Framing interview.** At most three anchor questions, one at a time, each with a
124
+ recommendation grounded in a quoted line or ID, up to two real alternatives with the condition
125
+ under which they win, and a free-form option:
126
+ - what this roadmap optimises for (feedback, quality, simplicity, speed, learning, other);
127
+ - which item proves the idea first (the north star);
128
+ - what most likely stalls the work (decisions, capacity, time, skills, external, none).
129
+
130
+ Skip an anchor only when the material states the value outright, and say so with the quote.
131
+ Derive where to invest depth from the answers; do not ask it. Close with a recap the owner can
132
+ accept with "go" or correct line by line. Signals, the unusual-product exception, phrasing and
133
+ a good and a bad question: [references/interview.md](references/interview.md) (read before
134
+ asking). `--auto`: take each recommendation and record it.
135
+
136
+ 4. **List the capabilities** from the FRs (or feedback points). Group points that change the
137
+ same user-visible behaviour. Every item will cite at least one of them.
138
+
139
+ 5. **Slice vertically.** Each item delivers one observable outcome end to end (data → logic →
69
140
  UI → test), never "all the database work". Each item should:
70
- - fit one plan of 1 to 4 phases;
141
+ - fit one plan of 1 to 4 phases, add at most one migration and have one primary surface;
71
142
  - be mergeable on its own without breaking main;
72
143
  - carry its own verification (a baseline and an after measurement).
73
144
 
74
- Too big → split by user path, by data subset, or into a walking skeleton plus enhancements.
75
- 3. **Prefer modules.** Items whose FR is marked `Module: @softure-ai/<name>` become "adopt and
76
- configure the module" items, which are much smaller than building it.
77
- 4. **Order:**
78
- - risk first (whatever could invalidate the plan);
79
- - then dependencies;
80
- - then value.
81
-
82
- Name the prerequisite IDs explicitly. Put a "finish" item last when the theme needs a
83
- final measurement or review across items.
84
- 5. **Parallel safety.** For every item, list the files and areas it will touch (from a quick
85
- code search; this is an estimate, so say so). Two items may run in parallel only if:
145
+ Too big → split by user path, by data subset, by role, read before write, or into a walking
146
+ skeleton plus enhancements. Too small → fold into the item it serves. Horizontal work is
147
+ allowed only as a **foundation**: outcome marked `(foundation) …` and an `Unlocks:` line naming
148
+ the items, the blocking unknown or the verification path it enables; without one, fold it into
149
+ its first consumer. Nothing becomes an item that the PRD (or the feedback) does not contain:
150
+ new ideas from the conversation go to `## Owner decisions and checks` (a real gap) or to
151
+ `context/backlog/<topic>.md` (deferred). Patterns, good and bad items:
152
+ [references/slicing.md](references/slicing.md) (read when an item feels too big, too small or
153
+ horizontal).
154
+
155
+ 6. **Prefer modules.** Items whose FR is marked `Module: @softure-ai/<name>`, or whose layer the
156
+ baseline reports absent and a module covers (WORKFLOW §10), become "adopt and configure the
157
+ module" items, which are much smaller than building it.
158
+
159
+ 7. **Order.**
160
+ - Prerequisites are item IDs plus concrete external state ("sending domain verified"), never
161
+ "backend ready". Sort topologically: no cycles, nothing depends on a later item.
162
+ - Risk first (whatever could invalidate the plan), then dependencies, then value.
163
+ - Place the north star as early as its prerequisites allow.
164
+ - Break remaining ties by the goal from the interview (table in references/slicing.md).
165
+ - Do not choose an order that prejudges an open owner question; the items it decides are
166
+ `blocked (<question>)` until it is answered.
167
+ - Put a "finish" item last when the theme needs a final measurement or review across items.
168
+
169
+ 8. **Unknowns and blockers.** Per item, `- <question> (owner: research | <person>; blocks: yes | no)`.
170
+ One with `blocks: yes` makes the row `blocked (<question, short>)`. External dependencies the
171
+ team cannot resolve alone are prerequisites. Questions that gate several items go to
172
+ `## Owner decisions and checks`, naming the IDs they gate.
173
+
174
+ 9. **Parallel safety.** For every item, list the files and areas it will touch
175
+ (`- **Touches (estimate):** …`, from a quick code search; it is an estimate, so say so). Two
176
+ items may run in parallel only if:
86
177
  - their file sets are disjoint;
87
178
  - at most one of them adds a migration (`workflow.json` → `migrations`);
88
179
  - neither changes a shared primitive the other uses.
89
180
 
90
- Assign **exclusive owners** for hot files and write the groups that can run together under
91
- `## Order`.
92
- 6. **Per item, write:** Change ID (kebab-case, unique across `changes/` and `archive/`),
93
- Outcome, Prerequisites, Unknowns (the questions research must answer), Risk, Baseline (how
94
- it is measured before and after) and PRD refs.
95
- 7. **Header:**
96
- - frontmatter: `prd_version` = the PRD `version`;
97
- - run-wide orders in the quote block: push main or not; parallelism (default:
98
- `workflow.json` → `worktree.maxParallel`); which items need the owner at the keyboard.
99
- 8. **Review with the user.** Show the at-a-glance table and the parallel groups, then ask
100
- "Accept the order? (Recommended: accept)". Apply edits and set `status: ready`.
101
- 9. **`--open-changes`.** For every `ready` item without a folder, create
102
- `context/changes/<change-id>/change.md` in the `softure-new` format (WORKFLOW §4):
103
- - `status: new` and `roadmap_item: <ID>`;
104
- - `## Intent` = the item outcome;
105
- - `## Context` quotes the item block verbatim;
106
- - `## Constraints` lists the exclusively owned files.
181
+ Assign **exclusive owners** for hot files and write the lanes under `## Order` as
182
+ `| Lane | Chain | Owns | Note |` (two to five lanes, each item in exactly one). When the main
183
+ risk is capacity, look hardest for parallel lanes.
184
+
185
+ 10. **Per item, write:** Change ID (kebab-case, names the outcome, unique across `changes/`,
186
+ `archive/` and `backlog/`), Status, Outcome (a verb-led state of the world: "a visitor books a
187
+ free slot", never a noun like "booking system"), `Unlocks` (foundations only), Prerequisites,
188
+ Touches (estimate), Unknowns, Risk (one line: why it sits here and what could go wrong),
189
+ Baseline (how it is measured before and after) and PRD refs (literal IDs, not paraphrases).
190
+
191
+ 11. **Header and `## Order`.**
192
+ - frontmatter: `prd_version` = the PRD `version`;
193
+ - run-wide orders in the quote block: push main or not; archive the roadmap at the end or not;
194
+ parallelism (default: `workflow.json` → `worktree.maxParallel`); which items need the owner
195
+ at the keyboard (`Mode: owner`);
196
+ - `## Order` opens with the framing (optimising for, first proof, main risk, depth), then the
197
+ reasoning for the order, `### Starting point` (the confirmed baseline, one line per layer
198
+ with a file), `### Lanes`, and one line pointing to deferred ideas in the backlog.
199
+ - Define any strategy term (north star, riskiest assumption, …) in one plain sentence on first
200
+ use, or replace it with plain words. A teammate must be able to read the roadmap cold.
201
+
202
+ 12. **Self-review before writing.** Run the checklist under "Quality bar". If any check fails,
203
+ do not write the file: report each failure precisely ("FR-6 (must) is not cited by any item",
204
+ "BK-5 depends on BK-6, which comes later", "BK-1 scaffolds auth, but the baseline reports auth
205
+ present"), fix it, and run the checks again. In `--auto`, fix and re-check; if a failure cannot
206
+ be fixed from the material, stop and report it instead of writing a table orchestrators would
207
+ act on.
208
+
209
+ 13. **Review with the user.** Show the at-a-glance table and the lanes, then ask
210
+ "Accept the order? (Recommended: accept)". Apply edits, re-run the self-review, and set
211
+ `status: ready` (or keep `draft` after a thin-PRD proceed).
212
+
213
+ 14. **`--open-changes`.** For every `ready` item without a folder, create
214
+ `context/changes/<change-id>/change.md` in the `softure-new` format (WORKFLOW §4):
215
+ - `status: new` and `roadmap_item: <ID>`;
216
+ - `## Intent` = the item outcome;
217
+ - `## Context` quotes the item block verbatim;
218
+ - `## Constraints` lists the exclusively owned files;
219
+ - add `- **Input:** context/changes/<change-id>/change.md` to the item block.
220
+
221
+ A complete, realistic roadmap in this format, with a bad version and why it fails:
222
+ [references/example-roadmap.md](references/example-roadmap.md) (read before the first roadmap in a
223
+ project).
107
224
 
108
225
  ## Output: `context/foundation/roadmap.md`
109
226
 
@@ -111,31 +228,49 @@ Exactly the structure of WORKFLOW §5. Parser-critical rules:
111
228
  - Table header: `| ID | Change | Outcome | Depends on | Mode | Status |`.
112
229
  - Row: `| **FC-1** | \`change-id\` | … | FC-0, FC-2 or — | autonomous or owner | <status> |`.
113
230
  The **status is the last cell**, and there is one row per change-id.
114
- - IDs match `[A-Z]+-\d+`. Use a 2 to 4 letter prefix per roadmap theme and keep numbers
115
- stable forever.
231
+ - IDs match `[A-Z]+-\d+`. Use a 2 to 4 letter prefix per roadmap theme, not used by any other
232
+ roadmap (`grep -ho '\*\*[A-Z]\+-[0-9]' context/foundation/roadmap.md context/foundation/roadmaps/*.md | sort -u`),
233
+ and keep numbers stable forever.
116
234
  - Status vocabulary only: `proposed`, `ready`, `blocked (<why>)`, `in_progress (…)`,
117
235
  `ready_to_merge (…)`, `done`, `done_code (…)`. A new roadmap uses only `proposed`, `ready`
118
- and `blocked`.
236
+ and `blocked`. `ready` means the item itself has no open decision; whether its prerequisites
237
+ are merged is checked by the orchestrator.
119
238
  - Every item block has `- **Change ID:** \`<id>\`` followed directly by `- **Status:** <same as row>`.
120
- - `## Done` lists finished items, one line each, with their archive path.
239
+ Extra fields (`Unlocks`, `Touches (estimate)`, `Input`) come after those two.
240
+ - The framing, baseline, lanes and deferred ideas live under `## Order`; owner questions under
241
+ `## Owner decisions and checks`. Do not add other top-level sections.
242
+ - `## Done` starts empty; `softure-archive` is its only writer.
121
243
 
122
- Write prose in `workflow.json` → `language`. Keep the IDs, the status tokens and the table
123
- header in English, because scripts parse them.
244
+ Write prose in `workflow.json` → `language`. Keep the IDs, the status tokens, the headings and the
245
+ table header in English, because scripts parse them.
124
246
 
125
247
  ## `--auto`
126
248
 
127
- Slice and order without asking:
128
- - mark an item `proposed` when its value is doubtful;
129
- - mark it `blocked (<why>)` when it needs an owner decision;
130
- - record ordering choices under `## Decisions (auto)` at the end of the file.
249
+ Never ask. In place of each question:
250
+ - thin PRD → proceed as `status: draft`, thin items `blocked (PRD gap: …)`;
251
+ - baseline → use the probes unconfirmed;
252
+ - framing anchors → take the recommendations; on a tie, the value that orders risk earlier;
253
+ - an item of doubtful value → `proposed`; one that needs an owner decision → `blocked (<why>)`;
254
+ - existing open roadmap → revise in place;
255
+ - final review → accept, after a green self-review.
131
256
 
132
- ## Quality bar
257
+ Record each choice under `## Decisions (auto)` at the end of the file:
258
+ `- <question> → <choice> (<one-line reason>)`. Never `--promote`; never force `--close`.
133
259
 
134
- - [ ] Every `must` FR is covered by at least one item, or explicitly deferred.
135
- - [ ] No item is a horizontal layer ("backend for X").
260
+ ## Quality bar (the self-review)
261
+
262
+ - [ ] Every `must` FR is cited by at least one item, or explicitly deferred with a reason.
263
+ - [ ] Every item cites at least one PRD ID or feedback point; none is invented.
264
+ - [ ] No item is a horizontal layer; every foundation has `Unlocks` and none re-scaffolds a `present` layer.
265
+ - [ ] Every prerequisite ID exists; the graph has no cycles; the order is topological.
136
266
  - [ ] Each item has unknowns and a baseline. "None" is allowed only with a reason.
137
- - [ ] Items running in parallel have disjoint files and at most one migration between them.
138
- - [ ] The table and item blocks agree on IDs, change-ids and statuses.
267
+ - [ ] Every `blocked` row has an unknown with `blocks: yes` or a named external dependency.
268
+ - [ ] Items running in parallel have disjoint files and at most one migration between them; each
269
+ item sits in exactly one lane.
270
+ - [ ] The table and item blocks agree on IDs, change-ids and statuses; change-ids are unique
271
+ kebab-case outcomes, not IDs, dates or activities.
272
+ - [ ] No estimates, sizes or dates for delivery; no implementation steps.
273
+ - [ ] Strategy terms are defined on first use.
139
274
  - [ ] The first item can start today with no open owner decision.
140
275
 
141
276
  ## Do not
@@ -143,9 +278,20 @@ Slice and order without asking:
143
278
  - Do not plan implementation steps. That is `softure-plan`, per change.
144
279
  - Do not change the status of an item that is in progress. That belongs to the orchestrators
145
280
  and `softure-archive`.
146
- - Do not estimate in hours. Order and slice size are the planning tools here.
281
+ - Do not estimate in hours, days, points or sizes. Order and slice size are the planning tools here.
282
+ - Do not chain into the next skill on your own; the handoff is a recommendation.
147
283
 
148
284
  ## Handoff
149
285
 
150
- `softure-new <change-id>` for the first item (or use `--open-changes`). For parallel execution
151
- → `softure-worktree-manager`. For a single item end to end → `softure-worktree <ID>`.
286
+ Print a short summary: path, slug and version, the framing in one line, item counts by status,
287
+ PRD coverage (`must` FRs cited / total), and owner decisions waiting. Then recommend **one** next
288
+ item, not a menu. Take the first rule that applies:
289
+
290
+ 1. the north star is `ready` with its prerequisites done → it;
291
+ 2. a `ready` prerequisite of the north star → it, saying "this unlocks <north star>";
292
+ 3. nothing is `ready` → the owner decision that unblocks the most items, with what it unblocks;
293
+ 4. otherwise → the `ready` item that unblocks the most others; ties by the goal.
294
+
295
+ Name the command (`softure-new <change-id>`, or `--open-changes` then `softure-worktree-manager`
296
+ for parallel execution, `softure-worktree <ID>` for one item end to end), the next two items after
297
+ it, and what waits for the owner.
@@ -0,0 +1,203 @@
1
+ # Worked example: a booking app roadmap
2
+
3
+ Read this before writing your first roadmap in a project, or when unsure how the contract format
4
+ (WORKFLOW §5) holds the framing, baseline and lanes. The domain is invented: **Slotbook**, online
5
+ booking for one physiotherapy clinic.
6
+
7
+ ## The input (PRD v2, excerpt)
8
+
9
+ - **G-1:** clients book without calling. Target: half of all bookings online within 8 weeks.
10
+ - **FR-1** (must): a visitor sees the free slots of a service for the next 14 days.
11
+ - **FR-2** (must): the clinic owner sets opening hours and staff shifts.
12
+ - **FR-3** (must): a visitor books a free slot and receives a confirmation email.
13
+ - **FR-4** (must): a client cancels through the link in the email.
14
+ - **FR-5** (must): cancellation is refused inside the clinic's cancellation window.
15
+ - **FR-6** (must): staff see the bookings of the day.
16
+ - **FR-7** (should): a reminder email goes out 24 hours before the visit.
17
+ - **FR-8** (could): a deposit is taken at booking.
18
+ - **NFR-1:** the free-slot page answers in under 500 ms at p95. **NFR-2:** no slot is ever booked twice.
19
+ - Open questions: how long is the cancellation window? Which payment provider?
20
+
21
+ Interview result: optimise for `speed` (summary: "live before the spring season"); first proof
22
+ `BK-2`; main risk `decisions` (the window question gates FR-5).
23
+
24
+ Baseline from the probes: UI and server present (one web app, staff login through
25
+ `@softure-ai/auth`), data present (Postgres, migrations in `drizzle/`), mail absent, CI present,
26
+ observability partial (logs only).
27
+
28
+ ## The output: `context/foundation/roadmap.md`
29
+
30
+ ```markdown
31
+ ---
32
+ project: "Slotbook"
33
+ roadmap: booking-mvp
34
+ version: 1
35
+ status: ready
36
+ prd_version: 2
37
+ updated: 2026-10-01
38
+ ---
39
+
40
+ # Roadmap booking-mvp: clients book and manage visits online
41
+
42
+ > Run-wide orders, read by orchestrators (not parsed):
43
+ > - Push main branch: no
44
+ > - Archive roadmap: at the end
45
+ > - Parallelism: up to 2 at once
46
+ > - Owner at the keyboard: BK-6 (payment provider account)
47
+
48
+ ## At a glance
49
+
50
+ | ID | Change | Outcome | Depends on | Mode | Status |
51
+ | --- | --- | --- | --- | --- | --- |
52
+ | **BK-1** | `clinic-availability-model` | (foundation) hours, shifts and bookings stored; free slots computable | — | autonomous | ready |
53
+ | **BK-2** | `visitor-books-free-slot` | a visitor books a free slot and gets a confirmation email | BK-1 | autonomous | ready |
54
+ | **BK-3** | `client-cancels-by-link` | a client cancels from the email link, outside the window | BK-2 | autonomous | blocked (cancellation window not decided) |
55
+ | **BK-4** | `staff-day-view` | staff see the day's bookings on one screen | BK-1 | autonomous | ready |
56
+ | **BK-5** | `visit-reminder-email` | clients get a reminder 24 hours before the visit | BK-2 | autonomous | ready |
57
+ | **BK-6** | `deposit-at-booking` | a deposit is taken when a visitor books | BK-2 | owner | proposed |
58
+ | **BK-7** | `booking-flow-check` | the online share of bookings is measured against G-1 | BK-2, BK-3, BK-4 | autonomous | ready |
59
+
60
+ ## Order
61
+
62
+ **Optimising for:** speed (owner, interview 2026-10-01; PRD summary "live before the spring season").
63
+ **First proof:** BK-2, the first item that shows a visitor can book without calling (G-1).
64
+ **Main risk:** decisions. The cancellation window is open and gates BK-3; see owner decisions.
65
+ **Depth:** data (NFR-2 forbids double booking); UI and infrastructure stay simple.
66
+
67
+ BK-1 comes first because both the public flow and the staff view read the same availability
68
+ rules; building them twice would let the two disagree. BK-2 follows at once as the first proof.
69
+ BK-4 runs next to BK-2. BK-5 waits for BK-2 because both edit the mail templates. BK-6 is
70
+ `proposed` (FR-8 is a `could` and needs the owner's payment account). BK-7 closes the theme.
71
+
72
+ ### Starting point (codebase, 2026-10-01)
73
+ - UI: present (`app/`, one Next.js app). Server: present (route handlers in `app/api/`).
74
+ - Data: present (Postgres, `drizzle/`, 12 migrations). Auth: present (`@softure-ai/auth`, staff only).
75
+ - Mail: absent. BK-2 adopts `@softure-ai/mail` instead of building a sender.
76
+ - CI: present (`.github/workflows/tests.yml`). Observability: partial (request logs, no error tracking).
77
+
78
+ ### Lanes
79
+ | Lane | Chain | Owns (estimate) | Note |
80
+ | --- | --- | --- | --- |
81
+ | A | BK-1 → BK-2 → BK-3 → BK-5 | `lib/availability/**`, `app/(public)/book/**`, `mail/templates/**`, the only migrations | the must path |
82
+ | B | BK-4 | `app/(staff)/day/**` | parallel with BK-2 once BK-1 is merged; reads bookings, no migration |
83
+ | C | BK-6 → BK-7 | `app/(public)/book/deposit/**`, `scripts/booking-share.mts` | BK-6 only after the owner's decision |
84
+
85
+ Deferred: SMS reminders (raised in the interview, not in the PRD) → `context/backlog/booking.md`.
86
+
87
+ ## Items
88
+
89
+ ### BK-1: Availability model
90
+ - **Change ID:** `clinic-availability-model`
91
+ - **Status:** ready
92
+ - **Outcome:** (foundation) opening hours, staff shifts and bookings are stored; the free slots of
93
+ a service for any day can be computed by one function.
94
+ - **Unlocks:** BK-2 (public slots), BK-4 (staff view); NFR-2 is enforced here by a unique constraint.
95
+ - **Prerequisites:** —
96
+ - **Touches (estimate):** `lib/availability/**`, `drizzle/` (one migration), owner settings form.
97
+ - **Unknowns:**
98
+ - Do shifts repeat weekly or per date? (owner: research, from FR-2 acceptance; blocks: no)
99
+ - **Risk:** first because two items read it; a wrong slot rule here would surface in both.
100
+ - **Baseline:** no availability data; after: a test computes the free slots of a seeded week.
101
+ - **PRD refs:** FR-2, NFR-2
102
+
103
+ ### BK-2: A visitor books a free slot
104
+ - **Change ID:** `visitor-books-free-slot`
105
+ - **Status:** ready
106
+ - **Outcome:** a visitor picks a service, sees free slots for 14 days, books one and receives a
107
+ confirmation email.
108
+ - **Prerequisites:** BK-1; a sending domain verified for the clinic (external).
109
+ - **Touches (estimate):** `app/(public)/book/**`, `mail/templates/confirmation.*`, `softure.config.ts`.
110
+ - **Unknowns:**
111
+ - Two visitors pick the same slot at once: which one wins, and what does the other see?
112
+ (owner: research; blocks: no)
113
+ - **Risk:** the first proof; it goes as early as BK-1 allows.
114
+ - **Baseline:** 0 online bookings; after: a test books a slot and finds the email in the sandbox;
115
+ slot page p95 measured against NFR-1.
116
+ - **PRD refs:** FR-1, FR-3, NFR-1, NFR-2, G-1
117
+
118
+ ### BK-3: A client cancels from the email
119
+ - **Change ID:** `client-cancels-by-link`
120
+ - **Status:** blocked (cancellation window not decided)
121
+ - **Outcome:** a client cancels from the link in the confirmation email; inside the window the
122
+ page says why it cannot.
123
+ - **Prerequisites:** BK-2; the owner's answer on the window.
124
+ - **Touches (estimate):** `app/(public)/cancel/**`, `lib/availability/cancel.ts`.
125
+ - **Unknowns:**
126
+ - How long is the cancellation window? (owner: clinic owner; blocks: yes)
127
+ - **Risk:** small code, but building it before the answer means building it twice.
128
+ - **Baseline:** cancellations by phone only; after: a test cancels outside and inside the window.
129
+ - **PRD refs:** FR-4, FR-5
130
+
131
+ (BK-4 to BK-7 follow the same shape.)
132
+
133
+ ## Before the next release
134
+ - [ ] Set `MAIL_FROM` and the mail provider key in production (**BK-2**)
135
+
136
+ ## Owner decisions and checks
137
+ - [ ] **BK-3**: decide the cancellation window (hours before the visit). Gates BK-3.
138
+ - [ ] **BK-6**: choose the payment provider and open the account. Gates BK-6.
139
+
140
+ ## Done
141
+ ```
142
+
143
+ What makes it good:
144
+
145
+ - every `must` FR appears in a `PRD refs` line; FR-7 and FR-8 are covered or explicitly `proposed`;
146
+ - the one foundation names what it unlocks and does not scaffold anything the baseline reports present;
147
+ - the north star sits right after its only prerequisite; the order paragraph says why;
148
+ - the open question became a `blocked` row plus an owner line, not a guess;
149
+ - lanes have disjoint file sets and all migrations sit in lane A;
150
+ - mail is adopted from a module rather than built;
151
+ - no estimates, no dates other than the framing date, no implementation steps.
152
+
153
+ ## A bad version of the same roadmap
154
+
155
+ ```markdown
156
+ | ID | Change | Outcome | Depends on | Mode | Status |
157
+ | --- | --- | --- | --- | --- | --- |
158
+ | **BK-1** | `database` | All tables | — | autonomous | ready |
159
+ | **BK-2** | `backend-api` | API for bookings (3 days) | BK-1 | autonomous | ready |
160
+ | **BK-3** | `frontend` | Booking UI | BK-2 | autonomous | ready |
161
+ | **BK-4** | `sms-reminders` | SMS reminders | BK-3 | autonomous | ready |
162
+ | **BK-5** | `cancel` | Cancel | BK-6 | autonomous | ready |
163
+ ```
164
+
165
+ Why each row fails the self-review:
166
+
167
+ - BK-1 to BK-3 are layers. Nothing is usable until all three merge, and they cannot run in parallel.
168
+ - "(3 days)" is an estimate; the roadmap orders work, it does not schedule it.
169
+ - BK-4 is not in the PRD (SMS appeared in a conversation); it should be a backlog entry.
170
+ - BK-5 depends on BK-6, which does not exist, and is `ready` although the window is undecided.
171
+ - `database`, `cancel`: change ids that name an activity or a layer, not an outcome.
172
+ - There are no item blocks, so the table cannot be checked against them.
173
+
174
+ ## Handoff message after writing
175
+
176
+ ```
177
+ Roadmap written: context/foundation/roadmap.md (booking-mvp, v1)
178
+ Optimising for speed; first proof BK-2; main risk: decisions.
179
+ Items: 7 (ready 5, blocked 1, proposed 1). PRD coverage: 6/6 must FRs. Owner decisions: 2.
180
+
181
+ Next: softure-new clinic-availability-model (BK-1). It is the only prerequisite of the first
182
+ proof BK-2 and of BK-4, so it opens both lanes.
183
+ Then: BK-2 and BK-4 in parallel, then BK-5.
184
+ Waiting on you: the cancellation window (unblocks BK-3), the payment provider (BK-6).
185
+ ```
186
+
187
+ ## The `## Summary` appended by `--close`
188
+
189
+ ```markdown
190
+ ## Summary
191
+
192
+ | ID | Item | What changed | Merge |
193
+ | --- | --- | --- | --- |
194
+ | BK-1 | Availability model | hours, shifts and bookings stored; slot function with tests | 4f2a9c1 |
195
+ | BK-2 | Visitor books a free slot | public booking with confirmation email (`@softure-ai/mail`) | 9b03e77 |
196
+ | BK-3 | Client cancels by link | cancellation up to 24 h before the visit | c1d5a20 |
197
+ | BK-4 | Staff day view | one screen with the day's bookings | 77e0b4d |
198
+ | BK-5 | Visit reminder | reminder email 24 h before | 2aa61f8 |
199
+ | BK-7 | Booking flow check | online share 41% after 3 weeks (target 50% at 8) | e9f1c03 |
200
+
201
+ Carried over: BK-6 (owner: payment provider) → `roadmaps/roadmap-payments.md`.
202
+ Integration: green 212/212 on e9f1c03.
203
+ ```