Kontrua sits between your version-control host and your repository's context layer. It listens for events, regenerates the affected context artifacts and doc views, and opens a PR with the result. PR approval is exactly the moment context goes stale, so that is the default moment Kontrua repairs it.
Event received
A webhook fires when a PR is approved or merged (GitHub / GitLab) or when your CI calls the API trigger. Kontrua verifies the signature and extracts the diff.
Run created
A DocRun record is created atomically with a quota check. If your monthly limit is already reached the run is queued and retried when space opens up.
Agents execute
Each enabled artifact has a dedicated generator. Context artifacts (AGENTS.md, codemap, conventions) and doc views (README, API reference, architecture, changelog) use AI agents that read the diff, your existing files, and your templates. Architecture facts are extracted deterministically from the code - no LLM involved.
Pull request opened
Kontrua opens a PR with the updated context artifacts and doc views. A comment is posted to the source PR so your team can follow the link directly.
When using the CLI, steps 1-2 happen locally (git diff + config load) and the agents call the Anthropic API directly.
Ready to keep your repo's context current?
Connect your first repository and Kontrua opens a reviewed PR with AGENTS.md, a codemap, and your conventions.