Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

**A 3D office your team shares with its coding agents.**

The optional [ambient Dunder Mifflin cast](docs/ambient-office.md) works in an adjoining [Scranton replica suite](docs/scranton-extension.md), with its own working day, conversations and occasional celebrations. Coworkers face their conversation partners, gesture in speaking turns, react according to their relationships, and perform coordinated group moments. Wave near an idle coworker to get an acknowledgment. Enter through the **Dunder Mifflin →** doorway on the east wall between the Services board and TV, then follow the hallway. Use the **Dunder Mifflin** clock or **E** at a character for conversation, Pam's local task notes or a work brief; hide dialogue or coworkers for quiet work.

Sit **Claude Code**, **Codex**, **OpenCode**, **Grok**, **Muse**, **DeepSeek Harness** and **Cursor** workers at desks, watch each one's terminal on the laptop in front of it,
and jump into any of them together. Every GitHub repo is a floor of the building.

Expand Down
43 changes: 43 additions & 0 deletions docs/ambient-office.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Ambient Dunder Mifflin coworkers

Back to the [README](../README.md) · [Features](features.md)

The 3D office includes an independent background cast based on the supplied *Ambient NPC & Workplace Character Bible*. The staff work, chat, eat lunch, gather and go home without asking you to participate. They do not consume worker seats or start agent sessions. There are no quests, attendance requirements, notifications or camera takeovers.

## Cast and era

The fixed Season 6 ensemble includes Michael, Dwight, Jim, Pam, Ryan, Kelly, Angela, Kevin, Oscar, Stanley, Phyllis, Meredith, Creed, Andy, Toby and Erin. Darryl comes upstairs for shipments and breaks. Holly visits from Nashua; David Wallace visits from corporate. Pam works in administration and Erin handles reception. Jim and Pam are married; Dwight and Angela's private conversations do not disclose their history to the rest of the branch. The visitor beats are original simulation scenes, not claims about a particular episode.

The bible's historical and later-era supporting cast (Jan, Karen, Roy, Jo, Gabe, Packer, Bob, Hank, Mose, the warehouse ensemble and Season 7–9 additions) is reference material for future era-specific scenes; those characters are not spawned in this ensemble. The component uses the existing cartoon character rigs, distinct clothing colors, hairstyles, nameplates and original dialogue rather than copied television scripts or audio.

## Use it

The cast works in its own [Scranton replica extension](scranton-extension.md). Walk through **Dunder Mifflin →** on the original office's east wall, between the Services board and TV, and follow the hallway north, then left into the annex. Reception, the bullpen, accounting, Michael's office, the conference room, kitchen and break room are all connected. These are dedicated character workstations, separate from the coding-agent desks.

Click the **Dunder Mifflin** clock near the top left to open the coworker directory, or look at a coworker and press **E**. Say hello, ask about their day, or use their optional work scratchpad. **✕** and **Esc** close the window through the office's standard focus handling and restore mouse-look.

**Show coworkers** hides or reveals the cast. **Quiet work** hides conversation bubbles while keeping staff visible. Both choices are saved in this browser. Ambient dialogue does not enter the shared chat or generate sound. Characters appear only on the regular office floor, not on the roof, in the garage, during elevator travel or on custom maps. The directory remains available during their off shift, without summoning absent staff.

**Pam and Erin can organize notes into a task checklist.** Your notes are private to this browser and floor and are saved as you type. Each other coworker can prepare a role-appropriate work brief for you to copy to a connected worker. This is a local preparation tool, not an AI answer to the underlying request. The component cannot send messages, create reminders, schedule appointments, modify spreadsheets or act on external accounts. It explicitly reports that no external action occurred. If browser storage is blocked, the window tells you to copy your notes before closing. Clearing browser storage removes the notes and preferences.

Helping pauses that present character's movement locally until you close the window or select another coworker. Everyone else continues their day. No cast member is hired as a coding agent, and no model calls or additional credentials are needed.

## Independent working day

The displayed clock runs a fictional 8:30–17:30 workday in **40 real minutes**. Arrivals are staggered; most time is ordinary work, with staggered lunches and departures. Stanley leaves at 17:00. The branch has a short after-hours interval before the next simulated day. These times are simulation choices, not canonical dates or the user's local clock.

Scenes occupy part of a two-minute slot, leaving quiet intervals between conversations. Staff gather using the office's existing navigation grid and disperse back to their routines. Scenes cover reception handoffs, client calls, Jim/Dwight pranks, accounting checks, Kelly/Ryan misunderstandings, party planning, supplier orders, presentations, HR forms, a sales briefing and private conversations. Pretzel Day and a Dundies rehearsal occur on different virtual days, with most slots reserved for ordinary life. No fictional birthday date is labeled canon.

Personalities also choose visible actions. Each exchange has a gathering interval, six-second speaking/reaction turns, a coordinated closing moment and a pause before everyone returns to work. Speakers and listeners turn toward each other once both arrive. Speech ends before the listener's reply gesture: Jim facepalms at Dwight's investigation; Dwight answers Jim by pointing; Pam and Erin acknowledge each other; Michael and Toby react awkwardly to each other. Stanley withholds applause during ordinary meetings but acknowledges Pretzel Day. The Dundies participants clap together, and Andy dances at the end of musical conversations while his coworkers respond in their own ways. These are original procedural sequences using the office's cartoon rigs, not imported animations or assets from the inspiration games.

