Skip to content

feat: coco, the music ghost — a second agent on the desk - #7

Merged
srivtx merged 20 commits into
mainfrom
feat/music-ghost
Sep 4, 2026
Merged

feat: coco, the music ghost — a second agent on the desk#7
srivtx merged 20 commits into
mainfrom
feat/music-ghost

Conversation

@srivtx

@srivtx srivtx commented Sep 4, 2026

Copy link
Copy Markdown
Owner

What this ships

coco — the red music ghost: a second agent summoned by moco over the bus.

  • Music on the wire: moco answers play wishes by searching YouTube and handing tracks to coco over musicBus — the handoff is receipted as a coco · chip in both transcripts
  • Hide ≠ stop: coco tucks away, the music hums on; ■ stop is the only way the music dies
  • Own chat window: click coco to talk to it directly — control verbs (skip · pause · hide · louder) run on the local rules brain at zero tokens; play wishes ride the desk pipeline (server-side rules brain, LLM never wakes); general chatter uses the cheap model with a coco persona
  • Understands phrasing, not patterns: the ghost's live state rides the prompt as one compact line (~40 tokens, metered, validated + capped server-side) so 'what's this song' works in any words; commands stay free
  • The agents view: both characters on their own woven desk mat (loom cloth, not the bot's wool) — two cloths sewn by one band-thread seam, and the seam IS the bus wire
  • Design law: panels live in one absolute column that flips above/below the head by free sky (moco's own law, inherited); drag clamps keep the head on-screen; the double-click truly hides the video; words stream once; statuses say once

Evidence

  • bun run typecheck + bun run lint + 37/37 brain tests + make verify green on every commit
  • 15 new music-brain test cases (hide/controls included)
  • DESIGN_SYSTEM §7 amended: the twin-character law and the woven mat
  • Known-and-fixed races documented in commit messages (player mount wait, poisoned ready promise, animate-rise fill vs opacity)

…music

- music/brain.ts: deterministic zero-token intent parsing (D7) — control
  verbs anchored to whole commands, mood words to fixed search strings
- music/youtube.ts: server-side track resolution via YouTube Data API v3
  (key never reaches the browser; embeddable-filtered; honest no-key refusal)
- music/store.ts: the event bus the desk agent calls the ghost over
- music-ghost.tsx: the character — eyes only (no mouth), band-red volume
  with wisp skirt, beat bob at ~109 BPM, enjoy-arcs, drag + click controls,
  visible-size embed in the now-playing card, autoplay-guard fallback
- the ghost follows the bot's containment + motion laws (DESIGN_SYSTEM §7);
  --band is the one documented non-verdict hue (§2)
- 22 new tests (tests/music-brain.test.ts) — shopping sentences stay
  shopping, moods replay bit-for-bit; 44/44 green; lint/typecheck/verify green
- stale claim fixed: why-page 'simulated' patch no longer calls MCP/ACP
  'protocol-shaped' — they shipped real in D6
…eady

Two bugs, both real:
1. The ghost was a new character (skirt, wisp, pulse) when the ask was the
   desk head in red. Rebuilt on the same 32x32 viewBox, r=13 volume, and
   the SHARED .desk-eye-g/.desk-eye classes — the eye choreography is now
   glance-for-glance identical to the black head. Skirt, wisp, pulse and
   wander removed from CSS; the ghost's own motion is arrive/sink + beat bob.
2. 'setVolume is not a function' — the IFrame API player's methods only
   exist after onReady. Every player call now goes through the ready
   promise; volume sets on ready. The stage's React-owned wrapper persists
   through the full/mini deck flip so the player is created once and the
   music never dies on a collapse; the ready promise resets on unmount.

skip now rides the summon's three-track queue instead of doing nothing.
Verified: console clean through summon→play→stop; lint/typecheck/44 tests/verify green.
…: instant chat, native dblclick, slow-crate honesty
…ideo, loop toggle; feat(agents): the craft-school rebuild — decoration deleted
… coco; fix(coco): the head never leaves the viewport
…ver off-screen in vw; feat(agents): the landing's grammar — hero stage, wire between the heads, summon up top
…perch raises them; the double-click truly hides the video (the rise fill was pinning opacity)
…eam, the frame speaks once; fix(chat): words stream once, statuses say once, panels scroll quiet
… the ghost's state rides the prompt as one line, ~40 tokens, commands still free
… promise — stop-then-play works again, pause with it
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
customs Building Building Preview Sep 4, 2026 8:54am UTC

@srivtx
srivtx merged commit 85dc843 into main Sep 4, 2026
7 of 8 checks passed
@srivtx
srivtx deleted the feat/music-ghost branch September 4, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant