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,replacedorremoved. - 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 (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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spezi_kit-0.1.0.tar.gz | 458.7 kB | With provenance | Details for spezi_kit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spezi_kit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for spezi_kit-0.1.0-py3-none-any.whl |
Total release size: 721.6 kB
Release files / spezi_kit-0.1.0.tar.gz
| Download URL | spezi_kit-0.1.0.tar.gz |
|---|---|
| Size | 458.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01922577e252a58fe4e94dc35f1b22c5f93d937646b00633acb820675846db31
|
|
BLAKE2b-256 checksum How to use checksums |
9a015c0883a905967beb5c53e4340d318836e5e290c9bd02bbc1003f9703a360
|
| 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 logRelease files / spezi_kit-0.1.0-py3-none-any.whl
| Download URL | spezi_kit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 262.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06d1fba6c8f844bde3d0432dd2d84de58e4f04e1b6a4e825c52a7033bc218db6
|
|
BLAKE2b-256 checksum How to use checksums |
2b888f8fe185d0153e74adb2d73cb1228ec835a8c78b486333982d6a370b395c
|
| 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 logSecurity for spezi-kit 0.1.0
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.
Attestation for spezi_kit-0.1.0.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 logA 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.