A context engineering and multi-agent backbone framework for complex software development workflows.
SPINE (Software Pipeline for INtelligent Engineering) provides standardized instrumentation, multi-provider LLM access, and orchestration patterns that connect agentic projects for long-running, complex development workflows.
| Capability | Description |
|---|---|
| π Multi-Agent Orchestration | Fan-out (parallel) and Pipeline (sequential) patterns |
| π Full Traceability | ToolEnvelope instrumentation with hierarchical trace correlation |
| π€ Multi-Provider Support | Anthropic, OpenAI, Google Gemini, Grok |
| π Tiered Enforcement | Balanced capability usage based on task complexity |
| π§ Context Stacks | Reproducible, structured context management via YAML scenarios |
| π Agentic Loop | Autonomous βrun until doneβ with oscillation detection |
| π AI Code Review | Multi-persona parallel review with consensus ranking |
| π Observability | Static HTML reports, REST API, health checks |
| βοΈ Pluggable Executors | SubagentExecutor (personas) and ClaudeCodeExecutor (CLI) |
| π§ Persistent Memory | Optional Minna Memory integration for cross-session memory |
SPINE implements patterns from the Multi-Agent Playbookβan architectural blueprint for production-ready multi-agent systems that addresses the core challenge: How do you manage delegation, state, execution, and failure without creating chaos?
SPINE follows a closed-loop orchestrator pattern where:
User
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β SPINE Orchestrator β
β AgenticLoop + ToolEnvelope instrumentation β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β fan_out() or pipeline()
βββββββββββββΌββββββββββββ
βΌ βΌ βΌ
βββββββββ βββββββββ βββββββββ
βWorker β βWorker β βWorker β
βAgent 1β βAgent 2β βAgent 3β
βββββ¬ββββ βββββ¬ββββ βββββ¬ββββ
β β β
βββββββββββββΌββββββββββββ
β Results via ToolEnvelope
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Synthesized Response to User β
βββββββββββββββββββββββββββββββββββββββββββββββ
SPINE implements all five architectural pillars from the blueprint:
| Pillar | Blueprint Principle | SPINE Implementation |
|---|---|---|
| I. Communication | Closed loops, verifiable artifacts | ToolEnvelope result wrapping, structured logs |
| II. Execution | Parallel for speed, sequential for logic | fan_out() and pipeline() patterns |
| III. Empowerment | Right tooling in isolated environments | MCP integration, TraceScope boundaries |
| IV. State | State in environment, not agent memory | NEXT.md integration, Context Stacks |
| V. Resilience | Blast radius containment, error routing | OscillationTracker, LoopVerdict system |
The Orchestrator holds executive signal (low context), while sub-agents absorb execution noise (high context):
Orchestrator Context (Signal) Sub-Agent Context (Noise)
βββ Master Plan βββ Full document content
βββ Operational metrics βββ Raw API responses
βββ Synthesized outputs βββ Detailed logs
βββ Error signals βββ Environment state
β Read the full Blueprint Implementation Guide
β View the Multi-Agent Playbook (PDF)
SPINE operates across three distinct capability layers:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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, AgenticLoop) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SPINE uses a hierarchical context stack for consistent LLM interactions:
{
"global": { "operator": "...", "brand": "..." },
"character": { "speaker": "...", "audience": "..." },
"command": { "task": "...", "success": "..." },
"constraints": { "tone": "...", "format": "...", "do": [], "dont": [] },
"context": { "background": "...", "references": [] },
"input": { "user_request": "..." }
}
spine/
βββ core/ # ToolEnvelope, TraceScope
βββ client/ # InstrumentedLLMClient, provider configs
βββ patterns/ # fan_out(), pipeline()
βββ orchestrator/ # AgenticLoop, OscillationTracker, TaskQueue
β βββ context_stack.py # Context stack loader/builder
β βββ executors/ # Pluggable executors
β βββ base.py # Executor interface
β βββ subagent.py # SubagentExecutor + context stacks
β βββ claude_code.py # ClaudeCodeExecutor (CLI subprocess)
β βββ mcp_orchestrator.py # MCPOrchestratorExecutor (NEW)
βββ memory/ # kv_store, vector_store, scratchpad
βββ review/ # AI-powered code review
βββ integration/ # Token-optimized MCP execution
βββ enforcement/ # Tiered enforcement gate
βββ health/ # Component health monitoring
βββ api/ # FastAPI REST API + /api/reviews
βββ reports/ # Static HTML report generator
βββ logging/ # Structured JSON logging
SPINE balances capability usage against overhead costs through a three-tier system:
| Tier | Task Type | Enforcement | Examples |
|---|---|---|---|
| Tier 1 | Simple | None required | Typo fixes, single-file edits |
| Tier 2 | Medium | Recommended | Multi-file changes, new features |
| Tier 3 | Complex | Mandatory | Architecture decisions, research, UI-heavy |
| Factor | Consideration |
|---|---|
| Token Cost | Parallel subagents = 2-6x cost increase |
| Latency | Subagent spawn adds 10-30 seconds |
| Over-engineering | Simple tasks donβt need orchestration |
| Context Fragmentation | Subagents donβt share full conversation context |
β Try the Interactive Tier Classifier
Execute multiple tasks simultaneously with automatic result aggregation:
βββββββββββββββ
β Parent β
β Envelope β
ββββββββ¬βββββββ
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β Analyst A β β Analyst B β β Analyst C β
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β β β
βββββββββββββββββΌββββββββββββββββ
βΌ
βββββββββββββββ
β Aggregate β
β Results β
βββββββββββββββ
Use Cases: Research tasks, parallel code analysis, multi-source data gathering
Chain processing steps with automatic result transformation:
βββββββββββ βββββββββββ βββββββββββ βββββββββββ
β Analyze β βββΆ β Extract β βββΆ βTransformβ βββΆ βSynthesizeβ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ
Use Cases: Document processing, staged analysis, build pipelines
Run tasks until completion with built-in resilience:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AgenticLoop β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββ ββββββββββββ βββββββββββββ β
β β Task βββββΆβ Execute βββββΆβ Evaluate β β
β β Queue β β β β β β
β βββββββββββ ββββββββββββ βββββββ¬ββββββ β
β β β
β βββββββββββββββββββββββββββββββββΌβββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β ββββββββββ ββββββββββ ββββββββββ β
β β ACCEPT β β REVISE β β REJECT β β
β β Done β β Retry β β Skip β β
β ββββββββββ ββββββββββ ββββββββββ β
β β
β OscillationTracker: Detects stuck states β
β (A-B-A-B patterns, repeated errors) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Every LLM call is wrapped for full traceability:
βββββββββββββββββββββββββββββββββββββββββββ
β ToolEnvelope β
βββββββββββββββββββββββββββββββββββββββββββ€
β id: "call-abc123" β
β tool: "anthropic:claude-sonnet-4-5" β
β trace: β
β root_id: "task-xyz" β
β parent_id: "orchestrator-001" β
β span_id: "subagent-research" β
β metadata: β
β tags: ["research", "phase-1"] β
β experiment_id: "exp-2025-001" β
β metrics: β
β tokens_in, tokens_out, latency_ms β
βββββββββββββββββββββββββββββββββββββββββββ
| Demo | Description |
|---|---|
| Tier Classifier | Determine the appropriate enforcement tier for any task |
| Provider Picker | Choose the right LLM provider based on your task type |
| Cost Calculator | Estimate API costs by model and token usage |
| Fan-Out Simulator | Visualize parallel task execution with configurable workers |
| Pipeline Builder | Build and simulate sequential processing chains |
SPINE enables coordinated multi-agent workflows for:
SPINE has been successfully integrated with:
| Project | Integration Type |
|---|---|
| Golden Thread System | Full MVP development with tiered enforcement |
| spine-dashboard | Real-time monitoring via SPINE API |
| Adaptivearts.ai | Research and content generation workflows |
| Provider | Models | Status |
|---|---|---|
| Anthropic | Claude Opus 4.5, Sonnet 4.5, Haiku 4.5 | β Active |
| OpenAI | GPT-5.1, GPT-5 mini | β Active |
| Gemini 3 Pro, Gemini 3 Flash | β Active | |
| xAI | Grok | β Active |
| Component | Purpose |
|---|---|
spine/logging/ |
Structured JSON logs with trace hierarchy |
spine/api/ |
FastAPI REST API with OpenAPI docs |
spine/reports/ |
Self-contained HTML reports with Chart.js |
spine/health/ |
Component health monitoring |
# Run orchestrator with SubagentExecutor (uses .claude/agents/ personas)
python -m spine.orchestrator run --project /path --executor subagent
# Run orchestrator with ClaudeCodeExecutor (spawns CLI subprocess)
python -m spine.orchestrator run --project /path --executor claude-code --executor-budget 10.0
# Run with context stacks from scenario files
python -m spine.orchestrator run --project /path --executor subagent --scenario scenarios/research.yaml
# Run with LLM evaluation
python -m spine.orchestrator run --project /path --llm-eval
# Generate reports
python -m spine.reports generate --title "Sprint Report" --days 7
# Health checks
python -m spine.health --verbose
# Code review
python -m spine.review . --parallel
# Start API server
python -m spine.api --port 8000
| Document | Description |
|---|---|
| Blueprint Implementation | How SPINE implements the Multi-Agent Playbook |
| Architecture Overview | System design and components |
| Pattern Guide | Fan-out and Pipeline usage |
| Tiered Protocol | Full enforcement protocol |
| Executor Framework | SubagentExecutor, ClaudeCodeExecutor, MCPOrchestratorExecutor |
| Context Stack Integration | YAML scenario files for prompt building |
| MCP Orchestrator Integration | Optional intelligent tool routing |
| Minna Memory Integration | Persistent cross-session memory (NEW) |
| Claude Code Automation | Disable prompts, auto-reload context |
| Resource | Description |
|---|---|
| Multi-Agent Playbook (PDF) | Architectural blueprint for production-ready multi-agent systems |
| Version | Highlights |
|---|---|
| 0.3.22 | Minna Memory Integration - persistent cross-session memory with graceful fallback |
| 0.3.21 | MCP Orchestrator Integration - optional intelligent tool routing with graceful fallback |
| 0.3.20 | Context Stack Integration - executors use scenarios/*.yaml for prompt building |
| 0.3.19 | Executor Framework - SubagentExecutor, ClaudeCodeExecutor with pluggable design |
| 0.3.18 | Dashboard integration - /api/reviews endpoints for review history |
| 0.3.17 | Inline diff annotations, cost tracking per review |
| 0.3.16 | NEXT.md integration for AgenticLoop |
| 0.3.15 | create_spine_llm_evaluator() factory |
| 0.3.14 | Static HTML report generator |
| 0.3.13 | FastAPI REST API surface |
| 0.3.12 | Health check system, common utilities |
| 0.3.11 | Tier enforcement gate (commit-msg hook) |
| 0.3.10 | Token-optimized MCP execution (57-87% savings) |
| 0.3.9 | ConflictResolver for multi-agent synthesis |
| 0.3.6-8 | AI-powered code review module |
SPINE is developed as part of the AdaptiveArts.ai research initiative, focusing on intelligent software development workflows and multi-agent coordination.
βThe goal is not to build the application. It is to build the system that builds the application.β
SPINE embodies this philosophyβitβs a backbone framework that enables building applications through orchestrated multi-agent workflows.
This project is licensed under the MIT License.