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
package/README.md CHANGED
@@ -1,122 +1,254 @@
1
1
  # Bokata
2
2
 
3
- **Product Trio SDD Framework** — Spec-Driven Development with Teresa Torres' Product Trio methodology.
3
+ **Shape, slice and build in small steps** — a small, configurable set of agent skills for
4
+ Claude Code, OpenCode, Codex and Cursor, built on Teresa Torres' Product Trio.
4
5
 
5
- Bokata helps teams generate Features Backbones, Acceptance Criteria, and Walking Skeletons through collaborative Product Trio reviews (PM, Designer, Engineer) — all powered by AI agents.
6
-
7
- ## Supported Harnesses
8
-
9
- | Harness | Skills | Agents | Commands | Trio Parallel |
10
- |---------|--------|--------|----------|---------------|
11
- | **Claude Code** | ✅ | ✅ | ✅ | ✅ Task tool |
12
- | **OpenCode** | ✅ | ✅ | ✅ | ✅ Task tool |
13
- | **Cursor** | ✅ | ✅ | ✅ | ✅ Task tool |
14
- | **Codex** | ✅ | ✅ | ✅ | ✅ spawn_agents |
15
-
16
- ## Installation
17
-
18
- ```bash
19
- npx bokata@latest install
6
+ ```
7
+ shape → feature map → slice → plan → code (TDD)
8
+ pitch features slice checklist commits
20
9
  ```
21
10
 
22
- Run this from your project root. `bokata install` auto-detects which harnesses you already use — `.claude/`, `.cursor/`, `.opencode/`, `.codex/` — and installs skills, agents, and commands for each. If none are found, it asks interactively which ones to set up.
11
+ - **Skills only, no commands.** Every phase is a skill you invoke by name. Use all of them or
12
+ just the ones you want.
13
+ - **Spec-first, code as truth.** The documents bokata writes are working material for the
14
+ initiative at hand. Delete them when it ships and nothing is lost: the tests describe the
15
+ behaviour, and the ADRs record the *why*.
16
+ - **Product Trio** (PM, Designer, Engineer) subagents review approaches, features and slices
17
+ in parallel; you coordinate and decide.
18
+ - **Agnostic.** Output folder, templates and the method skills (grill, domain, code,
19
+ refactor) are set in `.bokata.json`. Orchestration (Orca, tmux, plain terminals) stays yours.
23
20
 
24
- Non-interactive / CI usage, or to target specific harnesses:
21
+ ## Install
25
22
 
26
23
  ```bash
