Agent workspaces (2026-11-11)
Why
- A friend linked to a coding agent shows the agent's state only by its dot and its animation row, and keeps strolling: a walk replaces the working or waiting row with the walk cycle, so the state is easy to miss.
- A request for approval (
waiting) is the one state the person has to act on, and it looks like any other moment in the yard. - People who keep PlayPets open while they work asked for a place that looks like work: an office where friends sit at desks, come forward with a paper when an agent needs approval, and rest when it is done.
Goals
- In every place, a friend's agent state shows in what the friend does, not only in its dot.
waitingalways brings the friend to the front of the yard, where the person looks first.- Two new places, an office and a garden workshop, fill the whole window with a workspace: desks, an approval spot and a rest corner.
- Weather and the time of day show through the workspaces' windows.
Non-goals
- No new animation frames. Friends use the rows every pet sheet has (
working,waiting,done,error,src/core/animation.js), so imported pets behave the same. - No change to the desktop overlay.
- No approving from the yard. The friend shows that approval is needed; the person approves in the agent.
- No new agent states or hooks.
Anti-goals
- The yard turns into a dashboard: counters, progress bars or text on furniture.
- An agent's state interrupts something the person started: a drag, a game, fishing, a dig, a flower viewing, a friend the person sent somewhere.
- Work added to the frame loop for friends whose state did not change.
Behaviour
The state is the coding agent's (agentStateOf, src/core/status.js), not a chat reply's. done and error fade back to idle as they do today.
| State | Existing places (hillside, courtyard, lakeside, living room) | Workspaces (office, garden workshop) |
|---|---|---|
working | Stops strolling where it is (a stroll under way ends first) and plays working | Walks to a desk and plays working there, drawn behind the desk's front |
waiting | Walks to the front of the yard, near the middle, and plays waiting | Walks to the approval spot at the front and plays waiting |
done | Plays done once, then strolls again | Walks to the rest corner, plays done, then stays there until the next state |
error | Stops where it is and plays error | Plays error at its desk |
idle or no agent | Strolls as today | Strolls anywhere on the floor |
- Front spot (existing places): feet on the friends' lowest row (
geometry()y = 1), x near 0.5. Several waiting friends stand side by side about one body apart, nearest the middle first, never behind the dock (underDock). - These trips are not saved (
save: false); a friend's own saved place stays its place. - What the person does wins. During a drag, a game, fishing, a dig, a flower viewing or a trip the person started, the friend's state still shows as its dot, and the friend goes to its spot afterwards.
- What a friend started on its own does not win. A friend's own fishing, a blossom gathering, its own dig or planting, or a visit to a plant or a gift ends when its agent turns
working,waitingorerror. - A friend whose agent is
working,waitingorerroris not picked for a friend's own activity. - A friend reacts when its state changes, not on every frame. Coming back to the place, or the window coming back into view, places each linked friend again.
- With reduced motion a friend is set down at its spot, as every trip already is.
The two workspaces
| Office | Garden workshop | |
|---|---|---|
| Picture | A warm loft office seen from a gentle high three-quarter angle: four rounded wooden desks with small laptops, shelves, a bulletin board, a coffee corner, a sofa corner, an approval desk with an in-tray and a bell at the front | A glass-roofed workshop, half greenhouse, half pergola: workbenches that double as desks, hanging tools, a chalkboard, a hammock corner, a little approval post with a paper tray and a bell at the front |
| Windows | Tall windows across the back wall | The glass roof and the open side |
| Floor | From about a third of the height down to the foot | The same |
| Mockups | scratch/bg-mockup/work-office.png, not committed | scratch/bg-mockup/work-garden.png, not committed |
- The art follows the app's painted style (the current places and companions). The mockups are not the art: the final pictures have no friends and no placed gifts, and keep the middle of the floor open.
- Furniture is drawn at the friends' size. At 1180×850 a friend at the front is about 100px tall and one at the back about 60px (
depthFar0.6), so a seated friend's head shows above its desk. The mockups' furniture is about three times too large for that. - No text, letters or logos on screens, boards or papers.
Sky through the glass
- The window glass in the picture has alpha. The app's live sky (sun, moon, clouds, the time of day's colours) shows through it, so time and weather need no extra pictures.
- Rain and snow stay inside the glass (
windowPanes, as the living room does). - The room's light follows the time of day with
environmentLook, as the outdoor places do. There is one picture per workspace, with no authored time-of-day variants and no seasonal variants.
Capabilities
| Capability | Office | Garden workshop | Why |
|---|---|---|---|
sky | true | true | The sky shows through the glass |
weather | true | true | Inside windowPanes only |
soil | false | false | Paved floors: no digging, trails or discoveries |
wildlife, seasonalEffects, fishing | false | false | Indoors |
ambient | false | false | The woodland mix does not fit; a room mix is later work |
- Today the indoor pot under a flower keys on
data-sky="false"(garden.css). It moves to the floor having no soil (data-soil="false"), so the workspaces get potted flowers while their sky shows.
Stations
New geometry.stations in worlds.json, in source-image fractions like geometry.fishingSpot, transformed with the picture (environmentFrame; the picture is 1536×1024 like every place's):
json
"stations": {
"desks": [{ "x": 0.38, "y": 0.52 }],
"approval": { "x": 0.5, "y": 0.82 },
"rest": { "x": 0.16, "y": 0.6 }
}- Each point is where a friend's feet stand.
desksholds one point per seat.approvalandrestare one point each; several friends there stand side by side from it, a body apart, never behind the dock (duty.js inLine).- A friend keeps the same desk while it works and gets it back next time when it is free: the first free desk in the order the friends were added.
- When there are more working friends than desks, the extra ones stand beside a desk (one body to the right of each desk in turn, then to the left), then where they stand.
- A station cropped out of a small window falls back to the nearest visible floor point, as a cropped fishing stance falls back to the visible shore.
Furniture fronts
- Each desk, the approval desk or post, and the sofa or hammock has a front piece (
geometry.fronts):{ "x", "y", "width", "height", "foot", "shape" }, its box and foot line in source-image fractions. shapeis the piece's outline,[x, y]points as fractions of the box. The front is the painted picture's own pixels inside it, cut each time the land is painted (fronts.js), so it carries the hour's light and needs no picture of its own.- A front is drawn in the friends' layer at the depth of its foot line. A friend whose feet are above the foot line is drawn behind it, so a friend at a desk looks seated. Clicks pass through it.
- Furniture blocks strolls the way trees do: a stroll does not end on it (
geometry.blocks:{ "x", "y", "rx", "ry" }ellipses in source-image fractions,workspace.js blocked). A trip to a station ignores them.
Depth
- The workspace floors are deep, so friends at the back are drawn smaller than in the yard:
geometry.depthFarper place (default 0.84,field.js DEPTH_FAR), about 0.6 in the workspaces.
Garden inside
- The flower garden is one garden shown in every place (
garden.rs Planthas no place). In the workspaces its flowers stand in their indoor pots, as in the living room. - A tree stays in the place it was planted, and planting one needs soil (
discovery.js). The workspaces have no soil, so no tree is planted or drawn there, and no tub art is needed. - Gifts are drawn as they are.
Small windows
- The workspaces are framed from the bottom (
"fit": "cover-bottom",environment.js environmentFrame): a window shorter than the picture keeps the front of the room and loses the top of the wall, never the floor's front. - Down to 300×210, the approval spot and at least two desks stay in view. Desks sit near the middle and the approval spot at the front centre.
- In a window wider than the picture (a short strip), the front wins: the approval spot stays, and a desk cut off falls back to the nearest visible floor point.
Words
- Each workspace gets a
label, anaboutand its ownchatterkey in the four page string tables (ko, en, ja, zh-hans), using the glossary in the i18n standard. Friends' idle lines talk about the room, not about stars or the outdoors.
Order of work
- Behaviour in every place (no new art): state reactions, front spot, the dock rule, tests.
- Stations, fronts, blocks,
depthFarandsoil-keyed pots: data and code, tested with stand-in pictures. - The two pictures, their fronts and their geometry; the string tables; visual audit fixtures (day, night, rain, full size, 500×350, 320×240, a short wide window).
- Docs: add a place, the places design (a follow-up note), the guide's agent page and the CHANGELOG.
Left to the builder
- How the glass alpha is made.
- The exact station points, after the pictures exist.
- The
workingpose at a desk faces the screen; turning toward the laptop is not required.
Follow-up: as built (2026-11-12)
- The rooms take the outdoor light (
seasonArt, one picture for every season), so the room and the view through its glass share one light. A pane-only light needed its own mask, and a pane's rectangle also covered frames, walls and plants. The panes get no second rain or snow wash. - A station the window crops away is not used, instead of falling back to the nearest visible floor point: that point is often behind the very furniture that shows. A waiting friend comes to the front of the yard; a working or resting friend stays where it stands (
duty.js station). - A front starts at the tabletop. A laptop in the front covered a seated friend's face, so laptops stay in the picture behind the friend.
- A seated friend's name tag goes down to its feet, on the desk's front (
views.js place), and the agent's state dot sits in the tag beside the name. - The workshop's approval spot is beside the post, not behind it, and the post has no front.
- The sunshower and other moment glows are hidden on floors without soil: fronts cut from the land above the glow showed their edges.
- In a room (a floor without soil) friends grow with the picture past the size it was drawn for, a window 850px tall, up to twice their size (
field.js zoomFor). At 2560×1440 the living room's armchair was 4.0 friends tall and is 2.0, as at 1180×850; small windows keep the friends' readable size. - A picture framed from its foot moves its floor line up in a window wider than it, so the field follows the picture's own floor there (
field.js fieldTop). Before, the back desks lay above the field: no seat at 1920×1080, and a friend drawn too small behind its laptop at 2560×1440.
Follow-up: long tables and a waiting bench (2026-11-12)
- Both rooms were redrawn before release. Laptops did not suit the rooms, and long shared tables suit them better than single desks.
- Work: two long low tables per room, two seats each on the far side, so a seated friend faces the viewer. Only flat things lie on them (books, paper, seed packets), so nothing stands in front of a face.
- Waiting: a bench with a call bell at the front. Waiting friends stand in a line in front of it, drawn over it; the bench, its bell and the plant beside it are one front for a friend strolling behind.
- Rest: a tea corner with a low round table, cushions, tea, cookies and a checkers board, where the office's sofa and the workshop's hammock were.
- The desks keep their order: the inner seat of each table first, so two working friends sit at different tables.
- Also drawn for the approval spot and not taken: a small closed door in the side wall with a knocker and a doormat.
Follow-up: friends at home without an agent (2026-11-12)
- A workspace is lived in without an agent too. Now and then an idle friend sits at a free seat, has tea in the rest corner or stands by the bench, then strolls on (
lounge.js). - How often: about one idle turn in three goes to the furniture instead of a stroll. A friend stays 30 to 70 seconds, then does not sit again for a minute. The minute also starts when it sets off, so a friend picked up on the way or from its seat strolls first.
- Seats: the first free one, as
duty.js desk()gives them. A seat held by any friend is not offered; the tea table and the bench take friends in a line (inLine). - The trip and the sitting are the friend's own (
own). Its agent's state takes it at once, and the person's errand picks it after the free friends (forPerson). - A friend seeing to its agent takes the seat or the bench from a friend only sitting there, who walks back to its own place.
- At the tea table, a friend joining another invites it and the other answers, both looking at each other. Lines are in the string tables (
lounge.*). - Sitting costs one check a frame (
sitOut). A friend gets up when its time is over or the place changes. The yard draws no more often: a seated friend stands still. - Outdoors, and in a room without stations, nothing changes.
- The sprites have no sitting pose. A friend at the bench stands in front of it, as a waiting friend does.
Follow-up: depth after 1.6.1 (2026-11-12)
- 1.6.1 orders friends by their feet on the field (
field.js depthAt), as plants and gifts are. A front's layer is nowdepthAtof its foot line too (workspace.js frontsIn). With the old walking-range scale, a friend 10px behind a table was drawn over its front. - A friend left behind the dock is lifted to stand just above it (
views.js clearOfDock), on a resize and after a drop. Stations stay clear of the dock (duty.js inLine), so a friend at a seat, the bench or the tea table is not moved.
Follow-up: one workshop (2026-11-12)
- The office is dropped and the garden workshop replaces the living room, so one room carries the workspace.
- The workshop was redrawn from its own picture. The bench and its bell post moved down to the front, the tables and the tea corner came forward, and the floor between them opened up.
- Waiting: the approval spot is to the right of the bell post, on the open floor. A waiting friend is not drawn behind the bench, and in a 300×210 window it stands by the bell, fully visible, above the floor's edge.
- Furniture keeps the friends' size: a seated friend's tag rests on the table top, and the bench is about two friends wide.
- The bench, the post and its lantern are one front, cut along their outline.
- The tables' fronts follow the top board and the legs too, not their boxes: a lantern's ground glow or a gift's shade behind a table stops at the table, not at a straight edge beside it.