Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spine logo

Spine

The execution map that keeps AI agents from losing context on long, multi-step work.

License: MIT Format: Agent Skills Works with

Live page · Install · How it works · Example prompts

Spine: one living execution map, zero context drift


Why Agents Fail Long Tasks

Agents rarely fail because one step is hard. They fail because they lose the thread:

  • Forget a decision made twenty steps ago
  • Never notice that step 12 actually depends on step 5
  • Mark a phase "done" while its real completion criterion was never met
  • Drift into a side detail far from the original goal

These are context management failures, not effort failures. The fix isn't "focus harder" — it's an external, written, relationship-explicit map the agent can re-read at any moment.

What Spine Does

Spine is a portable Agent Skill that turns any complex, interdependent request into a living tree map instead of a flat to-do list. Every phase has explicit relationships, a verifiable completion criterion, and one file — SPINE_MAP.md — that is the single source of truth, updated after every completion.

Step Name Output
0 Structural understanding A relationship map of what already exists (or the conceptual domain, for new work)
1 Atomic decomposition Small, independently verifiable tasks — one completion criterion each
2 Tree map Numbered phases connected by four explicit relationship types
3 Phase plans Goal, completion criterion, tasks, and execution steps for each phase
4 Master plan One document — SPINE_MAP.md — the single source of truth
5 Execution discipline No drift, no forgetting, no premature closure

Spine's six mandatory steps, from structural understanding to disciplined execution

Four Relationship Types

A flat numbered list assumes step N only depends on step N-1. Real projects don't work that way. Spine makes the graph explicit and machine-checkable:

Spine's four relationship types: depends_on, feeds, parallel_with, conflicts_with

Type Meaning
depends_on This phase cannot start until the prerequisite phase is complete
feeds This phase's output is consumed by a phase further downstream
parallel_with Explicitly declared safe to run concurrently with another phase
conflicts_with Touches the same resource as another phase — must be serialized

Install

Spine follows the open Agent Skills format — a folder with a SKILL.md file that any compatible agent can load. Pick whichever install path fits your setup.

Option A — one command, any agent

openskills detects your installed agents (Claude Code, Cursor, Windsurf, Cline, Codex, and anything that reads AGENTS.md) and installs into the right directory automatically:

npx openskills install Open2Loop/spine-skill

Option B — copy manually per agent

Clone the repo, then copy the spine/ folder into your agent's skills directory:

git clone https://github.com/Open2Loop/spine-skill.git
Agent Personal (global) Project-local
Claude Code cp -R spine ~/.claude/skills/ cp -R spine .claude/skills/
Cursor cp -R spine ~/.cursor/skills/ cp -R spine .cursor/skills/
Codex CLI cp -R spine ~/.codex/skills/ cp -R spine .agents/skills/
Windsurf cp -R spine ~/.windsurf/skills/ cp -R spine .windsurf/skills/
Cline (VS Code) cp -R spine ~/.cline/skills/ cp -R spine .cline/skills/
Gemini CLI cp -R spine ~/.gemini/skills/ cp -R spine .gemini/skills/
OpenCode cp -R spine ~/.opencode/skills/ cp -R spine .opencode/skills/
Any AGENTS.md-based agent cp -R spine .agents/skills/

Not seeing your agent? Copy spine/ into .agents/skills/ in your project root — it's the vendor-neutral convention several agents fall back to, or check your agent's own skills/plugin documentation for its exact directory.

Then, in any prompt

Use $spine to decompose this feature into SPINE_MAP.md, then execute phase by phase without losing context.

Example Prompts

Use $spine to build a new user registration flow via phone number. Map existing auth patterns first, then execute.
Use $spine on this multi-service refactor. I need explicit depends_on/feeds between phases and validate_map.py passing before any phase is marked done.
Use $spine to design the user flow for checkout. Start with the structural map (step 0) before writing any code.

Validate Your Map

After building or updating SPINE_MAP.md:

python3 spine/scripts/validate_map.py SPINE_MAP.md

The validator checks for: dependency cycles, references to phases that don't exist, incomplete phases, mismatched depends_on/feeds pairs, phases marked done while a dependency isn't, and unresolved "needs confirmation" markers.

Structure

spine/
├── SKILL.md                          # Core runtime instructions
├── agents/openai.yaml                # Agent interface metadata
├── assets/
│   ├── spine-logo.svg
│   ├── readme-hero.svg
│   ├── six-steps.svg
│   ├── relationship-types.svg
│   ├── roadmap-template.md           # Copy this to SPINE_MAP.md to start
│   └── example-user-flow-map.md      # Full worked example (phone signup)
├── references/
│   └── methodology.md                # Deep reference: cycles, parallel agents, recovery
└── scripts/
    └── validate_map.py               # Structural validator

When to Use

Use Spine when:

  • Building a feature, system, or product
  • Designing a user flow
  • Any interdependent, multi-part task — even if the request didn't say "plan" or "roadmap"

Skip Spine when:

  • The task is a single, unambiguous step ("change this button's color", "fix this typo")

Token Efficiency

SKILL.md is the core runtime and stays small. Deeper references (methodology.md, templates, examples) load only when the task actually needs them — sharp context without paying for every rule on every request.

License

MIT — see LICENSE.


Spine · by Open2Loop · open2loop.github.io/spine-skill

About

Spine — العمود الفقري: tree-map execution discipline that prevents AI agents from losing context on long multi-step work

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages