Kontrua

Your AI agents write bad code on stale context

No docs, or docs that lie about the code, and every agent guesses. Wrong plans, broken diffs, tokens burned re-reading your repo on each run. Kontrua traces every merged PR and ships reviewed updates to your AGENTS.md, codemap, and conventions, so Claude Code, Cursor, and Copilot start from the truth and stop paying to rediscover it.

Kontrua
Ready
feat/payment-module
Open

Code changes

src/payments.ts+234 −12
src/types.ts+8 −2
tests/payment.test.ts+45
Kontrua is tracing the diff
Kontrua refreshed the context layer
+AGENTS.md+34
+docs/CODEMAP.md+18
+docs/CONVENTIONS.md+9
S
sarah approved · just now
Merge PR
AGENTS.mdFresh

AGENTS.md

Context for AI agents working in payment-service.

Structure

src/paymentsStripe charge + refund flows
src/webhooksevent ingestion

Commands

pnpm test (vitest unit suite)

Boundaries

Never edit generated code in src/gen/

Works with
GitHub
GitLab
Context rot

Stale context breaks your agents

Claude Code, Cursor, and Copilot plan from the context files in your repo. Every merged PR widens the gap between what those files say and what the code does. You pay for that gap twice: once in wasted tokens, once in rework. Kontrua closes it.

  • Fresh at HEAD. The context layer updates on every PR approval. Agents read the architecture and signatures that exist right now.
  • Lower token bills. Agents without current context re-discover your repo on every task: exploratory file reads, wrong plans, retried diffs. Agentic tools already burn 10-100x more tokens than chat, and that context gets re-sent on every step. A dense, current AGENTS.md is the cheapest context an agent can load.
  • No manual upkeep. Hand-written AGENTS.md files rot in weeks. Kontrua maintains yours automatically.
Kontrua · Run complete

Committed to branch

chore: update agent context

kontrua-bot · just now · feat/auth

Files updated

+AGENTS.md
+47
+docs/CODEMAP.md
+23
+docs/CONVENTIONS.md
+8
Doc Views

Doc views for your human readers

The same understanding that refreshes your context layer also renders the docs your team reads. Updated on every PR approval.

README

README.md

Project overview, installation, features, and usage. Always reflecting your current codebase.

API Reference

docs/API.md

Every exported function, class, and type, with signature, parameters, and description.

Architecture

docs/ARCHITECTURE.md

System structure, module boundaries, data flow, and key design decisions.

Changelog

CHANGELOG.md

Version history in Keep a Changelog or Conventional Commits format.

Kontrua · Analysis

Changed file

src/payments.ts+47

Extracted exports

processPayment(amount, currency)

Promise<PaymentResult>✓ AST

validateCard(card: CardData)

boolean✓ AST

PaymentResult

type✓ AST
3 exports · 5 callers mapped
Code Intelligence

Context grounded in your actual code

Reads your full codebase, not just the diff. Every type, export, and dependency is verified against the source before it lands in your context layer. Facts, not guesses.

  • Semantic diff analysis. What changed and what it affects.
  • Cross-file dependency mapping. Every affected context artifact, updated.
  • AST-verified signatures. From the AST, not inferred.
  • Incremental updates. Manual edits stay intact.

Repair context the moment it rots

PR approval is exactly when context goes stale, so it is the default trigger. Schedule, CI step, and CLI work too.

Trigger on PR approval

Install the GitHub App. When a reviewer approves, Kontrua traces the diff and commits refreshed context to the branch - no YAML, no extra steps.

  • Zero configuration after the 2-minute install
  • Context updates committed directly to the PR branch
  • Merge code and context in a single review
  • Works with GitHub and GitLab

Kontrua listens to the webhook automatically, nothing to configure in CI.

github.com/acme/api/pull/42
Openfeat: add user authentication module#42

sarah wants to merge 8 commits into main

S
sarah approved these changes2 min ago
LGTM! Auth flow looks solid.
P
kontrua-bot committed context to this branchjust now

Context layer updated

  • AGENTS.md
  • docs/CODEMAP.md
  • docs/CONVENTIONS.md
Comparison

The gap compounds with every merge

Hand-maintained context vs. Kontrua.

Context upkeep
Hand-edited AGENTS.md, when someone remembers
Automatic on every PR approval
Freshness
Rots within weeks of a merge
Context lag repaired at merge time
Agent planning
Against a repo that no longer exists
Against the repo as it is at HEAD
Tool coverage
Locked to a single IDE vendor
One context layer: Claude Code, Cursor, Copilot
Review
Unreviewed edits, or none at all
Reviewed commits in your own repo
Accuracy
Handwritten, prone to drift
AST-verified, not hallucinated
Pricing

Simple, predictable pricing

Start free. Scale when you're ready. Open-source repos always get Max features, free.

Free
$0forever

For solo devs and small projects

  • 2 repositories
  • 20 runs / month
  • Context artifacts + doc views
  • GitHub & GitLab
Get started
Most popular
Pro
$15/month

For growing engineering teams

  • 10 repositories
  • 150 runs / month
  • Context refresh on PR approval
  • All context artifacts + doc views
  • Custom templates
  • Scheduled runs
  • 3 team seats
Start 14-day free trial
Max
$30/month

For teams shipping at scale

  • Unlimited repositories
  • 1,000 runs / month
  • Doc splitting
  • 5 team seats
  • Import from existing docs
Get Max
Enterprise
Custom

Custom solutions for your team

  • Everything in Max
  • Custom run limits
  • Dedicated support
  • Custom integrations
Talk to us

Frequently Asked Questions

The context layer of your repo: AGENTS.md, a codemap, conventions, and architecture facts - the files AI coding agents read before they plan. It also renders doc views (README, API reference, architecture, changelog) for your human readers, from the same understanding of the code.

Any tool that reads context files from your repo: Claude Code, Cursor, Copilot, and anything else that follows the AGENTS.md convention. Kontrua commits standard files into your repo, so there is no SDK, no plugin, and no vendor lock-in.

It analyzes the diff of each approved PR and builds a semantic model of what changed. It rewrites only the affected context artifacts and doc sections, leaving everything else untouched.

Kontrua never stores your source code. Diffs and file contents are analyzed in memory during a run and discarded when the run completes. We request the minimum permissions needed to read code and commit updates. All data is encrypted in transit.

No. Kontrua commits updates as regular commits on your branch. You can edit, revert, or ignore them like any other change. If you've customized a section, Kontrua updates only the parts the code diff actually touches.

Yes. Doc views - README, API reference, architecture, changelog - stay fully supported and update on the same runs. The context layer is the agent-facing output; doc views are the human-readable one.

Yes. Kontrua uses a template system. You can choose from built-in templates for context artifacts and doc views or write your own. Templates are versioned in your repo so your team can review changes.

Kontrua works with any GitHub or GitLab repository. It currently supports TypeScript, JavaScript, Python, and Go, with more languages on the roadmap.

Free for up to 2 repos and 20 runs per month. Pro is $15/month for 10 repos and 150 runs. Max is $30/month for unlimited repos and 1,000 runs. Open-source repos always get Max features for free.

Kontrua commits updates as regular git commits. If something looks off, revert the commit or edit the file directly. Your manual edits are preserved on subsequent runs. You stay in full control.

Give your AI agents accurate context

Connect your repo. Kontrua keeps the context layer current from there.