bokata 3.0.0-beta.3 → 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.
- package/.agents/skills/bokata-acceptance-criteria/SKILL.md +6 -7
- package/.agents/skills/bokata-acceptance-criteria/resources/output-template-functional.md +3 -3
- package/.agents/skills/bokata-acceptance-criteria/resources/output-template.md +1 -1
- package/.agents/skills/bokata-feature-map/SKILL.md +10 -11
- package/.agents/skills/bokata-feature-mapper/SKILL.md +4 -5
- package/.agents/skills/bokata-feature-mapper/resources/output-template.md +1 -1
- package/.agents/skills/bokata-feature-slicer/SKILL.md +16 -12
- package/.agents/skills/bokata-feature-slicer/resources/output-template-bites.md +12 -4
- package/.agents/skills/bokata-feature-slicer/resources/phase-2-increments.md +29 -51
- package/.agents/skills/bokata-feature-slicer/resources/{phase-3-baby-steps.md → phase-3-skeleton.md} +3 -3
- package/.agents/skills/bokata-feature-slicer/resources/phase-4-bites.md +8 -7
- package/.agents/skills/bokata-plan/SKILL.md +21 -15
- package/.agents/skills/bokata-plan/resources/plan-template.md +7 -5
- package/.agents/skills/bokata-render/SKILL.md +62 -138
- package/.agents/skills/bokata-render/assets/story-map.html +428 -0
- package/.agents/skills/bokata-render/scripts/render.mjs +703 -0
- package/.agents/skills/bokata-shape/SKILL.md +1 -1
- package/.agents/skills/bokata-slice/SKILL.md +194 -100
- package/.agents/skills/bokata-slice/resources/inc-template.md +36 -0
- package/.agents/skills/bokata-slice/resources/slice-template.md +37 -84
- package/.agents/skills/bokata-status/SKILL.md +27 -15
- package/.agents/skills/bokata-tdd/resources/evidence-rules.md +2 -2
- package/LICENSE +21 -0
- package/README.md +54 -40
- package/agents/bokata-product-designer.md +2 -2
- package/agents/bokata-product-engineer.md +2 -2
- package/agents/bokata-product-manager.md +3 -3
- package/agents/code-executor.md +27 -16
- package/agents/design-reviewer.md +2 -2
- package/agents/feature-slicer.md +21 -9
- package/bin/bokata.js +17 -5
- package/package.json +1 -1
- package/src/agents.js +36 -11
- package/src/config.js +8 -7
- package/src/install.js +12 -3
- package/.agents/skills/bokata-render/resources/story-map-template.md +0 -835
- package/agents/story-map-renderer.md +0 -19
|
@@ -1,144 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bokata-render
|
|
3
|
-
description: Render
|
|
3
|
+
description: Render the initiative's story-map.html — one self-contained page with the map (Features and User Tasks as columns, one band of bite cards per increment, a Backlog band of untaken bites), a minimap, and a page per increment, bite, User Task and Feature — by running a script over features.md, slices/ and plan.md. Also validates that markdown (--check). Run by bokata-feature-map, bokata-slice, bokata-plan, bokata-status and code-executor whenever the markdown changes; no model is involved, so it is instant and always agrees with the markdown. Use it when the user asks to refresh, rebuild or validate the story map.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# bokata-render
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
IDs and titles; `.card-details` with one `<li>` per scenario and a link to
|
|
70
|
-
`slices/<nn>-<name>.md`) and, as its last child, the corner badge
|
|
71
|
-
`<span class="scope-badge">S<nn> · Inc <n></span>`.
|
|
72
|
-
5. Leave every other Step's **increment** cards untouched, including Steps this slice did not tag
|
|
73
|
-
and every card from earlier slices.
|
|
74
|
-
6. **Redraw the bites of this slice** in every Step column of its Features, tagged or not (a
|
|
75
|
-
`--next` re-prune can change any of them): one `.bite-card` per **untaken** bite of `## Backlog`
|
|
76
|
-
(a bite whose line carries `→ Inc n` is taken and gets no bite card), in the column of its first
|
|
77
|
-
option (resolved through `## Slicing`), below the column's last increment card, ordered
|
|
78
|
-
must-have → nice-to-have → deferred, each with the badge `S<nn> · Backlog`. See the template for the card. A Backlog with no bite lines
|
|
79
|
-
(a slice written before bites) draws none.
|
|
80
|
-
7. Finish with `state-sync` (operation 4) so statuses, counters and the next banner match the
|
|
81
|
-
new slice immediately.
|
|
82
|
-
|
|
83
|
-
### 3. `rebuild` — migration or repair
|
|
84
|
-
|
|
85
|
-
The file predates the `v3` template marker, or the auto-check of a previous run failed and could
|
|
86
|
-
not be repaired in place. Render the **whole** board from scratch — `features.md` for the
|
|
87
|
-
backbone, every `slices/*.md` for the cards and their state — following
|
|
88
|
-
[resources/story-map-template.md](resources/story-map-template.md). The result must be identical to
|
|
89
|
-
what a fresh `create` plus every `slice-added` would produce. Use it only as fallback: the normal
|
|
90
|
-
path is in-place editing.
|
|
91
|
-
|
|
92
|
-
### 4. `state-sync` — after bokata-plan, each executor increment, or a bokata-status catch-up
|
|
93
|
-
|
|
94
|
-
Do not add cards. Re-derive state from `slices/*.md` and update the existing HTML:
|
|
95
|
-
|
|
96
|
-
1. For every slice file, read `Status:` (open | done); for its plan, read `plan.md`: under
|
|
97
|
-
`## Slice <nn>` and per `### Inc <n>` heading, its checkboxes (`- [ ]` / `- [x]`). An increment
|
|
98
|
-
with no section in `plan.md` has no plan yet.
|
|
99
|
-
2. Leave every `.bite-card` as it is: bites are redrawn only by `slice-added` and `rebuild`.
|
|
100
|
-
For each card with `data-increment-id="<nn>-Inc<n>"`, compute its state and write it as the
|
|
101
|
-
`state-*` class and `data-state` attribute. If a card matches no heading, leave it untouched
|
|
102
|
-
and report it in the auto-check:
|
|
103
|
-
- every plan checkbox checked (and at least one) → `state-done`
|
|
104
|
-
- at least one checked, not all → `state-building`
|
|
105
|
-
- no checkboxes checked yet (with or without a plan) → `state-planned`
|
|
106
|
-
- no slice file for that increment → remove the `state-*` class (never happens for cards
|
|
107
|
-
written by `slice-added`).
|
|
108
|
-
3. Update each card's `.steps-badge` `data-done` / `data-total` attributes (steps checked vs
|
|
109
|
-
total in its increment). Render no badge when the increment has no plan.
|
|
110
|
-
4. Rebuild the **next banner**: the active slice is the first `Status: open` slice with an
|
|
111
|
-
unchecked plan step. The next step is the first `- [ ]` under its `## Slice <nn>` section in `plan.md`. Fill `.next-text` with
|
|
112
|
-
`"<step text> — <nn>-<name>"` and `.next-link` with `plan.md`; hide the banner
|
|
113
|
-
(`hidden`) when there is no next step.
|
|
114
|
-
5. Update the header counters and footer: increments done / total (`### Inc` headings), steps
|
|
115
|
-
done / total plan steps, slices done / total slice files, bites left (the number of
|
|
116
|
-
`.bite-card`s), `Sliced: <features with ≥1 card>/<features>`, and the generation date.
|
|
117
|
-
|
|
118
|
-
## Auto-check (mandatory before you finish)
|
|
119
|
-
|
|
120
|
-
Count in the markdown and compare with the HTML you just wrote:
|
|
121
|
-
|
|
122
|
-
- `.step-card` count **equals** the number of User Task IDs in `features.md`.
|
|
123
|
-
- `.feature-header` count **equals** the number of Features; each `span N` equals its User Task
|
|
124
|
-
count.
|
|
125
|
-
- Cards in `state-done` **equal** the cards of increments whose checkboxes are all checked.
|
|
126
|
-
- Every skeleton, increment and bite card has exactly one `.scope-badge`, and it says the card's own
|
|
127
|
-
slice and increment (`S02 · Inc 2`) or `Backlog`.
|
|
128
|
-
- `.bite-card` count **equals** the untaken bite lines (no `→ Inc n`) in every `## Backlog`, and
|
|
129
|
-
each sits in the column of its first option.
|
|
130
|
-
- Header/footer counters **equal** the real counts.
|
|
131
|
-
|
|
132
|
-
If any check fails, fix the HTML from the markdown and run the check again. If it still fails,
|
|
133
|
-
write what is left as a `.system-tasks-note`-style note under the board and report the mismatch —
|
|
134
|
-
never leave counters lying.
|
|
135
|
-
|
|
136
|
-
## Hard rules
|
|
137
|
-
|
|
138
|
-
- One operation per run, one file written: `story-map.html`. Never edit `features.md`,
|
|
139
|
-
`slices/*.md`, `pitch.md` or anything else.
|
|
140
|
-
- Keep the file self-contained: no external CSS, JS, fonts or images. Vanilla HTML/CSS/JS only.
|
|
141
|
-
- Keep the template marker (`<meta name="bokata-story-map" content="v3">`), the Patton structure
|
|
142
|
-
and the `data-*` attributes — the next run depends on them.
|
|
143
|
-
- Same filename on write: the artifact is updated, not recreated (except `rebuild`).
|
|
144
|
-
- Reply with a single line: `<operation> — story-map.html updated (<increments done>/<total> increments, <steps done>/<total> steps)`.
|
|
8
|
+
`story-map.html` is a **derived file**: the markdown is the truth, a script draws the site. Same
|
|
9
|
+
markdown, same HTML. Nothing to edit by hand, nothing to keep in sync, and not worth committing
|
|
10
|
+
(add it to `.gitignore`).
|
|
11
|
+
|
|
12
|
+
## Run it
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
node .agents/skills/bokata-render/scripts/render.mjs <docs>/<initiative-slug>
|
|
16
|
+
# or, from a project with bokata installed: npx bokata render <docs>/<initiative-slug>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`<docs>` is `docs` in `.bokata.json` (default `docs/initiatives`). It writes
|
|
20
|
+
`<docs>/<slug>/story-map.html` and prints one line:
|
|
21
|
+
`story-map.html updated (<done>/<total> increments, <done>/<total> steps, <n> bites left)`.
|
|
22
|
+
With `"story_map": false` in `.bokata.json` it renders nothing and says so. Options:
|
|
23
|
+
`--lang en|es` (the page's language, default `en`), `--date YYYY-MM-DD`, `--out <file>`.
|
|
24
|
+
|
|
25
|
+
**`--check`** parses everything with the same parser, prints every problem as `file:line: problem`
|
|
26
|
+
and writes nothing (exit 1 if there is any). `bokata-slice <nn> --check` runs it.
|
|
27
|
+
|
|
28
|
+
Run it in the foreground, after the markdown is final (a render takes milliseconds). If it exits
|
|
29
|
+
with an error, **show the user the `file:line: problem` it printed** and stop: the markdown broke
|
|
30
|
+
the contract below, fix the markdown, never the HTML.
|
|
31
|
+
|
|
32
|
+
## What the page shows
|
|
33
|
+
|
|
34
|
+
One file, no server: open it in a browser. Routes are in the URL hash.
|
|
35
|
+
|
|
36
|
+
- **Map** — a column per User Task under its Feature (zoom XS · S · M · L, fold a Feature into one
|
|
37
|
+
column, hide empty columns, minimap, filters by state and priority). Each slice is a stack of
|
|
38
|
+
**bands**, one per increment, holding the **bite cards** it took; a dashed band per proposed increment;
|
|
39
|
+
a **Backlog** band with the untaken bites by priority. Card colour = state (done, building, planned,
|
|
40
|
+
proposed, untaken).
|
|
41
|
+
- **Increment** (`#/inc/<slice>-<n>`) — "when it is done" (the outcome), what becomes possible, bites,
|
|
42
|
+
what is pending, the unknowns and, folded, the full detail of its `inc-<n>.md` (rules, Gherkin).
|
|
43
|
+
- **Bite** (`#/bite/<slice>-<id>`), **User Task** (`#/ut/<id>`: where it is covered in every slice) and
|
|
44
|
+
**Feature** (`#/feature/<code>`).
|
|
45
|
+
|
|
46
|
+
## What it reads
|
|
47
|
+
|
|
48
|
+
| File | Used for |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `features.md` | `#### Feature: <name>` (+ `<!-- ID: … -->`) → header; `##### User Task: <name>` (+ `<!-- Task ID: … -->`) → one column each; `##### System Task …` → listed on the Feature page |
|
|
51
|
+
| `slices/<nn>-<name>.md` | the index: `- Status: open \| done`; `### Inc <n> — <name>` with `Outcome:` and `Bites:`; `## Backlog`: the bite lines and the `### Proposed increments` table |
|
|
52
|
+
| `slices/<nn>-<name>/slicing/F<k>.md` | `### User Task: <name>` and option lines `- F1-1.1 <name> — …` → which User Task each option (and so each bite) belongs to |
|
|
53
|
+
| `slices/<nn>-<name>/inc-<n>.md` | `- State: sliced \| planned \| done`, `Unknowns:`, the `Scenario:` lines, the `## Pending` list and the whole body for the Inc page |
|
|
54
|
+
| `plan.md` | `## Slice <nn>` → `### Inc <n>` and their `- [ ]` / `- [x]` boxes → *planned / building*, progress and the "Next" banner |
|
|
55
|
+
|
|
56
|
+
**State of an increment**: `State: done` in its `inc-<n>.md` (or a slice with `Status: done`) wins;
|
|
57
|
+
otherwise the steps in `plan.md` say planned / building / done; with no steps, its own `State` (sliced
|
|
58
|
+
by default). `plan.md` is temporary: when an Inc is done its section is deleted and nothing is lost.
|
|
59
|
+
|
|
60
|
+
A bite line is exactly the canonical one of `bokata-feature-slicer`
|
|
61
|
+
(`- **F1-a · <title>** (must-have) — F1-1.2 · depends on: … · value: … · check: …`; the skeleton
|
|
62
|
+
bites of Inc 1 are `F1-w1 … (skeleton) → Inc 1 — F1-1.1`). A bite is **taken** when an Inc lists it in
|
|
63
|
+
`Bites:` (its line then carries `→ Inc <n>`); an Inc with `Options:` and no `Bites:` (older slices) is
|
|
64
|
+
drawn as loose option cards. The tests in `test/render.test.js` (and `test/fixtures/initiative/`)
|
|
65
|
+
are the format specification.
|
|
66
|
+
|
|
67
|
+
The page is `assets/story-map.html` with the data of the initiative embedded; it is self-contained
|
|
68
|
+
(no external CSS, JS, fonts or images).
|