Skip to content

kontextDeclarative team knowledge for coding agents

Declare your team's decisions in the repository. Agents propose changes, people approve them in pull requests, and every agent at the same commit works from the same record.

kontext

Declare it ​

markdown
---
id: 2026-09-28-prices-are-integer-cents
kind: decision
title: Prices are integer cents
status: accepted
date: 2026-09-28
paths: [src/billing/**]
author: Jane Doe
---
Floats broke VAT rounding on invoices with many lines.
Every amount is stored and computed as an integer number of cents.
toml
# committed, reviewed like code
[brief]
budget_tokens = 1400     # what one brief may cost an agent
max_decisions = 12

[freshness]
threshold_commits = 20   # flag an entry after this many commits on its paths

[hooks]
validate = true          # malformed entries and secrets block the commit
trailers = true          # `Decision: <id>` on the commit that ships a decision

[secrets]
scan = "staged"          # scan every staged file, not only knowledge

From these two files, kontext derives the rest:

  • an agent that calls ctx_brief with focus: ["src/billing"] gets the decision first,
  • kontext why src/billing/round.ts:40 shows it next to the blame and the commits behind it,
  • the commit that ships it carries Decision: 2026-09-28-prices-are-integer-cents,
  • after 20 commits on src/billing/** it is flagged for a check,
  • a newer decision that supersedes it takes its place, and kontext log --all keeps the chain.

Why not Claude Code's memory or CLAUDE.md? ​

CLAUDE.md, AGENTS.md, .claude/rulesClaude Code auto memoryMemory serviceskontext
Written bypeople, as prosethe model, on its ownthe model, from sessionsagents propose, people approve
Shared and reviewedin pull requestsno: one user, one machineper deployment, no reviewin the pull request of the change
Reaches the agentthe root file every session; a nested CLAUDE.md when the agent reads files in its directory; a .claude/rules file with paths: when matching files are touchedthe first 200 lines of its index, every sessionby similarity to the queryranked for the paths it names, within a budget
An entry recordspaths at most (.claude/rules); no status, date or ownerwhen it was writtendepends on the storepaths, status, date, author, last verification
When it goes stalestays until someone noticesthe model may rewrite itthe model may overwrite itflagged after N commits on its paths
Works withClaude Code reads AGENTS.md natively, as do Codex, Cursor and OpenCode; .claude/rules is Claude Code onlyClaude Codetheir plugin, SDK or MCP serverevery MCP client and the CLI

kontext does not replace CLAUDE.md or AGENTS.md: keep the few instructions every session needs there. Decisions are too many to load whole and too important to leave unreviewed. More on the alternatives

Under your control ​

  • Approval. Knowledge changes only through commits. With /.ai/ @acme/architects in CODEOWNERS and code-owner review required, no agent changes what every agent follows without that team's approval.
  • Audit trail. git log -- .ai and kontext log --all show who decided what, when, and what replaced it. With kontext's hooks installed, git log --grep "Decision: <id>" finds the commit that shipped a decision.
  • Policy in CI. kontext check fails a pull request on malformed entries, duplicate ids or high-confidence secrets.
  • No lock-in. The store is plain Markdown in your repository and stays readable without kontext.

Released under the MIT or Apache-2.0 license.