Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xantorres/repokernel/llms.txt

Use this file to discover all available pages before exploring further.

repokernel.config.yaml lives at the root of your repository and is the single source of policy truth for every RepoKernel behavior. No project-specific logic lives in framework code — all sprint rules, lane policies, worktree naming, and gate thresholds are driven exclusively from this file. Generate the default layout with rk init --commit.
The schema is strict: unknown top-level keys produce a CONFIG_INVALID (P0) finding and the CLI exits 1. If the file is missing or unreadable entirely, validation-style commands exit 2 and rk doctor renders setup guidance.

Top-level required fields

Every repokernel.config.yaml must include these four keys at the top level.
FieldTypeDescription
schemaVersion1Must be exactly 1. Any other value produces a P0 finding.
projectIdstringStable identifier for the project. Used in generated registry metadata.
projectNamestringHuman-readable project name.
pathsobjectDirectory paths for each entity type. See the paths section below.
One additional optional top-level field is available.
FieldTypeDescription
requiresstringMinimum rk version required to load this config. When set, rk exits with a CONFIG_REQUIRES_NOT_MET finding if the running binary is older than this value.

paths

All path values must be repo-relative. Absolute paths, .. segments, and NUL bytes are rejected as CONFIG_INVALID. Every key except decisions and next is required.
KeyRequiredDefaultPurpose
epicsyes.repokernel/plan/epicsDirectory of epic Markdown files
sprintsyes.repokernel/plan/sprintsDirectory of sprint Markdown files
reviewsyes.repokernel/plan/reviewsDirectory of review Markdown files
queuesyes.repokernel/plan/queuesDirectory of queue lane files
lanesyes.repokernel/plan/lanesDirectory of lane files
generatedyes.repokernelRoot directory for generated artifacts
registryyes.repokernel/registry.jsonPath where the registry file is written
decisionsno.repokernel/plan/decisionsReserved for future ADR validation
nextnoomittedPath to the NEXT.md slot file, when the NEXT.md slot system is in use.

policies

All fields are optional. Defaults are applied when omitted.
FieldTypeDefaultDescription
allowedStatusesstring[]all 8 canonicalSprint statuses considered valid in this project. Unlisted canonical statuses produce SPRINT_STATUS_NOT_ALLOWED.
requireReviewForShippedbooleantrueShipped sprints with review_required: true must have an accepted review.
requireBaseShaForActivebooleantrueActive sprints must have base_sha.
requireEndShaForShippedbooleantrueShipped sprints must have end_sha.
allowMultipleActivePerLanebooleanfalseIf false, multiple active sprints in one lane produce MULTIPLE_ACTIVE_SPRINTS_IN_LANE.
defaultLanestringmainLane used by rk next and rk status when no lane is specified.
severityFailThresholdP0|P1|P2|P3P1Findings at or above this severity block rk next and cause rk validate to exit 1.
skippedSprintIdsstring[][]Sprint IDs reserved as deliberate numbering gaps. The allocator skips these when assigning new IDs.
requireReviewForShippedFromSprintIdpositive intomittedNumeric threshold at and above which a review is required to ship, regardless of the review_required frontmatter flag.

git

FieldTypeDefaultDescription
requireCleanWorkingTreeForClosebooleantruerk close refuses dirty worktrees.

generated

Tracks files whose content is fully derived from planning state. Reserved for future drift detection.
FieldTypeDefaultDescription
filesstring[][]List of repo-relative paths whose drift is tracked. Reserved for future use.

worktrees

Controls how RepoKernel creates and names Git worktrees for epic and sprint isolation.
FieldTypeDefaultDescription
rootstring../.repokernel-worktreesRoot directory for managed worktrees. May be absolute or relative to the main checkout.
branchPrefixstringrk/Prefix for managed branches. Epic default: <prefix>epic/<epic-id>. Sprint default: <prefix>sprint/<epic-id>/<sprint-id>.
baseBranchstringmainBranch used as the base when creating a new epic worktree.
autoAcquirebooleantruerk run creates or reuses the epic worktree automatically.
branchPatternstringomittedCompatibility shorthand. Without {sprintId} applies to epic branches; with {sprintId} applies to sprint branches.
epicBranchPatternstringomittedExplicit epic branch template. Cannot contain {sprintId}.
sprintBranchPatternstringomittedExplicit sprint branch template. Must contain {sprintId}.

