bokata 3.0.0-beta.6 → 3.0.0-beta.8

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 (38) hide show
  1. package/.agents/skills/bokata-acceptance-criteria/SKILL.md +6 -6
  2. package/.agents/skills/bokata-feature-map/SKILL.md +4 -4
  3. package/.agents/skills/bokata-feature-map/resources/features-template.md +5 -5
  4. package/.agents/skills/bokata-feature-mapper/SKILL.md +1 -1
  5. package/.agents/skills/bokata-feature-slicer/SKILL.md +18 -13
  6. package/.agents/skills/bokata-feature-slicer/resources/breakdown-strategies.md +15 -7
  7. package/.agents/skills/bokata-feature-slicer/resources/output-template-bites.md +3 -3
  8. package/.agents/skills/bokata-feature-slicer/resources/{phase-2-increments.md → phase-2-options.md} +1 -1
  9. package/.agents/skills/bokata-feature-slicer/resources/phase-3-skeleton.md +7 -6
  10. package/.agents/skills/bokata-feature-slicer/resources/phase-4-bites.md +7 -7
  11. package/.agents/skills/bokata-plan/SKILL.md +30 -30
  12. package/.agents/skills/bokata-plan/resources/plan-template.md +13 -13
  13. package/.agents/skills/bokata-render/SKILL.md +20 -20
  14. package/.agents/skills/bokata-render/assets/story-map.html +86 -86
  15. package/.agents/skills/bokata-render/scripts/render.mjs +208 -178
  16. package/.agents/skills/bokata-shape/SKILL.md +2 -2
  17. package/.agents/skills/bokata-slice/SKILL.md +198 -120
  18. package/.agents/skills/bokata-slice/resources/appetite-template.md +71 -0
  19. package/.agents/skills/bokata-slice/resources/proposed-slices.md +50 -0
  20. package/.agents/skills/bokata-spec/SKILL.md +256 -0
  21. package/.agents/skills/bokata-spec/resources/slice-template.md +49 -0
  22. package/.agents/skills/bokata-status/SKILL.md +29 -29
  23. package/.agents/skills/bokata-tdd/SKILL.md +12 -12
  24. package/README.md +475 -320
  25. package/agents/bokata-product-designer.md +7 -7
  26. package/agents/bokata-product-engineer.md +10 -10
  27. package/agents/bokata-product-manager.md +8 -8
  28. package/agents/code-executor.md +25 -21
  29. package/agents/feature-slicer.md +1 -1
  30. package/bin/bokata.js +1 -1
  31. package/package.json +1 -1
  32. package/src/config.js +1 -1
  33. package/src/install.js +11 -4
  34. package/.agents/skills/bokata-inc/SKILL.md +0 -244
  35. package/.agents/skills/bokata-inc/resources/inc-template.md +0 -36
  36. package/.agents/skills/bokata-slice/resources/proposed-increments.md +0 -42
  37. package/.agents/skills/bokata-slice/resources/slice-template.md +0 -70
  38. /package/.agents/skills/bokata-feature-slicer/resources/{output-template-increments.md → output-template-options.md} +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bokata-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-inc, 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.
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 slice, a Backlog band of untaken bites), a minimap, and a page per slice, bite, User Task and Feature — by running a script over features.md, appetites/ and plan.md. Also validates that markdown (--check). Run by bokata-feature-map, bokata-slice, bokata-spec, 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
@@ -18,12 +18,12 @@ node .agents/skills/bokata-render/scripts/render.mjs <docs>/<initiative-slug>
18
18
 
19
19
  `<docs>` is `docs` in `.bokata.json` (default `docs/initiatives`). It writes
20
20
  `<docs>/<slug>/story-map.html` and prints one line:
21
- `story-map.html updated (<done>/<total> increments, <done>/<total> steps, <n> bites left)`.
21
+ `story-map.html updated (<done>/<total> slices, <done>/<total> steps, <n> bites left)`.
22
22
  With `"story_map": false` in `.bokata.json` it renders nothing and says so. Options:
23
23
  `--lang en|es` (the page's language, default `en`), `--date YYYY-MM-DD`, `--out <file>`.
24
24
 
25
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 (run it after editing the proposed increments by hand).
26
+ and writes nothing (exit 1 if there is any). `bokata-slice <nn> --check` runs it (run it after editing the proposed slices by hand).
27
27
 
28
28
  Run it in the foreground, after the markdown is final (a render takes milliseconds). If it exits
29
29
  with an error, **show the user the `file:line: problem` it printed** and stop: the markdown broke
@@ -34,20 +34,20 @@ the contract below, fix the markdown, never the HTML.
34
34
  One file, no server: open it in a browser. Routes are in the URL hash.
35
35
 
36
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 (the roadmap of `### Proposed increments`, the Walking Skeleton of a new slice included);
37
+ column, hide empty columns, minimap, filters by state and priority). Each appetite is a stack of
38
+ **bands**, one per slice, holding the **bite cards** it took; a dashed band per proposed slice (the roadmap of `### Proposed slices`, the Walking Skeleton of a new appetite included);
39
39
  a **Backlog** band with the untaken bites by priority. Card colour = state (done, building, planned,
40
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>`) — a bite is eaten across layers: each **Step it touches is a row**
41
+ - **Slice** (`#/slice/<appetite>-<n>`) — "when it is done" (the outcome), what becomes possible, bites,
42
+ what is pending, the unknowns and, folded, the full detail of its `slice-<n>.md` (rules, Gherkin).
43
+ - **Bite** (`#/bite/<appetite>-<id>`) — a bite is eaten across layers: each **Step it touches is a row**
44
44
  (titled with its layer: Logic, UI, Integration, Data) and **every option of that Step is a card**, aligned
45
- in columns by option number. Cards say which bite took the option (★ this bite; any other bite or increment
45
+ in columns by option number. Cards say which bite took the option (★ this bite; any other bite or slice
46
46
  keeps its state colour and links to it), which were **pruned** (hatched, with the reason and its category),
47
47
  and which is the Step's target (◎). Between two slices of bread: what the user gets and its dependencies
48
48
  above, how it is checked below. Zoom L · M · S · XS sets the card width; "Hide pruned" hides the cut ones.
49
- A slice cut before Steps were written down falls back to the plain list of options.
50
- - **User Task** (`#/ut/<id>`) — where it is covered in every slice, and **all the options of each of its
49
+ An appetite cut before Steps were written down falls back to the plain list of options.
50
+ - **User Task** (`#/ut/<id>`) — where it is covered in every appetite, and **all the options of each of its
51
51
  Steps together**, coloured by the bite that takes them (the place where bites will be chosen).
52
52
  - **Feature** (`#/feature/<code>`).
53
53
 
@@ -56,20 +56,20 @@ One file, no server: open it in a browser. Routes are in the URL hash.
56
56
  | File | Used for |
57
57
  |---|---|
58
58
  | `features.md` | `#### Feature: <name>` (+ `<!-- ID: … -->`) → header; `##### User Task: <name>` (+ `<!-- Task ID: … -->`) → one column each; `##### System Task …` → listed on the Feature page |
59
- | `slices/<nn>-<name>.md` | the index: `- Status: open \| done`; `### Inc <n> — <name>` with `Outcome:` and `Bites:` (only the specified increments; a new slice has none); `## Backlog`: the bite lines and the `### Proposed increments` table (the proposed increments) |
60
- | `slices/<nn>-<name>/slicing/F<k>.md` | `### User Task: <name>`, Step lines `- **S1 <name>** · UI — …` and option lines `- F1-1.1 <name> — <what changes> · <strategy> · … [→ Inc n] [→ target]` → which User Task and Step each option (and so each bite) belongs to, and what it says |
61
- | `slices/<nn>-<name>/pruned.md` | `- F1-1.0 <name> — \`obsolete\`: <reason>` → the cut options, drawn in their Step on the bite page |
62
- | `slices/<nn>-<name>/inc-<n>.md` | `- State: specified \| planned \| done` (an old `sliced` reads as `specified`), `Unknowns:`, the `Scenario:` lines, the `## Pending` list and the whole body for the Inc page |
63
- | `plan.md` | `## Slice <nn>` → `### Inc <n>` and their `- [ ]` / `- [x]` boxes → *planned / building*, progress and the "Next" banner |
59
+ | `appetites/<nn>-<name>.md` | the index: `- Status: open \| done`; `### Slice <n> — <name>` with `Outcome:` and `Bites:` (only the specified slices; a new appetite has none); `## Backlog`: the bite lines and the `### Proposed slices` table (the proposed slices) |
60
+ | `appetites/<nn>-<name>/slicing/F<k>.md` | `### User Task: <name>`, Step lines `- **S1 <name>** · UI — …` and option lines `- F1-1.1 <name> — <what changes> · <strategy> · … [→ Slice n] [→ target]` → which User Task and Step each option (and so each bite) belongs to, and what it says |
61
+ | `appetites/<nn>-<name>/pruned.md` | `- F1-1.0 <name> — \`obsolete\`: <reason>` → the cut options, drawn in their Step on the bite page |
62
+ | `appetites/<nn>-<name>/slice-<n>.md` | `- State: specified \| planned \| done` (an old `sliced` reads as `specified`), `Unknowns:`, the `Scenario:` lines, the `## Pending` list and the whole body for the Slice page |
63
+ | `plan.md` | `## Appetite <nn>` → `### Slice <n>` and their `- [ ]` / `- [x]` boxes → *planned / building*, progress and the "Next" banner |
64
64
 
65
- **State of an increment**: `State: done` in its `inc-<n>.md` (or a slice with `Status: done`) wins;
65
+ **State of a slice**: `State: done` in its `slice-<n>.md` (or an appetite with `Status: done`) wins;
66
66
  otherwise the steps in `plan.md` say planned / building / done; with no steps, its own `State` (specified
67
- by default). An increment with no `inc-<n>.md` is **proposed**: a row of `### Proposed increments`, drawn dashed. `plan.md` is temporary: when an Inc is done its section is deleted and nothing is lost.
67
+ by default). A slice with no `slice-<n>.md` is **proposed**: a row of `### Proposed slices`, drawn dashed. `plan.md` is temporary: when a Slice is done its section is deleted and nothing is lost.
68
68
 
69
69
  A bite line is exactly the canonical one of `bokata-feature-slicer`
70
70
  (`- **F1-a · <title>** (must-have) — F1-1.2 · depends on: … · value: … · check: …`; the skeleton
71
- bites of Inc 1 are `F1-w1 … (skeleton) — F1-1.1`, and `→ Inc 1` once `bokata-inc` specifies it). A bite is **taken** when an Inc lists it in
72
- `Bites:` (its line then carries `→ Inc <n>`); an Inc with `Options:` and no `Bites:` (older slices) is
71
+ bites of Slice 1 are `F1-w1 … (skeleton) — F1-1.1`, and `→ Slice 1` once `bokata-spec` specifies it). A bite is **taken** when a Slice lists it in
72
+ `Bites:` (its line then carries `→ Slice <n>`); a Slice with `Options:` and no `Bites:` (older appetites) is
73
73
  drawn as loose option cards. The tests in `test/render.test.js` (and `test/fixtures/initiative/`)
74
74
  are the format specification.
75
75
 
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>{{TITLE}}</title>
7
7
  <!-- Generated by bokata-render from the initiative's markdown. Self-contained: no external CSS, JS, fonts or images.
8
- Every page of the site (map, increment, bite, User Task, Feature) lives in this one file, routed by the URL hash. -->
8
+ Every page of the site (map, slice, bite, User Task, Feature) lives in this one file, routed by the URL hash. -->
9
9
  <style>
