bokata 2.0.0 → 3.0.0-beta.3

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 (43) hide show
  1. package/{commands/task-parallel/feature-map.md → .agents/skills/bokata-feature-map/SKILL.md} +80 -79
  2. package/.agents/skills/bokata-feature-map/resources/features-template.md +83 -0
  3. package/.agents/skills/bokata-feature-slicer/SKILL.md +171 -182
  4. package/.agents/skills/bokata-feature-slicer/resources/output-template-bites.md +13 -0
  5. package/.agents/skills/bokata-feature-slicer/resources/output-template-increments.md +9 -12
  6. package/.agents/skills/bokata-feature-slicer/resources/output-template-steps.md +6 -22
  7. package/.agents/skills/bokata-feature-slicer/resources/phase-2-increments.md +43 -49
  8. package/.agents/skills/bokata-feature-slicer/resources/phase-3-baby-steps.md +90 -249
  9. package/.agents/skills/bokata-feature-slicer/resources/phase-4-bites.md +138 -0
  10. package/.agents/skills/bokata-plan/SKILL.md +104 -0
  11. package/.agents/skills/bokata-plan/resources/plan-template.md +33 -0
  12. package/.agents/skills/bokata-refactor/SKILL.md +69 -0
  13. package/.agents/skills/bokata-refactor/resources/smells.md +47 -0
  14. package/.agents/skills/bokata-refactor/resources/tidyings.md +31 -0
  15. package/.agents/skills/bokata-render/SKILL.md +144 -0
  16. package/.agents/skills/bokata-render/resources/story-map-template.md +835 -0
  17. package/.agents/skills/bokata-shape/SKILL.md +117 -0
  18. package/.agents/skills/bokata-shape/resources/adr-template.md +24 -0
  19. package/.agents/skills/bokata-shape/resources/breadboarding.md +47 -0
  20. package/.agents/skills/bokata-shape/resources/pitch-template.md +42 -0
  21. package/.agents/skills/bokata-slice/SKILL.md +475 -0
  22. package/.agents/skills/bokata-slice/resources/slice-template.md +117 -0
  23. package/.agents/skills/bokata-status/SKILL.md +65 -0
  24. package/.agents/skills/bokata-tdd/SKILL.md +109 -0
  25. package/.agents/skills/bokata-tdd/resources/evidence-rules.md +27 -0
  26. package/README.md +210 -92
  27. package/agents/bokata-product-designer.md +48 -16
  28. package/agents/bokata-product-engineer.md +48 -15
  29. package/agents/bokata-product-manager.md +48 -16
  30. package/agents/code-executor.md +53 -0
  31. package/agents/design-reviewer.md +40 -0
  32. package/agents/feature-slicer.md +42 -0
  33. package/agents/story-map-renderer.md +19 -0
  34. package/bin/bokata.js +27 -12
  35. package/package.json +20 -7
  36. package/src/agents.js +114 -0
  37. package/src/config.js +75 -0
  38. package/src/install.js +173 -205
  39. package/commands/codex/feature-map.md +0 -263
  40. package/commands/codex/slice-feature.md +0 -291
  41. package/commands/task-parallel/resources/html-template.md +0 -560
  42. package/commands/task-parallel/resources/story-map-template.md +0 -495
  43. package/commands/task-parallel/slice-feature.md +0 -301
@@ -1,311 +1,152 @@
1
- # Phase 3: Vertical Slices Synthesis
1
+ # Phase 3: Coverage Check and Walking Skeleton
2
2
 
3
- Take the complete breakdown (Features, User Tasks, Steps, Incremental Options) and synthesize it into a clear, prioritized development plan. Identify the "Walking Skeleton" (minimum viable vertical slices) first, then organize all remaining increments into a flexible backlog.
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. 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.
4
8
 
