Skip to main content

Spezi

A starter kit for specs: the binding rules of a software project, one rule in one Markdown file. Its command spezi checks and manages the specs of a project. The command comes as a Nix flake, as the package spezi-kit on PyPI and as a binary.

What it does

  • It gives each rule a fixed number, for example 000024. Code and text refer to a rule with (spec 000024), and to a rule of a different repository with (spec github.com/<owner>/<repo>:000024). A reference can also name the rule at a tag, a branch or a commit: (spec @v0.1.0:000024) or (spec github.com/<owner>/<repo>@v0.1.0:000024).
  • It records the approval of each rule: draft, approved, replaced or removed.
  • It makes each change start as a spec. Code starts after the owner approves the spec.
  • It checks every spec in CI, and it writes the index.
  • It gives agents an MCP server to read, find and create specs.

Spec kinds

Kind ID Folder Holds
functional F specs/requirements/functional/ What the product must do.
non-functional NF specs/requirements/non-functional/ How well the product must do it.
protocol P specs/protocols/ One data format, with a JSON Schema and an example.
structure U specs/structures/ One UML diagram in Mermaid, with an element table.
style S specs/style/ How code and tests must look.
convention C specs/conventions/ How specs must look.
workflow W specs/workflow/ How people and agents must work.
agent A specs/agents/ What only an agent must do or must not do.
decision D specs/decisions/ One design decision with its alternatives.

One rule tells which kind a rule gets (spec 000004).

Layout of a project

Path Content
specs/ The rules of the project in the kind folders (spec 000051), and README.md, the index (spec 000007).
specs/.upstream/<host>/<group>/.../<repo>/ The rules of a different repository, for example of this kit (spec 000048).
specs/.templates/ The templates for a new spec (spec 000008).
spezi.toml The settings, with the switches of the optional parts in [features] (spec 000078, 000084).
spezi.lock The commit and the hash of each copy below specs/.upstream/ (spec 000082).
.claude/skills/spezi-* Skills for agents.
.mcp.json The MCP server spezi.
.github/workflows/spezi.yml, .gitlab/ci/spezi.yml (included from .gitlab-ci.yml) or .forgejo/workflows/spezi.yml The CI job.
AGENTS.md, CLAUDE.md The rules for agents, written by spezi install, and the import @AGENTS.md (spec 000079).

Commands

There are three ways to run the command:

Way How
Nix nix run github:frederikbeimgraben/spezi/<commit> -- <command>
pip Python 3.13 or newer. pipx install spezi-kit, or pip install spezi-kit in a virtual environment, then spezi <command>.
Binary Load spezi-linux-x86_64, spezi-linux-arm64 or spezi-windows-x86_64.exe from the releases. Rename it to spezi (spezi.exe on Windows), make it executable with chmod +x spezi and put it in a folder of PATH. Then run spezi <command>.
Command Effect
check Checks the specs and the references to rules. It changes no file.
install Loads each copy that does not agree with spezi.lock, writes each missing file of the kit, the index and AGENTS.md, then checks. It changes no version (spec 000083).
init [<dir>] [--forge github|gitlab|codeberg] Asks for the settings and the known repositories to add, then adds the kit to a project. It writes no flake.nix. For a project with a flake.nix, it shows the lines to add (spec 000370).
update [<repo> [<ref>]] [-r] Resolves the ref of each repository, or of one, again and replaces its copy. With <ref>, it first sets ref in spezi.toml. <repo> can be kit. For the kit, it also replaces the templates, the skills, the CI file and the MCP server entry. It tells the new commit for the input spezi of a flake.nix (spec 000300).
add [<repo> [<ref>]] [--include <folder>]... [-r] Adds the copy of the rules of a different repository, at <ref> or at its tag with the highest version. Without <repo>, it offers the known repositories of repositories/ (spec 000381).
configure [<key> <value>] Changes spezi.toml in a menu, or sets one key such as features.mcp false, then installs (spec 000086).
remove <repo> Removes the copy of a different repository, then installs (spec 000087).
new <kind> <area>/<topic> <name> "<title>" --scope <path>... [--owner <login>] Makes a new spec from its template, with the next number and the paths of scope.
resolve <id> Prints the path of a rule, for example specs/conventions/specs/format/000017_spec-reference.md for 000017.
show <id> Prints the full text of a spec.
list [<kind>] Lists every rule, or only the rules of one kind. <kind> is a kind name or its letter, for example functional or F.
search <text> Lists the rules that hold a text.
setup-ide zed|code Writes the extension of the language server for Zed or VS Code to .zed/spezi/ or .vscode/spezi/ (spec 000089).
lsp Runs the language server on stdin and stdout. It shows the errors of the check at their line, and the rule of a reference in a hover (spec 000088).
mcp Runs the MCP server on stdin and stdout. It has the tools check, install, resolve, show, list, search, new, configure and remove.

