Files
Nate HerkandClaude Opus 5.5 bc9f45ba0d 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>
2026-10-21 08:05:29 -05:00

30 lines
1.3 KiB
JavaScript

import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
export const APP_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
// Two layouts: nested two folders deep in a larger workspace, or the standalone
// student repo (app/ beside .claude/). The kit has .claude one level up.
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");
let cache = null;
export function env(key) {
if (process.env[key]) return process.env[key];
if (!cache) {
cache = {};
const p = path.join(REPO_ROOT, ".env");
if (fs.existsSync(p)) {
for (const line of fs.readFileSync(p, "utf8").split(/\r?\n/)) {
const m = line.match(/^([A-Z0-9_]+)=(.*)$/);
if (m && !(m[1] in cache)) cache[m[1]] = m[2].trim();
}
}
}
return cache[key] || "";
}