Configuration#
jamb uses a two-level configuration model. Project-wide settings live in pyproject.toml under the [tool.jamb] section, controlling behavior like which documents require test coverage, matrix output format, and CI enforcement options. Per-document settings live in a .jamb.yml file inside each document directory, defining the document’s prefix, parent relationships, and UID formatting. The sections below describe both levels in detail.
Project Configuration (pyproject.toml)#
jamb is configured in pyproject.toml under the [tool.jamb] section:
[tool.jamb]
test_documents = ["SRS"]
fail_uncovered = false
require_all_pass = true
software_version = "1.0.0"
exclude_patterns = []
trace_to_ignore = []
# Matrix output options (format inferred from extension)
test_matrix_output = "test-records.html"
trace_matrix_output = "traceability.html"
trace_from = "UN"
include_ancestors = true
Options Reference#
test_documentsList of document prefixes that represent test specifications. These are the documents checked for test coverage.
Type:
list[str]Default:
[]fail_uncoveredFail the pytest session if any items in
test_documentslack test coverage.Type:
boolDefault:
falserequire_all_passRequire all linked tests to pass (not just exist) for an item to be considered covered.
Type:
boolDefault:
truetest_matrix_outputOutput path for the test records matrix (test-centric view). Can be overridden with
--jamb-test-matrix. Format is inferred from the file extension.Type:
str | nullDefault:
nulltrace_matrix_outputOutput path for the traceability matrix (requirement-centric view). Can be overridden with
--jamb-trace-matrix. Format is inferred from the file extension.Type:
str | nullDefault:
nullexclude_patternsGlob patterns for documents or items to exclude from processing.
Type:
list[str]Default:
[]trace_to_ignoreDocument prefixes to exclude from the “Traces To” column in the traceability matrix.
Type:
list[str]Default:
[]software_versionSoftware version to display in the traceability matrix metadata. If not set, jamb auto-detects the version from
[project].versionin pyproject.toml, or from dynamic version files (hatch-vcs, setuptools_scm). Can be overridden at runtime with--jamb-software-version.Type:
str | nullDefault:
null(auto-detected)trace_fromStarting document prefix for full chain trace matrix. When set, the trace matrix starts from this document and traces down through the hierarchy.
Type:
str | nullDefault:
null(auto-detect root document)include_ancestorsInclude a “Traces To” column showing ancestor UIDs in the trace matrix.
Type:
boolDefault:
false
Example Configurations#
Minimal (most projects):
[tool.jamb]
test_documents = ["SRS"]
Strict CI enforcement:
[tool.jamb]
test_documents = ["SRS", "SYS"]
fail_uncovered = true
require_all_pass = true
trace_matrix_output = "matrix.html"
trace_to_ignore = ["PRJ"]
Dual-matrix output (trace + test records):
[tool.jamb]
test_documents = ["SRS"]
trace_matrix_output = "docs/traceability.html"
test_matrix_output = "docs/test-records.html"
trace_from = "UN"
include_ancestors = true
trace_to_ignore = ["PRJ", "HAZ"]
Document Configuration (.jamb.yml)#
Each document directory contains a .jamb.yml file that configures the document:
settings:
prefix: SRS
parents:
- SYS
digits: 3
sep: ""
All fields are nested under a settings key.
Fields#
prefixThe document identifier used in item UIDs (e.g.,
SRS→SRS001).Required
parentsList of parent document prefixes. Defines where items in this document should link to.
Default:
[](root document)digitsNumber of digits in the sequential part of item UIDs.
Default:
3Range:
1to10Example:
digits: 3→SRS001,digits: 4→SRS0001sepSeparator between prefix and number in UIDs.
Default:
""(no separator)Constraint: Cannot start with an alphanumeric character (would create ambiguous UIDs like
SRSX001)Example:
sep: "-"→SRS-001
Creating Documents#
Documents are created with jamb doc create, which generates the .jamb.yml file:
jamb doc create SRS reqs/srs --parent SYS --digits 3
See Command Reference for all document management commands.