Agent WorldDownload

Design System: agent-world

Overview

Creative North Star: "The Night-Shift Office"

A top-down 16px pixel office seen after dark: wood-plank workroom under a navy back wall, CRT desks, a meeting table, a server closet with blinking racks, a blue-carpet lounge with raspberry sofas, a checker kitchen, all inked with thick near-black room outlines and set in a grass-and-road exterior. Every pixel is drawn in code; nothing is a raster asset. The world is the interface: where a character stands, what its screen shows and what floats over its head are the agent's state.

The app shell around the canvas is lifted from the same building. Its surfaces are the night sky and navy wall, its accent is the brass of the boss's crown and the wordmark, its edges are the same 2px ink rim the rooms wear. The shell is quiet and dense so the office carries the colour; it never becomes a dashboard of status cards.

Key Characteristics:

Colors

A night-dark neutral field with warm wood and brass, and a small set of state colours that mean the same thing in the world and in the panel.

Primary

Secondary

Tertiary (state colours)

Neutral

World materials

The building palette P in furniture.ts is the single source for room materials: three alternating plank tones with a darker seam (plank-a/b/c, plank-seam), wall navy with a lighter trim and darker base, dotted lounge carpet, light/dark kitchen checker, a dotted server tile floor, desk wood, off-white CRT shells, raspberry sofas, three-tone leaves, dark racks. Book spines use a fixed nine-colour set. Characters draw from seeded tables (9 hair, 5 skin, 7 hoodie, 3 suit, 5 tee) with shade factors (0.72 hair, 0.84 skin, 0.74 cloth) for the second tone.

Interaction tints and scrims

Hover and state shades are named, not improvised: Panel Hover (a raised button under the pointer), Crown Brass Hot and Alarm Hot (primary and danger buttons under the pointer), Work Green Text (green copy on dark: added lines, success), Danger Text (red copy on dark), Dim (an asleep dot, an empty track), Alarm Well (the recessed red behind a permission band), Brass Dim (the thin rim inside a sent message) and Track (the unfilled part of the usage ring). Shadows use Shadow Scrim (pop-ups and dialogs), Shadow Inset (the recessed message box) and Bevel Light (the top highlight on the send button).

Named Rules

The One Building Rule. Every room colour comes from the one P palette, and the shell's neutrals are taken from it (night, navy wall, wood, brass). A new room or panel adds to P or :root; it never brings its own hexes.

The Same Meaning Rule. A state colour means the same state in the world and the panel: red is permission in the roster dot, the bubble and the monitor. Never reuse alarm red for decoration.

Typography

Display Font: agent-world bitmap font (pixelfont.ts), drawn at integer scale with image-rendering: pixelated Body Font: system UI sans (ui-sans-serif, system-ui, -apple-system, Segoe UI) Label/Mono Font: Menlo, Consolas, monospace

Character: The bitmap font is the world's voice: lower-case input rendered as blocky 3x5 caps, so name tags scale with the office and the wordmark reads as part of the building. The shell uses the platform sans at one small size so it stays out of the art's way; mono carries anything that came from a terminal.

Hierarchy

Named Rules

The One Font Rule. Any text drawn inside the world, or any display text in the shell, uses the bitmap font at integer scale. No anti-aliased type on the canvas.

The Live Label Rule. The uppercase brass label only ever carries a live data value (the agent's role). It is not a section heading or eyebrow.

Layout

The window is a header bar, then a row of stage and side panel. The stage takes all remaining width; the panel is min(38vw, 560px) wide, collapses from a header toggle, and is forced open (toggle disabled) while any permission request is pending.

The world is built on a 16px tile map (office.ts), with a 24-tile exterior margin of grass, sidewalk and road. Default scale is the largest integer multiple of device pixels at which the whole office fits the stage; the wheel steps zoom by whole integers from 2 to 8; drag pans (4px threshold so a pan is never a click), clamped so the building's centre stays on screen. Root position is rounded to device pixels.

Shell spacing is small and dense: 4px gaps in the roster, 8px between controls, 10-12px section padding. The roster row is a fixed grid (10px dot, name, role, 96px activity).

The Integer Pixel Rule. Scale is an integer in device pixels, divided by devicePixelRatio for layout; textures use nearest filtering and antialias is off. Never fractional-scale the art.

The Place Is State Rule. Activity picks the spot (placeFor in worldState.ts): interns work at the meeting-table laptops; an asleep agent leaves the office (it stays in the agent list); idle, waiting and blocked go to the lounge sofas; an agent reading from the library stops at the bookshelf for a moment; an agent in plan mode stands at the whiteboard; everything else (thinking, researching, implementing, running, delegating, permission) sits at the agent's own CRT desk. Desk and intern seats are permanent homes; other spots are borrowed and released. New agents enter through the front door; leaving agents walk out of it.

Elevation & Depth

Flat, with pixel depth only. Depth in the world comes from y-sorting (a character's zIndex is its y + 8), the dark ink rim on every object, and small hard-edged black drop shadows: 0.22 alpha under furniture, 0.4 / 0.25 under standing characters (none when seated). Overlays (bubbles, tags, selection marker) sit in a layer above the whole office.

In the shell, depth is a 2px inset bevel on buttons, never a cast shadow.

Shadow Vocabulary

Named Rules

The Inked Edge Rule. Every drawn object gets a 1px dark rim and every room a 2px one; that rim is what keeps things legible at 2-3x. Shell chrome follows it with 2px rim-ink borders.

Shapes

Everything is square. Shell radius is 0 on buttons, rows and panels; the state dot is an 8px square; the world has no curves beyond what pixels make. Borders are 2px rim ink between header, panel sections and stage. Focus is a 2px brass outline offset 2px.

Components

Buttons

Chunky, pressable, square.

Roster rows

Permission band

The top of the side panel while requests exist: a dark wine band (#2a1620), each request as "name wants tool" with mono detail and Approve (primary) / Deny.

Characters

16x24 sprites composed from string layers (head, torso, legs; hair style by key hash). Views front/back/side (side mirrored), poses stand/walk1/walk2/sit. Role markers stamp over the base: seniors wear a hoodie with the hood gathered at the neck; the boss wears a gold crown on a dark band plus a suit with a red tie; interns wear a blue cap, a tee and a lanyard badge. Palette is seeded from the agent key so repeated names still look different. Animation is stepped: walk frames every 130ms at 5 tiles/s, 1px breathing every 700ms, blink every 4s, elbows typing at the desk (researching slower than implementing), a waving arm on permission.

Bubbles and name tags

Monitors

Each desk CRT animates the state of whoever sits at it: dark when empty or asleep, a blinking cursor for thinking, scrolling coloured code for implementing, fast green lines for running, grey-on-white for researching, a small org chart for delegating, flashing red/amber "!" for permission.

Do's and Don'ts

Do:

Don't:

Surfaces added after the office

These reuse the office's tokens (panel, panel-raised, rim-ink, brass, think-cyan) and its square corners; none introduces a new colour except the permission-mode colours below.

Edit this page on GitHub