$ fssg build --deterministic --validate |

How to Validate IOSM Artifacts in CI

IOSM

An IOSM cycle should fail before the agent starts explaining why its missing evidence is probably fine.

That is why I treat methodology artifacts as build inputs, not retrospective paperwork. A hypothesis card has required fields. A cycle report has a fixed decision vocabulary. Metric weights have to add up. Local links between the specification, templates, and examples must resolve. These are cheap properties to check, and they should not depend on a model reading the repository correctly.

The canonical IOSM specification includes JSON Schemas, examples, templates, and a reference validator. This article turns that repository structure into a small CI boundary. It is narrower than an AI code review and more mechanical than a full improvement cycle: before asking an agent whether the work was good, prove that the evidence package is structurally capable of answering the question.

The artifact chain

A useful cycle leaves three different kinds of truth:

Artifact Question it must answer What CI can verify
iosm.yaml What rules govern this cycle? schema, ranges, required policy, weight sum
Hypothesis Card What change do we expect, and when do we roll back? required deltas, validation window, rollback triggers
Cycle Report What happened, with what confidence, and what is the decision? gates, metric tiers, deltas, guardrails, decision enum

The distinction matters. A Markdown summary can sound complete while omitting the rollback condition. A JSON report can parse while silently accepting an invented field. A score can look precise while its metric weights total 1.2. Schema validation catches the first layer of these failures before interpretation begins.

It does not prove that a metric is true. It proves that the record has the shape required to discuss truth without improvising the protocol.

If you have not run a cycle yet, start with the first IOSM cycle guide. The IOSM CLI runtime overview explains the broader execution model. Here I assume the repository already contains cycle artifacts and focus only on validating their contract.

Put the schemas next to the evidence

The IOSM v1.0 repository defines Draft 2020-12 schemas for the configuration, Hypothesis Card, and Cycle Report. A team can vendor a pinned copy into its own repository:

.iosm/
├── iosm.yaml
├── hypotheses/
│   └── H-042.yaml
├── cycles/
│   └── cycle-2026-09-11.json
└── schemas/
    ├── iosm.schema.json
    ├── hypothesis-card.schema.json
    └── cycle-report.schema.json

Pinning matters. If CI downloads main on every run, the validation contract can change independently of the code under review. Use a release, commit SHA, or reviewed vendor update. The current IOSM specification and examples are MIT-licensed, but a pinned source still gives the build a reproducible identity.

The Hypothesis Card schema is intentionally strict: additionalProperties is false, confidence stays between zero and one, the validation method and window are required, and at least one expected positive and allowed negative metric delta must exist. The Cycle Report goes further. It requires all four gate results, all six canonical metrics, evidence tiers, confidence values, guardrail state, learning artifacts, and one of three decisions: CONTINUE, STOP, or FAIL.

That strictness removes a dangerous escape hatch: adding an ad hoc field such as mostly_passed because the recorded outcome is inconvenient.

A small validator for project artifacts

The specification repository ships a validator for its own canonical examples and internal links. A consuming project can add a smaller entrypoint that validates its actual files against the vendored schemas:

#!/usr/bin/env python3
import json
from pathlib import Path

import yaml
from jsonschema import Draft202012Validator

ROOT = Path(__file__).resolve().parents[1]
PAIRS = [
    (".iosm/schemas/iosm.schema.json", ".iosm/iosm.yaml", "yaml"),
    (".iosm/schemas/hypothesis-card.schema.json", ".iosm/hypotheses/H-042.yaml", "yaml"),
    (".iosm/schemas/cycle-report.schema.json", ".iosm/cycles/cycle-2026-09-11.json", "json"),
]

failed = False
for schema_name, artifact_name, kind in PAIRS:
    schema = json.loads((ROOT / schema_name).read_text())
    artifact_path = ROOT / artifact_name
    raw = artifact_path.read_text()
    artifact = yaml.safe_load(raw) if kind == "yaml" else json.loads(raw)

    Draft202012Validator.check_schema(schema)
    errors = sorted(
        Draft202012Validator(schema).iter_errors(artifact),
        key=lambda error: list(error.absolute_path),
    )
    for error in errors:
        location = ".".join(map(str, error.absolute_path)) or "<root>"
        print(f"{artifact_name}:{location}: {error.message}")
        failed = True

raise SystemExit(1 if failed else 0)

In a real repository, discover all hypothesis cards and cycle reports rather than naming one file. The explicit list keeps the mechanism visible: schema identity, artifact identity, parser, and deterministic exit status.

I prefer collecting every validation error instead of stopping at the first one. A CI run should give the author a repair list, not force one red-green round trip per missing field.

Make the CI gate boring

The workflow needs no model credentials and no write permission:

name: iosm-artifacts

on:
  pull_request:
    paths:
      - '.iosm/**'
      - 'scripts/validate_iosm_artifacts.py'

permissions:
  contents: read

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - run: pip install 'jsonschema>=4.23,<5' 'PyYAML>=6,<7'
      - run: python scripts/validate_iosm_artifacts.py

A production workflow should pin actions to immutable commit SHAs and install dependencies from a locked or hashed requirements file. Those supply-chain choices belong to the project, not to the methodology.

This gate is different from the read-only IOSM review job. The review job asks a probabilistic system to inspect code and preserve its findings as an advisory artifact. This job checks a deterministic grammar and may safely block the merge. One widens attention; the other enforces a known invariant.

Add semantic checks after schema checks

JSON Schema validates local structure. Some rules span files and need a second deterministic pass:

  1. every goal_id in a Hypothesis Card must exist in the current cycle;
  2. every hypothesis ID in the Cycle Report must resolve to exactly one card;
  3. the report's metric weights must match the pinned iosm.yaml;
  4. a waived gate must reference an open, unexpired waiver;
  5. CONTINUE must be rejected when a blocking guardrail failed;
  6. every learning artifact path must exist at the recorded revision.

These checks are project policy expressed as code. They are where IOSM stops being a folder of templates and becomes an executable method.

Do not ask an agent to infer these joins on every run. An agent can propose a new rule when it finds a recurring inconsistency. Once the rule is understood, move it into the validator and test it with one passing and one failing fixture. That is a concrete IOSM move: discovered knowledge becomes a stable module.

Know what passed

A green artifact job proves only a bounded claim:

  • the files parsed;
  • each document matched its pinned schema;
  • the implemented cross-file invariants held.

It does not prove that the baseline was measured correctly, that confidence is calibrated, that the selected metric represents user value, or that the code change caused the reported delta. Those require tests, raw measurements, provenance, and review.

This boundary is a feature. I do not want one oversized “AI quality” check that mixes syntax, evidence, interpretation, and authority. I want the cheap facts settled first. Then the expensive judgment has fewer places to hide.

An IOSM cycle becomes auditable when its artifacts can be rejected for precise reasons. Missing rollback trigger. Unknown hypothesis ID. Invalid gate decision. Expired waiver. Those failures are less impressive than an agent-written report—and far more useful.

Sources

FACET AI CLI Terminal
facet@ai:~$