bokata 2.0.1 → 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 (51) 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/{commands/task-parallel/feature-map.md → .agents/skills/bokata-feature-map/SKILL.md} +79 -79
  5. package/.agents/skills/bokata-feature-map/resources/features-template.md +83 -0
  6. package/.agents/skills/bokata-feature-mapper/SKILL.md +4 -5
  7. package/.agents/skills/bokata-feature-mapper/resources/output-template.md +1 -1
  8. package/.agents/skills/bokata-feature-slicer/SKILL.md +176 -183
  9. package/.agents/skills/bokata-feature-slicer/resources/output-template-bites.md +21 -0
  10. package/.agents/skills/bokata-feature-slicer/resources/output-template-increments.md +9 -12
  11. package/.agents/skills/bokata-feature-slicer/resources/output-template-steps.md +6 -22
  12. package/.agents/skills/bokata-feature-slicer/resources/phase-2-increments.md +51 -79
  13. package/.agents/skills/bokata-feature-slicer/resources/phase-3-skeleton.md +152 -0
  14. package/.agents/skills/bokata-feature-slicer/resources/phase-4-bites.md +139 -0
  15. package/.agents/skills/bokata-plan/SKILL.md +110 -0
  16. package/.agents/skills/bokata-plan/resources/plan-template.md +35 -0
  17. package/.agents/skills/bokata-refactor/SKILL.md +69 -0
  18. package/.agents/skills/bokata-refactor/resources/smells.md +47 -0
  19. package/.agents/skills/bokata-refactor/resources/tidyings.md +31 -0
  20. package/.agents/skills/bokata-render/SKILL.md +68 -0
  21. package/.agents/skills/bokata-render/assets/story-map.html +428 -0
  22. package/.agents/skills/bokata-render/scripts/render.mjs +703 -0
  23. package/.agents/skills/bokata-shape/SKILL.md +117 -0
  24. package/.agents/skills/bokata-shape/resources/adr-template.md +24 -0
  25. package/.agents/skills/bokata-shape/resources/breadboarding.md +47 -0
  26. package/.agents/skills/bokata-shape/resources/pitch-template.md +42 -0
  27. package/.agents/skills/bokata-slice/SKILL.md +569 -0
  28. package/.agents/skills/bokata-slice/resources/inc-template.md +36 -0
  29. package/.agents/skills/bokata-slice/resources/slice-template.md +70 -0
  30. package/.agents/skills/bokata-status/SKILL.md +77 -0
  31. package/.agents/skills/bokata-tdd/SKILL.md +109 -0
  32. package/.agents/skills/bokata-tdd/resources/evidence-rules.md +27 -0
  33. package/LICENSE +21 -0
  34. package/README.md +224 -92
  35. package/agents/bokata-product-designer.md +49 -17
  36. package/agents/bokata-product-engineer.md +49 -16
  37. package/agents/bokata-product-manager.md +50 -18
  38. package/agents/code-executor.md +64 -0
  39. package/agents/design-reviewer.md +40 -0
  40. package/agents/feature-slicer.md +54 -0
  41. package/bin/bokata.js +40 -13
  42. package/package.json +20 -7
  43. package/src/agents.js +139 -0
  44. package/src/config.js +76 -0
  45. package/src/install.js +182 -205
  46. package/.agents/skills/bokata-feature-slicer/resources/phase-3-baby-steps.md +0 -311
  47. package/commands/codex/feature-map.md +0 -263
  48. package/commands/codex/slice-feature.md +0 -291
  49. package/commands/task-parallel/resources/html-template.md +0 -560
  50. package/commands/task-parallel/resources/story-map-template.md +0 -495
  51. package/commands/task-parallel/slice-feature.md +0 -301
@@ -26,8 +26,8 @@ Refer to [Strategies Toolkit](breakdown-strategies.md) for detailed descriptions
26
26
 
27
27
  ### Step 1: Identify All Steps
28
28
 
29
- 1. Locate `## Features Backbone` section in the provided input
30
- 2. For each User Task, find all `### Steps` sections
29
+ 1. Take the Phase 1 output (the Steps of every User Task)
30
+ 2. For each User Task, list its Steps
31
31
  3. Extract for each step: name, description, layer (UI/Logic/Data/Integration), and any technical notes
32
32
  4. Create a complete list of all steps requiring incremental options
33
33
 
@@ -87,33 +87,21 @@ For each step, create 3+ incremental options by:
87
87
  5. Naming each option using `[Action] [Object]` format
88
88
 
89
89
  Validate each step's options:
90
- - Minimum 3 options per step (WARNING if exactly 3)
90
+ - Minimum 3 options per step (aim for 4)
91
+ - At least one cheap-family option (Crutches, Dummy to Dynamic, Zero/One/Many…)
91
92
  - All options specific (not generic)
92
93
  - Dependencies explicit
93
94
  - Progression clear (simple → advanced)
94
95
  - Naming and formatting consistent
95
96
 
96
- **Example: "Store Audio" step**
97
+ **Example: "Store Audio" step** (S3, Data layer)
97
98
  ```
98
- 1.1: Save to Browser LocalStorage
99
- - Simplest, no backend needed
100
- - Applied Strategy: Dummy to Dynamic (local storage is simplest)
101
-
102
- 1.2: Save to Device FileSystem
103
- - More storage space available
104
- - Applied Strategy: Split by Capacity (more storage)
105
-
106
- 1.3: Upload to Cloud Storage
107
- - Requires backend/API
108
- - Applied Strategy: Dummy to Dynamic (dynamic cloud storage)
109
-
110
- 1.4: Multi-format Support
111
- - WAV, MP3, OGG options
112
- - Applied Strategy: Data Variation (multiple formats)
113
-
114
- 1.5: Compression Pipeline
115
- - Reduces file size
116
- - 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
117
105
  ```
118
106
 
119
107
  ---
@@ -132,16 +120,10 @@ Validate each step's options:
132
120
  Generate markdown output via [Output Template](output-template-increments.md).
133
121
 
134
122
  Formatting requirements:
135
- 1. Checkbox format: `[ ] **N.M: Name** - Description`
136
- 2. Applied Strategies section (2-3 strategies listed)
137
- 3. Rationale section (1-2 sentences explaining option set)
138
- 4. Options progress from simple → complex
139
-
140
- ---
141
-
142
- ## QUALITY CRITERIA
143
-
144
- For completed Incremental Options sections:
123
+ 1. One line per option, nested under its Step: `F1-N.M Name — description · strategy`
124
+ 2. A closing `- strategies:` line per Step, nested like the options (2-3 strategies)
125
+ 3. Options progress from simple → complex
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
145
127
 
146
128
  ---
147
129
 
@@ -150,58 +132,37 @@ For completed Incremental Options sections:
150
132
  ### Example 1: "Capture Audio Input" Step
151
133
 
152
134
  ```markdown
153
- ### Incremental Options (0/5)
154
-
155
- [ ] **1.1: Browser Microphone (Web Audio API)** - Capture using browser's built-in Web Audio API with basic permissions prompt
156
-
157
- [ ] **1.2: Native Mobile Audio** - Use platform-specific microphone APIs (AVFoundation for iOS, MediaRecorder for Android)
158
-
159
- [ ] **1.3: Audio Processing Pipeline** - Add noise reduction and level monitoring with real-time visual feedback
160
-
161
- [ ] **1.4: Multi-device Support** - Allow selection from multiple input devices (built-in mic, USB mic, Bluetooth headset)
162
-
163
- [ ] **1.5: Background Recording** - Enable recording to continue when app is backgrounded or screen is off
164
-
165
- **Applied Strategies:** Dummy to Dynamic (Web API → Native), Data Variation (single device → multiple devices), Extract Basic Utility (basic capture → enhanced with processing)
166
- **Rationale:** 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)
167
142
  ```
168
143
 
169
144
  ### Example 2: "Execute Search Query" Step
170
145
 
