bokata 2.0.1 → 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
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: bokata-tdd
3
+ description: Strict small-step TDD with an acceptance test per increment and evidence rules for every commit — the scenario as a failing acceptance test, then one failing test, the minimum code, a separate refactor, one commit per step. Use it to implement a planned step, a bokata slice, or a bug fix test-first; when the user says TDD, ATDD, red-green-refactor or baby steps; or when an executor agent loads it as its method.
4
+ ---
5
+
6
+ # bokata-tdd
7
+
8
+ Build in **baby steps**. Each step is tested first, made green, refactored and committed
9
+ before the next one starts.
10
+
11
+ ## Before the first step
12
+
13
+ 1. Read `AGENTS.md`, the constitution, and the project's coding standards if they exist
14
+ (paths in `.bokata.json` → `memory`; defaults `CONSTITUTION.md`, `CODING_STANDARDS.md`).
15
+ They are binding and win over this skill.
16
+ 2. Read the plan or slice you were given in full, especially owner decisions and the
17
+ scenarios your steps prove. Owner decisions override older text.
18
+ 3. Read the code the first step touches. Never assume an API exists: search for it or read
19
+ the installed package's types.
20
+ 4. Use the project's own commands for tests, lint, type-check, format and build (from
21
+ `AGENTS.md` or the project's manifest). Never invent them.
22
+ 5. Load the refactor method: the skill named in `.bokata.json` → `methods.refactor` (default
23
+ `bokata-refactor`). Steps 0 and 3 of the loop follow it.
24
+
25
+ ## Acceptance test first, once per increment
26
+
27
+ An increment is done when its scenario passes, not when its last step is committed. Before the
28
+ first step of an increment (acceptance-test-driven development, the outer loop):
29
+
30
+ 1. Write the increment's scenario as **one** test at the highest seam the project's unit test
31
+ runner reaches cheaply — usually the view model or the component, not an end-to-end spec
32
+ unless the project asks for one on this flow. Same Given/When/Then, same domain words.
33
+ 2. Run it and check it fails for the right reason.
34
+ 3. Mark it as an expected failure that turns red the moment it passes — Vitest `it.fails`,
35
+ Jest `test.failing`, pytest `xfail(strict=True)` — and commit it on its own as `test(...)`,
36
+ with the failure line in the body. If the runner has no such marker, skip it instead and
37
+ say so.
38
+ 4. Build the increment with the inner loop below, in the project's build order. The step that
39
+ makes the scenario pass removes the marker **in the same commit**.
40
+
41
+ A plan written with `bokata-plan` lists this as the increment's first step and names the seam;
42
+ use that seam. If the first step's test already *is* the scenario (a pure domain rule, say),
43
+ the two loops are one: skip this.
44
+
45
+ ## The loop, once per step
46
+
47
+ **0. MAKE THE CHANGE EASY.** If the step would land awkwardly — scattered edits, a function
48
+ growing yet another branch — tidy first with the refactor method, in its own `refactor(...)`
49
+ commit, then start the step.
50
+
51
+ **1. RED.** Write **one** failing test taken from the step's scenario. Run only that test and
52
+ check it fails *for the right reason* — a missing behaviour, not a typo or an import error.
53
+ If it passes at once, the behaviour already exists: keep it as a regression guard in its own
54
+ `test:` commit and say so.
55
+
56
+ **2. GREEN.** Write the **minimum** code that makes it pass. Faking or hard-coding is fine while
57
+ one test does not force the general case; triangulate with the next test. Write no code that
58
+ no failing test asks for.
59
+
60
+ **3. REFACTOR.** With everything green, refactor with the refactor method: Kent Beck's four
61
+ rules of simple design as the arbiter, one behaviour-preserving move at a time.
62
+
63
+ For a non-trivial step, ask the `design-reviewer` subagent to review the step's diff and apply
64
+ its findings (no subagents available? review the diff yourself with the same method).
65
+ A refactor changes structure only: run the tests before and after, and commit it on its own
66
+ as `refactor(...)`, never mixed with `feat`/`fix`.
67
+
68
+ **4. VERIFY.** Run the touched tests. At the end of each step, run the full test suite, lint
69
+ and type-check. Format only the files and hunks you touched.
70
+
71
+ **5. COMMIT.** One Conventional Commit per step — `type(scope): imperative summary` — with a
72
+ body that says *why*. Stage explicit paths, never everything. Never push, never stash, never
73
+ amend or rebase.
74
+
75
+ ## Step size
76
+
77
+ About one test file and one or two production files. If a step grows past that, split it
78
+ (a/b/c) before committing and note the split. Work from the inside out, in the order the
79
+ project builds (see `AGENTS.md`), each layer test-first.
80
+
81
+ ## Evidence rules
82
+
83
+ Every claim needs proof — see [resources/evidence-rules.md](resources/evidence-rules.md).
84
+ The short version: prove RED in the commit body, never commit red, never claim "already
85
+ implemented" without the test and commit that prove it, and record the real gate output.
86
+
87
+ ## Working from a bokata slice
88
+
89
+ If your input is `slices/<nn>-<name>.md` (its plan is in the initiative's `plan.md`): check off each
90
+ plan step there **in the same commit** as the step, fill the increment's `Tests:` lines in `plan.md`
91
+ (scenario → its acceptance test), and keep the increment's `Unknowns` current in the slice. Tests are named by behaviour in the domain's words — never by an
92
+ acceptance-criterion ID.
93
+
94
+ ## Stop and ask
95
+
96
+ Stop and ask (the user, or whoever launched you) when:
97
+ - a scenario, an ADR, an owner decision and the plan disagree;
98
+ - a requirement has two readings;
99
+ - a step needs a new dependency or an architectural pattern no ADR covers;
100
+ - a behaviour change appears outside the step's scenario (a new message, a changed flow);
101
+ - a test fails and you cannot explain why after one honest attempt.
102
+
103
+ Do not guess and continue.
104
+
105
+ ## Reporting
106
+
107
+ At the end, run the project's full definition of done and report the real output lines, the
108
+ number of commits, deviations from the plan, and any checks still pending (for example a
109
+ browser check for layout). Never claim green without running it.
@@ -0,0 +1,27 @@
1
+ # Evidence rules
2
+
3
+ They come from real executor failures: commits that claimed RED without one, "already
4
+ implemented" with no proof, reformatted neighbours, progress rows saying "pending".
5
+
6
+ 1. **Prove RED.** Each `feat`/`fix` commit body names the failing test and the failure line
7
+ seen before GREEN, e.g. `RED: "counts the moments after the new end" — expected 2, received 0`.
8
+ 2. **A test that passes at once is a `test:` commit.** Characterisation tests and guards that
9
+ pass immediately go in their own `test:` commit, even when they arrive with a feature.
10
+ 3. **Never claim "already implemented"** without naming the test that proves it and the
11
+ commit that added it.
12
+ 4. **Never commit red.** When a change alters an existing expectation, run the full suite
13
+ before that commit and change the assertion in the same commit, with the reason.
14
+ 5. **Never delete or weaken an existing test** to get green. If behaviour truly changed,
15
+ change that one assertion and explain it in the commit body.
16
+ 6. **Format only your hunks.** Format new files fully; in existing files keep your own lines
17
+ formatted and never reformat neighbouring code or tables.
18
+ 7. **No production code shaped for a test double.** If a test needs a seam, test the pure rule
19
+ and keep the production code idiomatic.
20
+ 8. **No speculative branches in tests.** No casts or conditionals in assertions; one behaviour
21
+ per test; assert a refusal by its exact value.
22
+ 9. **Record gate output per step.** Wherever progress is tracked, write the test-count line of
23
+ that step's full run and the real commit hash. Never "pending" or "(this run)".
24
+ 10. **A behaviour change outside the step's scenario** is a stop-and-ask, not a deviation note.
25
+ 11. **A refactor is structure only.** If it adds tests or widens behaviour, it is a `feat`.
26
+ 12. **Split, don't report.** If a step grows past about one test file and two production files
27
+ (four at most), split it before committing, unless the plan marks it indivisible.
package/README.md CHANGED
@@ -1,122 +1,240 @@
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; keeps the bite-sized backlog in a one-feature `features.md`) → `bokata-plan` → `code-executor` |
48
+ | **L** — several features | `bokata-shape` → `bokata-feature-map` → `bokata-slice` (1–3 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 (rendered by `bokata-render`) |
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` (slicing, increments, backlog of bites); a one-line `**Slice:**` summary per feature in `features.md`; the increment's cards and the untaken bites 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`; syncs `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, current increment and next step, open unknowns, each slice's backlog of bites, features not yet sliced; may dispatch a catch-up render if the story map lags |
63
+ | `bokata-render` | Internal: renders and keeps `story-map.html` current (statuses, next step, counters, interactivity) from the markdown; loaded by the `story-map-renderer` agent, never by the user | — |
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`; keeps `plan.md` (checklist and test mapping) and the slice's unknowns current; never pushes | write |
72
+ | `design-reviewer` | Reviews one step's diff with `methods.refactor` and the coding standards | read |
73
+ | `story-map-renderer` | Loads `bokata-render` and keeps `story-map.html` current; dispatched by the skills and by `code-executor`, never by you | write |
74
+ | `feature-slicer` | Loads `bokata-feature-slicer` and slices one feature into Steps and options; `bokata-slice` dispatches one per feature, in parallel | read |
75
+
76
+ During trio reviews the **main thread** is the neutral coordinator: it applies
77
+ non-conflicting findings, settles factual conflicts against the artifacts, and escalates
78
+ genuine product trade-offs to you as one decision point with a recommended default.
79
+
80
+ ### Hierarchy
40
81
 
41
82
  ```
42
- /bokata:feature-map [initiative description]
83
+ Initiative (pitch.md)
84
+ └ Features (features.md — the summary: backbone, functional ACs, one Slice line per feature)
85
+ └ Slice (slices/<nn>-<name>.md — 1–4 features → usable end to end; open until you mark it done)
86
+ ├ Slicing (per feature: User Task → Step → options F1-2.3, with strategy and coverage;
87
+ │ pruned with a reason, a target per Step)
88
+ ├ Increment (the walking skeleton or one or more bites the user can see; Inc 1 = skeleton;
89
+ │ │ concrete ACs written when it enters; Unknowns ▲ / none ▼)
90
+ │ └ Plan steps (in the initiative's plan.md, per slice and Inc; checked off commit by commit)
91
+ └ Backlog (bites F1-a…: INVEST groups of options per User Task, titled for the user —
92
+ what --next picks from)
43
93
  ```
44
94
 
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]
95
+ A feature belongs to one slice only. An **option** is one way to do one Step; a **bite** groups
96
+ the options of one or several Steps that make sense together (small, INVEST); an **increment** is
97
+ the walking skeleton or one or more bites — whatever lets the user see or do something new.
98
+ Options are explored widely and then pruned (`obsolete`, `dominated`, `filler`, `contradicts`),
99
+ so you prioritize a handful of bites instead of a hundred option IDs. After Inc 1 is built,
100
+ `bokata-slice <nn> --next` adds the next increment to the same slice; when you are done with it,
101
+ `bokata-slice <nn> --done`.
102
+
103
+ **Upgrading an initiative sliced with bokata ≤ 2.0** (scopes per feature, `Increment options`
104
+ in `features.md`): re-run `npx bokata@latest install` so the `feature-slicer` agent is installed,
105
+ let the old slices finish as they are, and slice the remaining features with the new
106
+ `bokata-slice`. Run `bokata-render` with `rebuild` once to redraw the story map.
107
+
108
+ **Slices written before `plan.md` and `done`** (plan checklists and `Tests:` inside the slice file,
109
+ `Status: closed`) are not read by the current skills: move each Inc's `Plan:` and `Tests:` into
110
+ `plan.md` (under `## Slice <nn>` → `### Inc <n>`) and change `closed` to `done`.
111
+
112
+ ## Running the harness
113
+
114
+ The flow is **skills you name in conversation**; agents are selected or dispatched depending on
115
+ the harness. Install first (`npx bokata@latest install`), then:
116
+
117
+ | Step | You say | Produces |
118
+ |---|---|---|
119
+ | Shape | "Shape this idea: …" (loads `bokata-shape`) | `pitch.md` |
120
+ | Feature map (L initiatives) | "bokata-feature-map <slug>" | `features.md`; the dashboard renders in background |
121
+ | Slice | "bokata-slice <slug>" — pick 1–4 features; later "bokata-slice <nn> --next" | `slices/<nn>-<name>.md` |
122
+ | Plan | In your harness's plan agent: "bokata-plan docs/initiatives/<slug>/slices/<nn>-<name>.md" | checklists in the slice, `Status: planned` |
123
+ | Build | Run `code-executor` with the hand-off line the plan printed | commits, checkboxes, story map kept current |
124
+ | Check | "bokata-status <slug>" | phase, next step; catches the story map up if it lags |
125
+
126
+ `story-map-renderer` has no step of its own: the skills above and `code-executor` dispatch it
127
+ (cheap render model, background) whenever the markdown changes.
128
+
129
+ ### Per harness
130
+
131
+ - **OpenCode** — skills read from `.agents/skills/`; agents install to `.opencode/agents/`.
132
+ Name the skill in the session. Primary-capable agents (`code-executor`) appear in the agent
133
+ switcher (Tab); `mode: subagent` agents (the trio, `feature-slicer`, `design-reviewer`, `story-map-renderer`)
134
+ never do — the session dispatches them itself. Headless:
135
+ `opencode run --agent code-executor "Build slice docs/initiatives/<slug>/slices/01-<name>.md"`
136
+ - **Claude Code** — skills install to `.claude/skills/` (invoke by name or `/bokata-shape`);
137
+ agents to `.claude/agents/`. The session spawns subagents by name. Headless:
138
+ `claude --agent code-executor "Build slice …"`
139
+ - **Codex** — agents install to `.codex/agents/*.toml`; skills read from `.agents/skills/`.
140
+ Ask in plain language ("use the code-executor agent to build slice …"); `/agent` switches
141
+ between agent threads.
142
+ - **Cursor** — skills in `.cursor/skills/`, agents in `.cursor/agents/`; pick the agent from
143
+ Cursor's selector or name the skill in chat.
144
+
145
+ ### Orchestrators
146
+
147
+ Increments marked `Parallel-safe: yes` can run in separate worktrees at the same time.
148
+
149
+ - **Orca** — spawn the executor in a fresh worktree with the hand-off line:
150
+ `orca worktree create --name <task> --no-parent --agent codex --prompt "<hand-off line>" --json`
151
+ (or `--agent claude`). For a worktree that already exists:
152
+ `orca agent launch --agent codex --worktree <id> --prompt "<hand-off line>"`.
153
+ - **Herdr** — split a pane, start the agent in it, and send the line:
154
+ `herdr pane split --current --direction right --cwd "$PWD" --no-focus` →
155
+ `herdr agent start executor --kind codex --pane <id>` →
156
+ `herdr agent prompt executor "<hand-off line>" --wait`
157
+ - **Plain terminals** — open a worktree and run your harness's headless command with the
158
+ hand-off line.
159
+
160
+ ## Configuration — `.bokata.json`
161
+
162
+ Everything is optional; these are the defaults.
163
+
164
+ ```jsonc
165
+ {
166
+ "docs": "docs/initiatives", // where initiative folders go
167
+ "language": "auto", // conversation follows the user
168
+ "story_map": true, // story-map.html dashboard; false = markdown only
169
+ "memory": { // long-lived files bokata reads (and shape updates)
170
+ "constitution": "CONSTITUTION.md",
171
+ "glossary": "GLOSSARY.md",
172
+ "standards": "CODING_STANDARDS.md",
173
+ "adrs": "docs/adrs",
174
+ "adr_template": null // null = bokata's light MADR template
175
+ },
176
+ "templates": { "pitch": null, "features": null, "slice": null }, // your own templates
177
+ "methods": { // swap a method skill (see Methods)
178
+ "grill": "grill-with-docs",
179
+ "domain": "domain-modeling",
180
+ "code": "bokata-tdd",
181
+ "refactor": "bokata-refactor"
182
+ },
183
+ "harnesses": [], // filled by install
184
+ "models": { … } // per harness: trio | reviewer | executor | render (see below)
185
+ }
58
186
  ```
