███████╗██████╗ ███████╗ ██████╗███████╗██╗      ██████╗ ██╗    ██╗
██╔════╝██╔══██╗██╔════╝██╔════╝██╔════╝██║     ██╔═══██╗██║    ██║
███████╗██████╔╝█████╗  ██║     █████╗  ██║     ██║   ██║██║ █╗ ██║
╚════██║██╔═══╝ ██╔══╝  ██║     ██╔══╝  ██║     ██║   ██║██║███╗██║
███████║██║     ███████╗╚██████╗██║     ███████╗╚██████╔╝╚███╔███╔╝
╚══════╝╚═╝     ╚══════╝ ╚═════╝╚═╝     ╚══════╝ ╚═════╝  ╚══╝╚══╝

Bootstrap your AI coding agent with persistent context. One command. Any stack. Any agent.

UNIVERSAL
OPEN SOURCE
ANY AGENT
NO MCP REQUIRED
GET STARTED
SUPPORTED AGENTS7 AGENTS
Claude Code
Cursor
GitHub Copilot
Windsurf
OpenCodeOpenCode
Continue.devContinue.dev
Aider
Claude Code
Cursor
GitHub Copilot
Windsurf
OpenCodeOpenCode
Continue.devContinue.dev
Aider

Your agent has no memory.

AI coding agents are powerful but stateless. Every session starts from zero. specflow makes your project the context — persistent, structured, version-controlled.

CONTEXT DIES EVERY SESSION

You spend 10 minutes re-explaining your stack, patterns, and constraints to your agent. Every. Single. Time.

SWITCHING AGENTS BREAKS EVERYTHING

Moved from Cursor to Claude Code? Your carefully crafted prompts go nowhere. Start from scratch.

THE AGENT DOESN'T KNOW YOUR RULES

It uses raw SQL instead of Prisma. Skips auth middleware. Ignores the patterns you've built over months.

SPECS LIVE IN YOUR HEAD

No structured spec means the agent implements the wrong thing, then you fix it, then it regresses.

specflow solves this with three tools ↓

Three tools. One workflow.

specflow orchestrates OpenSpec, Skills.sh, and Obsidian into a single command. Each does one thing perfectly. Together they give your agent full context.

OpenSpec
SPEC LIFECYCLE
#spec#decision#architecture

Specs that survive sessions

Structured feature specs that live in your repo. Your agent reads them before every task. When a spec ships, patterns are extracted into SEED.md automatically.

$ specflow spec "add payments" # create proposal + design + tasks
$ specflow spec --validate add-payments # check SEED compliance
$ specflow spec --archive add-payments # extract patterns → SEED
FILES
SPECS/SEED.md
SPECS/active/<slug>/proposal.md
SPECS/active/<slug>/design.md
SPECS/active/<slug>/tasks.md
Skills.sh
SKILL ECOSYSTEM
#pattern#skill#best-practice

Best practices, per library

One markdown file per dependency. Your agent reads Prisma patterns, Stripe integration guides, shadcn conventions — all from .skills/. Updated as your stack evolves.

$ specflow skill --search "react auth" # find community skills
$ specflow skill --create my-patterns # from your code + Obsidian
$ specflow add-skill supabase/rls-patterns # install a specific skill
FILES
.skills/vercel/nextjs.md
.skills/stripe/stripe-node.md
.skills/supabase/rls-patterns.md
Obsidian
BIDIRECTIONAL MEMORY
#specflow#hot#bug#workflow

Your notes become agent context

Tag notes in Obsidian — #decision routes to SEED.md, #pattern routes to skills. Archived specs write back to your vault. Your thinking persists across tools.

$ specflow sync # vault ↔ project (bidirectional)
$ specflow sync --pin "Projects/MyApp" # always pull a folder
$ specflow sync --discover # auto-find your vaults
FILES
MEMORY/INDEX.md
vault/specflow/specs/<slug>.md
vault/specflow/SEED.md
TAG ROUTING — OBSIDIAN → DESTINATIONS
OBSIDIAN TAGS
#spec, #decision, #architecture
#pattern, #skill, #best-practice
#specflow, #hot, #bug, #workflow
ROUTED TO
OpenSpec → SEED.md evolution
Skills.sh → skill creation
Memory → MEMORY/INDEX.md

How a dev uses specflow.

Four moments in your development lifecycle. Each one builds on the last. SEED.md gets smarter with every feature you ship.

01
Day 0

Bootstrap once

$specflow init
  • Reads your package.json → detects stack automatically
  • Multi-select prompt: pick which agents you use
  • Patches CLAUDE.md, .cursor/rules/, .windsurfrules — all at once
  • Pulls skills from skills.sh for every detected dependency
  • Connects Obsidian vault if you have one
  • Writes SPECS/SEED.md — fill in your architecture decisions
~/my-project
$ specflow init
Stack: nextjs, prisma, clerk, stripe, shadcn
? Agents: ◉ Claude Code ◉ Cursor ◯ Copilot
10 skills installed → .skills/
CLAUDE.md patched
.cursor/rules/specflow.mdc patched
SPECS/SEED.md ready — fill in your patterns
02
Before every feature

Spec first, code second

$specflow spec "add feature"
  • Creates SPECS/active/<slug>/ with three files
  • proposal.md — problem, solution, scope, open questions
  • design.md — data model, API surface, components, constraints
  • tasks.md — actionable checklist
  • Your agent reads the spec before implementing
  • No more re-explaining the feature every session
~/my-project
$ specflow spec "add razorpay payments"
Proposing: add-razorpay-payments
SPECS/active/add-razorpay-payments/proposal.md
SPECS/active/add-razorpay-payments/design.md
SPECS/active/add-razorpay-payments/tasks.md
Validate: specflow spec --validate add-razorpay-payments
03
During the session

