| type | Convention | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| title | Contributor Guidelines & PR Standards | |||||||||
| description | Engineering standards, zero third-party dependency policy, validation rules, and PR workflow for contributors. | |||||||||
| tags |
|
|||||||||
| generated |
|
|||||||||
| status | stable | |||||||||
| sources |
|
This convention establishes the quality gates, engineering expectations, and verification standards for contributors—both human developers and AI agents—contributing to okf-agent-memory.
All contributions must adhere to four foundational constraints:
- Issue-First Contribution Policy:
- All non-trivial PRs must be preceded by an approved GitHub Issue to ensure architectural alignment and protect maintainer bandwidth.
- Unsolicited Pull Requests and automated agent/bot sweeps with blank or unedited templates are closed without review.
- Zero Third-Party Dependencies:
- The core Go library (
pkg/okf) relies exclusively on the Go standard library. - For zero-knowledge cryptographic primitives (
pkg/vault), only official Go project sub-repositories (golang.org/x/crypto) are permitted for Argon2id key derivation. - Third-party packages, external vendor libraries, and CGo dependencies are strictly forbidden to ensure zero supply-chain risk, instant compilation, and reliable cross-platform compilation.
- The core Go library (
- OKF v0.2 Specification Conformance:
- The project's own
knowledge/bundle and all bundles scaffolded byokf bootstraporokf initmust strictly conform to the Open Knowledge Format v0.2 specification.
- The project's own
- Walk the Talk (Persistent Knowledge Maintenance):
- Any pull request that alters architecture, introduces CLI flags, adjusts conventions, or resolves non-trivial design decisions must update
knowledge/and maintainknowledge/log.md.
- Any pull request that alters architecture, introduces CLI flags, adjusts conventions, or resolves non-trivial design decisions must update
- Go Version: Go 1.24+ (or Go 1.26).
- Formatting: Go code must be formatted with standard formatting tools (
gofumptorgo fmt). - Static Analysis: Code must pass
go vet ./...without diagnostics. - Testing: Unit tests in
pkg/okfmust maintain complete coverage and pass withmake test.
When preparing a Pull Request:
- Search Before Authoring: Run
okf search "<query>"before adding new concepts to prevent duplicate files. - Deterministic CLI Operations: Use
okf create,okf update, andokf relateto mutate knowledge files and update graph links. - Graph Integrity: Every new concept must be linked into the inbound/outbound graph. No orphaned concepts are permitted under
--strictmode. - Validation: The bundle must pass strict validation before opening a PR:
make validate # or: okf validate knowledge --strict --drift
okf-agent-memory follows a GitFlow-inspired branching model:
develop(Default Branch): All active development, feature branches, and external Pull Requests must branch from and targetdevelop.main(Production Releases): Strictly reserved for tagged production releases (e.g.v0.1.5). Direct PRs againstmainare rejected.
Before requesting a review or merging into develop (or preparing a release to main), verify:
-
go fmt ./...produces no diffs. -
go vet ./...reports zero issues. -
make testruns with 100% passing unit tests. -
make validateexits with code 0 (0 errors, 0 warnings, 0 orphans, 0 broken links). - Conventional Commit format used for all commit messages.
- Core Memory Principles & Agent Contract: Contributors must follow the core memory principles
- Knowledge Lifecycle & Review Workflow: PR workflows must integrate the knowledge review lifecycle
- 5-Layer System Architecture: Code contributions must adhere to the 5-layer architecture and zero-dependency rule
- Automated Security Auditing & Jules Remediation Workflow: Continuous security audit expectations and integration pipeline
- Engineering & Coding Best Practices (Clean Code, TDD, DRY): Core coding conventions including TDD, Clean Code, DRY, and idiomatic Go
- Release Procedure & Distribution Runbook: Release preparation, quality gates, and git tagging procedure