bokata 3.0.0-beta.3 → 3.0.0-beta.5

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 (38) 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 +71 -138
  15. package/.agents/skills/bokata-render/assets/story-map.html +590 -0
  16. package/.agents/skills/bokata-render/scripts/render.mjs +784 -0
  17. package/.agents/skills/bokata-shape/SKILL.md +12 -2
  18. package/.agents/skills/bokata-shape/resources/pitch-template.md +3 -0
  19. package/.agents/skills/bokata-slice/SKILL.md +193 -100
  20. package/.agents/skills/bokata-slice/resources/inc-template.md +36 -0
  21. package/.agents/skills/bokata-slice/resources/slice-template.md +36 -84
  22. package/.agents/skills/bokata-status/SKILL.md +27 -15
  23. package/.agents/skills/bokata-tdd/resources/evidence-rules.md +2 -2
  24. package/LICENSE +21 -0
  25. package/README.md +54 -40
  26. package/agents/bokata-product-designer.md +2 -2
  27. package/agents/bokata-product-engineer.md +2 -2
  28. package/agents/bokata-product-manager.md +3 -3
  29. package/agents/code-executor.md +27 -16
  30. package/agents/design-reviewer.md +2 -2
  31. package/agents/feature-slicer.md +21 -9
  32. package/bin/bokata.js +17 -5
  33. package/package.json +1 -1
  34. package/src/agents.js +36 -11
  35. package/src/config.js +8 -7
  36. package/src/install.js +12 -3
  37. package/.agents/skills/bokata-render/resources/story-map-template.md +0 -835
  38. package/agents/story-map-renderer.md +0 -19
@@ -11,8 +11,7 @@ The **Acceptance Criteria Generator** transforms User Tasks and requirements int
11
11
 
12
12
  This skill is flexible and methodology-agnostic regarding timing. It can generate criteria from a Feature Backbone, detailed Step Analysis, or raw User Stories.
13
13
 
14
- > **When to use this vs `feature-backbone-specialist`:**
15
- > `feature-backbone-specialist` generates **preliminary** Gherkin inline during backbone mapping — enough to validate scope and capture the happy path. Use **this skill** when you need **thorough coverage**: full edge cases, permission scenarios, boundary conditions, error states, and concurrency rules. Typically invoked after the backbone exists and for User Tasks that need production-grade specs.
14
+ > **Where it fits:** `bokata-feature-map` calls it with `--functional` (a few Requirements per User Task, written into `features.md`) and `bokata-slice` calls it with `--concrete` for **one increment** at a time. Standalone, use it whenever you need **thorough coverage**: full edge cases, permission scenarios, boundary conditions, error states and concurrency rules.
16
15
 
17
16
  ## Prerequisites
18
17
 
@@ -25,9 +24,9 @@ This skill is flexible and methodology-agnostic regarding timing. It can generat
25
24
 
26
25
  This skill supports two depth modes, selected via an argument flag:
27
26
 
