Table of Contents


Quick Install

curl -fsSL https://raw.githubusercontent.com/axiomantic/spellbook/main/bootstrap.sh | bash

The installer requires Python 3.10+ and git, then automatically installs uv and configures skills for detected platforms.

Upgrade: cd ~/.local/share/spellbook && git pull && python3 install.py

Uninstall: python3 ~/.local/share/spellbook/uninstall.py

See Installation Guide for advanced options.

Windows Quickstart

irm https://raw.githubusercontent.com/axiomantic/spellbook/main/bootstrap.ps1 | iex

Requirements: Python 3.10+, git, and PowerShell 5.1+.

  • Symlinks require Developer Mode enabled in Windows Settings (falls back to junctions or copies otherwise)
  • Service management uses Windows Task Scheduler
  • Install location: %LOCALAPPDATA%\spellbook

What Spellbook Does

Spellbook is a harness-augmentation layer for AI coding assistants. The harness is the runtime that hosts the agent loop and executes tools (Claude Code, Codex, OpenCode, Gemini CLI, ForgeCode). Spellbook plugs into whichever harness you are running and adds skills, slash commands, hooks, profiles, and a shared MCP server (memory, focus stints, session resume) on top.

Three things distinguish it from harness-native features and from other skill collections:

  • Harness-agnostic. The same skills, commands, and memory work across every supported harness on the same project. Switch from Claude Code to OpenCode mid-task and the workflow continues.
  • Shared centralized MCP server. Memories, focus stints, and session-resume state live in one place, so context stored from a Claude Code session surfaces in an OpenCode session on the same repo. No individual harness ships this.
  • Skills + hooks layer no harness ships natively. Autonomy enforcement, quality gates, parallel subagent dispatch, and a session resume protocol sit on top of whatever the harness provides.

Instead of just telling an assistant about your codebase, Spellbook gives the assistant structured workflows for research, design, implementation, testing, and review, along with guardrails for the specific ways LLMs tend to cut corners.

The orchestrator pattern

The main agent dispatches subagents rather than doing implementation work directly. This keeps the main context window free for strategic coordination instead of filling it with source code, and it means each subagent starts with a fresh perspective rather than carrying accumulated assumptions. Parallel dispatch lets multiple tasks run simultaneously.

Epistemic rigor

The system is designed to distrust its own outputs. Fact-checking treats every claim as a hypothesis to verify. Green mirage auditing asks whether a test would actually fail if the code were broken, which is a different question from whether the test passes. Hunch verification intercepts moments of claimed discovery and requires reframing them as testable hypotheses. Dehallucination names the specific ways LLMs confabulate and provides recovery protocols.

Test-driven development is treated as an epistemic practice: tests written before implementation answer "what should this do?" while tests written after answer "what does this do?" -- and the system's quality gates are designed around that difference.

Hallucination prevention draws on peer-reviewed research. Chain-of-Verification self-interrogation (Dhuliawala et al., 2023) requires verification skills to generate and answer questions about their own claims before finalizing verdicts. Atomic claim decomposition (Min et al., FActScore, EMNLP 2023) breaks compound statements into independently verifiable units. API hallucination detection checklists in code review and quality enforcement catch the specific pattern where LLMs generate syntactically valid but non-existent API calls.

Named failure modes

LLMs fail in predictable ways, and Spellbook names those patterns so it can build mechanical countermeasures. Seven rationalization patterns are catalogued and blocked. Three consecutive fix failures trigger architectural reassessment instead of a fourth attempt. Research stagnation triggers a plateau breaker. A devil's advocate review that finds zero issues is flagged as incomplete.

Quality gates

Every substantial skill runs as a sequence of phases with mandatory gates between them. Tests must pass, code review must clear, claims must verify against source, and tests must actually catch regressions. These gates cannot be bypassed by YOLO mode or autonomy settings -- YOLO grants permission to act without asking, but not to skip verification.

Composition