Each command except mcp and lsp takes --raw for plain text with one line for each error, or --json for JSON, before or after the command (spec 000080). spezi --version prints the version of the program.

On a terminal, init, add, update and configure ask questions. -y takes the proposals instead, as does a run without a terminal (spec 000085). add and update also ask which upstreams of an upstream to copy, from its spezi.lock. -r takes each of them without a question. Without -r, a run without a terminal takes none. init takes each of them for the known repositories that the user chooses. repo in spezi.toml names the project, so that a cycle of upstreams stops (spec 000092).

A project runs the command at the commit of the kit in spezi.lock. init and update write this commit into the CI file. The entry in .mcp.json starts the command in the same way as the command that writes it: with Nix at the commit, with pip or pipx as spezi, and a binary on PATH as spezi (spec 000377).

Add the kit to a project

cd <project-dir>
nix run github:frederikbeimgraben/spezi -- init

Without Nix, install the command with pipx or pip, or as a binary (see Commands), and run spezi init.

A project numbers its own rules from 000001. For a project that has its own specs, follow the skill spezi-adopt.

Contents of this repository

Path Content
specs/conventions/specs/ The conventions for specs. Read them first.
specs/workflow/specs/ The rules for the change process.
specs/agents/ The rules for agents.
specs/requirements/ The requirements of the command spezi.
specs/.upstream/ The copies of the upstreams. The copies of spezi-python and spezi-functional hold the code style.
specs/structures/ Two example structure specs.
repositories/ The list of the known repositories with rules (spec 000381).
src/spezi/ The command spezi.
tests/ The tests of the command.
flake.nix The Nix flake with the package, the app and a dev shell.

All text in this kit follows ASD-STE100 Simplified Technical English (spec 000025).

Metadata

Release files for spezi-kit 0.1.1

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

Source distribution (sdist)

Source distribution for spezi-kit 0.1.1
File Size Uploaded Provenance Actions
spezi_kit-0.1.1.tar.gz 460.5 kB With provenance Details for spezi_kit-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spezi-kit 0.1.1
File Interpreter ABI Platform Actions
spezi_kit-0.1.1-py3-none-any.whl Python 3 none any Details for spezi_kit-0.1.1-py3-none-any.whl

Total release size: 724.2 kB

Release files / spezi_kit-0.1.1.tar.gz

Download URL spezi_kit-0.1.1.tar.gz
Size 460.5 kB
Tags Source
SHA-256 checksum
How to use checksums
21852e5657b7336c169119ea2f3d173bee6a6a9266d5cae3ad2e0b8c8540ec91
BLAKE2b-256 checksum
How to use checksums
a69ced6debccc2a7996d302a2c42da87c81d26a7bd892a51a532e06e832ca638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / spezi_kit-0.1.1-py3-none-any.whl

Download URL spezi_kit-0.1.1-py3-none-any.whl
Size 263.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13ddd9c8f442294e0ac6a0e4bf6d136199f1d040f10d2e3ef2772305fd67a6d4
BLAKE2b-256 checksum
How to use checksums
54237127eb1c2c971a999105f1c85400caf1c5b56fa05948f1521c7e56215257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for spezi-kit 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for spezi_kit-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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