Requirements Evidence Input Model
SpecFact can store normalized requirement input records for validation evidence. These records point back to upstream sources such as issues, documents, OpenSpec changes, Spec Kit artifacts, or local files. SpecFact does not become the requirement authoring system or product-management source of truth.
Model Surface
Use RequirementInput when an adapter or validation step needs a compact
requirement record:
requirement_id: stable requirement identifierschema_version: requirement input schema versiontitle: short requirement titlesources: one or more upstream source referencesbusiness_rules: optional Given/When/Then rules imported from the sourceconstraints: optional performance, security, integration, compliance, UX, or operational constraintsevidence_links: optional architecture, spec, code, test, validation, or requirement evidence targetscompleteness_findings: advisory profile-aware findings
ProjectBundle Extension
Requirement inputs are carried through the existing ProjectBundle.extensions
field under requirements.inputs. This keeps bundles backward compatible:
from specfact_cli.models.requirements import (
RequirementInput,
RequirementSourceReference,
requirements_input_extension_payload,
)
requirement = RequirementInput(
requirement_id="REQ-123",
schema_version="1",
title="Checkout preserves selected currency",
sources=[
RequirementSourceReference(
source_type="issue",
locator="https://github.com/example/repo/issues/123",
)
],
)
bundle.set_extension(
"requirements",
"inputs",
requirements_input_extension_payload([requirement]),
)
Compatibility Notes
- Missing
schema_versionis invalid for a requirement input record. - At least one source reference is required so evidence can explain where the requirement came from.
- Profile completeness findings are advisory evidence. They can affect validation severity without blocking model construction by themselves.
- No requirement authoring commands or backlog write-back behavior are provided by this model.
- Import, validation, and coverage helpers for these records live in Requirements Context Adapter.