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.50

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.50
File Size Uploaded
elspais-0.125.50.tar.gz 2.9 MB Details

Built distribution (wheel)

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

Total release size: 4.3 MB

Release files / elspais-0.125.50.tar.gz

Download URL elspais-0.125.50.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a4fee65ddb0b4ac31ff7547fdb0b271e8c2fed020eeb3c571d07de24d6ddda26
BLAKE2b-256 checksum
How to use checksums
d3e7defc31c47e9398adc86816fc1d2a63beff1dba25d7c2d1a4d1ff7cb49a03
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.50-py3-none-any.whl

Download URL elspais-0.125.50-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
983e2837f46be47f4a1ef56ecc83b4b0df1f2a00aa16db2e4e962b4b76b3aab5
BLAKE2b-256 checksum
How to use checksums
756edcb9b2805fad073c361643f1da022fa7f061919e53030096cb5e5502784e
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.50 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