global/CLAUDE.md |
Lean always-on layer: principles (think-before-coding, simplicity, surgical changes), the hard gates (push approval, codex gate, AFK-not-approval), and a pointer to the feature-workflow skill. Lives under global/ so working sessions in this repo don't load it twice alongside ~/.claude/CLAUDE.md |
global/rules/ |
Path-scoped user rules, installed to ~/.claude/rules/ — load only when a matching file is touched, so they don't add to every session's always-on context |
skills/feature-workflow/SKILL.md |
The six-stage single-master feature pipeline, the parallel-multi-agent mechanism picker, and the token-discipline rules. Loads on demand when a pipeline or fan-out starts. |
skills/agent-teams/SKILL.md |
The orchestration playbook — when to fan out, how to pick the mechanism (subagents / Workflows), the pipeline, models, worktree/merge flow, the plan-approval gate. Loads on demand. |
agents/explorer.md |
Read-only codebase search on Sonnet at effort medium — the pinned stand-in for built-in Explore (Sonnet) |
agents/plan-reviewer.md |
Validates the plan against the code before the lead presents it via ExitPlanMode for your approval (the session's model and effort) |
agents/team-executor.md |
Parallel fan-out only. Implements one unit of the fan-out as a background subagent — carries isolation: worktree in its frontmatter, since concurrent writers merge later (Sonnet, high; Opus when the plan marks the unit) |
agents/step-executor.md |
Implements one sequential step on the session's own branch — no worktree, nothing to merge; the feature-workflow counterpart to team-executor (Sonnet, high; Opus when the plan marks the step) |
agents/fixer.md |
Fixes one review round's finding set (P0/P1 plus adjacent P2s) on the session's own branch, test-first red-then-green — a brownfield bug fix, so it runs deeper than a plan step (Sonnet, high; Opus when a finding's mechanism survived an earlier round) |
agents/codex-triage.md |
Reads one round's codex-challenge.sh output file(s) — all slices of a split round — verifies each finding against git show <head>:<path> and git diff <base> <head>, and returns the single ≤2k deduped verdict; the run itself is a background Bash in the master, the only context the harness re-wakes on completion (Sonnet medium) |
agents/spec-reviewer.md |
At the final gate, checks the feature's whole diff against the approved plan file — missing requirements, scope creep, wrong-logic-vs-spec; gaps only, in parallel with the whole-range codex challenge (Sonnet medium) |
agents/team-reviewer.md |
Parallel fan-out only. Adversarially verifies each unit's diff before merge — read-only, no worktree (Opus) |
agents/team-merger.md |
Parallel fan-out only. Merges the worktrees the lead names into the base branch, removes each worktree + branch after landing, reports done (Sonnet) |
settings.example.json |
model: "opus" + modelSettings.claude-opus-5-5.effortLevel: "xhigh" (the recommended master — the session you open — the latest Opus at xhigh; the install wizard and /stack-update ask: recommended / keep current / don't ask again / another model, and install.sh --master=recommended applies it), modelSettings.claude-sonnet-5-5.effortLevel: "high" (the effort of Sonnet spawns — executors, fixer, unpinned; the agents carry no effort: line — filled in by install.sh only where you have none saved, never overriding, and not part of the master recommendation), worktree.baseRef: "head" so executor worktrees branch from your in-progress branch rather than the remote default, CLAUDE_CODE_ENABLE_TODO_TOOLS (the task-list feature), CLAUDE_CODE_SUBAGENT_MODEL (the Sonnet floor for unpinned spawns — see Model pinning), BASH_DEFAULT_TIMEOUT_MS: 900000 (a build or test run with no explicit timeout is no longer auto-backgrounded at 2 minutes; this is also the ceiling), CODEX_REVIEW_MODEL + CODEX_REVIEW_EFFORT (which codex model and reasoning effort the cross-review gate uses — set here, not in the script, because install.sh replaces the skill directory on every run; reinstalling never overrides an existing value, so change it by editing settings.json), bashOutputMaxChars: 30000 (a valid command result over 30k characters arrives as a file path plus a 2k preview instead of flooding the context), bashEditDiffEnabled: true (the transcript records which files each Bash command changed — /analyze-arcs reads that instead of parsing commands; on by default only in auto mode, so it is pinned for every mode; never shown to the model), the SessionStart update-check and session-name hooks, the SessionStart skill-reload hook (matcher compact), and the PreToolUse subagent-no-background hook |
hooks/subagent-no-background.sh |
PreToolUse on Bash (matcher `Bash |
hooks/session-name.sh |
SessionStart: names the session from a Session name: <slug> line in the repo's CLAUDE.md (or .claude/CLAUDE.md), so sessions in sibling repos of one project find each other in ListAgents and the name survives a plan's acceptance; never overwrites a name set with --name or /rename, silent when the line is absent; tests in hooks/tests/ |
hooks/skill-reload-after-compact.sh |
SessionStart with matcher compact: after a compaction, prints one line telling the session to invoke the feature-workflow skill again when its transcript holds a Skill call for it (compaction can drop the skill's text); silent on any other source, with no such call, or on any error; tests in hooks/tests/ |
hooks/stack-update-check.sh |
Runs once per session start: at most once a day, checks whether this repo's master differs from the SHA you installed — one line if so, silent otherwise (no update, no network, disabled). A known update — with how many commits you are behind — is shown to you at every session start, from the cached poll, until you install it; tests in hooks/tests/ |
skills/stack-update/SKILL.md |
Applies a pending update: clones the repo, summarizes what changed, asks for your approval before writing anything, re-runs install.sh, and re-stamps |
skills/analyze-arcs/ |
/analyze-arcs <since-date>: scans every Claude Code session and subagent transcript since a date plus the codex-challenge logs, and writes a report with the measured numbers (subagent roster and pins, codex rounds, gates and their wait times, peak context) and the mechanical doctrine violations (unpinned spawns, wrong-tier pins, --out outside the scratchpad, master product edits inside a pipeline, overnight ExitPlanMode waits, missing path-call line); judgment findings stay with the reader |
skills/feature-workflow/scripts/codex-challenge.sh |
Range-scoped adversarial codex exec on exactly <base>..<head>; optional self-removing pinned worktree; gtimeout 900, 3 attempts / 5 min (a 400 from a rejected model stops retrying immediately); model + effort from CODEX_REVIEW_MODEL / CODEX_REVIEW_EFFORT (default gpt-6.2-sol / medium), recorded in the verdict header — these keys arrive via the Claude Code session's environment, so a run started from a bare terminal outside a session falls back to the default; writes the verdict file, prints its path on stdout and the elapsed wall-clock time on stderr |
install.sh |
Copies everything into ~/.claude (with backups) and merges the settings keys above |
docs/references.md |
The sources the doctrine is built on — harness docs (version-stamped, authoritative), the model-behavior guides it's tuned against, and cookbook patterns; plus the last Claude Code version the doctrine was validated against |
docs/tech-debt.md |
Known gaps deliberately left unfixed, each with the site, the reasoning, and the review that surfaced it |