Specification-driven development tool with test verification
Project description
spec-test
Specification-driven development tool that verifies your specs have passing tests.
Philosophy
Every claim about system behavior must be backed by a passing test.
- If there's no test, the behavior is unverified
- Specs are written first, then implementation, then tests
spec-test verifyis the source of truth for project health
Installation
pip install spec-test
# or with uv
uv add spec-test
Quick Start
- Create a spec file anywhere in your project (must be
spec-*.md):
# docs/specs/spec-auth.md
## Requirements
- **AUTH-001**: User can login with email and password
- **AUTH-002**: Invalid credentials return 401 error
- Write tests with the
@specdecorator:
from spec_test import spec
@spec("AUTH-001", "User can login with email and password")
def test_user_login():
response = client.post("/login", json={"email": "test@example.com", "password": "secret"})
assert response.status_code == 200
@spec("AUTH-002", "Invalid credentials return 401 error")
def test_invalid_login():
response = client.post("/login", json={"email": "test@example.com", "password": "wrong"})
assert response.status_code == 401
- Verify all specs have passing tests:
spec-test verify
Commands
spec-test verify # Verify all specs have passing tests
spec-test list-specs # List all specs found
spec-test check AUTH-001 # Check a single spec
spec-test init # Initialize spec-test in a project
Spec File Format
Spec files must:
- Be named
spec-*.md(e.g.,spec-auth.md,spec-api.md) - Can be anywhere in the project (nested directories supported)
- Use
**ID**: descriptionformat for requirements
- **AUTH-001**: User can login with email and password
- **AUTH-002** [manual]: Requires manual verification
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spec_test-0.1.2.tar.gz.
File metadata
- Download URL: spec_test-0.1.2.tar.gz
- Upload date:
- Size: 65.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79242923c0f7bc621d048f1efc673a4a2eb27562be07b1c4e7bde0de5a6a9b36
|
|
| MD5 |
6d91724a91462de1f4807e79a2c14685
|
|
| BLAKE2b-256 |
93433002143b951a8b24b3455256476a889aaf1b91c46e87fbdf5aaa8cbc2cf3
|
Provenance
The following attestation bundles were made for spec_test-0.1.2.tar.gz:
Publisher:
publish.yml on Varuas37/spec-test
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spec_test-0.1.2.tar.gz -
Subject digest:
79242923c0f7bc621d048f1efc673a4a2eb27562be07b1c4e7bde0de5a6a9b36 - Sigstore transparency entry: 854818552
- Sigstore integration time:
-
Permalink:
Varuas37/spec-test@e2185f689179f4f62252297f0de3eb2b7d264924 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Varuas37
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e2185f689179f4f62252297f0de3eb2b7d264924 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spec_test-0.1.2-py3-none-any.whl.
File metadata
- Download URL: spec_test-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83c24176d7b6faae65735e9083a7179c0045fec6f5a489a048845864730fc104
|
|
| MD5 |
e9605156f9c4694e2d4eb9e1ced1612d
|
|
| BLAKE2b-256 |
960416230c7867553d867c249fdddaf23964a891a203c03e30eebbdb7be32f5c
|
Provenance
The following attestation bundles were made for spec_test-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Varuas37/spec-test
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spec_test-0.1.2-py3-none-any.whl -
Subject digest:
83c24176d7b6faae65735e9083a7179c0045fec6f5a489a048845864730fc104 - Sigstore transparency entry: 854818559
- Sigstore integration time:
-
Permalink:
Varuas37/spec-test@e2185f689179f4f62252297f0de3eb2b7d264924 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Varuas37
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e2185f689179f4f62252297f0de3eb2b7d264924 -
Trigger Event:
release
-
Statement type: