Skip to content

Commit 89bb581

Browse files
trilltinoclaude
andcommitted
ROADMAP: plan phases 7-9 — complete the frontends, make Coral visible
The gap the plan targets: the feed already serves the whole agent-commerce layer (verification verdicts, /api/runs, /api/reputation, ledger replay) and the frontends render none of it; nothing in any UI shows the coordination IS Coral (threads, @mentions, presence, the puppet API); and feed/coralState.ts flattens messages to {sender, text}, dropping thread ids + mentions, so no UI could show the bus even if it tried. - Phase 7.0 (enabler): coralState keeps thread/mention structure; feed gains /api/threads, /api/session, /api/events (watcher proxy) - Phase 7 (marketplace): verification badge, Coral bus tab, Runs tab over the ledger, reputation scoreboard, replay banner, round-flavor labels (harness on bids, research events strip), fixture-driven Playwright coverage - Phase 8 (agent-economy): narrate the puppet injection in Checkout, session header, broker fan-out lanes in Swarm, MCP-primitive timeline in Autonomous - Phase 9 (txodds): coral round gets the existing visualizer (print the SESSION one-liner — same wire protocol, zero new UI), watcher event markers on the oracle board; npm run dev stays Coral-free by design Build order 7.0 -> 7 -> 9 -> 8; fixtures-first, no new frameworks. Refreshed the stale "Immediate next steps" (still pointed at Phase 0-2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 814d409 commit 89bb581

1 file changed

Lines changed: 112 additions & 5 deletions

File tree

ROADMAP.md

Lines changed: 112 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,110 @@ Sellers stop being stateless; the ledger becomes a track record.
293293
**Done when:** a seller's bid quality visibly changes based on its own history, and the
294294
buyer's award reasoning cites reputation.
295295

296+
---
297+
298+
## Phases 7–9 — complete the frontends, make Coral visible (planned 2026-07-05)
299+
300+
The audit that motivates this: **the feed already serves the whole agent-commerce layer —
301+
`verification`, `/api/runs`, `/api/reputation`, ledger replay (`source:"ledger"`) — and the
302+
frontends render none of it** (zero references in `examples/marketplace/web/src`). Worse, nothing
303+
in any UI shows that the coordination *is* Coral: threads, `@mentions`, agent presence, and the
304+
puppet trick are all invisible — a judge can't tell the market apart from a REST API. And the
305+
feed's `collectMessages` flattens the extended state to `{sender, text}`, **dropping thread ids and
306+
mentions**, so no UI could show the bus even if it tried. Fix the data first, then the three UIs.
307+
308+
### Phase 7.0 — enabler: the feed exposes Coral-native structure
309+
310+
*The one data change everything else hangs off.*
311+
312+
**Build**
313+
- `examples/marketplace/feed/src/coralState.ts`: stop dropping structure — extract
314+
`{ threadId, threadName, sender, text, mentions[], timestamp }` per message (keep the
315+
defensive key-name fallbacks). `foldRounds` keeps working on `{sender, text}` unchanged.
316+
- New endpoints on the feed:
317+
- `GET /api/threads?session=` → threads with participants + full message envelopes (the bus view)
318+
- `GET /api/session?session=` → session id, namespace, agents present (from extended state)
319+
- `GET /api/events` → proxy of the research watcher's `/queue` (`WATCHER_BASE`, default :4600) so
320+
the browser never needs a second origin
321+
- Persist the richer envelope into `transcript.jsonl` (ledger gains mentions/threads for free —
322+
`TranscriptEntry` grows optional fields, replay stays compatible).
323+
324+
**Done when:** `curl /api/threads` shows the market thread with participants and per-message
325+
mentions for a live session AND for a ledger replay.
326+
327+
### Phase 7 — marketplace visualizer: render what the feed already knows
328+
329+
*The flagship UI. One new tab per invisible layer, all fixture-testable.*
330+
331+
**Build** (`examples/marketplace/web/`)
332+
- **Verification badge** on `RoundCard``round.verification` (verdict + by + reason) next to the
333+
settlement badge; a failed verdict renders the "funds stay refundable" state. *(Smallest change,
334+
biggest honesty win — do first.)*
335+
- **Coral tab (the bus view)** — threads → messages with sender colors, `@mention` chips, verb
336+
badges (WANT/BID/AWARD/VERIFY/…), the session's agent roster with presence. This is the tab that
337+
demos Coral: you watch the mentions fly before the market meaning is overlaid.
338+
- **Runs tab (the ledger)** — list from `/api/runs` (session/round/status/score-relevant fields);
339+
click into a run → the facet trail: want → bids → award reasoning → escrow + deposit tx →
340+
sha256-bound delivery → verifier verdict → Explorer-linked txs → raw transcript. "What did the
341+
agent do for the money" as a page.
342+
- **Reputation panel**`/api/reputation` scoreboard (score, won/settled/verify-fails/refunds);
343+
highlight when an award reason cites track record.
344+
- **Replay banner** — when `/api/feed` returns `source:"ledger"`, show "replaying from the run
345+
ledger — coral-server offline" instead of silently looking live.
346+
- **Round-flavor awareness** — freelancer: harness label on each bid (`seller-scribe` = node-llm,
347+
`seller-claude` = claude-code); research: an events strip fed by `/api/events`
348+
("BRA v ARG moved 6.8pp → WANT queued → round 3").
349+
- **Tests**: record a verifier-gated fixture (the persist tests already build one synthetically);
350+
Playwright specs for the badge, the Runs tab, the replay banner, and the Coral tab rendering
351+
mentions.
352+
353+
**Done when:** a cold `npm run marketplace:web` against a finished session (coral down, ledger
354+
only) shows: the replay banner, settled + verifier-refused rounds with verdicts, the run detail
355+
trail with working Explorer links, the reputation scoreboard, and the bus view with mentions.
356+
357+
### Phase 8 — agent-economy dashboard: show the puppet trick
358+
359+
*This example owns the Coral surfaces marketplace doesn't — put them on screen.*
360+
361+
**Build** (`examples/agent-economy/web/` + `bridge/`)
362+
- **Checkout tab: the puppet reveal** — when the human clicks buy, render the injected message
363+
labelled "you → puppet API, posted *as* user-proxy", then the seller's `@mention` reply — the
364+
exact mechanic that makes the human a session participant (bridge already has both sides; it
365+
just doesn't narrate them).
366+
- **Session header** (all tabs) — session id, namespace, agents online.
367+
- **Swarm tab: the fan-out view** — the broker's **one-private-thread-per-seller** pattern
368+
(Coral capability §5.5) drawn as parallel lanes: quote requests out, correlated replies in,
369+
the winning leg + both escrow settlements marked.
370+
- **Autonomous tab: primitive timeline** — each step tagged with the MCP tool behind it
371+
(`create_thread``send_message``wait_for_mention` → …) so "agents coordinating over MCP"
372+
is literal, not a caption.
373+
374+
**Done when:** a demo viewer can point at the screen and say which message the human injected,
375+
which threads the broker fanned out, and which MCP primitive fired at each step.
376+
377+
### Phase 9 — txodds: give the Coral round a face, tie the board to the market
378+
379+
**Build** (`examples/txodds/`)
380+
- **The coral round gets the visualizer** — it's logs-only today, yet it speaks the same wire
381+
protocol: `npm run coral` prints the session id + the exact feed/web one-liner
382+
(`SESSION=<id> npm start` in the feed, `npm run marketplace:web`); document in
383+
`coral/README.md`. Zero new UI code — the point *is* that the same visualizer works.
384+
- **Event markers on the oracle board**`web/app.js` polls the watcher (`/queue`, CORS already
385+
open) and badges fixtures whose implied probability moved ("▲ 6.8pp — research WANT queued"),
386+
linking the live board to the research round. Degrades silently when the watcher is down.
387+
- **Keep `npm run dev` Coral-free** — the design seam stays; the market panels only light up when
388+
a feed/watcher is reachable.
389+
390+
**Done when:** a fixture that moves on the live board visibly triggers the research story on the
391+
oracle page, and the coral round can be watched in the browser instead of `docker logs`.
392+
393+
**Build order:** 7.0 → 7 (verification badge first) → 9 (cheap, mostly wiring) → 8 (largest UI
394+
surface). Constraints: no new frameworks (Vite React stays Vite React, the oracle stays no-build),
395+
fixtures-first testing (every new view must render from recorded state with no devnet/Docker), and
396+
the bus view reads the same feed the ledger writes — one source of truth.
397+
398+
---
399+
296400
### Future (explicitly out of scope for now)
297401

298402
- **Finance rails:** savings-mcp-style read-only opportunity sellers; Normandy-style
@@ -323,8 +427,11 @@ buyer's award reasoning cites reputation.
323427

324428
## Immediate next steps
325429

326-
1. Phase 0: scaffold `packages/agent-runtime/src/ledger/` + persist marketplace rounds.
327-
2. Phase 1: extract `HarnessAdapter` + `node-llm` adapter (pure refactor, protected by the
328-
existing marketplace round as the regression test).
329-
3. Phase 2 spike: get Claude Code joining one Coral session via injected `.mcp.json`,
330-
following the tutorial repo's startup-script pattern, before building the full launcher.
430+
*(Phases 0–6 shipped and live-validated — see the per-phase status notes above.)*
431+
432+
1. Phase 7.0: extend `feed/src/coralState.ts` to keep thread ids + mentions, add
433+
`/api/threads` + `/api/session` + `/api/events` — the data unlock for every UI below.
434+
2. Phase 7 first slice: the **verification badge** on `RoundCard` (the feed already folds
435+
`round.verification`; the UI just never renders it), then the Runs tab and the bus view.
436+
3. Phase 9 cheap wins: `npm run coral` prints the feed/visualizer one-liner; watcher event
437+
markers on the oracle board.

0 commit comments

Comments
 (0)