Branch pattern tokens

TokenReplaced withNotes
{branchPrefix}Value of worktrees.branchPrefix (default rk/)Verbatim substitution.
{epicId}Epic ID, e.g. E-001Always available.
{sprintId}Sprint ID, e.g. S-003Sprint-level only. epicBranchPattern cannot use it; sprintBranchPattern must use it.
The tokens {ticket} and {slug} are reserved for a future release and are rejected at render time with a CONFIG_INVALID error. Patterns are validated at config load: no whitespace or ASCII control characters, no .., //, \\, @{, no leading or trailing /, no trailing . or .lock, and no ~, ^, :, ?, *, [, ] outside token braces. All {...} braces must be matched.
# Explicit separate patterns (recommended for teams)
worktrees:
  epicBranchPattern: "feature/epic/{epicId}"
  sprintBranchPattern: "feature/sprint/{epicId}/{sprintId}"
# epic branch:   feature/epic/E-001
# sprint branch: feature/sprint/E-001/S-003
# branchPattern shorthand — no {sprintId} → applies to epic branches only
worktrees:
  branchPattern: "feature/{epicId}"
# epic branch:   feature/E-001
# sprint branch: rk/sprint/E-001/S-003  (default)
# branchPattern shorthand — with {sprintId} → applies to sprint branches only
worktrees:
  branchPattern: "wip/{epicId}/{sprintId}"
# epic branch:   rk/epic/E-001  (default)
# sprint branch: wip/E-001/S-003
A pattern change mid-project does not rename existing branches. New worktree acquisitions use the new pattern; previously created branches remain until renamed manually. Git also cannot store both feature/E-001 and feature/E-001/S-001 as branch refs — use distinct namespaces such as feature/epic/... and feature/sprint/....

start

Governs rk start worktree acquisition. The worktrees.* keys still supply the acquisition mechanics; worktrees.autoAcquire still governs rk run.
FieldTypeDefaultDescription
worktreeauto|always|neverautoWhen rk start acquires an isolated sprint worktree. auto acquires only when RepoKernel owns the environment (not already inside a worktree, not under an external agent or editor). always acquires unless already inside a worktree. never is metadata-only.
Override per-invocation with rk start --worktree or rk start --no-worktree.

automation

FieldTypeDefaultDescription
allowAutonomousClosebooleanfalseMust be true before rk run --mode autonomous can close sprints without human review.
defaultModeassisted|autonomousassistedDefault automation mode.
defaultAgentstringmanualAgent used when rk run is invoked without --agent.
defaultReviewerstringagentLegacy fallback reviewer name for review stubs.
reviewerstringomittedReviewer name written into stubs created by rk review, rk review-create, rk review-allocate, and rk create review. Takes precedence over defaultReviewer when set.
checksCmdstringomittedShell command run by sprint and epic gates. Non-zero exit blocks the flow. Mutually exclusive with checksPhases.
checksPhasesobjectomittedPhase-by-phase gate commands (check, typecheck, build, test) run in order until first failure. Mutually exclusive with checksCmd.
checksTimeoutSecondspositive int1800Wall-clock timeout in seconds for checksCmd. On expiry the process receives SIGTERM then SIGKILL.
binarystringomittedExpected rk binary path or PATH-resolvable command. rk doctor reports when the running binary does not match.
reviewersobjectomittedPer-reviewer gate configurations, keyed by reviewer name. Each entry carries model, authMode, rubricExtras, and schemaPath.
automation:
  reviewer: codex
  defaultReviewer: human
  checksCmd: pnpm lint && pnpm typecheck && pnpm test
  allowAutonomousClose: false

review

Controls automated review-creation behavior.
FieldTypeDefaultDescription
auto.whengates_green|neverneverWhen rk automatically creates a review stub after gates pass. gates_green creates a stub when all sprint gates are green. never disables automatic review creation.

parallel

FieldTypeDefaultDescription
maxConcurrentSprintspositive int4Default upper bound for sprints per parallel wave.
conflictStrategyblockblockParallel sprints with overlapping allowed_paths are blocked. The only supported value is block.
allowOverlapFlagbooleanfalseMust be true before rk run --allow-overlap is accepted.
maxConcurrentSprintsByStateobject{}Per-state concurrency caps. The effective cap for any sprint is the minimum of maxConcurrentSprints and the matching per-state value.
parallel:
  maxConcurrentSprints: 6
  maxConcurrentSprintsByState:
    review: 1
    active: 6
    pending: 2
  allowOverlapFlag: false

