bokata 3.0.0-beta.3 → 3.0.0-beta.4

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 (37) hide show
  1. package/.agents/skills/bokata-acceptance-criteria/SKILL.md +6 -7
  2. package/.agents/skills/bokata-acceptance-criteria/resources/output-template-functional.md +3 -3
  3. package/.agents/skills/bokata-acceptance-criteria/resources/output-template.md +1 -1
  4. package/.agents/skills/bokata-feature-map/SKILL.md +10 -11
  5. package/.agents/skills/bokata-feature-mapper/SKILL.md +4 -5
  6. package/.agents/skills/bokata-feature-mapper/resources/output-template.md +1 -1
  7. package/.agents/skills/bokata-feature-slicer/SKILL.md +16 -12
  8. package/.agents/skills/bokata-feature-slicer/resources/output-template-bites.md +12 -4
  9. package/.agents/skills/bokata-feature-slicer/resources/phase-2-increments.md +29 -51
  10. package/.agents/skills/bokata-feature-slicer/resources/{phase-3-baby-steps.md → phase-3-skeleton.md} +3 -3
  11. package/.agents/skills/bokata-feature-slicer/resources/phase-4-bites.md +8 -7
  12. package/.agents/skills/bokata-plan/SKILL.md +21 -15
  13. package/.agents/skills/bokata-plan/resources/plan-template.md +7 -5
  14. package/.agents/skills/bokata-render/SKILL.md +62 -138
  15. package/.agents/skills/bokata-render/assets/story-map.html +428 -0
  16. package/.agents/skills/bokata-render/scripts/render.mjs +703 -0
  17. package/.agents/skills/bokata-shape/SKILL.md +1 -1
  18. package/.agents/skills/bokata-slice/SKILL.md +194 -100
  19. package/.agents/skills/bokata-slice/resources/inc-template.md +36 -0
  20. package/.agents/skills/bokata-slice/resources/slice-template.md +37 -84
  21. package/.agents/skills/bokata-status/SKILL.md +27 -15
  22. package/.agents/skills/bokata-tdd/resources/evidence-rules.md +2 -2
  23. package/LICENSE +21 -0
  24. package/README.md +54 -40
  25. package/agents/bokata-product-designer.md +2 -2
  26. package/agents/bokata-product-engineer.md +2 -2
  27. package/agents/bokata-product-manager.md +3 -3
  28. package/agents/code-executor.md +27 -16
  29. package/agents/design-reviewer.md +2 -2
  30. package/agents/feature-slicer.md +21 -9
  31. package/bin/bokata.js +17 -5
  32. package/package.json +1 -1
  33. package/src/agents.js +36 -11
  34. package/src/config.js +8 -7
  35. package/src/install.js +12 -3
  36. package/.agents/skills/bokata-render/resources/story-map-template.md +0 -835
  37. package/agents/story-map-renderer.md +0 -19
@@ -111,7 +111,7 @@ Propose a size and let the user confirm it:
111
111
  | Size | Meaning | Next |
112
112
  |---|---|---|
113
113
  | **S** | A fix or a tweak; no pitch was really needed | Plan mode + `bokata-tdd` |
114
- | **M** | One clear feature | `bokata-slice` (single-agent mode, the pitch is the feature) |
114
+ | **M** | One clear feature | `bokata-slice` (single mode, the pitch is the feature) |
115
115
  | **L** | Several features | `bokata-feature-map` |
116
116
 
117
117
  Record the size in the pitch and end with one line: `Next: <skill> <slug>`.
@@ -4,19 +4,42 @@ description: Create and grow a vertical slice of 1-4 Features — slice each Fea
4
4
  ---
5
5
 
6
6
  Create and grow a **vertical slice**: a group of 1–4 Features that together give the user a
7
- usable flow. The slice file holds everything about it — how each Feature was sliced, the
7
+ usable flow. The slice holds everything about it — how each Feature was sliced, the
8
8
  increments built so far, and the backlog left — and grows one increment at a time, Walking
