ReqLedger
ReqLedger is the Ledgerwerk record owner for requirements and acceptance criteria.
It stores durable requirement records as readable Markdown files with TOML metadata. It does not run tests, generate Gherkin, parse Gherkin, discover pytest tests, or own task/architecture records.
Downstream tools such as SpecMason can consume ReqLedger exports to create and validate behavior specs, pytest mappings, coverage reports, and evidence reports.
Scope boundary
| Tool | Owns |
|---|---|
| reqledger | requirements and acceptance criteria |
| specmason | behavior specs, mappings, coverage, and evidence |
| taskledger | tasks and task workflow |
| archledger | architecture records and ADRs |
| planledger | implementation plans |
| wikimason | wiki content |
ReqLedger is normative: accepted requirement records define intended product behavior. Source code and tests describe observed behavior but never silently rewrite requirements.
Requirements live as readable files
requirements/
README.md
manifest.json
records/
req-0001.req.md
reports/
reqledger/
review.md
review.json
reqledger.toml
Each requirement is a Markdown file with TOML front matter delimited by +++:
+++
schema_version = 1
id = "REQ-0001"
title = "Reject invalid login passwords"
kind = "functional"
status = "accepted"
priority = "must"
tags = ["auth", "login"]
source = "manual"
created = "2026-06-16"
updated = "2026-06-16"
[[criteria]]
id = "AC-0001"
statement = "Login is rejected when an invalid password is submitted."
verification = "behavior"
status = "accepted"
tags = ["auth"]
+++
# REQ-0001: Reject invalid login passwords
## Intent
The product must reject invalid passwords for registered users.
Quickstart
pip install reqledger
reqledger init
reqledger new "Reject invalid login passwords" \
--kind functional \
--priority must \
--criterion "Login is rejected when an invalid password is submitted."
reqledger validate
reqledger index
reqledger review
reqledger export --format json
Commands
reqledger init [--force] [--json]
reqledger new "Title" [--kind] [--priority] [--tag TAG]... [--criterion STMT]... [--status] [--source] [--json]
reqledger list [--status STATUS] [--tag TAG] [--json]
reqledger show REQ-0001 [--json]
reqledger validate [--json]
reqledger index [--json]
reqledger link REQ-0001 --task ID --arch ID --spec PATH --evidence PATH [--json]
reqledger review [--json]
reqledger export --format json [--output PATH] [--json]
Global options: reqledger --version, reqledger --config PATH <command>.
Validation is fail-closed and returns exit code 1 on validation errors,
2 on usage/config errors, and 0 when all records are valid.
Configuration
ReqLedger looks for config in this order (first wins):
- explicit
--config PATH, reqledger.tomldiscovered upward from the current directory,.reqledger.tomldiscovered upward,- built-in defaults.
When both reqledger.toml and .reqledger.toml exist in the same directory,
reqledger.toml wins. Paths declared in config resolve relative to the config
file's directory; with no config they resolve relative to the current working
directory.
Default config:
schema_version = 1
[paths]
root = "requirements"
records_dir = "requirements/records"
manifest = "requirements/manifest.json"
reports_dir = "requirements/reports"
reports_state_dir = "requirements/reports/reqledger"
[ids]
requirement_prefix = "REQ"
criterion_prefix = "AC"
width = 4
[review]
draft_stale_days = 90
Manifest and export
reqledger index writes a deterministic requirements/manifest.json:
{
"schema_version": 1,
"tool": "reqledger",
"requirements": [
{
"id": "REQ-0001",
"title": "Reject invalid login passwords",
"path": "requirements/records/req-0001.req.md",
"kind": "functional",
"status": "accepted",
"priority": "must",
"tags": ["auth", "login"],
"source": "manual",
"source_refs": [],
"criteria": [
{
"id": "AC-0001",
"statement": "Login is rejected when an invalid password is submitted.",
"verification": "behavior",
"status": "accepted",
"tags": ["auth"]
}
],
"refs": {
"tasks": [],
"architecture": [],
"specs": [],
"evidence": []
}
}
]
}
The manifest is derived state; Markdown records remain the source of truth.
reqledger export --format json emits the same shape for downstream tools.
Design constraints
- Prefer readable files over hidden state.
- Keep deterministic output.
- Keep dependencies minimal (
typer,ledgercore,tomlifor Python < 3.11). - Preserve user-authored Markdown bodies.
- Do not use title matching for identity; IDs are the identity.
- Validation is fail-closed.
- External links are references, not ownership transfers.
- ReqLedger does not parse or generate Gherkin, discover or run tests, or import SpecMason at runtime.
Development
pip install -e ".[dev]"
pytest -q
ReqLedger reuses shared Ledgerwerk primitives from
ledgercore (ID allocation, config
discovery, deterministic JSON, atomic writes) and implements the TOML +++
front matter and requirements domain itself.
License
Apache-2.0.
Metadata
Release files for reqledger 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 | |
|---|---|---|---|
| reqledger-0.1.0.tar.gz | 43.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| reqledger-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.2 kB
Release files / reqledger-0.1.0.tar.gz
| Download URL | reqledger-0.1.0.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26c97dd5af14a13ae3f18be5af63d70dc429a499ea7aae1ed53bdef4c825974d
|
|
BLAKE2b-256 checksum How to use checksums |
ade45106896740d75ca7d2e7cb4618e655a67fc8b425aac33103f7648a548951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / reqledger-0.1.0-py3-none-any.whl
| Download URL | reqledger-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c009e64ae673705792b0c1db676e64cea7853d72afe052e40bd155ace9cdd45
|
|
BLAKE2b-256 checksum How to use checksums |
2d6cf4b0e690535a4d5e48f27764c0d3abe689c1074732b15724a8213644e00f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|