diff --git a/agents/dewey/work/chat-03/PROGRESS.md b/agents/dewey/work/chat-03/PROGRESS.md new file mode 100644 index 00000000..1e1a1ce2 --- /dev/null +++ b/agents/dewey/work/chat-03/PROGRESS.md @@ -0,0 +1,18 @@ +# CHAT-03 I1 progress (Dewey, row 5) + +Append-only. One line per working stop. + +- 2026-10-04: resumed after Sage's REQUEST. Done and untracked: claim, cohort, shim, engine, events, framing, guard, pi-pin, records, text-policy, turns. Next: src/controller.mjs, then client, terminal, tests/fake-pi.mjs and the fixtures. +- 2026-10-04: src/controller.mjs written and import-checked (Interrupt dedup added). tests/fake-pi.mjs written (in-process FakePi + FakeLauncher, process form with control socket). Next: first end-to-end fixture, then client, terminal and the full fixture set. +- 2026-10-04: src/client.mjs, tests/harness.mjs, tests/ctrl-child.mjs and tests/claim.test.mjs (W1–W20, G1–G3, 21 tests) green. Controller fixes: written marked on the prompt response before the ack; launcher forceStop hook; kill handle on close; socket dir prepared only after classification (a refused contender no longer unlinks a live socket). Next: N1–N25, then H, K, E/S/P3, terminal, README, suites. +- 2026-10-04: tests/turns.test.mjs (N1–N25, 26 tests) green three runs in a row. fake-pi gained extension step scripts, triggerTurn queueing while streaming, an after-start point and a held get_state. No controller change was needed for N. Next: H, K, E/S/P3, terminal, README, suites. +- 2026-10-04: tests/races.test.mjs (H1–H4, H9–H23, 21 tests) green. Whole package 97/97. Three controller defects found and fixed in my files, to report to Sage: (1) `#evaluate` ran `res.outcome` on recover's Promise, so recover over the wire threw internal (W8 missed it because it resumes through a restart); (2) `#admission` skipped the binding push when only the state changed, so clients kept showing "stopping" after a failed force stop (also in `#uncertain`); (3) the client kept non-final receipts live across a new incarnation and now marks them outcome unknown. Fixture fix: fake-pi removes a stale control socket left behind by a SIGKILLed predecessor. Next: K1–K18, E/S/P3, terminal, README, suites. +- 2026-10-04: tests/cohort.test.mjs (K1–K18, 18 tests) green twice, no leaked scopes. Fixture changes: fake-pi tool children can ignore TERM and fork `sleep` in a loop; ctrl-child answers `proof`. K13 escapes are refused on this host (nsdelegate). K14 stops the scope with SIGKILL because the shim ignores TERM. Next: terminal, S1–S7, E1–E7, P3, README, suites. +- 2026-10-04: src/transcript.mjs and src/terminal.mjs written; tests/flows.test.mjs (S1–S7, P3, E1–E7, two terminal checks, schema check) green twice; package 134/134. Fixed in my source: the `unknown` push's `type` field overwrote the envelope's `type: "push"`, so clients dropped it (field renamed `nativeType`; `#push` now sets `type` last); a Transcript attached to a connected client now reads the page at once. Finding for Sage: pinned Pi appends `thinking_level_change` at startup when the branch lacks one, so K8 fails closed on such sessions. Next: smoke test, README, package.json, suites, mutants, packet. +- 2026-10-04: tests/smoke.test.mjs green (pinned Pi 0.85.1 sealed, no credentials, no prompt; also pins the bundled inline `/llama` command and the startup append). README and package.json done. All nine suites green; package tests conversation 137/137, webui 14/14, seat 19/19; chat-00, chat-01 and chat-01c checks pass. control-board failed 1 test: its refusal-status test scans every `new Refusal("…")` in conversation/src and found the controller's `configuration`, `channel` and `target`. Fixed in my files: control-layer refusals now throw `ControlRefusal` (subclass, safe-fs.mjs); README says why; control-board 124/124. Mutation pass running in /tmp scratch copies. Next: mutant results, manifest, packet, queue move. +2026-10-04 (later): mutation pass running; kill tests added for mutants 1 (A-B-A generation, H3), 3 (publish race, W1), 8 (single-use recover confirmation, K6), 12 (no revision name before sync, W1). Mutant 14 as first written was equivalent (unreachable line); guard.check restructured so the real-path check sits in one place, mutant retargeted. Next: re-run changed mutants in scratch, remaining survivors, manifest, packet, queue move. +- 2026-10-04: candidate frozen and in review. Manifest I1-manifest.sha256 (1404341e, 27 files), packet BUILD-I1.md. Suites green (conversation 141/141). All 41 mutants killed; kill tests added for 16 (link-level poison, H19) and 19 (clear_queue error response, N7; fake-pi failResponse). Row 5 in-review round 1, comment 26671 on #1507. Next: answer reviewer findings (two rounds at most). +- 2026-10-04 round 1 rework: Darkwing B1 (seal now an allow-list over extraArgs; non-list engine args refuse; command/preArgs documented as a test hook) and B2 (session key = Pi header ID; header change refuses target) fixed in the tree with N24 and three controller-level W4 tests; n1 and n2 in the README. Round-2 mutants r2-B1..B2b running in scratch. Waiting on Filbert's round-1 findings before freezing the round-2 manifest. +- 2026-10-04 round 2 requested: Darkwing B1-B2 and Filbert B1-B6 folded in; conversation 152/152, all other suites green; 60 of 61 mutants killed, r2-B5b (freeze not waited on) survives and is explained in BUILD-I1-r2.md; manifest I1-r2-manifest.sha256 (2b48e333); row 5 in-review round 2, comment 26689 on #1507 (revs 56-58). Next: round-2 verdicts. Sage commits after approval. +- 2026-10-04 round 2: Filbert approves (comment 26694 on #1507, rev 60). Follow-ups, none blocking: F1, correction to BUILD-I1-r2.md: only K12's cgroup.freeze read is timing-independent; the post-TERM pid-log check catches a missing freeze only when the fork loop forks between members and kill (Filbert's C4 and r2-B5b survive). A test-only hold after members would make C4 deterministic; r2-B5b still needs a FUSE or privileged fixture. F2: Ctrl-T, text and Enter in one chunk leaves the text in the composer (Enter checked before the queued takeover); fails safe. F3: default engine.command with caller preArgs reaches real Pi unsealed; documented test hook, no I1 production caller. Waiting on Darkwing's round-2 verdict. +- 2026-10-04: I1 committed by Sage as 243e153c and pushed after both reviewers approved round 2. Row 5 waiting-on-jason for Gate E (revs 61-62, 1595553a; summary comment 26697 on #1507). Reviewer follow-ups are in DEFERRED for the I3 brief. Nothing further on row 5 until Gate E. diff --git a/agents/dewey/work/tree-manifest-2026-09-26.md b/agents/dewey/work/tree-manifest-2026-09-26.md new file mode 100644 index 00000000..d140de74 --- /dev/null +++ b/agents/dewey/work/tree-manifest-2026-09-26.md @@ -0,0 +1,199 @@ +# Dewey dirty-tree manifest, 2026-09-26 + +Requested by Sage (lead) over T3 on 2026-09-26. Nothing here is committed and +nothing was edited to produce it. Baseline: HEAD `21e3e908` on `refactor`; +origin/refactor `43d7574d`. + +Sources: Dewey's Pi session +`.pi/state/dewey/sessions/2026-09-13T00-10-59-217Z_01a0981a-*.jsonl` (every +write, edit and git call it made), `git diff`/`git status`, and Darkwing's +`agents/darkwing/work/tree-manifest-2026-09-26.md`. That file already covers +the package code, and I agree with its grouping. + +## 1. Paths Dewey authored + +### 1a. WUI design workspace, `agents/dewey/work/wui/` + +Phase B (brand board, 09-08) was published as 53 pinned files in `29c1defe` +(#1497). Everything below came later or was left out on purpose. + +| Path | Work | Approval receipt | Ready | +|---|---|---|---| +| README.md, TASKS.md, DECISIONS.md, HISTORY.md, VERIFY.md (tracked, modified) | D01–D05 records, 09-12 | None. These are author records. | Yes, as author records, once the subset in section 6 is accepted. D-002 was recorded later on 2026-09-26 (section 6). | +| DESIGN.md, FEATURES.md (new) | D01, D02 | None | Yes, in the section 6 subset. DESIGN.md's open questions now point to the answers. | +| checks/mockups-verify.mjs (new) | D04 | None | No. Needs review. | +| mockups/** (15 new files: index, five designs, shared app/data/views/css) | D03 | Partial: the Console subset was copied into `packages/webui` and Filbert verified the copies byte-identical in the ea00ec66 review. The other four designs have no review. | No. They need an independent review, and Jason has to say whether unchosen designs get published at all. | +| evidence/mockups/** (66 files, 11 MB, screenshots plus report.json) | D04 evidence | None | No. I recommend committing report.json and a few screenshots, not all 11 MB. | +| evidence/t3-*.png, evidence/buzz-*.png, evidence/references.json | B02 third-party captures | Deliberately excluded by the #1497 boundary (`reviews/2026-09-08_publication-trial-dewey-boundary.md`, lines 33–39) | Never. They stay local. | +| evidence/candidate-sha256.txt, evidence/first-feedback-notes-sha256.txt | Historical receipts | Excluded by the same boundary | Never. They stay local. | +| evidence/downloads/ (2 files) | Test exports, not Jason's review | Excluded by the same boundary | Never. They stay local. | +| evidence/board-*.png (6), focus-short-desktop.png, section-*.png (4), detail-check-run.txt, verify-run.txt | B07 captures and logs that were not on the allowlist | Omitted by the boundary to keep the package bounded, not for privacy | Stay local unless someone asks for them. | + +I scanned the D-phase files for credential shapes (GitHub, GitLab, Slack, +OpenAI-style, bearer, private key, Discord token) and found nothing. +`mockups/shared/data.js` is hand-written sample data. It includes Jason's +first name and seat names, but no paths under `/home` and no email addresses. + +`agents/dewey/scratch/` is empty. `.pi/state/dewey/` is ignored by `.pi/.gitignore`. + +### 1b. Lines Dewey wrote in shared records + +| Path | Dewey's part | Approval receipt | Ready | +|---|---|---|---| +| BUILD-LOG.md | `## 2026-09-13 — Session-chat refinement and owner confirmation (#1507)`. The CHAT-00, CHAT-01 and CHAT-01C entries next to it were not written from Dewey's session. They read as Darkwing's. | Owner confirmation: #1507 comment 26093 | Yes, but only after the working file is rebuilt as HEAD plus the uncommitted entries. The working copy is missing the committed row 23–25 entries, as Darkwing's section 5 says. Staging it as it stands would delete append-only history. | +| docs/SESSIONS.md | 14 `— dewey —` lines, 2026-09-13 to 09-15 | Append-only log | Yes, with the rest of the file | +| docs/plans/QUEUE.md | Row 5 State (Darkwing last rewrote it on 09-13; it is stale, see below). Log line `2026-09-13 — dewey: Jason feedback blocks WebUI Gate E…`. Parked row `Console features outside the refined session-chat brief…`, which replaced `Console screens beyond the first`. | #1507 comment 26082 (feedback); WEBUI Q1 (deferral) | Row 5 State needs correcting before commit. The log line and parked row are ready. | +| docs/plans/CURRENT.md | Row 5 narrative (the piece-4 paragraph, from "Jason's 2026-09-13 feedback" to "No code or live effects started"). Dewey and Darkwing both wrote it. | 26082, 26093, 26094, 26100, 26103, 26131, 26152 | Needs the same correction as row 5 | +| docs/plans/reviews/2026-09-08_publication-trial-dewey-boundary.md (new) | Whole file, Dewey's #1497 author declaration. Darkwing's manifest counts it among his 21 publication-trial files. | Part of the #1497 trial; Darkwing's receipt is in `…-wui-coordination.md` | Yes, as a record, in Darkwing's batch | + +**Row 5 correction.** `b023841c` (CHAT-01C, author and committer Darkwing) is on +origin/refactor: `git branch -r --contains b023841c` returns `origin/refactor`. +"Publication remains held" and the HTTP 403 text are out of date. Suggested +State: `CHAT-00/01/01C contracts published (370823b3, 28d4e98a, b023841c); +CHAT-02..08 not chartered; Gate E blocked, see agents/dewey/work/tree-manifest-2026-09-26.md`. +I have not edited QUEUE.md, because Sage is editing it today. + +## 2. `packages/webui`: Dewey is the path owner, not the author + +Dewey's own source is all in `ea00ec66` (published 09-13, Filbert R1 approved). +None of the uncommitted edits below are Dewey's. Dewey reviewed the UX for +three of the four rows. + +| Path | Author, row | Dewey's review | +|---|---|---| +| src/public/app.js | Filbert (row 18 connector status, #1512 relaunch notice); Rocko (#1511 set-by) | Row 18 R1–R3 approved (26255–26257); #1511 R2 approved (`agents/darkwing/work/task-attribution/r2-review.md`); #1512 R1 approved (`…/relaunch-activity/r1-review.md`) | +| tests/fixture.mjs | Darkwing (row 22 `Input needed:` prefix); Rocko (#1511 setter) | Row 22 change acknowledged, no review asked; #1511 R2 | +| tests/browser.test.mjs, tests/browser-edge.test.mjs | Rocko (#1511) | #1511 R2 | +| tests/discord.test.mjs (new) | Filbert (row 18) | Row 18 R1–R3 | +| tests/relaunch.test.mjs (new) | Filbert (#1512) | #1512 R1 | + +`app.js` on disk has SHA-256 `ce7d79a4…`, the same value as the #1512 R1 rerun +manifest (`/tmp/relaunch-activity-r1-rerun-oupRiqIC/CANDIDATE.sha256`). HEAD's +copy is `7f30847b…`. I agree with Darkwing: one cumulative commit for rows 18, +22, #1511 and #1512, citing each receipt. WebUI test run today on the working +tree: see section 3. + +## 3. Test evidence, today + +`node --test --test-concurrency=1 packages/webui/tests/` on the working tree. +The log is at `/tmp/dewey-webui-tests-2026-09-26.txt`. Result: 8 tests, 8 +pass, 0 fail, about 5.0 s. The run covers the Console browser, the Discord row, +the relaunch notice, loopback and origin fencing, board passthrough, proxy +byte preservation and CLI rejection. + +The `app.js` in #1511 R2's manifest (`954d98fa…`) predates the #1512 layer. +The current file is the one #1512 R1 reviewed, and that review built on #1511. + +## 4. Row 5 (#1507): what is left before Gate E + +Published contracts: CHAT-00 `370823b3`, CHAT-01 `28d4e98a`, CHAT-01C +`b023841c`. The refinement plan `2026-09-13_webui-session-chat.md` is +committed at `4c436f4c` and has no local edits. No runtime code for session +chat exists. + +Gate E, from plan section 6: every in-scope seat reaches Dewey's Console +through a verified live adapter, Jason uses it for a workday, and then rules. +Tasks still open: + +| Task | What | Blocking gates | +|---|---|---| +| CHAT-02 | Read-only histories and relative Age; carries Rocko R3-1 | Charter and backend author | +| CHAT-03 | Pi and Claude live adapters, mediated terminal | B1/B2 protocol, trust and tool-isolation proof | +| CHAT-03I / CHAT-03D | Ingress and handoff contract; native dialog contract | 03I changes fleet comms, so Jason rules first | +| CHAT-04 | Durable queues, attachments | B3/B4 every-ingress fencing, crash recovery, supervisor evidence | +| CHAT-04R | Private remote control | Q22 prerequisites | +| CHAT-05 | Console session-chat UI (Dewey writes, Filbert reviews) | Stable CHAT-02..04 surfaces | +| CHAT-06 / 06P | Combined candidate, publication | Reviews, then Jason's push word | +| CHAT-07 | Live cutover, one seat at a time | B6 envelope for each target, Jason's approval for each seat | +| CHAT-08 | All-seat demo, which is Gate E | Everything above, then Jason's workday ruling | + +Rocko R3-2 belongs in CHAT-01C, which is already published. I have not +checked whether it landed there. R3-3 (observer revocation) waits for a later +fixture revision. + +### Dewey can do now, without Jason + +1. Correct the stale row 5 and CURRENT text (section 1b). I'll send Sage the + wording, since QUEUE is shared. +2. Append the D-002 disposition to TASKS.md and HISTORY.md in `wui/`. +3. Write the regression the plan requires for the reported return-flow + failure, and restore relative Age from the board's existing `ageSeconds`. + These are small Console changes and need a Filbert review. +4. Design and prototype CHAT-05 in `agents/dewey/work/` against the CHAT-01 + and CHAT-01C schemas, with no live wiring. +5. Review the UI semantics of CHAT-03D and CHAT-03I, plus the UX of any + backend candidate. + +### Needs Jason + +1. **What "all seats" means now.** Q3/Q19 were decided when the `~/.mosaic` + fleet was the seat set. That fleet is being retired, development seats run + in T3, and row 8 is parked. Gate E's scope, CHAT-04R and CHAT-07 all + depend on this. +2. **Priority.** His named priority is row 6, with #1508 rows 9–13 after it. + Q22 orders row 5 behind that, so CHAT-02..08 cannot start without his word. +3. **Charters and backend authors for CHAT-02..04.** Each earlier CHAT phase + had his approval. The plan names Darkwing as the backend's accountable + owner, and that now goes through Sage as lead. +4. The CHAT-03I ruling on fleet comms. +5. Sacrificial force-stop runs that need his approval under B3/B4. +6. His push word for each publication. +7. His approval for each seat's cutover. +8. The workday itself, and his ruling after it. + +## 5. The WebUI process running now, PID 1266267 + +It runs current source. Started 2026-09-13 16:19 CDT as +`node packages/webui/src/cli.mjs serve`. + +- Server code: `cli.mjs` and `serve.mjs` have not changed since `ea00ec66`, + and they match HEAD and the working tree. The process loaded the same code + that is on disk. +- Static assets: `serve.mjs` reads each file from disk for every request and + sends `cache-control: no-store`. The page therefore serves the working + tree, including the uncommitted #1512 `app.js` (`ce7d79a4…`), not HEAD's + (`7f30847b…`). Hashes of the live `/`, `/app.js` and `/live.css` responses + match the working-tree files. `/healthz` returns ok. `/api/config` points + to the board at `http://127.0.0.1:7331`. +- Caveat: the board backend it proxies (PID 3414098, started 2026-09-14 + 19:10) predates #1512. `/api/board` returns 44 rows, with `taskSetBy` and + `connector` fields but no `relaunchedAt`, so the relaunch notice cannot + show up in live use until the board is restarted. That board belongs to + Darkwing and Filbert. I have not touched it. + +## 6. Update later on 2026-09-26: D-002 recorded, and a subset proposal + +Sage approved both. Both stay uncommitted. + +**D-002 recorded.** TASKS.md now marks D05 and I01 done and I02 and I03 +superseded, and the Next action is none. README.md's status line, DESIGN.md's +open questions, a new DECISIONS.md section and a new HISTORY.md entry all +point to D-002, #1507 comment 26082 and the session-chat plan. The logo and +the default palette are still Jason's to decide. + +**Proposed commit subset for `agents/dewey/work/wui/`, about 1.5 MB:** + +| Include | Size | Why | +|---|---|---| +| README.md, TASKS.md, DECISIONS.md, HISTORY.md, VERIFY.md (tracked edits) | text | The D-phase record and the D-002 reconciliation | +| DESIGN.md, FEATURES.md | text | D01/D02, cited by the records | +| checks/mockups-verify.mjs | 68 KB dir | Reproduces the evidence; VERIFY.md cites its 31-check run | +| mockups/** (all 15) | 192 KB | Console depends on the shared app, views, data and css, so it can't be split out without breaking the index. The other four stay as reference. | +| evidence/mockups/report.json | 7 KB | The only evidence file README.md and VERIFY.md cite | +| evidence/mockups/index-390.png, index-1440.png, d3-console-home-{390,1440,3440}.png, d3-console-inspector-1440.png, d3-console-text-200-320.png | about 1.2 MB with report.json | The comparison page plus the chosen design at phone, desktop, ultrawide and 200% text sizes | + +**Stays local:** the other 58 screenshots in `evidence/mockups/` (about +9.8 MB), which are regenerated by `checks/mockups-verify.mjs`, and all the +excluded B-phase items in section 1a. + +Open points for the commit plan: + +1. Nobody has independently reviewed these files. Filbert only + byte-compared the Console copies. A light review would cover the records' + accuracy and the sample data in `mockups/shared/data.js`: no credentials, + no paths under `/home`, no email addresses, only Jason's first name and seat + names. +2. The four designs Jason didn't choose are in `mockups/`, so they go public + when this pushes. Jason's push word should cover this list, or the + commit should leave out `d1`, `d2`, `d4` and `d5` HTML/CSS. If they are + left out, the index links break. diff --git a/agents/dewey/work/wui/DECISIONS.md b/agents/dewey/work/wui/DECISIONS.md index 59cadbc1..bb8612f0 100644 --- a/agents/dewey/work/wui/DECISIONS.md +++ b/agents/dewey/work/wui/DECISIONS.md @@ -80,3 +80,20 @@ Jason clarified that unfinished iconography should not prevent design progress. - Final logo and iconography remain unresolved, but are not blockers. Use a Mosaic Stack text wordmark and provisional, labeled UI icons in the meantime. - Prioritize the source-linked feature inventory, then five distinct navigable dashboard mockups and a central comparison page. Treat implemented, planned, and newly proposed backend capabilities separately. - This does not authorize backend coding, integration, deployment, commits, or pushes. No new goal was activated during this clarification. + +## 2026-09-12: dashboard mockup decisions (Dewey, pending Jason's selection) + +- Landing page: the control board from MOSAIC-STACK-D-001 is the home route in all five designs. Tradeoff: sessions and projects become one click deeper than a conversation-first home. Marked "proposed" in the interface because the foundation has a scanner but no page yet. +- Five styles: Rail (left rail), Deck (top tabs and cards), Console (command bar, tree, dense table, inspector), Board (kanban by session state), Stream (pinned inbox and timeline with bottom tabs). Chosen to differ in navigation model rather than decoration, so the comparison is about how Jason works. +- Defaults: Harbor palette; appearance follows the system preference until chosen; Dim is selectable. Provisional, carried over from the brand board. +- Simulated actions: every control shows a notice that begins with "Simulated" and says nothing changed. Refusals (retired workspace, duplicate launch, empty message) are shown as refusals with a reason, never as success. Prototype notes appear in every shell. +- Status colours: counters on warning, success, and danger backgrounds use canvas-coloured text rather than white so Dim and Dark keep 4.5:1. Badge tints are 8 percent and the current-nav tint 9 percent for the same reason. +- Contrast harness: fixed the sampler to read Chromium's `color(srgb ...)` output instead of relaxing the threshold. +- Board header: below 1600 px the pill navigation wraps under the brand row on purpose, matching the phone layout, instead of pushing the controls to a second row. +- Not decided: the design to iterate, added or dropped features, and the logo. These are Jason's. + +## 2026-09-26: D05 disposition recorded (Dewey) + +- Jason selected d3 Console on 2026-09-12, recorded as MOSAIC-STACK-D-002 in `docs/plans/2026-09-12_control-board-mvp.md`, Piece 4. The section above said "pending Jason's selection" until today, because nobody had copied the ruling into this workspace. +- The other open items above are settled as follows. Design: Console. Feature scope: #1507 comment 26082 and the session-chat plan (Q1-Q22). Logo and default palette: still Jason's, and still undecided. +- I02 and I03 are superseded because Console went straight into `packages/webui` (ea00ec66). The mockups are kept for reference. Whether the four designs Jason didn't choose get published is his call. diff --git a/agents/dewey/work/wui/DESIGN.md b/agents/dewey/work/wui/DESIGN.md new file mode 100644 index 00000000..820b62de --- /dev/null +++ b/agents/dewey/work/wui/DESIGN.md @@ -0,0 +1,67 @@ +# Five dashboard mockups: shared design spec (D02) + +Author: Dewey. Date: 2026-09-12. Inputs: [FEATURES.md](FEATURES.md), [BRIEF.md](BRIEF.md), [DECISIONS.md](DECISIONS.md), brand.js tokens. +Prototype only. Local HTML, no build, no network, no backend. Every action is simulated in the browser and says so. + +## Shared rules across all five + +- Typography: Manrope from assets/fonts. Text wordmark "Mosaic Stack". Provisional labeled outline icons from brand.js; every icon has a visible or accessible text label. +- Color: the ten brand palettes and Light, Dim, Dark modes from brand.js tokens. Semantic status colors (success, warning, danger) stay stable across palettes. +- Landing route is the control board (MOSAIC-STACK-D-001). "Waiting on you" is above the fold in every design. +- Every session and work row shows agent, project, workspace. +- Feature legend in each mockup: implemented, planned, proposed, mockup, matching FEATURES.md. +- Widths: usable from 320 px to 3440 px. Layouts use available width; prose is bounded; ultrawide adds columns rather than stretching text. +- Keyboard: skip link, visible focus, all controls reachable in order, Escape closes overlays, hash routes work with the back button. +- States shown in every design: loading, empty, error with recovery, success, disabled, long content, and a refusal (fail-closed) notice. +- No fake completion: the demo "state" switch changes what is rendered; nothing is saved or sent. + +## Routes (hash router, shared) + +| Route | Name | Primary content | +| --- | --- | --- | +| #/ | Control board | Waiting on you; running sessions across projects; recent settled; quick launch | +| #/sessions | Sessions | All sessions with filters, controller, generation, config check | +| #/sessions/:id | Session detail | Transcript excerpt, goal footer, steering queue, attach as observe or control, config check, evidence | +| #/projects | Projects | Projects with their workspaces, registered agents, missions | +| #/projects/:id | Project detail | Workspaces, registrations, missions, decisions | +| #/agents | Agents | Agent definitions, harness, SOUL revision, where registered | +| #/work | Work | Missions, tasks, assignments, kanban columns | +| #/runs | Runs and evidence | Run records, result.json summary, prune receipts, releases | +| #/messages | Messages | Workspace-addressed threads; comms list | +| #/library | Library | Skills, extensions, packages lifecycle | +| #/settings | Settings | Appearance (palette, mode), accounts by metadata, roles, onboarding | +| #/launch | Launch | Agent, project, workspace, Resume or Fresh, work decision | +| any other | Not found | Recovery links | + +## Primary flows to exercise + +1. See what needs me: open home, read "waiting on you", open the item, act (approve, reply, connect) in simulation. +2. Check a running session: home row to session detail, request observe, note controller and generation. +3. Launch: pick agent, project, workspace; choose Resume; get an already-running conflict; choose connect. +4. Find work: Work route, filter by project, open a task, see assignment and dependencies. +5. Change appearance: Settings, choose palette and mode; persists locally. +6. Hit a refusal: Launch with missing workspace policy; fail-closed notice with next step. + +## Sample data (shared/data.js) + +- Projects: mosaic-stack (workspaces sessions, skills, wui), personal (journal, health), acme-ops (ops, social). +- Agents: darkwing (coordinator), dewey (design), rocko (coder), filbert (reviewer), sage (advisor), velma (research), topher (writer). +- Sessions: ten across projects with mixed states: running, waiting on owner, quiet wait, blocked, stalled, settled, stopped. One conflict candidate. +- Waiting on you: five items: acceptance gate, blocked goal report, quiet wait check-in, decision needed, config mismatch. +- Missions, tasks, assignments, decisions, runs, releases, accounts (metadata only, fake markers), skills, messages. + +## The five styles + +| ID | Name | Navigation | Home composition | Who it suits | Risk | +| --- | --- | --- | --- | --- | --- | +| d1 | Rail | Left icon rail with labels, collapsible; page header with breadcrumbs | Two-column: waiting list left, running sessions table right; ultrawide adds evidence column | Professionals used to Slack, Linear, T3 | Familiar; may feel generic | +| d2 | Deck | Top bar with tabs; content is cards on a fluid grid | Card deck: one card per session; "waiting on you" as a highlighted row of cards | Homemakers, students, mixed audiences | Cards can hide density | +| d3 | Console | Command bar first (Ctrl+K), left project tree, right inspector drawer | Dense table with keyboard row selection and an inspector pane | Developers, operators | Steeper learning curve | +| d4 | Board | Columns by state (kanban), project filter chips across the top | Columns: Waiting on you, Running, Quiet wait, Blocked, Settled; sessions as cards | Project managers, kanban users | Wide layouts; narrow screens scroll horizontally | +| d5 | Stream | Bottom tab bar on mobile, side tabs on desktop; conversation-first | Chronological stream of session events with a pinned "waiting on you" inbox | Personal assistant use, phones first | Weaker cross-project overview | + +## Open questions recorded for the owner + +- Which of the five to iterate (D05 gate). Answered 2026-09-12: d3 Console, MOSAIC-STACK-D-002. +- Whether the web client should offer control or only observe at first. Answered in the session-chat plan (Q1-Q22): full two-way chat, tools, attachments and native approvals, with enforced controller transfer. +- Default palette and mode remain unselected. Mockups default to Harbor and system preference. diff --git a/agents/dewey/work/wui/FEATURES.md b/agents/dewey/work/wui/FEATURES.md new file mode 100644 index 00000000..51aa4980 --- /dev/null +++ b/agents/dewey/work/wui/FEATURES.md @@ -0,0 +1,156 @@ +# WUI feature inventory (D01) + +Author: Dewey. Date: 2026-09-12. Source baseline: working tree on `refactor` at 1993039c plus uncommitted docs. +Purpose: the source-linked list of capabilities the five dashboard mockups must show, with each item labelled by how real it is today. This inventory drives D02 routes and sample data. It is not a product commitment, a backend contract, or a claim that any item is user-tested. + +## Status labels + +| Label | Meaning | Mockup treatment | +| --- | --- | --- | +| implemented | Exists in the rebuild today as a script, extension, or suite-covered behavior. | Show as a working surface with realistic sample records. | +| planned | Owner-accepted plan, charter, or ruling with defined behavior, not yet built. | Show fully; mark "planned" in the mockup's feature legend. | +| proposed | Owner direction or concept note without an accepted plan. | Show where it shapes navigation; label "proposed" and keep it shallow. | +| mockup | Interface behavior invented for the prototype to make the flow complete. | Label "mockup" in the legend and in DESIGN.md open questions. | + +No v1 UI was inspected. Nothing here was verified by running the runtime; labels come from reading the cited files. + +## 1. Landing: control board (owner MVP decision) + +| Capability | Status | Source | +| --- | --- | --- | +| One page listing running agent sessions across projects with status. Deliberately smaller than the current registry line. | proposed, owner decision MOSAIC-STACK-D-001 (2026-09-12) | docs/plans/CURRENT.md lines 17-24 | +| A "waiting on you" section: items where the owner is the blocker (goal_report blocked, owner checkpoints, acceptance gates, quiet waits). | proposed, same decision | docs/plans/CURRENT.md lines 17-24; extensions/goal/README.md (blocked and quiet-wait states) | +| Per-session status vocabulary: running, waiting on owner, quiet wait, blocked, settled, stalled, stopped. | planned (goal states) and proposed (stall detection) | extensions/goal/README.md; docs/plans/2026-09-06_foundation-mechanical-workflow-topics.md | +| Cross-project view means agent, project, workspace shown together on each row. | planned (R5, R11) | docs/plans/2026-09-06_agent-project-workspace-foundation.md R5, R11 | + +Design consequence: every mockup's home route is the control board. Everything else is one step away from it. + +## 2. Agents, projects, workspaces + +| Capability | Status | Source | +| --- | --- | --- | +| Reusable agent definition: identity, type, harness, SOUL, configuration, permission ceiling. | planned (R1, record catalog `agent-definition`) | foundation plan R1; phase2 contract section 3 | +| Project registers agents with RBAC; contains N workspaces; workspace has exactly one parent project. | planned (R2, R3) | foundation plan R2, R3 | +| Same agent in many projects and workspaces with separate sessions. | planned (R4) | foundation plan R4 | +| Launch names agent, project, workspace. Resume is default; Fresh is distinct; first use auto-creates and announces. | planned (R5, R7) and implemented today only as `scripts/agent.sh ` interactive TUI launch | foundation plan R5, R7; docs/TOOLS.md agent.sh | +| Fresh work decision: Continue, Abandon, Select, None. | planned (R8; command flags `--work`) | phase2 contract section 5 | +| Registration records with role, narrowing restrictions, active or revoked. | planned (R32; `registration` kind) | phase2 contract sections 3, 4 | +| Workspace retire and reopen. | planned (R29) | phase2 contract section 5 | +| Legacy sessions adopted only by explicit reviewed assignment. | planned (R30) | foundation plan R30 | +| Managed worktrees: checkout ownership, protected work, recovery. | proposed concept | docs/concepts/managed-worktrees.md | +| Agent seats today: agents// with SOUL.md, CONTEXT.md, work folder. | implemented (repository convention) | agents/README.md; agents/dewey/* | +| Standard roles catalog: Reader, Contributor, Reviewer, Coordinator, plus separate explicit grants. | planned (phase2 section 4) | phase2 contract section 4; roles/*.json (implemented role files today) | + +## 3. Sessions, attachment, control + +| Capability | Status | Source | +| --- | --- | --- | +| Session directory per named session under `/sessions/`; persistent sessions and forks for headless runs. | implemented | AGENTS.md data map; docs/TOOLS.md run-task.sh | +| One controlling connection per running session; others observe; explicit transfer with generation. | planned (R24; `execution connect`, `execution transfer`) | foundation plan R24; phase2 contract section 5 | +| Resume against an already-running session reports the conflict and offers connection, never auto-attaches. | planned (R21) | foundation plan R21 | +| Session attachment across TUI, desktop, and web with the same authority. | proposed concept | docs/concepts/session-attachment.md | +| Config-check: launch fingerprint versus current base configuration, non-blocking mismatch notice recommending Fresh. | planned (R16, R17; `execution config-check`) | foundation plan R16, R17; phase2 contract section 8 | +| Steering and cancellation: queued versus started work, honest interruption semantics. | proposed concept | docs/concepts/queue-steering.md | +| Collaborative state awareness: changed decisions, reconciliation, notification boundaries. | proposed concept | docs/concepts/session-state.md | +| Managed terminal: Mosaic-controlled, Pi remains the engine, no native screen parity required. | planned (R34, owner Q28 A) | foundation plan R34 | +| tmux agent-send and agent-watch as the current transport. | implemented (scripts) | docs/TOOLS.md agent-send, agent-watch | +| Fresh during active work requests controlled replacement. | planned (R25) | foundation plan R25 | + +## 4. Goals, missions, tasks, work coordination + +| Capability | Status | Source | +| --- | --- | --- | +| Goal extension: /goal set, stop, resume, clear; goal_report satisfied, blocked, in_progress; quiet waits; deadline wake; NG footer and Alt+G recall. | implemented (extension with test suite) | extensions/goal/README.md; docs/plans/2026-09-06_goal-quiet-waits.md; 2026-09-06_ng-goal-footer-dev.md | +| Missions and tasks as declarative JSON with strict schemas; missions govern tasks by least-privilege intersection. | implemented | AGENTS.md invariant 4, 7; missions/hello.json; tasks/workspace-demo.json | +| Missions at project and workspace level, single parent, one owner. | planned (R18) | foundation plan R18 | +| Assignments bind task to agent; coordinator decisions; delegated within-plan decomposition. | planned (R19; `assignment`, `decision` kinds) | phase2 contract section 3; foundation plan R19 | +| Approved plan change pauses affected work for reconciliation. | planned (R31) | foundation plan R31 | +| Kanban triggering, stall detection, recovery ladder, minimal owner remediation. | proposed | docs/plans/2026-09-06_foundation-mechanical-workflow-topics.md | +| Standing intents: events, schedules, aspirations, real wake ownership. | proposed concept | docs/concepts/standing-intents.md | +| Conductor role: decompose, dispatch, review, verify, integrate; conductor-apply commits locally. | implemented (protocol and script) | docs/plans/CONDUCTOR.md; scripts/conductor-apply.sh | +| CURRENT.md single next action; SESSIONS.md registry; BUILD-LOG phases. | implemented (file conventions) | AGENTS.md session protocol | + +## 5. Runs, evidence, releases + +| Capability | Status | Source | +| --- | --- | --- | +| Headless task run: `run-task.sh run `; write-once run record with result.json, snapshots, stderr.txt. | implemented | docs/TOOLS.md; AGENTS.md invariant 5 | +| `mosaic-task.mjs validate, run, show, list, retry, prune, resolve-role`; prune leaves a receipt. | implemented | docs/TOOLS.md | +| Invocation-level command evidence: actor, scope, assignment, command, limits, start, end, outcome, evidence refs. | planned (R33, owner Q27 A) | foundation plan R33 | +| Audit recording failure blocks affected executions. | planned (R27) | foundation plan R27 | +| Release: package, activate, rollback, status; activation log append-only. | implemented | docs/TOOLS.md release.sh; AGENTS.md data map | +| Release ensure and unified `mosaic` CLI. | planned (ROADMAP M16, M20) | docs/plans/ROADMAP.md | +| Execution context inspector: selected agent, project, workspace, harness, model, each input's source, revision, hash, inclusion decision, size, token estimate. | planned (ACT-1) with partial prompt snapshot today | docs/concepts/context.md; docs/plans/2026-09-07_agent-context-templates-and-migration.md | +| Foundation synthetic inspector CLI: permission preview, always labelled SYNTHETIC PREVIEW. | planned charter, partly implemented as fixture-only increment (#1500) | docs/plans/2026-09-06_foundation-inspector-charter.md; docs/plans/CURRENT.md | + +## 6. Auth, providers, harnesses, models + +| Capability | Status | Source | +| --- | --- | --- | +| `auth.sh status, accounts`; runtime-only secrets, never in repo or image. | implemented | docs/TOOLS.md; AGENTS.md invariant 3 | +| Registry of providers, accounts (metadata split from credential file), settings profiles, seat selections, harness manifests; `registry validate, list`. | planned charter (#1499 increment 1), fixture-only pieces done (#1500) | docs/plans/2026-09-10_m20-increment1-charter.md; 2026-09-10_m20-increment2-charter.md | +| Multi-account auth, per-seat default accounts, OAuth refresh (gate 7 resolved). | planned (ROADMAP M19; auth plan) | docs/plans/ROADMAP.md; docs/plans/2026-09-03_auth-provider-harness-registry.md | +| Agent runtimes: provider, model, harness distinctions; adapter evidence. | proposed concept | docs/concepts/agent-runtimes.md | +| Pi pinned exactly; release identity from RELEASE file. | implemented | AGENTS.md version pin | + +## 7. Skills, extensions, packages + +| Capability | Status | Source | +| --- | --- | --- | +| Skills lifecycle: install, activate, deactivate, uninstall, role ceilings on skills. | planned (ROADMAP M17, M18) | docs/plans/ROADMAP.md | +| Extensions directory as canonical source; packages/* monorepo succession. | planned (M20, monorepo layout) | docs/plans/2026-09-06_monorepo-source-layout.md; technical map | +| unslop-check as a repository prose gate. | implemented | docs/TOOLS.md unslop-check | +| Skill launcher mismatch recovery. | implemented fix record | docs/plans/2026-09-08_skill-launcher-mismatch.md | + +## 8. Messaging, people, federation + +| Capability | Status | Source | +| --- | --- | --- | +| Messages address a workspace; identity reuse must not mix conversations. | planned (R12) | foundation plan R12 | +| `mosaic comms` boundary with site, instance, project, workspace, source, target; list and message. | proposed (owner CLI example) | docs/plans/2026-09-06_foundation-federation-comms-topics.md | +| Master registry: site, instance, project, workspace, agent; federation across sites. | proposed | same file | +| Multi-user authority: attribution, observation, control, scoped permission. | proposed concept; owner also specified multi-user by default | docs/concepts/multi-user.md; install-onboarding topics | +| Transports behind Mosaic: tmux internal, Git durable comms, Matrix, Discord, Slack. | proposed, no backend selected | federation-comms topics | + +## 9. Memory and context + +| Capability | Status | Source | +| --- | --- | --- | +| Memory architecture: knowledge categories, admission, scope, retrieval. | proposed concept | docs/concepts/memory-architecture.md | +| Memory provenance: lineage, correction, deletion coverage. | proposed concept | docs/concepts/memory-provenance.md | +| Only designated general preferences shared by default; personal and project context supplied where authorized. | planned (R28) | foundation plan R28 | +| One canonical SOUL per agent; template bootstrap; revision resolved at launch. | planned (R16; ACT-1) | docs/concepts/soul.md | +| Context sources with permitted scopes and sharing designation. | planned (`context-source` kind) | phase2 contract section 3 | + +## 10. Onboarding, installation, settings + +| Capability | Status | Source | +| --- | --- | --- | +| Install wizard: deployment type, system auth (SSO, OIDC, LDAP, internal), break-glass admin, initial user, site, instance, initial agent (name, gender, personality, communication style), default harness, harness account, first project and workspace, routing. Required versus optional steps with Skip. | proposed (owner requirements) | docs/plans/2026-09-06_foundation-install-onboarding-topics.md | +| Use-case presets: software factory, personal assistant, executive assistant, journal, health tracker, writing, social media, business operations, job applications. | proposed | same file | +| Advanced user profile and account linking, opt-in and access-controlled. | proposed | same file | +| Reconfiguration mode at any later time, resumable and validated. | proposed | same file | +| Ten palettes, Light, Dim, Dark, user-selectable, shared across site and apps. | mockup (brand board), owner-liked | DECISIONS.md; brand.js | +| System config is a single fail-closed file created by bootstrap only. | implemented | AGENTS.md invariant 2 | + +## 11. Cross-cutting interface rules taken from the sources + +- Show agent, project, workspace on every session and work surface (R5, R11). Never let the interface keep a competing task list. +- Distinguish accepted, planned, proposed, and unverified. Proposals are labelled as proposals (owner Q6). The interface must never present a mockup action as a live effect. +- Refusals are first-class: a fail-closed refusal is shown with its reason and what to do, never routed around (AGENTS.md invariant 6). +- Waiting on the owner is never expiry into approval (phase2 section 11). The control board shows what is waiting and for how long, with the next step. +- Observers cannot control. The interface shows the current controller, generation, and how to request transfer (R24). +- Configuration mismatch is a non-blocking notice with an on-demand check (R17). +- Secrets never appear. Accounts are shown by metadata only (AGENTS.md invariant 3; M20 charter). +- Append-only records are shown as history, never edited in place (AGENTS.md invariant 9). + +## 12. Gaps the mockups will surface for the backend + +These are not features. They are questions the UI raises that the docs do not yet answer. + +1. Where the "waiting on you" list comes from: goal reports, decision records, quiet waits, and acceptance gates are separate sources today. +2. Stall detection thresholds and who may act on a stalled session from the web. +3. Whether the web client can be a controller (R24) or only an observer at first. +4. How notifications reach a user outside the app (no transport chosen). +5. Whether project and workspace creation is a web action or a reviewed commit. +6. How the control board scopes across sites and instances once federation exists. diff --git a/agents/dewey/work/wui/HISTORY.md b/agents/dewey/work/wui/HISTORY.md index 73841ac8..f4919244 100644 --- a/agents/dewey/work/wui/HISTORY.md +++ b/agents/dewey/work/wui/HISTORY.md @@ -26,3 +26,56 @@ Append-only author notes. Goal lifecycle belongs to the operator's extension; TA - First owner review: icon has a robot-crotch association; themes and Manrope received positive feedback. Recorded interpretation and next revision in DECISIONS.md and B09. Prototype files unchanged. First goal remains closed; no dashboard work started. - Owner removed final logo/iconography as a dashboard prerequisite. Updated BRIEF.md and TASKS.md: D01 is ready, with Manrope/current themes, text wordmark and provisional labeled icons. This clarification changes task dependencies, not the completed first goal or backend authority. + +## 2026-09-12: five dashboard mockups and comparison (D01 to D05) + +- Took over the Dewey seat from the pi session 01a08111 at Jason's direction. Registered in docs/SESSIONS.md. Folded in owner decision MOSAIC-STACK-D-001: the control board is the landing page of every design. +- D01: FEATURES.md inventories capabilities from README, TOOLS, plans, CURRENT.md, and the control board plan, marked implemented, planned, or proposed. No v1 UI was opened. +- D02: DESIGN.md fixes 14 routes, primary flows, demo states, and the five styles. mockups/shared/data.js holds a hand-written sample mirroring current sessions and records; credentials appear only as "runtime mount, not shown". +- D03: built mockups/index.html and five designs (Rail, Deck, Console, Board, Stream) over one shared app, views, data, and stylesheet. Hash router, palette/mode/state URL overrides, local-storage persistence, and a global rule that every action produces a labelled simulated notice. +- D04: wrote checks/mockups-verify.mjs. First run found 11 failures; most were real layout defects at 320 px, two were harness defects (colour parser, static check reading over file URL). Fixed absolutely positioned hidden labels escaping scroll boxes, nav rows growing past headers, breadcrumb and kanban wrapping, bottom-tab sizing, tinted counters failing contrast, and badge tints. Final run: 31 checks, 0 failed, 2 not verified. Author inspected phone, desktop, and 3440 px captures for every design and fixed a stretched avatar and an accidental header wrap in Board. +- D05: README.md now opens with the mockup entry path, a comparison table, and an eight-step review script. Stopped at the selection gate. No design is approved; no commit, push, backend, or fleet change occurred. Test Chromium processes and profiles were closed by the script. + +## 2026-09-26: tracking reconciled to D-002 + +- Took over the Dewey seat from pi session 01a0981a in T3, under Sage as lead. Found TASKS, README, DESIGN and DECISIONS still saying D05 was waiting on Jason, two weeks after he picked Console (D-002). Recorded the selection, marked D05 and I01 done, and marked I02 and I03 superseded. The Console implementation (ea00ec66) and the session-chat plan replaced them. +- Sage asked for this on 2026-09-26. Nothing else in this workspace changed. Nothing was committed. + +## 2026-10-04: slice 1 S5 mockup (row 40, #1522) + +- Built `mockups/slice1/`: inbox, tasks, agents and trail views in the live Console shell, from fixture rows. `reads(S)` in `app.js` stands in for the `packages/bus` read module that Rocko owns (lead decision 56, Q1). The renderers see only its output. +- Moved the fixtures from schema v3 to v3a (d55e41fd) once S2 switched. `task.created` now cites its `human.input` in `request`, and the task trail joins through that id. Section 5 of SLICE1-VIEWS.md corrects my Q3 wording, which had put the task ref on the `human.input`. +- `checks/slice1-verify.mjs`: 15 checks, 0 failed, 3 not verified. One check inserts every fixture row into schema v3a. On its first run it found a malformed digest, and message and delivery seq numbers that ran against time. All three are fixed. +- Mutation round 1 (12 mutants): 11 killed. The skip-link mutant survived because the hashchange guard alone kept the router away. The keyboard check now also requires the route to stay in the URL. +- Mutation round 2 (15 mutants, run in a scratch copy that mirrors the repository paths, after a clean baseline): 15 killed. The three new mutants cover the request join, a `task.created` citing an unknown request, and message seq out of time order. +- Reported a finding for Rocko and Darkwing (SLICE1-VIEWS.md section 8): a stale poll read becomes the latest snapshot, so `tasks_open` shows the old bucket until the next tick. +- Nothing committed. + +## 2026-10-04: S5 mockup reshaped to the Q1 module and schema v3b + +- Lead decision 60: check 15 now loads schema v3b (179ffe35) and reads current state from `task_current` and `tasks_open`. It agrees with the page on every task, #42 included. The "stale read" marks must be exactly the snapshot rows `task_current` skips. +- Reshaped to Sage's Q1 shapes. `data.js` holds raw v3b rows, written the way the candidate broker writes them, with millisecond timestamps (the candidate Store refuses the 20-character form; the schema doesn't check it). New `q1.js` ports the four reader verbs. `reads(S)` builds views only from them, and labels anything else "not in the Q1 module". Inbox and decision pages show the `authorization` context and badge the approving option. +- New check 16 runs Rocko's uncommitted Store and Broker on a temporary data root with the same rows and compares `inbox`, `tasks`, `agents` and 21 trails with `q1.js`: 203 rows, equal (broker.mjs ead6e668, store.mjs e69cb395). It only imports from `packages/bus`. +- Verify: 15 checks, 0 failed, 2 not verified (forced colors, screen reader). The "Q1 module shape" not-verified entry is gone. +- Mutation round 3 (21 mutants, scratch copy): 20 killed on the first pass. Reversing the decision trail survived, because check 8 only checked the task trail's order. Check 8 now checks both, and the rerun killed it. M5 was caught by check 15 rather than the check I had named. +- SLICE1-VIEWS.md revision 3; section 9 lists what the views need that no Q1 verb returns, for Rocko. +- Nothing committed. + +## 2026-10-05: lead decision 63 + +- Sage sent the section 9 gap list to Rocko for S4; session events go to S6, credential events to S3. Unfilled gaps keep their label in S5. Check 16 will pin shas from the S2 round 2 commit (manifest 61519059) once Sage names it. Recorded in SLICE1-VIEWS.md and TASKS.md. Nothing committed. +- Checked ahead of the commit: the working tree's packages/bus now matches the round 2 manifest (broker.mjs aa5efbbf, store.mjs e69cb395, views.mjs 446b6da4, schema.sql 179ffe35). Verify against it: 15 checks, 0 failed, 2 not verified; check 16 compared 203 rows, all equal (`~/dewey-scratch/s1-verify-r2.txt`). +- S2 landed at 38828a2c (Sage; the round 2 manifest 61519059). Check 16 now extracts packages/bus from that commit with `git archive` into its temporary directory and imports from there, so working-tree edits (Rocko's uncommitted README change for row 43, or anything later) don't count. It prints the shas from the commit: broker.mjs aa5efbbf, store.mjs e69cb395, schema.sql 179ffe35. Run from a copy outside the repository it needs `DEWEY_S1_REPO`, or it records "not verified"; tried both ways in the scratch copy. Verify: 15 checks, 0 failed, 2 not verified; 203 rows equal. The six mutants that reach the stand-in (M4, M13, M14, M15, M19, M20) are still killed. Writer shapes in the committed broker match data.js. Headers and SLICE1-VIEWS.md no longer call packages/bus a candidate. Nothing committed. + +## 2026-10-05: S2b (4afab552) + +- Repinned check 16 to 4afab552: broker.mjs 44c161c2, store.mjs e69cb395, schema.sql 179ffe35. Verify: 15 checks, 0 failed, 2 not verified; 203 rows equal. Check 15 doesn't use packages/bus and is unchanged. +- Finding (SLICE1-VIEWS.md section 10): S2b sends every agent `message.send` through the single-use authority helper, so a supplied `decision` is checked as an authorization even for a within-role send. A PM `DECISION` message citing an open `role.launch` decision is refused with `decision-mismatch`; at 38828a2c it was written. Reproduced on both commits extracted with git archive (`~/dewey-scratch/s2b-probe.w9pJ`). The fixture's decision DMs (messages 101, 102) are such messages. Check 16 can't see this: it loads rows by SQL and tests only the reader. Recommended the connector send the DM from the decision itself. Fixture unchanged pending a ruling. Nothing committed. +- Lead decision 65 (dd35a0ab): a within-role `message.send` treats `decision` as a citation (exists check, stored, not class-matched, not consumed, not in `action.allowed`); otherwise it stays the authority. Messages 101 and 102 stay in the fixture. S2c (row 44, #1526) implements it. Recorded in SLICE1-VIEWS.md section 10 and TASKS.md. Nothing committed. + +## 2026-10-05: S2c (d27042fa) + +- Repinned check 16 to d27042fa (S2c, row 44): broker.mjs 51e03b33, store.mjs e69cb395, schema.sql 179ffe35. Verify: 15 checks, 0 failed, 2 not verified; 203 rows equal; check 15 loads 106 rows. Output: `~/dewey-scratch/s1-verify-d27042fa.txt`. +- Probe rerun on 38828a2c, 4afab552 and d27042fa. At d27042fa a within-role citing send is written, the decision is stored and not consumed, an unknown decision refuses with `decision-not-found`, and the send's `action.allowed` carries no decision. That is lead decision 65 as written. +- Fixture: added the `action.allowed` {action `message.send`, class `within-role`, target `human`} event 1 ms before messages 101 and 102, as the broker writes it since S2b. Headers in `data.js` and `q1.js` name d27042fa. +- SLICE1-VIEWS.md: section 10 says S2c restores 101 and 102, with a d27042fa column in the probe table; sources, sections 1, 7 and 9 cite d27042fa. A broker-written fixture with a citing `DECISION` message is still the regression test check 16 can't give. diff --git a/agents/dewey/work/wui/README.md b/agents/dewey/work/wui/README.md index c1eeea26..a64ff531 100644 --- a/agents/dewey/work/wui/README.md +++ b/agents/dewey/work/wui/README.md @@ -1,6 +1,41 @@ -# Mosaic Stack brand board +# Mosaic Stack WUI design work -Status: ready for Jason's branding review. No brand choice is approved and no dashboard mockups have been built. +Status as of 2026-09-26: Jason selected d3 Console on 2026-09-12 (MOSAIC-STACK-D-002). It is implemented in `packages/webui` (ea00ec66, #1507) and continues under the session-chat plan, `docs/plans/2026-09-13_webui-session-chat.md`. The five mockups and the brand board below are kept for reference. No brand choice is approved. + +## Dashboard mockups: open the comparison + +Entry page: + +`/mnt/storage/src/mosaic-stack/agents/dewey/work/wui/mockups/index.html` + +Open that file in a browser on this host. It needs the `mockups/shared` folder, `brand.js`, and `assets/fonts` beside it. No server, package, account, or network is required. Everything is a local design prototype: every button produces a "Simulated" notice and nothing touches the fleet, the data root, or credentials. + +The five designs share one data set, one route list, and one settings page. They differ in navigation and in how the control board lays out. + +| Design | Shape | Choose it when | +| --- | --- | --- | +| Rail | Left rail, board with waiting list on top, running table, side panels; fourth column on ultrawide | You live in it all day and want stable navigation at any width | +| Deck | Top tabs, waiting cards in a row, session cards | You glance a few times a day and want the waiting row to shout | +| Console | Command bar with Ctrl+K, project tree, dense table, inspector drawer | You run many sessions and prefer keyboard and density | +| Board | Kanban by session state with project chips | You think in states and want to see load per column | +| Stream | Pinned inbox, time-ordered stream, bottom tabs on phones | You check from a phone often | + +Suggested review, about fifteen minutes: + +1. Pick a palette and appearance on the comparison page. The buttons under each design open it with that choice. +2. Open each design's control board. Ask whether the waiting-on-you section would make you act within a few seconds. +3. Narrow the window to a phone width, then widen it to your full monitor. The shell should stay usable at both. +4. Open the Darkwing session from the Session view button. Try Observe, Request control, Stop, and Check now on the config notice. +5. Open Launch. Try the retired workspace archive-2025 and an agent that is already running. Both refuse with a reason. +6. On Settings, change the demo state to loading, empty, and error, then back to normal. +7. Keyboard only: Tab from the top, use Escape to close anything open, and in Console press Ctrl+K. +8. Write notes on the comparison page and download them, or reply here with the design to iterate and what to change. + +What to decide: the design to iterate in HTML, features to add or drop, and whether the control board should stay the landing page. Selection is a human decision; nothing in the pages records approval. + +Records: [feature inventory](FEATURES.md), [design spec](DESIGN.md), [verification](VERIFY.md) with `evidence/mockups/report.json` and screenshots, [tasks](TASKS.md), [history](HISTORY.md), [decisions](DECISIONS.md). + +## Brand board (earlier phase) ## Open the board @@ -32,7 +67,7 @@ You can also download the selected palette's tokens for all three modes. This is - Default palette and appearance behavior. - Palettes to change or remove before dashboard exploration. -Branding approval is a separate human decision. Choosing controls or downloading notes does not approve anything automatically. Dashboard work stays stopped until Jason supplies the branding decision and direction to proceed. +Branding approval is a separate human decision. Choosing controls or downloading notes does not approve anything automatically. Jason later allowed dashboard work to proceed with Manrope, the ten palettes, and a text wordmark while the logo stays unresolved; see DECISIONS.md. ## Evidence and project records diff --git a/agents/dewey/work/wui/SLICE1-VIEWS.md b/agents/dewey/work/wui/SLICE1-VIEWS.md new file mode 100644 index 00000000..b301cd98 --- /dev/null +++ b/agents/dewey/work/wui/SLICE1-VIEWS.md @@ -0,0 +1,522 @@ +# Slice 1 S5: WebUI views for inbox, tasks, agents and trails (design note) + +Dewey, 2026-10-04. Row 40, #1522. Design only: no code, no commit. S5 +follows S4, so nothing here starts the build. + +Revision 2, same day: lead decision 56 (c9c1699a) answered Q1 to Q5 and +accepted all five recommendations. Sections 1, 3.2, 3.5, 5 and 7 now say +what was decided. Section 8 is a new finding for the Q1 module. The +mockup is in `mockups/slice1/`, checked by `checks/slice1-verify.mjs`. +Its fixtures follow schema v3a, and the verify script loads every row +into that schema. + +Revision 3, same day. Three things changed: +- Schema v3b (179ffe35, lead decision 60) landed. It adds the + `task_current` view and builds `tasks_open` on it (lead decision 59). + The fixture check now loads v3b and reads current state from those two + views. It agrees with the page on every task, #42 included. Section 8 + records the ruling. +- The mockup is reshaped to the Q1 module (Sage's Q1 shapes). `data.js` + holds raw v3b rows written the way the candidate broker writes them. + `mockups/slice1/q1.js` ports the four reader verbs, and `reads(S)` in + `app.js` builds the views only from what those verbs return. A new + check runs Rocko's own candidate reader over the same rows and + compares. Section 1 and section 7 describe this. +- Inbox rows now carry `authorization {action, target, approvalChoice}` + from the `decision.raise` event, and the views show it (section 3.1). + What the page needs and no Q1 verb returns is labelled on the page and + listed for Rocko in section 9. + +Sources, pinned by sha256 prefix: +- brief `docs/plans/2026-10-04_slice-1.md` (655e1290, commit 43c48d7a), S5 + section and the shared rules; +- data model note (948b94ce), addendum A (0b36acb0), addendum B (14e747f5). + B wins over A, and A wins over the note; +- schema v3 `agents/darkwing/work/slice1-proto/schema-v3.sql` (084d0a07, + commit 7ed83178, lead decision 55), replaced by schema v3a + `schema-v3a.sql` (d55e41fd), which S2 builds on, then by schema v3b + `schema-v3b.sql` (179ffe35, lead decision 60). The mockup follows v3b; +- `packages/bus` as committed in d27042fa (S2c, row 44; S2 was + 38828a2c, S2b 4afab552): broker.mjs 51e03b33, store.mjs e69cb395, + views.mjs 446b6da4; +- PRD draft 0.4 `docs/prd/mosaic-stack.md` (d907705a): REQ-WEB-1, + REQ-DEC-1 to 4, REQ-CLI-1, REQ-EVT-1; round 3, 7B; +- DEFERRED.md, "CHAT-03 I1 round 2 follow-ups, for the I3 brief". + +Not read on purpose: today's queue. The views follow the data model. + +## 1. What the WebUI reads, and through what + +REQ-WEB-1 says the WebUI shows the same data as the CLI. The S4 brief says +every CLI command reads through the broker and never opens `bus.sqlite`. +The WebUI follows the same rule: + +- The browser never talks to the broker. The WebUI server (`packages/webui`) + calls the broker's read verbs over the local socket and serves JSON to + the page, the way it proxies the board today. +- The WebUI never opens `bus.sqlite`, the business file or a token file. + Bucket titles, bot names and launch limits come from the broker, which + already loaded them. +- The WebUI adds no write route for slice 1 data (section 6). + +One set of read functions serves both renderers, so the two can't drift. +Lead decision 56, Q1: the module lives in `packages/bus`, Rocko owns it, +and both the CLI and the WebUI import it. The CLI formats text and the +WebUI server serves JSON. The module, `packages/bus/src/views.mjs`, is a +thin client: `inbox`, `tasks`, `agents` and `trail(subject)`, each +one broker call. The mockup's `mockups/slice1/q1.js` stands in for those +four calls over fixture rows, and the verify script checks it returns +what the broker at commit d27042fa returns. `reads(S)` in `mockups/slice1/app.js` +builds the view objects from the stand-in alone. A second object, +`missing(S)`, holds what no verb returns. Each entry names its source, +and every renderer that shows one labels it "not in the Q1 module". +When Rocko pins an example fixture, it replaces `data.js`. + +## 2. Routes + +Console keeps its shell, its palettes and its keyboard rules. The left +column gains a section list above the project tree. Hash routes work with +the back button, as the mockups did. + +| Route | View | Main source | +|---|---|---| +| `#/` | Control board (unchanged) | the board scan | +| `#/inbox` | Decisions routed to the human, open first | `decisions`, `decision_events` | +| `#/inbox/` | One decision, its options and its history | same, plus `supersedes` chain | +| `#/tasks` | Tasks by state | latest `task_snapshots` per task, `task.*` events | +| `#/tasks/` | One task and its trail | same, plus the trail (section 3.4) | +| `#/agents` | Role instances, holders and live sessions | business file via broker, `role_claims`, `session.*` events | +| `#/trail/task/`, `#/trail/decision/` | The ordered trail | events, decisions, messages, deliveries | +| `#/conversation/...` | CHAT-02 history and CHAT-03 drive (existing) | the board and `packages/conversation` | + +A task ref in a URL is `vikunja:/`, encoded. The `#12` a +person sees in Vikunja is display only (addendum A section 1). + +## 3. The views + +Every view keeps the Console states: loading, empty, error with the last +good data kept and a warning, and refusal with the reason. All +agent-authored text (questions, option text, recommendations, message +bodies, task titles and descriptions) is shown as text under the CHAT-02 +rules: Markdown stays as source, and controls and bidi marks show as +visible symbols. + +### 3.1 Inbox + +- Rows: decisions with `route_to = 'human'` and no closing row (`resolved`, + `withdrawn`, `expired`). Blocking first (the `urgent_inbox` view), then + oldest first. The note's rule is "gated first, then oldest", and every + human-routed decision is gated, so `blocking` is the useful split. +- Each row: question, class and action, raised by role and run, age, + `task_ref` and `requirement_ref` as links, a "blocking" badge, and + whether a DM went out (a `deliveries` row with transport `discord-dm`). +- Detail: the options as a numbered list of key and text, the + recommendation marked, the `seen` history, and earlier versions through + `supersedes`, each shown `withdrawn`. +- Approval context, from the row's `authorization`: the card and the + detail say "Choosing “” approves on .", and the + approving option carries an "approves " badge. The approving + choice need not be the recommendation: in the fixture, the conflict on + #48 recommends `queue`, and `vikunja` approves `task.close`. A decision + without a recorded raise says no option is marked as approving. +- Resolution stays in the CLI (REQ-DEC-3). The detail shows the exact + command, `mosaic decide `, one per option, with a Copy button. + Copy puts text on the clipboard and does nothing else. There is no + Resolve button, disabled or otherwise. +- A second tab, "Routed to roles", lists open cross-role decisions by + arbiter (`pm`, `cto`). It's read-only too. Closed decisions get a + "Recent" list: choice, by, via and time open. + +### 3.2 Tasks + +- Rows: the latest snapshot of each task in the business, grouped by the + five bucket titles (`todo`, `in-progress`, `in-review`, `blocked`, + `done`). `done` is collapsed and shows the last 20. +- Columns: `#index` and title, assignee (bot name), requirement id (from + `task.created`, not the description line), due date, priority, percent + done, queue row if the task has one, and the time of the last change. +- Markers, each linked to its event: + - "changed in Vikunja" for a task in `task_external_changes`. A task the + broker never wrote is always in that view (addendum B section 5), so + the marker reads "not created by the stack" when no `self` snapshot + exists; + - "conflict" for an unresolved `task.conflict`, linked to the decision + raised to the PM; + - "missing" with the reason (`moved`, `not-found`, `no-access`) for a + tombstone, and the new project id for `moved`. +- Freshness: a line under the heading, "Vikunja last read