kritika

module
v0.0.0-...-7607cac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0

README

kritika

Repository-aware AI pull request review for GitHub, Forgejo, GitLab and Gitea.

CI Release License

kritika reviews pull requests on GitHub, Forgejo, GitLab and Gitea using the code around the change. It posts an updated summary, inline findings and suggested fixes. Mention the bot to ask a follow-up question or request another review.

Get started · Documentation

[!WARNING] kritika is under active development. Before you upgrade, read the changelog. Configuration and APIs can change between releases.

What it does

  • Reviews new pull requests and updates its review after a push.
  • Reads repository context and your review rules.
  • Answers questions in pull request comments.
  • Offers optional confidence scores and automatic approvals.
  • Shows reviews, usage and costs in a web dashboard.
  • Lets coding agents read reviews and findings through a read-only MCP endpoint.

What you need

  • Kubernetes and Helm.
  • Postgres with VectorChord and two database roles.
  • A GitHub App, a Forgejo or Gitea bot account or a GitLab service account, and a model provider credential.
  • An HTTPS address for the dashboard and the forge's webhooks.

The setup guide walks through installation and the first review. No repository configuration file is required.

Learn more

I want to… Read
Use the bot Reviews and commands
Add review rules Repository settings
Manage reviews and costs Dashboard
Configure the service Configuration reference
Secure a deployment Security
Work on kritika Development

License

AGPL-3.0

Directories

