Skip to main content

Feature request and implementation specification management tool

Project description

nspec

Specification-driven project management for AI-native development

nspec turns your backlog into structured markdown specs that AI coding assistants can read, execute, and update. It pairs every feature request (FR) with an implementation spec (IMPL), validates the entire graph, and exposes an MCP server so Claude Code (or any MCP-compatible agent) can autonomously pick up work, track tasks, and advance specs through their lifecycle.

Getting Started

1. Install

pip install nspec[mcp]

Other options: pipx install nspec[mcp], uv add --dev nspec[mcp], poetry add --group dev nspec[mcp].

2. Initialize your project

nspec init

This auto-detects your stack (Python/Node/Rust/Go, package manager, CI platform) and creates:

project-root/
├── .novabuilt.dev/nspec/config.toml   # Configuration
├── .claude/commands/                   # Claude Code skills (go, loop, backlog, etc.)
├── nspec.mk                           # Includable Makefile fragment
└── docs/
    ├── frs/active/TEMPLATE.md         # Feature request template
    ├── impls/active/TEMPLATE.md       # Implementation template
    └── completed/{done,superseded,rejected}/

3. Set up the MCP server

Generate the correct .mcp.json for your stack:

nspec --mcp-config

This outputs a ready-to-paste config block. Add it to your project's .mcp.json:

{
  "mcpServers": {
    "nspec": {
      "command": "nspec-mcp",
      "args": []
    }
  }
}

For managed environments, the command adapts to your stack:

Stack Command
pip / pipx nspec-mcp
poetry poetry run nspec-mcp
uv uv run nspec-mcp
hatch hatch run nspec-mcp
Node (npm/yarn/pnpm) npx nspec-mcp

4. Create your first spec

nspec spec create --title "User authentication" --priority P1

This creates a matched FR + IMPL pair with auto-assigned IDs. From here, Claude Code can pick it up via the MCP tools.

5. Let Claude work

With the MCP server configured, Claude Code has full access to your backlog. Use the installed skills:

  • /ngo S001 — Start a work session on a spec
  • /nbacklog — View the prioritized backlog
  • /nloop — Autonomous mode: pick, execute, complete, repeat

Or interact naturally — Claude can call next_spec to find work, task_complete to check off tasks, and advance to move specs through their lifecycle.

MCP Server

The MCP server is the primary integration point for AI assistants. Instead of parsing CLI output, the assistant calls structured tools that return typed data.

Transport Options

stdio (default) — Direct pipe, best for local Claude Code:

nspec-mcp

SSE — For web clients, Docker, or remote access:

nspec-mcp --sse        # Listens on http://localhost:8080/sse

HTTP — Streamable HTTP transport:

nspec-mcp --http       # Listens on http://localhost:8080/mcp

Docker

Run the MCP server in Docker with volume-mounted docs:

# Build and start
scripts/mcp-docker.sh start

# With auto-reload on code changes
scripts/mcp-docker.sh watch

# Other commands: stop, restart, logs, status

Configure Claude Code to connect via URL:

{
  "mcpServers": {
    "nspec": {
      "type": "sse",
      "url": "http://localhost:8080/sse"
    }
  }
}

Environment variables: NSPEC_MCP_PORT (default: 8080), NSPEC_MCP_TRANSPORT (sse|http).

Fuzzy ID Resolution

All MCP tools accept flexible ID formats:

  • Full prefixed: S022, E007
  • Case-insensitive: s022, e7
  • Bare numbers: 22, 7, 007 — resolved against known specs on disk

