repos.yaml
repos.yaml lists the repositories you connected and how Kraft works in each. Four groups of pages go deeper: How connect proposes commands for how kraft repo connect fills the entry in, detectors.yaml for teaching it your own conventions, Workspaces for a root repository with members, and Sandboxed workers for the sandbox field.
repos:
- path: /home/you/code/my-service
name: my-service
forge: github
default_chain: default
enabled: true
setup_command: "uv sync"
test_command: null
intent_dir: null
env: {}
env_passthrough: []
local_files: []
models: {}
deny_tools: []
steering: []
sandbox: null
policy:
allowed_tools: [Read, Edit, Bash]
automated_review:
bot: coderabbitai # one reviewer: exactly one of bot or check; or a list of them
ci_checks: true
post_merge_publish_jobs: []
Where a repo's value comes from
A repo that sets no steering: gets the steering profiles its default chain's tasks select, from the library. A repo that sets none of deny_tools, models or a policy: key gets the instance's. deny_tools and policy: come from policy.yaml, and a repo's own list only adds to it.
A repo's policy: may tighten the instance's safety layer but not relax it. A draft of repos.yaml, the Settings edit buffer, shows a relaxing value as a problem naming the repo and the field before it is published, the same refusal a run gives.
Each field's source (repo, library or default) comes with the value in the resolved view of the repos draft; the routes are in the schema.
Fields
No key on an entry passes silently. A key within two edits of a field below (automated_reviews:) is refused when the file loads, naming the field it meant. Any other key the tables don't list is kept, logged as a warning, and fails kraft admin doctor until it is removed.
Identity
| Field | Type | Default | Meaning |
|---|---|---|---|
path | string | — | Absolute path to the repo. |
name | string | unset | Display name, set at connect time and not otherwise validated. Unset, the path is shown. |
id | string, [a-z][a-z0-9_-]* | unset | The repository ID a workspace names this entry by, unique. Only a workspace's root and members need one. Connecting a repo with submodules, or accepting a repo library, writes it, never kraft or an add-on's namespace: release becomes release-2. |
enabled | boolean | true | Set false to keep auto-intake off this repo without disconnecting it. See enabled. |
managed | boolean | true | Keeps a repo you connected out of Settings › Repos' "Detected · not connected" section. Auto-connected submodules are written with managed: false. |
forge | string | unset | github or gitlab: which forge adapter backend: auto resolves to for this repo. kraft repo connect sets it from the host of the repo's remote: github.com, gitlab.com, or a self-hosted host that names one (gitlab.example.com). |
forge_account | string | unset | The account in forges.yaml this repo uses. Unset: the host's default account, else the CLI. A person sets it, never an agent: it decides whose token the forge calls use. Added in 2.5 |
project | string | unset | The GitLab project path, when forge: gitlab. |
default_chain | string | unset | The chain a work item on this repo runs when none is named. Unset, it is the repo library's default chain when one is loaded, else default. See default_chain. |
models | mapping of harness profile ID to string | {} | The model an agent task runs with on this repo, per harness profile ID (claude: opus). See models. |
Test and setup
| Field | Type | Default | Meaning |
|---|---|---|---|
setup_command | string | unset | Runs in every new worktree before any node starts. Unset, the file still loads, but the repo's next work item stops before its first task. See setup_command. |
test_command | string | unset | The command CI actually runs for this repo: what the changed-test-scope verification runs, as one scope over every path. See test_command. |
test_scopes | list of {paths, command, targeted_command, concurrency_group} | unset | A monorepo's per-directory test commands. Each paths is a non-empty list and each command a non-empty string. See targeted_command and concurrency_group. Added in 2.4 |
areas | mapping of ID to {paths, setup, verification} | {} | Path-scoped contexts inside this repo: {paths: [...], setup: "...", verification: {test_scopes: [...]}}. See areas. |
intent_dir | string, a relative path | unset | Where the repo's intent tree lives, relative to its root. When set, every agent in the repo is told to follow it. Kraft doesn't run the tree's check: add it to the repo's test_scopes yourself. |
local_files | list of strings | [] | Files to copy into every new worktree, for ones git worktree add can't carry: relative paths, no globs or directories, covered by the worktree's .gitignore. Anything else is refused, and named in the worktree_prepared event (kraft view events). |
carry | list of strings | [] | Files a test-selection tool keeps its state in, such as .testmondata. Kraft seeds them into each new worktree and saves them back after a passing local targeted round. See carry. Added in 2.4 |
Environment
| Field | Type | Default | Meaning |
|---|---|---|---|
env | mapping of string to string | {} | Literal environment variables every worker for this repo gets. See env. |
env_passthrough | list of strings | [] | Names of variables to carry over from the server's own environment, for what the worker allowlist doesn't cover. See env. It may not name a variable a forge account's env source reads. |
Policy and sandbox
| Field | Type | Default | Meaning |
|---|---|---|---|
policy | mapping | unset | The repository policy layer, applied after policy.yaml and before the chain, and only ever tightening what policy.yaml allows. See policy. |
deny_tools | list of strings | [] | Tool names withheld from every agent task on this repo. Part of the repository policy layer, frozen into each work item when it is filed. See policy. |
steering | list of strings | [] | Names of library.yaml steering profiles given to every agent launch on this repo, before the task's own steering. Frozen into each work item when it is filed. See Repository steering. |
sandbox | mapping, or false | unset | Runs this repo's task processes in a container, or under the host's own process sandbox. Its keys and rules are on the sandbox page. |
worktrees | boolean | true | false runs this repo's items in place, in its own checkout, rather than in a worktree each. Refused beside a sandbox. See worktrees. Added in 2.1 |
Review and CI
| Field | Type | Default | Meaning |
|---|---|---|---|
automated_review | {bot: LOGIN} or {check: NAME}, or a list of them | unset | The automated reviewers a chain's mr.automated_review task waits for. A list names several; [] names none. Unset: the task expects none. See Automated review. Added in 2.4 |
ci_checks | boolean | true | Set false on a repo with no CI, so both CI waits pass at once instead of waiting on checks that never come. See ci_checks. |
post_merge_publish_jobs | list of globs | [] | Failed-job names that count as publish jobs, such as a deploy to Pages. A red post-merge pipeline whose every failed job matches still files the follow-up bead but pauses no item. See post_merge_publish_jobs. Added in 2.6 |
library_auto_update | boolean | false | Take text-only changes to this repo's accepted repo library without a person. |
Field details
enabled
- It governs auto-intake and what an agent may file. You can still file and run items on a disabled repo from your own terminal, and running items keep going.
- An absent key counts as enabled.
- Kraft refuses an edit that would leave an enabled repo with neither a
test_command(""counts) nortest_scopes. - Only a person sets
enabled: true. The API refuses it from an agent, and refuses an agent's change to any connected repo's commands.
When connect finds no command says what connect saves disabled, and what an agent can't file on a disabled repo.
default_chain
An item that names no chain gets it however it is filed: kraft item create, the MCP tool, the board, the API, POST /api/triggers or auto-intake.
Unset or default, it gives way to the chain <id>:default of the repo's repo library, when the library is accepted and has one. Name another chain here to keep the instance's own. Accepting a repo library writes an id on the entry when it has none.
A file with the older default_chain_template is read, and saved as default_chain.
models
It applies above the harness profile's own defaults:, below a task's model: or agent profile: and the work item's override. It is keyed by harness profile because one model name means nothing to another provider. The retired default_model key is dropped with a warning.
setup_command
""means "deliberately nothing", which is the No setup needed switch in Settings › Repos.- An absent value stops the repo's next work item rather than guessing.
- On a sandboxed item it runs as
sh -cinside the sandbox, never on the host. Without Docker the item stops.
How connect proposes commands says how connect proposes it.
test_command
- It runs from the worktree root without a shell.
""declares a repo with no tests (docs, infrastructure): verification passes and its session says so. It is the No tests switch in Settings › Repos.- A repo with neither this nor
test_scopesstops that verification for you rather than inventing a command. - Verification ignores it while
test_scopesis set: the scopes are what runs. For a repo with more than one project, connect saves the first scope's command here, beside the scopes, so it doesn't cover every path.
How connect proposes commands says how connect proposes it.
test_scopes
Every command runs from the repository root, without a shell, so one for a project in a subdirectory names that directory itself: sh -c 'cd frontend && npm test' (what connect proposes) or npm --prefix frontend test, not npm test. A command whose own word is a shell operator (&&, |, ;, >) is refused, and named, when it would run, rather than run with the operator as an argument and the rest ignored.
Kraft doesn't synthesise test_scopes from test_command: the two stay independently editable. How the scopes run is in How test scopes run.
targeted_command
Added in 2.4
A scope may name a second command that runs only the tests a change affects. It is optional, and an area's scopes (areas.<name>.verification.test_scopes) take it too. Verification runs it in place of command, in its first round and in every repair round. A bare test_command takes none: write a scope. What it receives is in Targeted commands.
Loading refuses an entry where a command string could name two scopes, because sessions are told apart by their command:
- an empty or blank
targeted_command, or one that is the scope's owncommand; - two scopes with the same
commandbut differenttargeted_command; - a
targeted_commandequal to another scope'scommand, to another scope'stargeted_command, or to an area'ssetup.
Commands compare after shell splitting, so just test and just test are one string.
concurrency_group
Added in 2.6
Two scopes that name the same group never run together on one machine. See Scopes that share a group.
test_scopes:
- paths: ['src/**', 'tests/**']
command: just ci-test
targeted_command: just test-targeted
concurrency_group: heavy
A name is lowercase letters, digits, - and _, starting with a letter. Scopes with the same command must name the same group. In Settings, a scope with a group starts with it in brackets and a space: [heavy] src/** => just ci-test => just test-targeted. Without the space, [heavy]src/** is a path.
areas
An area's test scopes join the repo's and are selected by changed paths the same way. Its setup runs once before the first of its scopes runs. Areas are never forge targets.
carry
Added in 2.4
Files a test-selection tool keeps its state in, such as testmon's .testmondata. They follow local_files' rules: literal file paths inside the repo, no globs or directories, covered by the worktree's .gitignore, and never listed in both. Kraft seeds them into every new worktree and saves them back, so the tool doesn't start cold in each one. When it seeds and saves is in State that carries between worktrees.
env
env sets literal variables every worker for this repo gets, on top of the worker's allowlist. env_passthrough names variables the server already has that the allowlist leaves out. Both are layered on the allowlist, which isn't the server's whole environment: Passed to workers lists it, and Added by the repo says what stays behind unless you name it here.
A sandboxed worker gets none of the allowlist, only what Sandboxed workers lists, which covers the server's proxy, an extra CA, and each env_passthrough name, forwarded by name so its value never appears on the docker command line.
policy
It takes any of:
allowed_tools,deny_tools,grants,sandbox,allowed_harnesses,escalation_harness,timeout_minutesandmax_attempts- the four caps (
time_cap_minutes,total_time_cap_minutes,token_budget,budget_usd), each the work item's own, withinmaxima.work_item
deny_tools is frozen into each work item when it is filed, and a later addition still applies to running items.
It binds every work item filed in this repo, whatever its chain. A value policy.yaml refuses makes intake refuse the item. See Policy fields.
Repository steering
steering: [name, ...] names steering profiles in library.yaml, the same ones a task's steering: selects (see the library reference). There is no other steering store.
- When a work item is filed, Kraft resolves each name to its steering profile's
instructionsand freezes the text into the item. Editing a steering profile reaches items filed afterwards and never one already filed. - A name the library doesn't define is refused when the repository is saved (Settings › Repos) and when an item is filed. A library save that removes a steering profile a repository still names is refused too.
- You write steering profiles in Templates › Library, which edits
library.yaml.
How the profiles reach an agent is in Steering profile.
Pull-request rules
Added in 2.5
A repo can keep its own rules for driving a merge request in a skill: the checks to run before a change, how to regenerate generated files, what its reviews and CI expect. Claude Code reads the same file before it works a merge request in the cloud.
A task that declares the pr_rules input is told where that file is, by path and to follow it. Kraft never copies the file into the prompt. It points at the first of these committed on the item's branch:
.claude/skills/steward/SKILL.md.agents/skills/steward/SKILL.md.claude/skills/babysit/SKILL.md.agents/skills/babysit/SKILL.md
A file on disk that isn't committed doesn't count, so a skill a setup step copies into the worktree is never taken for the repo's rules. With none of the four, the task is told nothing.
The shipped library declares pr_rules on the tasks that work a merge request: repair_mr_feedback, triage_review_feedback, repair_mr_checks, repair_merge_queue_failure and describe_mr. Where the rules say to push, merge or post to the merge request, the agent leaves that to Kraft.
worktrees
Added in 2.1
worktrees: false makes the repo's items run in place: in the folder path names, on their own branches, one at a time, with no setup_command and no local_files. kraft repo connect --in-place writes it.
- An item may say otherwise when it is filed (
kraft item create --in-placeor--worktree), and its choice is frozen then. A later change here moves no item already filed. - An entry with
worktrees: falseand asandboxdoesn't load: in-place items can't be sandboxed. The message names both settings. - A workspace item never runs in place: one filed on a
worktrees: falseroot is refused until you file it with--worktree.
Automated review
automated_review names one reviewer, or a list of them, each named one of two ways. They are the reviewers a chain's mr.automated_review task waits for.
bot: <login>settles when that forge login has finished with the merge request's current head.check: <name>settles when that check run or commit status on the head completes. Success is clean. Failure is actionable, with its output as the finding.
Reviewers can be named in three places. The nearest wins, and its list is the whole list:
- The item's own
reviewersoverride on the review node:kraft item set-node-override --node N --reviewer bot:LOGIN. - This repo's
automated_review. - The review task's
reviewersin the chain or library.
[] counts as naming reviewers, meaning none: automated_review: [] turns the review off even when the chain's task lists bots. A reviewer with both bot and check, or neither, is refused when the file loads. Unset here and everywhere else, the repository expects no automated review: the task settles clean at once and records automated_review_not_configured.
How the wait treats what a reviewer said, and when it ends, is in How review and CI waits settle.
ci_checks
The two waits are a chain's mr.ci task before the merge and its mr.post_merge_ci task after it. Each records ci_not_configured when it passes at once because ci_checks is false. It doesn't touch mr.automated_review or mr.external_approval, nor ci.pipeline, which waits for the pipeline you named. With ci_checks left on, a post-merge commit with no CI run can still pass early: see How review and CI waits settle.
post_merge_publish_jobs
Added in 2.6
After a merge, mr.post_merge_ci reads the target branch's pipeline. When it settles red, Kraft files a follow-up bead and pauses every running item whose base is the merged commit, because the commit may be broken. A failed deploy says nothing about the code, so list your publish jobs here and a pipeline whose failed jobs all match is reported without pausing anyone. The bead is titled post-merge publish failed on <branch> so a person still hears about it.
Each entry is a glob matched against the job name, ignoring case; for a name shaped workflow / job, the part after the last / is tried too. The default is []: no job is exempt, and any red post-merge pipeline pauses items. One failed build or test job next to a failed deploy still pauses them.
post_merge_publish_jobs: ["deploy", "deploy-*", "publish", "publish-*"]
In this section
- How connect proposes commands: how
kraft repo connectproposes setup and test commands, and what to do when it finds none. - detectors.yaml:
detectors.yaml, where you teach connect your own conventions, and the toolchains Kraft ships. - Workspaces: a root repository with other repositories mounted as submodules.