Skip to content

Verification

<TrackedFiles paths="crates/supersigil-verify/src/**/*.rs" />

Verification is what makes Supersigil more than documentation. It is a graph checker that catches broken references, uncovered criteria, missing tests, and stale specs — automatically, on every commit.

supersigil verify builds the full document graph and checks everything: cross-document references, coverage, test mappings, staleness, and cycles. This is the CI command.

These are structural integrity failures detected during parsing and graph construction. They are always fatal and cannot be suppressed, overridden, or draft-gated:

ErrorDescription
broken_refReferenced document or fragment does not exist
duplicate_idTwo or more documents share the same ID, or duplicate component IDs within a document
missing_required_attributeComponent missing a required attribute (e.g., <Criterion> without id)
xml_syntax_errorMalformed XML inside a supersigil-xml fence
dependency_cycleCircular dependency in <Task> chains or <DependsOn> chains

These rules have built-in default severities that can be overridden in supersigil.toml:

RuleDefaultDescription
missing_verification_evidenceerrorCriterion has no verification evidence (no VerifiedBy, no plugin evidence)
missing_test_fileserror<VerifiedBy strategy="file-glob"> paths resolve to no files
invalid_verified_by_placementerror<VerifiedBy> placed outside a <Criterion>
zero_tag_matcheswarning<VerifiedBy strategy="tag"> tag found no matching tests
status_inconsistencywarningTasks doc has completed tasks but stale status, or sibling design/requirements doc not promoted after tasks doc reaches done
stale_tracked_fileswarningTracked files changed since the specified git ref
empty_tracked_globwarning<TrackedFiles> glob matches no files
orphan_test_tagwarningTest file has a supersigil: tag not referenced by any spec
invalid_id_patternwarningDocument ID does not match the configured id_pattern regex
plugin_discovery_failurewarningEcosystem plugin discovery failed
plugin_discovery_warningwarningEcosystem plugin discovery produced a warning
sequential_id_orderwarningSequentially-numbered component IDs appear out of numeric order in the source
sequential_id_gapwarningA numbered component ID sequence has missing entries (e.g. task-1, task-3 with no task-2)
incomplete_decisionwarning<Decision> has no <Rationale> child
orphan_decisionwarning<Decision> has no outward refs and is not referenced
missing_decision_coverageoffDesign document has no <Decision> referencing it
invalid_rationale_placementwarning<Rationale> placed outside a <Decision>
invalid_alternative_placementwarning<Alternative> placed outside a <Decision>
duplicate_rationalewarning<Decision> has more than one <Rationale> child
invalid_alternative_statuswarning<Alternative> status is not rejected, deferred, or superseded
isolated_documentoffDocument has no edges to or from any other document
empty_projectwarningNo documents found matching configured paths

Rules produce findings at four severity levels:

LevelMeaningEffect
errorFails verificationNon-zero exit code (1)
warningReported but does not failExit code 2 when warnings are the worst severity
infoInformationalNo effect on exit code
offSuppressed entirelyFinding not emitted

Override rule severity in supersigil.toml under the [verify.rules] section:

supersigil.toml
[verify.rules]
missing_verification_evidence = "warning" # default: error
isolated_document = "warning" # default: off
zero_tag_matches = "error" # default: warning

You can also set a global strictness level that applies to all rules not explicitly overridden:

supersigil.toml
[verify]
strictness = "error" # Promotes all warnings to errors

When multiple settings apply, this 4-level precedence chain resolves the effective severity:

  1. Draft gating (highest) — status: draft suppresses configurable rules to info
  2. Per-rule override — Explicit rule setting in [verify.rules]
  3. Global strictness — The [verify] strictness setting
  4. Built-in default (lowest) — The hardcoded default for each rule

Documents with status: draft get relaxed verification. All configurable rules are suppressed to info level — they are still computed but they do not fail the build.

---
supersigil:
id: payments/req/refunds
type: requirements
status: draft
---

When you change status from draft to any other value, the full rule set applies. This allows iterative authoring without CI friction.

A criterion is covered when the graph can resolve at least one evidence source for it — explicit <VerifiedBy> mappings, ecosystem plugin discovery, or both. All sources are merged before coverage is evaluated. See Evidence Sources for the full details on each source type.

CodeMeaning
0Clean — no errors, no warnings
1Errors found
2Warnings only (no errors)

supersigil verify supports three output formats:

Terminal window
# Colored terminal output (default)
supersigil verify --format terminal
# Machine-readable JSON
supersigil verify --format json
# Markdown table (useful for CI comments)
supersigil verify --format markdown

The JSON format includes the full findings list, summary counts, and optional evidence summary.

When tracked files change, supersigil verify --since <ref> flags the associated specs as stale:

Terminal window
supersigil verify --since main

For a standalone staleness check without full verification, use the affected command:

Terminal window
supersigil affected --since main
auth/req/login (specs/auth/req/login.mdx)
glob: src/auth/**/*.rs
changed: src/auth/handler.rs
1 document affected

Additional flags control the git diff behavior:

FlagEffect
--committed-onlyOnly consider committed changes (ignore staged/unstaged)
--merge-baseUse merge-base for the diff (useful for PR branches)

See the CI Verification guide for complete GitHub Actions examples and practical policy for integrating verification into pull requests.