5
- ---
6
-
7
- ## SYNTHESIS PROCESS
8
-
9
- **Important:** Think step-by-step before generating Vertical Slices plan.
10
-
11
- ### Step 1: Understanding the Analysis
12
-
13
- #### 🧠 Think:
14
- - What Feature am I synthesizing for?
15
- - What are all the User Tasks under this Feature?
16
- - How many Steps per User Task?
17
- - How many Incremental Options per Step?
18
- - [List User Tasks and their step counts]
19
-
20
- #### ▶️ Execute:
21
- 1. Locate `## Features Backbone` section in the provided input
22
- 2. Identify all User Tasks under the target Feature
23
- 3. Count Steps per User Task
24
- 4. Count Incremental Options per Step
25
- 5. Create a complete map of the Feature structure
9
+ **No durations.** "Simplest" = fewest dependencies, least infrastructure, most reversible. Never
10
+ write "buildable in N days".
26
11
 
27
12
  ---
28
13
 
29
- ### Radical Slicing Challenge (before selecting candidates)
30
-
31
- Before picking anything, ask yourself per step: **"If we had to ship tomorrow, which option would we choose?"**
14
+ ## Step 1: Map the trace
32
15
 
33
- If that answer differs from your initial instinct — use that option. The skeleton should feel uncomfortably minimal. If it feels comfortable, it's probably still too big.
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.
34
20
 
35
21
  ---
36
22
 
37
- ### Step 2: Identifying Walking Skeleton Candidates
23
+ ## Step 2: Coverage check (now, not before)
38
24
 
39
- #### 🧠 Think:
40
- For EACH User Task, for EACH Step:
41
- - What is the SIMPLEST incremental option?
42
- - Does it cut through all necessary layers (UI → Logic → Data)?
43
- - Can it deliver END-TO-END functionality (even if minimal)?
44
- - Is it independently deployable?
45
- - Can it be built in 1-3 days by one developer?
46
- - Is it reversible? (especially for Data layer — can it be undone without data loss or migration complexity?)
47
- - [List simplest option per step per task]
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.
48
27
 
49
28
  #### ▶️ Execute:
50
- For each step in each User Task, select the simplest viable option:
51
- 1. Evaluate ALL options for each step
52
- 2. Select the option that is: simplest to implement, enables end-to-end flow, and delivers real user value
53
- 3. The option number does NOT determine selection — option .2 or .3 may be simpler in context
54
- 4. Ensure every User Task is represented in the skeleton
55
-
56
- Walking Skeleton Selection Rules:
57
- - Evaluate all options and choose the GENUINELY simplest viable one per step
58
- - "Simplest" = fewest dependencies, least infrastructure, fastest to ship — buildable in 1-3 days by one developer
59
- - Prefer reversible options over irreversible ones, especially Data layer items (a reversible option can be undone without data loss or migration complexity)
60
- - Option numbering is a complexity hint, not a mandate — verify by comparing options
61
- - Every User Task MUST be represented in skeleton
62
- - Each skeleton item must be independently deployable
63
- - Skeleton must demonstrate end-to-end flow for entire Feature
64
-
65
- ---
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.
66
36
 
67
- ### Step 3: Walking Skeleton Validation
37
+ Output: the `### Coverage` block (one line per Requirement) and `covers R<n> <how>` on each option.
68
38
 
69
- #### 🧠 Think:
70
- - Does the skeleton cover ALL User Tasks in the Feature?
71
- - Does every selection enable end-to-end flow?
72
- - Could I ship this tomorrow and get user feedback?
73
- - Is this the MINIMUM (not just "simple")?
74
- - [Verify skeleton completeness]
39
+ ---
75
40
 
76
- #### ▶️ Execute:
77
- Validate skeleton completeness against these criteria:
78
- 1. All User Tasks represented (no gaps)
79
- 2. Each uses genuinely simplest viable option (evaluated across all options)
80
- 3. End-to-end functionality demonstrated
81
- 4. Shippable tomorrow (minimal but complete)
82
- 5. Every item is independently deployable
83
- 6. NO code-level details: no endpoint signatures, no field schemas, no function/class names — technology references are fine ("Web Audio API", "LocalStorage"), code constructs are not
41
+ ## Radical Slicing Challenge (before picking)
84
42
 
85
- If validation fails, revisit Step 2 selections.
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.
86
46
 
87
47
  ---