Use the existing player **Wave** emote within 3.5 meters of an idle coworker to get a visible acknowledgment. The nearest available coworker turns to you and waves or gives a thumbs up; Stanley simply looks over. There is a ten-second acknowledgment cooldown, and coworkers in an exchange, walking or helping you keep their attention on that activity. This acknowledgment is local to your browser. Quiet work hides dialogue while retaining body gestures, and hiding coworkers hides all of their performance.

All gesture phases come from the same scheduled clock, so a late observer joins the current pose rather than restarting the gesture. Walking or helping takes priority over gestures. A speaker waits for a stationary, present conversation partner before displaying their bubble or gesture; missed beats are skipped rather than talking at an absent or moving partner. Shared timing does not make client-local movement server authoritative, and out-of-sync device clocks can still show different moments.

The schedule is a pure function of wall-clock time and floor ID. Browsers with synchronized clocks on the same floor see the same scheduled conversations; movement and assistance are local, not server-authoritative multiplayer NPC positions. Reloading, hiding the cast or leaving a floor does not restart its schedule. The directory's **Around the branch** section reconstructs the last three completed scene outcomes, including the previous virtual day. This is bounded deterministic continuity, not open-ended character memory or a persistent narrative service.

## Implementation and checks

The module is `src/client/features/ambient-office/`: `cast.ts` describes characters; `scenes.ts` contains original group dialogue; `simulation.ts` schedules independent routines and outcomes; `choreography.ts` chooses relationship reactions and coordinated phases; `performance.ts` seeks the existing rig to the current gesture; `world.ts` animates the existing rigs and navigation; `ui.ts` and `notes.ts` implement optional conversation and local assistance. A space dependency from `features/scranton/` relocates routines into the replica and seats staff at their assigned workstations. The feature registers world ticks, moving usables and the `ambientnpc` interaction. No protocol, server or core-store changes are needed.

`tests/ambient-office.test.ts` verifies deterministic schedules, offscreen continuity, autonomous group events, departures, rare rituals, cast identities and walkable paths, and meaningful checklist and handoff behavior. Validate changes with `npm run typecheck`, `npm test`, `npm run build` and a headless browser screenshot of the cast and directory.
2 changes: 2 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Everything in the office, room by room. Back to the [README](../README.md).

- **Ambient Dunder Mifflin coworkers.** Nineteen characters form a Season 6 ensemble with their own routines, staggered lunch breaks, group conversations, occasional Pretzel Day and Dundies rehearsals, and departures. They work in a connected [Scranton replica suite](scranton-extension.md), with reception, sales, accounting, Michael's office, conference room, kitchen and annex. Enter through **Dunder Mifflin →** between the Services board and TV, then follow the hallway. Michael, Jim, Dwight, Pam and the rest continue their day independently of the player. **E** at a coworker or the **Dunder Mifflin** clock opens optional conversation and a local work scratchpad. Pam and Erin turn notes into checklists; other staff prepare role-specific briefs for a connected worker. Notes are saved privately in your browser for each floor; no external scheduling or messaging occurs. The directory can hide coworkers or dialogue for quiet work. See [Ambient office](ambient-office.md) for the cast, simulated clock, capability boundaries and multiplayer behavior.