59
187
 
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
188
+ ### Methods
66
189
 
67
- ## Architecture
190
+ Bokata decides **what** each phase produces and **where** it goes; a method skill decides
191
+ **how** one job is done. Each slot names a skill, and you swap one by naming another skill in
192
+ `.bokata.json` (then `npx bokata sync` so the agents pick it up).
68
193
 
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
- ```
194
+ | Slot | Default | Loaded by | The job |
195
+ |---|---|---|---|
196
+ | `grill` | `grill-with-docs` | `bokata-shape` | Interview the user until the problem is narrow |
197
+ | `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 |
198
+ | `code` | `bokata-tdd` | `code-executor` | Turn plan steps into tested commits |
199
+ | `refactor` | `bokata-refactor` | `bokata-tdd`, `design-reviewer` | Change structure without changing behaviour, and name what to change |
200
+
201
+ A replacement only has to do the slot's job. Bokata layers its own rules on top, and they win
202
+ over the method's:
91
203
 
92
- ## Product Trio Roles
204
+ - **Paths and formats come from `memory`.** If a method writes `GLOSSARY.md` or numbered
205
+ `docs/adr/` files and your config says otherwise, the config wins.
206
+ - **The output contract stays bokata's.** Whatever the code method, the executor checks off
207
+ plan steps commit by commit, fills `Tests:` and keeps `Unknowns` honest.
208
+ - **The project wins over every method.** The constitution, `AGENTS.md` and the coding
209
+ standards are read first and override any method.
93
210
 
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) |
211
+ Set `domain` to `null` to skip the domain passes. Project-specific coding rules do not need a
212
+ slot: they live in `memory.standards`, which the executor and the reviewer always read.
100
213
 
