Skip to content

feat: phase 2, the platformer world view - #2

Merged
darkstardevx merged 9 commits into
mainfrom
feat/phase2-platformer
Nov 27, 2026
Merged

darkstardevx merged 9 commits into
mainfrom
feat/phase2-platformer

Conversation

@darkstardevx

Copy link
Copy Markdown
Contributor

Phase 2 turns Runeway's live view into a retro side-scroller: each agent gets a lane with an original pixel-art runner. It also adds agents running outside agent-deck, a --demo mode and CI.

What changes

  • 🔭 Agents outside agent-deck. Any Claude Code or Codex transcript written to in the last 10 minutes gets a lane. It runs while the file grew in the last minute, sits after that, and leaves after 10 quiet minutes. Sessions agent-deck already lists are not shown twice. If agent-deck fails for a poll, its lanes stay. --no-discover turns discovery off.
  • 🌃 The world view is the default screen. Each lane has a HUD row: name, tool, 🪙 tokens, a context meter ▰▰▰▱▱ and the current action. Below it are 11 rows of half-block pixels. The selected lane gets a cyan edge, a lane waiting for you a gold one. Agents that don't fit become one-line entries, and the footer counts the ones not on screen. l switches to the phase 1 list.
  • 🧙 Original cast: a hooded rune-runner (Claude), a brass automaton (Codex), a hover-drone (OpenCode), a twin-spirit (Gemini) and a tinted cyber-runner (everyone else). There are also rune bricks, sigil blocks, glyph coins, data gems, a rune gate, a beacon tower and cyber-critters. tests/originality.rs fails the build if a borrowed game name appears.
  • 🎬 Activity is animated:
    • reading collects coins
    • editing breaks a brick and a gem pops out
    • a command shows gears and steam
    • a failure gives a red flash and a stumble
    • a pass gives sparks
    • a new helper brings a companion
    • waiting stops the runner at the gate
    • idle sits down
    • finished reaches the beacon
    • an error greys the lane out
  • ⏱️ Frame pacing: 30 FPS while something moves (--fps sets 5–60), about 8 when idle, and right away on input or new data. --lowres draws one pixel per cell.
  • 🎮 --demo plays four scripted agents on a one-minute loop.
  • ✅ CI: fmt, clippy -D warnings, tests and docs on stable, plus cargo check on Rust 1.88.

Verification

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test all pass (146 tests).
  • cargo +1.88.0 check --all-targets passes.
  • cargo run --release --example frame_bench draws 12 lanes at 160×48 cells: mean 0.30 ms, p95 0.34 ms (target < 4 ms).
  • A pty smoke test of runeway --demo drew frames, quit on q with exit 0 and restored the screen.
  • cargo run --example sprite_sheet shows every sprite at 4×.
  • A whole-branch review found no critical issues. Its three important findings are fixed in the last commit, each with a test that failed first.

Before merge

  • Owner's visual check in Ghostty: cargo run --release -- --demo, then cargo run --release with real agents.
  • Owner OK on the sprite size: runners are 12×12, not the spec's 16×16, because a lane's world is only 22 px tall.

Known follow-ups (minor): discovery rescans the whole Claude projects tree each second; titles of discovered Claude sessions use the last part of the folder name; --lowres doesn't reduce colors.

Design: docs/superpowers/specs/2026-11-27-runeway-design.md. Plan: docs/superpowers/plans/2026-11-27-runeway-phase2-platformer.md.

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

darkstardevx and others added 9 commits November 27, 2026 06:52
Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude and Codex sessions that wrote to their transcript in the last
10 minutes now get a lane even when agent-deck does not list them.

- sources::discover::Discovery scans the Claude projects folders and
  the recent Codex day folders; Running within 60 s, Idle after that,
  dropped after the quiet limit.
- sources::discover::Combined puts agent-deck's sessions first and
  leaves out discovered ones agent-deck already covers (same Claude
  project folder, same Codex cwd). If agent-deck fails, discovered
  sessions are still listed and the reason shows as the source error
  (new SessionLister::last_error).
- Session::transcript lets a lister name the file to follow; the
  collector then follows only that file.
- --no-discover turns it off; check still asks agent-deck alone.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base of the platformer renderer, all in the library and pure.

- world::pixels::Pixels: an RGB buffer with clipped set, fill_rect and
  sprite blit (palette index 0 transparent, optional mirror).
- world::palette: Runeway's original 16-color palette with named
  indices (night sky, skyline shades, rune cyan and violet, glyph
  gold, gem green, brass, steel and more).
- world::halfblock: pack two pixels into each `▀` cell, or one
  averaged pixel per cell for --lowres. An odd last row takes the
  buffer's background as its bottom pixel, so there is no stripe.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runeway's own pixel art, drawn as text maps of palette keys in
world::sprites, with no asset files.

