okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
3.6 KiB80 linesraw

07 · Skills

Route #/skills · File src/screens/Skills.tsx (121 lines — the smallest screen)

Reusable instruction sets the model can be given. Today it is a single list, which makes it the thinnest screen in the app and the one where "substance" is most obviously missing.

What it is today

  • Header with a count pill (3 enabled) and an "Add from folder" action.
  • A search field.
  • One listrow per skill — name, description, an enable toggle, and a source badge (workspace).
  • An empty state that distinguishes "no skills" from "no match".
  • A "How skills work" explainer card at the bottom.

Where it falls short

  1. A skill is a name and a sentence. Fixed. The disclosure existed but showed triggers — the words that activate a skill, not what it does. The host now sends the instruction text itself (bundled skills carry it; workspace skills read their own SKILL.md, which the description had always claimed was the source without ever reading it). Verified: 364 characters of real instruction render, and no skill lacks a body.
  2. Enabled/disabled is the only control. No ordering, no scoping to a workspace, no per-conversation activation.
  3. The list is flat and unsorted. No grouping by source, no indication of which fired recently.
  4. "Add from folder" is opaque. It gives no hint of the expected layout, file format, or where to put files.
  5. No feedback loop. Nothing shows whether a skill has ever been used, or which conversations it affected.
  6. The explainer card is a wall of prose at the bottom, below the fold on a short window, where it cannot help anyone who is confused at the top.
  7. The screen sits alone in the sidebar with no sibling, which makes the single flat row read as unfinished.

The plan

Substance — make a skill inspectable

  1. A detail view per skill. Done. Read instructions opens the instruction text, with the triggers kept beneath it as a secondary detail — they answer "when does this fire", which is a different question from "what does it do".
  2. Usage evidence. Done — see the shipped note above. The triggers were decorative until this was built: nothing consulted them at runtime.
  3. Scope control — enable per workspace, since a skill written for one project is noise in another.

Hierarchy

  1. Move the explainer to the top as a one-line subtitle, and put the detail in a disclosure for people who want it. Prose at the bottom cannot answer a question asked at the top.
  2. Group by source (Workspace / Built in) once there is more than one source; a single flat list will not scale.

Fluidity

  1. Toggling a skill shows the change immediately and reconciles quietly — the optimistic update is the interaction, and a spinner on a switch is a worse switch.
  2. Adding a skill animates the new row in with the standard entrance, so the result of "Add from folder" is visibly connected to the action.

Motion

InteractionSpec
ToggleKnob travel --st-t-control; no page movement — built
New skill addedst-enter, --st-t-local, 6 px
Detail expandgrid track 0fr → 1fr, --st-t-local
Search filteringRows fade, --st-t-control. No reflow animation

Verification

  • Assert each skill row can reveal its full instruction text.
  • Shipped as npm run flow skilluse: every skill renders a usage line, and the line is Not used yet rather than blank when it has never fired.
  • Assert the empty state distinguishes no skills from no match — already correct; keep it under test.
1# 07 · Skills
2
3**Route** `#/skills` · **File** `src/screens/Skills.tsx` (121 lines — the smallest screen)
4
5Reusable instruction sets the model can be given. Today it is a single list,
6which makes it the thinnest screen in the app and the one where "substance" is
7most obviously missing.
8
9## What it is today
10
11- **Header** with a count pill (`3 enabled`) and an "Add from folder" action.
12- **A search field.**
13- **One `listrow` per skill** — name, description, an enable toggle, and a source
14  badge (`workspace`).
15- **An empty state** that distinguishes "no skills" from "no match".
16- **A "How skills work" explainer card** at the bottom.
17
18## Where it falls short
19
201. ~~A skill is a name and a sentence.~~ **Fixed.** The disclosure existed but
21   showed *triggers* — the words that activate a skill, not what it does. The
22   host now sends the instruction text itself (bundled skills carry it;
23   workspace skills read their own `SKILL.md`, which the description had always
24   claimed was the source without ever reading it). Verified: 364 characters of
25   real instruction render, and **no skill lacks a body**.
262. **Enabled/disabled is the only control.** No ordering, no scoping to a
27   workspace, no per-conversation activation.
283. **The list is flat and unsorted.** No grouping by source, no indication of
29   which fired recently.
304. **"Add from folder" is opaque.** It gives no hint of the expected layout, file
31   format, or where to put files.
325. **No feedback loop.** Nothing shows whether a skill has ever been used, or
33   which conversations it affected.
346. **The explainer card is a wall of prose at the bottom**, below the fold on a
35   short window, where it cannot help anyone who is confused at the top.
367. **The screen sits alone in the sidebar** with no sibling, which makes the
37   single flat row read as unfinished.
38
39## The plan
40
41### Substance — make a skill inspectable
421. ~~A detail view per skill.~~ **Done.** *Read instructions* opens the
43   instruction text, with the triggers kept beneath it as a secondary
44   detail — they answer "when does this fire", which is a different question
45   from "what does it do".
462. ~~Usage evidence.~~ **Done** — see the shipped note above. The triggers were
47   decorative until this was built: nothing consulted them at runtime.
483. **Scope control** — enable per workspace, since a skill written for one
49   project is noise in another.
50
51### Hierarchy
524. **Move the explainer to the top as a one-line subtitle**, and put the detail
53   in a disclosure for people who want it. Prose at the bottom cannot answer a
54   question asked at the top.
555. **Group by source** (`Workspace` / `Built in`) once there is more than one
56   source; a single flat list will not scale.
57
58### Fluidity
596. **Toggling a skill shows the change immediately** and reconciles quietly — the
60   optimistic update is the interaction, and a spinner on a switch is a worse
61   switch.
627. **Adding a skill animates the new row in** with the standard entrance, so the
63   result of "Add from folder" is visibly connected to the action.
64
65## Motion
66
67| Interaction | Spec |
68|---|---|
69| Toggle | Knob travel `--st-t-control`; no page movement — built |
70| New skill added | `st-enter`, `--st-t-local`, 6 px |
71| Detail expand | grid track `0fr → 1fr`, `--st-t-local` |
72| Search filtering | Rows fade, `--st-t-control`. No reflow animation |
73
74## Verification
75
76- Assert each skill row can reveal its full instruction text.
77- **Shipped as `npm run flow skilluse`**: every skill renders a usage line, and
78  the line is `Not used yet` rather than blank when it has never fired.
79- Assert the empty state distinguishes *no skills* from *no match* — already
80  correct; keep it under test.