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
@@ -1,311 +0,0 @@
1
- # Phase 3: Vertical Slices Synthesis
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.
4
-
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
26
-
27
- ---
28
-
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?"**
32
-
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.
34
-
35
- ---
36
-
37
- ### Step 2: Identifying Walking Skeleton Candidates
38
-
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]
48
-
49
- #### ▶️ 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
- ---
66
-
67
- ### Step 3: Walking Skeleton Validation
68
-
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]
75
-
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
84
-
85
- If validation fails, revisit Step 2 selections.
86
-
87
- ---
88
-
89
- ### Step 4: Increments Bank Organization
90
-
91
- #### 🧠 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]
97
-
98
- #### ▶️ 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)`
111
-
112
- ---
113
-
114
- ### Step 5: Final Validation
115
-
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]
122
-
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)
131
-
132
- ---
133
-
134
- ## OUTPUT FORMAT
135
-
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.
139
-
140
- ```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...]
171
- ```
172
-
173
- ---
174
-
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
218
-
219
- ### Good Walking Skeleton ✅
220
-
221
- ```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)
229
- ```
230
-
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
236
-
237
- **Same items written wrong ❌ (do NOT do this):**
238
- ```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
242
- ```
243
-
244
- ### Bad Walking Skeleton ❌
245
-
246
- ```markdown
247
- ## 💀 Walking Skeleton
248
-
249
- - [ ] Setup audio processing pipeline
250
- - [ ] Create database schema
251
- - [ ] Implement authentication
252
- - [ ] Deploy to cloud
253
- ```
254
-
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)
289
-
290
- ---
291
-
292
- ## COMMON ISSUES
293
-
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.
299
-
300
- **Issue: "Skeleton items too generic"**
301
- → Solution: Copy exact increment names from analysis, don't summarize.
302
-
303
- **Issue: "Increments Bank is unorganized"**
304
- → Solution: Group by User Task, maintain Step order within groups.
305
-
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.
@@ -1,263 +0,0 @@
1
- ---
2
- description: Generate a Features Backbone and Functional Acceptance Criteria using the Product Trio (PM, Designer, Engineer). Outputs as .md and .html under docs/initiatives/[name]/.
3
- ---
4
-
5
- Generate a Features Backbone (User Story Mapping) and Functional-Level Acceptance Criteria using the **Product Trio** — you act as the neutral coordinator, with PM, Designer, and Engineer reviewing from their lenses.
6
-
7
- All outputs (.md + .html) are saved under `docs/initiatives/<initiative-slug>/` and include trio reconciliation notes where conflicts arose.
8
-
9
- ---
10
-
11
- ## Input
12
-
13
- Accept either:
14
- 1. **Free-form initiative description** (what you want to build)
15
- 2. **Path to existing docs** (PRD, openspec proposal, features-backbone.md, etc.)
16
- 3. **Combination** (reference existing + add new context)
17
-
18
- ---
19
-
20
- ## Step 1: Resolve Initiative Slug & Create Folder
21
-
22
- 1. Ask the user for the initiative name / title if not provided via argument
23
- 2. Derive `<initiative-slug>` (kebab-case, max 50 chars, no spaces)
24
- 3. Create folder: `docs/initiatives/<initiative-slug>/` (use `mkdir -p`)
25
- 4. Proceed with confirmed slug in subsequent steps
26
-
27
- ---
28
-
29
- ## Step 2: Consolidated Phase 0 Discovery (Interactive)
30
-
31
- Instead of each skill asking its own Phase 0 questions, consolidate once here.
32
-
33
- Ask clarifying questions that would affect **Feature scope, actors, flows, or business constraints** — merge the categories from:
34
- - `bokata-feature-mapper`'s categories: Scope, Actors, Flows, Constraints
35
- - Later AC phases: Business rules that affect Feature framing (e.g., "must curator-verify stories before public visibility" — is that a Feature boundary or an internal rule?)
36
-
37
- If the input is already rich (existing backbone/spec provided), acknowledge that explicitly:
38
- > "You provided [specs/geolocation-discovery/spec.md], which resolves Scope and Constraints. Skipping those categories; asking only about [missing categories]."
39
-
40
- Produce one `## Discovery Context — Backbone` block with sections: Actors Confirmed / Scope Boundaries / Flow Clarifications / Constraints Confirmed / Assumptions.
41
-
42
- **Save this in memory for Step 3** — it will be passed to reviewers.
43
-
44
- ---
45
-
46
- ## Step 3: Stage 1 — Backbone (Skill + Trio Review, You Coordinate)
47
-
48
- ### 3a. Invoke Feature Mapper Skill
49
-
50
- Invoke the `bokata-feature-mapper` skill:
51
- ```
52
- $ bokata-feature-mapper
53
- Input: [initiative description / PRD / existing docs]
54
- Discovery Context: [from Step 2]
55
- Instruction: "Skip your own Phase 0 discovery — the Discovery Context has been pre-resolved upstream. Proceed directly to feature identification and User Task mapping. Return the ## Features Backbone markdown section."
56
- ```
57
-
58
- You receive the draft backbone.
59
-
60
- ### 3b. Trio Review via Parallel Subagents
61
-
62
- **Execution constraint (critical):** Issue all three subagent reviews together, in parallel, within a single turn — never one at a time. Do not proceed, consolidate, or stop until every subagent has returned its result in this same exchange.
63
-
64
- Spawn three subagents in parallel to review the backbone:
65
-
66
- **Subagent 1: bokata-product-manager**
67
- ```
68
- Review this Features Backbone draft from the viability/value lens. You have:
69
- - Draft backbone: [paste backbone]
70
- - Discovery Context: [paste context]
71
-
72
- Do NOT ask the user questions. If anything is ambiguous, state an assumption. Focus on: scope right-sizing, User Task granularity for value, dependency justification, missing value. Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
73
- ```
74
-
75
- **Subagent 2: bokata-product-designer**
76
- ```
77
- Review this Features Backbone draft from the UX/UI design lens. You have:
78
- - Draft backbone: [paste backbone]
79
- - Discovery Context: [paste context]
80
-
81
- Do NOT ask the user questions. Focus on: missing user-facing states, journey coherence, UI pattern consistency, custom component needs. Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
82
- ```
83
-
84
- **Subagent 3: bokata-product-engineer**
85
- ```
86
- Review this Features Backbone draft from the feasibility/technical-sustainability lens. You have:
87
- - Draft backbone: [paste backbone]
88
- - Discovery Context: [paste context]
89
-
90
- Do NOT ask the user questions. Focus on: Feature boundary coupling, data model implications, technical risk, architecture sustainability. Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
91
- ```
92
-
93
- **Wait for all three to complete in this same turn.** Do not issue further instructions until you have all three results in hand.
94
-
95
- ### 3c. Reconcile Reviews (You Are the Neutral Coordinator)
96
-
97
- You act as the **neutral coordinator** — you do not add a fourth opinion and you do not arbitrate product trade-offs yourself. Classify each finding from the PM, Designer, and Engineer reviews into one bucket (use each reviewer's `Type` tag, but verify it):
98
-
99
- - **(a) Non-conflicting improvement** — incorporate directly into the backbone markdown.
100
- - **(b) Factual / scope conflict** — decidable against an existing artifact (the input spec/PRD, the Discovery Context, or the project `constitution`). Resolve it deterministically by checking that artifact, apply the fix, and record a one-line entry in `## Trio Reconciliation Notes` citing the artifact. Do not ask the user.
101
- - **(c) Genuine product trade-off** — a scope/UX/sustainability judgment with no ground truth in any artifact (e.g., Engineer: "split Feature A into two"; Designer: "keep as one for UX coherence"). This is the human's decision.
102
-
103
- **Handling bucket (c):** collect all trade-offs first (never a per-conflict drip). For each, prepare the two positions (attributed to their lens), the one-sentence crux, and a **recommended default** grounded in the `constitution` / Fast Feedback Principle.
104
- - **Interactive `codex` session:** present all trade-offs as a single numbered decision point and wait for the user's choice before writing.
105
- - **Headless / automated run** (`codex exec`, `spawn_agents`, CI): do not block — apply the recommended default for each and record every trade-off in `## Trio Reconciliation Notes` with its two positions, the applied default, and a `⚠ flagged for human review` marker.
106
-
107
- **System Task guard (critical):** If a reviewer finding describes system/backend behavior, do NOT default to adding it as a new standalone System Task. Apply the System Task trigger test from `methodology.md`: is this triggered by a direct user action already covered by an existing User Task? If yes — embed it as a note on that User Task's description instead. Only create a new standalone System Task if the finding describes a genuine autonomous workflow transition.
108
-
109
- Produce final `backbone.md` with (a) incorporated, (b) resolved-and-cited, and (c) resolved-by-user-or-default — all (b)/(c) outcomes captured in `## Trio Reconciliation Notes`.
110
-
111
- ---
112
-
113
- ## Step 4: Stage 2 — Functional Acceptance Criteria (Trio Contribution)
114
-
115
- ### 4a. Trio Contributes Rules from Their Lenses (Parallel Subagents)
116
-
117
- **Execution constraint (critical):** Issue all three subagent contributions together, in parallel, within a single turn — never one at a time. Do not proceed, consolidate, or stop until every subagent has returned its result in this same exchange.
118
-
119
- Spawn three subagents in parallel, each contributing Rules from their lens — they do NOT generate Scenarios themselves, only Rules:
120
-
121
- **Subagent 1: PM Contribution**
122
- ```
123
- Contribute business-rule Rules for this Features Backbone, from the viability/value lens. You have:
124
- - Final backbone (reconciled): [paste]
125
- - Discovery Context: [paste]
126
-
127
- Instruction: Do NOT ask the user questions. Generate a list of candidate Rules (not Scenarios) addressing: business rules, priority/launch-blocking vs deferred, value-triggering rules. Format per your agent file (Contributed Rules — PM Lens section). Keep each Rule scoped to a specific User Task and explain why it matters for value.
128
- ```
129
-
130
- **Subagent 2: Designer Contribution**
131
- ```
132
- Contribute UX/UI Rules for this Features Backbone, from the usability/craft lens. You have:
133
- - Final backbone (reconciled): [paste]
134
- - Discovery Context: [paste]
135
-
136
- Instruction: Do NOT ask the user questions. Generate candidate Rules addressing: empty/loading/error states, interaction patterns, component reuse, permission-denied UX. Format per your agent file (Contributed Rules — Designer Lens section). Keep each Rule scoped to a specific User Task.
137
- ```
138
-
139
- **Subagent 3: Engineer Contribution**
140
- ```
141
- Contribute technical Rules for this Features Backbone, from the feasibility/sustainability lens. You have:
142
- - Final backbone (reconciled): [paste]
143
- - Discovery Context: [paste]
144
-
145
- Instruction: Do NOT ask the user questions. Generate candidate Rules addressing: data model constraints, permission/access rules, concurrency rules, offline/sync expectations, API contracts, sustainability/tech-debt concerns. Format per your agent file (Contributed Rules — Engineer Lens section). Keep each Rule scoped to a specific User Task.
146
- ```
147
-
148
- **Wait for all three to complete in this same turn.** Do not issue further instructions until you have all three results in hand.
149
-
150
- ### 4b. Consolidate & Invoke AC Skill (Interactive)
151
-
152
- Read all three contributions. Merge them into a single enrichment block (equivalent to a pre-filled `## Discovery Context — Criteria`), de-duplicating overlapping Rules.
153
-
154
- Invoke `bokata-acceptance-criteria`:
155
- ```
156
- $ bokata-acceptance-criteria --functional
157
- Input: [final backbone.md]
158
- Enrichment: [consolidated Rules from PM/Designer/Engineer]
159
- Discovery Context: [from Step 2]
160
- Instruction: "Skip your own Phase 0 discovery — it has been resolved upstream. Use the provided Discovery Context and Enrichment (consolidated Rules from the Product Trio). Proceed directly to Phase 1 (Input Analysis) through Phase 3 (Generate Output), using the --functional depth mode. Return the ## Acceptance Criteria (Functional) section."
161
- ```
162
-
163
- You receive the functional ACs.
164
-
165
- ---
166
-
167
- ## Step 5: Write Backbone Markdown & Render HTML
168
-
169
- Right after reconciling (Step 3) and handling any trade-offs:
170
-
171
- 1. **Write** `docs/initiatives/<initiative-slug>/backbone.md` (the final reconciled markdown)
172
-
173
- 2. **Render & Write** `docs/initiatives/<initiative-slug>/backbone.html`:
174
- - Using the `html-template.md` conversion rules from the project's `.codex/resources/` directory (markdown → semantic HTML)
175
- - Build title: `"{{INITIATIVE_NAME}} — Features Backbone"`
176
- - Build subtitle: `"User Story Mapping + Trio-Reviewed"`
177
- - Convert Features, User Tasks, System Tasks per the template's table
178
- - Footer: `"{{INITIATIVE_NAME}} Features Backbone | Generated [DATE] | Command: /bokata:feature-map | Source: [input description]"`
179
-
180
- 3. **Create & Render** `docs/initiatives/<initiative-slug>/story-map.html`:
181
- - Using the `story-map-template.md` from the project's `.codex/resources/` directory — **the addressable/column unit is the User Task (Step), not the Feature.** Do not build a `.map-column` per Feature with tasks listed inside it; that structure is wrong (see the template file's own warning about this).
182
- - Build title: `"{{INITIATIVE_NAME}} — Story Mapping"`
183
- - Build subtitle: `"Backbone (Features) → Steps (User Tasks) → Releases (Increments, by priority)"`
184
- - Row 1: render each Feature as a `.feature-header` spanning its own User Task count (`grid-column: span N`), ordered by backbone journey — this is a header only, it holds no cards
185
- - Row 2: render each User Task as its own `.step-card` column (`data-task-id="{{TASK_ID}}"`), in the same order as listed under its parent Feature
186
- - Row 3: give every Step column exactly one `.release-cell` placeholder ("Not yet sliced") — one per User Task, not one per Feature
187
- - Set `{{TOTAL_STEP_COUNT}}` = total User Tasks across all Features (the grid's column count)
188
- - Footer: `"{{INITIATIVE_NAME}} Story Mapping | Generated [DATE] | Command: /bokata:feature-map | Features: {{NUM_FEATURES}} | Steps: {{NUM_TASKS}} | Sliced: 0/{{NUM_FEATURES}}"`
189
-
190
- ---
191
-
192
- ## Step 6: Write AC Markdown & Render HTML
193
-
194
- Right after consolidating trio contributions and invoking AC skill (Step 4b above):
195
-
196
- 1. **Write** `docs/initiatives/<initiative-slug>/acceptance-criteria-functional.md` (the AC markdown)
197
-
198
- 2. **Render & Write** `docs/initiatives/<initiative-slug>/acceptance-criteria-functional.html`:
199
- - Using the `html-template.md` conversion rules from the project's `.codex/resources/` directory
200
- - Build title: `"{{INITIATIVE_NAME}} — Acceptance Criteria (Functional)"`
201
- - Build subtitle: `"Requirements + Scenarios (Product-Level)"`
202
- - Convert Requirements, Scenarios per the template's table (`.requirement`, `.scenario`, Gherkin keywords)
203
- - Footer: `"{{INITIATIVE_NAME}} Acceptance Criteria (Functional) | Generated [DATE] | Command: /bokata:feature-map | Depth: functional | Source: Features Backbone"`
204
-
205
- ---
206
-
207
- ## Step 7: Verification Gate (No New Rendering Here)
208
-
209
- This step is now a **checklist verification** only — no new rendering work happens here:
210
-
211
- - [ ] `docs/initiatives/<initiative-slug>/backbone.md` exists and is final
212
- - [ ] `docs/initiatives/<initiative-slug>/backbone.html` exists
213
- - [ ] `docs/initiatives/<initiative-slug>/story-map.html` exists
214
- - [ ] `docs/initiatives/<initiative-slug>/acceptance-criteria-functional.md` exists and is final
215
- - [ ] `docs/initiatives/<initiative-slug>/acceptance-criteria-functional.html` exists
216
-
217
- (All HTML rendering now happens immediately after its corresponding .md is finalized, not deferred to Step 7.)
218
-
219
- ---
220
-
221
- ## Step 8: Summary & Next Steps (Main Thread)
222
-
223
- Print to user:
224
- ```
225
- ## ✓ Feature Mapping Complete
226
-
227
- **Initiative:** {{INITIATIVE_NAME}}
228
- **Location:** docs/initiatives/{{INITIATIVE_SLUG}}/
229
-
230
- **Artifacts created:**
231
- - backbone.md / .html ✅ — {{NUM_FEATURES}} Features, {{NUM_TASKS}} User Tasks
232
- - acceptance-criteria-functional.md / .html ✅ — {{NUM_REQUIREMENTS}} Requirements, {{NUM_SCENARIOS}} Scenarios (functional depth)
233
- - story-map.html ✅ — Patton-style board (Features spanning the backbone header, User Tasks as individual Step columns, release tiers to be filled per-Step by slicing)
234
-
235
- **Trio Review Notes:**
236
- [If any reconciliation notes exist: "See backbone.md for [N] reconciliation notes flagged during PM/Designer/Engineer review."]
237
-
238
- ---
239
-
240
- **Next step:** Run `/bokata:slice-feature [feature name]` to decompose a Feature into a Walking Skeleton + Increments Backlog. The story-map will auto-update with each feature you slice.
241
-
242
- **Example:** `/bokata:slice-feature "Tourist Discovers Nearby Places"`
243
-
244
- **Story Map Note:** The story-map.html board will accumulate each feature's Walking Skeleton and Increments as you slice them — all in one living document. No need to manage multiple files.
245
- ```
246
-
247
- ---
248
-
249
- ## Quality Checks (Before Writing)
250
-
251
- - [ ] Discovery Context is present and complete
252
- - [ ] Final backbone identifies all Features in [Actor] [Verb] [Object] format
253
- - [ ] All User Tasks are in [Verb] [Object] format (no Actor)
254
- - [ ] **All System Tasks follow the workflow-transition test from methodology.md** (only autonomous state transitions remain standalone; all direct-user-action responses are embedded in User Task descriptions)
255
- - [ ] **System Tasks use naming format `System Task {N}.{M}: [Verb] [Object]`** (with explicit Trigger field)
256
- - [ ] **Features/User Tasks/System Tasks use correct heading levels:** `#### Feature`, `##### User Task`, `##### System Task` (not bold text)
257
- - [ ] Trio reviews are visibly mentioned in the narrative (or if they had no issues, explicitly state that)
258
- - [ ] Trio Reconciliation Notes section is present if any conflicts were resolved
259
- - [ ] Functional AC Requirements use SHALL/SHOULD language
260
- - [ ] Functional AC Scenarios use WHEN/THEN (Given implicit/optional)
261
- - [ ] Every `.html` was rendered and written immediately after its `.md` was finalized (not deferred to a final batch step)
262
- - [ ] `story-map.html` exists, 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)
263
- - [ ] All parallel subagent reviews were issued together and completed before reconciliation began