# Claude Cabinet

A cabinet of expert advisors for your Claude Code project. One command
gives Claude a memory, 34 domain experts, a planning process, and the
habit of starting sessions informed and ending them properly.

Built by a guy who'd rather talk to Claude than write code. Most of it
was built by Claude. I just complained until it (mostly) worked.

## The Idea

Your project gets a cabinet — specialist advisors who each own a domain
and weigh in when their expertise matters:

- **Cabinet members** — 34 domain experts (security, accessibility,
  architecture, QA, etc.) who review your project and surface what
  you'd miss alone
- **Briefings** — project context members read before weighing in
- **Committees** — members grouped by concern so you convene the right
  experts for the right question
- **The session loop** — watchtower keeps your project's state current in
  the background and hands it to you when a session opens; `/close` ends a
  session (legacy: `/orient` + `/debrief` by hand)

## Install

Open a terminal, `cd` into your project folder, and run:

```bash
curl -fsSL https://raw.githubusercontent.com/orenmagid/claude-cabinet/main/install.sh | bash
```

That's it. If you don't have git or Node.js, it installs them.
No choices to make — you get everything.

Then open [Claude Code](https://claude.ai/code) in the same folder and
say `/onboard`. It'll interview you about your project and set everything
up based on your answers.

**New to this?** See [GETTING-STARTED.md](GETTING-STARTED.md) for a
step-by-step walkthrough. Then [WORKFLOW-GUIDE.md](WORKFLOW-GUIDE.md)
for how to use everything — when to plan, when to audit, what the
cabinet does for you, and how the system grows with your project.

### For developers

If you have Node.js installed and want to choose which modules to
install, or want the lean option (skips work tracking and compliance):

```bash
npx create-claude-cabinet
```

The CLI walks you through module selection, copies skill files,
sets up hooks, and optionally installs a local SQLite work tracker. When
it's done, open Claude Code and run `/onboard`.

## What You Get

### The Session Loop (installed by default)

Continuity between sessions, so Claude never starts blind. By default this
is **watchtower** — a background system that keeps your project's state
current and hands it to Claude when a session opens.

- **Sessions start informed** — watchtower's SessionStart hook injects the
  current state (what you were working on, what's due, what broke). No
  start-of-session command to run.
- **`/briefing`** — review what needs attention across the project.
- **`/close`** (or **`/session-handoff`**) — end a session; the background
  rings handle inventory, lesson capture, and routing after you walk away.

Watchtower is installed by default; its background rings start when you run
**`/watchtower install`**. Until then it ships the skills and a dormant
SessionStart hook — nothing runs in the background and no API cost is
incurred.

**Prefer to run it by hand?** Opt out of watchtower and use the legacy
loop instead — **`/orient`** at the start (reads state and briefs you) and
**`/debrief`** at the end (marks work done, records lessons). Both still
ship, but watchtower replaces them.

### The Cabinet (included in lean)

34 expert cabinet members who each own a domain and stay in their lane.
**Speed-freak** watches performance. **Boundary-man** catches edge cases.
**Record-keeper** flags when docs drift from code. **Workflow-cop**
evaluates whether your process actually works. Each member has a
portfolio, produces structured findings, and knows when to speak up
and when to stay quiet.

You convene the cabinet with **`/audit`** — run it occasionally (every
few sessions, or before a release) to get a full review from every
relevant member. You don't need to audit every session. The cabinet
waits until called.

Each member is also a registered **agent type** — invoke any member
directly with `@cabinet-security`, `@cabinet-architecture`, etc.

When the Workflow tool is available, `/audit` runs a **deliberative
workflow**: Stage-1 members investigate, then Stage-2 critics
(anti-confirmation, QA, architecture) annotate findings — challenging
assumptions, adding context, or confirming. Findings arrive to triage
with the debate already attached. Optional `--rebuttal` mode lets
challenged members respond before triage.

Members are organized into **committees** — groups by concern, so you
can convene just the experts you need. Security review? Convene the
security committee. Performance concerns? Just the speed committee.

### Planning + Execution (included in lean)

Don't just start building — brief the cabinet first.

- **`/plan`** — describe what you want to build. Claude drafts a plan,
  then the relevant cabinet members critique it before a single line is
  written. The security member notices the missing auth check. The
  data integrity member catches the NULL handling gap. You approve the
  plan, and it carries enough detail for any future session to execute
  without re-exploring.
- **`/execute`** — pick up an approved plan and build it step by step.
  Cabinet members watch at each checkpoint. The plan tells Claude what
  to do; execute makes sure it gets done right.

### Work Tracking (full install)

Local SQLite database for tracking work as three types: **areas**
(standing responsibilities that never complete), **projects** (outcomes
that complete when every child is dispositioned), and **actions**
(single steps), plus dependency edges and a "what can I start now"
view. Claude reads and writes it directly — no external service needed.
Skip this if you already use GitHub Issues, Linear, or something else.

### Memory (included in lean)

Claude Code has built-in file memory, but no guardrails around it.
The memory module adds structure:

- **`/cc-remember`** — write a new memory with automatic indexing. Every memory gets its own file and is made reachable from `MEMORY.md` — by a direct entry or a region pointer — so the session loop can surface it next session.
- **`/memory`** — browse and search what Claude remembers.
- **Validation** — `validate-memory.mjs` checks that the index stays within Claude Code's session-start budget and that every memory file is reachable from `MEMORY.md`. A PostToolUse hook flags unreachable writes in real time.

### Compliance Stack (full install)

Scoped instructions in `.claude/rules/` that load by file path. An
enforcement pipeline that promotes recurring feedback into deterministic
hooks — things that keep going wrong become things that can't go wrong.

### Lifecycle (included in lean)

- **`/onboard`** — the cabinet's first briefing. Claude interviews you
  about your project and prepares everything the members need to do
  their jobs. Re-run it as the project matures — the interview adapts.
- **`/seed`** — recruit new members. Claude detects new tech in your
  project and proposes expert members to cover it. Your cabinet grows
  with your project.
- **`/cc-upgrade`** — when Claude Cabinet publishes updates, this skill
  runs the installer for the mechanical parts and walks you through
  what changed conversationally. Intelligence is the merge strategy.
- **`/cc-feedback`** — file friction with CC itself mid-session
  without waiting for debrief. When a skill, phase, or convention
  causes pain, this captures the detail and queues it for upstream
  delivery to the Claude Cabinet repo.

### Verify (opt-in, off by default)

Walkthrough verification harness — Cucumber `.feature` files describing
user journeys, Playwright running them, and human-in-the-loop verdict
pauses (Pass / Issue / Skip / Needs-info) at checks that need subjective
judgment. Replaces flat AC checklists with re-runnable scenarios you can
read months later.

- **`/verify`** — run the suite
- **`/verify learn`** — bootstrap from a cold start. Claude scans
  routes, memory, git, and the live UI; proposes scenarios; calibrates
  with you; then generates `.feature` files and step stubs
- **`/verify update "I changed X"`** — keep scenarios in sync as the
  product evolves
- **`/verify backfill <fid>`** — attach a Verify Plan to a pending
  action's notes

Enable with `--modules verify` (existing installs merge, nothing else
disturbed). Runtime lives at `~/.claude-cabinet/verify/<version>/` and
ships an opinionated `cabinet-verify` npm package built from de[sic]ify's
e2e harness.

## Your Workflow

The rhythm of each session:

1. **Start a session** → watchtower briefs you automatically; `/briefing`
   for the full picture (legacy loop: `/orient`)
2. **Do your work** → talk to Claude, use `/plan` for anything non-trivial
3. **Build it** → `/execute` to implement approved plans with cabinet oversight
4. **Check quality** → `/audit` occasionally for a full cabinet review
5. **Close the session** → `/close` (the rings capture the rest after you
   walk away; legacy loop: `/debrief`)

Step 5 is the minimum — start is automatic under watchtower. Everything in
between is yours to use as needed. The more you use, the more the cabinet
learns about your project.

## How It Works

The CLI handles mechanical setup: copying files, merging settings,
installing dependencies. `/onboard` handles intelligent configuration:
it interviews you about your project and generates the briefings your
cabinet needs — who you are, what you're building, what the architecture
looks like, where things live.

Everything is customizable through **phase files** — small markdown files
that override default behavior for any skill. Write content in a phase
file to customize it, write `skip: true` to disable it, or leave it
absent to use the default. No config files, no YAML, no DSL.

## Adding Modules to an Existing Install

Some modules (like `verify`) are opt-in. To add one
without touching anything else in your install:

```
npx create-claude-cabinet --modules verify --yes
```

The `--modules` flag **merges** with your existing install — it adds
the listed modules to what's already there, it doesn't replace your
module set. Safe to run on a mature project without losing
customization. You can pass multiple modules: `--modules verify,audit`.

### Opt-in Modules

| Module | What it does |
|--------|-------------|
| **verify** | Cucumber + Playwright walkthrough verification harness |
| **site-audit** | 14-check deployed-site quality audit with HTML reports |
| **engagement** | Client engagement management — packets, billing, feedback loops |
| **engagement-server** | Central multi-engagement API server (Railway/Fly deploy) |
| **watchtower** | Continuous background state management replacing orient/debrief |
| **mux** | Multi-project terminal manager — desks, auto-worktrees with shared identity, trail logging, DX captures, portal color-switching, durable tmux bindings, clipboard copy with hard-wrap removal, screenshot-to-clipboard launchd watcher |
| **bash-compress** | PostToolUse hook that compresses noisy Bash stdout (git status walls, npm/yarn install output) to reclaim context in long sessions; stderr and error lines pass through verbatim, fail-open |

## CLI Options

```
npx create-claude-cabinet                         # Interactive walkthrough
npx create-claude-cabinet my-project              # Install in ./my-project/
npx create-claude-cabinet --yes                   # Accept all defaults
npx create-claude-cabinet --yes --no-db           # All defaults, skip database
npx create-claude-cabinet --dry-run               # Preview without writing files
npx create-claude-cabinet --modules verify --yes  # Add an opt-in module (merges, doesn't replace)
npx create-claude-cabinet --frontier-model claude-fable-5  # Designate your frontier model (watchdog)
```

### Frontier-model watchdog

`--frontier-model <model>` records, once, which model your heavy thinking is supposed to run on. The designation is per-operator (stored in `~/.claude/cc-registry.json` under `frontierModel`, not per-project), and the installer prints the effective value on every run. From then on, the SessionStart hook (on watchtower installs, the default) — and `/orient` on the legacy loop — compares the session's actual model against it and leads the briefing with a loud warning on mismatch. The key can be an exact model ID (`claude-fable-5`, exact match required) or a family alias (`fable`, matches any model ID containing it). This is **visibility only**: nothing is pinned, blocked, or rerouted — it just makes "you're accidentally on the wrong model" impossible to miss. A stale key after a model-family transition nags loudly by design; update it with the same flag.

## What Gets Installed

Everything goes into `.claude/` or `scripts/`. Nothing touches your
source code.

```
.claude/
├── skills/          # watchtower, plan, execute, audit, orient, debrief, etc.
│   └── cabinet-*/   # 34 cabinet member definitions
├── cabinet/         # committees, lifecycle, composition patterns
│                    #   (incl. pib-db-access.md, pib-db-triggers.md)
├── briefing/        # project briefing templates
├── hooks/           # git guardrails, telemetry
├── agents/          # generated agent-type wrappers (enables @cabinet-*)
├── workflows/       # deliberative-audit.js (two-stage audit workflow)
├── rules/           # enforcement pipeline
├── memory/          # pattern templates
└── settings.json    # hook configuration

scripts/
├── pib-db.mjs        # work tracking CLI (if installed)
└── ...              # triage tools (if audit installed)

.ccrc.json           # installation metadata
```

## Upgrading

Re-run the installer to pick up new versions:

```bash
# Shell installer (re-downloads latest)
curl -fsSL https://raw.githubusercontent.com/orenmagid/claude-cabinet/main/install.sh | bash

# npm installer (if using Node.js)
npx create-claude-cabinet
```

In Claude Code, run `/cc-upgrade` for conversational merge of upstream
changes with your customizations.

## Works Across Projects

Claude Cabinet isn't just for one project — it manages how you work
with Claude everywhere.

- **Your identity** (`~/.claude/CLAUDE.md`) — set up once, carries to
  every project. Claude always knows who you are and what you do.
- **Project registry** (`~/.claude/cc-registry.json`) — tracks all
  your projects. `/onboard` asks how they relate; the session loop flags
  when work in one might affect another.
- **Profile maintenance** — if you mention something new about yourself
  or your project evolves, session close proposes updating your profile
  and registry so the next session starts current.

Install in each project folder. They're independent but aware of each
other.

## Philosophy

This started as the process layer of [Flow](https://github.com/orenmagid/flow),
a cognitive workspace built on Claude Code over months of intensive use. The
patterns that emerged — the session loop, cabinet-style audits, feedback
enforcement — turned out to be transferable to any project.

The core idea: Claude Code is powerful, but without process, each session
starts from zero. The session loop creates continuity. The cabinet catches
problems before they ship. The enforcement pipeline turns recurring
mistakes into permanent fixes.

None of this requires you to be a developer. I'm barely one myself. The
onboarding interview meets you where you are, and the system adapts
based on what you tell it.

This is very much a work in progress. Things will break. The session
loop is solid; everything else is still finding its shape. If you try it
and something's weird, that's not you — it's probably me. Or Claude.
We're figuring it out together.

## License

MIT
