spec-flow has been renamed to persistent due to naming conflicts. NPM package is now @kousthubha/persistent.
╔════════════════════════════════════════════════════════════════════════════╗
██████╗ ███████╗██████╗ ███████╗██╗███████╗████████╗███████╗███╗ ██╗ ████████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝██║██╔════╝╚══██╔══╝██╔════╝████╗ ██║ ╚══██╔══╝
██████╔╝█████╗ ██████╔╝███████╗██║███████╗ ██║ █████╗ ██╔██╗ ██║ ██║
██╔═══╝ ██╔══╝ ██╔══██╗╚════██║██║╚════██║ ██║ ██╔══╝ ██║╚██╗██║ ██║
██║ ███████╗██║ ██║███████║██║███████║ ██║ ███████╗██║ ╚████║ ██║
╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝
╚════════════════════════════════════════════════════════════════════════════╝Bootstrap your AI coding agent with persistent context. One command. Any stack. Any agent.
Your agent has no memory.
AI coding agents are powerful but stateless. Every session starts from zero. persistent 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.
Three tools. One workflow.
persistent bootstraps OpenSpec, Skills.sh, and Obsidian into a single command. Each does one thing. Together they give your agent full context.
Install @fission-ai/openspec globally. Use /opsx slash commands inside your agent to create, fast-forward, implement, and archive changes. persistent bootstraps it and evolves SEED.md from completed changes.
87k+ skills in the registry. persistent installs the right ones for your stack automatically. One markdown file per dependency — your agent reads Prisma patterns, shadcn conventions, auth flows — all from .skills/.
Tag notes in Obsidian — #decision routes to SEED.md, #pattern routes to skill creation, #spec becomes OpenSpec context in MEMORY/INDEX.md. Completed specs and SEED.md write back to your vault.
How a dev uses persistent.
Four moments in your development lifecycle. Each one builds on the last. SEED.md gets smarter with every feature you ship.
Bootstrap once
persistent init- →Reads your package.json → detects stack automatically
- →Prompts for agent (Claude Code, Cursor, Copilot, Windsurf...)
- →Runs openspec init → registers /opsx slash commands in your agent
- →Installs skills.sh skills for every detected dependency
- →Connects Obsidian vault if you have one
- →Writes SPECS/SEED.md — your architectural DNA layer
Spec first, code second
/opsx:new "add feature" (inside your agent)- →Use /opsx:new inside your agent — not a separate terminal
- →/opsx:ff generates proposal.md, design.md, tasks.md
- →openspec/changes/<id>/ holds the full change plan
- →/opsx:apply implements all tasks against the spec
- →Your agent reads the spec before every implementation step
- →No more re-explaining context each new session
Your notes become context
persistent sync- →Jot decisions in Obsidian while you build
- →#decision notes → merged into SPECS/SEED.md
- →#spec notes → OpenSpec context block in MEMORY/INDEX.md
- →#pattern notes → flagged as skill candidates
- →Run sync any time — vault ↔ project stays in sync
- →Agent reads MEMORY/INDEX.md at session start automatically
Archive and evolve
/opsx:archive → persistent spec --seed-evolve <id>- →/opsx:archive in your agent — moves change to openspec/changes/archive/
- →Then: persistent spec --seed-evolve <id> — extracts patterns from design.md
- →Patterns merge into SPECS/SEED.md — it gets smarter
- →persistent spec --seed-clean deduplicates SEED.md over time
- →Spec summary written back to your Obsidian vault
- →Next spec starts with everything you just learned
The loop closes: archived changes → SEED.md → better specs → better code.
OpenSpec owns the spec files. persistent owns SEED.md. Obsidian owns your thinking.
Three files. Full context.
persistent writes these to your project. Your agent reads them. Two go in git. One stays local.
Context-dense brief written directly into the agent's own file. The AI reads this at session start. Commit this.
> persistent-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
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
Top notes from your Obsidian vault — tagged #persistent, #hot, #bug. Re-synced on demand. Gitignore this.
# memory## vaultpath:/Users/sky/obsidian/OneRouterlast-sync:2026-03-11T09:23:00Ztagged:#persistent=3 pinned=2 ## hot-notes ### Projects/OneRouter/Architecture.md> source:tagged:#persistent · modified:2026-03-10Unified SDK over Stripe + Razorpay + PayPalProvider selected at runtime by currency
Works with every agent.
persistent auto-detects which agent you use from your project structure. The init prompt lets you select multiple — it patches each one.
Full CLI reference.
Full bootstrap. Detects stack, runs openspec init, installs skills.sh skills, patches agent file, connects Obsidian vault.
Re-patch agent file from current config + run openspec update to refresh slash commands. Run after stack changes.
Use persistent as a library inside your own CLI tool or editor extension. Register your native AI instance and persistent handles the full bootstrap.
// Claude Code, Cursor, Windsurf, etc. import { createPersistentPlugin } from '@kousthubha/persistent/plugin'; const pst = await createPersistentPlugin(root); await pst.registerCliAI(nativeAI); await pst.detectAndSetup({ useCliAI: true });