Skip to content

Configuration

Per-repository and organisation-level settings in the SaaS dashboard.

For CLI users, all configuration is in .kontrua.yml. See the CLI section.

Context artifacts

The context section of the repo config controls the context layer - the artifacts AI coding agents read to work on your repository. AGENTS.md and conventions are enabled by default; the codemap is opt-in; architecture facts are opt-in. Each key takes enabled and output. Missing enabled outputs can be generated. Existing files are audit only unless their exact paths are delegated for management. Generated content uses repository evidence and still needs review.

KeyDefaultOutputWhat it contains
agentsMdOnAGENTS.mdAgent orientation file at the repo root - what the project is, how to build, test, and navigate it
codemapOpt-indocs/CODEMAP.mdModules, entry points, and dependencies
conventionsOndocs/CONVENTIONS.mdObserved code patterns with cited examples
architectureFactsOffdocs/architecture.facts.jsonDeterministic machine-readable facts extracted from the code - no LLM involved
Repo config - context section
{
  "context": {
    "agentsMd":          { "enabled": true,  "output": "AGENTS.md" },
    "codemap":           { "enabled": false, "output": "docs/CODEMAP.md" },
    "conventions":       { "enabled": true,  "output": "docs/CONVENTIONS.md" },
    "architectureFacts": { "enabled": false, "output": "docs/architecture.facts.json" }
  }
}

Human docs

The docs section configures the documents written for people. Kontrua treats them differently from the artifacts above. Existing README files are verify-only in the managed-output plan, while existing architecture and changelog outputs require explicit management delegation before regeneration. Review each proposed diff.

DocumentWhat Kontrua does with it
readmeAudited when in scope. An existing README is not regenerated; targeted corrections require an exact-path opt-in. A missing README can be generated when enabled.
architectureAn existing file is regenerated only after exact-path delegation and a structural change (files added, deleted, renamed or copied).
changelogAn existing file is updated only after exact-path delegation and a commit range to document.
apiGeneration is retired. The key is still accepted and changes nothing; an existing API document is audited like every other file.

Choose each file's permission in Document permissions: Audit only checks supported references; Propose corrections permits targeted, reviewed edits; Managed generation delegates supported whole-document generation. Audit only overrides prior settings and generation history. Existing README, API, CLAUDE.md and Copilot instructions support audits and targeted corrections, not whole-document regeneration. Authorship is independent of permission; imported files are not labeled as AI-written.

ownership:
  files:
    AGENTS.md: audit
    README.md: corrections
    docs/CODEMAP.md: managed

Legacy managedPaths and correctionPaths are still read when no per-file choice exists. Clear them to return existing files to Audit only. An anchors sidecar records generation provenance; it never grants edit permission. Enabled missing outputs may be created unless their per-file mode is Audit only or Propose corrections.

SettingDescription
EnabledWhether Kontrua maintains this document at all
Output pathRepository-relative path the file is read from and written to (e.g. docs/ARCHITECTURE.md)
Notion pageOptional destination page for the Notion sync described below

Watch branch and triggers

The watch branch is the branch that gates correction runs. It defaults to the repository's default branch (main or master). An approval only starts a run when the pull request targets this branch. Change it on the repository page in the dashboard.

What each event does
EventWhat happensMetered
Repository connectedKontrua audits the context files it finds and reports the verdictNo
Push to the default branch (GitHub)The verdict is measured again at the new HEADNo
Pull request opened, reopened or updatedThe verdict runs at the PR head: a kontrua/context commit status, plus one comment when this PR breaks or fixes a claimNo
Pull request approved on the watch branchA correction run starts and commits into that pull requestYes
ScheduleA correction run starts on the watch branchYes
API trigger or "Run now"A correction run startsYes

Repositories can additionally run on a schedule (daily, weekly on Mondays, or monthly on the 1st) via the schedule setting - useful as a safety net for changes that land outside the pull request flow. Each scheduled run counts against your monthly allowance. Scheduling needs a paid plan; public repositories get it on any plan.

Organisation defaults

Which human documents are enabled, and where they are written, can be set once for every new repository you connect. Configure them under Dashboard - Settings - Defaults so you don't have to reconfigure each repo from scratch.

Notion integration

Connect your Notion workspace under Settings - Integrations. Kontrua sends you through Notion's OAuth flow and stores the resulting access token encrypted, at the organisation level. It is available on every plan, including Free.

Once connected, each document in the docs section can be given a destination page, picked from the 50 most recently edited pages your Notion authorisation covers. After a run that regenerated that document, Kontrua converts its Markdown to Notion blocks, appends them to the page and deletes the blocks that were there before, so the page ends up holding the new version. The sync is one-way and page-level: it replaces the body of the pages you selected, it never creates pages, and it never reads Notion back into your repository. Documents with no page assigned are not sent anywhere. It runs in addition to the GitHub or GitLab pull request, never instead of it, and a Notion failure is logged without failing the run.

Ready to prove your context is true?

Connect your first repository and Kontrua tells you how much of what your docs claim is still true, before it writes anything.