Skills invoke skills. develop orchestrates design-exploration, writing-plans, test-driven-development, requesting-code-review, fact-checking, auditing-green-mirage, and finishing-a-development-branch. debugging invokes verifying-hunches and isolated-testing. When a skill outgrows its scope, it splits into a thin orchestrator and supporting commands.

Self-improvement

Some skills exist to improve other skills. Usage analytics measure completion and correction rates. The skill-writing skill applies TDD to skill creation itself. Instruction engineering codifies prompt research into technique, and prompt sharpening audits for ambiguity. A/B testing compares skill versions against each other so improvements can be measured rather than assumed.

The develop Skill

You say "add dark mode" or "migrate the auth system to OAuth2" or "build a webhook delivery pipeline with retry logic." The develop skill orchestrates the full feature lifecycle through 20+ specialized skills and commands. The first question it asks is how involved you want to be:

Fully autonomous. Describe the feature and walk away. It researches your codebase, surfaces ambiguities, resolves them, designs the architecture, writes a detailed implementation plan, builds with test-driven development, reviews its own code, fact-checks its claims, audits its tests for false confidence, and opens a PR. Each step runs in a fresh subagent with its own quality gate.

Highly interactive. The same pipeline with the same rigor, but you stay in the conversation. Ambiguities become specific questions grounded in what it found in your code, and architectural tradeoffs come with evidence. Checkpoints pause for your input.

Or anywhere between. You can run mostly autonomous with pauses only for critical decisions, and set the level once at the start.

How it works

The system classifies your request by complexity using mechanical heuristics -- file count, behavioral change, test impact, structural change, integration points. Trivial changes exit the skill entirely. Simple changes follow a lightweight path with automatic upgrade if they turn out harder than expected. Standard and complex features get the full pipeline:

  1. Research -- Subagent explores your codebase. Answers come with confidence levels and file:line evidence. Every unknown is catalogued.
  2. Discovery -- Each ambiguity becomes a specific question. In autonomous mode, it answers its own questions with further research. A devil's advocate reviews the understanding document before design begins.
  3. Design -- Architecture design exploration with tradeoff analysis. A design doc auditor checks whether someone could implement from the doc without guessing, and flags every gap.
  4. Planning -- Atomic implementation plan with TDD steps. A plan auditor verifies interface contracts, behavior assumptions, and cross-task dependencies.
  5. Implementation -- Test-driven execution with per-task code review, fact-checking, and completion verification. Parallel tracks can run in isolated git worktrees with dependency-ordered smart merge.
  6. Verification -- Green mirage audit: would these tests catch real regressions? Comprehensive claim validation against design and plan. Full test suite.
  7. Finish -- PR with branch-relative description, local merge, or keep the branch. Worktree cleanup.

For features too large for one context window, it generates self-contained work packets and hands them off to separate sessions.

Parallelization

Three strategies, chosen at the start:

  • Conservative -- Sequential execution. Safest, simplest.
  • Maximize parallel -- Independent tasks dispatch as concurrent subagents with conflict detection and integration testing.
  • Per-track worktrees -- One git worktree per parallel track, running simultaneously, merged in dependency order with three-way conflict analysis and per-round test verification.

What it handles

Complete feature implementation, greenfield project creation, refactoring (with automatic behavior-preservation mode), and migrations. Bug fixes route to the dedicated debugging skill. Simple changes get a lightweight path; complex multi-track features get work packets and parallel sessions.

What's Included

Skills (60 total)

Reusable workflows for structured development:

Category Skills
Core Workflow design-exploration†, writing-plans†, executing-plans†, test-driven-development†, debugging, verifying-hunches, isolated-testing, using-git-worktrees†, finishing-a-development-branch
Code Quality enforcing-code-quality, code-review, advanced-code-review, adversarial-review, auditing-green-mirage, fixing-tests, fact-checking, finding-dead-code, distilling-prs, requesting-code-review
Feature Dev develop, reviewing-design-docs, reviewing-impl-plans, reviewing-prs, devils-advocate, dispatching-sub-orchestrators (deprecated), merging-worktrees, resolving-merge-conflicts, creating-issues-and-pull-requests
Autonomous Dev autonomous-roundtable, gathering-requirements, dehallucination, reflexion, analyzing-domains, assembling-context, designing-workflows, deep-research, fractal-thinking
Specialized async-await-patterns, using-lsp-tools, managing-artifacts, polish-repo, security-auditing, generating-diagrams, shared-references, tooling-discovery, canvas, canvas-decision, dedupe, estimating-tickets, rounding-up-worktree-sessions
Meta using-skills†, writing-skills†, writing-commands, instruction-engineering, sharpening-prompts, optimizing-instructions, dispatching-parallel-agents†, smart-reading, project-encyclopedia (deprecated), analyzing-skill-usage, documenting-tools, documenting-projects, testing-strategy, opportunity-awareness, branch-context, permissions-from-transcripts
Session fun-mode, tarot-mode, emotional-stakes, session-mode-init, session-resume, audio-notifications, agent2agent

† Derived from superpowers

Commands (104 total)