88
48
 
89
- ### Step 4: Increments Bank Organization
49
+ ## Step 3: Pick the Walking Skeleton
90
50
 
91
51
  #### 🧠 Think:
92
- - What are all the remaining options NOT in the skeleton?
93
- - How should they group? (by User Task for clarity)
94
- - Are they ordered simple → complex within each User Task?
95
- - Are dependencies clear?
96
- - [List all non-skeleton options organized by User Task]
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?
97
57
 
98
58
  #### ▶️ Execute:
99
- Organize all non-skeleton options by:
100
- 1. Collecting all non-skeleton options for each User Task
101
- 2. Grouping by Step (Step 1 options, then Step 2 options, etc.)
102
- 3. Ordering by complexity within each Step (simple → advanced)
103
- 4. Noting dependencies using metadata tags
104
- 5. Ensuring every option from analysis is included
105
-
106
- Organization Guidelines:
107
- - Group by User Task (not by Step)
108
- - Within each User Task, maintain Step order
109
- - Mark dependencies: `-- (Requires: Step N Option M)`
110
- - Mark enhancements: `-- (Enhances: Step N)`
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.
111
70
 
112
71
  ---
113
72
 
114
- ### Step 5: Final Validation
73
+ ## Step 4: Validate
115
74
 
116
- #### 🧠 Think:
117
- - Walking Skeleton: Does it demonstrate full flow?
118
- - Increments Bank: Are all remaining options listed?
119
- - Formatting: Checkboxes, User Task tags, descriptions?
120
- - Clarity: Can a developer pick this up and start?
121
- - [Self-check against quality criteria]
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.
122
81
 
123
- #### ▶️ Execute:
124
- Perform final validation checks:
125
- 1. Walking Skeleton section complete and valid
126
- 2. Increments Bank section complete and organized
127
- 3. Every item has proper format: `[ ] **[User Task]** Name: Desc -- (Metadata)`
128
- 4. No generic items (all specific increments from analysis)
129
- 5. Formatting is consistent markdown
130
- 6. Output is developer-ready (actionable immediately)
82
+ If validation fails, revisit Step 3.
131
83
 
132
84
  ---
133
85
 
134
86
  ## OUTPUT FORMAT
135
87
 
136
- Return **ONLY** the markdown for the ToDo list:
137
-
138
- > **Rule:** Walking Skeleton item descriptions must answer "what can the user do or see?" and may reference the technology/approach used. Do NOT include endpoint signatures, field schemas, or function/class names.
88
+ The skeleton and coverage blocks of the skill's output (see SKILL.md → Output):
139
89
 
140
90
  ```markdown
141
- # Vertical Slices: [Feature Name]
142
-
143
- ## 💀 Walking Skeleton
144
- *Goal: End-to-end connectivity and basic value. No bells and whistles.*
145
-
146
- ### User Task 1: [Name]
147
- - [ ] **[User Task 1]** [Simplest Option for Step 1]: [Complete description] -- (Task: User Task 1)
148
- - [ ] **[User Task 1]** [Simplest Option for Step 2]: [Complete Description] -- (Task: User Task 1)
149
- - [ ] **[User Task 1]** [Simplest Option for Step 3]: [Complete Description] -- (Task: User Task 1)
150
-
151
- ### User Task 2: [Name]
152
- - [ ] **[User Task 2]** [Simplest Option for Step 1]: [Complete Description] -- (Task: User Task 2)
153
- - [ ] **[User Task 2]** [Simplest Option for Step 2]: [Complete Description] -- (Task: User Task 2)
154
-
155
- [Continue for all User Tasks...]
156
-
157
- ## 🏗️ Increments Backlog
158
- *Select and prioritize these increments manually to build upon the Walking Skeleton.*
159
-
160
- ### User Task 1: [Name]
161
- - [ ] **[User Task 1]** [Option 2 for Step 1]: [Complete Description] -- (Enhances: Step 1)
162
- - [ ] **[User Task 1]** [Option 3 for Step 1]: [Complete Description] -- (Enhances: Step 1)
163
- - [ ] **[User Task 1]** [Option 2 for Step 2]: [Complete Description] -- (Enhances: Step 2)
164
- - [ ] **[User Task 1]** [Option 3 for Step 2]: [Complete Description] -- (Enhances: Step 2)
165
-
166
- ### User Task 2: [Name]
167
- - [ ] **[User Task 2]** [Option 2 for Step 1]: [Complete Description] -- (Enhances: Step 1)
168
- - [ ] **[User Task 2]** [Option 3 for Step 1]: [Complete Description] -- (Enhances: Step 1)
169
-
170
- [Continue for all User Tasks...]
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
171
99
  ```
