diff --git a/docs/superpowers/verification/2026-11-19-unified-prompt.md b/docs/superpowers/verification/2026-11-19-unified-prompt.md new file mode 100644 index 0000000..b675274 --- /dev/null +++ b/docs/superpowers/verification/2026-11-19-unified-prompt.md @@ -0,0 +1,238 @@ +# Unified Prompt Experience — weryfikacja końcowa (2026-11-19) + +Gałąź `feature/unified-prompt`, HEAD `611831b` (przed commitem tego raportu). Wykonawca raportu: Ovis Fast; dowody GUI: Ovis Opus +(`.superpowers/sdd/2026-11-19-unified-prompt/opus-gui-evidence.md`, SendKeys do okna Herdr za zgodą użytkownika). Fast nie wykonywał +żadnych kroków w GUI. + +Legenda: **PASS** — jest zrzut/dowód z GUI; **TESTY** — pokryte tylko testami jednostkowymi (bez dowodu GUI); **RĘCZNIE** — brak dowodu, +do sprawdzenia przez użytkownika (lista w sekcji 5). + +## 1. Testy jednostkowe (`npm test`) + +Wynik: **126 testów, 126 przechodzi, 0 błędów** (`ℹ tests 126 · pass 126 · fail 0 · cancelled 0 · skipped 0`). + +
Pełny wynik + +``` + +> test +> node --test tests/*.test.mjs + +✔ validate rejects over 32 MiB (1.7165ms) +✔ validate accepts a normal file and an image (0.8065ms) +✔ validate rejects junk and unknown kind (0.1552ms) +✔ validateMany enforces count limit (0.2816ms) +✔ mention: bare path, or quoted when it has whitespace (0.2467ms) +✔ removeMention removes only the standalone token (0.6312ms) +✔ mention and removeMention with a space and Polish letters in the path (0.2505ms) +✔ removeMention leaves a mention glued to a Polish letter alone (0.456ms) +✔ removeMention takes the quoted form and the bare form out (0.3714ms) +✔ formatBytes (0.3642ms) +✔ clipboardScript: files first (with sizes, directories apart), then image, then NONE (1.5535ms) +✔ clipboardScript: the folder is Base64, never a literal (any quote, $, or text) (1.2105ms) +✔ clipboardScript: the stamp can only be harmless characters (0.2552ms) +✔ parseClipboardResult: image with its size (0.7063ms) +✔ parseClipboardResult: files with spaces and Polish letters, sizes (0.2886ms) +✔ parseClipboardResult: a file without a readable size has bytes null (0.2269ms) +✔ parseClipboardResult: directories are reported apart (0.2197ms) +✔ parseClipboardResult: NONE, empty, rubbish (0.2109ms) +✔ parseClipboardResult: a BOM in front of the output is ignored (0.2415ms) +✔ parseClipboardResult: a failed run is an error with stderr (0.2819ms) +✔ pickerScript: multiselect dialog, path and size per line (0.155ms) +✔ parsePickerResult: path and bytes, cancelled -> [] (0.2663ms) +✔ sizeScript: one call for the whole batch, the paths only as Base64 (0.2309ms) +✔ parseSizeResult: sizes, directories, missing, unknown sizes (1.0072ms) +✔ parseSizeResult: a failed run fails closed (0.192ms) +✔ staleFiles: 6 days stay, 8 days go (0.2487ms) +✔ supportsImages (0.1381ms) +✔ sizeScript: an empty batch decodes to nothing (0.1707ms) +✔ Base64 of every length of tail round-trips (padding) (0.209ms) +✔ decide idle/done -> send (1.4776ms) +✔ decide working -> queue, blocked -> send (reply to the agent) (0.1504ms) +✔ decide unknown status -> queue (0.1722ms) +✔ gateAfter needs a seen working turn (0.2123ms) +✔ onRestart sending -> uncertain, others untouched (0.9106ms) +✔ onRestart tolerates non-array (0.1557ms) +✔ shouldDrain: only working|blocked -> idle|done, not after a stop by the composer (0.4823ms) +✔ onRestart: countdown -> held without left, sending -> uncertain (0.7386ms) +✔ drain sends an entry whose countdown ran out (1.5001ms) +✔ shouldStartCountdown: idle/done + queued + open gate (0.2833ms) +✔ shouldStartCountdown: not while the agent works, is blocked or unknown (0.1752ms) +✔ shouldStartCountdown: held does not start, uncertain in front does not block (0.1474ms) +✔ shouldStartCountdown: nothing starts while another entry counts or sends (0.1362ms) +✔ shouldStartCountdown: stopped or closed gate blocks (0.1298ms) +✔ shouldStartCountdown tolerates a non-array queue (0.1143ms) +✔ record keeps duplicates (2.6166ms) +✔ record keeps 500, the oldest drop out, and does not mutate (0.372ms) +✔ search is case-insensitive and returns ranges (0.3035ms) +✔ search finds every occurrence (0.1688ms) +✔ search folds Polish letters by case (0.2807ms) +✔ search: newest first; empty query gives everything; no match gives nothing (0.8006ms) +✔ search orders favourites by createdAt (0.2553ms) +✔ toggleFavorite adds by trimmed text, removes on a second toggle (0.362ms) +✔ toggleFavorite: empty text changes nothing; limit 100 drops the oldest; ids are unique (2.3221ms) +✔ storage: old history entries load with empty space/agentName (0.5928ms) +✔ storage: history and favourites roundtrip in the new shape (0.4048ms) +✔ storage: old favourites (at) load as createdAt (0.175ms) +✔ segments splits a text on the ranges (0.5244ms) +✔ formatMoment is DD.MM HH:MM in local time (1.2895ms) +✔ entryMeta: history says when, where and who; a favourite says when it was saved (0.2291ms) +✔ panelState: counts, hits, and which empty state to show (0.309ms) +✔ moveIndex wraps; otherTab flips (0.1701ms) +✔ no keyboard -> always none (1.2572ms) +✔ composing -> none (0.1605ms) +✔ enter variants (0.1841ms) +✔ escape (0.8439ms) +✔ ctrl+r opens the panel; ctrl+v is not ours (0.2538ms) +✔ menu keys (0.1732ms) +✔ createState starts empty (1.6798ms) +✔ draft then send clears the draft (0.2633ms) +✔ reduce never mutates (0.1586ms) +✔ queue adds item and isSending sees only sending state (0.3076ms) +✔ queue without createdAt throws (0.5049ms) +✔ restart turns sending into uncertain for that agent only (0.2906ms) +✔ attach and removeAttachment (0.1954ms) +✔ notice sets and clears (0.2325ms) +✔ restore_draft with the same identity restores silently (0.2593ms) +✔ restore_draft with other created_ms holds the whole queue and warns (1.1755ms) +✔ restore_draft restores attachments and never mutates (0.1745ms) +✔ restore_draft without a draft changes nothing (0.129ms) +✔ draft action keeps the caret (0.1357ms) +✔ restore_draft keepCurrent: mismatch holds the queue, keeps what the user typed (0.1681ms) +✔ restore_draft: unknown live identity holds the queue; notice only when saved identity was known (0.1597ms) +✔ restore_draft without a draft: unknown live identity still holds the queue (0.1127ms) +✔ hold_queue holds queued and sending, keeps uncertain (0.1281ms) +✔ countdown_start starts the first queued entry, uncertain untouched (0.2311ms) +✔ countdown_start ignores a non-first queued entry and a busy queue (0.0986ms) +✔ countdown_tick decrements and stops at 0 (0.117ms) +✔ countdown_cancel -> held, countdown_reset -> queued, both drop left (0.1287ms) +✔ hold_all holds queued and countdown; sending and uncertain stay (0.1031ms) +✔ claim takes a countdown entry (0.136ms) +✔ restart turns a countdown into held (0.0918ms) +✔ restore_draft turns an unfinished attachment into an error (0.2028ms) +✔ attachment states: adding -> ready with the remote path, or error; retry goes back to adding (0.201ms) +✔ requeue takes an uncertain entry back to the queue too (the person's "Ponów") (0.1473ms) +✔ saveHistory truncates to 500, keeping the newest (2.1348ms) +✔ history drops invalid entries on load (0.125ms) +✔ queueKey is per agent (0.1493ms) +✔ queue roundtrip; keeps sending state as written (0.6886ms) +✔ saveQueue ignores empty agent (0.1315ms) +✔ usage keeps only non-negative finite numbers (0.2104ms) +✔ rubbish list does not wipe stored history (0.159ms) +✔ draftKey is per agent (0.1338ms) +✔ draft roundtrip (0.334ms) +✔ loadDraft: rubbish in store gives null (0.1869ms) +✔ draft keeps text over 20000 chars whole (0.1275ms) +✔ saveDraft ignores rubbish and empty agent (0.12ms) +✔ empty draft overwrites the old one (0.1151ms) +✔ loadDraft: text-only draft still loads, with defaults (0.1177ms) +✔ saveDraft does not overwrite a known created_ms with null (0.1734ms) +✔ queue roundtrip keeps a countdown entry (restart turns it into held) (0.13ms) +✔ detect finds a slash command at caret (1.1548ms) +✔ detect ignores slash inside a path (0.4663ms) +✔ detect finds @ file token anywhere (0.1584ms) +✔ detect rejects bad caret / non-string (0.1066ms) +✔ startsLine (0.1452ms) +✔ rank orders by level then uses; fuzzy only at line start (0.3452ms) +✔ merge orders groups as the design names them (0.1944ms) +✔ targetAgent picks by focused.terminal, then focused.agent (0.8195ms) +✔ agentKey/agentName/agentStatus (0.1905ms) +✔ gate: opens after a seen turn, or outright (0.3027ms) +✔ isPlainEnter (0.1594ms) +✔ labels (0.2022ms) +✔ applySuggestion replaces token and places caret (0.5776ms) +✔ insertedNewline finds the index (0.1479ms) +✔ canAutoSend waits for the draft/identity check of the agent (0.2199ms) +✔ queueLabel for every state (0.152ms) +ℹ tests 126 +ℹ suites 0 +ℹ pass 126 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 231.0341 +``` + +
+ +Pozostałe bramki: `herdr-app check C:\Users\Factor\.config\herdr-app\mods\ovis-composer` → `check passed`; +`herdr-app status` → `"layout": "ovis-composer"`, `"errors": []`. + +## 2. Dowody GUI zebrane przez Opus + +| # | Scenariusz | Wynik | Zrzut | +|---|---|---|---| +| 1 | Spike klawiszy (`ovis-keytest`): ↑/↓ z kontekstem `X > Input` docierają do `on_action` | PASS | [kt-keys](img/kt-keys.png) | +| 2 | Spike `paste_other` przy obrazie w schowku (Task 6 Step 0) | PASS | [kt-paste2](img/kt-paste2.png) | +| 3 | Composer: `/` + ↓↓ przesuwa podświetlenie (na `model`) | PASS | [c2-menu](img/c2-menu.png) | +| 4 | Panel: Ctrl+R otwiera, Tab → Ulubione, pusty stan | PASS | [q2](img/q2.png) | +| 5 | Panel: Esc zamyka, agent NIE przerwany, wysokość bloku wraca (260 → 360 → 260) | PASS | [q3](img/q3.png), [h3](img/h3.png) | +| 6 | Ctrl+V obrazu w composerze → kafelek + `@C:\Users\Factor\AppData\Local\herdr-core\default\files\t5\paste-….png` (`hc put`) | PASS — **miniatura PUSTA** (`image()` nie rysuje ścieżki bezwzględnej) | [e1](img/e1.png) | +| 7 | End-to-end: wysłanie do Claude Code (Ovis Fast) → agent przeczytał PNG i odpowiedział „Pomarańczowy.” | PASS | [e2](img/e2.png) | +| 8 | Historia: wpis po wysyłce, wyszukiwanie „kolor” podświetla, meta `19.11 11:59 · herdrMario · Ovis Fast` | PASS | [e3](img/e3.png) | +| 9 | Esc w oknie zmiany nazwy, Ctrl+Shift+Space (test użytkownika) | PASS | — | + +## 3. Scenariusze 1–7 z makiety („Co przetestować”) i reszta Step 2 + +| Scenariusz | Status | Uwagi | +|---|---|---| +| M1. Draft, załączniki i kolejka zostają per agent przy przełączaniu karty/agenta | TESTY (`state`, `storage`) | Brak dowodu GUI. Przywracanie draftu po restarcie Herdr — RĘCZNIE. | +| M2. Klik w terminal → klawisze idą do programu; Ctrl+Shift+Space wraca do composera | częściowo: Ctrl+Shift+Space PASS (#9) | Pisanie w terminalu po kliknięciu — RĘCZNIE. | +| M3. Ctrl+V obrazu / przeciągnięcie pliku / „+” / powiększenie miniatury | Ctrl+V PASS (#6, #7) | Drag & Drop, „+”, podgląd po kliknięciu miniatury — RĘCZNIE. **Miniatura pusta** (patrz sekcja 6). | +| M4. `/` i `@` — menu podpowiedzi | `/` PASS (#3) | `@` — RĘCZNIE. | +| M5. Ctrl+R / 🕘 — panel; Enter wstawia w miejscu kursora, bez wysyłania | otwarcie, Tab, pusty stan, Esc, wyszukiwanie PASS (#4, #5, #8) | Enter (wstawienie w kursor), ☆/Ctrl+D, prawy klik, „Edytuj”, „Ponów” — RĘCZNIE. | +| M6. Agent pracuje: Enter → kolejka, po turze odliczanie 3 s z „Anuluj”; Stop/Esc przy pustym polu wstrzymuje kolejkę | TESTY (`delivery`, `state`) | Brak dowodu GUI — RĘCZNIE. | +| M7. Ctrl+C wprost w terminalu, `blocked`, błąd dostarczenia, ostrzeżenie o obrazach (aider), composer nieaktywny przy PowerShell | TESTY (częściowo) | Brak dowodu GUI — RĘCZNIE. | +| Terminal PowerShell: pisanie, Ctrl+C, Ctrl+V tekstu | RĘCZNIE | | +| Wklejanie obrazu do Claude Code wprost w terminalu (natywne zachowanie Herdr nietknięte) | RĘCZNIE | `keys.json` zawiera `ctrl-v: terminal.paste_image` bez zmian (sekcja 4). | +| Przełączenie layoutu `main` ↔ `ovis-composer` bez błędów | RĘCZNIE | `herdr-app status` przy `ovis-composer` → `"errors": []`; przełączenie nie było wykonywane. | +| Restart Herdr w trakcie `sending` → `uncertain` | TESTY (`delivery.onRestart`, `state.restart`) | Brak dowodu GUI — RĘCZNIE. | + +## 4. Brak rekompilacji i lista zmian w `~/.config/herdr-app` + +- `herdr-app --version` → **`herdr-app 0.1.16`**. Stan „przed” nie został zmierzony na początku prac; wersja `0.1.16` jest też w + `cloned_from.version` layoutu `ovis-composer.json` (sklonowanego z `main` przed pracami) i w pomiarach z komentarzy `delivery.js` + („herdr-core 0.1.16”). Aplikacja nie była rekompilowana ani aktualizowana przez te prace. +- Uwaga: `hc --version` → `hc 0.1.21` (rdzeń). Kiedy i dlaczego rdzeń jest nowszy niż 0.1.16 z komentarzy — nie ustalono; nie wynika + to z żadnego kroku tych prac. +- Pliki w `~/.config/herdr-app` zmienione przez te prace: + +| Plik | Zmiana | +|---|---| +| `mods/ovis-composer` | junction → `D:\Development\workspace - Mariusz\herdrMario\mod\ovis-composer` (kopia oryginału: `mods/ovis-composer.bak-20261119`) | +| `mods/ovis-keytest` | junction → `…\herdrMario\spikes\ovis-keytest` (mod diagnostyczny Opusa) | +| `layouts/ovis-composer.json` | `diff` względem `.bak-20261119`: blok `composer`: `"min": 120`, `"max": 520`; `work`: `"resizable": false` → `true` (kopia: `layouts/ovis-composer.json.bak-20261119`; skopiowane `cp`, nie `install.ps1`) | +| `keys.json` | dodane `"ctrl-shift-space": "ovis-composer.focus"` w `global`; reszta bez zmian poza formatowaniem JSON (kopia: `keys.json.bak-20261119`) | +| `data/ovis-composer/paste/` | dane robocze (obrazy wklejone ze schowka) | + +- Niezmienione przez te prace (świadomie): `layouts/main.json`, `mods//*`, `frame/`. Uwaga: znaczniki czasu `layouts/main.json` + (09:41) oraz `mods/prompt`, `mods/menu`, `mods/toast` z 19.11 nie pochodzą z tych prac — Herdr nadpisuje dostarczone pliki przy + starcie (AGENTS.md); przyczyny nie badano. + +## 5. Checklista dla użytkownika (RĘCZNIE) + +1. Pisanie w composerze → przełączenie na innego agenta i z powrotem → draft, kursor, załączniki, kolejka zostają; restart Herdr → draft wraca. +2. Klik w terminal → pisanie trafia do programu; Ctrl+Shift+Space → fokus w composerze. +3. Przeciągnięcie pliku na composer; przycisk „+” (okno wyboru, kilka plików); klik w miniaturę → podgląd (Esc zamyka). +4. `@` w composerze → podpowiedzi plików. +5. Panel (Ctrl+R / 🕘): Enter wstawia w miejscu kursora i nic nie wysyła; ☆ przy edytorze, Ctrl+D i prawy klik w wierszu; „Edytuj”/„Ponów” w kolejce. +6. Agent pracuje: Enter → kolejka → odliczanie 3 s z „Anuluj”; Stop i Esc przy pustym polu → kolejka `held`. +7. Agent `blocked`: Enter wysyła od razu. Agent bez obsługi obrazów (np. aider) + obraz → ostrzeżenie [Anuluj] [Wyślij mimo to]. Terminal PowerShell → composer nieaktywny z napisem. +8. Terminal PowerShell: pisanie, Ctrl+C, Ctrl+V tekstu; Ctrl+V obrazu wprost w terminalu Claude Code (natywnie). +9. `layout.switch` `main` ↔ `ovis-composer` — bez błędów (`herdr-app status` → `"errors": []`). +10. Restart Herdr w trakcie wysyłania (`sending`) → wpis w kolejce jako „Nie potwierdzono”, bez automatycznej ponownej wysyłki. + +## 6. Znane problemy i uwagi środowiskowe + +- **Miniatura obrazu jest pusta** (#6): `image(<ścieżka bezwzględna>)` nie rysuje pliku spoza katalogu aplikacji. Nie naprawione w tych + pracach; podgląd po kliknięciu miniatury nie był sprawdzany. Do decyzji Opus. +- Herdr nie przeładowuje moda po zmianach za junction — po zmianie kodu trzeba odtworzyć junction + (`.superpowers/sdd/2026-11-19-unified-prompt/reload-mod.cmd`). +- Git Bash zamienia `/clear` na `C:/Program Files/Git/clear` (konwersja ścieżek MSYS) — przy wysyłaniu poleceń z Bash użyć + `MSYS_NO_PATHCONV=1`. + +## 7. Wycofanie + +`scripts/install.ps1 -Uninstall`: usuń junction, przywróć `mods\ovis-composer.bak-20261119`, przywróć `keys.json.bak-20261119`, +`herdr-app do layout.switch '{"name":"main"}'`. (Junction `mods/ovis-keytest` usunąć osobno.) diff --git a/docs/superpowers/verification/img/c2-menu.png b/docs/superpowers/verification/img/c2-menu.png new file mode 100644 index 0000000..8154181 Binary files /dev/null and b/docs/superpowers/verification/img/c2-menu.png differ diff --git a/docs/superpowers/verification/img/e1.png b/docs/superpowers/verification/img/e1.png new file mode 100644 index 0000000..7a20365 Binary files /dev/null and b/docs/superpowers/verification/img/e1.png differ diff --git a/docs/superpowers/verification/img/e2.png b/docs/superpowers/verification/img/e2.png new file mode 100644 index 0000000..a083b29 Binary files /dev/null and b/docs/superpowers/verification/img/e2.png differ diff --git a/docs/superpowers/verification/img/e3.png b/docs/superpowers/verification/img/e3.png new file mode 100644 index 0000000..9ad440f Binary files /dev/null and b/docs/superpowers/verification/img/e3.png differ diff --git a/docs/superpowers/verification/img/h3.png b/docs/superpowers/verification/img/h3.png new file mode 100644 index 0000000..2a6fd00 Binary files /dev/null and b/docs/superpowers/verification/img/h3.png differ diff --git a/docs/superpowers/verification/img/kt-keys.png b/docs/superpowers/verification/img/kt-keys.png new file mode 100644 index 0000000..c94e84d Binary files /dev/null and b/docs/superpowers/verification/img/kt-keys.png differ diff --git a/docs/superpowers/verification/img/kt-paste2.png b/docs/superpowers/verification/img/kt-paste2.png new file mode 100644 index 0000000..f70b854 Binary files /dev/null and b/docs/superpowers/verification/img/kt-paste2.png differ diff --git a/docs/superpowers/verification/img/q2.png b/docs/superpowers/verification/img/q2.png new file mode 100644 index 0000000..c4cd5ed Binary files /dev/null and b/docs/superpowers/verification/img/q2.png differ diff --git a/docs/superpowers/verification/img/q3.png b/docs/superpowers/verification/img/q3.png new file mode 100644 index 0000000..d04a6ce Binary files /dev/null and b/docs/superpowers/verification/img/q3.png differ