Skip to content

Validation

Structural validation is deterministic. Given the same repository content, validation MUST produce the same diagnostics in the same order on every platform. AI is never used to enforce structural invariants.

Every diagnostic carries:

FieldPresenceMeaning
severityalwayserror or warning
codealwaysstable code from the tables below
messagealwayshuman-readable explanation
filealwaysrepository-relative source file (POSIX separators)
artifactwhen availableartifact ID
fieldwhen availablefrontmatter field or relationship
targetwhen applicablereferenced target ID

Diagnostics MUST be available in machine-readable JSON (--format json) and MUST be ordered deterministically (by file, then code, then target).

Warnings are not errors. validation.warnings-as-errors in .product/config.yaml MAY escalate them for a repository; tools MUST NOT escalate unilaterally.

CodeCondition
PRODUCT001Invalid YAML frontmatter or unparseable artifact document
PRODUCT002JSON Schema violation (missing required field, unknown property, invalid value)
PRODUCT003Unknown artifact type
PRODUCT004ID prefix does not match the artifact type
PRODUCT005Duplicate ID
PRODUCT006Reference to an unknown ID
PRODUCT007Relationship targets a disallowed artifact type
PRODUCT008Active artifact references a retired artifact
PRODUCT009Required body section missing or out of order
PRODUCT020Product Change addition whose ID already exists in the baseline
PRODUCT021Product Change modification of an ID that does not exist in the baseline
PRODUCT022Product Change removal of an ID that does not exist in the baseline
PRODUCT023Overlay produces duplicate IDs
PRODUCT024Removal leaves a dangling reference from an active artifact in the overlay
PRODUCT025Concurrent active Product Changes with overlapping modify/remove operations
PRODUCT026Proposed artifact not listed in operations, or operation without its proposed artifact
PRODUCT027Baseline revision incompatible at promotion without explicit resolution
PRODUCT030Delivery slice references a different Product Change than the one containing it
PRODUCT031Partial requirement coverage without a scope field
PRODUCT032Delivery slice dependency cycle
PRODUCT040Handoff generated from (or referencing) a non-approved slice
PRODUCT041Handoff missing required artifacts
PRODUCT042Invalid or unverifiable content digest
PRODUCT043Implemented requirement without a coverage mapping
PRODUCT044Coverage evidence for a completed delivery slice missing or unverifiable at promotion
PRODUCT050Invalid configuration or unknown top-level configuration key
PRODUCT051Managed integration file modified by hand
PRODUCT052Expected managed or generated file missing

PRODUCT050PRODUCT052 are reported by doctor and integration commands; product-model validation does not inspect managed files.

CodeCondition
PRODUCT101Artifact file name not aligned with its ID
PRODUCT102Active use case not present in any journey
PRODUCT103Requirement not reachable from any actor (see Relationships → Reachability); product-wide constraints are reachable by definition
PRODUCT104Deprecated artifact still referenced by an active artifact
PRODUCT105Business rule with no consumers
PRODUCT106Domain term with no usage
PRODUCT107Bounded context with no owned domain language
PRODUCT108Product Change approved with unresolved open questions
PRODUCT109Delivery slice affecting artifacts outside its requirements’ closure
PRODUCT110Handoff context containing artifacts outside the recomputed closure
PRODUCT111Draft artifact whose provenance.confidence is low

PRODUCT101 is mechanically resolvable: an implementation MAY offer a fix operation renaming each file to <id.toLowerCase()>.md. It renames through a temporary name so it also works on case-insensitive filesystems, where a casing-only rename is otherwise a silent no-op. --dry-run reports the plan and exits non-zero when anything would change, which makes it usable as a CI gate: PRODUCT101 is a warning, so it is not otherwise caught unless warnings-as-errors is set.

PRODUCT111 marks recovered knowledge that needs human validation rather than a defect to repair; see Frontmatter reference → Provenance.

CodeMeaning
0Success; warnings allowed (unless warnings-as-errors)
1Validation or conformance errors
2Invalid invocation or configuration
3Unexpected internal failure

Content digests are SHA-256 over the artifact’s UTF-8 bytes with CRLF and CR line endings normalized to LF, rendered as sha256:<lowercase hex>. This normalization is mandatory: digests MUST be identical across operating systems and Git line-ending configurations.

  • Artifact discovery, graph compilation, traversal, impact analysis and diagnostic ordering MUST be deterministic and platform-independent.
  • Generated outputs (product-graph.json, indexes, Mermaid, diagnostics JSON) MUST be byte-identical for identical input content, and product-graph.json MUST carry a versioned schema identifier.