---
schema_version: 1
id: RAC-KV3P8MSKWE9P
type: roadmap
tags: [okf, interop, enforcement]
---
# RAC v0.15.1 — OKF v0.1 Conformance Check

## Status

Planned

## Context

ADR-048 requires every RAC repository to be a conformant OKF v0.1 bundle, and
ADR-049 makes deterministic, CI-enforced validation RAC's core. Yet conformance
existed only as a side-effect of `rac export --okf`: nothing failed when a corpus
could not produce a conformant bundle. This milestone closes that gap by turning
OKF conformance into a write-time gate in `rac validate`, and records the
schema-foundation posture (rac-core stays the code-defined OKF-superset envelope,
not JSON Schema files) in ADR-052.

Per ADR-052, this is additive and conflict-free: no mandatory frontmatter, no
stored timestamps, no codemod (ADR-010, ADR-025, ADR-045 stand). Untyped
documents are excluded from the check exactly as they are from the bundle.

## Outcomes

- `rac validate <dir>` reports OKF v0.1 conformance and fails the run when the
  corpus is not conformant, with a file-named, coded, fixable diagnostic.
- The RAC→OKF type mapping and OKF reserved filenames live once in `core/okf.py`,
  shared by the bundle export and the conformance check.
- The directory `validate` JSON gains an additive `okf` section (ADR-007); no
  `schema_version` bump; existing output is otherwise unchanged.

## Initiatives

### Initiative 1 — Shared OKF constants

Lift the RAC→OKF `type` map into `core/okf.py` and add the OKF reserved filename
set (`index.md`, `log.md`). The bundle export imports the map from there; nothing
in its output changes.

### Initiative 2 — Conformance check + validate gate

Add `services/okf_conformance.py` with `check_okf_conformance(directory, entries)`
returning a report of findings: `okf-unmapped-type` (a typed artifact whose type
has no OKF mapping) and `okf-reserved-filename-collision` (a typed artifact at a
reserved filename). Untyped documents are excluded (ADR-010). Fold the result into
directory `validate` — additive JSON `okf` section, a human conformance line, and
the run's exit code.

### Initiative 3 — Coverage and docs

Golden (clean corpus and the real `rac/` corpus pass), adversarial (reserved-name
collision; a type with no OKF mapping), and negative-boundary (untyped documents
and untyped reserved entry points are not flagged) tests, plus a rac-core
envelope assertion over the corpus. Refresh the `validate` goldens for the
additive output and update `docs/okf-profile.md`.

## Constraints

- Additive (ADR-007): optional `okf` section; existing `validate` JSON keys,
  codes, and single-file output are unchanged; no `schema_version` bump.
- ADR-010: `type` stays optional; untyped documents are excluded, never failed.
- ADR-025 / ADR-045: no mandatory frontmatter, no stored timestamps, no codemod.
- ADR-052: rac-core stays the code-defined OKF-superset envelope; no JSON Schema
  files and no new dependency.
- Determinism (ADR-002): same corpus state yields the same findings and exit code,
  offline.

## Non-Goals

- JSON Schema 2020-12 `rac-core` files, `allOf` composition, or custom dialects.
- Mandatory `type`/`title`, frontmatter timestamps, or any corpus migration.
- A new MCP tool, or any change to the four read-only tools.
- Per-type standards enforcement (29148/EARS/MADR/dotprompt) — later releases.

## Implementation Contract

The following are pinned for v0.15.1.

### Behaviour

- `check_okf_conformance` emits `okf-unmapped-type` and
  `okf-reserved-filename-collision`, file-named, only for typed artifacts.
- `rac validate <dir>` exits non-zero when conformance fails; the conformant
  corpus stays green. Single-file `rac validate` is unchanged (no corpus, no
  conformance pass).
- Referential integrity stays with `rac relationships --validate`; it is not
  duplicated by the conformance check.

### Interface

- No new CLI command or flag. Directory `validate` JSON gains an additive `okf`
  object; human output gains an `OKF v0.1:` summary clause and per-finding lines.

## Success Measures

- `rac validate rac/` reports `OKF v0.1: conformant.` and exits 0.
- A fixture corpus with a typed `index.md` fails with
  `okf-reserved-filename-collision` and a precise path.
- Re-running validation on an unchanged corpus is byte-identical.

## Risks

- Folding conformance into the default `validate` gate could surface a latent
  non-conformance in an adopter's repo. Mitigated: warnings-style framing in
  docs, untyped documents excluded, and the only error conditions are genuine
  bundle-breakers (unmapped type, reserved-name collision).

## Assumptions

- ADR-048 remains the OKF carrier-profile contract and ADR-052 the
  schema-foundation posture.
- The five enumerated artifact types continue to map one-to-one to OKF types.

## Related Decisions

- adr-052
- adr-048
- adr-049
- adr-050

## Related Requirements

- rac-okf-carrier-profile
- rac-cross-artifact-enforcement

## Related Roadmaps

- v0.15.0-okf-frontmatter-superset
- v0.13.6-okf-bundle-export
