Skip to main content

elspais

"L-Space is the ultimate library, connecting all libraries everywhere through the sheer weight of accumulated knowledge." — Terry Pratchett

elspais is a requirements validation and traceability tool for teams managing formal requirements across one or more repositories. It validates requirement formats, enforces hierarchy rules, tracks changes with content hashes, and generates traceability matrices linking requirements to code and tests.

Installation

# Homebrew (macOS/Linux)
brew install anspar-org/anspar/elspais

# pipx (isolated install)
pipx install elspais

# pip
pip install elspais

Optional extras

pip install elspais[trace-view]    # Static HTML traceability view
pip install elspais[trace-review]  # Interactive viewer server
pip install elspais[mcp]           # MCP server for AI integration
pip install elspais[all]           # Everything

Quick Start

# Initialize configuration
elspais init

# Validate requirements
elspais checks

# Auto-fix hashes and formatting
elspais fix

# Generate traceability matrix
elspais trace --format html

# Interactive viewer (live server)
elspais viewer

# Built-in documentation
elspais docs

MCP Server (AI Integration)

elspais includes an MCP server for use with Claude Code, Claude Desktop, and other MCP-compatible clients.

# Install the MCP extra
pip install elspais[mcp]

# Register with Claude Code (all projects) and Claude Desktop
elspais mcp install --global --desktop

# Each shell supplies the daemon's address before launching the client
eval "$(elspais mcp env)"

The MCP server provides tools for searching requirements, navigating hierarchies, checking coverage, and drafting mutations — all operating on the live traceability graph.

Mutations use optimistic concurrency: several writers (agents and the viewer GUI) can share one daemon, so every mutation requires a version token from a prior read and stale writes are rejected rather than silently overwriting. See elspais docs concurrency for the protocol.

Requirement Format

Requirements are written in Markdown:

# REQ-d00001: Requirement Title

**Level**: Dev | **Status**: Active | **Implements**: REQ-p00001

## Assertions

A. The system SHALL provide user authentication via email/password.
B. Sessions SHALL expire after 30 minutes of inactivity.

*End* *Requirement Title* | **Hash**: a1b2c3d4
---
  • Hierarchy: PRD (product) → OPS (operations) → DEV (development)
  • Traceability: Children reference parents via Implements:
  • Assertions: Labeled A-Z, using SHALL for normative statements
  • Hash footer: SHA-256 content hash for change detection

Configuration

Create .elspais.toml in your repository root (or run elspais init):

[project]
name = "my-project"
namespace = "REQ"

[levels.prd]
rank = 1
letter = "p"
implements = ["prd"]

[levels.ops]
rank = 2
letter = "o"
implements = ["ops", "prd"]

[levels.dev]
rank = 3
letter = "d"
implements = ["dev", "ops", "prd"]

[scanning.spec]
directories = ["spec"]

[scanning.code]
directories = ["src"]

[id-patterns]
canonical = "{namespace}-{level.letter}{component}"

[rules.format]
require_hash = true
require_assertions = true

See docs/configuration.md for full reference.

Multi-Repository Support

Link associated repositories that extend a core requirement set:

elspais init --type associated --associated-prefix CAL
elspais associate ../core-repo
elspais checks

CLI Commands

elspais checks         Verify requirements traceability and configuration
elspais fix            Auto-fix spec file issues (hashes, formatting)
elspais trace          Generate traceability matrix (markdown, html, csv)
elspais viewer         Start interactive viewer server
elspais doctor         Diagnose environment and installation health
elspais analysis       Analyze foundational requirement importance
elspais changed        Detect git changes to spec files
elspais edit           Edit requirements in-place
elspais config         View and modify configuration
elspais associate      Manage associate repository links
elspais link suggest   Suggest requirement links for unlinked tests
elspais pdf            Compile spec files into PDF
elspais mcp            MCP server commands
elspais docs           Built-in user guide
elspais example        Requirement format examples

Run elspais <command> --help for detailed usage. See src/elspais/docs/cli/commands.md for full documentation.

Development

git clone https://github.com/anspar/elspais.git
cd elspais
make setup
make test

make setup builds .venv, installs elspais into it, and installs the git hooks. The hooks and the test targets both run the tools from that directory, so what they report describes this checkout and not some other installation of elspais.

License

GNU Affero General Public License v3 (AGPL-3.0) — see LICENSE.

Metadata

Release files for elspais 0.125.36

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elspais 0.125.36
File Size Uploaded
elspais-0.125.36.tar.gz 2.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for elspais 0.125.36
File Interpreter ABI Platform
elspais-0.125.36-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 MB

Release files / elspais-0.125.36.tar.gz

Download URL elspais-0.125.36.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
150bf93c083a45432517f3d8698c8b6635cc92dacc581df4d2d06306e7cbf328
BLAKE2b-256 checksum
How to use checksums
3850946211be9913fb50b7e8b8aed6cfbf38d680f5c5fa3e0493455b25c94560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / elspais-0.125.36-py3-none-any.whl

Download URL elspais-0.125.36-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ae62c2bd498ad5003c8e73d7b255604d3aebae3c5eb537b639eaeb9c896be707
BLAKE2b-256 checksum
How to use checksums
8dfe0cd241526c262b9ed1ef6ccd86d47e1130ad84c1b00d06c559580e6c5e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.125.36 This release

2 release files

0.84.2

2 release files

0.84.1

2 release files

0.84.0

2 release files

0.82.1

2 release files

0.82.0

2 release files

0.81.0

2 release files

0.80.0

2 release files

0.79.0

2 release files

0.76.1

2 release files

0.76.0

2 release files

0.75.0

2 release files

0.74.0

2 release files

0.73.2

2 release files

0.73.1

2 release files

0.73.0

2 release files

0.72.0

2 release files

0.66.0

2 release files

0.65.0

2 release files

0.64.1

2 release files

0.64.0

2 release files

0.63.3

2 release files

0.59.0

2 release files

0.58.0

2 release files

0.57.0

2 release files

0.56.1

2 release files

0.54.1

2 release files

0.54.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.9.3

2 release files

0.9.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page