OKF Validate
Goal
Confirm the bundle is structurally sound (OKF-oriented conventions) and graph-quality healthy for engineering use.
Checks
Conformance (structural)
- Root
index.mdpresent; preferokf_version: "0.2" - Concept files use YAML frontmatter starting with
--- - Required-ish fields:
type,title(warn if missing on non-index files) log.mdpresent (warn if missing)
Graph quality
- Broken Markdown links to missing
.mdtargets (error) - Orphan concepts (info/warn)
- Unverified high-impact nodes (
x-impact: highfrom the owning plugin’s schema,verified: false) (warn). Isolated, this plugin declares no high-impact types. - Stale nodes past
stale_after(warn)
Process
- Resolve bundle path (argument,
.okf/,sample-okf/, or user path). - Run tools:
okf validate <bundle> # preferred when installed # fallback: python3 "${CLAUDE_PLUGIN_ROOT}/scripts/okf-graph.py" validate <bundle> python3 "${CLAUDE_PLUGIN_ROOT}/scripts/okf-graph.py" orphans <bundle> - Optionally spot-check a sample of high-degree nodes for body quality (not just links).
- Emit a pass/fail summary with issue table.
Output format
# Validation: <bundle>
**Result:** PASS | FAIL (N errors, M warnings)
| Severity | Path | Message |
|----------|------|---------|
| error | ... | ... |
## Graph stats
- Concepts: N
- Orphans: K
- Unverified high-impact: J
Rules
- Deterministic tools first; LLM judgment only for qualitative notes.
- Do not modify files unless the user asks to fix issues (then hand off to
okf-maintain/okf-author). - Exit guidance: FAIL if any broken links or missing root index; otherwise PASS with warnings.
Done when
- Clear PASS/FAIL and actionable issue list