chaining

FieldTypeDefaultDescription
enabledbooleanfalseEnables chain preview commands.
maxSprintsPerRunpositive int1Default cap for chain-oriented flows.
requireReviewBetweenSprintsbooleantrueRequires review checkpoints between chained sprints.
stopOnSeverityP0|P1|P2|P3P1Severity at which chaining halts.
sameEpicOnlybooleantrueChain resolution is scoped to the target epic.
sameLaneOnlybooleantrueChain resolution is scoped to the selected lane.
chaining:
  enabled: true

pathPolicy

Project-level path-scope escape hatches merged into every sprint’s effective policy at gate time. Useful for cross-cutting files (such as a root lockfile) that nearly every sprint touches without being out-of-scope.
FieldTypeDefaultDescription
alwaysAllowedstring[][]Repo-relative globs treated as in-scope for every sprint that declares allowed_paths.
alwaysGeneratedstring[][]Repo-relative globs treated as generated output for every sprint (e.g. pnpm-lock.yaml).

agents

Define named external agent adapters. Each key under agents becomes a valid --agent name for rk run.
FieldTypeRequiredDescription
commandstringyesPath to the executable or script.
argsstring[]noArguments passed to the command. Supports placeholders (see below).
resultFormatstringyesMust be sentinel-json.
timeoutSecondspositive intnoSeconds before the agent process is killed (default: 1800).
envPassthroughstring[]noExtra environment variable names passed through to the agent. By default only a minimal allowlist is passed.
Arg placeholders:
PlaceholderValue
{packet_path}Absolute path to the context packet JSON
{worktree}Absolute path to the agent’s working directory
{sprint_id}Sprint ID (e.g. S-001)
{run_id}Run ID (e.g. RUN-001)
{epic_id}Epic ID (e.g. E-001)
{op_root}Root of the main checkout
{registry_path}Absolute path to registry.json
{mode}assisted or autonomous
agents:
  my-agent:
    command: ./scripts/run-agent.sh
    args:
      - "{packet_path}"
      - "{worktree}"
    resultFormat: sentinel-json
    timeoutSeconds: 1800

routing

Cost-aware agent routing rules. Tiers are opaque names ordered cheap → expensive; the consuming skill or local config maps tier names to concrete model IDs. Rules are evaluated in order and the first match wins.
FieldTypeDefaultDescription
tiersstring[]["light","standard","heavy"]Ordered list of tier names from cheapest to most expensive. Must be unique, between 2 and 8 entries.
rulesobject[][]Up to 16 routing rules. Each rule has an id, a when predicate map, and a then object specifying tier and optional fanout.
Each rule object:
FieldTypeRequiredDescription
idstringyesLowercase identifier matching [a-z][a-z0-9_-]*, max 60 chars. Must be unique within the rules array.
whenobjectyesFlat map of signal-to-value predicates. Supported signals: profile, est_tokens, allowed_paths_count, depends_on_count, ac_count, review_required, gate, lane, extras_complexity. Operator suffixes _lt, _lte, _gt, _gte are supported; bare key means equality.
then.tierstringyesTarget tier name. Must exist in routing.tiers.
then.fanoutobject[]noUp to 8 sub-task entries, each with id and tier.
routing:
  tiers: [light, standard, heavy]
  rules:
    - id: large-sprint
      when:
        est_tokens_gt: 8000
      then:
        tier: heavy
    - id: review-lane
      when:
        lane: review
      then:
        tier: standard

Complete example

The following is a representative repokernel.config.yaml covering common configuration options.
schemaVersion: 1
projectId: my-project
projectName: My Project
paths:
  epics: .repokernel/plan/epics
  sprints: .repokernel/plan/sprints
  reviews: .repokernel/plan/reviews
  queues: .repokernel/plan/queues
  lanes: .repokernel/plan/lanes
  generated: .repokernel
  registry: .repokernel/registry.json
policies:
  severityFailThreshold: P1
  defaultLane: main
automation:
  checksCmd: pnpm lint && pnpm typecheck && pnpm test
worktrees:
  baseBranch: main
For the full schema with all defaults, see the Zod schema source.

Build docs developers (and LLMs) love