Add four on-call advisors and a recommended board for every council

- New seats, each built with /newroaster from public work and checked so
  every quote is verbatim: Naval Ravikant (leverage and wealth), Codie
  Sanchez (buying and owning small businesses), Leila Hormozi (leadership
  and scaling teams), and Sara Blakely (consumer product and brand from
  zero). They are on call, not on the default board of seven.
- Before each council the Chair now recommends a board from every advisor,
  with one line on why each fits, and asks the user to confirm, swap, or
  use the default board. "board": "ask" is the new default; "auto" and
  "default" remain.
- The room's API runner picks seats from the whole roster the same way.
- Seat names resolve full name first, so Leila Hormozi and Alex Hormozi
  never collide.
- /newroaster gains a reusable writer prompt for the brain step.
- README explains the on-call advisors and the board step.

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:55:44 -05:00
1 parent bc9f45ba0d
commit 60e7b0c80b
48 files changed
+3575 -39

No files matched your search

+14 -5
View File
@@ -1,6 +1,6 @@
import fs from "node:fs";
import path from "node:path";
import { byKey, systemFor, parseCard, checkQuotes, defaultBoard } from "./seats.mjs";
import { SEATS, BOARD, byKey, systemFor, parseCard, checkQuotes, defaultBoard, loadRoster } from "./seats.mjs";
import * as ai from "./anthropic.mjs";
import { S } from "./anthropic.mjs";
import { SESSIONS_DIR } from "./env.mjs";
@@ -193,6 +193,7 @@ async function chairSetup(st) {
assumptions: S.arr(S.str),
weights: S.arr(S.obj({ seat: S.enum(...st.board), weight: S.int, reason: S.str })),
quick_seats: S.arr(S.enum(...st.board)),
seats: S.arr(S.enum(...st.board)),
});
return ai.json({
model: MODELS.chair, system: chairSystem(st), schema, maxTokens: 3000,
@@ -207,7 +208,8 @@ 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, 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.`,
- 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.
- seats: ${st.pick ? "the board for a full council, five to seven seats: every seat at weight 2 or 3, the seat that guards the downside, and the seat most likely to disagree. Leave out seats at weight 1 unless they are the downside or dissent seat." : "every seat (the board is fixed)."}`,
});
}
@@ -340,7 +342,11 @@ export function startCouncil(prompt, mode = "full") {
}
async function run(s) {
const st = (s.state = { prompt: s.prompt, mode: s.mode, board: defaultBoard(), cards: { 1: {}, 2: {}, 3: {} }, scores: {}, rounds: [] });
// "default" seats the saved default board; "ask" and "auto" let the Chair pick from every seat
// (there is no one to ask in the room, so "ask" picks like "auto" here)
loadRoster();
const pick = BOARD.mode !== "default";
const st = (s.state = { prompt: s.prompt, mode: s.mode, pick, board: pick ? SEATS.map((x) => x.key) : 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, {
@@ -349,10 +355,13 @@ async function run(s) {
weights: Object.fromEntries(st.board.map((k) => [k, { weight: 1, reason: "" }])),
});
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();
const picked = [...new Set(setup.seats || [])].filter((k) => st.board.includes(k)).slice(0, 9);
const full = pick && picked.length >= 3 ? picked : st.board.slice(0, 9);
st.seats = s.mode === "quick" ? [...new Set(setup.quick_seats)].filter((k) => st.board.includes(k)).slice(0, 4) : full;
if (s.mode === "quick" && st.seats.length < 4) {
for (const k of st.board) if (st.seats.length < 4 && !st.seats.includes(k)) st.seats.push(k);
for (const k of full) if (st.seats.length < 4 && !st.seats.includes(k)) st.seats.push(k);
}
st.board = st.seats.slice(); // later Chair calls only see the seats at the table
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 });
emit(s, "phase", { phase: "round1", label: "Round 1: opening positions" });
+16 -1
View File
@@ -77,6 +77,21 @@ export function checkQuotes(key, text) {
return out;
}
// ---------- names ----------
/** A seat named somewhere in a short piece of text: full name first, then short name, then
* surname. Two seats can share a surname (Alex and Leila Hormozi), so the surname only counts
* when one seat has it, or when it is also that seat's short name. */
export function seatIn(text) {
const t = ` ${String(text || "").toLowerCase().replace(/[^a-z0-9 ]+/g, " ").replace(/\s+/g, " ")} `;
const has = (w) => w && t.includes(` ${w.toLowerCase().replace(/[^a-z0-9 ]+/g, " ").trim()} `);
return SEATS.find((s) => has(s.name)) || SEATS.find((s) => has(s.short) || has(s.key)) ||
SEATS.find((s) => {
const sur = s.name.split(" ").pop().toLowerCase();
const same = SEATS.filter((x) => x.name.split(" ").pop().toLowerCase() === sur);
return has(sur) && (same.length === 1 || s.short.toLowerCase() === sur);
}) || null;
}
// ---------- card parsing ----------
const field = (text, label) => {
// label at line start, or after a "·" or "|" when several fields share a line
@@ -101,7 +116,7 @@ export function parseCard(text, optionIds) {
const stance = field(text, "STANCE");
const ruin = (field(text, "RUIN RISK").match(/none|possible|likely/i) || [""])[0].toLowerCase();
const disagree = field(text, "I DISAGREE MOST WITH");
const target = SEATS.find((s) => new RegExp(`\\b(${s.short}|${s.name.split(" ").pop()})\\b`, "i").test(disagree.slice(0, 40)));
const target = seatIn(disagree.slice(0, 40));
const voteRaw = field(text, "VOTE");
const vote = /dissent/i.test(voteRaw) ? "dissent" : /amend/i.test(voteRaw) ? "amend" : /endorse/i.test(voteRaw) ? "endorse" : "";
return {
+2 -2
View File
@@ -8,7 +8,7 @@
// verdict.json -> the verdict
import fs from "node:fs";
import path from "node:path";
import { SEATS, byKey, parseCard, checkQuotes, loadRoster, defaultBoard } from "./seats.mjs";
import { SEATS, byKey, parseCard, checkQuotes, loadRoster, defaultBoard, seatIn } from "./seats.mjs";
import { SESSIONS_DIR } from "./env.mjs";
import { optionScores, finalNumbers, verdictSeats, DISCLAIMER } from "./council.mjs";
@@ -22,7 +22,7 @@ const readJson = (p) => { const t = readText(p); if (!t) return null; try { retu
export function seatKey(x) {
const t = String(x || "").toLowerCase().replace(/\(.*$/, "").replace(/[^a-z ]/g, " ").replace(/\s+/g, " ").trim();
if (!t) return null;
return SEATS.find((s) => t === s.key || t === s.short.toLowerCase() || t.startsWith(s.short.toLowerCase()) || t === s.name.toLowerCase() || t.split(" ").includes(s.name.split(" ").pop().toLowerCase()))?.key || null;
return SEATS.find((s) => t === s.key || t === s.short.toLowerCase() || t === s.name.toLowerCase())?.key || seatIn(t)?.key || null;
}
/** Split a round file into seat cards. A card is the text under a "## <Seat>" heading