171
146
  ```markdown
172
- ### Incremental Options (0/6)
173
-
174
- [ ] **2.1: Exact Text Match** - Search product names for exact substring match (case-insensitive)
175
-
176
- [ ] **2.2: Fuzzy Text Search** - Add fuzzy matching to handle typos and similar words (Levenshtein distance)
177
-
178
- [ ] **2.3: Filter by Single Attribute** - Allow filtering by one attribute (e.g., category OR price range)
179
-
180
- [ ] **2.4: Multi-attribute Filters** - Support combining multiple filters with AND logic (category AND price range AND rating)
181
-
182
- [ ] **2.5: Full-text Search with Ranking** - Implement full-text search with relevance scoring (tf-idf or similar)
183
-
184
- [ ] **2.6: Natural Language Query** - Parse natural language queries ("cheap laptops under $500") into structured filters
185
-
186
- **Applied Strategies:** Zero/One/Many (no filters → one filter → many filters), Business Rule Progression (exact → fuzzy → ranked), Data Variation (text only → attributes → natural language)
187
- **Rationale:** 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)
188
155
  ```
189
156
 
190
157
  ### Example 3: "Persist User Data" Step
191
158
 
192
159
  ```markdown
193
- ### Incremental Options (0/4)
194
-
195
- [ ] **3.1: LocalStorage (Client-side)** - Store user data in browser localStorage (5MB limit, no backend required)
196
-
197
- [ ] **3.2: SQLite (Local Database)** - Use SQLite for local structured storage with query capability
198
-
199
- [ ] **3.3: REST API (Cloud Sync)** - Sync data to cloud via REST API (requires authentication)
200
-
201
- [ ] **3.4: Real-time Database (Firebase/Supabase)** - Real-time bi-directional sync across devices
202
-
203
- **Applied Strategies:** Dummy to Dynamic (local → cloud), Split by Capacity (5MB → unlimited), Walking Skeleton on Crutches (client-only → full cloud)
204
- **Rationale:** 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)
205
166
  ```
206
167
 
207
168
  ---
@@ -236,8 +197,17 @@ For completed Incremental Options sections:
236
197
  - User types mentioned → user segment narrowing
237
198
  - When in doubt, start with Zero/One/Many + Dummy to Dynamic
238
199
 
239
- **Interactive Use:**
240
- If you're stuck, ask me to list strategies for a specific step, and I'll suggest applications.
200
+ **Issue: "Each Step has one option per functional requirement"**
201
+ → Solution: You are copying the ACs, not slicing. The ACs say WHAT must end up true; options are
202
+ cheaper ways to get there first. Generate options from the Step and the strategies, then check
203
+ coverage — an option that covers a requirement only partially or with fake data is valuable.
204
+ - ❌ "Show player list" → "Show player list sorted by number" → "Show player list with photos" (one per AC)
205
+ ✅ INSTEAD: "Hardcoded list of 5 players" (Dummy to Dynamic) → "List from the roster API" →
206
+ "Empty roster state" (Zero/One/Many) → "Sorted by number with photos"
207
+
208
+ **Issue: "The cheap options disappeared"**
209
+ → Solution: Options like "the coach sends it by hand" or "hardcoded data" are not embarrassing —
210
+ they are the Walking Skeleton candidates. Write them, state the shortcut openly, and keep them.
241
211
 
242
212
  ---
243
213
 
@@ -246,6 +216,8 @@ If you're stuck, ask me to list strategies for a specific step, and I'll suggest
246
216
  - [ ] ALL Steps have Incremental Options (no gaps)
247
217
  - [ ] At least one option per step is clearly the simplest viable (Walking Skeleton candidate)
248
218
  - [ ] Aim for 4+ options per step — 3 is acceptable if the step is genuinely narrow; note why
249
- - [ ] Each option uses `[ ] **N.M: Name** - Description` format and is independently deployable
219
+ - [ ] Each option uses `F1-N.M Name — description · strategy` and is independently deployable
250
220
  - [ ] Options progress from simple → complex