Command Description
/a2a Inter-session agent messaging bus (open inbox, send, check, reply)
/canvas Open, write to, list, or close a browser-rendered presentation surface
/create-issue Create a GitHub issue with proper template discovery and population
/create-pr Create a pull request with proper template discovery and population
/crystallize Transform SOPs into agentic CoT prompts
/crystallize-consolidate Consolidate accumulated rules: merge overlaps, collapse redundancy, retire deprecated
/crystallize-verify Structurally isolated adversarial review of crystallized output
[/decompose-claims] Decompose text into atomic, independently verifiable claims
/dead-code-setup Initialize dead code analysis with git safety and scope selection
/dead-code-analyze Extract and triage code items for dead code verification
/dead-code-report Generate dead code findings report with deletion plan
/dead-code-implement Execute approved deletions with verification
/dedupe-setup Phase 1: Configure target dirs and segmentation for semantic dedupe
/dedupe-analyze Phase 2: LLM judgment loop detecting semantically-equivalent instruction blocks
/dedupe-report Phase 3: Render proposed consolidations into a reviewable report
/dedupe-apply Phase 4: Apply approved consolidations with diffs and rollback
/deep-research-interview Phase 0: Structured interview and Research Brief generation
/deep-research-investigate Phase 2: Triplet search engine with plateau detection and micro-reports
/deep-research-plan Phase 1: Thread decomposition, source strategy, and convergence criteria
/design-assessment Generate assessment frameworks for evaluative skills/commands
/docs-audit Phase 1 project analysis for documentation planning
/docs-plan Phase 2 TOC generation, tone assignment, and build config
/docs-write Phase 3 documentation generation with adaptive tone per section
/docs-review Phase 4 documentation quality gate with 8 measurable criteria and iteration
/handoff Custom session compaction
/distill-session Extract knowledge from sessions
/feature-config Phase 0 configuration wizard for feature workflow
/feature-discover Phase 1.5 informed discovery with disambiguation
/feature-research Phase 1 codebase research and ambiguity detection
/feature-design Phase 2 design document creation and review
/feature-implement Phase 4 implementation with TDD and code review
/fractal-think-seed Seed phase: Create graph and generate seed sub-questions
/fractal-think-work Phase 2: Dispatch workers for recursive fractal exploration
/fractal-think-harvest Phase 3: Read completed graph, verify synthesis, format result
/simplify Code complexity reduction
/simplify-analyze Analyze code for simplification opportunities
/simplify-transform Apply simplification transformations
/simplify-verify Verify simplification preserved behavior
/address-pr-feedback Handle PR review comments
/move-project Relocate projects safely
/audit-green-mirage Test suite audit
/verify Verification before completion
/systematic-debugging Methodical debugging workflow
/scientific-debugging Hypothesis-driven debugging
/design-explore Design exploration
/write-plan Create implementation plan
/execute-plan Execute implementation plan
/execute-work-packet Execute a single work packet with TDD
/execute-work-packets-seq Execute all packets sequentially
/estimate-scope Ingest a test card, validate constraints, decompose into repo-tagged tickets
/estimate-point Multi-agent consensus pointing + AI productivity multiplier per ticket
/estimate-buffer PERT three-point estimation + Brooks's Law resource scaling
/estimate-report Produce the final structured estimation report
/merge-work-packets Merge completed packets with QA gates
/mode Switch session mode (fun/tarot/off)
/pr-dance Loop PR through CI + bot review until merge-ready
/pr-distill Analyze PR, categorize changes by review necessity
/pr-distill-bless Save discovered pattern for future distillations
/polish-repo-audit Phases 0-1 of polish-repo: Reconnaissance gathering and audit scorecard generation
/polish-repo-community Phase 3 of polish-repo: Community infrastructure, issue templates, roadmap, contributor experience, and signs of life
/polish-repo-identity Phase 3 of polish-repo: Visual identity, badges, GitHub metadata, topics, and documentation strategy
/polish-repo-naming Phase 3 of polish-repo: Naming workshop, tagline crafting, and positioning strategy
/polish-repo-readme Phase 3 of polish-repo: README authoring from scratch, improvement, or replacement
/advanced-code-review-plan Phase 1: Strategic planning for code review
/advanced-code-review-context Phase 2: Context analysis and previous review loading
/advanced-code-review-review Phase 3: Deep multi-pass code review
/advanced-code-review-verify Phase 4: Verification and fact-checking of findings
/advanced-code-review-report Phase 5: Report generation and artifact output
/fact-check-extract Extract and triage claims from code
/fact-check-verify Verify claims against source with evidence
/fact-check-report Generate findings report with bibliography
/review-plan-inventory Context, inventory, and work item classification
/review-plan-contracts Interface contract audit
/review-plan-behavior Behavior verification and fabrication detection
/review-plan-completeness Completeness checks and escalation
/audit-mirage-analyze Per-file anti-pattern analysis with scoring
/audit-mirage-cross Cross-cutting analysis across test suite
/audit-mirage-report Report generation and fix plan
/review-design-checklist Document inventory and completeness checklist
/review-design-verify Hand-waving detection and interface verification
/review-design-report Implementation simulation, findings, and remediation
/fix-tests-parse Parse and classify test failures
/fix-tests-execute Fix execution with TDD loop and verification
/request-review-plan Review planning and scope analysis
/request-review-execute Execute review with checklists
/request-review-artifacts Generate review artifacts and reports
/encyclopedia-build (deprecated) Research, build, and write encyclopedia
[/encyclopedia-validate] (deprecated) Validate encyclopedia accuracy
[/merge-worktree-execute] Execute worktree merge sequence
[/merge-worktree-resolve] Resolve merge conflicts
[/merge-worktree-verify] Verify merge and cleanup
[/finish-branch-execute] Analyze branch and execute chosen strategy
[/finish-branch-cleanup] Post-merge cleanup
[/code-review-feedback] Process received code review feedback
[/code-review-give] Review others' code
[/code-review-tarot] Roundtable-style collaborative review
[/write-skill-test] Skill testing with pressure scenarios
[/writing-commands-create] Command creation with schema, naming, and frontmatter
[/writing-commands-review] Command quality checklist and testing protocol
[/writing-commands-paired] Paired command protocol and assessment framework
[/reflexion-analyze] Full reflexion analysis workflow
[/test-bar] Generate floating QA test overlay for visual testing
[/test-bar-remove] Clean removal of test-bar overlay
[/ie-techniques] Reference for 16 proven instruction engineering techniques
[/ie-template] Template and example for engineered instructions
[/ie-tool-docs] Guidance for writing tool/function documentation
[/sharpen-audit] Audit prompts for ambiguity with executor predictions
[/sharpen-improve] Rewrite prompts to eliminate ambiguity
[/write-readme] Standalone README generation with writing guide enforcement

† Derived from superpowers