Thank you for your interest in contributing to OKF Agent Memory! We welcome contributions from developers, researchers, and AI practitioners.
Before submitting code or documentation, please keep our core tenets in mind:
- Zero External Dependencies: The Go core library and CLI (
pkg/okf,cmd/okf) must remain 100% zero-dependency, relying strictly on the Go standard library. - Strict Spec Conformance: All knowledge structures must comply with the OKF v0.2 Specification.
- Walk the Talk (Memory First): Any pull request introducing architectural decisions, CLI commands, or workflow conventions must update
knowledge/and pass validation.
To maintain architectural focus, prevent duplicated effort, and protect maintainer bandwidth:
- Always Open an Issue First:
- Before writing code or opening a Pull Request, please open a GitHub Issue to discuss the bug, proposed feature, or architectural change.
- Wait for alignment and confirmation from maintainers before starting implementation.
- Unsolicited & Agent-Generated PRs:
- Pull Requests submitted without an associated approved issue, or automated sweeps by AI agents with generic or empty templates, will be closed without review.
- Exceptions:
- Minor typos or grammar fixes in documentation do not require an issue, but still require a filled-out PR description.
- Go: 1.24 or higher
- Make: Recommended for build and test targets
- Git
-
Fork and clone the repository:
git clone https://github.com/<your-username>/okf-agent-memory.git cd okf-agent-memory
-
Build the binary:
make build # Binary will be placed in bin/okf -
Run tests:
make test -
Validate the repository's knowledge bundle:
make validate # or: ./bin/okf validate knowledge --strict --drift
- Base all feature and bugfix branches off
develop(our default branch):git checkout develop git pull origin develop git checkout -b feat/your-feature-name # or git checkout -b fix/issue-description - The
mainbranch is reserved strictly for published, tagged production releases. Do not open feature PRs againstmain.
We adhere to Conventional Commits:
feat:A new feature or capability (e.g.feat: add bm25 scoring boost for tags)fix:A bug fix (e.g.fix: handle missing frontmatter delimiter safely)docs:Documentation updatesrefactor:Code refactoring with no behavioral changestest:Adding or updating testschore:Build scripts, CI workflow, or release updates
If your PR modifies architecture, CLI behavior, conventions, or APIs:
- Use
./bin/okf(orokf) to create or update concepts:./bin/okf create <concept-id> knowledge --type <type> --title "<title>" --desc "<summary>" ./bin/okf update <concept-id> knowledge --desc "<new-summary>" ./bin/okf relate <src-id> <target-id> knowledge --desc "<relationship>"
- Verify that
knowledge/log.mdand parent indices are cleanly maintained. - Ensure strict conformance and zero drift:
make validate
This repository dogfoods its own conventions and agent skills:
- Single Source of Truth: The active skill files located in
.agents/skills/okf-memory/are the authoritative source for agent skills. - Embedded Bootstrap Assets: The assets compiled into the binary under
pkg/okf/assets/skill/are used byokf bootstrapto initialize external projects. They must remain 100% byte-identical to.agents/skills/okf-memory/. - Sync Command: Whenever you modify skills in
.agents/skills/okf-memory/, run:make sync-assets
- Template Neutrality: Scaffold templates in
pkg/okf/assets/templates/(such asAGENTS.md) are distributed to third-party codebases. They must remain completely project-neutral and must never contain repository-internal paths, constraints, or tokens. - Automated Verification:
TestDogfoodingAssetDriftinpkg/okf/dogfood_test.goruns duringmake testandmake check, failing the build if assets drift or if internal tokens leak into templates.
Before submitting a Pull Request, verify that all of the following pass locally:
-
go fmt ./...(ormake fmt) has been run. -
go vet ./...(ormake vet) passes without errors. -
make testruns with 100% passing tests (including dogfood asset drift checks). - If skills were modified,
make sync-assetshas been run. -
make validatepasses with0 errors, 0 warnings, 0 orphans, 0 broken links. - Relevant documentation (
README.md,docs/,SKILL.md) is updated.
- Verify that your PR addresses an approved GitHub Issue (or is an obvious documentation typo fix).
- Push your branch to your fork.
- Open a Pull Request against
develop(the default branch). - Fill out the Pull Request template completely, including the
Fixes #...issue reference. Do not leave template fields empty. - Ensure all GitHub Actions checks pass green.
Thank you for helping make AI agent memory reliable, persistent, and standardized!