9
- Skeleton first. You are the neutral coordinator; the slicing comes from `feature-slicer`
9
+ Skeleton first. It is a short **index** plus a folder of files, so that no operation has to read
10
+ the whole history (see [The slice layout](#the-slice-layout)). You are the neutral coordinator; the slicing comes from `feature-slicer`
10
11
  subagents, and the PM, Designer and Engineer review from their lenses.
11
12
 
12
13
  ```
13
14
  Slice 1–4 Features → a usable flow, end to end; open until the user marks it done
14
15
  ├ Slicing per Feature: User Task → Step → options (F1-2.3), pruned, with a target per Step
15
16
  ├ Increment the Walking Skeleton (Inc 1) or one or more bites the user can see or use
16
- │ └ Plan steps in the initiative's plan.md: written by bokata-plan, checked off by the executor
17
- └ Backlog bites (F1-a …): INVEST groups of options, per User Task, each titled for the user
17
+ │ └ Plan steps in the initiative's plan.md: written by bokata-plan, checked off by the executor,
18
+ │ deleted when the Inc is done
19
+ └ Bites F1-a …: INVEST groups of options, per User Task, each titled for the user; an Inc
20
+ takes some, the rest stay in the Backlog for as long as the slice lives
18
21
  ```
19
22
 
23
+ ### The slice layout
24
+
25
+ ```
26
+ slices/<nn>-<name>.md INDEX: header, Increments (outcome + bites), Backlog (bite lines, proposed increments), links
27
+ slices/<nn>-<name>/inc-<n>.md one Increment: State, Unknowns, Gherkin, rules, its decisions, Pending
28
+ slices/<nn>-<name>/slicing/F<k>.md one Feature's trace (User Task → Step → options)
29
+ slices/<nn>-<name>/notes.md slice-wide Notes and the Trio notes
30
+ slices/<nn>-<name>/pruned.md the Pruned list, one line per option with its reason
31
+ slices/<nn>-<name>/discovery.md the Discovery Context
32
+ ```
33
+
34
+ - **Say it once.** An option, a bite, an outcome or a decision lives in one place. The index repeats
35
+ nothing of an Inc but its name, outcome and bite IDs; the Inc's options are the options of its bites.
36
+ - **State lives only in `inc-<n>.md`** (`State: sliced | planned | done`; `building` is derived from
37
+ the checked steps in `plan.md`). A `done` slice shows every Inc as done.
38
+ - **A decision about one Inc goes in that Inc's file** (`## Decisions and notes of this Inc`);
39
+ `notes.md` holds only what concerns the whole slice.
40
+ - Templates: [slice-template.md](resources/slice-template.md) (the index) and
41
+ [inc-template.md](resources/inc-template.md).
42
+
20
43
  - **Option ≠ bite ≠ increment.** An option is one way to do one Step. A bite groups the
21
44
  options of one or several Steps that make sense together (small, INVEST). An increment is the
22
45
  Walking Skeleton or one or more bites — whatever lets the user see or do something new.
@@ -46,8 +69,8 @@ Read `.bokata.json` at the project root if it exists. Defaults:
46
69
  ```
47
70
 
48
71
  `<docs>` below is the `docs` value. `templates.slice: null` means
49
- [resources/slice-template.md](resources/slice-template.md). The story map is rendered by the
50
- `story-map-renderer` subagent (skill `bokata-render`); this skill only dispatches it.
72
+ [resources/slice-template.md](resources/slice-template.md). The story map is drawn by the
73
+ `bokata-render` script from the markdown; this skill only runs it.
51
74
 
52
75
  ## Operations
53
76
 
@@ -55,6 +78,7 @@ Read `.bokata.json` at the project root if it exists. Defaults:
55
78
  |------|------|
56
79
  | `bokata-slice [<features…>]` | **New slice**: Steps 1–6 below |
57
80
  | `bokata-slice <nn> --next` | **Next increment** of an open slice — see [Next increment](#next-increment---next) |
81
+ | `bokata-slice <nn> --check` | Validate the slice and the initiative's markdown (runs the render script's `--check`) |
58
82
  | `bokata-slice <nn> --done` | Mark the slice **done** — see [Done](#done---done) |
59
83
 
60
84
  ## Mode
@@ -65,8 +89,9 @@ Read `.bokata.json` at the project root if it exists. Defaults:
65
89
  `features.md` carrying `<!-- Mode: single -->`. The pitch is the one Feature. Still dispatch
66
90
  one `feature-slicer` subagent; run every trio step yourself, one lens at a time. The first
67
91
  time, create `features.md` from the features template with **only** that Feature (name and
68
- `Purpose` from the pitch, its User Task names from the slicer) and its `**Slice:**` line, and
69
- put `<!-- Mode: single -->` under its header comment.
92
+ `Purpose` from the pitch, its User Tasks from [Step 1b](#step-1b-single-mode-only-derive-the-user-tasks))
93
+ and its `**Slice:**` line, and put `<!-- Mode: single -->` under its header comment. There are
94
+ no functional ACs in single mode: the Coverage check is skipped (see the gate).
70
95
 
71
96
  The user can force either mode.
72
97
 
@@ -84,7 +109,19 @@ order) and never change. Option IDs build on them: `F2-3.1` = Feature 2, Step 3,
84
109
  given. For the first slice, recommend the group that makes the journey usable end to end. A
85
110
  Feature that already has a slice cannot be picked again — offer `bokata-slice <nn> --next` on
86
111
  that slice instead.
87
- 3. `mkdir -p <docs>/<initiative-slug>/slices/`.
112
+ 3. Number the new slice (`01`, `02`, … after the existing ones) and `mkdir -p
113
+ <docs>/<initiative-slug>/slices/<nn>-wip/work`. This **work folder** holds the discovery and the
114
+ slicers' output while the slice is being made; Step 5 turns it into the final layout and deletes it.
115
+ Every subagent below receives **paths into it, never pasted content**.
116
+
117
+ ## Step 1b: Single mode only — derive the User Tasks
118
+
119
+ A pitch has no User Tasks, and the slicer needs them as input. Before Step 2, read the pitch's
120
+ Solution and Problem and propose **3–6 User Tasks** (`[Verb] [Object]`, no actor, each something
121
+ the user does that has observable value, in the journey order). Show them as one numbered round
122
+ with your recommendation ("yes" accepts the list; the user can rename, merge, split or add).
123
+ The confirmed list is what the slicer receives and what goes into `features.md`. Skip this step
124
+ in trio mode: the backbone already has them.
88
125
 
89
126
  ---
90
127
 
@@ -108,7 +145,8 @@ If the input is already rich, say so and ask only about what is missing:
108
145
 
109
146
  Produce one `## Discovery Context — Slicer: [Feature Names]` block: Technical Clarifications /
110
147
  Layer Decisions / Increment Boundaries / Deferred (scope cuts) / Dependencies Confirmed /
111
- Constraints Noted / Assumptions. Every subagent below receives it.
148
+ Constraints Noted / Assumptions, and **write it to `slices/<nn>-wip/work/discovery.md`**. Every
149
+ subagent below receives its path.
112
150
 
113
151
  ---
114
152
 
@@ -127,23 +165,31 @@ agent, which runs the `bokata-feature-slicer` skill with its resources.
127
165
  ```
128
166
  subagent_type: feature-slicer
129
167
  prompt: "Slice this Feature. Feature code: F<n>.
130
- - Feature: [name, ID, Purpose, every User Task and System Task with its description — from features.md]
131
- - Discovery Context: [from Step 2]
168
+ - Feature: [name and ID] — its Purpose, User Tasks and System Tasks are in <docs>/<slug>/features.md
169
+ (in single mode, the confirmed list of Step 1b was written there)
170
+ - Discovery Context: <docs>/<slug>/slices/<nn>-wip/work/discovery.md
132
171
  - Constitution / glossary paths: [from .bokata.json]
133
- - Functional ACs — open ONLY for the Phase 3 coverage check: [this Feature's Requirements + Scenarios]
134
- Read the skill and all its resources first. Run all four phases, including Phase 4 (prune with a
135
- reason, a target per Step, INVEST bites). Return the full output (Slicing trace, Coverage,
136
- Walking Skeleton proposal, Pruned, Bites, Self-check, Assumptions)."
172
+ - Functional ACs — open ONLY for the Phase 3 coverage check: this Feature's Requirements + Scenarios
173
+ in features.md [in single mode: "none — skip the coverage check"]
174
+ - Output file (the only file you may write): <docs>/<slug>/slices/<nn>-wip/work/F<n>.md
175
+ Read the skill and all its resources first (they are in .agents/skills/bokata-feature-slicer/). Run all four phases, including Phase 4 (prune with a
176
+ reason, a target per Step, INVEST bites). Write the full output (Slicing trace, Coverage,
177
+ Walking Skeleton proposal, Pruned, Bites, Self-check, Assumptions) to the output file and reply in at most
178
+ 8 lines: the path and the Self-check counts."
137
179
  ```
138
180
 
139
181
  ### 3b. Gate — check each trace before anyone reviews it
140
182
 
141
- For every returned trace, check mechanically (count, do not judge):
183
+ Read each `work/F<n>.md` once and, for every trace, check mechanically (count, do not judge):
142
184
  - [ ] Every User Task of the Feature has Steps, each with a layer
143
- - [ ] Every Step has ≥3 options and a `strategies:` line with ≥2 strategies
185
+ - [ ] Every Step had ≥3 options **before pruning**: its live options in the trace plus its entries
186
+ in `### Pruned` (the Step is the number in the option ID, `F5-4.1` → Step 4) add up to ≥3,
187
+ and the Self-check's `min n/Step` agrees. Pruning deliberately leaves fewer than 3 in the trace.
188
+ - [ ] Every Step has a `strategies:` line with ≥2 strategies
144
189
  - [ ] Every Step has a cheap-family option (crutch, fake/hardcoded data, zero/one/many, simplified
145
190
  workflow, basic utility) or a one-line reason why not
146
- - [ ] Every Requirement of the Feature appears in `### Coverage`
191
+ - [ ] Every Requirement of the Feature appears in `### Coverage` (single mode has none:
192
+ `### Coverage` says `none — no functional ACs`)
147
193
  - [ ] Every `Deferred` item from the Discovery Context appears as a `deferred` option
148
194
  - [ ] The Walking Skeleton proposal uses option IDs and covers every User Task
149
195
  - [ ] Every pruned option appears in `### Pruned` with one of the four reasons, is gone from the
@@ -155,22 +201,35 @@ For every returned trace, check mechanically (count, do not judge):
155
201
  - [ ] `deferred` options sit in their own bites; no dependency cycle between bites
156
202
  - [ ] The Self-check counts match the trace
157
203
 
158
- If a trace fails, re-dispatch **that** slicer with the failed items listed ("S4 has 2 options;
159
- S7 has no cheap option; R3 missing from Coverage; F5-6.4 is in no bite; Step S9 has no target"). Do not patch the trace yourself. At most two
160
- retries; then show the user what is still missing.
204
+ If a trace fails, re-dispatch **that** slicer with the failed items listed ("S4 had 2 options
205
+ before pruning; S7 has no cheap option; R3 missing from Coverage; F5-6.4 is in no bite; Step S9
206
+ has no target") **and the path of its previous output**: the new subagent has no memory, so it fixes that
207
+ file instead of slicing again from scratch. Do not patch the trace yourself. At most two retries; then
208
+ show the user what is still missing.
209
+
210
+ ### 3b-bis. Resolve cross-Feature dependencies
211
+
212
+ Each slicer sees only its own Feature, so a bite that needs another Feature says
213
+ `depends on: F7 (<what it needs>)`, never a bite ID of F7. Once every trace passes the gate, edit the
214
+ work files to replace
215
+ each such reference with the ID of the bite of that Feature that provides what is needed (or
216
+ `Inc 1` if its skeleton does). If no bite does, note it under `## Trio notes` as a gap and ask the
217
+ user in the decision point of 3d. Then check there is no dependency cycle across Features.
161
218
 
162
219
  ### 3c. Wave 2 — Trio review of the full traces (parallel)
163
220
 
164
221
  The trio reviews **the complete traces and the bites**, not a summary: they can only miss
165
- options they can see, and only object to a pruning they can read.
222
+ options they can see, and only object to a pruning they can read. They are given the **paths** of the
223
+ files (`work/F<n>.md`, `work/discovery.md`, `features.md`) and read them themselves: you never paste a
224
+ trace into a prompt, so the traces are not written out again three times.
166
225
 
167
226
  **Task 1: bokata-product-manager**
168
227
  ```
169
228
  subagent_type: bokata-product-manager
170
229
  prompt: "Review the slicing of [Features] from the value/viability lens. You have:
171
- - Full slicing traces (Steps, options, coverage, Walking Skeleton proposal, Pruned, Bites): [paste every trace as returned]
172
- - Backbone + functional ACs: [paste]
173
- - Discovery Context: [paste]
230
+ - Full slicing traces (Steps, options, coverage, Walking Skeleton proposal, Pruned, Bites), one file per Feature: [the paths of every work/F<n>.md]
231
+ - Backbone + functional ACs (single mode: the pitch and the confirmed User Tasks): <docs>/<slug>/features.md [and the pitch path]
232
+ - Discovery Context: <docs>/<slug>/slices/<nn>-wip/work/discovery.md
174
233
  Do NOT ask the user questions. Focus on: Is the skeleton the minimum that still gives observable
175
234
  value end to end? Is a cheaper option (fake data, manual crutch, one case only) missing for any
176
235
  Step — propose it with its Step ID. Which options unlock the most value next? Also review the
@@ -184,9 +243,9 @@ your review in the format specified in your agent file (Bites section included).
184
243
  ```
185
244
  subagent_type: bokata-product-designer
186
245
  prompt: "Review the slicing of [Features] from the UX/UI lens. You have:
187
- - Full slicing traces: [paste]
188
- - Backbone + functional ACs: [paste]
189
- - Discovery Context: [paste]
246
+ - Full slicing traces, one file per Feature: [the paths of every work/F<n>.md]
247
+ - Backbone + functional ACs (single mode: the pitch and the confirmed User Tasks): <docs>/<slug>/features.md [and the pitch path]
248
+ - Discovery Context: <docs>/<slug>/slices/<nn>-wip/work/discovery.md
190
249
  Do NOT ask the user questions. Focus on: Does the skeleton combine into a coherent minimal
191
250
  experience across the Features? Which UI states are essential to the skeleton and which can wait?
192
251
  Is a cheaper UI option (static screen, one state only, existing component) missing for any Step —
@@ -201,9 +260,9 @@ specified in your agent file (Bites section included)."
201
260
  ```
202
261
  subagent_type: bokata-product-engineer
203
262
  prompt: "Review the slicing of [Features] from the feasibility/technical-sustainability lens. You have:
204
- - Full slicing traces: [paste]
205
- - Backbone + functional ACs: [paste]
206
- - Discovery Context: [paste]
263
+ - Full slicing traces, one file per Feature: [the paths of every work/F<n>.md]
264
+ - Backbone + functional ACs (single mode: the pitch and the confirmed User Tasks): <docs>/<slug>/features.md [and the pitch path]
265
+ - Discovery Context: <docs>/<slug>/slices/<nn>-wip/work/discovery.md
207
266
  Do NOT ask the user questions. Focus on: Are Steps and layers sound? Is each skeleton option
208
267
  reversible, and which shortcuts are safe to revisit vs dangerous? Is a cheaper technical option
209
268
  (in-memory, hardcoded, existing service, manual step) missing for any Step — propose it with its
@@ -254,6 +313,11 @@ across the picked Features, so the flow works end to end. Then:
254
313
  - Options the user moves into Inc 1 leave their bite; if that empties a bite, remove it; if
255
314
  it breaks another bite's `depends on`, repoint it to `Inc 1`. The bites left stay the
256
315
  backlog.
316
+ - **Group the skeleton into skeleton bites.** An Inc is always made of bites, so that the story map
317
+ draws it as cards. Make one **skeleton bite per User Task** the skeleton covers: ID `F<n>-w<k>`
318
+ (`F1-w1`, `F1-w2`, … — the `w` plus a digit never collides with a slicer's letter IDs), a title with
319
+ a subject that says what the user does in that User Task *with the shortcut* ("Ana picks a hardcoded
320
+ clip"), tagged `(skeleton)`, its options, `→ Inc 1`. Show the titles to the user with the rest of Inc 1.
257
321
 
258
322
  ### Proposed increments
259
323
 
@@ -279,6 +343,12 @@ next", the Engineer's dependencies); you add no new opinion on value.
279
343
  Used by a new slice (for Inc 1) and by `--next` (for the new increment). Never write concrete ACs
280
344
  for options still in the backlog.
281
345
 
346
+ **Subagents get paths, not pasted content.** Where the prompts below say *the trace files* and *the
347
+ Discovery Context*, give the paths: for a new slice `slices/<nn>-wip/work/F<n>.md` and
348
+ `slices/<nn>-wip/work/discovery.md`; for `--next` the final `slices/<nn>-<name>/slicing/F<n>.md` and
349
+ `slices/<nn>-<name>/discovery.md`. The increments already in the slice are the `## Increments` of the
350
+ index.
351
+
282
352
  ### 4a. Trio contributes Rules (Subagents, Parallel)
283
353
 
284
354
  One message, three foreground calls, wait for all three:
@@ -287,10 +357,10 @@ One message, three foreground calls, wait for all three:
287
357
  ```
288
358
  subagent_type: bokata-product-manager
289
359
  prompt: "Contribute business-rule Rules for increment [Inc n] of slice [nn], from the viability/value lens. You have:
290
- - The increment: [name, option IDs with their one-line descriptions, User Task tags]
291
- - Increments already in the slice (for context): [one line each]
292
- - Backbone + functional ACs of the touched User Tasks: [paste]
293
- - Discovery Context: [paste]
360
+ - The increment: [its outcome, its bites (ID and title) and their option IDs — what each option means is in the trace files: <paths>]
361
+ - Increments already in the slice (for context): the `## Increments` of <index path>
362
+ - Backbone + functional ACs of the touched User Tasks: <docs>/<slug>/features.md — [the User Task names to read]
363
+ - Discovery Context: [path of discovery.md]
294
364
  Do NOT ask the user questions. Give launch-blocking rules for this increment and the value it
295
365
  unlocks. Respect its shortcuts: an option marked fake/hardcoded/manual gets rules for what the user
296
366
  sees, not for the real thing. Format per your agent file (Contributed Rules — PM Lens)."
@@ -300,10 +370,10 @@ sees, not for the real thing. Format per your agent file (Contributed Rules —
300
370
  ```
301
371
  subagent_type: bokata-product-designer
302
372
  prompt: "Contribute UX/UI Rules for increment [Inc n] of slice [nn], from the usability/craft lens. You have:
303
- - The increment: [name, option IDs with descriptions, User Task tags]
304
- - Increments already in the slice: [one line each]
305
- - Backbone + functional ACs of the touched User Tasks: [paste]
306
- - Discovery Context: [paste]
373
+ - The increment: [its outcome, its bites (ID and title) and their option IDs — what each option means is in the trace files: <paths>]
374
+ - Increments already in the slice: the `## Increments` of <index path>
375
+ - Backbone + functional ACs of the touched User Tasks: <docs>/<slug>/features.md — [the User Task names to read]
376
+ - Discovery Context: [path of discovery.md]
307
377
  Do NOT ask the user questions. Give the UI states, component reuse and interaction patterns this
308
378
  increment needs — no more than its options promise. Format per your agent file (Contributed Rules — Designer Lens)."
309
379
  ```
@@ -312,10 +382,10 @@ increment needs — no more than its options promise. Format per your agent file
312
382
  ```
313
383
  subagent_type: bokata-product-engineer
314
384
  prompt: "Contribute technical Rules for increment [Inc n] of slice [nn], from the feasibility/sustainability lens. You have:
315
- - The increment: [name, option IDs with descriptions, User Task tags]
316
- - Increments already in the slice: [one line each]
317
- - Backbone + functional ACs of the touched User Tasks: [paste]
318
- - Discovery Context: [paste]
385
+ - The increment: [its outcome, its bites (ID and title) and their option IDs — what each option means is in the trace files: <paths>]
386
+ - Increments already in the slice: the `## Increments` of <index path>
387
+ - Backbone + functional ACs of the touched User Tasks: <docs>/<slug>/features.md — [the User Task names to read]
388
+ - Discovery Context: [path of discovery.md]
319
389
  Do NOT ask the user questions. Give data shape, contracts, guards and boundary rules for this
320
390
  increment, and whether it builds on earlier increments or reshapes them. Format per your agent
321
391
  file (Contributed Rules — Engineer Lens)."
@@ -326,9 +396,9 @@ file (Contributed Rules — Engineer Lens)."
326
396
  Merge the three contributions into one enrichment block (de-duplicated). Then:
327
397
  ```
328
398
  bokata-acceptance-criteria --concrete
329
- Input: [the increment: name, option IDs and descriptions, User Task tags]
399
+ Input: [the increment: outcome, bites (ID and title), option IDs; the trace files hold what each option means: <paths>]
330
400
  Enrichment: [consolidated Rules]
331
- Discovery Context: [from Step 2]
401
+ Discovery Context: [path of discovery.md]
332
402
  Instruction: "Skip your own Phase 0 discovery — it has been resolved upstream. Proceed directly to
333
403
  Phase 1 (Input Analysis) through Phase 3 (Generate Output), using --concrete depth. Write
334
404
  scenarios only for this increment, with concrete example data. Return the ## Acceptance Criteria
@@ -352,35 +422,41 @@ and formats in `.bokata.json` win over the domain skill's own.
352
422
 
353
423
  ## Step 5: Write the Slice & the Summary
354
424
 
355
- 1. Number the slice (`01`, `02`, … after the existing ones) and **write**
356
- `<docs>/<initiative-slug>/slices/<nn>-<name>.md` from the slice template:
357
- - header with `Status: open` and `Current increment: Inc 1 — sliced`;
358
- - `## Slicing`: one `<details>` block per Feature with its reconciled trace (Steps, options,
359
- strategies, targets, bite of each live option, Coverage) exactly as the slicer wrote it
360
- plus the trio's added options; append `→ Inc 1` to every option Inc 1 took (replacing the slicer's `skeleton` marker). The block is
361
- folded: the owner reads the Backlog, not the trace;
362
- - `## Increments`: `### Inc 1 — Walking skeleton: <…> **[UT]** …` with `Options:`, `Bites:`,
363
- `Unknowns:`, an empty `Parallel-safe:`, the concrete Gherkin and the pointer line
364
- `Plan: → ../plan.md (Slice <nn> · Inc 1)` (the plan and the test mapping live in `plan.md`,
365
- written by `bokata-plan`; never put steps or `Tests:` in the slice);
366
- - `## Backlog`: **the bites**, grouped by User Task and ordered by value (must-have first,
367
- `~nice-to-have` after), each on one line in the template's shape (title, options, `depends on`, value,
368
- check) and — once an Inc takes it — `→ Inc n` after its priority tag; `deferred` bites in
369
- their own group. The story map draws every bite without `→ Inc n`. Never a flat list of
370
- option IDs. Put **`### Proposed increments`** above the bites: see
371
- [Proposed increments](#proposed-increments);
372
- - `## Notes`: include a `Pruned` line (count by reason) and keep the full `### Pruned` list
373
- there; `## Trio notes`.
425
+ 1. Name the slice (the user chose the name in 3e), rename `slices/<nn>-wip` to `slices/<nn>-<name>`,
426
+ `mkdir -p slices/<nn>-<name>/slicing`, and **write** the files of [The slice layout](#the-slice-layout)
427
+ from the (reconciled) files in `work/`. **Copy, do not retype**: cut each section out of
428
+ `work/F<k>.md` with the shell (`sed -n`, `awk`, `node -e`) or your editor instead of writing it out
429
+ again — a trace is tens of KB.
430
+ - `slices/<nn>-<name>/slicing/F<k>.md` — one per Feature: the `## Slicing` … `### Coverage` part of
431
+ `work/F<k>.md` (the Walking Skeleton proposal, Pruned, Bites and Self-check go elsewhere; the
432
+ Assumptions to `notes.md`): its reconciled trace (Steps, options,
433
+ strategies, targets, bite of each live option, Coverage) exactly as the slicer wrote it plus the
434
+ trio's added options; append `→ Inc 1` to every option Inc 1 took (replacing the slicer's
435
+ `skeleton` marker);
436
+ - `slices/<nn>-<name>/inc-1.md` from [inc-template.md](resources/inc-template.md): `State: sliced`,
437
+ `Unknowns:`, an empty `Parallel-safe:` and the concrete ACs (fixtures, Rules, Gherkin) exactly as
438
+ returned. The Inc's name, outcome and bites are **not** repeated here — they are in the index;
439
+ - `slices/<nn>-<name>/pruned.md` (the full `### Pruned` list, with its count by reason),
440
+ `notes.md` (`# Notes` and `## Trio notes`) and `discovery.md` (`work/discovery.md`, moved);
441
+ then **delete `work/`**;
442
+ - the index `slices/<nn>-<name>.md` from [slice-template.md](resources/slice-template.md):
443
+ header with `Status: open`; `## Increments` with `### Inc 1 — Walking skeleton`, its
444
+ `Outcome:` (one sentence in user language), `Bites:` (the skeleton bites of 3e) and `Detail:` link;
445
+ `## Backlog` with **every bite**, grouped by Feature and User Task and ordered by value (must-have
446
+ first, `~nice-to-have` after), each on one line **copied as the slicer returned it** (the
447
+ canonical bite line of `output-template-bites.md`; never reformat it), the skeleton bites as
448
+ `(skeleton) → Inc 1` lines and `→ Inc n` after the priority tag of every bite an Inc took;
449
+ `deferred` bites (`F1-d1`, …) in their own group; never a flat list of option IDs. Put
450
+ **`### Proposed increments`** above the bites: see [Proposed increments](#proposed-increments);
451
+ and `## Files` linking everything above.
374
452
  2. In `features.md`, set each picked Feature's `**Slice:**` line:
375
453
  `**Slice:** → <nn>-<name> · <taken>/<total> options · next: <bite ID> <bite title>`.
376
454
  Nothing else about the slicing goes into `features.md`.
377
- 3. **Dispatch the story-map update** (if `story_map`): the `story-map-renderer` subagent, in
378
- background, without waiting — operation `slice-added` when `story-map.html` exists, otherwise
379
- `rebuild`:
380
- ```
381
- subagent → story-map-renderer (bokata-render)
382
- input: <docs>/<initiative-slug>/ — operation: slice-added — slice: slices/<nn>-<name>.md — increment: Inc 1
455
+ 3. **Refresh the story map** (if `story_map`): run the `bokata-render` script, in the foreground:
456
+ ```bash
457
+ node .agents/skills/bokata-render/scripts/render.mjs <docs>/<initiative-slug>
383
458
  ```
459
+ If it prints a `file:line: problem`, the slice or `features.md` broke the format: fix it and run it again.
384
460
 
385
461
  ---
386
462
 
@@ -389,17 +465,18 @@ and formats in `.bokata.json` win over the domain skill's own.
389
465
  - [ ] Every picked Feature was sliced by a `feature-slicer` subagent and passed the gate
390
466
  - [ ] The trio reviewed the full traces and the bites; their added options are in the Slicing
391
467
  and each in exactly one bite
392
- - [ ] The slice file has Slicing, Inc 1 with concrete Gherkin, Backlog of bites, Notes (with
393
- Pruned), Trio notes
468
+ - [ ] The slice has its index (Inc 1 with outcome and skeleton bites, Backlog of bites) and its
469
+ folder: `inc-1.md` with concrete Gherkin, `slicing/F<k>.md` per Feature, `notes.md`, `pruned.md`,
470
+ `discovery.md`
394
471
  - [ ] `features.md` gained only a `**Slice:**` line per picked Feature
395
- - [ ] The renderer was dispatched (if `story_map`)
472
+ - [ ] The `bokata-render` script ran without errors (if `story_map`)
396
473
 
397
474
  Print:
398
475
  ```
399
476
  ## ✓ Slice Ready
400
477
 
401
478
  **Slice:** <nn>-<name> — Features: {{FEATURES}} · open
402
- **Location:** <docs>/{{INITIATIVE_SLUG}}/slices/<nn>-<name>.md
479
+ **Location:** <docs>/{{INITIATIVE_SLUG}}/slices/<nn>-<name>.md (+ the folder <nn>-<name>/)
403
480
 
404
481
  **Inc 1 (Walking Skeleton):** {{ONE_LINE}} · {{NUM_OPTIONS}} options · {{NUM_GHERKIN_BLOCKS}} scenarios
405
482
  **Slicing:** {{NUM_STEPS}} Steps · {{NUM_OPTIONS_TOTAL}} options ({{NUM_PRUNED}} pruned) · {{NUM_BITES}} bites in the backlog ({{NUM_MUST}} must-have · {{NUM_NICE}} nice-to-have · {{NUM_DEFERRED}} deferred)
@@ -418,44 +495,57 @@ After Inc 1 is built: `bokata-slice <nn> --next`.
418
495
  For an **open** slice whose current increment is built (or when the user wants to queue the next
419
496
  one):
420
497
 
421
- 1. Read the slice file: Slicing, Increments, Backlog (the bites), Notes (built increments may
422
- have discovered work), and the functional ACs of its Features from `features.md`.
498
+ 1. Read the **index** (`Increments`, `Backlog` — the bites), `notes.md`, `pruned.md`, and the
499
+ `slicing/F<k>.md` of the Features whose bites you may take; read an `inc-<n>.md` only for an Inc
500
+ you must reason about (its `Pending` and decisions). Also the functional ACs of the Features from
501
+ `features.md`. Do not read the Gherkin of the Incs already built.
423
502
  2. Propose the next increment as **one or several bites** (of one or several User Tasks) that
424
503
  unlock the most value on top of what is built; start from the first row of
425
504
  `### Proposed increments` and adjust it to what is built and pruned: respect `depends on`, take must-have before
426
505
  nice-to-have, keep it small. Show 2–3 candidates, each as one line of what the user can do +
427
- bite IDs and titles + `**[UT]**` tags, with your recommendation first. The user picks, edits
506
+ bite IDs and titles, with your recommendation first. The user picks, edits
428
507
  or writes their own. One increment per call. Bites are already reviewed by the trio; you
429
508
  compose between them, you do not untie 180 loose options again.
430
509
  3. If the user asks for something no bite has, add it as a new option to its Step (next free
431
510
  ID, with its strategy) **and to a bite** (new or existing) before using it — the Slicing
432
511
  stays the source of truth.
433
512
  4. **Re-prune.** The increment just chosen raises the floor for its Steps: any live option, in any
434
- bite, that now sits below what the increment builds is `obsolete`. **Never prune an option an Inc
435
- has taken** (`→ Inc n`): the story map resolves each Inc's `Options:` through the Slicing; remove it, list it under
436
- `### Pruned` in `## Notes` with its reason. Bites left with no options go away; a bite
437
- whose value shrank is reworded or merged. A removal that would take value away from a bite
513
+ bite, that now sits below what the increment builds is `obsolete`. Delete it from its
514
+ `slicing/F<k>.md` and list it in `pruned.md` with its reason. **Never prune an option an Inc
515
+ has taken** (`→ Inc n`): the story map resolves each Inc's options through the Slicing, so
516
+ those stay. Bites left with no options go away; a bite whose value shrank is reworded or merged. A removal that would take value away from a bite
438
517
  goes to the user as one decision point, with your recommended default.
439
518
  5. Run **Step 4** (trio Rules → concrete ACs → domain pass) for this increment only.
440
519
  6. **Redo `### Proposed increments`** for the bites that are left (drop the row of the Inc just
441
- added, reorder the rest if the pruning or what was built changed it).
442
- Append `### Inc <n> — <…>` to `## Increments` (same shape as Inc 1: `Options:` lists the option IDs
443
- of the bites it takes — plan and executor read those — and a `Bites:` line names the bite IDs),
444
- append `→ Inc <n>` to the options and to the bites it took (in `## Backlog`, after the priority
445
- tag), and set `Current increment: Inc <n> — sliced`.
520
+ added, reorder the rest if the pruning or what was built changed it). Add to the index
521
+ `### Inc <n> — <short name>` with its `Outcome:` (one sentence, user language), `Bites:` and `Detail:`
522
+ link; append `→ Inc <n>` to the bites it took in `## Backlog` (after the priority tag) and to the
523
+ options in their `slicing/F<k>.md`; write `slices/<nn>-<name>/inc-<n>.md` from
524
+ [inc-template.md](resources/inc-template.md) with `State: sliced` and the concrete ACs.
446
525
  7. Update each touched Feature's `**Slice:**` line in `features.md` (`next: <bite ID> <title>`).
447
- 8. Dispatch the renderer with operation `slice-added` and `increment: Inc <n>`.
526
+ 8. Run the `bokata-render` script (Step 5.3).
448
527
  9. Print the Inc line, scenarios count, bites left in the backlog, what was pruned, and the next
449
528
  step (`bokata-plan`).
450
529
 
451
530
  ## Done (`--done`)
452
531
 
453
- Only when the user asks — nothing marks a slice done by itself. Set `Status: done` in the slice
454
- header, add a closing line to `## Notes` (what is built, which bites stay in the backlog), update
455
- the `**Slice:**` lines in `features.md` with `· done`, and dispatch the renderer with
456
- `state-sync`. The backlog stays in the slice file; to build more of these Features later, the user
457
- reopens this slice (`Status: open`) — never a new slice for the same Feature. A done *slice* is not
458
- a done *increment*: the header's `Current increment: Inc <n> — done` is set by the executor.
532
+ Only when the user asks — nothing marks a slice done by itself. First **sweep**: read every
533
+ `inc-<n>.md` and `plan.md`'s section for this slice and **list what is still open** — an Inc whose
534
+ `State` is not `done`, unchecked steps in `plan.md`, a `## Pending` item — and ask the user whether to
535
+ go on. Then set `Status: done` in the index header, add a closing line to `notes.md` (what is built,
536
+ which bites stay in the backlog), delete this slice's section from `plan.md` if it still has one,
537
+ update the `**Slice:**` lines in `features.md` with `· done`, and run the `bokata-render` script. The
538
+ backlog stays in the index; to build more of these Features later, the user reopens this slice
539
+ (`Status: open`) — never a new slice for the same Feature. A done *slice* is not a done *increment*: the
540
+ `State: done` of an Inc is set by the executor, and a done slice renders all its Incs as done.
541
+
542
+ ## Check (`--check`)
543
+
544
+ Run `node .agents/skills/bokata-render/scripts/render.mjs <docs>/<initiative-slug> --check`: it parses
545
+ `features.md`, the slices and `plan.md` with the same parser the story map uses and prints every
546
+ `file:line: problem` (an Inc naming a bite that has no line, a bite whose option is not in the
547
+ Slicing, an Inc with no `inc-<n>.md`, an unknown `State`, …) without writing anything. Report them; fix
548
+ the markdown, never the parser.
459
549
 
460
550
  ---
461
551
 
@@ -463,13 +553,17 @@ a done *increment*: the header's `Current increment: Inc <n> — done` is set by
463
553
 
464
554
  - [ ] Discovery Context present; scope cuts recorded as Deferred, not removed
465
555
  - [ ] Wave 1 issued in one message, one `feature-slicer` per Feature; no Feature sliced inline
466
- - [ ] Every trace passed the gate (≥3 options and ≥2 strategies per Step, cheap option, full Coverage,
467
- pruned with a reason, a target per Step, every live option in exactly one bite)
556
+ - [ ] Every trace passed the gate (≥3 options before pruning and ≥2 strategies per Step, cheap option,
557
+ full Coverage, pruned with a reason, a target per Step, every live option in exactly one bite)
558
+ - [ ] Cross-Feature `depends on: F<n> (…)` references were resolved to bite IDs, with no cycle
468
559
  - [ ] Wave 2 (trio) saw the full traces and the bites and completed before reconciliation
469
- - [ ] The Backlog lists bites with user-language titles, never loose option IDs
560
+ - [ ] The Backlog lists bites with user-language titles, never loose option IDs; every Inc (Inc 1 too) is made of bites
561
+ - [ ] Nothing is said twice: an Inc's outcome and bites only in the index, its State only in its `inc-<n>.md`, its decisions in that file
470
562
  - [ ] `### Proposed increments` exists: every must-have bite in exactly one row, dependencies respected, a reason per row
471
- - [ ] Inc 1 covers every User Task of the picked Features, as option IDs
472
- - [ ] Concrete ACs exist only for the increment being added, in full Gherkin with concrete data
563
+ - [ ] Inc 1 covers every User Task of the picked Features, as skeleton bites
564
+ - [ ] Concrete ACs exist only for the increment being added (in its `inc-<n>.md`), in full Gherkin with concrete data
473
565
  - [ ] No duration written anywhere
474
566
  - [ ] `features.md` holds only the summary `**Slice:**` line per Feature
475
- - [ ] The renderer was dispatched right after the slice file was final
567
+ - [ ] No subagent prompt contains a pasted trace, report or Discovery Context: only paths
568
+ - [ ] The `work/` folder is gone and `slices/<nn>-wip` was renamed
569
+ - [ ] The `bokata-render` script ran right after the slice was final
@@ -0,0 +1,36 @@
1
+ <!-- ONE INCREMENT: slices/<nn>-<name>/inc-<n>.md. Written by `bokata-slice` when the Inc enters; after
2
+ that the owner edits Unknowns and decisions, `bokata-plan` sets the State to planned, and the
3
+ executor sets it to done. The Inc's name, outcome and bites are in the slice index: do not copy
4
+ them here. -->
5
+
6
+ # Inc <n> — <short name>
7
+
8
+ - State: sliced | planned | done <!-- sliced: ACs written · planned: bokata-plan wrote its steps · done: built (the executor sets it). "building" is not written: it is derived from the checked steps of plan.md -->
9
+ - Unknowns: <open questions, or "none">
10
+ - Parallel-safe: <yes | no — set by bokata-plan>
11
+
12
+ <concrete Acceptance Criteria returned by bokata-acceptance-criteria --concrete: the fixtures, the
13
+ Rules and, under `#### [<User Task>]`, the Gherkin scenarios — kept exactly as returned>
14
+
15
+ ```gherkin
16
+ Scenario: <concrete name>
17
+ Given <concrete data>
18
+ When <action>
19
+ Then <observable result>
20
+ ```
21
+
22
+ ## Decisions and notes of this Inc
23
+
24
+ <!-- What the owner and the trio decided about THIS increment, and what building it discovered.
25
+ Slice-wide decisions go in notes.md. Optional until there is something to say. -->
26
+
27
+ - Owner decision: <…>
28
+
29
+ ## Pending
30
+
31
+ <!-- Added by the executor when the Inc is closed: only what is NOT in the code — a manual or owner check
32
+ still to do (a phone test, a real-device walkthrough), a scenario no automated test covers. The
33
+ plan.md section of a done Inc is deleted; this is all that survives of it. Omit the section when
34
+ nothing is pending. -->
35
+
36
+ - <manual check not done yet>