172
100
 
173
101
  ---
174
102
 
175
- ## STRATEGY GUIDELINES
176
-
177
- ### 1. Walking Skeleton First
178
-
179
- - Look for the **SIMPLEST increment** in every critical step
180
- - If a User Task is "Critical", it MUST be represented in skeleton
181
- - If a step is "Optional" or "Advanced", SKIP it for skeleton
182
- - **Principle**: Better a clumsy but working full flow than a perfect but incomplete fragment
183
-
184
- **Walking Skeleton Selection Rules:**
185
- - Evaluate all options and choose the GENUINELY simplest viable one per step
186
- - "Simplest" = fewest dependencies, least infrastructure, fastest to ship
187
- - Option numbering is a complexity hint, not a mandate — verify by comparing options
188
- - Skeleton must demonstrate EVERY User Task's core value proposition
189
- - Each skeleton item must be independently deployable
190
-
191
- **System Tasks in the Walking Skeleton:**
192
- System Tasks that are prerequisites for User Tasks must appear as baby steps
193
- before those User Tasks. The order is: opening transitions → user tasks that depend
194
- on them → closing transitions.
195
-
196
- ### 2. Increments Bank Organization
197
-
198
- - Group items by **User Task** so user can see all options for specific functional area
199
- - Within each User Task group, list by Step order (Step 1 options, then Step 2 options, etc.)
200
- - Ensure each item clearly states its purpose and description
201
- - Mark dependencies (e.g., "Requires Step 1.2", "Enhances Step 3")
202
-
203
- ### 3. Tagging and Metadata
204
-
205
- - Every ToDo item MUST start with User Task name in bold brackets: `**[User Task Name]**`
206
- - Add context in parentheses: `-- (Task: User Task Name)` or `-- (Enhances: Step N)`
207
- - For dependencies: `-- (Requires: Step N Option M)`
208
-
209
- ### 4. Atomic Items
210
-
211
- - Each ToDo item must be a specific, deliverable increment from the input
212
- - Copy the exact increment name and description from analysis
213
- - NO generic items like "Implement feature" or "Add functionality"
214
-
215
- ---
216
-
217
- ## WALKING SKELETON EXAMPLES
103
+ ## EXAMPLES
218
104
 
219
105
  ### Good Walking Skeleton ✅
220
106
 
221
107
  ```markdown
222
- ## 💀 Walking Skeleton
223
-
224
- - [ ] **Records Audio Input** Capture Audio with Browser Microphone: Use Web Audio API for basic recording -- (Task: Records Audio Input)
225
- - [ ] **Records Audio Input** Save to Browser LocalStorage: Store audio locally without backend -- (Task: Records Audio Input)
226
- - [ ] **Organizes Library** Display Audio List: Show all recordings in simple list view -- (Task: Organizes Library)
227
- - [ ] **Organizes Library** Retrieve from LocalStorage: Load audio files from browser storage -- (Task: Organizes Library)
228
- - [ ] **Plays Audio** Play Audio File: Basic playback with browser Audio element -- (Task: Plays Audio)
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
229
111
  ```
230
112
 
231
- **Why this works:**
232
- - Covers all User Tasks (Records, Organizes, Plays)
233
- - Each User Task has end-to-end flow (UI → Logic → Data)
234
- - Uses simplest options (Browser APIs, LocalStorage, basic UI)
235
- - Could ship tomorrow and get user feedback
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 ❌
236
117
 
