Skip to content

feat: auto-assign default model by department - #357

Closed
emgghost wants to merge 11 commits into
AgentSystemLabs:mainfrom
emgghost:office/pixel-2dac
Closed

emgghost wants to merge 11 commits into
AgentSystemLabs:mainfrom
emgghost:office/pixel-2dac

Conversation

@emgghost

Copy link
Copy Markdown

Summary

Implements Smart Model Auto-Assignment by Department in Agent Office:

  • Adds defaultModel to DepartmentDef and defines default models across all 10 departments in src/shared/departments.ts
  • Implements resolveDepartmentModel in src/server/departments.ts to assign the department default model when compatible with the effective provider while respecting explicit model overrides
  • Integrates resolveDepartmentModel in POST /office/workers (src/server/hooks/office-workers.ts) and POST /office/workers/ask (src/server/hooks/office-asks.ts)
  • Fixes desk capacity error message in office-asks.ts to reflect all 4 department desks
  • Updates CLI help text and MCP tool descriptions in bin/office-workers.js
  • Updates README.md, docs/features.md, and docs/how-it-works.md
  • Adds tests in tests/departments.test.ts verifying default models, provider compatibility fallback, and hiring behavior

emgghost and others added 11 commits October 10, 2026 15:59
Each floor keeps standing rules ("run npm test before opening a PR") in
.agent-office/lessons.json. A worker corrected for good records one with
record_lesson / `office-workers lesson add`, people add, reword and take
them off in ☰ → 🎓 Lessons, and every agent hired on the floor afterwards
gets them ahead of its first task (the editable worker.lessons prompt).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
xterm.js lays a row out left to right and its DOM renderer splits it into
separate pieces (at a zero-width non-joiner, at a glyph whose width doesn't
match the cell), so the browser couldn't order an RTL sentence or join its
letters across them: «چرا تست‌ها» came out in scrambled pieces. Each RTL run
is now one joined range (xterm's character joiner), which the browser lays
out right to left inside the left-to-right row.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#3)

The renderer asks for powerPreference 'high-performance', but on a Windows
laptop with two GPUs Chrome and Edge run on whichever one Windows gives them,
the built-in one by default, and with hardware acceleration off they draw in
software. ☰ → 🖥️ Graphics reads the renderer (WEBGL_debug_renderer_info),
says whether it's a graphics card, built-in graphics or software, and walks
through the Windows graphics setting (or hardware acceleration) to fix it.
The slow-computer banner offers it first.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ask_worker / `office-workers ask` types a question into another worker's
terminal once it can take it (never mid permission prompt), and the answer
(answer_question / `office-workers answer`) goes back to the asking call,
which waits up to 45s, or is typed into the asker's terminal when it comes
later. A worker sent home unanswered tells whoever asked.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The sixteen desks are eight departments, two desks each: Security, QA,
Backend, Frontend, Product Owner, Project Manager, Designer and Scrum
Master. Each is a glass-walled room round its desk row (a sliding door
behind the chairs, its own floor, its sign and the kit of its trade), its
workers are its color and wear its gear and badge, and they start in its
role (editable dept.<id> prompts, ahead of the floor's lessons). Workers
ask a department with ask_worker {department}: whoever there is readiest
answers, or the office hires someone at a free desk of its for the
question. The dog's and workers' walks keep to the doors.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A fourth board agent, the Manager, at its own desk at the foot of the
stairs up to the boss office: the person running the office tells it what
they want, and it plans the work and hands it to the departments
(hire_worker / office-workers hire with a department), keeps them moving
and reports back. It doesn't edit anything itself. The workers it hires
are its own (via: 'manager', kept through a restart), and when one
finishes, stops at a question or permission prompt, or stops, a 📣 report
is typed into the Manager's terminal once it can take one. Maps without a
place for it put it beside the Queue agent.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The kiosk collider ran back to the north wall for every board agent, which
the Manager's, standing out in the room, turned into an invisible wall the
length of the floor. Only kiosks by the north wall reach back to it now
(kioskCollider in world/office/kiosk.ts). The Manager gets a booth of its
own round its kiosk: gold-framed glass low enough for its name tag and card
to show over it, a sliding door toward the room, its floor, its sign and
two plants, which the dog's and the workers' walks keep to the door of.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A joined RTL run is drawn as one span, which xterm fits to its cells with
letter-spacing: the difference between the cells' width and the text's.
That's right for a one-glyph ligature, but on a run of many letters it's
added after every one, and Chrome puts it at the spaces of a cursive
script, so a Persian sentence was spread across the row. Each RTL span is
now an inline box exactly its cells wide, unspaced, laid out right to left
against its right edge (squeezed to fit when the font is wider), so the
words stay together and the rest of the row keeps its columns.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The elevator gains a 🏢 Departments stop on every floor: a windowless hall
on the office's level, 600 m north of it, with a lobby by its lift and ten
glass rooms of four desks each down either side of a corridor. Backend,
Frontend, QA, Security (privacy too), DevOps, Product Owner, Designer,
Persian Content, Technical Writer and Tech Lead; the Project Manager and
Scrum Master go (the Manager does their job). The office's desks are open
desks again. Workers hired in the hall walk in out of its lift, walking to
a desk across the divide rides it, and DevOps never touches a live server
without the employer's go-ahead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Top speed 20 m/s (72 km/h) -> 150 km/h, with quicker acceleration and
harder brakes to match. Steering stops narrowing past 20 m/s so the
scenic loop's bends can still be taken flat out, and the engine sound
gets two more gears.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- Add defaultModel to each department definition in src/shared/departments.ts
- Implement resolveDepartmentModel in src/server/departments.ts with provider compatibility check
- Auto-assign department default model in POST /office/workers and POST /office/workers/ask (askHiring)
- Update CLI help and MCP tool descriptions in bin/office-workers.js
- Update documentation in README.md, docs/features.md, and docs/how-it-works.md
- Add tests in tests/departments.test.ts
@emgghost emgghost closed this Oct 13, 2026
@emgghost
emgghost deleted the office/pixel-2dac branch October 13, 2026 07:14
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