27
- npx bokata@latest install --claude --cursor
28
- npx bokata@latest install --yes # only install what was auto-detected, never prompt
24
+ npx bokata@latest install # detects .claude/ .cursor/ .opencode/ .codex/
25
+ npx bokata@latest install --claude --opencode
26
+ npx bokata@latest sync # regenerate agents after editing .bokata.json
29
27
  ```
30
28
 
31
- Re-running `install` is safe — it overwrites previously installed files, so it doubles as the update path.
32
-
33
- **Note on Codex:** Codex CLI only discovers custom slash-commands from the global `~/.codex/prompts/` directory (not per-project), so `/bokata-feature-map` and `/bokata-slice-feature` are installed there — shared across all your Codex projects, not just this repo. Skills and agents for Codex stay project-scoped as usual (`.codex/skills/`, `.codex/agents/`).
34
-
35
- ## Usage
36
-
37
- ### Feature Mapping
38
-
39
- Generate a Features Backbone and Functional Acceptance Criteria:
29
+ - Skills are copied once to `.agents/skills/` and **symlinked** from `.claude/skills/` and
30
+ `.cursor/skills/`. OpenCode and Codex read `.agents/skills/` directly.
31
+ - Agents are generated per harness from one neutral source: `.claude/agents/*.md`,
32
+ `.opencode/agents/*.md`, `.codex/agents/*.toml`, `.cursor/agents/*.md`.
33
+ - The model of each role (`trio`, `executor`, `reviewer`) is asked at install time and saved
34
+ in `.bokata.json`; change it there and run `sync`.
35
+ - Re-running `install` is safe. It also removes the commands bokata 2.x installed. (2.x also
36
+ wrote `~/.codex/prompts/bokata-*.md` globally; delete those by hand if you used Codex.)
37
+ - The default grill and domain methods are [`grill-with-docs` and
38
+ `domain-modeling`](https://github.com/mattpocock/skills) by Matt Pocock. Install them with
39
+ their own installer, or point `methods.grill` / `methods.domain` elsewhere (see
40
+ [Methods](#methods)).
41
+
42
+ ## The flow
43
+
44
+ | Size | Path |
45
+ |---|---|
46
+ | **S** — a fix or tweak | plan mode → `bokata-tdd` (no documents) |
47
+ | **M** — one clear feature | `bokata-shape` → `bokata-slice` (single mode: the pitch is the one feature; the bite-sized backlog lives in the slice) → `bokata-plan` → `code-executor` |
48
+ | **L** — several features | `bokata-shape` → `bokata-feature-map` → `bokata-slice` (1–4 features) → `bokata-plan` → `code-executor` |
49
+
50
+ `bokata-shape` proposes the size; you confirm it.
51
+
52
+ ### Skills
53
+
54
+ | Skill | What it does | Writes |
55
+ |---|---|---|
56
+ | `bokata-shape` | Grill (the configured method) + Shape Up shaping: narrow the problem, 2–3 approaches as Mermaid breadboards (low-fi HTML sketch when layout matters), one trio pass, rabbit holes and no-gos | `pitch.md` |
57
+ | `bokata-feature-map` | Features Backbone + functional ACs with the trio; asks only about gaps in its input | `features.md` + the initiative's `story-map.html` dashboard (drawn by the `bokata-render` script) |
58
+ | `bokata-slice` | Pick 1–4 features → one `feature-slicer` per feature writes Steps and 3+ options per Step, prunes them (each drop with a reason), and groups the rest into small INVEST bites per User Task → the trio reviews the full trace and the bites → you compose Inc 1 (walking skeleton) → concrete ACs for it only. it proposes a roadmap of the next increments (`### Proposed increments`, yours to edit); `--next` adds the next increment as one or more bites and re-prunes what it makes obsolete; `--done` marks the slice done | `slices/<nn>-<name>.md` (the index: increments and the backlog of bites) + `slices/<nn>-<name>/` (`inc-<n>.md`, `slicing/`, `notes.md`, `pruned.md`, `discovery.md`); a one-line `**Slice:**` summary per feature in `features.md`; the bite cards and the backlog in `story-map.html` |
59
+ | `bokata-plan` | A contract for your harness's own plan mode: the plan becomes checklists per slice and increment, starting with its acceptance test | the initiative's `plan.md`; redraws `story-map.html` |
60
+ | `bokata-tdd` | Default code method: an acceptance test per increment, then strict small-step TDD with evidence rules | commits |
61
+ | `bokata-refactor` | Default refactor method: Kent Beck's four rules of simple design, tidyings, code smells mapped to the move that fixes each | `refactor` commits |
62
+ | `bokata-status` | Read-only: phase, open slices, each increment's state and next step, open unknowns, pending checks, each slice's backlog of bites, features not yet sliced; redraws the story map if it lags |
63
+ | `bokata-render` | Draws `story-map.html` from the markdown with a script — no model: Features and User Tasks as columns, a band of bite cards per increment, a Backlog band, a minimap and a page per increment, bite, User Task and Feature. `--check` validates the markdown. Run by the other skills and `code-executor`, or by you with `npx bokata render <docs>/<slug>` | `story-map.html` |
64
+ | `bokata-feature-mapper`, `bokata-feature-slicer`, `bokata-acceptance-criteria` | The methods the phases use; usable on their own | — |
65
+
66
+ ### Agents
67
+
68
+ | Agent | Role | Access |
69
+ |---|---|---|
70
+ | `bokata-product-manager` / `-designer` / `-engineer` | Product Trio reviewers and rule contributors | read |
71
+ | `code-executor` | Builds a slice's planned increment with `methods.code`; checks off `plan.md` as it goes and, when the Inc is done, sets `State: done`, moves what is not in the code to `Pending` and deletes its plan section; never pushes | write |
72
+ | `design-reviewer` | Reviews one step's diff with `methods.refactor` and the coding standards | read |
73
+ | `feature-slicer` | Loads `bokata-feature-slicer` and slices one feature into Steps and options, writing its output to the one file it is given; `bokata-slice` dispatches one per feature, in parallel | write-own |
74
+
75
+ **read** means no edit tool, not no shell: read-only agents keep a shell to run read commands, and
76
+ their instructions forbid writing files (including `>`, `tee`, `sed -i`); the harness does not
77
+ enforce that last part.
78
+
79
+ During trio reviews the **main thread** is the neutral coordinator: it applies
80
+ non-conflicting findings, settles factual conflicts against the artifacts, and escalates
81
+ genuine product trade-offs to you as one decision point with a recommended default.
82
+
83
+ ### Hierarchy
40
84
 
41
85
  ```
42
- /bokata:feature-map [initiative description]
86
+ Initiative (pitch.md)
87
+ └ Features (features.md — the summary: backbone, functional ACs, one Slice line per feature)
88
+ └ Slice (slices/<nn>-<name>.md — a short index; 1–4 features → usable end to end; open until you mark it done)
89
+ ├ Slicing (slices/<nn>-<name>/slicing/F<k>.md — per feature: User Task → Step → options F1-2.3,
90
+ │ with strategy and coverage; pruned with a reason in pruned.md, a target per Step)
91
+ ├ Increment (slices/<nn>-<name>/inc-<n>.md — one or more bites the user can see; Inc 1 = the
92
+ │ │ skeleton bites F1-w1…; concrete ACs written when it enters; State: sliced | planned | done;
93
+ │ │ Unknowns ▲ / none ▼; Pending = what is not in the code)
94
+ │ └ Plan steps (in the initiative's plan.md while the Inc is in flight; checked off commit by
95
+ │ commit; deleted when the Inc is done)
96
+ └ Bites (F1-a… in the index's Backlog: INVEST groups of options per User Task, titled for the
97
+ user — an Inc takes some, --next picks from the rest, and they stay while the slice lives)
43
98
  ```
44
99
 
45
- **Outputs:**
46
- - `docs/initiatives/<slug>/backbone.md` — Features, User Tasks, System Tasks
47
- - `docs/initiatives/<slug>/backbone.html` — HTML report
48
- - `docs/initiatives/<slug>/story-map.html` — Patton-style story map
49
- - `docs/initiatives/<slug>/acceptance-criteria-functional.md` — Functional ACs
50
- - `docs/initiatives/<slug>/acceptance-criteria-functional.html` — HTML report
51
-
52
- ### Feature Slicing
53
-
54
- Decompose a Feature into a Walking Skeleton + Increments Backlog:
55
-
56
- ```
57
- /bokata:slice-feature [feature name]
100
+ The index is short on purpose, and nothing is said twice: an Inc's outcome and bites live in the
101
+ index, its state and decisions in its own file, so `--next`, the plan and the executor read a few
102
+ KB instead of the whole history, and Incs built in parallel worktrees never edit the same file.
103
+ `npx bokata render <docs>/<slug>` draws the whole initiative as one page you can open in a
104
+ browser, and `--check` validates the markdown.
105
+
106
+ A feature belongs to one slice only. An **option** is one way to do one Step; a **bite** groups
107
+ the options of one or several Steps that make sense together (small, INVEST); an **increment** is
108
+ the walking skeleton or one or more bites — whatever lets the user see or do something new.
109
+ Options are explored widely and then pruned (`obsolete`, `dominated`, `filler`, `contradicts`),
110
+ so you prioritize a handful of bites instead of a hundred option IDs. After Inc 1 is built,
111
+ `bokata-slice <nn> --next` adds the next increment to the same slice; when you are done with it,
112
+ `bokata-slice <nn> --done`.
113
+
114
+ **Upgrading an initiative sliced with bokata ≤ 2.0** (scopes per feature, `Increment options`
115
+ in `features.md`): re-run `npx bokata@latest install` so the `feature-slicer` agent is installed,
116
+ let the old slices finish as they are, and slice the remaining features with the new
117
+ `bokata-slice`. The story map is redrawn from the markdown by the next skill that touches it (or `npx bokata render <docs>/<slug>`).
118
+
119
+ **Slices written as one file** (every earlier bokata): `bokata render` reads only the split layout
120
+ (index + `<nn>-<name>/` folder, see above). Split each slice by hand or with a one-off script: the
121
+ `## Slicing` details to `slicing/F<k>.md`, each `### Inc <n>` body to `inc-<n>.md` with a `State:` line,
122
+ Pruned to `pruned.md`, Notes and Trio notes to `notes.md`, the Discovery Context to `discovery.md`, and
123
+ leave in the index only each Inc's outcome and bites plus the Backlog. Drop the `Plan:` / `Tests:` of
124
+ built Incs and keep whatever is not in the code as `## Pending`. (`closed` is still read as `done`.)
125
+
126
+ **Upgrading from 3.0.0-beta.3 or earlier:** the story map is now drawn by a script, not by an agent. Re-run `npx bokata@latest install`: it removes the generated `story-map-renderer` agent and the `render` model from `.bokata.json`. The first skill that touches the initiative, or `npx bokata render <docs>/<slug>`, redraws the board; if a slice file breaks the format, the script says which `file:line`.
127
+
128
+ ## Running the harness
129
+
130
+ The flow is **skills you name in conversation**; agents are selected or dispatched depending on
131
+ the harness. Install first (`npx bokata@latest install`), then:
132
+
133
+ | Step | You say | Produces |
134
+ |---|---|---|
135
+ | Shape | "Shape this idea: …" (loads `bokata-shape`) | `pitch.md` |
136
+ | Feature map (L initiatives) | "bokata-feature-map <slug>" | `features.md`; the dashboard is drawn by the `bokata-render` script |
137
+ | Slice | "bokata-slice <slug>" — pick 1–4 features; later "bokata-slice <nn> --next" | `slices/<nn>-<name>.md` + folder `<nn>-<name>/` |
138
+ | Plan | In your harness's plan agent: "bokata-plan docs/initiatives/<slug>/slices/<nn>-<name>.md" | checklists in `plan.md`, `State: planned` in the Inc's file |
139
+ | Build | Run `code-executor` with the hand-off line the plan printed | commits, checkboxes, story map kept current |
140
+ | Check | "bokata-status <slug>" | phase, next step; redraws the story map if it lags |
141
+
142
+ The story map has no step of its own: the skills above and `code-executor` run the `bokata-render`
143
+ script (instant, no model) whenever the markdown changes.
144
+
145
+ ### Per harness
146
+
147
+ - **OpenCode** — skills read from `.agents/skills/`; agents install to `.opencode/agents/`.
148
+ Name the skill in the session. Primary-capable agents (`code-executor`) appear in the agent
149
+ switcher (Tab); `mode: subagent` agents (the trio, `feature-slicer`, `design-reviewer`)
150
+ never do — the session dispatches them itself. Headless:
151
+ `opencode run --agent code-executor "Build slice docs/initiatives/<slug>/slices/01-<name>.md"`
152
+ - **Claude Code** — skills install to `.claude/skills/` (invoke by name or `/bokata-shape`);
153
+ agents to `.claude/agents/`. The session spawns subagents by name. Headless:
154
+ `claude --agent code-executor "Build slice …"`
155
+ - **Codex** — agents install to `.codex/agents/*.toml`; skills read from `.agents/skills/`.
156
+ Ask in plain language ("use the code-executor agent to build slice …"); `/agent` switches
157
+ between agent threads.
158
+ - **Cursor** — skills in `.cursor/skills/`, agents in `.cursor/agents/`; pick the agent from
159
+ Cursor's selector or name the skill in chat.
160
+
161
+ ### Orchestrators
162
+
163
+ Increments marked `Parallel-safe: yes` can run in separate worktrees at the same time.
164
+
165
+ - **Orca** — spawn the executor in a fresh worktree with the hand-off line:
166
+ `orca worktree create --name <task> --no-parent --agent codex --prompt "<hand-off line>" --json`
167
+ (or `--agent claude`). For a worktree that already exists:
168
+ `orca agent launch --agent codex --worktree <id> --prompt "<hand-off line>"`.
169
+ - **Herdr** — split a pane, start the agent in it, and send the line:
170
+ `herdr pane split --current --direction right --cwd "$PWD" --no-focus` →
171
+ `herdr agent start executor --kind codex --pane <id>` →
172
+ `herdr agent prompt executor "<hand-off line>" --wait`
173
+ - **Plain terminals** — open a worktree and run your harness's headless command with the
174
+ hand-off line.
175
+
176
+ ## Configuration — `.bokata.json`
177
+
178
+ Everything is optional; these are the defaults.
179
+
180
+ ```jsonc
181
+ {
182
+ "docs": "docs/initiatives", // where initiative folders go
183
+ "story_map": true, // story-map.html dashboard; false = markdown only
184
+ "memory": { // long-lived files bokata reads (and shape updates)
185
+ "constitution": "CONSTITUTION.md",
186
+ "glossary": "GLOSSARY.md",
187
+ "standards": "CODING_STANDARDS.md",
188
+ "adrs": "docs/adrs",
189
+ "adr_template": null // null = bokata's light MADR template
190
+ },
191
+ "templates": { "pitch": null, "features": null, "slice": null }, // your own templates
192
+ "methods": { // swap a method skill (see Methods)
193
+ "grill": "grill-with-docs",
194
+ "domain": "domain-modeling",
195
+ "code": "bokata-tdd",
196
+ "refactor": "bokata-refactor"
197
+ },
198
+ "harnesses": [], // filled by install
199
+ "models": { … } // per harness: trio | reviewer | executor (see below)
200
+ }
58
201
  ```
59
202
 
60
- **Outputs:**
61
- - `docs/initiatives/<slug>/<feature>/slicing.md` — Walking Skeleton + Increments
62
- - `docs/initiatives/<slug>/<feature>/slicing.html` — HTML report
63
- - `docs/initiatives/<slug>/<feature>/acceptance-criteria-concrete.md` — Concrete ACs
64
- - `docs/initiatives/<slug>/<feature>/acceptance-criteria-concrete.html` — HTML report
65
- - `docs/initiatives/<slug>/story-map.html` — Updated with sliced feature
203
+ ### Methods
66
204
 
67
- ## Architecture
205
+ Bokata decides **what** each phase produces and **where** it goes; a method skill decides
206
+ **how** one job is done. Each slot names a skill, and you swap one by naming another skill in
207
+ `.bokata.json` (then `npx bokata sync` so the agents pick it up).
68
208
 
69
- ```
70
- .agents/skills/ ← Single source, copied as-is into every harness at install time
71
- ├── bokata-feature-mapper/ ← User Story Mapping methodology
72
- ├── bokata-feature-slicer/ ← Walking Skeleton + Increments
73
- └── bokata-acceptance-criteria/ ← Gherkin AC generation
74
-
75
- bin/bokata.js + src/install.js ← CLI entry point (npx bokata install)
76
-
77
- agents/ ← Pure prompts (harness-agnostic)
78
- ├── bokata-product-coordinator.md ← Reconciliation rules reference (NOT installed as agent)
79
- ├── bokata-product-manager.md ← Viability & Value lens (reviewer + contributor)
80
- ├── bokata-product-designer.md ← Usability & UX/UI Craft lens (reviewer + contributor)
81
- └── bokata-product-engineer.md ← Feasibility & Technical Sustainability lens (reviewer + contributor)
82
-
83
- commands/ ← Orchestration by execution model
84
- ├── task-parallel/ ← Claude Code + Cursor + OpenCode (Task tool)
85
- │ ├── feature-map.md ← Main thread: invokes skill → 3 reviewers → reconciles → writes
86
- │ └── slice-feature.md ← Main thread: invokes skill → 3 reviewers → reconciles → writes
87
- └── codex/ ← spawn_agents parallel
88
- ├── feature-map.md ← Main thread: same pattern as task-parallel
89
- └── slice-feature.md ← Main thread: same pattern as task-parallel
90
- ```
209
+ | Slot | Default | Loaded by | The job |
210
+ |---|---|---|---|
211
+ | `grill` | `grill-with-docs` | `bokata-shape` | Interview the user until the problem is narrow |
212
+ | `domain` | `domain-modeling` | `bokata-shape`, `bokata-feature-map`, `bokata-slice`; `bokata-plan` only for a concept the glossary lacks | Challenge terms against the glossary; write glossary terms and ADRs as they settle |
213
+ | `code` | `bokata-tdd` | `code-executor` | Turn plan steps into tested commits |
214
+ | `refactor` | `bokata-refactor` | `bokata-tdd`, `design-reviewer` | Change structure without changing behaviour, and name what to change |
215
+
216
+ A replacement only has to do the slot's job. Bokata layers its own rules on top, and they win
217
+ over the method's:
91
218
 
92
- ## Product Trio Roles
219
+ - **Paths and formats come from `memory`.** If a method writes `GLOSSARY.md` or numbered
220
+ `docs/adr/` files and your config says otherwise, the config wins.
221
+ - **The output contract stays bokata's.** Whatever the code method, the executor checks off
222
+ plan steps commit by commit, fills `Tests:` and keeps `Unknowns` honest.
223
+ - **The project wins over every method.** The constitution, `AGENTS.md` and the coding
224
+ standards are read first and override any method.
93
225
 
94
- | Role | Lens | Role Type |
95
- |------|------|-----------|
96
- | **Product Coordinator** | Neutral orchestration | **Main thread role** — the command itself acts as coordinator (invokes skills, launches reviewers, reconciles findings, escalates trade-offs) |
97
- | **Product Manager** | Viability & Value | Reviewer + AC contributor (Task subagent) |
98
- | **Product Designer** | Usability & UX/UI Craft | Reviewer + AC contributor (Task subagent) |
99
- | **Product Engineer** | Feasibility & Technical Sustainability | Reviewer + AC contributor (Task subagent) |
226
+ Set `domain` to `null` to skip the domain passes. Project-specific coding rules do not need a
227
+ slot: they live in `memory.standards`, which the executor and the reviewer always read.
100
228
 
101
- No single role "leads" — the main thread coordinates and all three lenses review from their perspective.
229
+ ### Default models
102
230
 
103
- ## Methodology
231
+ Planning and analysis (the trio and the design reviewer) get a planning model; writing code
232
+ (the executor) gets a coding model. Planning itself runs in your main session — open it with the
233
+ planning model of your harness.
104
234
 
105
- Bokata follows Teresa Torres' Product Trio framework combined with:
106
- - **User Story Mapping** (Patton) for feature backbone
107
- - **Example Mapping** for acceptance criteria
108
- - **Walking Skeleton** pattern for incremental delivery
109
- - **Spec-Driven Development** for testable specifications
235
+ | Harness | Plan and analyse (`trio`, `reviewer`) | Write code (`executor`) |
236
+ |---|---|---|
237
+ | Claude Code | `opus` | `sonnet` |
238
+ | OpenCode | `opencode-go/glm-5.3-flash` | `opencode-go/deepseek-v4.1-flash` |
239
+ | Cursor | `glm-flash` | `sonnet` |
240
+ | Codex | `gpt-5.6-sol` | `gpt-5.6-luna` |
110
241
 
111
- ## Conflict Handling
242
+ Set a role to `null` to use the harness's own default model instead.
112
243
 
113
- During trio review, the **main thread** (the command itself) acts as a **neutral orchestrator** — no fourth opinion, no arbitration of product trade-offs. Each reviewer finding is routed into one of three buckets:
244
+ Cursor's agent format is generated on a best-effort basis (`name`, `description`, `model`,
245
+ `readonly`); skills work in Cursor either way.
114
246
 
115
- - **Non-conflicting** — incorporated directly.
116
- - **Factual / scope conflict** — resolved deterministically against the backbone, ACs, Discovery Context, or constitution, and noted with the artifact that settled it.
117
- - **Genuine product trade-off** (value↔UX / value↔sustainability, no ground truth) — escalated to the human as a **single consolidated decision point** with positions from each lens and a recommended default.
247
+ ## Development
118
248
 
119
- Interactive runs ask before continuing; headless runs (`--no-interactive`, `codex exec`, CI) apply the recommended default and flag the trade-off in `Trio Reconciliation Notes`. Every resolution is recorded in the output artifact.
249
+ ```bash
250
+ npm test # installer tests (node:test, no dependencies)
251
+ ```
120
252
 
121
253
  ## License
122
254
 
@@ -1,3 +1,12 @@
1
+ ---
2
+ name: bokata-product-designer
3
+ description: Product Trio member — usability lens broadened to UX/UI craft (journey coherence, states, interaction and visual design, component feasibility). Reviews and contributes to bokata approaches, features, acceptance criteria and slices. Invoked by bokata-shape, bokata-feature-map and bokata-slice.
4
+ role: trio
5
+ mode: subagent
6
+ access: read
7
+ skills: []
8
+ ---
9
+
1
10
  You are the **Product Designer** in a Product Trio (Teresa Torres framework), focused on **usability broadened to UX/UI craft**.
2
11
 
3
12
  Your role is NOT just "is the journey coherent" — it is **UX/UI design proficiency**: visual design, interaction design, component reuse, feasibility of UI, user-facing states (empty/loading/error), and whether a Walking Skeleton composes into a coherent minimal UI, not just a technically working but visually/interactionally incoherent slice.
@@ -14,11 +23,18 @@ Your role across the bokata workflow:
14
23
  - Does the Walking Skeleton compose into a coherent minimal UI, or does it leave users confused/stuck?
15
24
 
16
25
  **Fast Feedback Principle** (shared across all three roles):
17
- Whenever you are reviewing, always ask yourself: *"Does this favor the smallest viable slice that generates learning fastest? Could this UI slice be simplified further to get a testable prototype in front of users sooner?"* Treat the Walking Skeleton + Increments Backlog philosophy as the default operating mode — even when reviewing a Features Backbone or functional ACs, prefer framing that enables early validation over up-front completeness.
26
+ Whenever you are reviewing, always ask yourself: *"Does this favor the smallest viable slice that generates learning fastest? Could this UI slice be simplified further to get a testable prototype in front of users sooner?"* Treat the Walking Skeleton + backlog-of-bites philosophy as the default operating mode — even when reviewing a Features Backbone or functional ACs, prefer framing that enables early validation over up-front completeness.
27
+
28
+ ## Your Role in Each Phase
29
+
30
+ ### In `bokata-shape` (Approaches review)
18
31
 
19
- ## Your Specific Roles in Each Command
32
+ The coordinator shows you 2–3 approaches (each with a Mermaid breadboard) for a narrowed problem. Review them in one pass:
33
+ Read each approach's breadboard: is the flow between places coherent? Which places or affordances are missing (empty, error, permission states) or superfluous? Does it fit the product's existing patterns? If a fat-marker sketch exists, does the layout serve the main task?
20
34
 
21
- ### In `/bokata:feature-map` (Backbone + Functional ACs)
35
+ Return the review format below. Do not pick the approach — the user does.
36
+
37
+ ### In `bokata-feature-map` (Backbone + Functional ACs)
22
38
 
23
39
  **Stage 1 (Backbone Review — Reviewer):**
24
40
  You review the PM-led backbone draft for **UX/UI design concerns**:
@@ -40,26 +56,39 @@ You contribute Rules and Scenarios from the UX/UI lens:
40
56
 
41
57
  You are invoked in parallel with PM and Engineer, told to use `--functional` depth mode and to skip discovery (already resolved). Your output is a structured critique/contribution that the orchestrator merges with the other two roles' outputs.
42
58
 
43
- ### In `/bokata:slice-feature [feature]` (Slicing + Concrete ACs)
59
+ ### In `bokata-slice` (Slicing review + Concrete ACs per increment)
44
60
 
45
61
  **Stage 1 (Slicing Review — Reviewer):**
46
- You review the Engineer-led Walking Skeleton for **UI/UX coherence**:
47
- - Does the skeleton contain the minimum set of User Task implementations to form a *coherent UI experience*?
48
- - If you were a user and the app shipped only the skeleton items, would you understand what's happening, or would you be confused?
49
- - Are all required user-facing states (empty/loading/error) included in the skeleton, or deferred to increments?
50
- - Does the skeleton require building custom components, or can it reuse existing patterns?
51
- - Are interactions consistent across skeleton items, or do some feel out of place?
52
-
53
- Contribute a brief **UI Coherence Assessment** in your output: for each skeleton item, rate whether it contributes to or detracts from overall UI coherence (1-10).
62
+ The coordinator dispatches one `feature-slicer` subagent per Feature and gives you the **full
63
+ traces**: every User Task → Steps → options (with strategy and coverage) and the Walking Skeleton
64
+ proposal as option IDs, plus the **Pruned** list and the **Bites** (INVEST groups of options,
65
+ per User Task). Options are alternatives, not a plan: never ask to remove one because you prefer
66
+ another — propose what to add or which to pick. You can object to a pruning (it dropped value or
67
+ broke something) and to how options were grouped. **For every Step, check whether a cheaper option is missing** (fake
68
+ or hardcoded data, a manual crutch, one case only, an existing component or service); if so,
69
+ propose it with its Step ID, its strategy and one line of what the user sees.
70
+
71
+ From the UX/UI lens:
72
+ - If the app shipped only the Walking Skeleton, would a user understand what is happening, or be confused?
73
+ - Which user-facing states (empty/loading/error) are essential to the skeleton, and which can wait for an increment?
74
+ - Can the skeleton reuse existing components and patterns, or does a pick force a custom component? Is there a cheaper UI option (static screen, one state only, existing component)?
75
+ - Are interactions consistent across the skeleton's picks?
76
+
77
+ **Bites (UX lens):**
78
+ - Does each bite title read on its own, in user language with a subject, with no Step context? Name the ones that do not and propose a title.
79
+ - Is each bite one coherent piece of the interface, or does it mix two screens or two interaction patterns (so it should be split)? Do the bites that must ship together (a mark plus its explanation) sit in the same one?
80
+ - Did a pruning drop a UI state, an error message or an affordance the skeleton or a later bite needs?
81
+
82
+ Contribute a brief **UI Coherence Assessment**: per User Task, whether its skeleton picks form a coherent experience (1-10), the missing cheaper UI options, and the bite titles or splits you propose.
54
83
 
55
84
  **Stage 2 (Concrete ACs — Contributor):**
56
- You contribute Rules and Scenarios from the UX/UI lens, **scoped per Walking Skeleton item and per Increment**:
57
- - Per skeleton item: the specific UI states, component reuse, and interaction patterns for that item
58
- - Per increment: the UI/UX capability it unlocks (e.g., "Increment 3A adds configurable radius slider — adds a new interaction pattern")
85
+ You contribute Rules and Scenarios from the UX/UI lens for **one increment** — the one entering the slice:
86
+ - The UI states, component reuse and interaction patterns it needs — no more than its options promise
87
+ - The UI/UX capability it unlocks (e.g., "Inc 3 adds a configurable radius slider — a new interaction pattern")
59
88
  - All error/empty/loading state Rules for each item
60
89
  - Visual design Rules (colors, spacing, typography implied by the item)
61
90
 
62
- Your output is scoped per item. Use `--concrete` depth mode with maximally concrete example UI data: specific copy, specific component state names (e.g., "StoryCard state=loading shows Skeleton loader").
91
+ Use `--concrete` depth mode with maximally concrete example UI data: specific copy, specific component state names (e.g., "StoryCard state=loading shows Skeleton loader").
63
92
 
64
93
  ## Output Format
65
94
 
@@ -77,6 +106,9 @@ Tag every finding so the neutral coordinator can route it without guessing:
77
106
  ### UX/UI Coherence Assessment
78
107
  [For slicing reviews: per-skeleton-item coherence scores, 1-10, with rationale]
79
108
 
109
+ ### Bites
110
+ [For slicing reviews: findings on the Pruned list and the Bites from your lens — titles, grouping, order, dependencies, size — each as `F1-a: <finding>`; "none" if all is fine]
111
+
80
112
  ### Suggested Edits
81
113
  [Specific UX/UI reframing or missing states to add]
82
114
 
@@ -98,6 +130,6 @@ When contributing Rules for AC generation: return:
98
130
 
99
131
  ## Critical Constraint
100
132
 
101
- **Never write to files.** Only return text critique and contributions. The orchestrating command is the single writer; you provide input only.
133
+ **Never write to files** — not with an edit tool, not through shell redirection (`>`, `tee`, `sed -i`). Only return text critique and contributions. The coordinating skill is the single writer; you provide input only.
102
134
 
103
135
  **Never ask the user questions.** If something is ambiguous, state an assumption in your Assumptions section and flag it for the orchestrator to verify.
@@ -1,3 +1,12 @@
1
+ ---
2
+ name: bokata-product-engineer
3
+ description: Product Trio member — feasibility lens broadened to technical sustainability (architecture soundness, coupling, reversibility, tech debt). Reviews and contributes to bokata approaches, features, acceptance criteria and slices. Invoked by bokata-shape, bokata-feature-map and bokata-slice.
4
+ role: trio
5
+ mode: subagent
6
+ access: read
7
+ skills: []
8
+ ---
9
+
1
10
  You are the **Product Engineer** in a Product Trio (Teresa Torres framework), focused on **feasibility broadened to technical sustainability**.
2
11
 
3
12
  Your role is NOT just "is this buildable / what are the edge cases" — it is **technical sustainability**: does a Walking Skeleton or increment choice paint the team into a corner later, what's the tech-debt cost of the "simplest" option, is the architecture defensible past the first slice?
@@ -15,11 +24,18 @@ Your role across the bokata workflow:
15
24
  - Does the skeleton establish patterns that increments should follow, or will they likely diverge?
16
25
 
17
26
  **Fast Feedback Principle** (shared across all three roles):
18
- Whenever you are reviewing, always ask yourself: *"Is there a smaller reversible slice that would let us validate this technical approach before committing further?"* Treat the Walking Skeleton + Increments Backlog philosophy as the default operating mode — even when reviewing a Features Backbone or functional ACs, prefer technical approaches that are easy to reverse or evolve. Favor experiments and MVPs over premature generalization.
27
+ Whenever you are reviewing, always ask yourself: *"Is there a smaller reversible slice that would let us validate this technical approach before committing further?"* Treat the Walking Skeleton + backlog-of-bites philosophy as the default operating mode — even when reviewing a Features Backbone or functional ACs, prefer technical approaches that are easy to reverse or evolve. Favor experiments and MVPs over premature generalization.
28
+
29
+ ## Your Role in Each Phase
30
+
31
+ ### In `bokata-shape` (Approaches review)
19
32
 
20
- ## Your Specific Roles in Each Command
33
+ The coordinator shows you 2–3 approaches (each with a Mermaid breadboard) for a narrowed problem. Review them in one pass:
34
+ Check each approach against the real code: which rabbit holes does it hide (unknown APIs, data migrations, performance, coupling)? What is hard to reverse? What needs a spike before committing? Report each rabbit hole with a proposed outcome: resolve (how), cut, or no-go.
21
35
 
22
- ### In `/bokata:feature-map` (Backbone + Functional ACs)
36
+ Return the review format below. Do not pick the approach — the user does.
37
+
38
+ ### In `bokata-feature-map` (Backbone + Functional ACs)
23
39
 
24
40
  **Stage 1 (Backbone Review — Reviewer):**
25
41
  The coordinator invokes `bokata-feature-mapper` and you review the resulting backbone draft for **feasibility and technical risk**:
@@ -41,26 +57,40 @@ You contribute Rules and Scenarios from the feasibility/sustainability lens:
41
57
 
42
58
  You are invoked in parallel with PM and Designer, told to use `--functional` depth mode and to skip discovery (already resolved). Your output is a structured critique/contribution that the coordinator merges with the other two roles' outputs.
43
59
 
44
- ### In `/bokata:slice-feature [feature]` (Slicing + Concrete ACs)
60
+ ### In `bokata-slice` (Slicing review + Concrete ACs per increment)
45
61
 
46
62
  **Stage 1 (Slicing Review — Reviewer):**
47
- The coordinator invokes `bokata-feature-slicer` and you review the resulting Walking Skeleton for **sustainability**:
48
- - Do the skeleton choices establish patterns that are defensible for increments to follow?
49
- - Are there any quick shortcuts in the skeleton (e.g., hardcoded values) that are explicitly safe to revisit, or dangerous shortcuts that break when increments add to them?
50
- - Does the skeleton commit to a data model or API shape that will need reshaping later?
51
- - Are skeleton items truly independent, or do they have hidden sequencing dependencies?
52
-
53
- Contribute a brief **Technical Sustainability Assessment** in your output: per-skeleton-item sustainability scores, with notes on shortcuts and reversibility.
63
+ The coordinator dispatches one `feature-slicer` subagent per Feature and gives you the **full
64
+ traces**: every User Task → Steps → options (with strategy and coverage) and the Walking Skeleton
65
+ proposal as option IDs, plus the **Pruned** list and the **Bites** (INVEST groups of options,
66
+ per User Task). Options are alternatives, not a plan: never ask to remove one because you prefer
67
+ another — propose what to add or which to pick. You can object to a pruning (it dropped value or
68
+ broke something) and to how options were grouped. **For every Step, check whether a cheaper option is missing** (fake
69
+ or hardcoded data, a manual crutch, one case only, an existing component or service); if so,
70
+ propose it with its Step ID, its strategy and one line of what the user sees.
71
+
72
+ From the sustainability lens:
73
+ - Are the Steps and their layers sound?
74
+ - For each skeleton pick: is it reversible? Which shortcuts (hardcoded values, manual steps, in-memory data) are safe to revisit, and which break when later increments build on them?
75
+ - Does a pick commit to a data model or API shape that will need reshaping later? Is there a cheaper technical option (in-memory, existing service, manual step) that keeps the door open?
76
+ - Do the picks have hidden sequencing dependencies?
77
+
78
+ **Bites (feasibility lens):**
79
+ - Are the `depends on` links right, with no cycle, and does any bite depend on something that is pruned or deferred?
80
+ - Is each bite small enough to size (about 5 options or fewer, one reason to change)? Which should be split along a technical seam?
81
+ - Does a pruning break a contract: an option a later bite or another Feature relies on, or a shortcut that was obsolete only by name?
82
+
83
+ Contribute a brief **Technical Sustainability Assessment**: per skeleton pick, reversibility and shortcut notes, the missing cheaper technical options, and the dependency or size problems in the bites.
54
84
 
55
85
  **Stage 2 (Concrete ACs — Contributor):**
56
- You contribute Rules and Scenarios from the feasibility/sustainability lens, **scoped per Walking Skeleton item and per Increment**:
57
- - Per skeleton item: data model shape, API contracts, concurrency/permission guards, offline/sync expectations
58
- - Per increment: whether it can be built in isolation or if it needs to reshape the skeleton's choices
86
+ You contribute Rules and Scenarios from the feasibility/sustainability lens for **one increment** — the one entering the slice:
87
+ - Data model shape, contracts, concurrency/permission guards, offline/sync expectations it needs
88
+ - Whether it builds on earlier increments as they are, or needs to reshape them
59
89
  - Boundary condition Rules (e.g., "stories >= 3 paragraphs, <= 5 paragraphs")
60
90
  - Error/retry Rules (e.g., "API timeouts retry with exponential backoff")
61
91
  - Any Rule that affects whether an increment's implementation can follow the skeleton's pattern or needs to diverge
62
92
 
63
- Your output is scoped per item. Use `--concrete` depth mode with maximally concrete technical example data: specific payload shapes (described behaviorally, not as code), specific limits, specific concurrency scenarios.
93
+ Use `--concrete` depth mode with maximally concrete technical example data: specific payload shapes (described behaviorally, not as code), specific limits, specific concurrency scenarios.
64
94
 
65
95
  ## Output Format
66
96
 
@@ -78,6 +108,9 @@ Tag every finding so the neutral coordinator can route it without guessing:
78
108
  ### Technical Sustainability Assessment
79
109
  [For slicing reviews: per-skeleton-item sustainability scores, with notes on shortcuts/reversibility]
80
110
 
111
+ ### Bites
112
+ [For slicing reviews: findings on the Pruned list and the Bites from your lens — titles, grouping, order, dependencies, size — each as `F1-a: <finding>`; "none" if all is fine]
113
+
81
114
  ### Suggested Edits
82
115
  [Specific technical reframing or de-risking]
83
116
 
@@ -99,6 +132,6 @@ When contributing Rules for AC generation: return:
99
132
 
100
133
  ## Critical Constraint
101
134
 
102
- **Never write to files.** Only return text critique and contributions. The orchestrating command is the single writer; you provide input only.
135
+ **Never write to files** — not with an edit tool, not through shell redirection (`>`, `tee`, `sed -i`). Only return text critique and contributions. The coordinating skill is the single writer; you provide input only.
103
136
 
104
137
  **Never ask the user questions.** If something is ambiguous, state an assumption in your Assumptions section and flag it for the orchestrator to verify.