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:
1 parent
f5e7b631a1
commit
bc9f45ba0d
21 files changed
+965
-75
No files matched your search
+22
-18
@@ -1,6 +1,6 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { SEATS, byKey, systemFor, parseCard, checkQuotes } from "./seats.mjs";
|
||||
import { byKey, systemFor, parseCard, checkQuotes, defaultBoard } from "./seats.mjs";
|
||||
import * as ai from "./anthropic.mjs";
|
||||
import { S } from "./anthropic.mjs";
|
||||
import { SESSIONS_DIR } from "./env.mjs";
|
||||
@@ -10,8 +10,12 @@ export const MODELS = {
|
||||
chair: process.env.CHAIR_MODEL || "claude-opus-5-5",
|
||||
};
|
||||
|
||||
const CHAIR_SYSTEM = `You are the Chair of a Roast Room council: seven simulated advisors built from the public work of Jeff Bezos (strategy and decisions), Paul Graham (product and startups), Alex Hormozi (offers, pricing, and sales), Gary Vaynerchuk (marketing and attention), Dan Martell (people, hiring, and founder time), Gino Wickman (operations and scaling), and Warren Buffett (money and capital).
|
||||
You never argue a side and never add your own pillar. You run the room, keep score, and write in plain English: short sentences, no em dashes, no hype, no tee-ups like "here's the thing", no filler. Seat keys (for key fields only): bezos, graham, hormozi, garyvee, martell, wickman, buffett. Whenever you write a seat's name in prose or in a seat field, use its display name: Bezos, Graham, Hormozi, Gary V, Martell, Wickman, Buffett.`;
|
||||
// The board comes from the roster: the saved default board, or every seat it lists.
|
||||
const chairSystem = (st) => {
|
||||
const seats = st.board.map((k) => byKey[k]);
|
||||
return `You are the Chair of a Roast Room council: ${seats.length} simulated advisors built from the public work of ${seats.map((x) => `${x.name} (${x.pillar.toLowerCase()})`).join(", ")}.
|
||||
You never argue a side and never add your own pillar. You run the room, keep score, and write in plain English: short sentences, no em dashes, no hype, no tee-ups like "here's the thing", no filler. Seat keys (for key fields only): ${seats.map((x) => x.key).join(", ")}. Whenever you write a seat's name in prose or in a seat field, use its display name: ${seats.map((x) => x.short).join(", ")}.`;
|
||||
};
|
||||
|
||||
export const DISCLAIMER = "Simulated advisors built from each person's public work. They are not the people and do not speak for them.";
|
||||
|
||||
@@ -187,11 +191,11 @@ async function chairSetup(st) {
|
||||
brief: S.str,
|
||||
options: S.arr(S.obj({ id: S.enum("A", "B", "C", "D"), label: S.str })),
|
||||
assumptions: S.arr(S.str),
|
||||
weights: S.arr(S.obj({ seat: S.enum(...SEATS.map((s) => s.key)), weight: S.int, reason: S.str })),
|
||||
quick_seats: S.arr(S.enum(...SEATS.map((s) => s.key))),
|
||||
weights: S.arr(S.obj({ seat: S.enum(...st.board), weight: S.int, reason: S.str })),
|
||||
quick_seats: S.arr(S.enum(...st.board)),
|
||||
});
|
||||
return ai.json({
|
||||
model: MODELS.chair, system: CHAIR_SYSTEM, schema, maxTokens: 3000,
|
||||
model: MODELS.chair, system: chairSystem(st), schema, maxTokens: 3000,
|
||||
prompt: `A founder brought this to the council:
|
||||
|
||||
"""${st.prompt}"""
|
||||
@@ -203,19 +207,19 @@ Set up the room.
|
||||
- brief: under 200 words covering the business, resources, what success looks like, and the founder's lean, using only what the founder said. Do not invent facts.
|
||||
- assumptions: any number or fact you had to assume to make the brief usable, each one line. Keep it to what matters.
|
||||
- weights: one entry for every seat, weight 1 to 3 (3 = the decision lives in this pillar, 2 = materially affected, 1 = touched at the edges). Exactly one or two seats at 3. Reason in one line.
|
||||
- quick_seats: the four seats for a quick council: the two highest-weight seats, Buffett or Bezos as the downside check (whichever is not already in), and the seat most likely to disagree with the others.`,
|
||||
- quick_seats: the four seats for a quick council: the two highest-weight seats, the seat that guards the downside (money, capital, or risk) if it is not already in, and the seat most likely to disagree with the others.`,
|
||||
});
|
||||
}
|
||||
|
||||
async function chairCruxes(st) {
|
||||
const schema = S.obj({
|
||||
cruxes: S.arr(S.obj({ question: S.str, sides: S.arr(S.obj({ position: S.str, seats: S.arr(S.enum(...SEATS.map((s) => s.key))) })) })),
|
||||
cruxes: S.arr(S.obj({ question: S.str, sides: S.arr(S.obj({ position: S.str, seats: S.arr(S.enum(...st.board)) })) })),
|
||||
unanimous: S.bool,
|
||||
note: S.str,
|
||||
pressure: S.arr(S.obj({ seat: S.enum(...SEATS.map((s) => s.key)), ask: S.str })),
|
||||
pressure: S.arr(S.obj({ seat: S.enum(...st.board), ask: S.str })),
|
||||
});
|
||||
return ai.json({
|
||||
model: MODELS.chair, system: CHAIR_SYSTEM, schema, maxTokens: 3000,
|
||||
model: MODELS.chair, system: chairSystem(st), schema, maxTokens: 3000,
|
||||
prompt: `${briefBlock(st)}
|
||||
|
||||
ROUND 1 CARDS
|
||||
@@ -239,7 +243,7 @@ async function chairDraft(st, interim) {
|
||||
kill_criteria: S.str,
|
||||
});
|
||||
return ai.json({
|
||||
model: MODELS.chair, system: CHAIR_SYSTEM, schema, maxTokens: 3000,
|
||||
model: MODELS.chair, system: chairSystem(st), schema, maxTokens: 3000,
|
||||
prompt: `${briefBlock(st)}
|
||||
|
||||
ROUND 2 CARDS (the debate)
|
||||
@@ -269,7 +273,7 @@ async function chairVerdict(st, finalScores, recommended) {
|
||||
revisit: S.str,
|
||||
});
|
||||
return ai.json({
|
||||
model: MODELS.chair, system: CHAIR_SYSTEM, schema, maxTokens: 5000,
|
||||
model: MODELS.chair, system: chairSystem(st), schema, maxTokens: 5000,
|
||||
prompt: `${briefBlock(st)}
|
||||
|
||||
CRUXES: ${JSON.stringify(st.cruxes)}
|
||||
@@ -336,18 +340,18 @@ export function startCouncil(prompt, mode = "full") {
|
||||
}
|
||||
|
||||
async function run(s) {
|
||||
const st = (s.state = { prompt: s.prompt, mode: s.mode, cards: { 1: {}, 2: {}, 3: {} }, scores: {}, rounds: [] });
|
||||
const st = (s.state = { prompt: s.prompt, mode: s.mode, board: defaultBoard(), cards: { 1: {}, 2: {}, 3: {} }, scores: {}, rounds: [] });
|
||||
emit(s, "phase", { phase: "setup", label: "The Chair is reading your question" });
|
||||
const setup = await chairSetup(st);
|
||||
Object.assign(st, {
|
||||
title: setup.title, decision: setup.decision, brief: setup.brief,
|
||||
options: setup.options, assumptions: setup.assumptions,
|
||||
weights: Object.fromEntries(SEATS.map((x) => [x.key, { weight: 1, reason: "" }])),
|
||||
weights: Object.fromEntries(st.board.map((k) => [k, { weight: 1, reason: "" }])),
|
||||
});
|
||||
for (const w of setup.weights) st.weights[w.seat] = { weight: Math.max(1, Math.min(3, w.weight)), reason: w.reason };
|
||||
st.seats = s.mode === "quick" ? [...new Set(setup.quick_seats)].slice(0, 4) : SEATS.map((x) => x.key);
|
||||
for (const w of setup.weights) if (st.weights[w.seat]) st.weights[w.seat] = { weight: Math.max(1, Math.min(3, w.weight)), reason: w.reason };
|
||||
st.seats = s.mode === "quick" ? [...new Set(setup.quick_seats)].filter((k) => st.board.includes(k)).slice(0, 4) : st.board.slice();
|
||||
if (s.mode === "quick" && st.seats.length < 4) {
|
||||
for (const x of SEATS) if (st.seats.length < 4 && !st.seats.includes(x.key)) st.seats.push(x.key);
|
||||
for (const k of st.board) if (st.seats.length < 4 && !st.seats.includes(k)) st.seats.push(k);
|
||||
}
|
||||
emit(s, "setup", { title: st.title, decision: st.decision, brief: st.brief, options: st.options, assumptions: st.assumptions, weights: st.weights, seats: st.seats, mode: s.mode });
|
||||
|
||||
@@ -432,7 +436,7 @@ export function save(s) {
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
fs.writeFileSync(path.join(dir, "events.json"), JSON.stringify({ id: s.id, prompt: s.prompt, mode: s.mode, status: s.status, title: st.title, events: s.events }, null, 1));
|
||||
if (st.options) {
|
||||
const lines = [`# ${st.title}`, "", `Asked: ${s.prompt}`, "", st.brief, "", "Options:", ...st.options.map((o) => `- ${o.id}: ${o.label}`), "", "Assumptions:", ...(st.assumptions || []).map((a) => `- ${a}`), "", "| Seat | Weight | Reason |", "|---|---|---|", ...SEATS.map((x) => `| ${x.short} | ${st.weights[x.key].weight} | ${st.weights[x.key].reason} |`)];
|
||||
const lines = [`# ${st.title}`, "", `Asked: ${s.prompt}`, "", st.brief, "", "Options:", ...st.options.map((o) => `- ${o.id}: ${o.label}`), "", "Assumptions:", ...(st.assumptions || []).map((a) => `- ${a}`), "", "| Seat | Weight | Reason |", "|---|---|---|", ...st.seats.map((k) => `| ${byKey[k].short} | ${st.weights[k].weight} | ${st.weights[k].reason} |`)];
|
||||
fs.writeFileSync(path.join(dir, "brief.md"), lines.join("\n") + "\n");
|
||||
}
|
||||
for (const r of st.rounds || []) {
|
||||
|
||||
@@ -8,6 +8,7 @@ export const APP_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)
|
||||
const KIT = fs.existsSync(path.join(APP_ROOT, "..", ".claude", "skills", "roast-room"));
|
||||
export const REPO_ROOT = KIT ? path.resolve(APP_ROOT, "..") : path.resolve(APP_ROOT, "..", "..");
|
||||
export const BRAINS_DIR = path.join(REPO_ROOT, ".claude", "skills", "roast-room", "brains");
|
||||
export const ROSTER = path.join(REPO_ROOT, ".claude", "skills", "roast-room", "roster.json");
|
||||
export const AGENTS_DIR = path.join(REPO_ROOT, ".claude", "agents");
|
||||
export const SESSIONS_DIR = KIT ? path.join(REPO_ROOT, "sessions") : path.join(REPO_ROOT, "projects", "founder-council", "sessions");
|
||||
|
||||
|
||||
+29
-11
@@ -1,17 +1,33 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { AGENTS_DIR, BRAINS_DIR } from "./env.mjs";
|
||||
import { AGENTS_DIR, BRAINS_DIR, ROSTER } from "./env.mjs";
|
||||
|
||||
export const SEATS = [
|
||||
{ key: "bezos", name: "Jeff Bezos", short: "Bezos", initials: "JB", slug: "jeff-bezos", pillar: "Strategy and decisions", question: "Is this the right bet, and how reversible is it?", dimension: "Strategic fit and reversibility", color: "#e8a33d" },
|
||||
{ key: "graham", name: "Paul Graham", short: "Graham", initials: "PG", slug: "paul-graham", pillar: "Product and startups", question: "Is this something people actually want, and is it growing?", dimension: "Real demand and growth", color: "#f06b3f" },
|
||||
{ key: "hormozi", name: "Alex Hormozi", short: "Hormozi", initials: "AH", slug: "alex-hormozi", pillar: "Offers, pricing, and sales", question: "Will people pay, how much, and how do we close?", dimension: "Offer strength and unit economics", color: "#d94a6a" },
|
||||
{ key: "garyvee", name: "Gary Vaynerchuk", short: "Gary V", initials: "GV", slug: "gary-vaynerchuk", pillar: "Marketing and attention", question: "Where does the attention come from, and is it underpriced?", dimension: "Attention and distribution", color: "#9b5de5" },
|
||||
{ key: "martell", name: "Dan Martell", short: "Martell", initials: "DM", slug: "dan-martell", pillar: "People, hiring, and founder time", question: "Who does this, and what does it cost the founder's calendar?", dimension: "Team capacity and founder time", color: "#3d8bfd" },
|
||||
{ key: "wickman", name: "Gino Wickman", short: "Wickman", initials: "GW", slug: "gino-wickman", pillar: "Operations and scaling", question: "Can the business run this without the founder holding it together?", dimension: "Operational readiness", color: "#1fa67a" },
|
||||
{ key: "buffett", name: "Warren Buffett", short: "Buffett", initials: "WB", slug: "warren-buffett", pillar: "Money and capital", question: "What does it do to cash, risk, and long-term value?", dimension: "Downside and capital efficiency", color: "#4c6a92" },
|
||||
];
|
||||
export const byKey = Object.fromEntries(SEATS.map((s) => [s.key, s]));
|
||||
// Every seat lives in the skill's roster.json (the /newroaster skill adds to it). SEATS and
|
||||
// byKey are filled in place, so a seat added while the room is running shows up on the next
|
||||
// read without a restart.
|
||||
export const SEATS = [];
|
||||
export const byKey = {};
|
||||
export const BOARD = { mode: "default", default: [] };
|
||||
let rosterStamp = 0;
|
||||
export function loadRoster() {
|
||||
let stat;
|
||||
try { stat = fs.statSync(ROSTER); } catch { throw new Error(`roster not found at ${ROSTER}`); }
|
||||
if (stat.mtimeMs === rosterStamp && SEATS.length) return SEATS;
|
||||
const r = JSON.parse(fs.readFileSync(ROSTER, "utf8"));
|
||||
const seats = (r.seats || []).filter((s) => s.key && s.slug && fs.existsSync(path.join(AGENTS_DIR, `council-${s.key}.md`)));
|
||||
SEATS.splice(0, SEATS.length, ...seats);
|
||||
for (const k of Object.keys(byKey)) delete byKey[k];
|
||||
for (const s of SEATS) byKey[s.key] = s;
|
||||
BOARD.mode = ["default", "ask", "auto"].includes(r.board) ? r.board : "default";
|
||||
const def = (r.default || []).filter((k) => byKey[k]);
|
||||
BOARD.default = def.length ? def : SEATS.slice(0, 7).map((s) => s.key);
|
||||
rosterStamp = stat.mtimeMs;
|
||||
for (const k of [...systemCache.keys()]) if (!byKey[k]) systemCache.delete(k);
|
||||
brainText.clear();
|
||||
return SEATS;
|
||||
}
|
||||
/** The seats at the table when no one picked: the saved default board. */
|
||||
export const defaultBoard = () => (loadRoster(), BOARD.default.slice());
|
||||
|
||||
const read = (p) => (fs.existsSync(p) ? fs.readFileSync(p, "utf8") : "");
|
||||
const stripFront = (t) => t.replace(/^---[\s\S]*?\n---\n/, "");
|
||||
@@ -109,3 +125,5 @@ export function parseCard(text, optionIds) {
|
||||
thisWeek: field(text, "WHAT I'D DO THIS WEEK"),
|
||||
};
|
||||
}
|
||||
|
||||
loadRoster();
|
||||
+3
-2
@@ -8,7 +8,7 @@
|
||||
// verdict.json -> the verdict
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { SEATS, byKey, parseCard, checkQuotes } from "./seats.mjs";
|
||||
import { SEATS, byKey, parseCard, checkQuotes, loadRoster, defaultBoard } from "./seats.mjs";
|
||||
import { SESSIONS_DIR } from "./env.mjs";
|
||||
import { optionScores, finalNumbers, verdictSeats, DISCLAIMER } from "./council.mjs";
|
||||
|
||||
@@ -62,6 +62,7 @@ function finish(x, status) {
|
||||
|
||||
function normalizeSetup(c) {
|
||||
const options = (c.options || []).map((o, i) => (typeof o === "string" ? { id: "ABCD"[i], label: o } : { id: String(o.id || "ABCD"[i]).toUpperCase(), label: o.label || o.text || "" }));
|
||||
loadRoster(); // pick up a seat added since the room started
|
||||
const weights = Object.fromEntries(SEATS.map((s) => [s.key, { weight: 1, reason: "" }]));
|
||||
const wl = Array.isArray(c.weights) ? c.weights : Object.entries(c.weights || {}).map(([seat, w]) => (typeof w === "number" ? { seat, weight: w } : { seat, ...w }));
|
||||
for (const w of wl) { const k = seatKey(w.seat); if (k) weights[k] = { weight: Math.max(1, Math.min(3, Number(w.weight) || 1)), reason: w.reason || "" }; }
|
||||
@@ -70,7 +71,7 @@ function normalizeSetup(c) {
|
||||
return {
|
||||
title: c.title || "Roast Room", decision: c.decision || "", brief: c.brief || "", mode,
|
||||
options, assumptions: c.assumptions || [], weights,
|
||||
seats: seats.length ? [...new Set(seats)] : SEATS.map((s) => s.key),
|
||||
seats: seats.length ? [...new Set(seats)] : defaultBoard(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user