A Claude Code plugin and a kg CLI · open source, MIT
kgai records the why behind your code as you work. What changed, what was rejected, what replaced what. Any teammate's agent reads it before touching that area. No wiki to write, nothing to maintain.
Local-first, no server, no account · Nothing is ever overwritten · Team sync over an S3 bucket you own
01What a team gets
The approach you ruled out in March is not re-proposed in July. Rejected paths stay in the memory with the reason they failed, and an agent sees them before it suggests anything.
QA files a bug that was a decision. Review turns up two conflicting answers. The recorded reason settles it in seconds, without interrupting whoever decided.
A new teammate syncs and their agent starts with the team's whole decision history, not an empty memory. When someone leaves, the why stays.
02The example
Alice's agent moves payment retries off exponential backoff. As the work finishes, the plugin records why:
Sync ran in the background. Before Bob's agent touches the retry code, it reads:
Retries are on a fixed 30-second schedule. Exponential backoff was rejected in June: the provider rate-limits burst retries.
So it does not propose backoff again.
The provider lifts the limit and the team switches back. Nothing is edited. A new decision supersedes:
kg history payment-retry
03How it works
While you work with Claude Code, the plugin records structural decisions on its own: what changed, why, what was rejected. Trivial edits record nothing.
Before the agent edits an area, it reads the decisions that shaped that area,
not the whole history. A kg CLI answers the same questions outside
Claude Code.
A change of mind is a new decision that supersedes the old one. Nothing is edited in place, so "what did we believe in June" is a query, not archaeology.
04Team sync
Every decision is an immutable, content-addressed event in a per-writer shard. Two teammates, or ten agents, recording in parallel cannot produce a textual conflict. There is nothing to merge. Each machine replays the shared log into the same graph, deterministically.
The bucket is yours. Any S3-compatible store works, MinIO and R2 included. No server of ours in the path. And when two people genuinely decide the same thing two ways, it surfaces as a branch you resolve by recording one more decision.
One writer per shard, write-once objects. Same log, same graph, on every machine.
05Measured, not promised
That figure is the decision lookup specifically. Recall and free-text search are slower. The benchmark method and raw runs are in the repository.
06Where next