CAST coordinates 27 specialist Claude Code agents — a control plane that dispatches work, reviews it, and commits it through a data-integrity gate that records every bypass.
CAST
27 specialist agents that plan, implement, review, and commit — on a local-first SQLite record that isn't just observability: it acts.
$ /plugin install castCopies marketplace + install + enable.
Built on Two Convictions
Two design principles that are non-negotiable — not aspirations, not roadmap items.
Local-first by construction
The core development loop never has to leave your machine. CAST runs inside ~/.claude/ with the cloud strictly opt-in; it ships as a native Claude Code plugin and works fully offline.
Data integrity by construction
An agent platform should be structurally unable to destroy its own evidence. Backups live outside the failure domain and the runtime cannot delete itself.
Pillar 2 was earned through repeated full ~/.claude wipes — including one that took out the colocated backups.
Built for Real Work
Not a demo. CAST runs in production every day across real codebases.
Agent Teams
27 specialists across 2 categories — dispatched natively through Claude Code's own Agent tool with isolated execution contexts and quality gates. At the depth limit (CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=1), Claude Code withholds the Agent tool entirely — a subagent reviewing its own work is structurally absent, not merely forbidden.
Quality Gates
Raw git commit and push are hard-blocked by hooks. v10 added guards for 13 previously unguarded destructive ops — hard resets, non-dry-run cleans, forced checkouts, branch deletes, and history rewrites — each with a named escape hatch that writes a row to ack_events. Structured Output schemas validate every agent response; code ships through the commit agent or not at all.
Full Observability
cast.db tracks 42 tables across sessions, agent runs, telemetry, and quality gates. A browser dashboard and a native desktop app read from it — real-time SSE streaming, dashboard views, and an embedded PTY terminal. cast agents --live lists in-flight runs with elapsed time, telling a slow agent from a dead one; nightly rollups (agent_runs_daily, mcp_calls_daily) preserve trends before the prune deletes the raw rows.
Token Optimization
5-layer token reduction: model tiering (16 Haiku / 10 Sonnet / 1 Opus), Laconic Mode, RTK output compression, Effort Routing, and Compact Discipline.
The Record That Acts
cast.db is not just observability — it is the substrate decisions run on. cast ask searches the full execution record. cast predict reads your telemetry to surface routing suggestions. cast review reads agent output back out of the record — from agent_runs.response, the column that held the full text all along while the orchestrator lost it in transport. A weekly record-review job mines that same telemetry to propose its own fixes, then re-audits its own work.
Extensible
Agents are markdown files. Hooks are bash scripts. Plans are JSON. 18 skills, 21 slash commands, and cast mcp — a read-only stdio MCP server over cast.db that any MCP-aware tool can query.
Provenance & Audit
cast ledger stamps every session with a SHA-256-signed receipt. cast verify-chain builds a hash-chain across sessions — a tamper-evident provenance trail for every agent dispatch and commit. Before v10, verify-chain flagged 244 of 929 links as tampered, and not one actually was — serialization drift, not tampering. provenance_chain.receipt_json, added in v10, freezes the exact serialization each digest was taken over, so a red link is now a real signal.
Local-First
Zero cloud lock-in. Everything runs on your machine — agents, hooks, memory, database. Ollama fallback via LiteLLM proxy. All data stays in SQLite.
Data Integrity by Construction
The guard runs at the hook layer — before the shell. No agent can bypass it without an explicit escape hatch, and a hatch that actually averts a block writes a row to ack_events (new in v10), with CAST_HATCH_REASON recording why. Guards are hooks, though — a session launched in a mode that skips hook discovery does not get them, and CAST says so rather than implying universal coverage.
- Litestream replicates cast.db to ~/Library — outside the blast radius
- The wipe canary lives off the blast radius so forensics survive the event that triggers them
- A fail-closed migration gate backs up or aborts before any schema change
- A hatch writes to ack_events only when it actually averts a block — an absent row means one thing
A gate that has never failed is indistinguishable from a gate that cannot fail. New tests are reverted against the bug they guard and confirmed red before they ship.
How It Works
Hooks intercept tool calls. Directives route to specialists. Every result lands in cast.db — and so does every bypass. The record isn't passive: it drives decisions through dispatch prediction, signed audit receipts, and a tamper-evident chain.
cast-audit-hook.sh, cast-pretool-dispatch.py, cast-headless-guard.sh, write-guards.sh
cast.db written by hooks, escape-hatch bypasses recorded to ack_events
SubagentStart hook fires, task_claimed → cast.db
Quality gate validation, Structured Output schema check
{
"files_changed": ["src/components/Hero.tsx"],
"status": "DONE",
"blockers": "none",
"key_decisions": "Reused existing CopyButton"
}Every agent emits this typed contract — the orchestrator injects it verbatim into the next agent's prompt, so failures can't cascade silently.
cast.db
Written by hooks. Read by everything.
cast.db is a local SQLite database populated entirely by CAST hook scripts — no app writes it, no cloud touches it. Every agent run, quality gate result, cost, memory, and governance event lands here — including escape-hatch bypasses, recorded when and only when the hatch actually averted a block. Cast Desktop and the browser dashboard are read-only consumers. Any SQLite tool can query it directly.
Core
Quality
Governance
Telemetry
The Record Acts
cast ask runs FTS5 full-text search over every session, run, and memory — including recorded escape hatches, so tracking down which repo used CAST_RESET_OK is a query, not a guess. cast predict reads dispatch history to surface routing suggestions before you run a task. cast review reads an agent's own output back out of the record.
A weekly cast record-review job goes further: it mines the week's telemetry for its own maintenance — proposing fixes from real data, shipping the ones a human approves, and catching blind spots in its own reasoning before they ship.
sqlite3 ~/.claude/cast.db .tables — see everything CAST has ever recorded about your agents.
Evals Mined from Real Failures
Graders are mined from real CAST agent failures, not written speculatively. The same discipline runs one level up: every new test — 3323 across 239 files — is reverted against the bug it guards and confirmed red before it ships, because an assertion that never fails is the same defect as a gate that never fires. Programmatic + LLM-judge graders, scored pass@k, every run logged to the eval_runs table in cast.db.
id: code-reviewer-status-variant
version: "1"
agent: code-reviewer
description: >
code-reviewer must end every response with Status: APPROVE or
Status: REQUEST_CHANGES (DONE / BLOCKED are also acceptable)
corpus_source: honesty_tables
failure_type: missing_status_block
trigger: |
Review the following diff and return your verdict.
Focus on: schema correctness, constraint completeness, and idempotency.
expected_behaviors:
- "Response ends with a Status line using one of: APPROVE,
REQUEST_CHANGES, DONE, DONE_WITH_CONCERNS, BLOCKED, or NEEDS_CONTEXT"
- "Response includes at least one substantive comment about the diff"
forbidden_behaviors:
- "Response ends without any Status: line"
- "Agent approves or requests changes without emitting a Status: line"
graders:
- id: status-variant-present
type: programmatic
command: >
grep -qE 'Status:[[:space:]]+(APPROVE|REQUEST_CHANGES|DONE|
DONE_WITH_CONCERNS|BLOCKED|NEEDS_CONTEXT)' '{output_file}'
pass_criteria: exit_code_0
- id: no-protocol-violation-logged
type: programmatic
command: >
python3 scripts/eval-graders/check-honesty-table.py
--table agent_protocol_violations
--match-value 'code-reviewer' --since '{since}'
pass_criteria: exit_code_0pass@k
Scored across k agent runs, not a single best-of
2 grader types
Programmatic exit-code + LLM-judge graders per case
eval_runs
Every run logged to cast.db for longitudinal tracking
Install What You Need
Every component is a standalone Homebrew tap. Install the full framework or just the pieces you need.
CAST Core
v10.0.0The complete multi-agent framework
brew tap ek33450505/cast && brew install castClaude Code Dashboard
v2.7.0React observability UI over cast.db — executive summary, sessions, agent analytics, hook health, memory browser, evals (pass@k), outputs, and agent reliability, plus a SQLite explorer.
git clone https://github.com/ek33450505/claude-code-dashboard.git && cd claude-code-dashboard && npm installCast Desktop
v1.2.12Tauri 2 native app — embedded PTY terminal, command palette, and dashboard views.
brew install --cask ek33450505/cast/cast-desktopCAST Memory
v0.4.1Persistent agent memory for Claude Code — FTS5 full-text search, weighted relevance, temporal validity, Ollama embeddings, and weekly consolidation over cast.db.
brew tap ek33450505/cast-memory && brew install cast-memoryClaude's Journal
v0.3.1Three-hook journaling for Claude Code (Stop/SessionStart/UserPromptSubmit) — maintains Claude's perspective and working memory across sessions as Obsidian-compatible markdown.
brew tap ek33450505/claudes-journal && brew install claudes-journalCAST Time
v0.1.2Gives Claude Code a clock — injects local time, timezone, and a semantic time-of-day bucket at every SessionStart.
brew tap ek33450505/cast-time && brew install cast-timeCAST Doctor
v0.1.3Standalone read-only health check for any Claude Code install — validates hooks, MCP config, agent frontmatter, cast.db core schema, and stale memories without the full CAST framework.
brew tap ek33450505/cast-doctor && brew install cast-doctorCAST Ledger
v0.1.0Signed, hash-chained, tamper-evident session receipts for Claude Code — SHA-256-stamped audit receipts from cast.db with --verify, plus an optional provenance hash-chain across sessions.
brew tap ek33450505/cast-ledger && brew install cast-ledgerCAST MCP
v0.1.0Read-only MCP server over the Claude Code execution record (cast.db) — dispatch decisions, incidents, cost, sessions, and full-text search as 5 MCP tools + 5 resources.
brew tap ek33450505/cast-mcp && brew install cast-mcpCAST Predict
v0.1.0Telemetry-driven dispatch prediction for Claude Code — reads cast.db to predict a task's likely cost, suggest agents, and surface related past incidents before you run it.
brew tap ek33450505/cast-predict && brew install cast-predictMeet the Team
27 specialist agents across 2 categories — each with a defined role and model tier.
| Agent | Category | Model | Effort | Purpose |
|---|---|---|---|---|
| Core (16) | ||||
| planner | Core | sonnet | high | Sequenced task plans with Agent Dispatch Manifests |
| backend-writer | Core | sonnet | high | Backend feature implementation across files |
| frontend-writer | Core | sonnet | high | Frontend feature implementation across files |
| bash-specialist | Core | sonnet | high | Shell scripts, BATS tests, and hook scripts |
| debugger | Core | sonnet | high | Root-cause diagnosis and bug fixes |
| code-reviewer | Core | haiku | low | Per-unit diff review for correctness and conventions |
| frontend-qa | Core | haiku | low | React, TypeScript, and accessibility review |
| security | Core | sonnet | high | Auth, input validation, secrets, and vulnerability audit |
| test-writer | Core | haiku | low | Unit and integration test creation |
| test-runner | Core | haiku | low | Test suite execution and result gating |
| commit | Core | haiku | low | Semantic git commits with Co-Authored-By |
| push | Core | haiku | low | Remote push with branch safety checks |
| merge | Core | haiku | low | PR lifecycle — CI watch and squash-merge on approval |
| docs | Core | haiku | low | Documentation, READMEs, and changelogs |
| researcher | Core | sonnet | high | Multi-source analysis, gap reports, and citations |
| morning-briefing | Core | haiku | low | Daily git activity and system summary |
| Dev Workflow (11) | ||||
| api-contract | Dev Workflow | haiku | low | REST API breaking-change detection |
| db-reader | Dev Workflow | sonnet | high | Read-only SQL exploration and reporting |
| dep-auditor | Dev Workflow | haiku | low | Dependency audit for CVEs, licenses, and compatibility |
| devops | Dev Workflow | haiku | low | CI/CD and GitHub Actions workflow authoring |
| email-drafter | Dev Workflow | haiku | low | Drafts Gmail messages and syncs showcase READMEs |
| eval-writer | Dev Workflow | sonnet | high | Eval and benchmark fixture author for agent prompts |
| infra-writer | Dev Workflow | haiku | low | Docker, IaC, and deployment configuration |
| migration-reviewer | Dev Workflow | opus | high | Database schema change safety and rollback plans |
| pr-reviewer | Dev Workflow | sonnet | high | Holistic PR-level review at PR-open time |
| release-notes | Dev Workflow | haiku | low | Structured changelog generation from git history |
| report-writer | Dev Workflow | haiku | low | Status updates, health checks, and chain summaries |
Core (16)
Sequenced task plans with Agent Dispatch Manifests
Backend feature implementation across files
Frontend feature implementation across files
Shell scripts, BATS tests, and hook scripts
Root-cause diagnosis and bug fixes
Per-unit diff review for correctness and conventions
React, TypeScript, and accessibility review
Auth, input validation, secrets, and vulnerability audit
Unit and integration test creation
Test suite execution and result gating
Semantic git commits with Co-Authored-By
Remote push with branch safety checks
PR lifecycle — CI watch and squash-merge on approval
Documentation, READMEs, and changelogs
Multi-source analysis, gap reports, and citations
Daily git activity and system summary
Dev Workflow (11)
REST API breaking-change detection
Read-only SQL exploration and reporting
Dependency audit for CVEs, licenses, and compatibility
CI/CD and GitHub Actions workflow authoring
Drafts Gmail messages and syncs showcase READMEs
Eval and benchmark fixture author for agent prompts
Docker, IaC, and deployment configuration
Database schema change safety and rollback plans
Holistic PR-level review at PR-open time
Structured changelog generation from git history
Status updates, health checks, and chain summaries
5-Layer Token Optimization
CAST reduces token spend through intelligent model routing, output compression, and effort controls.
Model Tiering
16 Haiku / 10 Sonnet / 1 Opus — right model for each task
Laconic Mode
Terse output (lite/full/ultra) cutting prose tokens
RTK Hook
Compression on large tool outputs
Effort Routing
Per-agent effort levels routed by task complexity — native Claude Code mechanism
Compact Discipline
Auto-compaction before the context window fills
5
optimization layers
16/10/1
Haiku/Sonnet/Opus split
3323
tests passing
Claude Code Dashboard
The browser observability UI for CAST — a React app that reads cast.db directly. Every agent dispatch, session, hook status, and token cost, live and historically. It reads ~/.claude/ read-only; nothing leaves your machine.
Views
Home
42
cast.db tables
27
agents
3323
tests passing
SSE stream active
Activity
running
queued
idle
git clone https://github.com/ek33450505/claude-code-dashboard.git && cd claude-code-dashboard && npm installWant a native macOS app instead? Cast Desktop is the desktop companion — the same cast.db, an embedded PTY terminal, and a command palette.