237
- **Same items written wrong ❌ (do NOT do this):**
238
118
  ```markdown
239
- - [ ] **Records Audio Input** POST /recordings {blob, mime_type, duration_ms, device_id} — raw audio to S3 bucket
240
- - [ ] **Organizes Library** GET /recordings → [{id, title, created_at, duration_ms}] — queries recordings table
241
- - [ ] **Plays Audio** Audio.play(src: s3SignedUrl) — streams from presigned URL
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
242
121
  ```
243
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
+
244
126
  ### Bad Walking Skeleton ❌
245
127
 
246
128
  ```markdown
247
- ## 💀 Walking Skeleton
248
-
249
- - [ ] Setup audio processing pipeline
250
- - [ ] Create database schema
251
- - [ ] Implement authentication
252
- - [ ] Deploy to cloud
129
+ - Setup audio processing pipeline
130
+ - Create database schema
131
+ - Implement authentication
253
132
  ```
254
133
 
255
- **Why this fails:**
256
- - Generic tasks, not specific increments
257
- - No User Task tags
258
- - Infrastructure-focused, not user-value-focused
259
- - Doesn't demonstrate end-to-end user flow
260
-
261
- ---
262
-
263
- ## QUALITY CRITERIA
264
-
265
- ✅ **Walking Skeleton**
266
- - [ ] Covers ALL User Tasks in the Feature
267
- - [ ] Uses genuinely simplest option for each step (evaluated across all options, not just `.1`)
268
- - [ ] Demonstrates end-to-end flow for each User Task
269
- - [ ] Could ship tomorrow and deliver user value
270
- - [ ] Every item has User Task tag: `**[User Task Name]**`
271
- - [ ] Every item has checkbox: `[ ]`
272
- - [ ] Every item has description
273
- - [ ] Descriptions answer "what can the user see/do?" — technology references OK, endpoint/field/function names NOT OK
274
-
275
- ✅ **Increments Bank**
276
- - [ ] Contains ALL non-skeleton options
277
- - [ ] Organized by User Task
278
- - [ ] Within each User Task, ordered by Step
279
- - [ ] Every item has User Task tag: `**[User Task Name]**`
280
- - [ ] Every item has checkbox: `[ ]`
281
- - [ ] Every item has description
282
- - [ ] Dependencies noted where applicable
283
-
284
- ✅ **Overall Quality**
285
- - [ ] No generic tasks ("implement feature", "setup system")
286
- - [ ] All items are specific increments from analysis
287
- - [ ] Formatting is consistent
288
- - [ ] Developer-ready (can start implementing immediately)
134
+ Generic infrastructure tasks, not option IDs; no User Task tags; no end-to-end user flow.
289
135
 
290
136
  ---
291
137
 
292
138
  ## COMMON ISSUES
293
139
 
294
- **Issue: "Walking Skeleton too complex"**
295
- → Solution: Compare ALL options per step and pick the one with fewest dependencies and simplest implementation path. Do not default to .1 without evaluating the alternatives.
296
-
297
- **Issue: "Not all User Tasks in skeleton"**
298
- → Solution: EVERY User Task must be represented, even if minimal.
140
+ **"Walking Skeleton too complex"** → Compare every option per Step; pick the one with the fewest
141
+ dependencies. Do not default to `.1`.
299
142
 
300
- **Issue: "Skeleton items too generic"**
301
- → Solution: Copy exact increment names from analysis, don't summarize.
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).
302
145
 
303
- **Issue: "Increments Bank is unorganized"**
304
- → Solution: Group by User Task, maintain Step order within groups.
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.
305
148
 
