SPINE is a context engineering and multi-agent backbone framework built for long-running, complex software development workflows. It handles instrumentation, multi-provider LLM access, and orchestration patterns that tie agentic projects together.
The goal: coordinated multi-agent development with full traceability, cost tracking, and reproducible context stacks.
SPINE works across three layers:
| Layer | What | Why |
|---|---|---|
| 1. Claude Native | Task tool subagents (Explore, Plan, code-architect, visual-tester) | Parallel agents without MCP overhead |
| 2. MCP Servers | browser-mcp, next-conductor, research-agent-mcp, smart-inventory | External tool integration |
| 3. SPINE Python | fan_out(), pipeline(), ToolEnvelope, TraceScope | Custom instrumented orchestration |
┌─────────────────────────────────────────────────────────────┐
│ Layer 1: Claude Native │
│ Built-in Task tool with subagent_types │
│ (Explore, Plan, code-architect, visual-tester, etc.) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Layer 2: MCP Servers │
│ External tools via Model Context Protocol │
│ (browser-mcp, next-conductor, research-agent-mcp) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Layer 3: SPINE Python │
│ Custom orchestration framework │
│ (fan_out, pipeline, ToolEnvelope, run_scenario.py) │
└─────────────────────────────────────────────────────────────┘
These are available via Task(subagent_type="..."):
| Subagent | Model | What it does |
|---|---|---|
Explore |
Fast | Codebase exploration, file discovery |
Plan |
Sonnet | Architecture planning, implementation design |
research-coordinator |
Opus | Multi-source research with synthesis |
code-architect |
Sonnet | System design, architectural decisions |
visual-tester |
Haiku | UI verification via browser automation |
context-engineer |
Sonnet | Context stack design and optimization |
general-purpose |
Default | Complex multi-step tasks |
Works out of the box with Claude Code. Subagents can access conversation context and run in parallel.
| Server | Tools | What for |
|---|---|---|
browser-mcp |
navigate, screenshot, click, type | Visual UI testing |
next-conductor |
read_next, update_next, init_next | Task tracking |
research-agent-mcp |
clarify, search, evaluate, synthesize | Research workflows |
research-notes-mcp |
parse, cluster, contradictions | Note processing |
research-log-mcp |
create, log, cite | Citation management |
smart-inventory |
analyze_project | CLAUDE.md generation |
Claude Code ←→ MCP Protocol ←→ External Tools
│
├── File Systems
├── Browsers (Playwright)
├── Task Management
└── Research Workflows
| Component | What it does |
|---|---|
run_scenario.py |
Execute reproducible context stack scenarios |
fan_out() |
Parallel subagent execution with aggregation |
pipeline() |
Sequential multi-step processing |
ToolEnvelope |
Instrumented LLM calls with trace correlation |
TraceScope |
Hierarchical context management |
LogAggregator |
Query and analyze execution logs |
spine/
├── _protocols/ # Usage protocols - read first
│ └── tiered-spine-usage.md
├── _templates/ # Templates for other projects
├── .claude/agents/ # Subagent definitions
├── KB/ # Knowledge base
├── spine/ # Core Python package
│ ├── core/ # ToolEnvelope, TraceScope
│ ├── logging/ # Structured JSON logging
│ ├── client/ # Provider configs
│ └── patterns/ # fan_out, pipeline
├── tools/ # Applications built on SPINE
├── scripts/ # Scripts and tests
├── scenarios/ # Scenario configs (.yaml)
├── logs/ # Structured logs
└── run_scenario.py # Main entry point
SPINE uses hierarchical context stacks for consistent LLM interactions.
Context Stack
├── global → operator, brand identity
├── character → speaker persona, target audience
├── command → task specification, success criteria
├── constraints → tone, format, do/don't rules
├── context → background info, references
└── input → user request
| Layer | What it holds |
|---|---|
global |
System-level config - operator, brand identity |
character |
Agent persona and target audience |
command |
Task specification and success criteria |
constraints |
Tone, format, do/don’t rules |
context |
Background info and references |
input |
The actual user request |
Every LLM call gets wrapped in a ToolEnvelope with:
envelope = create_envelope(tool: "claude-opus", prompt: "...")
child = envelope.create_child(tool: "claude-sonnet") // auto-linked
Automatic trace propagation across agent hierarchies:
with TraceScope("orchestrator"):
// calls inherit this trace
with TraceScope("subagent-research"):
// linked as child of orchestrator
SPINE abstracts away provider differences:
| Provider | Models | Capabilities |
|---|---|---|
| Anthropic | Claude Opus 4.5, Sonnet 4.5, Haiku 4.5 | Full tool use, vision |
| OpenAI | GPT-5 | Tool use, vision |
| Gemini Pro, Gemini Ultra | Tool use, vision | |
| xAI | Grok | Tool use |
Logs go to ./logs/YYYY-MM-DD/*.json with:
root_id: "session-abc123"
├── parent_id: "orchestrator-001"
│ ├── span_id: "subagent-research-1"
│ ├── span_id: "subagent-research-2"
│ └── span_id: "subagent-research-3"
└── parent_id: "orchestrator-002"
└── span_id: "synthesis-001"