101
- No single role "leads" — the main thread coordinates and all three lenses review from their perspective.
214
+ ### Default models
102
215
 
103
- ## Methodology
216
+ Planning and analysis (the trio and the design reviewer) get a planning model; writing code
217
+ (the executor) gets a coding model; the story-map renderer gets a cheap model because its job is
218
+ mechanical. Planning itself runs in your main session — open it with the planning model of your
219
+ harness.
104
220
 
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
221
+ | Harness | Plan and analyse (`trio`, `reviewer`) | Write code (`executor`) | Render the map (`render`) |
222
+ |---|---|---|---|
223
+ | Claude Code | `opus` | `sonnet` | `haiku` |
224
+ | OpenCode | `opencode-go/glm-5.3-flash` | `opencode-go/deepseek-v4.1-flash` | `opencode-go/glm-5.3-flash` |
225
+ | Cursor | `glm-flash` | `sonnet` | `glm-flash` |
226
+ | Codex | `gpt-5.6-sol` | `gpt-5.6-luna` | `gpt-5.6-luna` |
110
227
 
111
- ## Conflict Handling
228
+ Set a role to `null` to use the harness's own default model instead.
112
229
 
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:
230
+ Cursor's agent format is generated on a best-effort basis (`name`, `description`, `model`,
231
+ `readonly`); skills work in Cursor either way.
114
232
 
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.
233
+ ## Development
118
234
 
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.
235
+ ```bash
236
+ npm test # installer tests (node:test, no dependencies)
237
+ ```
120
238
 
121
239
  ## License
122
240
 
@@ -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.
@@ -16,9 +25,16 @@ Your role across the bokata workflow:
16
25
  **Fast Feedback Principle** (shared across all three roles):
17
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 + 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.
18
27
 
19
- ## Your Specific Roles in Each Command
28
+ ## Your Role in Each Phase
29
+
30
+ ### In `bokata-shape` (Approaches review)
31
+
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.** 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.