KodaCode
Coming soon
Docs/Features

Automations

A small decision model reads part of a project on a schedule and answers typed questions. It records a note or starts an agent only when the answers say so.

An automation reads part of a project and asks a decision model typed questions about it. Then it acts on the answers: it records a note or starts an agent session. It can run manually or on a schedule. Open Automations with /automations or ⇧⌘R.

Built-in automations

AutomationWhat it does
risky-change-reviewReviews the latest commit when it is risky or touches sensitive code
secret-leak-checkCatches a key, token or password added in the latest commit
untested-changeNotices changed functions that no test reaches
dependency-change-watchExamines a dependency that the latest commit adds, and any known vulnerability it brings
docs-driftFlags a change the README no longer describes
migration-safetyReviews a commit's schema changes when they could lose data or break code

Make it mine copies a built-in so you can edit it. Use in this project enables one for the open project.

The editor

An automation has five parts:

  1. Read: what it reads. Inputs are the git diff, untested changes, schema changes, a file, a read-only command, a dependency scan or a secret scan.
  2. State: a template that puts the inputs together for the decision model.
  3. Ask: typed questions, answered yes/no or on a scale, each with a confidence.
  4. Decide: rules, checked in order. The first rule whose conditions all hold acts. Each rule either records a report or starts an agent with a prompt. Otherwise says what happens when no rule matches.
  5. Settings: scope (this project, several or none), the schedule, and the decision model, which can be a small local one.

Preview reads the inputs and asks the questions now, without recording or acting. Run now asks the decision model now and acts on its answer.

Runs

The list shows each run with what it read, the answers, the rule that matched and what it did. An agent that a run started opens as a session. It also appears in Autonomous tasks. Delete all runs clears the list.

Files

Automations are JSON files: .koda/automations/*.json in a project, or ~/.config/kc/automations/*.json for your own.

KeyWhat it holds
version, name, description
decision_provider, decision_modelThe model that answers the questions.
scheduleevery, daily or weekdays.
runs_inFor your own automations: all_projects, projects or no_project.
inputsgit_diff, untested_changes, schema_changes, file, command, dependency_scan, secret_scan.
stateA template with {input} placeholders.
questionsThe typed questions.
ruleswhen conditions (above, below, is, confidence_above, at_least, at_most) and then: agent (prompt, with) or report.
otherwiseWhat happens when no rule matches.