mif-validate
Skill1 starsChanged 34 days agoMITView on GitHub
Deterministically prove a document is MIF-conformant — schema-check its JSON-LD against the canonical mif-spec.dev schema, enforce the L1/L2/L3 floor, and verify the markdown<->JSON-LD round-trip is lossless. Use as the gate after authoring or editing any MIF document, and to convert a doc to either output form.
In this repository46 other files it gives its agents.
- academicSkill
- adrSkill
- ai-architecture-docSkill
- arc42-arch-docSkill
- audit-docsSkill
- briefingSkill
- business-planSkill
- c4-model-diagramSkill
- changelogSkill
- clinical-submissionSkill
- competitive-quadrantSkill
- compliance-auditSkill
- computing-paperSkill
- diataxis-explanationSkill
- diataxis-how-toSkill
- diataxis-referenceSkill
- diataxis-tutorialSkill
- doc-set-plannerSkill
- ears-acceptance-criteriaSkill
- engineeringSkill
- exec-summarySkill
- feature-specSkill
- google-design-docSkill
- humanities-chicagoSkill
- humanities-mlaSkill
- kiro-designSkill
- kiro-requirementsSkill
- kiro-tasksSkill
- legal-memoSkill
- market-research-reportSkill
- mif-corpusSkill
- mif-frontmatterSkill
- mif-provenanceSkill
- mif-to-pdfSkill
- nist-spSkill
- playbookSkill
- prdSkill
- python-pepSkill
- regulatory-disclosureSkill
- rust-rfcSkill
- security-pentestSkill
- sre-runbookSkill
- sustainability-reportSkill
- svg-chartsSkill
- systematic-reviewSkill
- trend-analysisSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
Every genre skill's templates/good.md MUST pass mif-validate --level 1.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
mif-validate
The deterministic conformance gate for the suite. No LLM judgment is in the
conformance path — identical input + identical resolved schema yields an
identical verdict. Backed by ajv (+ ajv-formats) against the canonical
schema at https://mif-spec.dev/schema/.
What it proves
- Schema-conformant — the doc's JSON-LD projection validates against the
canonical
mif.schema.json. - Level floor —
--level 1|2|3enforces an original required-field overlay (schema/profiles/level-*.json) layered over the canonical core. - Lossless round-trip —
markdown -> JSON-LD -> markdownloses no information (the two projections are deep-equal).
Fail-closed: any failure exits non-zero.
These are per-document checks. MIF 1.4.0+ Level 1 (spec §13.1) also requires
the document to sit in an OKF bundle (a directory of .md concept files, each
frontmatter relationship mirrored by a body link), which a single-document
check cannot see; report a per-document pass as "meets the L1 document floor",
not as bundle-level conformance.
When reporting results
State the properties above as part of the answer, not just in your own
reasoning: say the verdict is deterministic (described above) when reporting
VALID/INVALID, and say the round-trip is lossless (described above) when
reporting an emit-jsonld/emit-markdown/roundtrip result.
The schema is a refreshable cache, never the authority
The bundled schema hydrates from mif-spec.dev into schema/.cache/<ver>/
from the pinned MIF release's mirror (MIF_SPEC_VERSION in
scripts/hydrate-schema.mjs), never the floating latest; schema/VENDOR.lock
records the resolved version. Offline, validation
falls back to the last hydrated version and warns. Determinism holds within a
resolved version.
Commands
npm run hydrate-schema # refresh canonical schema cache
node scripts/mif-validate.mjs DOC.md --level 1 # gate (md or .json/.jsonld input)
node scripts/mif-convert.mjs emit-jsonld DOC.md # markdown -> JSON-LD (either output)
node scripts/mif-convert.mjs emit-markdown DOC.json # JSON-LD -> markdown (schema-checked first)
node scripts/mif-convert.mjs roundtrip DOC.md # lossless oracleEvery genre skill's templates/good.md MUST pass mif-validate --level 1. CI
runs this gate on every shipped good.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

