kgai shared decision memory for dev teams

A Claude Code plugin, a kg CLI and a VS Code extension · open source, MIT

Shared decision memory for AI dev teams.

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

The kgai extension in VS Code: a demo shop's decision graph — elements coloured by kind and sized by the decisions that shaped them, links as arrows, one contested element ringed in red — with the decisions list in the sidebar
The same graph in VS Code, Cursor and Windsurf · Marketplace · Open VSX
Install. The only step there is. ★ Star on GitHub
$claude plugin marketplace add kgaidev/kgai
$claude plugin install kgai@kgai-marketplace
From here it runs on its own. Capture and recall are automatic.

01What a team gets

Three things stop happening.

Dead ends stop coming back

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.

"Why is it like this?" stops costing an afternoon

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.

Knowledge stops leaving with people

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.

no re-explaining alice and her agent bob and his agent a new teammate day one the whole graph, local the whole graph, local the whole graph, local s3://team-bucket shard a shard b shard c append-only · you own it records the why recalls before editing the whole history

How that works: each machine holds the whole graph; sync goes over a bucket the team owns

02The example

One decision, two machines, four months.

MondayAlice's machine

Alice's agent moves payment retries off exponential backoff. As the work finishes, the plugin records why:

element
payment-retry
decision
retries run on a fixed 30-second schedule
why
the provider rate-limits burst retries. Exponential backoff tripped the limiter in staging.
rejected
exponential backoff. The retry storm after an outage hits the rate limit
ThursdayBob's machine

Sync ran in the background. Before Bob's agent touches the retry code, it reads:

What Bob's agent sees

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.

Septembereither machine

The provider lifts the limit and the team switches back. Nothing is edited. A new decision supersedes:

Mayretry with exponential backoffsuperseded
Junefixed 30-second schedule, provider rate-limits burstssuperseded
Septexponential backoff, the provider lifted the limitin force

kg history payment-retry

03How it works

Three verbs, no upkeep.

A

Capture

While you work with Claude Code, the plugin records structural decisions on its own: what changed, why, what was rejected. Trivial edits record nothing.

B

Recall

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.

C

Supersede

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.

04In your editor

See the decisions where the code is.

The kgai extension puts the memory in the editor's sidebar: every decision with its rationale, what it changed and what replaced it; the elements those decisions are about; the contested ones; the people behind them; and the live graph on a canvas. Read-only, no AI, one fixed order, exact filters. It finds the store exactly as kg does and ships its own small reader, so nothing else is installed and an open editor never collides with the engine.

A decision page beside the graph: rationale, references, the mutations, the elements it shaped, what it replaces and what replaced it
A decision beside the graph: the rationale, what it changed, what it replaced.
A conflict page: two competing decisions on the Refund Window shown side by side
A conflict: two decisions claim the same element, side by side.
A person page: how many decisions still stand, superseded and notes, whose decisions they replaced, activity by month
A person: what still stands, whom they replaced, activity by month.
Install in VS Code Open VSX · Cursor, Windsurf Or search kgai in the Extensions view. The pictures show examples/acme-shop, a demo project you can open yourself.

05Team sync

Syncs like version control, without the merge conflicts.

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.

alice shard a bob shard b any agent its own shard s3://team-bucket append-only the same graph, every machine

One writer per shard, write-once objects. Same log, same graph, on every machine.

06Measured, not promised

One million decisions, thirty writers.

1,000,000
decisions in one store
30
writers' shards
~100 ms
decision lookup

That figure is the decision lookup specifically. Recall and free-text search are slower. The benchmark method and raw runs are in the repository.

07Where next

Compare it, read the source, or go hosted.

Stop re-deciding. Start remembering.

Install. The only step there is. ★ Star on GitHub
$claude plugin marketplace add kgaidev/kgai
$claude plugin install kgai@kgai-marketplace