$ okfctl bundle init mykb
Initialized OKF bundle in mykb
$ okfctl node new concepts/tannin.md --type Reference --title "Tannin" --bundle mykb
Created mykb/concepts/tannin.md
$ okfctl node list --bundle mykb
concepts/tannin.md Reference
$ okfctl index check mykb
OK: index.md is current
$ okfctl validate mykb
OK: bundle conforms to the OKF spec floor
You never ran an index command. node new wrote the note's header, put it in the two index.md files and added a line to log.md. By the time index check and validate ran there was nothing left for them to find.
$ okfctl node new concepts/oak.md --type Reference --title "Oak" --bundle mykb
Created mykb/concepts/oak.md
$ echo 'Oak barrels add tannin to red wine.' >> mykb/concepts/oak.md
$ okfctl lint mykb
missing-xref: concepts/oak.md mentions "Tannin" but does not link to concepts/tannin.md
1 lint finding(s)
$ okfctl lint --strict mykb
missing-xref: concepts/oak.md mentions "Tannin" but does not link to concepts/tannin.md
1 lint finding(s)
okfctl: 1 lint finding(s)
The oak note says "tannin" and never links to the tannin note. One of these is harmless; a few hundred and you've got a folder of notes that don't lead anywhere. Plain lint reports it and exits 0. lint --strict exits 1 on the same report, and CI wants that one.
$ okfctl eval transparency --strict mykb
grade-missing: concepts/oak.md carries no epistemic or authority grade (provenance is invisible)
uncited: concepts/oak.md carries no citations (no sources, no # Citations, no internal reference)
grade-missing: concepts/tannin.md carries no epistemic or authority grade (provenance is invisible)
uncited: concepts/tannin.md carries no citations (no sources, no # Citations, no internal reference)
4 transparency finding(s)
okfctl: 4 transparency finding(s)
The two notes are valid OKF, but nothing in them says where the claims came from. Neither lists a source or links to another note (uncited), and neither has an epistemic or authority key saying how sure the writer was (grade-missing). okfctl can see that a source is listed. Reading the source to see if it backs the claim takes a person, and okfctl eval sample writes that person a worksheet.
$ sed -i.bak 's/^title: Tannin$/title: [Tannin/' mykb/concepts/tannin.md
$ okfctl validate mykb
FAIL concepts/tannin.md: unparseable frontmatter
okfctl: 1 conformance finding(s)
One stray bracket and the header is no longer YAML. The spec's conformance section says a header has to parse. validate names the file and exits 1, and only two kinds of problem make it do that. Style problems go to lint.
$ okfctl bundle info stackoverflow
nodes: 26
reserved: 6
okf_version: 0.3 (declared in index.md)
$ okfctl validate stackoverflow
OK: bundle conforms to the OKF spec floor
$ okfctl analyze stackoverflow | head -3
# OKF Corpus Analysis
26 node(s), 61 internal link(s). Aging threshold: 180d.
$ okfctl lint stackoverflow | tail -1
22 lint finding(s)
This is the Stack Overflow sample bundle from the OKF repository. To try it, clone that repository and run the commands from its bundles/ folder. validate has no complaints. lint finds 22: twenty-one places where a note names another note without linking to it, and one tag spelled two ways.