Repository navigation
Releases
v0.7.1
OKF CLI and plugin 0.7.1
- Review a small edit with
okf edit --dry-run. The preview shows changed lines with surrounding context. - Pass quoted Markdown bullets as either operand of
okf edit --replace, for example--replace "- chop" "- dice". - Human-readable output for unversioned saved queries explains partial results, including pagination and unresolved endpoints.
- When a registered primary directory is missing,
okf bundle contextnames its bundle ID and emits scope details in JSON. The command still exits 3.
v0.7.0
OKF 0.7.0
BREAKING CHANGE — Upgrade shared-bundle readers before adopting manifest v2. The
0.7 plugin requires a stable CLI in the range >=0.7.0, <0.8.0. Scripts that distinguish
usage errors from lock contention must handle exit 3 for a blocked working-tree read.
See the 0.7 migration guide.
Context compilation
People and agents using the OKF plugin can now ask for the evidence a particular decision
needs. In the meter-replacement example, the technician needs the Recovery instructions
and the Applicability section that says when they apply. The task declares those readings.
OKF can follow the declarations, return the relevant passages with their sources, and report
whether the handoff meets the team’s requirements.
Choose how to find the material
| When | What to use | What comes back |
|---|---|---|
| You know the concepts, headings, or metadata fields you need. | An exact batch with okf read --from @reads.yaml. Give each request a key and mark optional readings explicitly. |
An outcome for each key. Two requests for the same passage can share its text and retain their separate purposes. |
| The readings depend on the task and its relationships. | A version 2 saved query with okf query. Its author defines which relationships to follow, which passages to select, and which requirements to check. |
Selected evidence and the outcome of each requirement. The same rule can prepare a handoff for a different task without hard-coding that task’s reading list. |
Exact batches work with standalone bundles and manifest v1 or v2. Versioned saved queries
require manifest v2. Unversioned queries retain their existing behavior in either supported
manifest version. The OKF document format remains v0.2.
See what the evidence supports
In the worked example, rerunning the query after the review expires still retrieves the
instructions. The result reports acquisition: complete, but current-review-evidence
fails and the command exits 1. The agent can identify the material that needs review before
the technician relies on it. Freshness and verification are checked when the query author
declares those requirements.
A required heading that was examined and found missing produces a failed obligation.
An unavailable source can leave the obligation unknown. A missing optional reading remains
visible alongside the usable passages. These distinctions let the recipient decide which
step to pause and what to investigate. Coverage applies to the declared relationships and
the bundles actually examined.
Render the handoff for a person or an agent
A version 2 query can return a Markdown report directly with okf query … --format md.
To render the same acquisition later, retain its complete --json stream. Both exact reads and
version 2 query streams work with okf render --from @result.ndjson: choose --format md
for a human-readable report or --format agent for an agent handoff. Both preserve the captured
passages, original evaluation time, and failed or unknown requirements without rereading sources.
See the rendering example.
Supply current task guidance separately. Follow the worked handoff
or inspect its exact-read request.
Validate references to specific headings
A file can still exist after someone renames its Recovery heading. An ordinary file check
can therefore succeed while a task’s link to operations.md#recovery has lost its target.
OKF 0.7 adds an opt-in heading-reference rule to okf lint for this case.
In a v2 manifest, set settings.lint.heading_reference to warn or error (default: off).
Lint reports missing or ambiguous headings and invalid or unsupported selectors. It reports
unavailable or out-of-scope targets as unchecked, so readers can distinguish a broken
reference from one the run could not examine.
Before renaming a heading, use okf affected with --changed and --heading-consumers
to find concept references and saved-query selections that depend on sections in that concept.
For queries that start from a concept, supply known IDs with --consumer-start and inspect
any reported gaps. See section selectors
and the heading lint migration instructions.
Build Rust utilities with OKF Core
Until 0.7, the OKF CLI was the only consumer of okf-core. This release gives engineers
a typed Rust API for embedding the context compiler in their own tools. For example, a review
bot can evaluate a team’s saved query, flag a missing or expired reading in its UI, and attach
the supporting passages to the review. The bot calls the library directly and receives Rust
values it can inspect without launching the CLI or parsing its NDJSON output.
| In your utility | Use the API |
|---|---|
| Choose what to read | Open a ReadSession with the bundle selection and examination scope. Set revisions, evaluation time, or resource limits when the task calls for them. |
| Acquire the evidence | Pass a QueryRequest to session.evaluate: use exact for known passages, named for a bundle’s v2 query, or inline for a definition supplied by your application. |
| Decide what to do | Inspect the owned QueryResult. Use outcome().satisfaction() and requirements() to decide whether to proceed, and passages() to show the evidence. Evaluation can succeed while a requirement fails. |
| Deliver or reuse the result | Call render_query for agent text, Markdown, or HTML. Choose full or summary output and optionally map rendered byte ranges back to evidence. Encode a result for storage, decode it with validation, or compare a later evaluation against its baseline. |
Start with the tested Rust example, which opens a
standalone bundle, requests a heading, and inspects both its acquisition status and text.
The evidence API covers retained results and
baselines. For manifest inspection and typed error handling, see the
0.7 API migration notes.
Working-tree read contention
changeset digest now uses shared read locks across its requested bundle scope. It can run
alongside other readers and returns the same guarded baseline value as changeset plan for
the same inputs.
When an exclusive lock blocks changeset digest or an ordinary working-tree read, the command
exits 3. Scripts that handled the previous usage exit 2 or the scoped digest's incomplete-gate
exit 1 should use the lock-busy reason and retryable: true in the NDJSON completion record.
A pending transaction journal still requires changeset recover. Permission errors and invalid
lock paths carry their own diagnostics.
v0.6.12
OKF CLI and plugin 0.6.12
Load the rules and workflow instructions needed for a task with okf bundle context --format agent.
The output includes delivered instructions, summaries of available rules and workflows, declared
resources and outputs, effective inputs, and any missing required inputs.
Read workflow context
For a workflow named log-harvest in a garden bundle, run:
okf bundle context garden --operation edit --workflow log-harvest --format agentCheck the process exit and final Context: complete line before acting. A workflow can still
list missing inputs after successful guidance delivery. Use JSON to inspect input types and
allowed enum values. For a planned mutation, add --token to the context request and pass the
receipt to the covered command. Check an existing receipt in a separate invocation.
Ordinary human output now shows workflow resource paths and reports common manifest metadata
and expansion commands once per bundle. On the garden feedback fixture, the previous compact
workflow context took 4,918 bytes. Agent output takes 469 bytes, including the 140 instruction
bytes, with either a 6-character or a 160-character bundle directory name.
Declare saved queries per workflow
Add uses_queries: [bed-tasks] to a workflow to surface that saved query during an edit.
Use names defined in the same manifest under settings.saved_queries. An omitted or empty list
declares zero dependencies. Selecting multiple workflows combines their definitions, and an
unknown name fails manifest validation. Agent and compact context show the selected definitions.
An explicit --operation query exposes all saved queries and requests query coverage in a receipt.
Running a saved query still takes a separate command.
Reuse an instruction file
Global guidance, rules, and workflows can share an instructions_file. The first record that
delivers the file carries the body. Later records identify that owner and retain their own role,
inputs, outputs, and resources. Delivery and mandatory byte totals count the shared body once
per bundle when applicable. A changed instruction file still invalidates a receipt.
Upgrade CLI, skills, and JSON consumers
Install CLI 0.6.12 before adding workflows.<id>.uses_queries to a shared manifest. Upgrade every
reader of that bundle. CLI 0.6.11 recognizes saved queries but rejects the new workflow field.
The plugin retains its general stable CLI range of >=0.6.8, <0.7.0. For compatible older
manifests, agents can use JSON when agent format is unavailable. OKF documents remain v0.2.
Update consumers of bundle context --json to accept content: "shared" on guidance and
workflow records. Resolve instructions_ref by kind and ID against an earlier full record in
the same bundle and invocation. Use the referring record's instruction role to determine how
the body applies. The bundle customization guide
shows shared instructions and declared deliverables. The saved-query guide
walks through workflow-specific discovery.
v0.6.11
OKF CLI and plugin 0.6.11
Save a recurring chain of relationship reads in a bundle manifest, then run it by name with
okf query. Both query and show can now return a Markdown subsection by its heading path.
Save and run a query
Define a query under settings.saved_queries in the primary bundle. Start from a concept ID
or a named list/search preset. Each hop can follow outgoing links or incoming backlinks,
filter typed relationship occurrences and their attributes, and narrow the concepts it reaches.
CLI filters, sorting, and pagination apply to the final distinct endpoints. Select properties
with --project, or request bodies, outlines, or sections.
A saved query can span registered bundles. For example, given the product manifest in the
multi-bundle guide:
okf query referenced-policies notes/overview --bundle-id demo.product --scope-bundle demo.policy --jsonThe product bundle supplies the definition and starting concept. The policy bundle supplies
the target. Results preserve bundle, concept ID, and version. An authored reference alone
does not expand examination scope.
Read one section
Pass a JSON array of heading titles from outermost to innermost. The result includes the
matched heading and its descendants up to the next sibling or higher-level heading.
okf show notes/triage product --section '["Operations","Recovery"]'A saved query continues past missing or ambiguous headings in individual concepts and reports
the affected delivery. JSON includes a section record with line bounds for each successful read.
Performance and completeness
A local working-tree query starting at a known concept can follow an outgoing-only chain on
demand. Parsed documents and missing IDs are reused within the invocation. Preset starts,
incoming hops, explicit scope, and historical reads use the scoped executor. On a warm-cache
5,000-document fixture, a two-hop saved query took 6.1 ms median versus 89.9 ms with the
scoped implementation before optimization. These are local release-build measurements.
Inspect the saved-query-summary strategy, stage counts, unresolved endpoints, and examination,
matching, and delivery evidence. A complete outbound read can leave unrelated documents
unexamined. Use bundle validation to assess the health of the entire bundle.
Guides and skills
The saved-query guide
includes an ontology, sample concepts, mixed-direction chains, and expected results. Task guides
now separate example files from individual commands and their outputs. Updated skill guidance
covers choosing a saved query, selecting cross-bundle scope, and interpreting partial results.
The feedback skill and standalone draft template now prompt authors to review a fictional
scenario from the perspective of a maintainer who has never seen the session.
Upgrade
Install the 0.6.11 CLI before using query or show --section. Existing bundles need no
migration, and existing query presets retain their single-operation filter semantics. Upgrade
all readers of a shared manifest before introducing settings.saved_queries: older CLIs can
reject the unknown setting even when running another command. The plugin retains its general
stable CLI range of >=0.6.8, <0.7.0. On older compatible CLIs, use individual links/backlinks
and outline/line reads. The OKF document specification remains v0.2.
v0.6.10
OKF CLI and plugin 0.6.10
Set OKF_FEEDBACK_DIR to an absolute UTF-8 directory path to select where OKF stores private feedback drafts, collection consent, and counts. OKF uses that exact directory on every platform. Run okf learn status to see the selected directory. On Unix, an existing feedback directory must be private to its owner.
Leaving the variable unset keeps the platform default. Selecting another directory does not migrate existing feedback. Each directory has its own collection setting. No bundle or catalog migration is required.
v0.6.9
OKF CLI and plugin 0.6.9
Use the feedback skill or okf learn draft feature-request to capture a defect, feature
request, guidance gap, or workflow lesson. Drafting works with collection disabled and after
successful commands. The skill ships a Markdown template and four fictional examples. It asks
authors to describe the goal, workaround, and desired outcome using invented data.
Local collection and reporting
Counting is off by default. To opt in, run okf learn enable in a terminal and confirm.
The CLI counts qualifying outcomes from lint, validate, move, changeset apply, and ontology apply.
The report ranks affected invocations with a denominator per CLI version and command family.
The collector stores fixed identifiers and integer counts. Error messages, bundle paths, record
names, and authoring content stay out of the observer. Busy or unavailable stores can skip a sample.
Run okf learn status to see the per-user storage directory. Disable stops counting and keeps
the current data. Purge removes managed counts and drafts. User-exported copies remain at the
chosen destination.
Drafts and export
Review and edit the private Markdown draft. Keep real product names, identifiers, and project
data out of the text. An export preview shows the complete draft, destination, and confirmation
digest. A confirmed export creates a new local file. Changes to the text or destination require
a fresh preview. This release has no network submission command.
Compatibility and installation
Install CLI 0.6.9 for the learn commands. The plugin accepts stable CLI versions from 0.6.8
through the 0.6 series. On 0.6.8 the skill can prepare a draft from its bundled template.
Existing bundles, catalogs, and ontologies require no migration. The document specification
remains v0.2. Release archives cover Linux and macOS on x86-64 and ARM64.
Read the capability design
and the feedback skill and examples.
v0.6.8
OKF CLI and plugin 0.6.8
Install the CLI and plugin together. This plugin requires a stable CLI from 0.6.8 up to, but excluding, 0.7.0. The OKF document format remains v0.2.
Use --no-align on list, search, or backlinks for compact human tables. Columns, views, and projections can select $trust_tier and $effective_status. Unknown ontology field types report the canonical names and suggest common spellings.
Each skill now links to task-specific command examples and individual JSON record shapes. Machine consumers can discover the output modes of show, filtered relationship queries, drift summaries, and dangling-reference overrides in changeset previews. The schema command advertises both its header and its command records. Relationship pagination arguments are described as integers.
The verification workflow distinguishes typed bundle-root sources from document-relative references. The operational-bundle walkthrough refreshes its mutation context after editing the ontology.
v0.6.7
OKF CLI and plugin 0.6.7
Install the CLI and plugin together. The plugin supports stable CLI versions
>=0.6.7, <0.7.0. Bundles retain the OKF v0.2 document format. Existing CI jobs
using warning-level lint gates should review the lifecycle diagnostic below.
Concept size and CI settings
Three opt-in concept size rules check body lines,
frontmatter lines, and line length. CI can use OKF_SETTINGS_OVERRIDES to select a
partial lint settings file.
For example, promote a bundle warning to an error while inheriting its line limit.
Ontology authoring
Lint now reports conflicting top-level ontology status declarations, including in empty bundles.
Existing ontologies remain readable. Ontology edits and previews report the advisory without
changing write-gate decisions. CI using --fail-on warn, or using the default failure threshold
with ontology_violation: error, can fail on a previously passing bundle. Use a compatible
lifecycle enum or move domain workflow states to a custom field. See the
lint reference.
CI lint baselines
Lint can compare findings against
a saved JSON baseline or a local workspace Git revision. CI can fail only on introduced or
worsened findings at its chosen severity. Use --write-baseline to explicitly accept the
current findings after review.
File and Git comparisons classify occurrences by stable finding identity and severity.
Use the same examination scope on both sides. Git comparison takes an exact local revision;
for a feature branch, pass its merge base with the target branch. An unavailable historical
dependency or an exhausted finding budget makes the comparison incomplete.
YAML dependency
The workspace now uses yaml_serde 0.10.7 in place of the deprecated serde_yaml crate.
The published binaries continue to use YAML for bundle manifests, ontologies, and frontmatter.
v0.6.6
OKF CLI and plugin 0.6.6
OKF 0.6.6 adds recovery-safe current bundle selection and completes logical-reference
preflight support for scoped ontology-gated changesets. Selection can be retained across
calls without loading bundle content, including when a pending transaction prevents
ordinary reads and guidance delivery.
Upgrade and compatibility
Install CLI and plugin 0.6.6 together. The plugin requires stable CLI versions
>=0.6.6, <0.7.0; older binaries do not support selection receipts. The workspace and both
plugin manifests are 0.6.6. The OKF document format remains v0.2; manifest v1, catalog v2,
and lock v1 are unchanged. Existing path and catalog selectors remain supported.
Review the 0.6.5 notes for scoped changeset baseline and gate semantics, and the
0.6 migration guide when upgrading older
configuration or automation. No dependency acquisition, lock acceptance, or content migration
is triggered by selection.
Resolve selection before reading content
okf bundle select knowledge --json
# Save the bundle-selection record's token string verbatim to selection.json.
okf show concepts/selection-and-scope --selection @selection.json --json
okf changeset recover --selection @selection.json --jsonbundle select emits a bundle-selection record with canonical root, identity, source
kind, effective access, and a versioned token. It resolves metadata without bundle
contents, guidance loading, or publication read guards. A pending transaction therefore
does not prevent selection. Check actual exit status and the complete operation stream
before using its receipt.
Global --selection TOKEN|@file reuses that current selection on supported bundle commands.
Explicit selectors must agree; historical revision selectors cannot be combined with it.
init and bundle select do not consume selection tokens. A token retains its original
catalog/access context instead of reselecting from a later working directory.
The receipt checks selection/configuration/catalog/override/lock dependencies, root identity,
and effective access. Native writers revalidate it while holding the writer guard. A managed
Git override remains read-only through its consumer catalog; an independently selected owner
checkout has its own access context. A selection receipt is a freshness assertion, not
authorization, guidance-delivery evidence, or a bundle-content snapshot. External filesystem
and catalog writers do not participate in bundle locking; these checks cannot eliminate all
races with them.
Recover before loading normal context
Recovery skips guidance and rejects --context and explicit --guidance full|summary;
--guidance off remains accepted. Context tokens depend on ordinary bundle reads and cannot
bootstrap recovery. Resolve selection, recover the pending transaction, then reload applicable
context before content work. Direct path-based recovery remains supported.
Recovery retains guarded rollback/committed-cleanup behavior and refuses intervening-edit
conflicts. Preserve a conflicted journal. No pending transaction does not prove an earlier
write never committed; reconcile the expected post-state before retrying an append.
Logical changeset preflight
The 0.6.5 scoped ontology gate understood okf:// typed targets, but CLI changeset preflight
could still reject a valid logical reference before the gate ran. Version 0.6.6 corrects this
end-to-end path: explicit read scope resolves logical concept and artifact targets for
preflight, while ontology checks still enforce registered bundle identity and target type.
Use the same --scope-bundle ID or --catalog-scope for plan, digest, and apply. Registration
alone does not authorize examination; missing, unavailable, or out-of-scope dependencies
remain failures. Cross-bundle scope adds read dependencies and never authorizes target writes.
The existing guarded baseline and single-bundle journaled publication contract remains.
Distribution
Release assets use the established macOS/Linux ARM64 and x86_64 workflow, SHA256SUMS, and
standalone installer. Official binaries include url-sources; macOS signing/notarization
follows the existing release process. Preparing this checkout does not publish release assets.
v0.6.5
OKF CLI and plugin 0.6.5
OKF 0.6.5 adds explicit cross-bundle examination to ontology-gated changesets. A Planning
Increment can now reference a Product Specification in a registered sibling bundle, have its
actual type checked, and publish through the guarded changeset mechanism. The additional
bundles are read dependencies; all changes still belong to one selected bundle.
Upgrade and compatibility
- Install CLI and plugin 0.6.5 together. The plugin now requires a stable CLI version
>=0.6.5, <0.7.0, because its generated references describe the new scoped changeset
options and evidence. The preflight rejects older CLIs instead of advertising unsupported
commands. The workspace and both plugin manifests are 0.6.5. - The OKF document format remains v0.2. Manifest v1, catalog v2, and lock v1 are unchanged.
Existing unscoped changeset invocations and successful unscoped JSON payloads retain their
interface. The scope options and optional JSON scope evidence are additive. - Gate correctness tightening: an ontology-checked
okf://reference without explicit
examination scope now fails withwrite-gate-incomplete. Previously, the gate could treat
it as an external URL and skip the typed check. Add explicit scope and preview again;
do not disable a required gate to preserve the old unchecked behavior. - Upgrades from earlier 0.6 releases should also review their intervening release notes.
The 0.6 migration guide describes the existing
configuration and automation migration from older minor versions.
Scoped ontology-gated changesets
changeset plan, changeset apply, and changeset digest accept repeatable
--scope-bundle ID or deliberate --catalog-scope. The selected bundle and each requested
target must be registered and available for examination. Catalog registration alone does
not broaden the gate's scope. changeset recover remains unscoped.
For a catalog registering planning.main and product.main, an ontology reference rule can
use target: product.main:Specification, while an Increment's field contains
../product/spec.md or okf://product.main/spec.md. Preview and apply with the same read scope:
okf changeset plan --bundle-id planning.main --from @plan.yaml \
--require-ontology-gate --scope-bundle product.main --json
# Substitute the base_digest from the reviewed plan.
okf changeset apply --bundle-id planning.main --from @plan.yaml \
--require-ontology-gate --scope-bundle product.main --expect REVIEWED_BASE_DIGESTTo obtain a baseline independently, use the same scope:
okf changeset digest --bundle-id planning.main --scope-bundle product.main --jsonThe feature also applies when bundle policy enables the gate without
--require-ontology-gate. Neither scope option authorizes operations in the target bundle.
Target interpretation and failures
product.main:Specificationmeans the registered owner must beproduct.mainand the
target concept must have typeSpecificationor a subtype established by that target
bundle's ontology. The bundle root is not a typed concept.- Unqualified target types also use the actual target bundle's ontology for inheritance.
An exact type match does not require a target ontology; checking a possible subtype does.
Thebundle-id:Typeform is reserved for qualification in scoped gate matching. Unscoped
matching retains literal type-string behavior. - The scoped check handles ordinary relative paths, logical OKF references, reference target
unions, and relationship-kind target narrowing. It retains the policy that unchanged
violations may remain, while new or worsened findings reject publication. - An unexamined or unavailable target bundle produces
write-gate-incomplete. A missing
concept in an examined bundle, an incorrect bundle identity, or an incompatible target
type is an ontology finding. Existing changeset dangling-reference validation may reject a
missing concept before the ontology gate runs. - Artifact paths cannot alias a different Markdown concept for type checking. Logical
references remove only their final.mdsuffix, preserving concept names that themselves
end in.md.
Baseline, publication, and JSON evidence
The scoped baseline binds the primary bundle, whole examined target-bundle file snapshots,
effective settings and ontology identity/content digests, catalog bytes and resolved
registrations, workspace configuration, and requested scope. A change to an unrelated file
in an examined target bundle can therefore invalidate a reviewed digest. Use the same scope
for plan, digest, and apply; obtain and review a new plan after a conflict.
Apply checks the baseline again and holds target-bundle reader guards through the selected
bundle's journaled publication. Cooperating OKF target writers cannot publish while those
guards are held. A changed or unavailable scoped dependency when applying a retained plan
produces baseline-conflict. A fresh command unable to examine the requested scope can fail
with write-gate-incomplete before it obtains a comparable baseline.
Successful scoped baseline and changeset-summary JSON records include optional
scope evidence with requested, examined, and unavailable arrays. Identities come from
the guarded capture and include the primary bundle. Successful examination requires every
requested bundle, so unavailable is empty. Unscoped records omit this optional object.
okf schema --json and the generated command and skill references describe the new fields.
Catalog mappings are recaptured and checked before publication, but catalog edits and
arbitrary filesystem editors are outside the bundle-lock protocol. The operation does not
provide an atomic snapshot of all catalog/filesystem activity or a multi-bundle write
transaction. Existing journaled, per-file publication guarantees remain in effect. Scoped
concept changesets do not extend ontology sidecar updates' reference examination scope.
Validation and distribution
Regression coverage includes successful gated plan/apply, policy-enabled gates, explicit and
catalog-wide scope, target identity/type/inheritance checks, unavailable and missing targets,
relationship narrowing, baseline conflicts, target writer exclusion, single-bundle write
ownership, JSON evidence, and the path/logical-reference gate corrections.
Release assets are built by the release workflow for macOS and Linux on ARM64 and x86_64,
with SHA256SUMS and the standalone installer. Official binaries include url-sources.
macOS artifacts follow the established signing and notarization workflow. Local release
preparation alone does not publish these assets.