Ambiguous bare numbers (where both S### and E### exist) raise an error asking for the full ID.

Available Tools

Query tools (read-only):

Tool Description
epics List all epics with progress percentages
show Full spec details (FR + IMPL combined)
next_spec Highest-priority unblocked spec
get_epic Currently active epic ID
validate Run 6-layer validation engine
session_start Initialize work session (pending tasks, blockers, suggested action)
blocked_specs Specs with blocked tasks or paused status

Mutation tools (modify spec files):

Tool Description
task_complete Mark IMPL task done (runs test gate first)
criteria_complete Mark acceptance criterion done (runs test gate first)
activate Set spec to Active, persist as current
advance Move spec to next status (Planning → Active → Testing → Ready)
complete Archive spec to completed/done
create_spec Create new FR+IMPL pair with auto-assigned ID
set_priority Change priority (cascades to dependents)
add_dep / remove_dep Manage dependencies
task_block / task_unblock Mark tasks as blocked with reason
park Pause a spec
codex_review Run Codex code review against spec criteria

Session tools (cross-session state):

Tool Description
session_save Persist session state for handoff
session_resume Load saved session state
session_clear Delete session state

Test Gate

task_complete and criteria_complete run make test-quick before marking items done. Pass run_tests=false to skip.

Sequential Task Enforcement

Tasks must be completed in order. Subtasks must be finished before their parent. The MCP server validates this on every task_complete call.

Features

Core Specification Management

  • FR/IMPL Pairing — Every feature request gets a matching implementation spec. Orphans are detected automatically.
  • Architecture Decision Records — ADRs (FR-900-999 range) with DRAFT/PROPOSED/ACCEPTED/DEPRECATED/SUPERSEDED lifecycle.
  • Hierarchical Tasks — Nested task trees with [ ] pending, [x] done, [~] obsolete, and [->XXX] delegated markers.
  • Acceptance Criteria — Categorized criteria (Functional, Performance, Quality, Documentation) with progress tracking.
  • Spec CRUD — Create, delete, complete, supersede, and reject specs from the CLI with optional --git-add.

6-Layer Validation Engine

  1. Format — Markdown structure, required fields, ID format, priority/status/LOE regex.
  2. Dataset Loading — Parse all FR and IMPL documents with fail-fast error reporting.
  3. Existence — FR/IMPL pairing, orphan detection, mixed-location detection.
  4. Dependency — Graph validation, circular reference detection, dangling dependency cleanup.
  5. Business Logic — Priority inheritance (child <= parent), status consistency, LOE totals, completion parity.
  6. Ordering — Dependency-based document ordering with cross-epic resolution.

Dependency & Epic Management

  • Dependency Graph — Add, remove, and visualize dependencies between specs.
  • Circular Reference Detection — Prevents invalid dependency cycles.
  • Epic Hierarchy — Specs grouped under epics. Epic membership enforced via config.
  • Priority Inheritance — Child specs cannot exceed parent epic priority.
  • Cross-Epic Ordering — DAO layer resolves ordering across epic boundaries.

Engineering Metrics & Analytics

  • Velocity — Commits, LOC, active days, specs completed per period.
  • Quality — Test coverage, lint issues, cyclomatic complexity, maintainability index.
  • DORA Metrics — Spec velocity tier, quality gate pass rate, change failure rate.
  • Activity Heatmap — GitHub-style commit calendar in the TUI.

Interactive Terminal UI

  • Spec Table — Multi-column sortable display with epic filtering.
  • Detail Panel — Full spec metadata, tasks, and criteria.
  • Vim Keybindingsj/k navigation, command modal.
  • Real-time Search — Filter with /, navigate matches with n/p.
  • Validation Error Screen — Navigate errors with full context.
  • Follow Mode — Auto-tracks the currently active spec.
  • Live Reload — Watches docs directory and refreshes on changes.

Codex Code Review

  • Automated code review via codex_review MCP tool.
  • Reviews diff against FR acceptance criteria and IMPL task list.
  • Returns APPROVED or NEEDS_WORK verdict written to the IMPL.
  • Required before complete() can archive a spec.

Configuration

All nspec configuration lives in .novabuilt.dev/nspec/config.toml:

[paths]
feature_requests = "frs/active"        # FR directory (relative to docs root)
implementation = "impls/active"        # IMPL directory
completed = "completed"                # Archive directory
completed_done = "done"                # Subdirectory for completed specs
completed_superseded = "superseded"    # Subdirectory for superseded specs
completed_rejected = "rejected"        # Subdirectory for rejected specs

[defaults]
epic = "001"                           # Default epic for new specs

[validation]
enforce_epic_grouping = false          # Require all specs in an epic

[review]
model = "gpt-5.2"                      # Codex review model
reasoning_effort = "high"              # low, medium, high
timeout = 600                          # Review timeout in seconds

Priority Order

  1. CLI arguments--docs-root, --epic, etc.
  2. Environment variablesNSPEC_FR_DIR, NSPEC_IMPL_DIR, NSPEC_COMPLETED_DIR
  3. Config file.novabuilt.dev/nspec/config.toml
  4. Built-in defaults

CLI Reference

Project Setup

Command Description
nspec init Scaffold nspec project (auto-detects stack)
nspec init --ci github Scaffold with GitHub Actions CI
nspec init --force Overwrite existing files
nspec --mcp-config Generate MCP server config for your stack

Validation & Output

Command Description
nspec validate Run all 6 validation layers
nspec validate criteria --id ID Validate acceptance criteria for a spec
nspec generate Generate NSPEC.md and NSPEC_COMPLETED.md
nspec dashboard Generate + show engineering metrics
nspec stats Velocity, quality, and DORA metrics
nspec statusline Compact status for editor integration
nspec tui Open interactive terminal UI

Spec Management (nspec spec)

Command Description
nspec spec create --title "T" [--priority P1] [--epic ID] Create FR+IMPL pair
nspec spec delete --id ID [--force] Delete FR+IMPL files
nspec spec complete --id ID Archive to completed/done
nspec spec supersede --id ID Archive to completed/superseded
nspec spec reject --id ID Archive to completed/rejected
nspec spec finalize --id ID Show spec completion status
nspec spec progress [--id ID] Task and acceptance criteria progress
nspec spec deps --id ID List direct dependencies
nspec spec context --id ID LLM-friendly YAML context for an epic

Dependencies (nspec dep)

Command Description
nspec dep add --to ID --dep DEP Add dependency
nspec dep remove --to ID --dep DEP Remove dependency
nspec dep move --to EPIC --dep ID Move spec to epic

Tasks & Properties (nspec task)

Command Description
nspec task check --id ID --task-id 1.1 Mark task complete
nspec task criteria --id ID --criteria-id AC-F1 Mark criterion complete
nspec task set-priority --id ID --priority P0 Change spec priority
nspec task set-loe --id ID --loe "3d" Set level of effort
nspec task next-status --id ID Advance IMPL to next status
nspec task set-status --id ID --fr-status N --impl-status N Set status codes directly

Session Management (nspec session)

Command Description
nspec session start --id ID Initialize work session
nspec session log --id ID --note "text" Append execution notes
nspec session handoff --id ID Generate session handoff summary
nspec session sync --id ID [--force] Sync spec state across files
nspec session files [--since-commit REF] List modified files

Architecture Decision Records (nspec adr)

Command Description
nspec adr create --title "Decision" Create ADR (FR-900-999 range)
nspec adr list List all ADRs with status

Document Formats

FR (Feature Request)

# FR-001: Feature Title

**Priority:** P0
**Status:** Proposed
deps: [002, 003]

## Overview
Feature description...

## Acceptance Criteria
- [ ] AC-F1: First criterion
- [x] AC-F2: Second criterion (completed)
- [~] AC-F3: Third criterion (obsolete)

IMPL (Implementation)

# IMPL-001: Feature Title

**Status:** Active
**LOE:** 3d

## Tasks
- [ ] 1. First task
- [x] 2. Second task (completed)
  - [ ] 2.1. Subtask
  - [->S220] 2.2. Delegated to spec S220

Status Codes

FR Status IMPL Status
Proposed Planning
In Design Active
Active Testing
Completed Ready
Rejected Paused
Superseded Hold
Deferred

Priority Levels

Stories Epics
P0 Critical E0 Critical
P1 High E1 High
P2 Medium E2 Medium
P3 Low E3 Low

Makefile Integration

Add the generated fragment to your project Makefile:

include nspec.mk

Provides: nspec.validate, nspec.generate, nspec.dashboard, nspec.tui, nspec.stats, nspec.check.

The NSPEC variable is auto-configured for your stack (e.g., poetry run nspec, npx nspec, uv run nspec).

CI/CD Integration

nspec init generates CI configuration when it detects your platform:

nspec init --ci github      # .github/workflows/nspec.yml
nspec init --ci gitlab       # .gitlab-ci.yml

All CI templates validate specifications and generate NSPEC.md on every push/PR.

Development

poetry install
make test-quick    # Fast tests, fail-fast
make test-cov      # Tests + coverage report
make check         # Format + lint + typecheck

License

MIT License - see LICENSE for details.

Credits

Built with Poetry, Textual, Rich, and MCP.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nspec-2.3.0.tar.gz (349.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nspec-2.3.0-py3-none-any.whl (404.9 kB view details)

Uploaded Python 3

File details

Details for the file nspec-2.3.0.tar.gz.

File metadata

  • Download URL: nspec-2.3.0.tar.gz
  • Upload date:
  • Size: 349.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nspec-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c9084ea2b5a25df3b7cbdbc39439490373842a18775d0ef29d4a75acd4f65870
MD5 ca27e13878b4f61b103dbcb1aff031e7
BLAKE2b-256 d89ab9d7e748f72afe8a1418161b87bd67a136864f421bca4584b9fbb46781b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for nspec-2.3.0.tar.gz:

Publisher: publish.yml on Novabuiltdevv/nspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nspec-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: nspec-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 404.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nspec-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e11848552719f35523f6c1b70211020b518cacc987d44ba558b4ab60cf54141
MD5 3c153d0d4055233ee40501cc2cb5dde5
BLAKE2b-256 7eb48fbc471a12aae23bec4f88fde77ded64a56d9bf4d0ab92f9cd293fb5f96f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nspec-2.3.0-py3-none-any.whl:

Publisher: publish.yml on Novabuiltdevv/nspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page