- Cast (12×12, the drone 12×9): hooded rune-runner (Claude), brass
  automaton with a chimney puff (Codex), hover-drone (OpenCode),
  twin-spirit orbs (Gemini) and a visored cyber-runner tinted per
  agent (everyone else). Each has run frames plus jump, stumble, sit,
  stand and cheer poses.
- Tiles (8×8): ground, rune brick, sigil block; a light-bar rune gate
  and a beacon tower. Items (6×6): glyph coin, data gem, spark; a
  cosmetic cyber-critter; three parallax backdrop strips.
- examples/sprite_sheet.rs prints every sprite at 4× for a visual
  check.
- tests/originality.rs fails the build if a borrowed game name shows
  up in src/ or the README.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- world::mapping::state_for turns an agent's activity and agent-deck
  status into a runner state, following the spec's table: reading
  collects coins, editing smashes a brick, a command enters a machine
  section, a failure stumbles, a pass or a new helper celebrates,
  waiting stops at the gate, idle sits, finished reaches the beacon,
  and an error or stopped agent loses signal.
- world::runner::Runner holds the state, pose and frame and a little
  physics: a jump arc for smashing, a timed knock-back for stumbling,
  a timed cheer, then back to running. scroll_speed is 0 whenever the
  runner is stopped.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
world::lane::LaneSim turns one agent's lane state into a moving scene,
drawn into a Pixels buffer. It is pure: time is tick(), randomness is
a seeded xorshift (world::rng) keyed by the session id, so the same
agent always gets the same level.

- Layers: night sky with twinkling stars (1/4 speed), a backdrop strip
  chosen per agent (skyline, server racks or rune pillars, 1/2 speed),
  hanging sigil blocks and patrolling cyber-critters, then the ground.
- Activity: each file read drops a glyph coin to collect; an edit
  hangs a rune brick that the jump breaks and a data gem pops out; a
  command shows turning gears and steam; a failure flashes red and
  knocks the runner back; a pass showers sparks; a new helper brings a
  companion; waiting stops at a rune gate with a pulsing gold glyph;
  finished reaches the beacon; an error greys the lane out with
  scanlines. A runner with nothing new for 30 s sits down.
- agent-deck's idle and ready statuses now sit the runner down.
- Snapshot test: a Claude lane editing, at tick 40, 160×22 px, stored
  as palette indices in tests/snapshots/lane_claude_tick40.txt
  (RUNEWAY_UPDATE_SNAPSHOTS=1 rewrites it).

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live view now opens on the world: one lane per agent, drawn with
half-block pixels. The phase 1 list is one key away (l).

- Top bar, shared with the list: runeway · N agents · M waiting ·
  Σ tokens.
- Each lane is 12 rows: a HUD row (name, tool, glyph-coin token count,
  a context meter that drains as context fills, the current action),
  then 11 rows (22 px) of world from the lane simulation.
- The selected lane has a cyan edge; a lane waiting for you has a gold
  one.
- Lanes that do not fit become one compact line each, and the footer
  says how many are not shown in full; the selected agent is always
  drawn in full.
- A terminal too small for one lane shows "make the window taller"
  (or wider) instead of a broken frame, and resizing never panics.
- --lowres draws one averaged pixel per cell.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pacing: the animation clock runs at 30 ticks a second; frames are
  drawn at once on new data, a key or a resize, at --fps (5–60,
  default 30) while any lane moves, and at about 8 FPS otherwise.
  Between frames the loop sleeps until the next one is due.
- --demo plays four scripted agents on a one-minute loop: a
  rune-runner reading, editing and passing its tests; an automaton
  whose command fails and then passes; a drone that waits at the gate;
  a twin-spirit that starts a helper and finishes at the beacon.
- examples/frame_bench.rs draws 12 lanes at 160×48 cells for 300
  frames: mean 0.30 ms, p95 0.34 ms in release here (target < 4 ms).
- CI on GitHub Actions: fmt, clippy -D warnings, tests and docs on
  stable, plus cargo check on Rust 1.88.
- README: the world view, the cast, what each activity looks like,
  keys and flags, discovery of agents outside agent-deck.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore"

From the whole-branch review:

- When agent-deck fails for one poll (a timeout under load), Combined
  now keeps its last good list instead of answering with discovered
  sessions only. Before, every agent-deck lane vanished, came back as
  a discovered lane, and lost its animation state for a second.
- A runner only sits down after 30 s with nothing new on its lane at
  all: streamed tokens count as activity. A long command (tests, a
  build) stays in the machine section until it ends.
- The footer's "+N more" now counts only agents not on screen; lanes
  shown as one-line entries are not counted as hidden.

Project contributor

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@darkstardevx
darkstardevx merged commit 4cc2271 into main Nov 27, 2026
2 checks passed
@darkstardevx
darkstardevx deleted the feat/phase2-platformer branch November 27, 2026 15:13
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