Your notes become context

$specflow sync
  • Jot decisions in Obsidian while you build
  • #decision → feeds SEED.md, shapes future specs
  • #pattern → feeds skills, improves future code
  • #bug → shows up in MEMORY/INDEX.md for your agent
  • Run sync any time to pull fresh notes in
  • Agent reads MEMORY/INDEX.md at session start
~/my-project
$ specflow sync
Pulling vault → MEMORY/INDEX.md
3 #decision notes → OpenSpec SEED
2 #pattern notes → skills evolution
1 #bug note → MEMORY/INDEX.md
Pushing SEED.md snapshot → vault
Bidirectional sync complete
04
Feature shipped

Archive and evolve

$specflow spec --archive add-razorpay-payments
  • Moves spec to SPECS/archive/ with timestamp
  • Extracts patterns from design.md automatically
  • Merges new patterns into SEED.md — it gets smarter
  • Writes spec summary back to your Obsidian vault
  • Next spec starts with everything you just learned
  • SEED.md evolves from real shipped work, not docs
~/my-project
$ specflow spec --archive add-razorpay-payments
Archived → SPECS/archive/2026-03-11-add-razorpay-payments/
Patterns extracted from design.md
SEED.md evolved (+3 patterns)
Spec written back to Obsidian vault
Next spec starts smarter

The loop closes: archived specs → SEED.md → better specs → better code.

SEED.md evolves from real shipped features, not documentation nobody maintains.

Three files. Full context.

specflow writes these to your project. Your agent reads them. Two go in git. One stays local.

CLAUDE.md✓ COMMIT
AGENT CONTEXT FILE

Context-dense brief written directly into the agent's own file. The AI reads this at session start. Commit this.

> specflow-context> stack: nextjs|prisma|clerk|stripe|shadcn> agents: [claude-code,cursor]> skills: [vercel/nextjs,prisma/best-practices,stripe/node]> spec: SPECS/active/add-payments/ — read before implementing> memory: MEMORY/INDEX.md — synced 2026-03-11 ## Critical Patterns- All DB queries use Prisma (never raw SQL)- Auth routes protected with Clerk middleware- API responses wrapped in standardized envelope ## Hard Constraints- Do not modify migration files- Never store auth tokens in localStorage
SPECS/SEED.md✓ COMMIT
ARCHITECTURAL DNA

Your patterns, anti-patterns, decisions. Fill in once. Evolves automatically when specs are archived. Commit this.

# SEED — Architectural DNA> Evolved from 6 archived specs · 2026-03-11 ## Stack- nextjs (App Router), prisma, clerk, stripe ## Patterns- Validate all inputs with Zod before DB writes- Payments via Stripe (Razorpay for IN market)- Use server actions for mutations, REST for public APIs ## Anti-Patterns- Direct SQL queries (always use Prisma)- Hardcoded API keys in source
MEMORY/INDEX.md⊘ GITIGNORED
HOT NOTES FROM OBSIDIAN

Top notes from your Obsidian vault — tagged #specflow, #hot, #bug. Re-synced on demand. Gitignore this.

# memory## vaultpath:/Users/sky/obsidian/OneRouterlast-sync:2026-03-11T09:23:00Ztagged:#specflow=3 pinned=2 ## hot-notes ### Projects/OneRouter/Architecture.md> source:tagged:#specflow · modified:2026-03-10Unified SDK over Stripe + Razorpay + PayPalProvider selected at runtime by currency
.gitignore
# do not commit
MEMORY/INDEX.md # personal vault content
.specflow.json # contains local paths
.skills/ # regenerated on demand
# commit these
CLAUDE.md (or agents.md, .cursor/rules/, etc.)
SPECS/SEED.md
SPECS/active/
SPECS/archive/
.specflow/generation-spec.json

Works with every agent.

specflow auto-detects which agent you use from your project structure. The init prompt lets you select multiple — it patches each one.

#AGENTDETECTION
1Claude Codeauto
2Cursorauto
3GitHub Copilotauto
4Windsurfauto
5OpenCodeauto
6Continue.devauto
7Aiderauto
Genericfallback
specflow init — multi-agent setup
Auto-detected: Claude Code
? Which AI agents do you use?
(space to select, enter to confirm)
Claude Code CLAUDE.md
GitHub Copilot .github/copilot-instructions.md
Cursor .cursor/rules/specflow.mdc
Windsurf (Codeium).windsurfrules
OpenCode agents.md
Agents: Claude Code, Cursor
claude-code → CLAUDE.md
cursor → .cursor/rules/specflow.mdc
Both agents patched with identical context

Full CLI reference.

$specflow init[--agent <id>] [--obsidian <path>] [--dry-run]

Full bootstrap. Detects stack, installs skills, patches agent files, connects Obsidian.

e.g.specflow init --obsidian ~/obsidian/MyVault
$specflow update[--agent <id>]

Re-patch agent file from current config. Run after stack changes or adding a new agent.

e.g.specflow update --agent cursor
Plugin APIFOR CLI TOOLS + EDITOR EXTENSIONS

Use specflow as a library inside your own CLI tool or editor extension. Register your native AI instance for spec-driven context generation.

npm install @kousthubha/specflow
// Claude Code, Cursor, Windsurf, etc.
import { createSpecflowPlugin } from '@kousthubha/specflow/plugin';

const sf = await createSpecflowPlugin(root);
await sf.registerCliAI(nativeAI);
await sf.detectAndSetup({ useCliAI: true });