Skip to content

Development

Tool versions and tasks live in .mise/config.toml:

mise install
mise run build
mise run test               # unit tests
mise run test-integration   # store suite against a throwaway VectorChord container
mise run lint

Docs

This site is MkDocs Material, pinned in pyproject.toml and uv.lock and run through uv, which mise installs. Pages live in docs/, and their order in mkdocs.yml's nav.

mise run docs-serve   # live preview at http://127.0.0.1:8000/
mise run docs         # build into site/ with --strict, as CI does

--strict fails the build on a broken link or a page missing from nav. Pull requests build the site; a push to main publishes it to GitHub Pages.

Evaluation

Review quality is measured offline: mise run bench-mine builds a corpus of pull requests whose lines a later fix commit changed, and mise run bench (with OPENROUTER_API_KEY) runs them through the service's own fetch, context and prompt code as one-step agentic reviews, what agent.maxSteps: 1 sends: the agentic system prompt, the read-only tools over the head commit and a submit_review the one step is told to make. Stage 4, the similar-code index, needs a database and is left out. Each case runs with the diff alone and with the context stages, reporting recall on the expected findings, cost and latency per ablation.

Cluster development loop

Everything that touches a private cluster lives in the gitignored .private/ folder, so account names, secret references and cluster pointers never enter the repository:

  • .private/deploy: a kustomization for what the chart does not create (namespace, a CloudNativePG cluster with the vector extension via a CNPG Database resource and External Secrets Password generators for its roles, the bot and provider credentials as ExternalSecrets). It expects the CloudNativePG, External Secrets and Prometheus operators.
  • .private/values.yaml: the chart values for that cluster; mise run deploy installs charts/kritika with them and the freshly pushed image, so every dev loop exercises the chart.
  • .private/mise.local.toml: [env] KUBECONFIG = "...", symlinked from the repo root as .mise.local.toml so mise picks it up.
  • .private/image and .private/runner-image: the last image references pushed.
mise run deploy     # build, push, apply, wait for rollout
mise run logs       # follow the pod
mise run undeploy   # delete everything, database included

Images go to the registry KRITIKA_DEV_REGISTRY names, or to ttl.sh (24h TTL) when it is unset, under a fresh name on every deploy, so a redeploy always pulls new code. The Helm chart is the supported way to run kritika; .private/deploy is a development harness, not an example to copy.