- **A floor per project.** The first time the office starts in a terminal it walks you through picking your first project (see [Run locally](../README.md#run-locally)). Otherwise you start inside the elevator, and it asks for one: pick one of the repositories your `gh` login can see (or type `owner/name`) and the office clones it into the workspace folder, `~/agent-office/<owner>/<repo>` unless you pick another (**📁 Change folder** right there, for admins). While it clones, its floor on the panel says how far along it is (*Downloading 64% · 231 MiB · 1.5 MiB/s*), and you can close the panel and carry on: everyone hears when the floor opens. Whoever added it, or an admin, can stop it with the **⏹️** beside it. A clone that hears nothing from GitHub for 3 minutes is stopped as stalled, one that would have to ask something (an ssh host key, a password) fails straight away and says what to run on the office's machine, and restarting the office doesn't stop one. To add another project, or go to one, walk into the elevator on the north wall and press **E**. Or click the project name in the top-left corner for the list of floors: pick one and you're there in a blink, standing on the same spot in the office. From outside it (the balcony, the street, the garage) it takes you in, and you step out of that floor's elevator. Each floor has its own desks, workers, issues and PR boards, task queue, services and pictures, and its own wall and floor colors, so you always know where you are. You only see and hear the people on your floor. The elevator panel shows how many workers are busy or waiting on someone on each floor, and you get a heads-up when a worker on another floor starts waiting. An admin can take a project off the building with the **🗑** beside its floor in the elevator: its workers stop, and everyone on it rides the elevator to another floor. Nothing is deleted. The checkout stays on disk with its workers, queue and pictures, and adding the same repository again moves back into it (as long as the workspace folder hasn't moved since). That goes for the project the office was started in (`agent-office <dir>`) too: it stays off after a restart, and the office keeps its own data in that folder as before.
- **Walk around.** Use WASD, Space to jump, and drag the mouse to orbit the camera. Everyone in the office sees everyone else move in real time.
- **A quiet screen.** The office stays in view: the top bar holds just the floor you're on, **🤖 Workers** and the **☰** menu (or **Tab**). The menu opens every window (issues, PRs, the queue, services, the whiteboard, search, voice, screen sharing, settings) and lists what can show on screen: the workers, who's in the office, spend, Claude limits, the chat and the floor details. Turn each one on or off there, or hide a panel with its **✕**. Pin anything you use a lot to the top bar. The choices are kept in your browser. Chat lines fade after a few seconds; hover the chat or press **T** to read back. What needs you shows up on the top bar by itself: the workers waiting on someone (click to go to them, like **N**), the mute button while you're in voice, **Sharing** while you share your screen, and **⬆️ Update** when there's a new version.
Expand Down
34 changes: 34 additions & 0 deletions docs/scranton-extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# The Scranton room extension

Back to the [README](../README.md) · [Ambient office](ambient-office.md)

The Dunder Mifflin cast has a dedicated replica of its television workspace adjoining the original Agent Office. The existing coding-agent desks, boards, lounge, elevator, garage, rooftop and expandable back office remain available. The new suite is permanent on the regular office map and does not occupy any hiring slots.

## Find it

On the east wall, between the **Services** board and the **TV**, walk through the doorway labeled **Dunder Mifflin →**. Follow the enclosed hallway north, then turn left into the annex. From there, the kitchen connects to the sales bullpen, reception, Michael's office and the conference room. Walk back through the same hallway to return to your coding agents. There is no map switch or teleport.

## Where the staff works

- **Reception:** a curved wooden counter, desk phone, computer, waiting couch and Dunder Mifflin sign. Erin staffs reception in the Season 6 ensemble.
- **Sales bullpen:** Jim and Dwight sit on opposing sides of their pod; Andy and Pam occupy the next pod. Stanley and Phyllis sit together, with Meredith and Creed in the copier/quality-assurance area.
- **Accounting:** Angela, Oscar and Kevin have individual desks beside one another.
- **Michael's office:** a private workspace beside reception, with glass frontage, horizontal blinds, his nameplate and boss mug.
- **Conference room:** beside Michael's office, with glass and blinds, rows of chairs and a whiteboard. Staff take their seats for ambient meetings here.
- **Kitchen and break room:** counters, fridge, tables and vending machines; staff meet here during breaks and office celebrations.
- **Annex:** HR and customer-service workstations for Toby and Kelly, with a visiting workspace for Darryl. Ryan has a small closet office off the kitchen.
- **Building details:** the stairwell core and restroom partitions complete the recognizable room arrangement. The stair core is scenery; travel between project floors still uses the original elevator.

The room layout uses [RoomSketcher's published Dunder Mifflin floor plan](https://www.roomsketcher.com/blog/american-the-office-floor-plan/) as a visual reference, alongside the supplied character bible. The reconstruction uses original procedural geometry, scaled to the game's avatars and navigation clearances rather than surveyed set measurements. It contains no downloaded television imagery or video. Furniture, signs, desktop computers, blinds, fluorescent fittings and props are created in code.

## Routines and interaction

Character homes, lunch spots and scene destinations all point into the replica. During ordinary work they sit at their assigned desks; meetings use the conference chairs. The original ambient schedule and optional work scratchpad continue unchanged. The **Dunder Mifflin** clock stays available on the main office floor, so you can open the directory without walking over. Quiet mode hides dialogue; hiding coworkers leaves the replica room in place.

Player collision uses the extension's floor, ceiling, partitions and furniture. Its navigation grid uses those same wall and furniture footprints. The camera recognizes the suite and narrow connecting corridor as indoor spaces and restores the original room bounds on return. Indoor lighting and sound also follow the visitor into the extension. Staff movement and assistance remain local to each browser; other real players still share their usual multiplayer positions.

## Code and verification

The feature is `src/client/features/scranton/`: `world.ts` is an office fixture, `props.ts` makes the furniture, `batch.ts` batches solid static geometry while retaining lettering textures and transparent panes, `routines.ts` adapts the cast's spatial dependency, and `index.ts` registers camera and indoor-context handling. Shared physical data is in `src/shared/scranton.ts`. The fixture joins the floor-build registry, its east doorway joins `src/shared/office-openings.ts`, and `src/shared/office-footprints.ts` keeps scenery trees out of the extension. The ambient feature accepts the room through a small space dependency.

`tests/scranton.test.ts` checks that every character has a reachable workstation, room connections remain open, seating matches the chosen era, and all autonomous scenes stay within the replica. Headless-browser verification walks through the actual original-office doorway and corridor, checks grounded entry and camera restoration, and captures the replica's floor plan and bullpen. Run `npm run typecheck`, `npm test` and `npm run build` as usual.
Loading