Repository navigation
Release v0.9.0: OKF v0.3 Conformance, Write Protection, Change History & Git Freshness
Release v0.9.0 upgrades okf-agent-memory to full Open Knowledge Format (OKF) v0.3 conformance (while preserving v0.2 compatibility fallbacks), adds Programmatic Write Protection (x-okf-memory-protected: true and governance: hold downgrade protection), introduces Time-Range Change Queries (okf changes --since / MCP okf_changes) with optional change_note logging, closes the stale_after write lifecycle gap across CLI & MCP, and surfaces Computed Trust Tiers & Optional Git Freshness / Code-Drift Signals (--with-git-freshness, --drift-git). Because OKF v0.3 trust-tier semantics and file-relative path resolution for v0.3 bundles are breaking conformance changes, this is a minor release (v0.9.0).
1. Breaking Changes & Migration
- OKF v0.3 Trust-Tier Semantics (
verified.at >= generated.at).- Only current verifications (
verified.at >= generated.at, or all ifgenerated.atis absent) now qualify for active trust tiers (human-reviewed/machine-confirmed) and Scorecard Pillar 2 (Human Stewardship, 100 points). - Older verifications (
verified.at < generated.at) remain in the file as audit history and no longer emit aGateFindinginokf validate --strict. - Impact: Existing bundles where an agent edited a concept after a human review will drop in trust tier and Scorecard Pillar 2 until re-verified by a human actor.
team:is now accepted as a valid actor scheme (IsValidActor) and yieldsmachine-confirmed, neverhuman-reviewed.
- Only current verifications (
- Unified File-Relative Path & Link Resolution for OKF v0.3 Bundles.
- In bundles declaring
okf_version: "0.3"(or later), both Markdown body links and frontmatter path fields (resource,superseded_by,sources[].resource,computation,executor.resource,attester.resource) resolve identically: RFC 3986 scheme = external URL, leading/= bundle root, otherwise relative to the containing file's directory. - v0.2 Compatibility Fallback: Existing bundles with
okf_version: "0.2"or withoutokf_versioncontinue to work via automatic bundle-root fallback if a file-relative lookup does not match.
- In bundles declaring
2. Features
- Full OKF v0.3 Conformance (
epic-okf-v03).- Root
index.mdMetadata & v0.3 Default: Parsesokf_version,title,description, andlicenseinto first-classBundlemetadata and preserves rootindex.mdfrontmatter verbatim acrossinit,create,update, andsync. New bundles created viaokf initandokf bootstrapnow default tookf_version: "0.3"(v0.2 remains supported for backward compatibility), and this repository's ownknowledge/bundle has been migrated tookf_version: "0.3". - Collision-Free
x-Extensions & Fault-Tolerant Parsing: Preserves unknown keys andx-<producer>-<name>extensions losslessly at root and nested levels (generated,verified,sources,parameters,executor,attester) acrossParse -> Edit -> Serializeroundtrips. Cleanly skips non-OKF.mdfiles withouttype:(README.md,AGENTS.md,CONTRIBUTING.md,SKILL.md), indexes non-Markdown files as linkable bundle assets, and handlesnull/empty/scalar-list inputs gracefully while surfacing validator warnings. - Lifecycle Forwarding (
superseded_by): Parses and serializessuperseded_by, indexes it as a directed graph edge (preventing false orphans), validates target existence and cycle safety, and forwards deprecated stubs cleanly inokf showandokf search.
- Root
- Programmatic Write Protection for Critical Concepts.
- Concepts declaring
x-okf-memory-protected: truereject edits from non-human actors (!IsHumanIdentity(actor)) inmutate.go, including bypass attempts that strip or unset the flag. - Hold Downgrade Guard: Non-human actors cannot downgrade or clear an existing
governance: holdon disk, even whenx-okf-memory-protected: trueis omitted. - CLI-Only Override: Human operators can override via
okf update --allow-protected; no override parameter is exposed in MCP tools. - Validator Check:
okf validate --strictflags protected concepts lacking human provenance (generated.by: human:...or a current humanverifiedentry).
- Concepts declaring
- Time-Range Change History (
okf changes --since/ MCPokf_changes) &change_note.- Query created, updated, related, or deprecated/deleted concepts within
[since, until]using ISO dates/timestamps or relative durations (1d,2w), returning titles, descriptions, and timestamped operations without requiring Git. - Added optional
--change-note/change_noteoncreate,update, andrelate, persisted inlog.mdwhile remaining 100% backward-compatible with legacy date-only entries andMergeLogContent.
- Query created, updated, related, or deprecated/deleted concepts within
stale_afterWrite Support (CLI & MCP).- Added
--stale-aftertookf create/okf updateandstale_afterto MCPokf_create/okf_update. SupportsYYYY-MM-DD, ISO 8601 timestamps, relative durations (14d,2w,3m), and""to remove the key; past dates succeed with a warning; changes are logged tolog.md.
- Added
- Computed Staleness Signals & Optional Git Freshness / Code Drift.
okf search --json,okf show, and MCPokf_search/okf_shownow surface computedtrust_tierandstaleness(last_touched_at, optionalcommit,provider) without adding any new frontmatter keys.- Default mode uses frontmatter
generated.at/ file mtime (provider: "frontmatter") with zero subprocess overhead; opt-in--with-git-freshness/with_git_freshnessenriches via a single batchedgit log(provider: "git"). - Added
okf validate --drift-git(and MCPokf_validate(drift_git=true)) to flag concepts whosecode_refsfiles have newer Git commits than the concept'slast_touched_at.
3. Security & Conformance Hardening
- Enforced unified CWE-22 path-traversal confinement in
(*Bundle).ResolvePathacross body links and frontmatter path fields (rejecting..,%2e%2e, backslashes, Windows drives, and UNC paths). - Extended frontmatter smuggling defenses (
frontmatterSmuggleRegexandsanitizeConceptMetadata) to coverstale_after,superseded_by, andx-okf-memory-protected.
4. Documentation & Knowledge
- Updated README.md, docs/guides/CLI.md, .agents/skills/okf-memory/SKILL.md, and .agents/skills/okf-memory/discovery.md (synced to
pkg/okf/assets/skill/viamake sync-assets). - Added architecture/okf-v03-conformance and updated architecture/security-boundaries, requirements/mutation-metadata, roadmap/milestones, and knowledge/log.md.
5. Community & Special Thanks
- Thank you to delimitdev (Reddit) for the feedback and design inspiration behind progressive Git freshness (
last_touched) and relativecode_refsdrift detection.
🌐 Discover & Share Knowledge: OKF Registry
Scale persistent memory across projects and agent sessions with the decentralized OKF Registry:
- Browse & Share: Discover curated, quality-scored memory packages (e.g. framework best practices, architecture rules, compliance guidelines) at registry.okf-memory.dev.
- Install in Seconds: Pull external knowledge directly into
.okf/vendor/with zero dependencies:okf pull <bundle-id>
- Guaranteed Conformance: Every package is verifiable against Open Knowledge Quality Scorecards (
--min-score) with atomic rollback to ensure deterministic agent consumption.
Pre-built Binaries & Verification
Release binaries are automatically built by GitHub Actions:
- Download: v0.9.0 Release Binaries
Full Changelog
Full Changelog: v0.8.0...v0.9.0