10
10
  :root{--bg:#f6f7f9;--ink:#1c2230;--mute:#6b7280;--line:#dfe3ea;--panel:#fff;--lab:176px;--w:150px;
11
11
  --done:#e3f3e8;--done-b:#59a96f;--build:#fff1cf;--build-b:#e0a21b;--plan:#e6eefc;--plan-b:#6e93e0;--back-b:#b5bcc8}
@@ -35,8 +35,8 @@ code{background:#eef0f4;padding:0 4px;border-radius:3px;font-size:.92em}
35
35
  .th:hover{text-decoration:underline}
36
36
  .z4 .th{writing-mode:vertical-rl;padding:6px 2px;height:120px;font-size:11px}
37
37
  .corner{position:sticky;left:0;z-index:40;background:var(--bg)}
38
- .slice-h{position:sticky;left:0;display:flex;gap:10px;align-items:center;padding:14px 12px 6px;font-weight:700;font-size:15px;width:max-content;cursor:pointer;z-index:20}
39
- .slice-h .pill{font-size:11px}
38
+ .appetite-h{position:sticky;left:0;display:flex;gap:10px;align-items:center;padding:14px 12px 6px;font-weight:700;font-size:15px;width:max-content;cursor:pointer;z-index:20}
39
+ .appetite-h .pill{font-size:11px}
40
40
  .band{display:grid;grid-template-columns:var(--cols);column-gap:0;border-top:1px dashed var(--back-b);padding:6px 0;align-items:start}
41
41
  .band.st-done,.band.st-building{border-top-style:solid;border-top-color:var(--line)}
42
42
  .lab{position:sticky;left:0;z-index:10;background:var(--bg);padding:2px 10px 2px 12px;display:block;align-self:stretch;margin-right:6px;border-radius:8px}
@@ -168,20 +168,20 @@ const I = {
168
168
  zoom: 'Zoom', fold: 'Fold features', unfold: 'Unfold features', empty: 'Only columns with cards', minimap: 'Minimap', state: 'State', priority: 'Priority',
169
169
  done: 'done', building: 'building', planned: 'planned', specified: 'specified', proposed: 'proposed', back: 'untaken', open: 'open',
170
170
  must: 'must', nice: 'nice', def: 'def', backlog: 'Backlog', backlogSub: 'Untaken bites, by priority', bitesN: (n) => `${n} ${n === 1 ? 'bite' : 'bites'}`, noBites: 'no bites', scN: (n) => `${n} sc.`,
171
- map: 'Map', mapBack: '← Map', slice: 'Slice', incsDone: (a, b) => `${a}/${b} Incs done`, bitesTotal: (n) => `${n} bites`,
172
- summary: (f, u, a, b, n) => `${f} features · ${u} user tasks · ${a}/${b} Incs · ${n} bites untaken`,
171
+ map: 'Map', mapBack: '← Map', appetite: 'Appetite', slicesDone: (a, b) => `${a}/${b} Slices done`, bitesTotal: (n) => `${n} bites`,
172
+ summary: (f, u, a, b, n) => `${f} features · ${u} user tasks · ${a}/${b} Slices · ${n} bites untaken`,
173
173
  next: 'Next', generated: 'Generated',
174
174
  whenDone: 'When it is done', whatPossible: 'What will be possible', bites: 'Bites', touches: 'Features and User Tasks it touches',
175
175
  optionsN: (n) => `Options (${n})`, showOpts: 'show grouped by User Task', noTrace: 'No trace',
176
- detail: (n) => `Full detail of the increment${n ? ` · ${n} scenarios` : ''} (rules, Gherkin, fixtures)`,
176
+ detail: (n) => `Full detail of the slice${n ? ` · ${n} scenarios` : ''} (rules, Gherkin, fixtures)`,
177
177
  pending: 'Pending — not in the code', unknowns: 'Unknowns', planN: (p) => `plan ${p}`, scenariosN: (n) => `${n} scenarios`, tasksN: (n) => `${n} user tasks`,
178
- looseNote: (n) => `This increment has no bites: ${n} loose options. Every Inc should be made of bites.`,
178
+ looseNote: (n) => `This slice has no bites: ${n} loose options. Every Slice should be made of bites.`,
179
179
  source: 'Source', readOnly: 'generated page, read only',
180
180
  value: 'Value', check: 'How it is checked', dependsOn: 'Depends on', userTasks: 'User Tasks', biteOptions: (n) => `Options of the bite (${n})`,
181
- notTaken: 'untaken', covered: 'Where it is covered', thSlice: 'Slice', thIncs: 'Increments', thBites: 'Bites', thOpts: 'Options in Incs',
182
- featureTasks: 'User Tasks', incsTouch: 'Increments that touch it', systemTasks: 'System Tasks', noSlice: 'No slice has cut this feature yet.',
181
+ notTaken: 'untaken', covered: 'Where it is covered', thAppetite: 'Appetite', thSlices: 'Slices', thBites: 'Bites', thOpts: 'Options in Slices',
182
+ featureTasks: 'User Tasks', slicesTouch: 'Slices that touch it', systemTasks: 'System Tasks', noAppetite: 'No appetite has cut this feature yet.',
183
183
  notFound: 'Not found', foldTip: (o) => `click to ${o ? 'fold' : 'unfold'}`, tasksN2: (n) => `${n} UT`, plusUT: (n) => `+${n} UT`,
184
- touchesN: (n) => ` (touches ${n} User Tasks)`, loose: (n) => `${n} loose options`, looseTip: (t, n, i) => `${t} — ${n} options of Inc ${i} not grouped in bites`,
184
+ touchesN: (n) => ` (touches ${n} User Tasks)`, loose: (n) => `${n} loose options`, looseTip: (t, n, i) => `${t} — ${n} options of Slice ${i} not grouped in bites`,
185
185
  clickDrag: 'click or drag', untakenN: (n) => `${n} untaken`, desc: 'description',
186
186
  whyOrder: 'Why this order'
187
187
  },
@@ -189,20 +189,20 @@ const I = {
189
189
  zoom: 'Zoom', fold: 'Plegar features', unfold: 'Desplegar features', empty: 'Solo columnas con tarjetas', minimap: 'Minimapa', state: 'Estado', priority: 'Prioridad',
190
190
  done: 'hecho', building: 'en curso', planned: 'planificado', specified: 'especificado', proposed: 'propuesto', back: 'sin tomar', open: 'abierto',
191
191
  must: 'must', nice: 'nice', def: 'def', backlog: 'Backlog', backlogSub: 'Bites sin tomar, por prioridad', bitesN: (n) => `${n} ${n === 1 ? 'bite' : 'bites'}`, noBites: 'sin bites', scN: (n) => `${n} esc.`,
192
- map: 'Mapa', mapBack: '← Mapa', slice: 'Slice', incsDone: (a, b) => `${a}/${b} Incs hechos`, bitesTotal: (n) => `${n} bites`,
193
- summary: (f, u, a, b, n) => `${f} features · ${u} user tasks · ${a}/${b} Incs · ${n} bites sin tomar`,
192
+ map: 'Mapa', mapBack: '← Mapa', appetite: 'Apetito', slicesDone: (a, b) => `${a}/${b} Slices hechos`, bitesTotal: (n) => `${n} bites`,
193
+ summary: (f, u, a, b, n) => `${f} features · ${u} user tasks · ${a}/${b} Slices · ${n} bites sin tomar`,
194
194
  next: 'Siguiente', generated: 'Generado',
195
195
  whenDone: 'Cuando esté hecho', whatPossible: 'Qué se podrá hacer', bites: 'Bites', touches: 'Features y User Tasks que toca',
196
196
  optionsN: (n) => `Opciones (${n})`, showOpts: 'mostrar agrupadas por User Task', noTrace: 'Sin traza',
197
- detail: (n) => `Ver el detalle completo del incremento${n ? ` · ${n} escenarios` : ''} (reglas, Gherkin, fixtures)`,
197
+ detail: (n) => `Ver el detalle completo del slice${n ? ` · ${n} escenarios` : ''} (reglas, Gherkin, fixtures)`,
198
198
  pending: 'Pendiente — no está en el código', unknowns: 'Incógnitas', planN: (p) => `plan ${p}`, scenariosN: (n) => `${n} escenarios`, tasksN: (n) => `${n} user tasks`,
199
- looseNote: (n) => `Este incremento no tiene bites: ${n} opciones sueltas. Todo Inc debería componerse de bites.`,
199
+ looseNote: (n) => `Este slice no tiene bites: ${n} opciones sueltas. Todo Slice debería componerse de bites.`,
200
200
  source: 'Fuente', readOnly: 'página generada, solo lectura',
201
201
  value: 'Valor', check: 'Cómo se comprueba', dependsOn: 'Depende de', userTasks: 'User Tasks', biteOptions: (n) => `Opciones del bite (${n})`,
202
- notTaken: 'sin tomar', covered: 'Dónde se cubre', thSlice: 'Slice', thIncs: 'Incrementos', thBites: 'Bites', thOpts: 'Opciones en Incs',
203
- featureTasks: 'User Tasks', incsTouch: 'Incrementos que la tocan', systemTasks: 'System Tasks', noSlice: 'Ningún slice ha cortado esta feature todavía.',
202
+ notTaken: 'sin tomar', covered: 'Dónde se cubre', thAppetite: 'Apetito', thSlices: 'Slices', thBites: 'Bites', thOpts: 'Opciones en Slices',
203
+ featureTasks: 'User Tasks', slicesTouch: 'Slices que la tocan', systemTasks: 'System Tasks', noAppetite: 'Ningún apetito ha cortado esta feature todavía.',
204
204
  notFound: 'No encontrado', foldTip: (o) => `clic para ${o ? 'plegar' : 'desplegar'}`, tasksN2: (n) => `${n} UT`, plusUT: (n) => `+${n} UT`,
205
- touchesN: (n) => ` (toca ${n} User Tasks)`, loose: (n) => `${n} opciones sueltas`, looseTip: (t, n, i) => `${t} — ${n} opciones del Inc ${i} sin agrupar en bites`,
205
+ touchesN: (n) => ` (toca ${n} User Tasks)`, loose: (n) => `${n} opciones sueltas`, looseTip: (t, n, i) => `${t} — ${n} opciones del Slice ${i} sin agrupar en bites`,
206
206
  clickDrag: 'clic o arrastra', untakenN: (n) => `${n} sin tomar`, desc: 'descripción',
207
207
  whyOrder: 'Por qué este orden'
208
208
  }
@@ -215,9 +215,9 @@ const FEATCOL = ['#fbe3e8', '#fdeccb', '#dcecf7', '#dff1e6', '#e8e2f8', '#fbe4d8
215
215
  const prLabel = { skeleton: 'skel', 'must-have': t('must'), 'nice-to-have': t('nice'), deferred: t('def') };
216
216
  const taskById = {}, featOfTask = {}, featByCode = {};
217
217
  D.features.forEach((f) => { featByCode[f.code] = f; f.tasks.forEach((x) => { taskById[x.id] = x; featOfTask[x.id] = f; }); });
218
- const sliceByNn = {}, biteByKey = {}, incByKey = {};
219
- D.slices.forEach((s) => { sliceByNn[s.nn] = s; s.bites.forEach((b) => (biteByKey[b.key] = b)); s.incs.forEach((i) => { i.slice = s.nn; incByKey[i.key] = i; }); });
220
- D.slices.forEach((s) => s.bites.forEach((b) => { b.slice = s.nn; const n = b.taken || b.proposedInc; b.stateInc = n ? incByKey[`${s.nn}-${n}`] || null : null; }));
218
+ const appetiteByNn = {}, biteByKey = {}, sliceByKey = {};
219
+ D.appetites.forEach((s) => { appetiteByNn[s.nn] = s; s.bites.forEach((b) => (biteByKey[b.key] = b)); s.slices.forEach((i) => { i.appetite = s.nn; sliceByKey[i.key] = i; }); });
220
+ D.appetites.forEach((s) => s.bites.forEach((b) => { b.appetite = s.nn; const n = b.taken || b.proposedSlice; b.stateSlice = n ? sliceByKey[`${s.nn}-${n}`] || null : null; }));
221
221
 
222
222
  const ui = { minimap: true, zoom: 2, lz: 2, hidePruned: false, collapsed: new Set(), hideEmpty: false, state: null, prio: null, closed: new Set() };
223
223
  try {
@@ -227,11 +227,11 @@ const save = () => { try { sessionStorage.setItem('mapui', JSON.stringify({ zoom
227
227
 
228
228
  // done | building | planned (specified too) | proposed | back (untaken)
229
229
  const cardState = (b) => {
230
- const i = b.stateInc;
230
+ const i = b.stateSlice;
231
231
  if (!i) return 'back';
232
232
  return i.state === 'specified' ? 'planned' : i.state;
233
233
  };
234
- const incClass = (i) => (i.state === 'specified' ? 'planned' : i.state);
234
+ const sliceClass = (i) => (i.state === 'specified' ? 'planned' : i.state);
235
235
  const pad2 = (n) => String(n).padStart(2, '0');
236
236
 
237
237
  /* ---------- map ---------- */
@@ -243,25 +243,25 @@ function columns() {
243
243
  });
244
244
  return cols;
245
245
  }
246
- function cardsOf(slice) {
246
+ function cardsOf(appetite) {
247
247
  const out = [];
248
- slice.incs.forEach((inc) => {
249
- const bs = inc.bites.map((k) => biteByKey[k]).filter(Boolean);
250
- if (bs.length) bs.forEach((b) => out.push({ band: inc.key, task: b.anchor, bite: b }));
251
- else if (!inc.proposed) {
248
+ appetite.slices.forEach((slice) => {
249
+ const bs = slice.bites.map((k) => biteByKey[k]).filter(Boolean);
250
+ if (bs.length) bs.forEach((b) => out.push({ band: slice.key, task: b.anchor, bite: b }));
251
+ else if (!slice.proposed) {
252
252
  const cnt = {};
253
- inc.options.forEach((o) => { if (o.task) cnt[o.task] = (cnt[o.task] || 0) + 1; });
254
- if (!Object.keys(cnt).length) inc.tasks.forEach((tk) => { cnt[tk] = 0; }); // only **[User Task]** tags (oldest slices)
255
- Object.entries(cnt).forEach(([task, n]) => out.push({ band: inc.key, task, loose: { inc, n } }));
253
+ slice.options.forEach((o) => { if (o.task) cnt[o.task] = (cnt[o.task] || 0) + 1; });
254
+ if (!Object.keys(cnt).length) slice.tasks.forEach((tk) => { cnt[tk] = 0; }); // only **[User Task]** tags (oldest appetites)
255
+ Object.entries(cnt).forEach(([task, n]) => out.push({ band: slice.key, task, loose: { slice, n } }));
256
256
  }
257
257
  });
258
258
  const prio = { skeleton: 0, 'must-have': 0, 'nice-to-have': 1, deferred: 2 };
259
- slice.bites.filter((b) => !b.stateInc).sort((a, b) => prio[a.priority] - prio[b.priority]).forEach((b) => out.push({ band: 'backlog', task: b.anchor, bite: b }));
259
+ appetite.bites.filter((b) => !b.stateSlice).sort((a, b) => prio[a.priority] - prio[b.priority]).forEach((b) => out.push({ band: 'backlog', task: b.anchor, bite: b }));
260
260
  return out;
261
261
  }
262
262
  function renderMap() {
263
263
  const cols0 = columns();
264
- const all = D.slices.flatMap((s) => cardsOf(s));
264
+ const all = D.appetites.flatMap((s) => cardsOf(s));
265
265
  const used = new Set(all.map((c) => (ui.collapsed.has(featOfTask[c.task]?.code) ? featOfTask[c.task].code : c.task)));
266
266
  const cols = ui.hideEmpty ? cols0.filter((c) => used.has(c.t ? c.t.id : c.f.code)) : cols0;
267
267
  const colIdx = (task) => { const f = featOfTask[task]; return cols.findIndex((c) => (c.t ? c.t.id === task : c.f.code === f.code)); };
@@ -282,13 +282,13 @@ function renderMap() {
282
282
  });
283
283
  h += `</div></div>`;
284
284
 
285
- D.slices.forEach((s) => {
285
+ D.appetites.forEach((s) => {
286
286
  const closed = ui.closed.has(s.nn);
287
- const real = s.incs.filter((i) => !i.proposed);
288
- h += `<div class="slice-h" data-s="${s.nn}">${closed ? '▸' : '▾'} ${t('slice')} ${pad2(s.nn)} · ${esc(s.name.replace(/-/g, ' '))} <span class="pill p-${s.status}">${t(s.status)}</span><span class="muted" style="font-weight:400;font-size:12px">${t('incsDone', real.filter((i) => i.state === 'done').length, real.length)} · ${t('bitesTotal', s.bites.length)}</span></div>`;
287
+ const real = s.slices.filter((i) => !i.proposed);
288
+ h += `<div class="appetite-h" data-s="${s.nn}">${closed ? '▸' : '▾'} ${t('appetite')} ${pad2(s.nn)} · ${esc(s.name.replace(/-/g, ' '))} <span class="pill p-${s.status}">${t(s.status)}</span><span class="muted" style="font-weight:400;font-size:12px">${t('slicesDone', real.filter((i) => i.state === 'done').length, real.length)} · ${t('bitesTotal', s.bites.length)}</span></div>`;
289
289
  if (closed) return;
290
290
  const cards = cardsOf(s);
291
- const bands = [...s.incs.map((i) => ({ key: i.key, inc: i })), { key: 'backlog', backlog: true }];
291
+ const bands = [...s.slices.map((i) => ({ key: i.key, slice: i })), { key: 'backlog', backlog: true }];
292
292
  bands.forEach((bd) => {
293
293
  const mine = cards.filter((c) => c.band === bd.key).map((c) => ({ ...c, ci: colIdx(c.task) })).filter((c) => c.ci >= 0).sort((a, b) => a.ci - b.ci);
294
294
  const stack = {};
@@ -297,13 +297,13 @@ function renderMap() {
297
297
  let lab, cls;
298
298
  if (bd.backlog) {
299
299
  cls = 'back';
300
- const n = s.bites.filter((b) => !b.stateInc).length;
300
+ const n = s.bites.filter((b) => !b.stateSlice).length;
301
301
  lab = `<div class="lab" style="grid-column:1;grid-row:1 / span ${k}"><b>${t('backlog')}</b><div class="t">${t('backlogSub')}</div><div class="m">${t('bitesN', n)}</div></div>`;
302
302
  } else {
303
- const i = bd.inc;
304
- cls = incClass(i);
303
+ const i = bd.slice;
304
+ cls = sliceClass(i);
305
305
  const prog = i.progress && i.state !== 'done' ? `<div class="bar"><i style="width:${(+i.progress.split('/')[0] / +i.progress.split('/')[1]) * 100}%"></i></div>` : '';
306
- lab = `<a class="lab" title="${esc(i.outcome)}" href="#/inc/${i.key}" style="grid-column:1;grid-row:1 / span ${k}"><b>Inc ${i.n} <span class="pill p-${i.state}">${t(i.state)}</span></b><div class="t">${esc(i.name)}</div><div class="m">${i.bites.length ? t('bitesN', i.bites.length) : t('noBites')}${i.scenarios ? ' · ' + t('scN', i.scenarios) : ''}</div>${prog}</a>`;
306
+ lab = `<a class="lab" title="${esc(i.outcome)}" href="#/slice/${i.key}" style="grid-column:1;grid-row:1 / span ${k}"><b>Slice ${i.n} <span class="pill p-${i.state}">${t(i.state)}</span></b><div class="t">${esc(i.name)}</div><div class="m">${i.bites.length ? t('bitesN', i.bites.length) : t('noBites')}${i.scenarios ? ' · ' + t('scN', i.scenarios) : ''}</div>${prog}</a>`;
307
307
  }
308
308
  h += `<div class="band st-${cls}">${lab}`;
309
309
  mine.forEach((c) => { h += card(c, c.ci + 2, c.r); });
@@ -314,7 +314,7 @@ function renderMap() {
314
314
  $('#app').innerHTML = h;
315
315
  buildMinimap();
316
316
  $('#app').querySelectorAll('.fh').forEach((e) => e.addEventListener('click', () => { const c = e.dataset.f; ui.collapsed.has(c) ? ui.collapsed.delete(c) : ui.collapsed.add(c); save(); renderMap(); }));
317
- $('#app').querySelectorAll('.slice-h').forEach((e) => e.addEventListener('click', () => { const n = +e.dataset.s; ui.closed.has(n) ? ui.closed.delete(n) : ui.closed.add(n); renderMap(); }));
317
+ $('#app').querySelectorAll('.appetite-h').forEach((e) => e.addEventListener('click', () => { const n = +e.dataset.s; ui.closed.has(n) ? ui.closed.delete(n) : ui.closed.add(n); renderMap(); }));
318
318
  }
319
319
  function buildMinimap() {
320
320
  const sc = $('#app .scroll'), map = $('#app .map');
@@ -326,7 +326,7 @@ function buildMinimap() {
326
326
  const col = { done: '#59a96f', building: '#e0a21b', proposed: '#6e93e0', planned: '#6e93e0', back: '#b5bcc8', loose: '#8b93a1' };
327
327
  let h = '';
328
328
  map.querySelectorAll('.fh').forEach((e) => { const r = e.getBoundingClientRect(); h += `<i style="left:${(r.left - mr.left) * k}px;top:0;width:${r.width * k}px;height:${Math.max(3, 14 * k)}px;background:${e.style.background}"></i>`; });
329
- map.querySelectorAll('.slice-h').forEach((e) => { const r = e.getBoundingClientRect(); h += `<i style="left:0;top:${(r.top - mr.top) * k}px;width:${mw}px;height:1px;background:#8b93a1"></i>`; });
329
+ map.querySelectorAll('.appetite-h').forEach((e) => { const r = e.getBoundingClientRect(); h += `<i style="left:0;top:${(r.top - mr.top) * k}px;width:${mw}px;height:1px;background:#8b93a1"></i>`; });
330
330
  map.querySelectorAll('.card').forEach((e) => {
331
331
  const r = e.getBoundingClientRect();
332
332
  const m = e.className.match(/c-(\w+)/);
@@ -355,7 +355,7 @@ function dimmed(b) {
355
355
  function card(c, col, row) {
356
356
  const pos = `style="grid-column:${col};grid-row:${row}"`;
357
357
  if (c.loose) {
358
- return `<a class="card c-loose" href="#/inc/${c.loose.inc.key}" ${pos} title="${esc(t('looseTip', taskById[c.task].name, c.loose.n, c.loose.inc.n))}"><span class="id">Inc ${c.loose.inc.n}</span><span class="ti">${c.loose.n ? t('loose', c.loose.n) : esc(c.loose.inc.name)}</span></a>`;
358
+ return `<a class="card c-loose" href="#/slice/${c.loose.slice.key}" ${pos} title="${esc(t('looseTip', taskById[c.task].name, c.loose.n, c.loose.slice.n))}"><span class="id">Slice ${c.loose.slice.n}</span><span class="ti">${c.loose.n ? t('loose', c.loose.n) : esc(c.loose.slice.name)}</span></a>`;
359
359
  }
360
360
  const b = c.bite;
361
361
  return `<a class="card c-${cardState(b)}${b.priority === 'deferred' ? ' deferred' : ''}${dimmed(b) ? ' dim' : ''}" href="#/bite/${b.key}" ${pos} title="${esc(b.id + ' · ' + b.title)}${b.others.length ? esc(t('touchesN', b.others.length + 1)) : ''}">`
@@ -364,9 +364,9 @@ function card(c, col, row) {
364
364
 
365
365
  /* ---------- top bar ---------- */
366
366
  function renderTop(isMap) {
367
- const bites = D.slices.flatMap((s) => s.bites);
368
- const incs = D.slices.flatMap((s) => s.incs).filter((i) => !i.proposed);
369
- let h = `<h1><a href="#/">${esc(D.initiative)}</a></h1><span class="sum">${t('summary', D.features.length, D.features.reduce((a, f) => a + f.tasks.length, 0), incs.filter((i) => i.state === 'done').length, incs.length, bites.filter((b) => !b.taken).length)} · ${t('generated')} ${esc(D.date)}</span>`;
367
+ const bites = D.appetites.flatMap((s) => s.bites);
368
+ const slices = D.appetites.flatMap((s) => s.slices).filter((i) => !i.proposed);
369
+ let h = `<h1><a href="#/">${esc(D.initiative)}</a></h1><span class="sum">${t('summary', D.features.length, D.features.reduce((a, f) => a + f.tasks.length, 0), slices.filter((i) => i.state === 'done').length, slices.length, bites.filter((b) => !b.taken).length)} · ${t('generated')} ${esc(D.date)}</span>`;
370
370
  if (D.next) h += `<span class="sum" title="${esc(D.next.link)}">▶ ${t('next')}: ${esc(D.next.text)}</span>`;
371
371
  if (isMap) {
372
372
  h += `<span class="tool">${t('zoom')} <button data-z="-1">−</button><b>${['', 'L', 'M', 'S', 'XS'][ui.zoom]}</b><button data-z="1">+</button></span>`;
@@ -388,7 +388,7 @@ function renderTop(isMap) {
388
388
  const chipUT = (id) => `<a class="chip" href="#/ut/${id}">${esc(taskById[id].name)}</a>`;
389
389
  const chipF = (code) => `<a class="chip" href="#/feature/${code}"><b>${code}</b> ${esc(featByCode[code].name)}</a>`;
390
390
  const miniCard = (b) => `<a class="card c-${cardState(b)}" href="#/bite/${b.key}"><span class="id">${b.id}<span class="pr pr-${b.priority}">${prLabel[b.priority]}</span></span><span class="ti">${esc(b.title)}</span></a>`;
391
- const incChip = (i) => `<a class="chip" href="#/inc/${i.key}">${t('slice')} ${pad2(i.slice)} · Inc ${i.n} <span class="pill p-${i.state}">${t(i.state)}</span></a>`;
391
+ const sliceChip = (i) => `<a class="chip" href="#/slice/${i.key}">${t('appetite')} ${pad2(i.appetite)} · Slice ${i.n} <span class="pill p-${i.state}">${t(i.state)}</span></a>`;
392
392
  const groupOpts = (opts) => {
393
393
  const g = new Map();
394
394
  opts.forEach((o) => { const k = o.task || '—'; if (!g.has(k)) g.set(k, []); g.get(k).push(o); });
@@ -396,16 +396,16 @@ const groupOpts = (opts) => {
396
396
  };
397
397
  const crumbs = (...parts) => `<div class="crumbs"><a href="#/">${t('map')}</a> › ${parts.join(' › ')}</div>`;
398
398
  const src = (s, extra) => `<div class="src">${t('source')}: <code>${esc(s)}</code>${extra ? ' · ' + extra : ''} · ${t('readOnly')}</div>`;
399
- const sliceLabel = (s) => `${t('slice')} ${pad2(s.nn)} · ${esc(s.name.replace(/-/g, ' '))}`;
399
+ const appetiteLabel = (s) => `${t('appetite')} ${pad2(s.nn)} · ${esc(s.name.replace(/-/g, ' '))}`;
400
400
 
401
- function viewInc(key) {
402
- const i = incByKey[key]; if (!i) return notFound();
403
- const s = sliceByNn[i.slice];
401
+ function viewSlice(key) {
402
+ const i = sliceByKey[key]; if (!i) return notFound();
403
+ const s = appetiteByNn[i.appetite];
404
404
  const bs = i.bites.map((k) => biteByKey[k]).filter(Boolean);
405
405
  const tasks = [...new Set([...i.tasks, ...bs.flatMap((b) => [b.anchor, ...b.others]).filter(Boolean)])];
406
406
  const feats = [...new Set(tasks.map((x) => featOfTask[x].code))];
407
- $('#app').innerHTML = `<div class="page">${crumbs(sliceLabel(s), `Inc ${i.n}`)}
408
- <h1>Inc ${i.n} — ${esc(i.name)}</h1>
407
+ $('#app').innerHTML = `<div class="page">${crumbs(appetiteLabel(s), `Slice ${i.n}`)}
408
+ <h1>Slice ${i.n} — ${esc(i.name)}</h1>
409
409
  <div class="chips"><span class="pill p-${i.state}">${t(i.state)}</span>${i.progress ? `<span class="chip">${t('planN', i.progress)}</span>` : ''}${i.scenarios ? `<span class="chip">${t('scenariosN', i.scenarios)}</span>` : ''}<span class="chip">${t('bitesN', bs.length)}</span><span class="chip">${t('tasksN', tasks.length)}</span></div>
410
410
  <div class="outcome"><div class="ol">${t('whenDone')}</div><p>${esc(i.outcome)}</p>${bs.length ? `<div class="ol" style="margin-top:10px">${t('whatPossible')}</div><ul>${bs.map((b) => `<li><a href="#/bite/${b.key}"><code>${b.id}</code> ${esc(b.title)}</a></li>`).join('')}</ul>` : ''}</div>
411
411
  ${i.pending.length ? `<div class="banner"><b>${t('pending')}</b><ul>${i.pending.map((p) => `<li>${esc(p)}</li>`).join('')}</ul></div>` : ''}
@@ -422,23 +422,23 @@ Object.assign(I.en, {
422
422
  stepsN: (n) => `${n} ${n === 1 ? 'step' : 'steps'}`, target: 'step target',
423
423
  layersSum: (m, o, p) => `${m} options in this bite · ${o} in other bites · ${p} pruned`,
424
424
  utSum: (l, p) => `${l} live options · ${p} pruned`, utHint: 'Every option of each step, coloured by the bite that takes it. This is where bites will be chosen.',
425
- top: 'What the user gets', bottom: 'How it is checked', skelCheck: 'The skeleton is checked with the acceptance criteria of its increment.', untakenTag: 'untaken'
425
+ top: 'What the user gets', bottom: 'How it is checked', skelCheck: 'The skeleton is checked with the acceptance criteria of its slice.', untakenTag: 'untaken'
426
426
  });
427
427
  Object.assign(I.es, {
428
428
  layersTitle: 'Capas', utLayersTitle: 'Todas las opciones de cada step', thisBite: 'este bite', pruned: 'podada', hidePruned: 'Ocultar podadas',
429
429
  stepsN: (n) => `${n} ${n === 1 ? 'step' : 'steps'}`, target: 'meta del step',
430
430
  layersSum: (m, o, p) => `${m} opciones en este bite · ${o} en otros bites · ${p} podadas`,
431
431
  utSum: (l, p) => `${l} opciones vivas · ${p} podadas`, utHint: 'Todas las opciones de cada step, coloreadas por el bite que las toma. Aquí se elegirán los bites.',
432
- top: 'Qué consigue el usuario', bottom: 'Cómo se comprueba', skelCheck: 'El esqueleto se comprueba con los criterios de aceptación de su incremento.', untakenTag: 'sin tomar'
432
+ top: 'Qué consigue el usuario', bottom: 'Cómo se comprueba', skelCheck: 'El esqueleto se comprueba con los criterios de aceptación de su slice.', untakenTag: 'sin tomar'
433
433
  });
434
434
  const KIND = { Logic: 'kd-logic', UI: 'kd-ui', Integration: 'kd-int', Data: 'kd-data' };
435
435
  const LZ = ['', 'L', 'M', 'S', 'XS'];
436
- const biteOfOpt = {}, incOfOpt = {};
437
- D.slices.forEach((s) => {
436
+ const biteOfOpt = {}, sliceOfOpt = {};
437
+ D.appetites.forEach((s) => {
438
438
  const m = (biteOfOpt[s.nn] = {}); s.bites.forEach((b) => b.options.forEach((o) => { m[o.id] = b; }));
439
- const l = (incOfOpt[s.nn] = {}); s.incs.filter((i) => !i.proposed).forEach((i) => i.options.forEach((o) => { if (!m[o.id]) l[o.id] = i; })); // older slices: an Inc lists loose options, no bites
439
+ const l = (sliceOfOpt[s.nn] = {}); s.slices.filter((i) => !i.proposed).forEach((i) => i.options.forEach((o) => { if (!m[o.id]) l[o.id] = i; })); // older appetites: an Slice lists loose options, no bites
440
440
  });
441
- const incTag = (b) => (b.stateInc ? `Inc ${b.stateInc.n}` : t('untakenTag'));
441
+ const sliceTag = (b) => (b.stateSlice ? `Slice ${b.stateSlice.n}` : t('untakenTag'));
442
442
  const stepKeyOf = (id) => id.replace(/^(F\d+-\d+)\..*$/, '$1');
443
443
 
444
444
  function optCard(o, owner, mine, loose) {
@@ -447,22 +447,22 @@ function optCard(o, owner, mine, loose) {
447
447
  }
448
448
  const b = owner[o.id];
449
449
  if (!b) {
450
- const inc = loose[o.id];
450
+ const slice = loose[o.id];
451
451
  const body = `<span class="id">${o.id}${o.target ? `<span class="tg" title="${t('target')}">◎</span>` : ''}</span><span class="ti">${esc(o.name)}</span>${o.desc ? `<span class="de">${esc(o.desc)}</span>` : ''}${o.strategy ? `<span class="cx">${esc(o.strategy)}</span>` : ''}`;
452
- return inc
453
- ? `<a class="card opt other c-${incClass(inc)}" href="#/inc/${inc.key}">${body}<span class="bt"><u>Inc ${inc.n}</u></span></a>`
452
+ return slice
453
+ ? `<a class="card opt other c-${sliceClass(slice)}" href="#/slice/${slice.key}">${body}<span class="bt"><u>Slice ${slice.n}</u></span></a>`
454
454
  : `<div class="card opt c-back">${body}<span class="bt">${t('untakenTag')}</span></div>`;
455
455
  }
456
456
  const isMine = mine && b === mine;
457
457
  const inner = `<span class="id">${o.id}${o.target ? `<span class="tg" title="${t('target')}">◎</span>` : ''}${isMine ? '<span class="star">★</span>' : ''}</span>`
458
458
  + `<span class="ti">${esc(o.name)}</span>${o.desc ? `<span class="de">${esc(o.desc)}</span>` : ''}${o.strategy ? `<span class="cx">${esc(o.strategy)}</span>` : ''}`
459
- + (isMine ? '' : `<span class="bt"><u>${b.id}</u> · ${incTag(b)}</span>`);
459
+ + (isMine ? '' : `<span class="bt"><u>${b.id}</u> · ${sliceTag(b)}</span>`);
460
460
  return isMine
461
461
  ? `<div class="card opt mine c-${cardState(b)}">${inner}</div>`
462
462
  : `<a class="card opt other c-${cardState(b)}" href="#/bite/${b.key}" title="${esc(b.id + ' · ' + b.title)}">${inner}</a>`;
463
463
  }
464
- function layers(slice, steps, mine) {
465
- const owner = biteOfOpt[slice.nn], loose = incOfOpt[slice.nn];
464
+ function layers(appetite, steps, mine) {
465
+ const owner = biteOfOpt[appetite.nn], loose = sliceOfOpt[appetite.nn];
466
466
  const N = Math.max(1, ...steps.map((s) => s.options.length));
467
467
  let h = `<div class="layers lz${ui.lz}${ui.hidePruned ? ' hide-pruned' : ''}" style="--n:${N}">`;
468
468
  let last = null;
@@ -494,16 +494,16 @@ const countOpts = (steps, owner, mine) => {
494
494
 
495
495
  function viewBite(key) {
496
496
  const b = biteByKey[key]; if (!b) return notFound();
497
- const s = sliceByNn[b.slice];
497
+ const s = appetiteByNn[b.appetite];
498
498
  const keys = new Set(b.options.map((o) => stepKeyOf(o.id)));
499
499
  const steps = (s.trace || []).filter((x) => keys.has(`${x.f}-${x.n}`));
500
- if (!steps.length) return viewBiteFlat(key); // slices cut before the steps were written down: the plain list
500
+ if (!steps.length) return viewBiteFlat(key); // appetites cut before the steps were written down: the plain list
501
501
  const tasks = [b.anchor, ...b.others].filter(Boolean);
502
502
  const [m, o, p] = countOpts(steps, biteOfOpt[s.nn], b);
503
- $('#app').innerHTML = `<div class="page wide">${crumbs(sliceLabel(s), `Bite ${b.id}`)}
503
+ $('#app').innerHTML = `<div class="page wide">${crumbs(appetiteLabel(s), `Bite ${b.id}`)}
504
504
  <h1>${b.id} · ${esc(b.title)}</h1>
505
505
  <div class="chips"><span class="chip pr-${b.priority}" style="${b.priority === 'must-have' ? 'background:var(--ink);color:#fff' : ''}">${esc(b.priority === 'deferred' && b.reason ? `deferred: ${b.reason}` : b.priority)}</span>
506
- ${b.stateInc ? incChip(b.stateInc) : `<span class="pill p-open">${t('notTaken')}</span>`}${chipF(b.feature)}<span class="chip">${t('stepsN', steps.length)}</span></div>
506
+ ${b.stateSlice ? sliceChip(b.stateSlice) : `<span class="pill p-open">${t('notTaken')}</span>`}${chipF(b.feature)}<span class="chip">${t('stepsN', steps.length)}</span></div>
507
507
  ${layerBar(true)}
508
508
  <div class="bocata-wrap"><div class="bocata">
509
509
  <div class="bread top"><div class="in">${b.value ? `<div class="ol">${t('top')}</div><p>${esc(b.value)}</p>` : ''}
@@ -518,12 +518,12 @@ function viewBite(key) {
518
518
  }
519
519
  function utLayers(id) {
520
520
  let live = 0, pruned = 0;
521
- const parts = D.slices.map((s) => {
521
+ const parts = D.appetites.map((s) => {
522
522
  const steps = (s.trace || []).filter((x) => x.task === id);
523
523
  if (!steps.length) return '';
524
524
  const [m, o, p] = countOpts(steps, biteOfOpt[s.nn], null);
525
525
  live += m + o; pruned += p;
526
- return `${D.slices.length > 1 ? `<p class="muted" style="margin:14px 0 0">${sliceLabel(s)}</p>` : ''}<div class="bocata-wrap"><div class="bocata">${layers(s, steps, null)}</div></div>`;
526
+ return `${D.appetites.length > 1 ? `<p class="muted" style="margin:14px 0 0">${appetiteLabel(s)}</p>` : ''}<div class="bocata-wrap"><div class="bocata">${layers(s, steps, null)}</div></div>`;
527
527
  }).join('');
528
528
  if (!parts) return '';
529
529
  return `<h2>${t('utLayersTitle')}</h2><p class="muted" style="margin:0">${t('utHint')}</p>${layerBar(false)}${parts}<div class="sumline">${t('utSum', live, pruned)}</div>`;
@@ -531,12 +531,12 @@ function utLayers(id) {
531
531
 
532
532
  function viewBiteFlat(key) {
533
533
  const b = biteByKey[key]; if (!b) return notFound();
534
- const s = sliceByNn[b.slice];
534
+ const s = appetiteByNn[b.appetite];
535
535
  const tasks = [b.anchor, ...b.others].filter(Boolean);
536
- $('#app').innerHTML = `<div class="page">${crumbs(sliceLabel(s), `Bite ${b.id}`)}
536
+ $('#app').innerHTML = `<div class="page">${crumbs(appetiteLabel(s), `Bite ${b.id}`)}
537
537
  <h1>${b.id} · ${esc(b.title)}</h1>
538
538
  <div class="chips"><span class="chip pr-${b.priority}" style="${b.priority === 'must-have' ? 'background:var(--ink);color:#fff' : ''}">${esc(b.priority === 'deferred' && b.reason ? `deferred: ${b.reason}` : b.priority)}</span>
539
- ${b.stateInc ? incChip(b.stateInc) : `<span class="pill p-open">${t('notTaken')}</span>`}${chipF(b.feature)}</div>
539
+ ${b.stateSlice ? sliceChip(b.stateSlice) : `<span class="pill p-open">${t('notTaken')}</span>`}${chipF(b.feature)}</div>
540
540
  <dl class="kv">${b.value ? `<dt>${t('value')}</dt><dd>${esc(b.value)}</dd>` : ''}${b.check ? `<dt>${t('check')}</dt><dd>${esc(b.check)}</dd>` : ''}${b.dependsOn ? `<dt>${t('dependsOn')}</dt><dd>${esc(b.dependsOn)}</dd>` : ''}<dt>${t('userTasks')}</dt><dd class="chips" style="margin:0">${tasks.map(chipUT).join('')}</dd></dl>
541
541
  ${b.options.length ? `<h2>${t('biteOptions', b.options.length)}</h2><div class="opts">${groupOpts(b.options)}</div>` : ''}
542
542
  ${src(b.source)}</div>`;
@@ -544,31 +544,31 @@ function viewBiteFlat(key) {
544
544
  function viewUT(id) {
545
545
  const x = taskById[id]; if (!x) return notFound();
546
546
  const f = featOfTask[id];
547
- const rows = D.slices.map((s) => {
547
+ const rows = D.appetites.map((s) => {
548
548
  const bs = s.bites.filter((b) => b.anchor === id || b.others.includes(id));
549
- const incs = s.incs.filter((i) => i.tasks.includes(id) || i.bites.some((k) => { const b = biteByKey[k]; return b && (b.anchor === id || b.others.includes(id)); }));
550
- const opts = s.incs.reduce((a, i) => a + i.options.filter((o) => o.task === id).length, 0);
551
- return { s, bs, incs, opts };
549
+ const slices = s.slices.filter((i) => i.tasks.includes(id) || i.bites.some((k) => { const b = biteByKey[k]; return b && (b.anchor === id || b.others.includes(id)); }));
550
+ const opts = s.slices.reduce((a, i) => a + i.options.filter((o) => o.task === id).length, 0);
551
+ return { s, bs, slices, opts };
552
552
  });
553
553
  $('#app').innerHTML = `<div class="page wide">${crumbs(`<a href="#/feature/${f.code}">${f.code} ${esc(f.name)}</a>`, 'User Task')}
554
554
  <h1>${esc(x.name)}</h1><div class="chips">${chipF(f.code)}</div>
555
555
  ${x.desc ? `<p>${esc(x.desc)}</p>` : ''}
556
556
  <h2>${t('covered')}</h2>
557
- <table class="tbl"><tr><th>${t('thSlice')}</th><th>${t('thIncs')}</th><th>${t('thBites')}</th><th>${t('thOpts')}</th></tr>
558
- ${rows.map((r) => `<tr><td>${t('slice')} ${pad2(r.s.nn)}</td><td class="chips">${r.incs.map(incChip).join('') || '<span class="muted">—</span>'}</td><td>${r.bs.length ? `<div class="grid" style="grid-template-columns:repeat(auto-fill,minmax(190px,1fr))">${r.bs.map(miniCard).join('')}</div>` : '<span class="muted">—</span>'}</td><td>${r.opts || '—'}</td></tr>`).join('')}</table>
557
+ <table class="tbl"><tr><th>${t('thAppetite')}</th><th>${t('thSlices')}</th><th>${t('thBites')}</th><th>${t('thOpts')}</th></tr>
558
+ ${rows.map((r) => `<tr><td>${t('appetite')} ${pad2(r.s.nn)}</td><td class="chips">${r.slices.map(sliceChip).join('') || '<span class="muted">—</span>'}</td><td>${r.bs.length ? `<div class="grid" style="grid-template-columns:repeat(auto-fill,minmax(190px,1fr))">${r.bs.map(miniCard).join('')}</div>` : '<span class="muted">—</span>'}</td><td>${r.opts || '—'}</td></tr>`).join('')}</table>
559
559
  ${utLayers(id)}
560
560
  ${src('features.md', t('desc'))}</div>`;
561
561
  }
562
562
  function viewFeature(code) {
563
563
  const f = featByCode[code]; if (!f) return notFound();
564
- const bs = D.slices.flatMap((s) => s.bites).filter((b) => b.feature === code);
565
- const incs = D.slices.flatMap((s) => s.incs).filter((i) => i.bites.some((k) => biteByKey[k]?.feature === code) || i.tasks.some((x) => featOfTask[x].code === code));
564
+ const bs = D.appetites.flatMap((s) => s.bites).filter((b) => b.feature === code);
565
+ const slices = D.appetites.flatMap((s) => s.slices).filter((i) => i.bites.some((k) => biteByKey[k]?.feature === code) || i.tasks.some((x) => featOfTask[x].code === code));
566
566
  $('#app').innerHTML = `<div class="page">${crumbs('Feature')}
567
- <h1>${code} · ${esc(f.name)}</h1><div class="chips"><span class="chip">${t('tasksN', f.tasks.length)}</span><span class="chip">${t('bitesN', bs.length)}</span><span class="chip">${t('untakenN', bs.filter((b) => !b.stateInc).length)}</span></div>
567
+ <h1>${code} · ${esc(f.name)}</h1><div class="chips"><span class="chip">${t('tasksN', f.tasks.length)}</span><span class="chip">${t('bitesN', bs.length)}</span><span class="chip">${t('untakenN', bs.filter((b) => !b.stateSlice).length)}</span></div>
568
568
  <h2>${t('featureTasks')}</h2><table class="tbl">${f.tasks.map((x) => { const n = bs.filter((b) => b.anchor === x.id || b.others.includes(x.id)).length; return `<tr><td><a class="chip" href="#/ut/${x.id}">${esc(x.name)}</a></td><td class="muted">${esc(x.desc)}</td><td>${n ? t('bitesN', n) : '—'}</td></tr>`; }).join('')}</table>
569
569
  ${f.systemTasks.length ? `<h2>${t('systemTasks')}</h2><ul>${f.systemTasks.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>` : ''}
570
- <h2>${t('incsTouch')}</h2><div class="chips">${incs.map(incChip).join('') || '<span class="muted">—</span>'}</div>
571
- <h2>${t('bites')}</h2>${D.slices.map((s) => { const x = bs.filter((b) => b.slice === s.nn); return x.length ? `<p class="muted" style="margin:10px 0 2px">${sliceLabel(s)}</p><div class="grid">${x.map(miniCard).join('')}</div>` : ''; }).join('') || `<p class="muted">${t('noSlice')}</p>`}
570
+ <h2>${t('slicesTouch')}</h2><div class="chips">${slices.map(sliceChip).join('') || '<span class="muted">—</span>'}</div>
571
+ <h2>${t('bites')}</h2>${D.appetites.map((s) => { const x = bs.filter((b) => b.appetite === s.nn); return x.length ? `<p class="muted" style="margin:10px 0 2px">${appetiteLabel(s)}</p><div class="grid">${x.map(miniCard).join('')}</div>` : ''; }).join('') || `<p class="muted">${t('noAppetite')}</p>`}
572
572
  ${src('features.md')}</div>`;
573
573
  }
574
574
  const notFound = () => { $('#app').innerHTML = `<div class="page"><h1>${t('notFound')}</h1><a class="chip" href="#/">${t('mapBack')}</a></div>`; };
@@ -581,7 +581,7 @@ function route() {
581
581
  const old = $('.mm'); if (old) old.remove();
582
582
  if (!kind) { renderMap(); return; }
583
583
  $('#app').scrollTop = 0;
584
- ({ inc: viewInc, bite: viewBite, ut: viewUT, feature: viewFeature }[kind] || notFound)(arg);
584
+ ({ slice: viewSlice, bite: viewBite, ut: viewUT, feature: viewFeature }[kind] || notFound)(arg);
585
585
  }
586
586
  window.addEventListener('hashchange', route);
587
587
  route();