Add /newroaster and a configurable default board

- /newroaster builds a new advisor the way the original seven were built:
  finds and fetches public sources, extracts frameworks, rules, positions,
  stories, and voice with parallel sub-agents, writes the brain, checks every
  quote is verbatim, writes the council agent, and registers the seat.
- roster.json lists every seat, the default board, and how each council
  picks its seats (default, ask, or auto). /roast-room board changes it;
  --seats and --all override it per run.
- The room reads the roster: it seats up to nine, picks up new seats without
  a restart, and draws a talking bust for seats without portraits.
- README and CLAUDE.md explain choosing the board and adding an advisor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nate HerkandClaude Opus 5.5 committed 2026-10-21 08:05:29 -05:00
1 parent f5e7b631a1
commit bc9f45ba0d
21 files changed
+965 -75

No files matched your search

+8 -3
View File
@@ -2,14 +2,14 @@ import http from "node:http";
import fs from "node:fs";
import path from "node:path";
import { APP_ROOT, env } from "./lib/env.mjs";
import { SEATS } from "./lib/seats.mjs";
import { loadRoster, BOARD } from "./lib/seats.mjs";
import { startCouncil, getSession, subscribe, listSaved, loadSaved, MODELS } from "./lib/council.mjs";
import { usage } from "./lib/anthropic.mjs";
import * as watch from "./lib/watch.mjs";
const PORT = Number(process.env.PORT) || 4730;
const PUBLIC = path.join(APP_ROOT, "public");
const TYPES = { ".html": "text/html; charset=utf-8", ".js": "text/javascript; charset=utf-8", ".css": "text/css; charset=utf-8", ".svg": "image/svg+xml", ".png": "image/png", ".webp": "image/webp", ".ico": "image/x-icon", ".json": "application/json", ".ttf": "font/ttf", ".txt": "text/plain; charset=utf-8" };
const TYPES = { ".html": "text/html; charset=utf-8", ".js": "text/javascript; charset=utf-8", ".css": "text/css; charset=utf-8", ".svg": "image/svg+xml", ".png": "image/png", ".webp": "image/webp", ".jpg": "image/jpeg", ".ico": "image/x-icon", ".json": "application/json", ".ttf": "font/ttf", ".txt": "text/plain; charset=utf-8" };
let running = null; // one council at a time (API runner)
@@ -33,7 +33,12 @@ const server = http.createServer(async (req, res) => {
const url = new URL(req.url, `http://${req.headers.host}`);
const p = url.pathname;
try {
if (p === "/api/seats") return send(res, 200, { seats: SEATS, models: MODELS, runner: RUNNER, hasKey: Boolean(env("ANTHROPIC_API_KEY")) });
if (p === "/api/seats") {
// portraits: which of the four mouth shapes exist for each seat (a seat with none gets a drawn bust)
const frame = (key, sh) => ["webp", "png", "jpg"].map((x) => `${key}-${sh}.${x}`).find((f) => fs.existsSync(path.join(PUBLIC, "portraits", f)));
const seats = loadRoster().map((s) => ({ ...s, portraits: Object.fromEntries(["base", "open", "mid", "blink"].map((sh) => [sh, frame(s.key, sh)]).filter(([, f]) => f).map(([sh, f]) => [sh, `/portraits/${f}`])) }));
return send(res, 200, { seats, board: BOARD, models: MODELS, runner: RUNNER, hasKey: Boolean(env("ANTHROPIC_API_KEY")) });
}
if (p === "/api/usage") return send(res, 200, usage);
if (p === "/api/council" && req.method === "POST") {
if (RUNNER !== "api") return send(res, 403, { error: "This room is a viewer. Run /roast-room in Claude Code, or set COUNCIL_RUNNER=api in .env." });