306
- **Issue: "Walking Skeleton items contain endpoint signatures, schemas, or function names"**
307
- → Solution: Each description must answer "what can the user do or see?" Technology references are fine.
308
- ✅ "[Comment on clip] — Text field on player timeline; user types and comment is saved"
309
- ✅ "[Comment on clip] — Uses existing comments endpoint to persist the comment"
310
- ❌ "[Comment on clip] — POST /comments { content_type, content_id, timestamp_ms, text, author_id? }"
311
- Phase 1/2 reasoning is internal scaffolding — don't surface code-level details in the output.
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,138 @@
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:`
30
+ 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, say so in `depends on` with that bite's ID (`depends on: F7-b`); do not mix their options.
66
+
67
+ Do **not** put two real alternatives (two ways to do the same thing) in the same bite: pick one
68
+ as part of the bite, and the other is either pruned (`dominated`) or its own bite.
69
+
70
+ Each bite carries:
71
+
72
+ | Field | Content |
73
+ |---|---|
74
+ | ID | Stable, per Feature: `F1-a`, `F1-b`, … (letters; they never change once written) |
75
+ | 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
+ | Priority | `must-have` or `~nice-to-have`. Must-have = the slice is not finished without it |
77
+ | Options | The option IDs, with the Steps they come from |
78
+ | Depends on | Another bite ID, `Inc 1`, or `none`. Bite dependencies must not form a cycle |
79
+ | Value | One line: what the user gets that they did not have |
80
+ | Check | One sentence: how to tell it works, concrete enough to turn into a scenario later |
81
+
82
+ Bite INVEST test (all must hold, or split or merge it):
83
+ - **Independent** — it can be built after its stated dependencies, in any order among the rest.
84
+ - **Negotiable** — options inside it can be swapped for alternatives without changing its value.
85
+ - **Valuable** — the user can see or do something new when it is done.
86
+ - **Estimable** — its options are specific enough for the engineer to size.
87
+ - **Small** — about 5 options or fewer. Over that, split it.
88
+ - **Testable** — the Check line is something a test can say yes or no to.
89
+
90
+ `deferred` options go in their own bites, labelled `deferred (<reason, e.g. needs F9>)`, apart
91
+ from the live ones. If a deferred bite is big, say it must be pruned and split when it is
92
+ recovered.
93
+
94
+ A bite may touch several Steps, and a User Task may have one bite or many. A bite may
95
+ cover every Step of a User Task, or just one: let the value decide, not the Step boundaries.
96
+
97
+ ---
98
+
99
+ ## Step 4: Self-check
100
+
101
+ Recount after pruning and bite-sizing. The numbers must agree:
102
+
103
+ - Options in the trace = skeleton + in bites + deferred (nothing else).
104
+ - **Options without a bite: 0.** **Options in two bites: 0.**
105
+ - Pruned by reason: `obsolete` n · `dominated` n · `filler` n · `contradicts` n.
106
+ - Steps with a target: n/n.
107
+ - Bites: n (`must-have` n · `~nice-to-have` n · deferred n), each with all its fields, none
108
+ over ~5 options.
109
+
110
+ ---
111
+
112
+ ## OUTPUT FORMAT
113
+
114
+ The blocks added to the skill's output (see SKILL.md → Output). In the trace, each live option
115
+ carries its bite and each Step its target:
116
+
117
+ ```markdown
118
+ - **S6 Mark the cut cell** · UI — …
119
+ - F5-6.1 List teammates … · <strategy> · F5-h
120
+ - F5-6.3 Mark the cut cell on the line … · <strategy> · covers R3 total · F5-a
121
+ - F5-6.4 Label the long pass … · <strategy> · covers R4 partial · F5-c → target
122
+ - strategies: …
123
+
124
+ ### Pruned
125
+ - F5-5.1 Give every line as free — `filler`: exists only to meet the quota; the skeleton option already works
126
+ - F5-4.1 Cut only straight lines — `obsolete`: below F5-4.2, the skeleton pick for S4
127
+
128
+ ### Bites
129
+ - **[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"
132
+ - **Deferred**
133
+ - F5-x · The buzzer (deferred: needs F9) — F5-3.3, F5-16.1 … · prune and split when recovered
134
+ ```
135
+
136
+ Bad vs good title:
137
+ - ❌ "F5-6.3 Mark the cut cell" — a Step-level name; lost outside its Step
138
+ - ✅ "Ana sees which defender cuts her pass and where" — a user, an action, a result
@@ -0,0 +1,104 @@
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 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.
23
+ - The pitch's rabbit holes and no-gos, the constitution, `AGENTS.md`, the glossary, and the
24
+ ADRs that touch the area.
25
+ - The code the slice touches. Use read-only explore subagents in parallel if your harness has
26
+ them. Never assume an API exists: find it.
27
+
28
+ ## 2. Plan
29
+
30
+ For every increment to plan, write the steps that build it:
31
+
32
+ - **The first step of an increment is its acceptance test**: the scenario as one test at the
33
+ highest seam the project's unit runner reaches cheaply, committed as an expected failure
34
+ (the code method says how). Name the seam — it is a design decision, so make it here.
35
+ Skip it when the first step's own test already is the scenario.
36
+ - **One step = one small, tested change** that ends in a commit: roughly one test file and
37
+ one or two production files. Each step names the scenario (or part of it) it proves.
38
+ - Name steps, functions and types with the glossary's words. A domain concept the glossary
39
+ lacks is an owner decision (below): once the user settles it, load the skill in
40
+ `methods.domain` (skip it if `null`) and add the term to the glossary — the term, never its
41
+ implementation.
42
+ - Order the steps the way the project builds (see `AGENTS.md`; for example domain → use case
43
+ → view model → component → copy).
44
+ - Respect each option's shortcut: an option that says "hardcoded list" or "approved by hand"
45
+ is built exactly that way — do not plan the real thing it stands in for.
46
+ - Within an increment: steps for its must-have scenarios first, `~` scenarios last.
47
+ - When more than one increment is unbuilt, mark each **`Parallel-safe: yes`** only if its steps
48
+ touch no file another unbuilt increment's steps touch; otherwise `no`. With one, write `yes`.
49
+ - Add to the increment's `Unknowns` anything you could not settle from the code.
50
+ - Decisions that only the user can make (two valid readings, a trade-off, a new pattern or
51
+ dependency): **ask them now**, in rounds — all of them at once, numbered, each with your
52
+ recommendation and worded so "yes" accepts it. Record each answer under `Notes` as
53
+ `Owner decision: …`. A new pattern that needs an ADR is an owner decision too.
54
+
55
+ Do not write code. Do not change the acceptance criteria: if one is wrong or missing, stop and
56
+ tell the user — it goes back to `bokata-slice`.
57
+
58
+ ## 3. Write it into `plan.md`
59
+
60
+ The plan is **one file per initiative**: `<docs>/<slug>/plan.md`, from
61
+ [resources/plan-template.md](resources/plan-template.md). Create it if it is missing. Under
62
+ `## Slice <nn> — <name>` (add the section if the slice has none), add one `### Inc <n> — <name>`
63
+ per increment you plan, with its steps and an empty `Tests:`:
64
+
65
+ ```markdown
66
+ ### Inc 1 — Walking skeleton: library filter chip
67
+
68
+ Plan:
69
+ - [ ] Acceptance: "chip filters the list" in `useLibraryViewModel.spec`, marked expected failure
70
+ - [ ] Domain: `hasDrawings(clip)` pure rule — proves "legacy clip with draws counts"
71
+ - [ ] View model: filter flag in `useLibraryViewModel` — proves "chip filters the list"
72
+ - [ ] Chip in `LibraryToolbar` + copy in every locale — proves "chip shows its state"
73
+
74
+ Tests:
75
+ - <scenario> → <test file> › <test name> <!-- filled by the executor -->
76
+ ```
77
+
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>)`.
83
+
84
+ If your plan mode does not let you edit files, present the plan for approval first and write
85
+ it into the slice right after the user approves.
86
+
87
+ ## 4. Sync the story map
88
+
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`.
94
+
95
+ ## 5. Hand-off
96
+
97
+ End with the exact line the user can hand to an executor (by hand, or through an
98
+ orchestrator such as Orca):
99
+
100
+ ```
101
+ Next: code-executor — build Inc <n> of slice <docs>/<slug>/slices/<nn>-<name>.md
102
+ plan: <docs>/<slug>/plan.md (Slice <nn> · Inc <n>)
103
+ (increments marked Parallel-safe: yes may run in separate worktrees; each edits only its own plan section)
104
+ ```