kgai shared decision memory for dev teams

A Claude Code plugin and a kg CLI · 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

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
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.

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.

04Team 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.

05Measured, 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.

06Where 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