251
- - [ ] Applied Strategies (2-3) and Rationale documented per step
221
+ - [ ] Every Step has a `strategies:` line with 2+ strategies, and a cheap-family option (or a reason)
222
+ - [ ] Every option states its shortcut openly ("hardcoded list", "approved by hand")
223
+ - [ ] Options were not derived from the functional ACs (those are only used in the Phase 3 coverage check)
@@ -0,0 +1,152 @@
1
+ # Phase 3: Coverage Check and Walking Skeleton
2
+
3
+ Take the complete trace (User Tasks → Steps → Options), check it against the functional ACs, and
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. 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
+
9
+ **No durations.** "Simplest" = fewest dependencies, least infrastructure, most reversible. Never
10
+ write "buildable in N days".
11
+
12
+ ---
13
+
14
+ ## Step 1: Map the trace
15
+
16
+ #### 🧠 Think:
17
+ - Which User Tasks (and System Tasks) does this Feature have?
18
+ - How many Steps per User Task, how many options per Step?
19
+ - Did every Step get ≥3 options, ≥2 strategies and a cheap-family option? If not, go back to Phase 2.
20
+
21
+ ---
22
+
23
+ ## Step 2: Coverage check (now, not before)
24
+
25
+ The functional ACs were kept aside during Phases 1–2 so they would not drag the slicing into
26
+ copying requirements. Open them now.
27
+
28
+ #### ▶️ Execute:
29
+ 1. For each Requirement, list the options that cover it and how:
30
+ - `total` — the requirement holds as written
31
+ - `partial` — part of it holds (one case, one format, one user type)
32
+ - `fake` — it looks true to the user, backed by hardcoded data or a manual crutch
33
+ 2. A Requirement no option covers is a gap in Phase 2: add the option it needs to the right Step.
34
+ 3. **Do not rewrite options to mirror requirements.** Partial and fake coverage is how the
35
+ skeleton stays small.
36
+
37
+ Output: the `### Coverage` block (one line per Requirement) and `covers R<n> <how>` on each option.
38
+
39
+ ---
40
+
41
+ ## Radical Slicing Challenge (before picking)
42
+
43
+ Per Step ask: **"If we had to ship tomorrow, which option would we choose?"** If the answer differs
44
+ from your first instinct, use it. The skeleton should feel uncomfortably minimal; if it feels
45
+ comfortable, it is still too big.
46
+
47
+ ---
48
+
49
+ ## Step 3: Pick the Walking Skeleton
50
+
51
+ #### 🧠 Think:
52
+ For each User Task, for each Step:
53
+ - Which option is genuinely the simplest — compared across all of them, not just `.1`?
54
+ - Does the combination still let the user complete the User Task end to end (UI → Logic → Data)?
55
+ - Is each pick reversible? (Data layer especially: can it be undone without data loss or a migration?)
56
+ - Is a cheap-family option (fake data, crutch, one case only) enough here?
57
+
58
+ #### ▶️ Execute:
59
+ 1. Choose one option per Step that the User Task needs; skip Steps that are optional for the flow.
60
+ 2. Every User Task must be represented. System Tasks that User Tasks depend on come first.
61
+ 3. Write the skeleton as **option IDs per User Task**, plus one line of what the user can do.
62
+ 4. Add a `Why:` line for every pick that is not the lowest-numbered option, or that trades
63
+ simplicity for reversibility.
64
+
65
+ Selection rules:
66
+ - Option numbering is a complexity hint, not a mandate.
67
+ - Prefer reversible options over irreversible ones.
68
+ - Better a clumsy but working full flow than a perfect but incomplete fragment.
69
+ - The skeleton's options may cover requirements only `partial` or `fake` — that is expected.
70
+
71
+ ---
72
+
73
+ ## Step 4: Validate
74
+
75
+ 1. Every User Task is in the skeleton (no gaps).
76
+ 2. The combination works end to end; the user could try it tomorrow.
77
+ 3. It is the MINIMUM, not just "simple".
78
+ 4. Descriptions say what the user can do or see — technology names OK; endpoints, field schemas,
79
+ function or class names not OK.
80
+ 5. The Self-check counts match the trace.
81
+
82
+ If validation fails, revisit Step 3.
83
+
84
+ ---
85
+
86
+ ## OUTPUT FORMAT
87
+
88
+ The skeleton and coverage blocks of the skill's output (see SKILL.md → Output):
89
+
90
+ ```markdown
91
+ ### Coverage
92
+ - R1 Coach sees the clip list — F1-1.1 fake, F1-1.2 total
93
+ - R2 List is sorted by date — F1-1.3 total
94
+
95
+ ### Walking Skeleton proposal
96
+ - **[Picks a clip]** F1-1.1 + F1-2.1 — coach picks from a hardcoded list of 3 clips; the pick lives in memory
97
+ - **[Shares the clip]** F1-3.2 + F1-4.1 — coach copies a link and pastes it into the team chat by hand
98
+ - Why: F1-3.2 over F1-3.1 — a link needs no player accounts; F1-3.1 would force sign-up first
99
+ ```
100
+
101
+ ---
102
+
103
+ ## EXAMPLES
104
+
105
+ ### Good Walking Skeleton ✅
106
+
107
+ ```markdown
108
+ - **[Records Audio]** F1-1.1 + F1-3.1 — coach records with the browser microphone; audio is kept in LocalStorage
109
+ - **[Organizes Library]** F1-5.1 + F1-6.1 — a simple list of recordings read from LocalStorage
110
+ - **[Plays Audio]** F1-7.1 — basic playback with the browser audio element
111
+ ```
112
+
113
+ Why it works: every User Task is there, each one works end to end, it uses the cheapest options
114
+ (browser APIs, LocalStorage, plain list), and it could ship tomorrow.
115
+
116
+ ### Same skeleton written wrong ❌
117
+
118
+ ```markdown
119
+ - **[Records Audio]** POST /recordings {blob, mime_type, duration_ms} — raw audio to S3 bucket
120
+ - **[Organizes Library]** GET /recordings → [{id, title, created_at}] — queries recordings table
121
+ ```
122
+
123
+ Code-level details (endpoints, field schemas) instead of what the user can do, and the most
124
+ expensive options instead of the cheapest.
125
+
126
+ ### Bad Walking Skeleton ❌
127
+
128
+ ```markdown
129
+ - Setup audio processing pipeline
130
+ - Create database schema
131
+ - Implement authentication
132
+ ```
133
+
134
+ Generic infrastructure tasks, not option IDs; no User Task tags; no end-to-end user flow.
135
+
136
+ ---
137
+
138
+ ## COMMON ISSUES
139
+
140
+ **"Walking Skeleton too complex"** → Compare every option per Step; pick the one with the fewest
141
+ dependencies. Do not default to `.1`.
142
+
143
+ **"Not all User Tasks in the skeleton"** → Every User Task must be represented, even if minimal
144
+ (a fake or manual option is fine).
145
+
146
+ **"Every option in the skeleton covers its requirement totally"** → You mirrored the ACs. Look
147
+ for the `fake` / `partial` option of each Step; if none exists, Phase 2 is missing the cheap family.
148
+
149
+ **"Skeleton items contain endpoint signatures, schemas or function names"** → Each line answers
150
+ "what can the user do or see?"
151
+ ✅ "[Comment on clip] F1-2.1 — text field on the player timeline; the comment is saved"
152
+ ❌ "[Comment on clip] POST /comments { content_id, timestamp_ms, text }"
@@ -0,0 +1,139 @@
1
+ # Phase 4: Bite-sizing
2
+
3
+ Phase 2 explores: 3+ options per Step, with quotas, so nothing cheap or smart is missed. That
4
+ produces filler, and nothing so far removes it. Phase 4 is the synthesis that was missing: it
5
+ prunes the trace, sets where each Step should end up, and groups what is left into small
6
+ **bites** a human can read and prioritize at a glance.
7
+
8
+ Run it on the **whole trace**, after the Coverage check and the Walking Skeleton. The owner never
9
+ reads 180 loose option IDs; they read 8–12 bites.
10
+
11
+ **No durations.** Size a bite by its options and the Steps it touches, never by time.
12
+
13
+ ---
14
+
15
+ ## Step 1: Prune, with a reason
16
+
17
+ Go through every option that is **not** in the Walking Skeleton. Discard it only for one of these
18
+ reasons, and write the reason:
19
+
20
+ | Reason | Means | Example |
21
+ |---|---|---|
22
+ | `obsolete` | Sits below the option the skeleton chose for the same Step: building it now would be a step back | Skeleton takes F5-4.2, so F5-4.1 (a weaker way to do the same Step) is obsolete |
23
+ | `dominated` | Another option gives clearly more for a similar cost | "Hold to undo" vs a plain Undo button that costs the same |
24
+ | `filler` | Adds nothing; it exists only to meet the 3-option quota | "Reset with a long press" next to a visible Reset button |
25
+ | `contradicts` | Goes against the PRD, an ADR, the constitution or the Discovery Context | An option that needs sign-up when the Discovery Context says no accounts |
26
+
27
+ Rules:
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 (those of its
30
+ bites) through the trace.
31
+ - A discard needs one of the four reasons. "I prefer the other one" is not a reason; when two
32
+ options are genuine alternatives, keep both and let a bite choose.
33
+ - **Delete discarded options from the trace.** They do not stay as crossed-out lines. The output
34
+ keeps only the `### Pruned` list with each ID, its title and its reason, so a reviewer can
35
+ object. IDs are never renumbered: a gap in the numbering is fine.
36
+ - Pruning is not shrinking for its own sake. When unsure between `filler` and "cheap and
37
+ useful", keep it.
38
+
39
+ ---
40
+
41
+ ## Step 2: Target per Step
42
+
43
+ For every Step, mark the option the slice **should reach when it closes** — the best option for
44
+ that Step given what the Feature promises. Write `→ target` on that option.
45
+
46
+ - The target can be the skeleton's own pick (nothing more is needed in that Step).
47
+ - A Step whose target is above the skeleton pick is where the bites will come from.
48
+ - One target per Step. If two options seem equally right, they are not alternatives: they are
49
+ two improvements, and the second belongs in a bite, not in the target.
50
+
51
+ ---
52
+
53
+ ## Step 3: Group the live options into bites, per User Task
54
+
55
+ Every **live** option (not pruned, not in the skeleton, not `deferred`) goes into **exactly one**
56
+ bite. Group options that belong together:
57
+
58
+ - **Accumulating improvements** that build on each other (mark the cut cell, on top of the line
59
+ already drawn).
60
+ - **Pieces that only have value together** (announce the loss in the confirmation, together with
61
+ the mark on the cut cell).
62
+ - **Options that depend on each other** across Steps, or across User Tasks of the same Feature.
63
+
64
+ A bite belongs to **one Feature**: you only see your own Feature's trace. When it needs something from
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.
67
+
68
+ Do **not** put two real alternatives (two ways to do the same thing) in the same bite: pick one
69
+ as part of the bite, and the other is either pruned (`dominated`) or its own bite.
70
+
71
+ Each bite carries:
72
+
73
+ | Field | Content |
74
+ |---|---|
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 |
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" |
77
+ | Priority | `must-have` or `~nice-to-have`. Must-have = the slice is not finished without it |
78
+ | Options | The option IDs, with the Steps they come from |
79
+ | Depends on | Another bite ID, `Inc 1`, or `none`. Bite dependencies must not form a cycle |
80
+ | Value | One line: what the user gets that they did not have |
81
+ | Check | One sentence: how to tell it works, concrete enough to turn into a scenario later |
82
+
83
+ Bite INVEST test (all must hold, or split or merge it):
84
+ - **Independent** — it can be built after its stated dependencies, in any order among the rest.
85
+ - **Negotiable** — options inside it can be swapped for alternatives without changing its value.
86
+ - **Valuable** — the user can see or do something new when it is done.
87
+ - **Estimable** — its options are specific enough for the engineer to size.
88
+ - **Small** — about 5 options or fewer. Over that, split it.
89
+ - **Testable** — the Check line is something a test can say yes or no to.
90
+
91
+ `deferred` options go in their own bites, labelled `deferred (<reason, e.g. needs F9>)`, apart
92
+ from the live ones. If a deferred bite is big, say it must be pruned and split when it is
93
+ recovered.
94
+
95
+ A bite may touch several Steps, and a User Task may have one bite or many. A bite may
96
+ cover every Step of a User Task, or just one: let the value decide, not the Step boundaries.
97
+
98
+ ---
99
+
100
+ ## Step 4: Self-check
101
+
102
+ Recount after pruning and bite-sizing. The numbers must agree:
103
+
104
+ - Options in the trace = skeleton + in bites + deferred (nothing else).
105
+ - **Options without a bite: 0.** **Options in two bites: 0.**
106
+ - Pruned by reason: `obsolete` n · `dominated` n · `filler` n · `contradicts` n.
107
+ - Steps with a target: n/n.
108
+ - Bites: n (`must-have` n · `~nice-to-have` n · deferred n), each with all its fields, none
109
+ over ~5 options.
110
+
111
+ ---
112
+
113
+ ## OUTPUT FORMAT
114
+
115
+ The blocks added to the skill's output (see SKILL.md → Output). In the trace, each live option
116
+ carries its bite and each Step its target:
117
+
118
+ ```markdown
119
+ - **S6 Mark the cut cell** · UI — …
120
+ - F5-6.1 List teammates … · <strategy> · F5-h
121
+ - F5-6.3 Mark the cut cell on the line … · <strategy> · covers R3 total · F5-a
122
+ - F5-6.4 Label the long pass … · <strategy> · covers R4 partial · F5-c → target
123
+ - strategies: …
124
+
125
+ ### Pruned
126
+ - F5-5.1 Give every line as free — `filler`: exists only to meet the quota; the skeleton option already works
127
+ - F5-4.1 Cut only straight lines — `obsolete`: below F5-4.2, the skeleton pick for S4
128
+
129
+ ### Bites
130
+ - **[Pass the ball]**
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"
133
+ - **Deferred**
134
+ - **F5-d1 · The buzzer** (deferred: needs F9) — F5-3.3, F5-16.1 · prune and split when recovered
135
+ ```
136
+
137
+ Bad vs good title:
138
+ - ❌ "F5-6.3 Mark the cut cell" — a Step-level name; lost outside its Step
139
+ - ✅ "Ana sees which defender cuts her pass and where" — a user, an action, a result
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: bokata-plan
3
+ description: Write the technical plan for the unplanned increments of a bokata slice (usually the one just added) as checklists in the initiative's plan.md, one section per slice and increment, so an executor in another process can follow it and check it off. It is a contract to use inside your harness's own plan mode — it does not replace it. Use it when the user wants to plan a slice, or says "plan <slice>" after bokata-slice.
4
+ ---
5
+
6
+ # bokata-plan
7
+
8
+ Your harness's plan mode does the planning. This skill only fixes **where the plan lands and
9
+ in what shape**, so that the executor (often another tool and another model) and
10
+ `bokata-status` can read it. Plan every increment with no section yet in `plan.md` — usually the
11
+ one `bokata-slice` just added (Inc 1, or the latest `--next`). Never re-plan a built increment.
12
+
13
+ ## Configuration
14
+
15
+ Read `.bokata.json` at the project root if it exists (`docs` defaults to `docs/initiatives`,
16
+ `memory.glossary` to `GLOSSARY.md`, `methods.domain` to `domain-modeling`).
17
+
18
+ ## 1. Read
19
+
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; `notes.md` has 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).
26
+ - The pitch's rabbit holes and no-gos, the constitution, `AGENTS.md`, the glossary, and the
27
+ ADRs that touch the area.
28
+ - The code the slice touches. Use read-only explore subagents in parallel if your harness has
29
+ them. Never assume an API exists: find it.
30
+
31
+ ## 2. Plan
32
+
33
+ For every increment to plan, write the steps that build it:
34
+
35
+ - **The first step of an increment is its acceptance test**: the scenario as one test at the
36
+ highest seam the project's unit runner reaches cheaply, committed as an expected failure
37
+ (the code method says how). Name the seam — it is a design decision, so make it here.
38
+ Skip it when the first step's own test already is the scenario.
39
+ - **One step = one small, tested change** that ends in a commit: roughly one test file and
40
+ one or two production files. Each step names the scenario (or part of it) it proves.
41
+ - Name steps, functions and types with the glossary's words. A domain concept the glossary
42
+ lacks is an owner decision (below): once the user settles it, load the skill in
43
+ `methods.domain` (skip it if `null`) and add the term to the glossary — the term, never its
44
+ implementation.
45
+ - Order the steps the way the project builds (see `AGENTS.md`; for example domain → use case
46
+ → view model → component → copy).
47
+ - Respect each option's shortcut: an option that says "hardcoded list" or "approved by hand"
48
+ is built exactly that way — do not plan the real thing it stands in for.
49
+ - Within an increment: steps for its must-have scenarios first, `~` scenarios last.
50
+ - When more than one increment is unbuilt, mark each **`Parallel-safe: yes`** only if its steps
51
+ touch no file another unbuilt increment's steps touch; otherwise `no`. With one, write `yes`.
52
+ - Add to the increment's `Unknowns` anything you could not settle from the code.
53
+ - Decisions that only the user can make (two valid readings, a trade-off, a new pattern or
54
+ dependency): **ask them now**, in rounds — all of them at once, numbered, each with your
55
+ recommendation and worded so "yes" accepts it. Record each answer under `Notes` as
56
+ `Owner decision: …`. A new pattern that needs an ADR is an owner decision too.
57
+
58
+ Do not write code. Do not change the acceptance criteria: if one is wrong or missing, stop and
59
+ tell the user — it goes back to `bokata-slice`.
60
+
61
+ ## 3. Write it into `plan.md`
62
+
63
+ The plan is **one file per initiative**: `<docs>/<slug>/plan.md`, from
64
+ [resources/plan-template.md](resources/plan-template.md). Create it if it is missing. Under
65
+ `## Slice <nn> — <name>` (add the section if the slice has none), add one `### Inc <n> — <name>`
66
+ per increment you plan, with its steps and an empty `Tests:`:
67
+
68
+ ```markdown
69
+ ### Inc 1 — Walking skeleton: library filter chip
70
+
71
+ Plan:
72
+ - [ ] Acceptance: "chip filters the list" in `useLibraryViewModel.spec`, marked expected failure
73
+ - [ ] Domain: `hasDrawings(clip)` pure rule — proves "legacy clip with draws counts"
74
+ - [ ] View model: filter flag in `useLibraryViewModel` — proves "chip filters the list"
75
+ - [ ] Chip in `LibraryToolbar` + copy in every locale — proves "chip shows its state"
76
+
77
+ Tests:
78
+ - <scenario> → <test file> › <test name> <!-- filled by the executor -->
79
+ ```
80
+
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
+ `notes.md`). 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.
86
+
87
+ If your plan mode does not let you edit files, present the plan for approval first and write
88
+ it into the slice right after the user approves.
89
+
90
+ ## 4. Refresh the story map
91
+
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.
100
+
101
+ ## 5. Hand-off
102
+
103
+ End with the exact line the user can hand to an executor (by hand, or through an
104
+ orchestrator such as Orca):
105
+
106
+ ```
107
+ Next: code-executor — build Inc <n> of slice <docs>/<slug>/slices/<nn>-<name>.md (Inc file: <nn>-<name>/inc-<n>.md)
108
+ plan: <docs>/<slug>/plan.md (Slice <nn> · Inc <n>)
109
+ (increments marked Parallel-safe: yes may run in separate worktrees; each edits only its own plan section)
110
+ ```
@@ -0,0 +1,35 @@
1
+ # Plan — <initiative>
2
+
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.
9
+ Edit only your own increment's section: Incs built in parallel worktrees then touch different lines. -->
10
+
11
+ ## Slice <nn> — <name>
12
+
13
+ <!-- Slice index: slices/<nn>-<name>.md · Inc files: slices/<nn>-<name>/inc-<n>.md -->
14
+
15
+ ### Inc 1 — <name>
16
+
17
+ Plan:
18
+ - [ ] Acceptance: "<scenario>" in `<test file>`, marked expected failure
19
+ - [ ] <step — one small, tested change that ends in a commit> — proves "<scenario>"
20
+
21
+ Tests:
22
+ - <scenario> → <test file> › <test name>
23
+
24
+ ### Inc 2 — <name>
25
+
26
+ Plan:
27
+ - [ ] <step>
28
+
29
+ Tests:
30
+ - <scenario> → <test file> › <test name>
31
+
32
+ ## Slice <nn> — <name>
33
+
34
+ ### Inc 1 — <name>
35
+ …