Skip to content

Tier-1 Reader conformance

Tier-1 Readers parse .uw.md files and present their contents read-only. They MUST:

  • Parse all required frontmatter fields and surface them as structured data.
  • Recognize all 21 standard sections defined in UW_FORMAT_SPEC_v1.md §4.
  • Apply the display conventions in UW_PROTOCOL_v1.md Part III to render numbers, percents, ratios, and dates uniformly.
  • Surface validation issues with the remediation copy from BUILTIN_REMEDIATIONS (Part III §3.6).
  • Honor the superseded semantics: when multiple blocks share a section_id, display the most recent non-superseded block as canonical.

Fixtures

FixtureCovers
fixtures/01-minimal-screening.uw.mdSingle-section minimal file at the screening stage
fixtures/02-full-multifamily.uw.mdFull multifamily deal across all 21 standard sections
fixtures/04-scope-only.uw.mdBack-of-napkin scope-stage file with provisional blocks + populated gaps section

Malformed fixtures

Each malformed fixture has a sibling <id>.expected.json declaring the validator / integrity / policy codes the runner expects. Some POL-* fixtures also have an optional <id>.policies.json sibling containing custom EditPolicy[] entries (verifyProvenance is default-passthrough for built-in actor sources, so non-trivial POL-* coverage requires fixture-bound policies).

FixtureExpected codeSurface
malformed/01-missing-section-metaMETA_MISSING_REQUIRED_FIELDValidator
malformed/02-low-confidence-no-reviewMETA_LOW_CONFIDENCE_NO_REVIEW_FLAGValidator (info)
malformed/03-sources-uses-mismatchCC-04Validator (cross-section)
malformed/04-broken-chainINT-01verifyChain (parent_hash mismatch)
malformed/06-wrong-actorPOL-01verifyProvenance + custom policy
malformed/07-replace-where-supersede-requiredPOL-02verifyProvenance
malformed/08-provisional-without-gapDQ-01Validator (data quality)
malformed/09-partial-without-overridesDQ-03Validator (data quality)

Expected outputs

For each fixture <id>.uw.md, the corresponding expected/ directory contains:

  • <id>.parsed.json — the result of cli parse --json (the canonical JSON shape of ParsedUWFile).
  • <id>.rendered-summary.md — output of cli render --format summary.
  • <id>.rendered-chat.txt — output of cli render --format chat.

A conforming Tier-1 Reader does not need to match the rendered-* outputs byte-for-byte (different presentations are encouraged), but its parse output MUST canonicalize to the same <id>.parsed.json.

Running

bash
node scripts/run-conformance.mjs --tier=1

The reference runner compares a canonical projection of the parse output ({ frontmatter, sections, pipelineLog, customCalculations, customScenarios, extensions }) after stripping volatile fields (last_modified, _meta.timestamp).

Released under the MIT License.