28
- - **`--functional`** (used when generating ACs directly from a Features Backbone, before slicing exists): Produces **Requirement + Scenario** style output matching openspec spec conventions — a SHALL-statement Requirement per Rule, with one or more WHEN/THEN Scenarios covering the primary rule and its most important variant. Optimized for business-rule clarity and traceability, not exhaustive edge-case coverage. Never scoped to Walking Skeleton items or Increments (they don't exist yet at this stage). Use [Functional Output Template](resources/output-template-functional.md).
27
+ - **`--functional`** (used when generating ACs directly from a Features Backbone, before slicing exists): Produces **Requirement + Scenario** style output matching openspec spec conventions — a SHALL-statement Requirement per Rule, with one or more WHEN/THEN Scenarios covering the primary rule and its most important variant. Optimized for business-rule clarity and traceability, not exhaustive edge-case coverage. Never scoped to an increment (slicing has not happened yet at this stage). Use [Functional Output Template](resources/output-template-functional.md).
29
28
 
30
- - **`--concrete`** (used when generating ACs after a Feature has been sliced): Produces full Gherkin Given/When/Then coverage — happy path, edge cases, boundary conditions, error states, concurrency rules, and negative permission scenarios — exactly as this skill has always done. If the input contains a `## 💀 Walking Skeleton` / `## 🏗️ Increments Backlog` section, group scenarios by **Walking Skeleton item / Increment ID** instead of (or in addition to) User Task, so the output is directly consumable as an implementation handoff artifact. Use [Concrete Output Template](resources/output-template.md).
29
+ - **`--concrete`** (used when generating ACs after a Feature has been sliced): Produces full Gherkin Given/When/Then coverage — happy path, edge cases, boundary conditions, error states, concurrency rules, and negative permission scenarios — for the increment named in the input (`bokata-slice` passes one: its option IDs, their descriptions and its User Task tags). Write scenarios only for what that increment's options promise: an option marked fake, hardcoded or manual gets scenarios for what the user sees, not for the real thing. Group scenarios by User Task. Use [Concrete Output Template](resources/output-template.md).
31
30
 
32
31
  If no flag is provided, default to `--concrete` behavior (preserves current behavior for direct/standalone invocations).
33
32
 
@@ -63,8 +62,8 @@ You are the **Criteria Architect** - specialized in discovering hidden business
63
62
  Accepts: User Tasks list, feature backbone text, PRD snippet, raw user stories, or conversation context.
64
63
 
65
64
  **Optional enrichment (if present in context):**
66
- - **Domain business rules** (e.g. `## Criteria Research Summary`) — constraints, permissions, state transitions, and boundary conditions across the feature domain; use as starting point for deriving Rules per User Task
67
- - **Domain vocabulary and actors** (e.g. `## Feature Research Summary`) — use for consistent naming in scenarios
65
+ - **Enrichment** — Rules contributed by the Product Trio (constraints, permissions, state transitions, boundary conditions); use them as the starting point for the Rules per User Task
66
+ - **Glossary** — use its terms for consistent naming in scenarios
68
67
  - **Task clarifications** (e.g. `## Discovery Context — Criteria`) — resolved ambiguities from prior discovery
69
68
 
70
69
  Research context enriches output but is never required — proceed with any available context.
@@ -172,7 +171,7 @@ For EACH User Task:
172
171
  - Then: Observable Result
173
172
 
174
173
  ### ▶️ Execute:
175
- 1. Define Rules per User Task — if domain business rules or constraints are present in context (e.g. `## Criteria Research Summary`), use them as the source of Rules: map each domain constraint to the relevant User Task before generating scenarios
174
+ 1. Define Rules per User Task — if Enrichment Rules are present in context, use them as the source of Rules: map each domain constraint to the relevant User Task before generating scenarios
176
175
  2. Write Scenarios per Rule
177
176
  - **If `--functional` mode**: Write ONE representative Scenario per Rule covering the primary happy path plus, only where business-critical, one key variant. Do not enumerate the full edge-case/boundary/concurrency matrix — that is deferred to the `--concrete` pass after slicing.
178
177
  - **If `--concrete` mode**: Ensure coverage of Happy Path and Edge Cases, boundary conditions, error states, concurrency rules, and negative permission scenarios per existing quality bar
@@ -1,8 +1,8 @@
1
1
  # Acceptance Criteria (Functional): {{ FEATURE_NAME }}
2
- <!-- Feature ID: {{ FEAT_ID }} | Source: backbone.md | Depth: functional -->
2
+ <!-- Feature ID: {{ FEAT_ID }} | Source: features.md | Depth: functional -->
3
3
 
4
4
  ## User Task: {{ USER_TASK_NAME }}
5
- <!-- Task ID: {{ TASK_ID }} | Source: backbone.md -->
5
+ <!-- Task ID: {{ TASK_ID }} | Source: features.md -->
6
6
 
7
7
  ### Requirement: {{ REQUIREMENT_SUMMARY }}
8
8
  The system SHALL {{ requirement statement }}.
@@ -18,7 +18,7 @@ The system SHALL {{ requirement statement }}.
18
18
  ---
19
19
 
20
20
  ## User Task: {{ NEXT_USER_TASK_NAME }}
21
- <!-- Task ID: {{ NEXT_TASK_ID }} | Source: backbone.md -->
21
+ <!-- Task ID: {{ NEXT_TASK_ID }} | Source: features.md -->
22
22
 
23
23
  ### Requirement: {{ REQUIREMENT_SUMMARY }}
24
24
  The system SHALL {{ requirement statement }}.
@@ -5,7 +5,7 @@
5
5
 
6
6
  ---
7
7
 
8
- ## Research Summary
8
+ ## Context
9
9
 
10
10
  **Preconditions:** [key preconditions that apply across tasks]
11
11
  **Permission boundaries:** [who can / cannot interact with this feature]
@@ -30,7 +30,7 @@ Read `.bokata.json` at the project root if it exists. Defaults:
30
30
  Accept either:
31
31
  1. **A bokata pitch** (`<docs>/<initiative-slug>/pitch.md`, from `bokata-shape`)
32
32
  2. **Free-form initiative description** (what you want to build)
33
- 3. **Path to existing docs** (PRD, proposal, features-backbone.md, etc.)
33
+ 3. **Path to existing docs** (PRD, proposal, an existing backbone, etc.)
34
34
  4. **Combination** (reference existing + add new context)
35
35
 
36
36
  ---
@@ -214,14 +214,13 @@ The paths and formats in `.bokata.json` win over the domain skill's own.
214
214
 
215
215
  One file holds the backbone and its functional ACs, so a slice can be chosen from a single place:
216
216
 
217
- 1. **Write** `<docs>/<initiative-slug>/features.md` from the features template: the final reconciled backbone, the functional ACs of each User Task placed **under that User Task**, a `**Slice:** not sliced yet` line per Feature (filled later by `bokata-slice`; the slicing itself lives in the slice files, never here), and `## Trio Reconciliation Notes`.
217
+ 1. **Write** `<docs>/<initiative-slug>/features.md` from the features template: the final reconciled backbone, the functional ACs of each User Task placed **under that User Task** and re-levelled to the template's shape (each `### Requirement:` becomes `###### Requirement:`, each `#### Scenario:` + its WHEN/THEN bullets becomes one line `- **Scenario: <name>** — **WHEN** … **THEN** …`), a `**Slice:** not sliced yet` line per Feature (filled later by `bokata-slice`; the slicing itself lives in the slice files, never here), and `## Trio Reconciliation Notes`.
218
218
 
219
- 2. **Dispatch the story-map render** (if `story_map` is true): after `features.md` is final, dispatch the `story-map-renderer` subagent (it loads the `bokata-render` skill), operation `create`, passing `<docs>/<initiative-slug>/`. It runs on its own cheap model role (`models.<harness>.render`) in background — rendering is mechanical and must not block the summary. Do not render the HTML yourself and do not wait for the subagent to finish:
219
+ 2. **Render the story map** (if `story_map` is true): once `features.md` is final, run the `bokata-render` script, in the foreground:
220
+ ```bash
221
+ node .agents/skills/bokata-render/scripts/render.mjs <docs>/<initiative-slug>
220
222
  ```
221
- subagent → story-map-renderer (bokata-render)
222
- input: <docs>/<initiative-slug>/ — operation: create
223
- ```
224
- The skill owns the whole render (Patton board, counters, banner, interactivity) from its [story-map-template.md](../bokata-render/resources/story-map-template.md). It renders the board from `features.md` with **the User Task (Step) as the addressable column unit**, never a Feature-as-column with tasks listed inside.
223
+ It draws the Patton board (the User Task as the column unit, Features as spanning headers, counters, banner) from the markdown, with no model involved. If it prints an error, show it to the user and fix `features.md`.
225
224
 
226
225
  ---
227
226
 
@@ -230,7 +229,7 @@ One file holds the backbone and its functional ACs, so a slice can be chosen fro
230
229
  This step is a **checklist verification** only — no rendering work happens here:
231
230
 
232
231
  - [ ] `<docs>/<initiative-slug>/features.md` exists and is final (backbone + functional ACs + a `**Slice:**` line per Feature)
233
- - [ ] The `bokata-render` subagent was dispatched for `story-map.html` (if `story_map`)
232
+ - [ ] The `bokata-render` script ran for `story-map.html` (if `story_map`)
234
233
 
235
234
  ---
236
235
 
@@ -245,14 +244,14 @@ Print to user:
245
244
 
246
245
  **Artifacts created:**
247
246
  - features.md ✅ — {{NUM_FEATURES}} Features, {{NUM_TASKS}} User Tasks, {{NUM_REQUIREMENTS}} Requirements, {{NUM_SCENARIOS}} Scenarios (functional depth)
248
- - story-map.html ✅ — dashboard being rendered by the bokata-render subagent (Patton board with statuses, next step and counters)
247
+ - story-map.html ✅ — dashboard rendered by the bokata-render script (Patton board with statuses, next step and counters)
249
248
 
250
249
  **Trio Review Notes:**
251
250
  [If any reconciliation notes exist: "See features.md for [N] reconciliation notes flagged during PM/Designer/Engineer review."]
252
251
 
253
252
  ---
254
253
 
255
- **Next step:** Run `bokata-slice {{INITIATIVE_SLUG}}` and pick 1–3 Features that make sense together. Suggested first slice: [the thinnest group of Features that makes the journey usable end to end].
254
+ **Next step:** Run `bokata-slice {{INITIATIVE_SLUG}}` and pick 1–4 Features that make sense together. Suggested first slice: [the thinnest group of Features that makes the journey usable end to end].
256
255
  ```
257
256
 
258
257
  ---
@@ -269,6 +268,6 @@ Print to user:
269
268
  - [ ] Trio Reconciliation Notes section is present if any conflicts were resolved
270
269
  - [ ] Functional AC Requirements use SHALL/SHOULD language
271
270
  - [ ] Functional AC Scenarios use WHEN/THEN (Given implicit/optional)
272
- - [ ] The `bokata-render` subagent was dispatched for `story-map.html` immediately after `features.md` was final (not deferred to a final batch step)
271
+ - [ ] The `bokata-render` script ran right after `features.md` was final (not deferred to a final batch step)
273
272
  - [ ] `story-map.html` is built with Features spanning the row-1 backbone header and each User Task as its own Step column underneath (not Features-as-columns with tasks listed inside)
274
273
  - [ ] All parallel subagent reviews were issued together and completed before reconciliation began
@@ -36,9 +36,8 @@ You are the **Features Backbone Specialist** - responsible for identifying Featu
36
36
  Accepts any description of an initiative in any form: plain text, PRD, conversation context, or an enriched document.
37
37
 
38
38
  **Optional enrichment (if present in context):**
39
- - **Technical landscape** (e.g. `## Context Analysis`) — project architecture, patterns, tech stack
40
- - **Domain research** (e.g. `## Feature Research Summary`) — domain vocabulary, actors, scope boundaries, and key risks found in the codebase
41
- - **Business rules** (e.g. `## Criteria Research Summary`) — domain-level constraints and permissions that inform Feature scope
39
+ - **Project context** — the constitution, the glossary and `AGENTS.md`: architecture, patterns, domain vocabulary
40
+ - **A bokata pitch** (`pitch.md`) — chosen approach, cuts and no-gos are already settled
42
41
  - **Clarified scope** (e.g. `## Discovery Context — Backbone`) — actor and scope decisions from prior discovery
43
42
 
44
43
  ---
@@ -237,7 +236,7 @@ Check your output against the [Quality Criteria](resources/methodology.md) and s
237
236
 
238
237
  Before finishing, verify your output:
239
238
 
240
- - [ ] `<!-- Initiative: X | Date: Y | Constitution: version -->` header present
239
+ - [ ] `<!-- Initiative: X | Date: Y | Source: Z -->` header present
241
240
  - [ ] `## Features Backbone` section header present
242
241
  - [ ] `### Feature Overview` section with 2-3 sentence narrative
243
242
  - [ ] `### Features Map` section with all Features listed
@@ -273,4 +272,4 @@ Quick scan — flag any task whose name contains:
273
272
 
274
273
  1. **Save output** where appropriate
275
274
  2. **Validate** - Check MIN 2 Features, 3+ Tasks per Feature
276
- 3. **Run next phase:** Proceed to feature slicing for each Feature
275
+ 3. **Run next phase:** `bokata-slice` slices the Features you pick, 1–4 at a time
@@ -1,4 +1,4 @@
1
- <!-- Initiative: {initiative-name} | Date: {YYYY-MM-DD} | Constitution: {version} -->
1
+ <!-- Initiative: {initiative-name} | Date: {YYYY-MM-DD} | Source: {pitch.md | PRD | notes} -->
2
2
 
3
3
  ## Features Backbone
4
4
 
@@ -39,7 +39,8 @@ dependencies, least infrastructure, most reversible.
39
39
 
40
40
  ## Read first
41
41
 
42
- Before slicing, read **all** of these. They hold the worked examples and the failure modes the
42
+ Before slicing, read **all** of these (they live next to this file, in `resources/`: from a project
43
+ that installed bokata, `.agents/skills/bokata-feature-slicer/resources/`). They hold the worked examples and the failure modes the
43
44
  summary below only names:
44
45
 
45
46
  | Resource | Use it for |
@@ -47,7 +48,7 @@ summary below only names:
47
48
  | [phase-1-steps.md](resources/phase-1-steps.md) | Step analysis, layers, good/bad Steps |
48
49
  | [phase-2-increments.md](resources/phase-2-increments.md) | Option generation, examples, common issues |
49
50
  | [breakdown-strategies.md](resources/breakdown-strategies.md) | The strategy toolkit and linguistic patterns |
50
- | [phase-3-baby-steps.md](resources/phase-3-baby-steps.md) | Walking Skeleton selection and validation |
51
+ | [phase-3-skeleton.md](resources/phase-3-skeleton.md) | Walking Skeleton selection and validation |
51
52
  | [phase-4-bites.md](resources/phase-4-bites.md) | Pruning reasons, Step targets, INVEST bites, bite titles |
52
53
  | [output-template-steps.md](resources/output-template-steps.md), [output-template-increments.md](resources/output-template-increments.md), [output-template-bites.md](resources/output-template-bites.md) | The output format |
53
54
 
@@ -58,7 +59,7 @@ summary below only names:
58
59
  - The Feature: name, Purpose, User Tasks (and System Tasks), from the backbone in any form.
59
60
  - A **Feature code** for the IDs (`F1`, `F2`, …). If none is given, use `F1`.
60
61
  - Optional: Discovery Context, constitution, glossary, codebase notes.
61
- - Optional: functional ACs (Requirements + Scenarios). **Kept aside until the coverage check.**
62
+ - Optional: functional ACs (Requirements + Scenarios). **Kept aside until the coverage check.** With none, skip the coverage check and say so in `### Coverage`.
62
63
 
63
64
  ## Phase 0 — Discovery (standalone use only)
64
65
 
@@ -124,15 +125,17 @@ Run it on the whole trace, after the Walking Skeleton. Read [phase-4-bites.md](r
124
125
  2. **A target per Step**: the option the slice should reach in that Step. Mark it `→ target`.
125
126
  3. **INVEST bites per User Task.** Every live option that is not in the skeleton goes in
126
127
  **exactly one** bite, with: an ID (`F1-a`), a title **in user language with a subject**,
127
- `must-have` or `~nice-to-have`, its options and Steps, what it depends on, one line of value,
128
- and a one-sentence check. A bite over ~5 options is split. `deferred` options form their
128
+ `must-have` or `~nice-to-have`, its options and Steps, what it depends on (a bite ID, `Inc 1`,
129
+ `none`, or `F<n> (<what it needs>)` for another Feature: you cannot know their bite IDs), one
130
+ line of value, and a one-sentence check. Write each bite as the canonical line of
131
+ [output-template-bites.md](resources/output-template-bites.md). A bite over ~5 options is split. `deferred` options form their
129
132
  own bites.
130
133
  4. **Self-check** the new counts (pruned by reason, options in bites, none without a bite,
131
134
  none in two, Steps with a target, bites by kind).
132
135
 
133
136
  ## Output
134
137
 
135
- Return exactly this (the `bokata-slice` coordinator pastes it into the slice file):
138
+ Write exactly this to the file the coordinator gave you (`bokata-slice` later splits it into the slice's `slicing/F<k>.md`, `pruned.md` and Backlog), and reply with a few lines — the path and the Self-check counts — never with the content:
136
139
 
137
140
  ```markdown
138
141
  ## Slicing: <Feature name>
@@ -154,6 +157,7 @@ Return exactly this (the `bokata-slice` coordinator pastes it into the slice fil
154
157
  ### Coverage
155
158
  - R1 <requirement summary> — F1-1.1 fake, F1-1.2 total
156
159
  - R2 <requirement summary> — F1-3.1 partial, F1-3.3 total
160
+ <!-- No functional ACs in the input (single mode): write `none — no functional ACs` instead. -->
157
161
 
158
162
  ### Walking Skeleton proposal
159
163
  - **[<User Task name>]** F1-1.1 + F1-2.1 + F1-3.2 — <what the user can do end to end>
@@ -165,14 +169,14 @@ Return exactly this (the `bokata-slice` coordinator pastes it into the slice fil
165
169
 
166
170
  ### Bites
167
171
  - **[<User Task name>]**
168
- - F1-a · <title in user language, with a subject> (must-have) — F1-1.2, F1-3.3 · depends on: Inc 1 · value: <one line> · check: <one sentence>
169
- - ~F1-b · <title> (nice-to-have) — F1-2.3 · depends on: F1-a · value: <…> · check: <…>
172
+ - **F1-a · <title in user language, with a subject>** (must-have) — F1-1.2, F1-3.3 · depends on: Inc 1 · value: <one line> · check: <one sentence>
173
+ - ~**F1-b · <title>** (nice-to-have) — F1-2.3 · depends on: F1-a · value: <…> · check: <…>
170
174
  - **Deferred**
171
- - F1-x · <title> (deferred: <reason>) — F1-1.4 · prune and split when recovered
175
+ - **F1-d1 · <title>** (deferred: <reason>) — F1-1.4 · prune and split when recovered
172
176
 
173
177
  ### Self-check
174
178
  User Tasks <n> · Steps <n> · Options before pruning <n> (min <n>/Step) · Steps with ≥2 strategies <n>/<n> ·
175
- Steps with a cheap option <n>/<n> (<Step>: <why not>) · Deferred <n> · Requirements uncovered 0 ·
179
+ Steps with a cheap option <n>/<n> (<Step>: <why not>) · Deferred <n> · Requirements uncovered 0 (or n/a without functional ACs) ·
176
180
  Pruned <n> (obsolete <n> · dominated <n> · filler <n> · contradicts <n>) · Live options <n> =
177
181
  skeleton <n> + in bites <n> + deferred <n> · Without a bite 0 · In two bites 0 ·
178
182
  Steps with a target <n>/<n> · Bites <n> (must-have <n> · nice-to-have <n> · deferred <n>), none over ~5 options
@@ -183,10 +187,10 @@ Steps with a target <n>/<n> · Bites <n> (must-have <n> · nice-to-have <n> · d
183
187
 
184
188
  ## Before returning — verify
185
189
 
186
- - [ ] Every User Task has Steps; every Step has a layer and 3+ options
190
+ - [ ] Every User Task has Steps; every Step has a layer and had 3+ options **before pruning** (live options + its `### Pruned` entries)
187
191
  - [ ] Every Step lists ≥2 strategies and has a cheap-family option (or a one-line reason)
188
192
  - [ ] Every option says what changes for the user and names its shortcut; no endpoints/fields/functions
189
- - [ ] Options were generated before reading the functional ACs; every Requirement appears in Coverage
193
+ - [ ] Options were generated before reading the functional ACs; every Requirement appears in Coverage (or Coverage says `none — no functional ACs`)
190
194
  - [ ] Discovery scope cuts appear as `deferred` options, not as missing ones
191
195
  - [ ] The Walking Skeleton covers every User Task, uses option IDs, and no duration is written anywhere
192
196
  - [ ] Every pruned option has a reason from the four, is gone from the trace, and none was a skeleton or `deferred` option
@@ -1,13 +1,21 @@
1
1
  <!-- Phase 4 output — pruned list and bites per User Task. Each live option in the trace also
2
2
  carries its bite (· F1-a) and each Step has one "→ target". Bite IDs are letters per
3
- Feature and never change; option IDs are never renumbered after pruning. -->
3
+ Feature (a…z, then aa, ab…) and never change; deferred bites are F1-d1, F1-d2…; option IDs are
4
+ never renumbered after pruning.
5
+
6
+ THE CANONICAL BITE LINE. Copy it as written, never reformat it: bokata-slice pastes it into
7
+ the slice's Backlog unchanged and the story map parses it.
8
+ - **<ID> · <title>** (must-have) — <options> · depends on: <…> · value: <…> · check: <…>
9
+ - ~**<ID> · <title>** (nice-to-have) — <options> · depends on: <…> · value: <…> · check: <…>
10
+ - **<ID> · <title>** (deferred: <reason>) — <options> · prune and split when recovered
11
+ `depends on` is another bite ID, `Inc 1`, `none`, or `F<n> (<what it needs>)` for another Feature. -->
4
12
 
5
13
  ### Pruned
6
14
  - F1-2.1 [Action] [Object] — `obsolete` | `dominated` | `filler` | `contradicts`: [one line why]
7
15
 
8
16
  ### Bites
9
17
  - **[User Task name]**
10
- - F1-a · [title in user language, with a subject] (must-have) — F1-2.2, F1-4.3 · depends on: Inc 1 · value: [one line] · check: [one sentence a test can answer]
11
- - ~F1-b · [title] (nice-to-have) — F1-3.4 · depends on: F1-a · value: [one line] · check: [one sentence]
18
+ - **F1-a · [title in user language, with a subject]** (must-have) — F1-2.2, F1-4.3 · depends on: Inc 1 · value: [one line] · check: [one sentence a test can answer]
19
+ - ~**F1-b · [title]** (nice-to-have) — F1-3.4 · depends on: F1-a · value: [one line] · check: [one sentence]
12
20
  - **Deferred**
13
- - F1-x · [title] (deferred: [reason]) — F1-5.3, F1-6.1 · prune and split when recovered
21
+ - **F1-d1 · [title]** (deferred: [reason]) — F1-5.3, F1-6.1 · prune and split when recovered
@@ -94,27 +94,14 @@ Validate each step's options:
94
94
  - Progression clear (simple → advanced)
95
95
  - Naming and formatting consistent
96
96
 
97
- **Example: "Store Audio" step**
97
+ **Example: "Store Audio" step** (S3, Data layer)
98
98
  ```
99
- 1.1: Save to Browser LocalStorage
100
- - Simplest, no backend needed
101
- - Applied Strategy: Dummy to Dynamic (local storage is simplest)
102
-
103
- 1.2: Save to Device FileSystem
104
- - More storage space available
105
- - Applied Strategy: Split by Capacity (more storage)
106
-
107
- 1.3: Upload to Cloud Storage
108
- - Requires backend/API
109
- - Applied Strategy: Dummy to Dynamic (dynamic cloud storage)
110
-
111
- 1.4: Multi-format Support
112
- - WAV, MP3, OGG options
113
- - Applied Strategy: Data Variation (multiple formats)
114
-
115
- 1.5: Compression Pipeline
116
- - Reduces file size
117
- - Applied Strategy: Extract Basic Utility (enhance with compression)
99
+ - **S3 Store Audio** · Data — the recording is kept
100
+ - F1-3.1 Save to Browser LocalStorage — simplest, no backend; the clip stays on this device · Dummy to Dynamic
101
+ - F1-3.2 Save to Device FileSystem — more storage space available · Split by Capacity
102
+ - F1-3.3 Upload to Cloud Storage — needs a backend; the clip follows the user · Dummy to Dynamic
103
+ - F1-3.4 Multi-format Support — WAV, MP3 and OGG are accepted · Data Variation
104
+ - strategies: Dummy to Dynamic, Split by Capacity, Data Variation
118
105
  ```
119
106
 
120
107
  ---
@@ -134,54 +121,48 @@ Generate markdown output via [Output Template](output-template-increments.md).
134
121
 
135
122
  Formatting requirements:
136
123
  1. One line per option, nested under its Step: `F1-N.M Name — description · strategy`
137
- 2. A closing `strategies:` line per Step (2-3 strategies + one-line rationale)
124
+ 2. A closing `- strategies:` line per Step, nested like the options (2-3 strategies)
138
125
  3. Options progress from simple → complex
139
126
  4. At least one option per Step from the cheap family (Crutches, Dummy to Dynamic, Zero/One/Many, Workflow Simplification, Extract Basic Utility), or a one-line reason why none applies
140
127
 
141
128
  ---
142
129
 
143
- ## QUALITY CRITERIA
144
-
145
- For completed Incremental Options sections:
146
-
147
- ---
148
-
149
130
  ## EXAMPLES
150
131
 
151
132
  ### Example 1: "Capture Audio Input" Step
152
133
 
153
134
  ```markdown
154
- - F1-1.1 Browser Microphone (Web Audio API) — Capture using browser's built-in Web Audio API with basic permissions prompt
155
- - F1-1.2 Native Mobile Audio — Use platform-specific microphone APIs (AVFoundation for iOS, MediaRecorder for Android)
156
- - F1-1.3 Audio Processing Pipeline — Add noise reduction and level monitoring with real-time visual feedback
157
- - F1-1.4 Multi-device Support — Allow selection from multiple input devices (built-in mic, USB mic, Bluetooth headset)
158
- - F1-1.5 Background Recording — Enable recording to continue when app is backgrounded or screen is off
159
-
160
- - strategies: Dummy to Dynamic (Web API → Native), Data Variation (single device → multiple devices), Extract Basic Utility (basic capture → enhanced with processing) — Start with simplest browser API, progressively add native capabilities, device options, and background support for power users.
135
+ - **S1 Capture Audio Input** · UI — the coach records a clip
136
+ - F1-1.1 Browser Microphone — browser's built-in Web Audio API with the basic permission prompt · Dummy to Dynamic
137
+ - F1-1.2 Native Mobile Audio — platform microphone APIs on iOS and Android · Dummy to Dynamic
138
+ - F1-1.3 Audio Processing Pipeline — noise reduction and a live level meter · Extract Basic Utility
139
+ - F1-1.4 Multi-device Support — pick between built-in, USB and Bluetooth microphones · Data Variation
140
+ - F1-1.5 Background Recording — recording continues with the screen off · Split by Capacity
141
+ - strategies: Dummy to Dynamic (Web API → native), Data Variation (one device → several), Extract Basic Utility (basic capture → processed)
161
142
  ```
162
143
 
163
144
  ### Example 2: "Execute Search Query" Step
164
145
 
165
146
  ```markdown
166
- - F1-2.1 Exact Text Match — Search product names for exact substring match (case-insensitive)
167
- - F1-2.2 Fuzzy Text Search — Add fuzzy matching to handle typos and similar words (Levenshtein distance)
168
- - F1-2.3 Filter by Single Attribute — Allow filtering by one attribute (e.g., category OR price range)
169
- - F1-2.4 Multi-attribute Filters — Support combining multiple filters with AND logic (category AND price range AND rating)
170
- - F1-2.5 Full-text Search with Ranking — Implement full-text search with relevance scoring (tf-idf or similar)
171
- - F1-2.6 Natural Language Query — Parse natural language queries ("cheap laptops under $500") into structured filters
172
-
173
- - strategies: Zero/One/Many (no filters → one filter → many filters), Business Rule Progression (exact → fuzzy → ranked), Data Variation (text only → attributes → natural language) — Build from simplest exact match toward sophisticated natural language understanding, allowing progressive enhancement of search quality.
147
+ - **S4 Execute Search Query** · Logic — the user finds products
148
+ - F1-4.1 Exact Text Match — exact, case-insensitive substring of the product name · Business Rule Progression
149
+ - F1-4.2 Fuzzy Text Search — tolerates typos and similar words · Business Rule Progression
150
+ - F1-4.3 Filter by Single Attribute — one attribute at a time (category OR price range) · Zero/One/Many
151
+ - F1-4.4 Multi-attribute Filters — category AND price range AND rating together · Zero/One/Many
152
+ - F1-4.5 Full-text Search with Ranking — results ordered by relevance · Business Rule Progression
153
+ - F1-4.6 Natural Language Query — "cheap laptops under $500" becomes filters · Data Variation
154
+ - strategies: Zero/One/Many (no filters → one → many), Business Rule Progression (exact → fuzzy → ranked), Data Variation (text → attributes → natural language)
174
155
  ```
175
156
 
176
157
  ### Example 3: "Persist User Data" Step
177
158
 
178
159
  ```markdown
179
- - F1-3.1 LocalStorage (Client-side) — Store user data in browser localStorage (5MB limit, no backend required)
180
- - F1-3.2 SQLite (Local Database) — Use SQLite for local structured storage with query capability
181
- - F1-3.3 REST API (Cloud Sync) — Sync data to cloud via REST API (requires authentication)
182
- - F1-3.4 Real-time Database (Firebase/Supabase) — Real-time bi-directional sync across devices
183
-
184
- - strategies: Dummy to Dynamic (local → cloud), Split by Capacity (5MB → unlimited), Walking Skeleton on Crutches (client-only → full cloud) — Start with zero backend complexity (localStorage), progressively add server sync, then real-time capabilities as needed.
160
+ - **S6 Persist User Data** · Data — the user's data survives a reload
161
+ - F1-6.1 LocalStorage — kept in the browser; 5MB limit, no backend · Dummy to Dynamic
162
+ - F1-6.2 SQLite (Local Database) — local structured storage you can query · Split by Capacity
163
+ - F1-6.3 REST API (Cloud Sync) — synced to the cloud; needs sign-in · Dummy to Dynamic
164
+ - F1-6.4 Real-time Database — changes appear on every device at once · Split by Capacity
165
+ - strategies: Dummy to Dynamic (local → cloud), Split by Capacity (5MB → unlimited), Walking Skeleton on Crutches (client-only → full cloud)
185
166
  ```
186
167
 
187
168
  ---
@@ -228,9 +209,6 @@ coverage — an option that covers a requirement only partially or with fake dat
228
209
  → Solution: Options like "the coach sends it by hand" or "hardcoded data" are not embarrassing —
229
210
  they are the Walking Skeleton candidates. Write them, state the shortcut openly, and keep them.
230
211
 
231
- **Interactive Use:**
232
- If you're stuck, ask me to list strategies for a specific step, and I'll suggest applications.
233
-
234
212
  ---
235
213
 
236
214
  ## BEFORE SUBMITTING — verify for ALL Steps:
@@ -2,9 +2,9 @@
2
2
 
3
3
  Take the complete trace (User Tasks → Steps → Options), check it against the functional ACs, and
4
4
  propose the **Walking Skeleton**: one combination of options per User Task that makes the whole
5
- Feature work end to end with the least. Every option stays in the trace — the ones the skeleton
6
- does not use stay in the trace for now: Phase 4 prunes them and groups what is left into the
7
- bites later increments are composed from.
5
+ Feature work end to end with the least. The options the skeleton does not use stay in the trace
6
+ for now: Phase 4 prunes them and groups what is left into the bites later increments are
7
+ composed from.
8
8
 
9
9
  **No durations.** "Simplest" = fewest dependencies, least infrastructure, most reversible. Never
10
10
  write "buildable in N days".
@@ -26,8 +26,8 @@ reasons, and write the reason:
26
26
 
27
27
  Rules:
28
28
  - **Never discard** an option of the skeleton, one marked `deferred`, or one an Inc has already
29
- taken (`→ Inc n`, when re-pruning after `--next`): the story map resolves each Inc's `Options:`
30
- through the trace.
29
+ taken (`→ Inc n`, when re-pruning after `--next`): the story map resolves each Inc's options (those of its
30
+ bites) through the trace.
31
31
  - A discard needs one of the four reasons. "I prefer the other one" is not a reason; when two
32
32
  options are genuine alternatives, keep both and let a bite choose.
33
33
  - **Delete discarded options from the trace.** They do not stay as crossed-out lines. The output
@@ -62,7 +62,8 @@ bite. Group options that belong together:
62
62
  - **Options that depend on each other** across Steps, or across User Tasks of the same Feature.
63
63
 
64
64
  A bite belongs to **one Feature**: you only see your own Feature's trace. When it needs something from
65
- another Feature, say so in `depends on` with that bite's ID (`depends on: F7-b`); do not mix their options.
65
+ another Feature, write `depends on: F7 (<what it needs>)` — the Feature code and the need in words, never
66
+ a bite ID (you cannot know the other Feature's letters; the coordinator resolves it). Do not mix their options.
66
67
 
67
68
  Do **not** put two real alternatives (two ways to do the same thing) in the same bite: pick one
68
69
  as part of the bite, and the other is either pruned (`dominated`) or its own bite.
@@ -71,7 +72,7 @@ Each bite carries:
71
72
 
72
73
  | Field | Content |
73
74
  |---|---|
74
- | ID | Stable, per Feature: `F1-a`, `F1-b`, … (letters; they never change once written) |
75
+ | ID | Stable, per Feature: `F1-a`, `F1-b`, … (letters, then `aa`, `ab`, … after `z`); deferred bites use `F1-d1`, `F1-d2`, …. They never change once written |
75
76
  | Title | **A sentence in user language, with a subject**, readable with no context: "Ana sees which defender cuts her pass", not "F5-6.3 Mark the cut cell" |
76
77
  | Priority | `must-have` or `~nice-to-have`. Must-have = the slice is not finished without it |
77
78
  | Options | The option IDs, with the Steps they come from |
@@ -127,10 +128,10 @@ carries its bite and each Step its target:
127
128
 
128
129
  ### Bites
129
130
  - **[Pass the ball]**
130
- - F5-a · Ana sees which defender cuts her pass and where (must-have) — F5-6.3, F5-8.3 · depends on: Inc 1 · value: she knows the risk before confirming · check: with the fixture defence, the line to C is marked on (8,9), PG's cell
131
- - ~F5-b · Ana sees the ball travel to the receiver (nice-to-have) — F5-10.3 · depends on: Inc 1 · value: the pass feels real · check: the ball runs (8,10) → (12,8) before "Pass completed"
131
+ - **F5-a · Ana sees which defender cuts her pass and where** (must-have) — F5-6.3, F5-8.3 · depends on: Inc 1 · value: she knows the risk before confirming · check: with the fixture defence, the line to C is marked on (8,9), PG's cell
132
+ - ~**F5-b · Ana sees the ball travel to the receiver** (nice-to-have) — F5-10.3 · depends on: Inc 1 · value: the pass feels real · check: the ball runs (8,10) → (12,8) before "Pass completed"
132
133
  - **Deferred**
133
- - F5-x · The buzzer (deferred: needs F9) — F5-3.3, F5-16.1 … · prune and split when recovered
134
+ - **F5-d1 · The buzzer** (deferred: needs F9) — F5-3.3, F5-16.1 · prune and split when recovered
134
135
  ```
135
136
 
136
137
  Bad vs good title:
@@ -17,9 +17,12 @@ Read `.bokata.json` at the project root if it exists (`docs` defaults to `docs/i
17
17
 
18
18
  ## 1. Read
19
19
 
20
- - The slice file `<docs>/<slug>/slices/<nn>-<name>.md` — the increments to plan (their options,
21
- scenarios and `Unknowns`), and the initiative's `plan.md` if it exists, the increments already built, and `## Notes`. The `## Slicing`
22
- section tells you what each option ID means; the backlog is not yours to plan.
20
+ - The slice **index** `<docs>/<slug>/slices/<nn>-<name>.md` (the Inc's outcome and bites, and the
21
+ bite lines in `## Backlog` with their options) and, in the folder next to it, the `inc-<n>.md` of
22
+ each increment to plan (its scenarios, rules, `Unknowns`, decisions). The `slicing/F<k>.md` of the
23
+ Feature says what each option ID means; `context.md` has the Discovery Context (layers, entry points, limits) and the slice-wide decisions. Read the
24
+ `inc-<n>.md` of **the increments you plan only** — never the built ones. The backlog is not yours
25
+ to plan. Also the initiative's `plan.md` if it exists (what is in flight).
23
26
  - The pitch's rabbit holes and no-gos, the constitution, `AGENTS.md`, the glossary, and the
24
27
  ADRs that touch the area.
25
28
  - The code the slice touches. Use read-only explore subagents in parallel if your harness has
@@ -75,22 +78,25 @@ Tests:
75
78
  - <scenario> → <test file> › <test name> <!-- filled by the executor -->
76
79
  ```
77
80
 
78
- Never touch another slice's section or a built increment's. In the **slice file** (not in
79
- `plan.md`) keep what is the owner's: set the header's `Current increment: Inc <n> — planned`
80
- (the slice `Status` stays `open`), each Inc's `Parallel-safe:` and `Unknowns`, and the
81
- `Owner decision: …` notes. Each Inc there keeps the one-line pointer
82
- `Plan: → ../plan.md (Slice <nn> · Inc <n>)`.
81
+ Never touch another slice's section or a built increment's. In the Inc's **`inc-<n>.md`** (not in
82
+ `plan.md`) keep what is the owner's: set `State: planned`, its `Parallel-safe:` and `Unknowns`, and
83
+ write the `Owner decision: …` notes under `## Decisions and notes of this Inc` (slice-wide ones go in
84
+ `context.md`, under `## Notes`). The slice `Status` stays `open`. `plan.md` is **temporary**: it holds only the Incs in
85
+ flight, and the executor deletes an Inc's section when it is done.
83
86
 
84
87
  If your plan mode does not let you edit files, present the plan for approval first and write
85
88
  it into the slice right after the user approves.
86
89
 
87
- ## 4. Sync the story map
90
+ ## 4. Refresh the story map
88
91
 
89
- After the plan is written, dispatch the `story-map-renderer` subagent (it loads the
90
- `bokata-render` skill) with operation `state-sync`: the planned increments move to
91
- `planned` and the next banner starts pointing at the first unchecked step. It runs on its own
92
- cheap model role (`models.<harness>.render`) in background. Do not render the HTML here and do
93
- not wait for it. Skip this if `story_map` is `false`.
92
+ After the plan is written, run the `bokata-render` script (skip it if `story_map` is `false`):
93
+
94
+ ```bash
95
+ node .agents/skills/bokata-render/scripts/render.mjs <docs>/<slug>
96
+ ```
97
+
98
+ The planned increments move to `planned` and the "Next" banner points at the first unchecked
99
+ step. It takes milliseconds and uses no model; if it prints an error, show it to the user.
94
100
 
95
101
  ## 5. Hand-off
96
102
 
@@ -98,7 +104,7 @@ End with the exact line the user can hand to an executor (by hand, or through an
98
104
  orchestrator such as Orca):
99
105
 
100
106
  ```
101
- Next: code-executor — build Inc <n> of slice <docs>/<slug>/slices/<nn>-<name>.md
107
+ Next: code-executor — build Inc <n> of slice <docs>/<slug>/slices/<nn>-<name>.md (Inc file: <nn>-<name>/inc-<n>.md)
102
108
  plan: <docs>/<slug>/plan.md (Slice <nn> · Inc <n>)
103
109
  (increments marked Parallel-safe: yes may run in separate worktrees; each edits only its own plan section)
104
110
  ```
@@ -1,14 +1,16 @@
1
1
  # Plan — <initiative>
2
2
 
3
- <!-- One file per initiative: <docs>/<slug>/plan.md. Written by bokata-plan, checked off by the
4
- executor commit by commit. A section per slice, a subsection per increment. The headings are
5
- the keys the story map and bokata-status read ("## Slice <nn>" and "### Inc <n>"), so keep them.
6
- What the owner decides (Gherkin, Unknowns, Parallel-safe, Notes) stays in the slice file.
3
+ <!-- One file per initiative: <docs>/<slug>/plan.md. TEMPORARY: it holds only the increments in flight.
4
+ Written by bokata-plan, checked off by the executor commit by commit; when an Inc is done the
5
+ executor deletes its section (what is not in the code moves to `## Pending` of its inc-<n>.md,
6
+ and the State there becomes done). A section per slice, a subsection per increment. The headings
7
+ are the keys the story map and bokata-status read ("## Slice <nn>" and "### Inc <n>"), so keep them.
8
+ What the owner decides (Gherkin, Unknowns, Parallel-safe, decisions) stays in the Inc's inc-<n>.md.
7
9
  Edit only your own increment's section: Incs built in parallel worktrees then touch different lines. -->
8
10
 
9
11
  ## Slice <nn> — <name>
10
12
 
11
- <!-- Slice file: slices/<nn>-<name>.md -->
13
+ <!-- Slice index: slices/<nn>-<name>.md · Inc files: slices/<nn>-<name>/inc-<n>.md -->
12
14
 
13
15
  ### Inc 1 — <name>
14
16