Path Synopsis
cmd
kritika command
Command kritika reviews GitHub pull requests against an index of the repository.
Command kritika reviews GitHub pull requests against an index of the repository.
kritika-runner command
Command kritika-runner executes a runner Job: "kritika-runner run" carries out the one review, follow-up or index run its job document names, then exits.
Command kritika-runner executes a runner Job: "kritika-runner run" carries out the one review, follow-up or index run its job document names, then exits.
internal
adapter
Package adapter resolves the configuration's providers to model adapters, built once for the life of the process, as the configuration is.
Package adapter resolves the configuration's providers to model adapters, built once for the life of the process, as the configuration is.
agent
Package agent is a bounded tool loop over a git commit's tree.
Package agent is a bounded tool loop over a git commit's tree.
aqua
Package aqua resolves packages of the aqua registry (github.com/aquaproj/aqua-registry), as aqua itself does for the platform that the runner runs on, and installs them.
Package aqua resolves packages of the aqua registry (github.com/aquaproj/aqua-registry), as aqua itself does for the platform that the runner runs on, and installs them.
auth
Package auth signs humans in to the dashboard, as the local admin or through the file's OIDC, GitHub, Forgejo, Gitea and GitLab sign-ins.
Package auth signs humans in to the dashboard, as the local admin or through the file's OIDC, GitHub, Forgejo, Gitea and GitLab sign-ins.
chatgpt
Package chatgpt implements Sign in with ChatGPT and token renewal for reviews that use a ChatGPT plan.
Package chatgpt implements Sign in with ChatGPT and token renewal for reviews that use a ChatGPT plan.
chunk
Package chunk cuts source files into declarations.
Package chunk cuts source files into declarations.
config
Package config loads process configuration from the configuration file and the environment.
Package config loads process configuration from the configuration file and the environment.
configfile
Package configfile loads application policy and runtime configuration from YAML.
Package configfile loads application policy and runtime configuration from YAML.
configfile/configfiletest
Package configfiletest builds configurations for tests from one YAML document, as the configuration file holds it.
Package configfiletest builds configurations for tests from one YAML document, as the configuration file holds it.
contextpack
Package contextpack builds the review context that the runner writes next to the diff.
Package contextpack builds the review context that the runner writes next to the diff.
egress
Package egress is the worker's forward proxy: the one route out of the cluster for runner pods, which reach it through HTTPS_PROXY and have no other egress.
Package egress is the worker's forward proxy: the one route out of the cluster for runner pods, which reach it through HTTPS_PROXY and have no other egress.
egresspolicy
Package egresspolicy is what the gateway lets a runner reach: the hosts and addresses it allows and denies, the credentials it adds and the hosts its cache keeps nothing from.
Package egresspolicy is what the gateway lets a runner reach: the hosts and addresses it allows and denies, the credentials it adds and the hosts its cache keeps nothing from.
executor
Package executor runs a runner for one review: as a Kubernetes Job in production, in-process for tests and local development.
Package executor runs a runner for one review: as a Kubernetes Job in production, in-process for tests and local development.
forge
Package forge is the worker's view of a forge: the few calls a review needs before and after the runner does its work.
Package forge is the worker's view of a forge: the few calls a review needs before and after the runner does its work.
forge/forgejo
Package forgejo implements forge.Client against a Forgejo or Gitea instance's REST API, https://<host>/api/v1, with the standard library's HTTP client.
Package forgejo implements forge.Client against a Forgejo or Gitea instance's REST API, https://<host>/api/v1, with the standard library's HTTP client.
forge/github
Package github is kritika's forge.
Package github is kritika's forge.
forge/gitlab
Package gitlab implements forge.Client against a GitLab instance's REST API, through gitlab.com/gitlab-org/api/client-go.
Package gitlab implements forge.Client against a GitLab instance's REST API, through gitlab.com/gitlab-org/api/client-go.
gateway
Package gateway is the worker's listener for runner pods.
Package gateway is the worker's listener for runner pods.
gitfetch
Package gitfetch fetches exactly the commits that a review needs: the head and the merge-base and, for a re-review, the head and merge base of the last review.
Package gitfetch fetches exactly the commits that a review needs: the head and the merge-base and, for a re-review, the head and merge base of the last review.
gittest
Package gittest prepares go-git repositories for tests.
Package gittest prepares go-git repositories for tests.
indexer
Package indexer cuts a repository tree into the chunks that the embedding index stores.
Package indexer cuts a repository tree into the chunks that the embedding index stores.
ingest
Package ingest is the only surface that a forge reaches.
Package ingest is the only surface that a forge reaches.
jobs
Package jobs defines the River job arguments that ingest, the leader and the dashboard enqueue and the worker consumes.
Package jobs defines the River job arguments that ingest, the leader and the dashboard enqueue and the worker consumes.
jobtimeout
Package jobtimeout holds the River job timeout bounds shared between the worker, which computes each job's timeout, and configfile.
Package jobtimeout holds the River job timeout bounds shared between the worker, which computes each job's timeout, and configfile.
metrics
Package metrics is every Prometheus series kritika exports beyond the Go runtime.
Package metrics is every Prometheus series kritika exports beyond the Go runtime.
model
Package model is kritika's view of a language model and an embedder.
Package model is kritika's view of a language model and an embedder.
poller
Package poller backstops missed webhooks.
Package poller backstops missed webhooks.
prfilter
Package prfilter compiles and evaluates a CEL boolean expression that decides which pull requests kritika reviews (a condition of the configuration's trigger.include and trigger.exclude lists).
Package prfilter compiles and evaluates a CEL boolean expression that decides which pull requests kritika reviews (a condition of the configuration's trigger.include and trigger.exclude lists).
repoconfig
Package repoconfig parses .kritika.yaml, the optional per-repository file.
Package repoconfig parses .kritika.yaml, the optional per-repository file.
review
Package review turns a context pack into a prompt, a model answer into findings, and findings into the comments that kritika posts.
Package review turns a context pack into a prompt, a model answer into findings, and findings into the comments that kritika posts.
rolemap
Package rolemap compiles and evaluates a sign-in's role mapping.
Package rolemap compiles and evaluates a sign-in's role mapping.
runner
Package runner is what a runner pod does.
Package runner is what a runner pod does.
runspec
Package runspec is what a worker and a runner agree on across images: the job document a worker hands a runner, the credentials delivered beside it, and the names a runner gives the gateway and its own variables.
Package runspec is what a worker and a runner agree on across images: the job document a worker hands a runner, the credentials delivered beside it, and the names a runner gives the gateway and its own variables.
server
Package server holds kritika's HTTP listeners.
Package server holds kritika's HTTP listeners.
store
Package store owns kritika's Postgres access: the two connection pools, the startup assertion that keeps row-level security honest, schema migrations, the leader lock, and account-scoped transactions.
Package store owns kritika's Postgres access: the two connection pools, the startup assertion that keeps row-level security honest, schema migrations, the leader lock, and account-scoped transactions.
store/storetest
Package storetest opens the store on the integration tests' database, the one the test-integration task provisions.
Package storetest opens the store on the integration tests' database, the one the test-integration task provisions.
textcut
Package textcut shortens text without splitting a UTF-8 sequence.
Package textcut shortens text without splitting a UTF-8 sequence.
transcript
Package transcript records model calls for the dashboard's transcript view.
Package transcript records model calls for the dashboard's transcript view.
udiff
Package udiff reads a unified diff, as git writes one, into its files, their hunks and their lines, and nothing else: what a caller makes of a diff, a prompt's file list, a finding's anchors, the hunks an incremental delta leaves out, stays with the caller.
Package udiff reads a unified diff, as git writes one, into its files, their hunks and their lines, and nothing else: what a caller makes of a diff, a prompt's file list, a finding's anchors, the hunks an incremental delta leaves out, stays with the caller.
upstream
Package upstream fetches a repository other than the one under review, at one ref, into a throwaway bare repository.
Package upstream fetches a repository other than the one under review, at one ref, into a throwaway bare repository.
web
Package web embeds the built kritika UI (see internal/web/src) so the kritika binary serves it without any external static-file dependency.
Package web embeds the built kritika UI (see internal/web/src) so the kritika binary serves it without any external static-file dependency.
webapi
Package webapi is the dashboard's JSON API and static UI server.
Package webapi is the dashboard's JSON API and static UI server.
webhook
Package webhook does signature verification on inbound forge webhook requests and parses them.
Package webhook does signature verification on inbound forge webhook requests and parses them.
worker
Package worker consumes River jobs.
Package worker consumes River jobs.
scripts
trustedroot command
Command trustedroot writes Sigstore's public-good trusted root to the file it is given, as Sigstore's TUF repository publishes it.
Command trustedroot writes Sigstore's public-good trusted root to the file it is given, as Sigstore's TUF repository publishes it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL