Skip to content
/

LeanSpec

lean-spec · codervisor/lean-spec · ★ 252 · last commit 2026-05-20

Provides a unified spec CLI and MCP server over any existing spec backend (markdown, GitHub Issues, ADO), making spec-driven development tool-agnostic without requiring teams to change their workflow.

Best whenSpec backends should be pluggable and the AI skill should query the live system for its vocabulary rather than hard-coding field names, because different tea…
Skip ifHard-coding field names instead of querying capabilities, Creating empty spec then patching (use single-call creation)
vs seeds
spec-kit(same team), replaces Python+hooks pattern with npm+MCP+React+Rust pattern. The runtime vocabulary discovery pattern (`l…
Primitive shape 15 total
Skills 5 Hooks 1 MCP tools 9
00

Summary

LeanSpec — Summary

LeanSpec is a tool-agnostic spec framework that provides a unified CLI (leanspec), MCP server (@leanspec/mcp), and optional web UI / desktop app over whatever spec backend a team already uses — local markdown files, GitHub Issues, Azure DevOps Work Items, Jira, Linear, or Notion. Unlike every other SDD framework in this corpus, LeanSpec treats the spec storage backend as a pluggable provider, meaning the same CLI and AI skill work identically whether specs live in a specs/ markdown folder or in GitHub Issues. It ships a Kanban board (leanspec board), project stats, web UI at localhost:3000 (leanspec ui), and an @leanspec/skills package that teaches AI agents the five-phase SDD workflow (Discover → Create → Refine → Implement → Verify). The binary is implemented in Rust (for CLI/MCP binaries) with TypeScript packages (Node.js >= 20), and integrates with virtually every AI coding assistant via MCP. Compared to seeds, LeanSpec differs most strongly from openspec (also a multi-tool, npm-published CLI for SDD) by its provider abstraction and web UI, and from spec-kit (Python CLI, hooks) by having first-class GitHub Issues and ADO integration rather than a file-only spec store. It has 252 stars, active development (last commit May 2026).

01

Overview

LeanSpec — Origin & Philosophy

Origin

Maintained by the codervisor organization (same org that built spec-kit and OpenSpec — this is the third-generation tool from the same authors). Last commit May 2026, 252 stars, 5 contributors. Active development with CI and a published docs site at lean-spec.dev.

Core Philosophy

"Your workflow, not ours." Other SDD frameworks force you to adopt their spec format and tooling. LeanSpec adapts to whatever you already use.

Manifesto-style Quotes (verbatim from README)

"Tool-agnostic — GitHub Issues, ADO, Jira, Linear, Notion, or plain markdown. One interface — Same CLI, MCP, and UI regardless of backend. AI-native — Structured spec data for any AI coding assistant. Fast iteration — Living documents that grow with your code. Context economy — Small specs (<2K tokens) = better AI output."

"📖 Compare with Spec Kit, OpenSpec, Kiro →"

"The tool-agnostic spec framework. Use any spec backend — your workflow, your rules."

Provider Architecture

LeanSpec's key architectural bet: a provider abstraction layer maps universal concepts (Spec ID, Status, Priority, Tags, Assignee, Content) to each backend's native fields. The leanspec capabilities -o json command returns the active adapter's field vocabulary at runtime, and the AI skill is instructed to use only that vocabulary — no hard-coded field names.

Lineage

The README explicitly names spec-kit and OpenSpec as predecessors from the same team. LeanSpec is positioned as the "third evolution" that adds the provider abstraction layer and multi-tool web UI on top of the SDD methodology proven by the earlier tools.

02

Architecture

LeanSpec — Architecture

Distribution

npm packages: @leanspec/cli, @leanspec/mcp, @leanspec/skills. Binaries compiled from Rust.

Install

npm install -g @leanspec/cli && leanspec init
# or try with tutorial project:
npx -p @leanspec/cli leanspec init --example dark-theme

Packages (pnpm workspace)

packages/
├── cli/           # @leanspec/cli — main CLI, Rust binaries bundled
├── mcp/           # @leanspec/mcp — MCP server
├── http-server/   # HTTP server variant
└── ui/            # @leanspec/ui — web dashboard (React/Vite)

Required Runtime

  • Node.js >= 20.0.0
  • pnpm >= 10.0.0
  • Rust >= 1.70 (development only, binaries pre-compiled for distribution)

Configuration

# leanspec.provider.yaml
provider: markdown   # or: github, ado, jira, linear
directory: specs     # for markdown provider
# provider: github
# owner: myuser
# repo: myproject

Directory Structure (markdown provider)

specs/
└── <spec-id>/
    ├── index.md    # spec content with YAML frontmatter
    └── ...
leanspec.provider.yaml   # backend configuration

AI Integration

{
  "mcpServers": {
    "leanspec": { "command": "npx", "args": ["@leanspec/mcp"] }
  }
}

Claude Code Skills Install

npx skills add codervisor/leanspec@leanspec

Target AI Tools

Claude Code, Cursor, Windsurf, GitHub Copilot, Gemini CLI, Kiro CLI, Kimi CLI, Qodo CLI, Amp, Trae Agent, Qwen Code, Droid, and more.

Spec Providers (Status as of analysis)

  • markdown — Available
  • github — Planned
  • ado — Planned
  • jira — Future
  • linear — Future

Desktop App

Separate repo: codervisor/lean-spec-desktop

03

Components

LeanSpec — Components

CLI Commands (leanspec binary)

Command Purpose
leanspec init Initialize project with provider config
leanspec board Kanban view of all specs
leanspec stats Project health metrics
leanspec ui Launch web UI at localhost:3000
leanspec search Find specs by content or metadata
leanspec capabilities -o json List active adapter's fields and vocabulary
leanspec create <name> Create a new spec with all known fields in one call
leanspec view <id> View a spec
leanspec update <id> Update spec fields

MCP Server (@leanspec/mcp)

Exposes spec CRUD and board operations to any MCP-compatible AI tool. Same functionality as CLI, accessible to agents via MCP protocol.

Skills (@leanspec/skills — the leanspec skill)

Installed via npx skills add codervisor/leanspec@leanspec. A single skill file (skills/leanspec/SKILL.md) that teaches AI agents:

  • Five-phase workflow: Discover → Create → Refine → Implement → Verify
  • Provider-agnostic vocabulary pattern (use capabilities output, never hard-code field names)
  • Spec as durable artifact (not ephemeral scratch pad)

Claude Code Hooks (project .claude/settings.json)

{
  "hooks": {
    "SessionStart": [{"type": "command", "command": "bash .claude/hooks/session-start.sh"}]
  }
}

1 hook: SessionStart → runs session-start.sh.

Claude Code Skills (.claude/skills/)

4 project-internal skills:

  • leanspec-dev-process — development process for LeanSpec itself
  • leanspec-pr-lifecycle — PR lifecycle for LeanSpec contributors
  • leanspec-pre-push — pre-push checklist
  • watch-ci — CI monitoring

Hooks (.husky/)

  • commit-msg — commit message lint (commitlint)

Web UI

React/Vite-based dashboard. leanspec ui serves it at localhost:3000. Features: Kanban board, spec list, search, stats.

05

Prompts

LeanSpec — Prompt Files

Excerpt 1: leanspec skill — Session Start Discovery (from skills/leanspec/SKILL.md)

## Start every session with capability discovery

Before reading, writing, or linking any specs, run:

```bash
leanspec capabilities -o json

The output is your source of truth. It tells you:

  • The active adapter's name (markdown, github, ado, …).
  • Which metadata fields exist and their types/enum values.
  • Which field plays each semantic role (status, priority, tags, assignee, due_date) on this adapter.
  • Which link types the backend understands (parent, depends_on, …).

Use the returned enum values as the only valid vocabulary. If you want to move a spec into the "working" state, look up the semantic status field, pick the value the adapter calls "work is underway," and send that — don't assume it's called in-progress.


**Technique**: **Runtime vocabulary discovery** — instead of hard-coding field names in the prompt, the agent is instructed to query the system at session start for the current vocabulary. This makes the skill adapter-agnostic and avoids prompt staleness when backends change.

## Excerpt 2: leanspec skill — Create Phase Instructions

```markdown
## 2. Create

Capture intent as a new, durable artifact.

1. Run `leanspec create <short-name>` with every known field in a single call (title, body, semantic fields like status/priority, tags, parent, dependencies). Never create an empty item and then patch it.
2. Write the body with:
   - **Overview** — what problem this solves and why it matters.
   - **Requirements** — a checklist of independently verifiable items.
   - **Non-goals** — what's explicitly out of scope.
   - **Acceptance criteria** — measurable definition of done.
3. Link relationships as they emerge.

Technique: Atomic creation pattern — "Never create an empty item and then patch it" is an explicit anti-pattern instruction. The skill enforces single-call creation to reduce state inconsistency.

Excerpt 3: leanspec skill — Implement Phase Scope Discipline

## 4. Implement

...
4. If you find out-of-scope work, create a **new** spec and link it rather than expanding the current one.

Technique: Scope containment instruction — explicit rule preventing scope creep during implementation. Agents are trained to create new specs for discovered work rather than expanding the current one.

Prompting Techniques Summary

  1. Runtime vocabulary discovery — query capabilities before any spec operation
  2. Atomic creation pattern — forbid create-then-patch workflows
  3. Scope containment — new spec for out-of-scope discoveries
  4. Verification-over-trust — "never trust a status field alone — check code, commits, tests, CI"
09

Uniqueness

LeanSpec — Uniqueness & Positioning

differs_from_seeds

Most similar to openspec (same authorship lineage, same multi-command npm CLI for spec-driven development), but LeanSpec adds the provider abstraction that openspec lacks — where openspec stores specs as local markdown files only, LeanSpec routes to GitHub Issues, ADO, Jira, or markdown via a provider layer. Versus spec-kit (same origin team), LeanSpec replaces the Python CLI + hooks pattern with an npm CLI + MCP + web UI pattern, adding a kanban board and removing the hook-per-command structure. Against kiro (also ships spec format + workflow states), LeanSpec is open-source, multi-tool, and doesn't require a proprietary IDE. The leanspec capabilities -o json runtime vocabulary discovery pattern is unique: no other seed uses a live query to determine what field names are valid before operating on specs.

Unique Positioning

The only framework in this batch (and corpus) with: (1) pluggable spec backends (markdown, GitHub Issues, ADO), (2) a built-in web kanban dashboard, (3) a runtime vocabulary discovery pattern via capabilities query. It is explicitly positioned as the successor to spec-kit and openspec by the same team.

Observable Failure Modes

  1. Planned providers not implemented: GitHub Issues and ADO providers are "Planned" as of analysis date — only markdown works.
  2. Desktop app in separate repo: fragmentation risk; desktop and CLI may diverge.
  3. No TDD enforcement: despite calling itself spec-driven, there is no hook or gate that prevents code-before-spec.
  4. Context economy claim unverified: the "<2K tokens" spec size guidance is aspirational, not enforced.
  5. Rust build requirement: contributors need Rust for local development, raising the barrier vs pure-Node projects.

Explicit Antipatterns (from skill)

  • Creating a spec and then patching it (use single-call creation)
  • Hard-coding field names instead of using capabilities output
  • Expanding scope instead of creating a new linked spec
  • Trusting spec status field without verifying code/tests/CI
04

Workflow

LeanSpec — Workflow

Five-Phase Workflow (from the leanspec skill)

Phase Action Artifact
1. Discover leanspec capabilities -o json + leanspec board + leanspec search Understanding of current spec state
2. Create leanspec create <name> with all fields in one call New spec with overview, requirements, non-goals, acceptance criteria
3. Refine Locate files, verify existence, find patterns, validate dependencies Implementation-ready spec (no blocking unknowns)
4. Implement Read spec, transition to "in-progress" state, work checklist Code changes; spec updated with decisions
5. Verify Check code, commits, tests, CI against spec Confirmed done; spec transitioned to "done" state

Approval Gates

Explicit human review gate: before transitioning a spec from "design" to "ready" (the skill instructs "Gate: no blocking unknowns; every checklist item is specific and actionable"). Beyond that, gates are implicit in the workflow states (Draft → Design → Review → Ready).

Workflow States

Draft → Design → Review → Ready (provider-agnostic state machine; actual state names come from leanspec capabilities output).

Provider-Agnostic State Transitions

The skill explicitly instructs agents: "Transition the spec into its 'work underway' state via leanspec update <id> using the adapter's declared status value." State values must be looked up from capabilities output, not hard-coded.

Key Principles (from skill)

  1. "Specs are durable artifacts" — not scratch pads
  2. "Discovery first" — always read existing before creating
  3. "Intent before implementation" — capture why first, how second
  4. "Verify against reality" — never trust status field alone

Scope Discipline

"If you find out-of-scope work, create a new spec and link it rather than expanding the current one."

06

Memory Context

LeanSpec — Memory & Context

State Storage

Provider-dependent:

  • Markdown provider: files in specs/ directory (default: specs/)
  • GitHub provider: GitHub Issues + Projects (remote)
  • ADO provider: Azure DevOps Work Items (remote)

Persistence Scope

Project-scoped for markdown provider; global/remote for GitHub/ADO providers.

Context Files

  • leanspec.provider.yaml — backend configuration
  • specs/ — spec content (markdown provider)

Session Start Protocol

The leanspec skill mandates leanspec capabilities -o json at session start to obtain the current adapter's field vocabulary. This is the primary context-loading mechanism: instead of storing state in files the agent reads, the agent queries the live system.

Cross-Session Handoff

Yes — specs are durable artifacts persisted in the backend (files or issue tracker). Any new session picks up where the previous left off by running leanspec board.

Compaction

None specific. The skill emphasizes "context economy — small specs (<2K tokens) = better AI output" as a design principle for spec authoring, but no automatic compaction mechanism exists.

Memory Type

File-based (markdown provider) or remote API (GitHub/ADO providers). No local SQLite or vector store.

MCP Server as State Bridge

The @leanspec/mcp server provides read/write access to the spec backend for AI agents, making spec state accessible to any MCP-compatible tool without file access.

07

Orchestration

LeanSpec — Orchestration

Multi-Agent

No. LeanSpec is designed for single-agent use with the MCP server as the integration point. No subagent spawning mechanisms.

Orchestration Pattern

Sequential. The five-phase workflow (Discover → Create → Refine → Implement → Verify) runs stage by stage.

Execution Mode

Interactive-loop. The agent uses CLI commands and MCP tools iteratively within a session; no background daemon.

Isolation Mechanism

None. Edits happen in place. No git branching or worktrees in the spec workflow.

Multi-Model

No. LeanSpec is model-agnostic (provider architecture extends to AI tools via MCP), but no model routing per role.

Consensus Mechanism

None.

Auto-Validators

None. The "Verify" phase instructs agents to check code, commits, tests, CI — but no automated validator runs.

TDD Enforcement

None. Acceptance criteria are written in specs but no TDD hook enforces test-first order.

Git Automation

None explicitly. The leanspec-pre-push internal skill is a checklist for LeanSpec contributors, not for end users.

Prompt Chaining

Yes — capabilities output feeds all subsequent spec operations; spec content feeds implementation; implementation state feeds verify.

Cross-Tool Portability

High. MCP server + CLI means any AI tool supporting MCP can access LeanSpec's spec backend. Named compatible tools: VS Code Copilot, Claude Code, Gemini CLI, Cursor, Windsurf, Kiro CLI, Kimi CLI, Qodo CLI, Amp, Trae Agent, Qwen Code, Droid.

08

Ui Cli Surface

LeanSpec — UI & CLI Surface

CLI Binary

  • Name: leanspec
  • Package: @leanspec/cli
  • Type: Dedicated CLI (Rust binaries bundled with npm package)
  • Not a thin wrapper — contains its own spec management logic

Local Web UI

  • Exists: Yes
  • Type: Web dashboard (React/Vite)
  • Port: 3000
  • Launch: leanspec ui
  • Tech Stack: React, Vite, Tailwind CSS, Radix UI components
  • Features: Kanban board, spec list, search, project stats

Desktop App

Separate repository: codervisor/lean-spec-desktop. Not part of this repo.

MCP Server

  • Package: @leanspec/mcp
  • Protocol: stdio
  • Install: npx @leanspec/mcp

Skills Integration

npx skills add codervisor/leanspec@leanspec

Installs the leanspec skill into any Agent Skills compatible AI tool.

Compatible AI Tools (from README)

VS Code Copilot, Claude Code, Gemini CLI, Cursor, Windsurf, Kiro CLI, Kimi CLI, Qodo CLI, Amp, Trae Agent, Qwen Code, Droid, and more.

Observability

  • leanspec board — Kanban view
  • leanspec stats — health metrics and bottleneck detection
  • leanspec status — task progress

Documentation Site

https://www.lean-spec.dev (with Chinese docs at /zh-Hans/docs/guide/)

Related frameworks

same archetype · same primary tool · same memory type

Taskmaster AI ★ 27k

Converts a PRD into a dependency-ordered JSON task graph that AI coding agents execute one task at a time, eliminating context…

ccmemory ★ 1

Accumulates decisions, corrections, and failed approaches from Claude Code sessions into a queryable Neo4j graph so each new…

Pimzino spec-workflow-mcp ★ 4.2k

MCP server providing spec-driven development workflow with dashboard-backed approval gates, implementation logging, and VSCode…

MCP Shrimp Task Manager ★ 2.1k

Convert natural language requests into structured AI development tasks with chain-of-thought enforcement, reflection gates, and…

Bernstein ★ 460

Govern parallel CLI coding agents with a deterministic Python scheduler, HMAC-chained audit trail, and compliance-ready signed…

Specs Workflow MCP ★ 127

Enforces Requirements → Design → Tasks workflow via a single MCP tool with persistent JSON progress tracking that survives…