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,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
@@ -1,291 +0,0 @@
1
- ---
2
- description: Decompose a Feature (from an existing backbone) into a Walking Skeleton + Increments Backlog, with concrete-depth Acceptance Criteria per skeleton item/increment. Outputs as .md and .html under docs/initiatives/[initiative]/[feature]/.
3
- ---
4
-
5
- Decompose a Feature from an existing Features Backbone into a **Walking Skeleton + Increments Backlog**, with **concrete-depth Acceptance Criteria** (per skeleton item and per increment) 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>/<feature-slug>/` and include trio reconciliation notes where conflicts arose.
8
-
9
- ---
10
-
11
- ## Input
12
-
13
- Accept either:
14
- 1. **Feature name + existing initiative** (infer from `docs/initiatives/<initiative-slug>/backbone.md`)
15
- 2. **Ad-hoc feature + backbone path** (user provides both)
16
- 3. **Just feature name** (ask user to select from existing initiatives)
17
-
18
- ---
19
-
20
- ## Step 1: Resolve Feature & Folders
21
-
22
- 1. Ask user for the Feature to slice if not provided via argument
23
- 2. Locate or ask for the initiative's `docs/initiatives/<initiative-slug>/backbone.md` + `acceptance-criteria-functional.md`
24
- 3. Derive `<feature-slug>` (kebab-case, max 50 chars)
25
- 4. Create folder: `docs/initiatives/<initiative-slug>/<feature-slug>/` (use `mkdir -p`)
26
- 5. Proceed with confirmed paths in subsequent steps
27
-
28
- ---
29
-
30
- ## Step 2: Consolidated Phase 0 Discovery (Interactive)
31
-
32
- Instead of each skill asking its own Phase 0 questions, consolidate once here.
33
-
34
- Ask clarifying questions about the **specific Feature being sliced** that would affect Step Analysis (layer assignment), Incremental Options (viability/dependencies), or Walking Skeleton selection:
35
- - **Technical Clarity**: Are User Tasks specific enough to decompose into layers? Any vague actions?
36
- - **Layer Ambiguity**: Are any steps unclear about which layer they belong to (UI vs Logic vs Data)?
37
- - **Increment Scope**: Are any User Tasks too large to slice meaningfully without clarification?
38
- - **Dependencies**: Are there unspecified technical dependencies between User Tasks?
39
- - **Constraints**: Are there architectural or performance constraints that affect which increment options are viable?
40
-
41
- If the input is already rich (existing backbone + functional ACs provided), acknowledge that explicitly:
42
- > "You provided the backbone + functional ACs for [initiative], which resolves scope and rules. Asking only about [missing technical clarity categories]."
43
-
44
- Produce one `## Discovery Context — Slicer: [Feature Name]` block with sections: Technical Clarifications / Layer Decisions / Increment Boundaries / Dependencies Confirmed / Constraints Noted / Assumptions.
45
-
46
- **Save this in memory for Step 3** — it will be passed to reviewers.
47
-
48
- ---
49
-
50
- ## Step 3: Stage 1 — Slicing (Skill + Trio Review, You Coordinate)
51
-
52
- ### 3a. Invoke Feature Slicer Skill
53
-
54
- Invoke the `bokata-feature-slicer` skill:
55
- ```
56
- $ bokata-feature-slicer
57
- Input: [Feature name from backbone.md]
58
- Backbone: [full backbone.md markdown]
59
- Functional ACs: [acceptance-criteria-functional.md markdown for this Feature]
60
- Discovery Context: [from Step 2]
61
- Instruction: "Skip your own Phase 0 discovery — the Discovery Context has been pre-resolved upstream. Proceed directly to Phase 1 (Steps) through Phase 3 (Walking Skeleton + Backlog). Return the ## Walking Skeleton and ## Increments Backlog sections."
62
- ```
63
-
64
- You receive the draft slicing.
65
-
66
- ### 3b. Trio Review via Parallel Subagents
67
-
68
- **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.
69
-
70
- Spawn three subagents in parallel to review the slicing:
71
-
72
- **Subagent 1: bokata-product-manager**
73
- ```
74
- Review this Walking Skeleton + Increments Backlog for [Feature] from the value/viability lens. You have:
75
- - Draft slicing: [paste Walking Skeleton + Increments]
76
- - Backbone + functional ACs: [paste for context]
77
- - Discovery Context: [paste]
78
-
79
- Do NOT ask the user questions. Focus on: Is the skeleton truly minimum-viable-VALUE? Does each skeleton item ship observable value? Are Increments ordered by business impact? Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
80
- ```
81
-
82
- **Subagent 2: bokata-product-designer**
83
- ```
84
- Review this Walking Skeleton + Increments Backlog for [Feature] from the UX/UI design lens. You have:
85
- - Draft slicing: [paste Walking Skeleton + Increments]
86
- - Backbone + functional ACs: [paste for context]
87
- - Discovery Context: [paste]
88
-
89
- Do NOT ask the user questions. Focus on: Does the skeleton compose into a coherent minimal UI experience? Are missing states isolated to increments or essential to skeleton? Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
90
- ```
91
-
92
- **Subagent 3: bokata-product-engineer**
93
- ```
94
- Review this Walking Skeleton + Increments Backlog for [Feature] from the feasibility/technical-sustainability lens. You have:
95
- - Draft slicing: [paste Walking Skeleton + Increments]
96
- - Backbone + functional ACs: [paste for context]
97
- - Discovery Context: [paste]
98
-
99
- Do NOT ask the user questions. Focus on: Are layer assignments sound? Are increment boundaries technically viable? Any sustainability concerns with the skeleton choices? Tag every finding with Severity (Critical|Suggested) and Type (factual/scope|trade-off). Return your review in the format specified in your agent file.
100
- ```
101
-
102
- **Wait for all three to complete in this same turn.** Do not issue further instructions until you have all three results in hand.
103
-
104
- ### 3c. Reconcile Reviews (You Are the Neutral Coordinator)
105
-
106
- 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):
107
-
108
- - **(a) Non-conflicting improvement** — incorporate directly into the slicing markdown.
109
- - **(b) Factual / scope conflict** — decidable against an existing artifact (`backbone.md`, `acceptance-criteria-functional.md`, 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.
110
- - **(c) Genuine product trade-off** — a value↔UX / value↔sustainability judgment with no ground truth in any artifact (e.g., PM: "defer Increment 3A"; Designer: "3A must ship in skeleton for coherent UX"). This is the human's decision.
111
-
112
- **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.
113
- - **Interactive `codex` session:** present all trade-offs as a single numbered decision point and wait for the user's choice before writing.
114
- - **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.
115
-
116
- Produce final `slicing.md` with (a) incorporated, (b) resolved-and-cited, and (c) resolved-by-user-or-default — all (b)/(c) outcomes captured in `## Trio Reconciliation Notes`.
117
-
118
- ---
119
-
120
- ## Step 4: Stage 2 — Concrete Acceptance Criteria (Trio Contribution)
121
-
122
- ### 4a. Trio Contributes Rules Scoped per Skeleton Item / Increment (Parallel Subagents)
123
-
124
- **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.
125
-
126
- Spawn three subagents in parallel, each contributing Rules from their lens — scoped per Walking Skeleton item / per Increment:
127
-
128
- **Subagent 1: PM Contribution**
129
- ```
130
- Contribute business-rule Rules for this [Feature] slicing, scoped per Walking Skeleton item and per Increment, from the viability/value lens. You have:
131
- - Final slicing (reconciled): [paste]
132
- - Backbone + functional ACs: [paste for context]
133
- - Discovery Context: [paste]
134
-
135
- Instruction: Do NOT ask the user questions. For each Walking Skeleton item: priority/launch-blocking rules specific to that item. For each Increment: the value unlock it enables. Format per your agent file (Contributed Rules — PM Lens section). Scope each Rule to a specific item/increment.
136
- ```
137
-
138
- **Subagent 2: Designer Contribution**
139
- ```
140
- Contribute UX/UI Rules for this [Feature] slicing, scoped per Walking Skeleton item and per Increment, from the usability/craft lens. You have:
141
- - Final slicing (reconciled): [paste]
142
- - Backbone + functional ACs: [paste for context]
143
- - Discovery Context: [paste]
144
-
145
- Instruction: Do NOT ask the user questions. For each skeleton item: the specific UI states, component reuse, interaction patterns. For each Increment: the UX capability it unlocks. Format per your agent file (Contributed Rules — Designer Lens section). Scope each Rule to a specific item/increment.
146
- ```
147
-
148
- **Subagent 3: Engineer Contribution**
149
- ```
150
- Contribute technical Rules for this [Feature] slicing, scoped per Walking Skeleton item and per Increment, from the feasibility/sustainability lens. You have:
151
- - Final slicing (reconciled): [paste]
152
- - Backbone + functional ACs: [paste for context]
153
- - Discovery Context: [paste]
154
-
155
- Instruction: Do NOT ask the user questions. For each skeleton item: data model shape, API contracts, concurrency/permission guards specific to that item. For each Increment: whether it can be built in isolation or if it reshapes skeleton choices. Format per your agent file (Contributed Rules — Engineer Lens section). Scope each Rule to a specific item/increment.
156
- ```
157
-
158
- **Wait for all three to complete in this same turn.** Do not issue further instructions until you have all three results in hand.
159
-
160
- ### 4b. Consolidate & Invoke AC Skill (Interactive)
161
-
162
- Read all three contributions. Merge them into a single enrichment block (equivalent to a pre-filled `## Discovery Context — Criteria`), de-duplicating overlapping Rules and grouping by skeleton item / increment.
163
-
164
- Invoke `bokata-acceptance-criteria`:
165
- ```
166
- $ bokata-acceptance-criteria --concrete
167
- Input: [final slicing.md from Step 3c]
168
- Enrichment: [consolidated Rules from PM/Designer/Engineer, grouped by skeleton item/increment]
169
- Discovery Context: [from Step 2]
170
- 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 --concrete depth mode. Important: the input contains a Walking Skeleton + Increments Backlog — group your output by these items (use ## Walking Skeleton Item: [name] and ## Increment: [ID] headers as scoping delimiters). Return the ## Acceptance Criteria (Concrete) section."
171
- ```
172
-
173
- You receive the concrete ACs.
174
-
175
- ---
176
-
177
- ## Step 5: Write Slicing Markdown & Render HTML
178
-
179
- Right after reconciling (Step 3) and handling any trade-offs:
180
-
181
- 1. **Write** `docs/initiatives/<initiative-slug>/<feature-slug>/slicing.md` (final reconciled markdown)
182
-
183
- 2. **Render & Write** `docs/initiatives/<initiative-slug>/<feature-slug>/slicing.html`:
184
- - Using the `html-template.md` conversion rules from the project's `.codex/resources/` directory (markdown → semantic HTML)
185
- - Build title: `"[Feature Name] — Walking Skeleton + Increments Backlog"`
186
- - Build subtitle: `"Trio-Reviewed Feature Slicing"`
187
- - Convert Walking Skeleton items and Increments per the template's table (`.skeleton-item`, `.increment-item`)
188
- - Footer: `"[Feature Name] Slicing | Generated [DATE] | Command: /bokata:slice-feature | Source: Backbone [initiative] + Functional ACs"`
189
-
190
- ---
191
-
192
- ## Step 6: Write Concrete 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>/<feature-slug>/acceptance-criteria-concrete.md` (the concrete AC markdown)
197
-
198
- 2. **Render & Write** `docs/initiatives/<initiative-slug>/<feature-slug>/acceptance-criteria-concrete.html`:
199
- - Using the `html-template.md` conversion rules from the project's `.codex/resources/` directory
200
- - Build title: `"[Feature Name] — Acceptance Criteria (Concrete)"`
201
- - Build subtitle: `"Per-Item Gherkin + Scenarios"`
202
- - Convert Requirements and Gherkin scenarios per the template's table (`.requirement`, `.scenario`, Gherkin keywords)
203
- - Footer: `"[Feature Name] Acceptance Criteria (Concrete) | Generated [DATE] | Command: /bokata:slice-feature | Depth: concrete | Source: Walking Skeleton + Trio Contributions"`
204
-
205
- ---
206
-
207
- ## Step 7: Update Story Map
208
-
209
- Right after writing the concrete ACs:
210
-
211
- 1. **Read** the existing `docs/initiatives/<initiative-slug>/story-map.html` (created by `/bokata:feature-map`)
212
-
213
- 2. **The addressable unit is the User Task (Step) column, not the Feature** — per `story-map-template.md`. Do NOT locate a single `.map-column[data-feature-id]` and swap one shared block; a Feature's Steps are updated individually, one column at a time.
214
-
215
- 3. **Parse `slicing.md`'s `**[User Task Name]**` tags** (already required of `bokata-feature-slicer`'s output — see its Output Checklist: "Backlog grouped by User Task", "All items use correct tag format") to group Walking Skeleton items and Increments by which User Task they belong to. Not every User Task in the sliced Feature will necessarily have a tagged item — that's expected; a Walking Skeleton commonly touches only some Steps.
216
-
217
- 4. **For each tagged User Task**, locate its column: `querySelector('.step-card[data-task-id="{{TASK_ID}}"]')`, resolve its absolute grid-column position, and replace that Step's `.release-cell` placeholder with:
218
- - A `.skeleton-item-card` (`grid-row: 3`, same `grid-column`) for its Walking Skeleton item, if any
219
- - `.increment-card` divs stacked below it (`grid-row: 4, 5, ...`, same `grid-column`) for its Increments, ordered by priority
220
-
221
- 5. **Leave every other Step's column untouched** — including Steps within this same Feature that this slicing pass didn't tag (they keep their "Not yet sliced" placeholder), and every column belonging to other Features (preserve previously-sliced features exactly as-is)
222
-
223
- 6. **Update footer** to show current slicing progress:
224
- - `"{{INITIATIVE_NAME}} Story Mapping | Generated [DATE] | Features: {{NUM_FEATURES}} | Steps: {{NUM_TASKS}} | Sliced: {{SLICED_COUNT}}/{{NUM_FEATURES}} | Command: /bokata:feature-map → /bokata:slice-feature"`
225
-
226
- 7. **Write** back to `docs/initiatives/<initiative-slug>/story-map.html` (same filename)
227
-
228
- ---
229
-
230
- ## Step 8: Verification Gate (No New Rendering Here)
231
-
232
- This step is now a **checklist verification** only — no new rendering work happens here:
233
-
234
- - [ ] `docs/initiatives/<initiative-slug>/<feature-slug>/slicing.md` exists and is final
235
- - [ ] `docs/initiatives/<initiative-slug>/<feature-slug>/slicing.html` exists
236
- - [ ] `docs/initiatives/<initiative-slug>/<feature-slug>/acceptance-criteria-concrete.md` exists and is final
237
- - [ ] `docs/initiatives/<initiative-slug>/<feature-slug>/acceptance-criteria-concrete.html` exists
238
- - [ ] `docs/initiatives/<initiative-slug>/story-map.html` was updated (not recreated) with this Feature's skeleton/increments
239
-
240
- (All HTML rendering now happens immediately after its corresponding .md is finalized, not deferred to Step 8.)
241
-
242
- ---
243
-
244
- ## Step 9: Summary & Next Steps (Main Thread)
245
-
246
- Print to user:
247
- ```
248
- ## ✓ Feature Slicing Complete
249
-
250
- **Feature:** {{FEATURE_NAME}}
251
- **Initiative:** {{INITIATIVE_NAME}}
252
- **Location:** docs/initiatives/{{INITIATIVE_SLUG}}/{{FEATURE_SLUG}}/
253
-
254
- **Artifacts created:**
255
- - slicing.md / .html ✅ — {{NUM_SKELETON_ITEMS}} Walking Skeleton items, {{NUM_INCREMENTS}} Increments in Backlog
256
- - acceptance-criteria-concrete.md / .html ✅ — {{NUM_GHERKIN_BLOCKS}} Gherkin scenarios (concrete depth, per-item grouped)
257
- - story-map.html (updated) ✅ — {{FEATURE_NAME}}'s Step columns updated with skeleton + increments
258
-
259
- **Trio Review Notes:**
260
- [If any reconciliation notes exist: "See slicing.md for [N] reconciliation notes flagged during PM/Designer/Engineer review."]
261
-
262
- ---
263
-
264
- **Next steps:**
265
- 1. **Start implementing:** Pick a Walking Skeleton item and use its Gherkin ACs (in acceptance-criteria-concrete.md) as acceptance criteria for development.
266
- 2. **Iterate by increment:** As each item ships, move to the next, or pick an Increment from the Backlog if you want to add capability before completing the full skeleton.
267
- 3. **Slice another feature:** Run `/bokata:slice-feature [next feature]` for the next Feature in the backbone. The story-map will auto-update.
268
-
269
- **Example Walking Skeleton item:**
270
- [Show first skeleton item title and its acceptance criteria from the concrete AC doc]
271
-
272
- **Living Document:** Your story-map.html now shows {{FEATURE_NAME}} with its Walking Skeleton + Increments. Slice the next feature and the board keeps growing!
273
- ```
274
-
275
- ---
276
-
277
- ## Quality Checks (Before Writing)
278
-
279
- - [ ] Discovery Context is present and complete (feature-specific)
280
- - [ ] Walking Skeleton covers ALL User Tasks (verified against backbone)
281
- - [ ] Every Walking Skeleton item is genuinely simplest viable option (buildable in 1-3 days)
282
- - [ ] Every Walking Skeleton item is reversible (especially Data layer)
283
- - [ ] Increments Backlog contains all remaining options, grouped by User Task
284
- - [ ] Trio reviews are visibly mentioned in the narrative
285
- - [ ] Trio Reconciliation Notes section is present if any conflicts were resolved
286
- - [ ] Concrete AC Requirements are grouped by Walking Skeleton Item / Increment (not by whole Feature)
287
- - [ ] Concrete AC uses full Gherkin Given/When/Then for every scenario
288
- - [ ] All Gherkin has concrete example data (not abstract placeholders)
289
- - [ ] Every `.html` was rendered and written immediately after its `.md` was finalized (not deferred to a final batch step)
290
- - [ ] `story-map.html` update touched only the tagged Step columns for this Feature (`data-task-id` matches from `slicing.md`'s `**[User Task Name]**` tags) — every other Step column, including untagged Steps within this same Feature and all columns from previously-sliced Features, was left untouched
291
- - [ ] All parallel subagent fan-outs were issued together and completed before reconciliation began