prdddDocsOpen viewer ↗

.cairn/config.json

FieldTypeRequiredDefaultDescription
attemptsobjectno{"maxAttempts":3,"tasks":{}}When a task that keeps failing stops being tried again.
attempts.maxAttemptsintegerno3How many failed attempts end a task: it stays failed and the orchestrator does not start it again.
attempts.maxCostUsdnumberno—The known cost, in US dollars, at which a failed task ends the same way. No limit when unset.
attempts.tasksmap of objectno{}Limits for single tasks, by task ID, that replace maxAttempts or maxCostUsd for that task.
attempts.tasks.<key>.maxAttemptsintegerno—This task's attempt limit, in place of maxAttempts.
attempts.tasks.<key>.maxCostUsdnumberno—This task's cost limit, in US dollars, in place of maxCostUsd.
routingobjectno{"adaptive":false,"minTasks":5,"window":30,"explore":0,"thresholds":{"firstPass":0.6},"catalog":{"version":"legacy","models":[]},"prefer":{"subscriptionsFirst":true,"faster":false}}How tasks are matched to models: the models there are, what this machine can run, and what past results recommend.
routing.adaptivebooleannofalseWhether a recommendation from past results changes a task's model. When off, it is recorded and shown only.
routing.minTasksintegerno5How many finished tasks in a category a candidate needs before its past results count. A candidate is one model ID at one reasoning level in one harness.
routing.windowintegerno30How many of a candidate's latest finished tasks in a category its past results read.
routing.explorenumberno0The share of ungated tasks, from 0 to 1, whose recommendation is the second-ranked candidate, to gather evidence. It changes a task's model only when adaptive is on, and needs at least two ranked candidates. A hash of the task's ID picks the tasks, so every run picks the same ones.
routing.thresholdsobjectno{"firstPass":0.6}What a model's past results must reach for it to be recommended.
routing.thresholds.firstPassnumberno0.6The smallest share of its tasks a model must finish on the first attempt.
routing.thresholds.hoursnumberno—The longest median time to finish a task, in hours. No limit when unset.
routing.catalogobjectno{"version":"legacy","models":[]}The models tasks can be routed to. With no models, it is built from judge.models.
routing.catalog.versionstringyes"legacy"Which version of the catalog this is.
routing.catalog.modelsarray of objectyes[]The models, each with its routes, harnesses and prices.
routing.catalog.models[].namestringyes—The name a task's model holds, such as sonnet.
routing.catalog.models[].idstringyes—The provider's exact model ID, such as claude-sonnet-5-5.
routing.catalog.models[].providerstringyes—The provider that serves the model.
routing.catalog.models[].reasoningarray of "low" or "medium" or "high" or "xhigh" or "max"yes—The reasoning levels the model supports.
routing.catalog.models[].descriptionstringyes—What the model is good at, in a sentence or two. The judge reads it when it chooses a task's model.
routing.catalog.models[].harnessesarray of stringyes—The agent CLIs that can run the model, such as claude-code or codex.
routing.catalog.models[].routesarray of "subscription" or "api" or "gateway" or "unified"yes—The ways the model can be reached: subscription, api, gateway or unified.
routing.catalog.models[].pricesarray of objectyes—The model's prices, each with the date it took effect.
routing.catalog.models[].prices[].effectivestringyes—The date these rates took effect, as YYYY-MM-DD.
routing.catalog.models[].prices[].sourcestringyes—The page the rates came from.
routing.catalog.models[].prices[].tierstringno—The pricing tier the rates are for, when the provider has several.
routing.catalog.models[].prices[].inputPerMToknumberyes—US dollars per million input tokens.
routing.catalog.models[].prices[].cachedInputPerMToknumberyes—US dollars per million cached input tokens.
routing.catalog.models[].prices[].outputPerMToknumberyes—US dollars per million output tokens.
routing.catalog.models[].prices[].cacheWritePerMToknumberno—US dollars per million tokens written to the cache.
routing.catalog.models[].prices[].longContextobjectno—The rates for a call whose prompt is longer than above tokens.
routing.catalog.models[].prices[].longContext.aboveintegeryes—The prompt length, in tokens, above which these rates apply.
routing.catalog.models[].prices[].longContext.inputPerMToknumberyes—US dollars per million input tokens.
routing.catalog.models[].prices[].longContext.cachedInputPerMToknumberyes—US dollars per million cached input tokens.
routing.catalog.models[].prices[].longContext.outputPerMToknumberyes—US dollars per million output tokens.
routing.accessarray of objectno—The routes and providers this machine can reach models through. A catalog model needs one to be chosen.
routing.access[].route"subscription" or "api" or "gateway" or "unified"yes—How the models are reached: subscription, api, gateway or unified.
routing.access[].providerstringyes—The provider this access is with.
routing.access[].models"all" or array of stringyes—The catalog names of the models it covers, or all.
routing.access[].notestringno—A note for people, such as which account this is.
routing.harnessesarray of stringno—The agent CLIs this machine can start, such as claude-code, codex or pi. A catalog model needs one to be chosen.
routing.preferobjectno{"subscriptionsFirst":true,"faster":false}How a recommendation weighs subscriptions, cost and speed.
routing.prefer.subscriptionsFirstbooleannotruePut models reached through a subscription ahead of the others. Recommended from past results, they are ordered by API-equivalent cost per verified task; chosen by the judge, by its score.
routing.prefer.ceilingUsdnumberno—A spending limit for choosing models, in US dollars per verified task. Recommendations from past results leave out a model whose known cost is above it and keep one with no known cost. While it is set, the judge chooses automatically only among models reached through a subscription or priced at zero, since a price alone cannot bound a task's cost. It does not cap what a task spends.
routing.prefer.fasterbooleannofalseNotes a preference for faster completion on the judge's recommendations. It does not change which model is chosen: no timing evidence is used yet.
categoriesarray of objectno[{"description":"Renames, moves and config changes","name":"mechanical"},{"description":"New behaviour a person can use","name":"feature"},{"description":"Interface and presentation","name":"ui"},{"description":"Tests of existing behaviour","name":"test"},{"description":"Data shapes, schemas and migrations","name":"schema"},{"description":"Restructuring with no change in behaviour","name":"refactor"},{"description":"Fixing a defect","name":"bugfix"},{"description":"Documentation","name":"docs"}]The kinds of task a plan can have. Results are compared per category, and the judge checks each task's.
categories[].descriptionstringyes—What the category covers. The planner's prompt lists it beside the name.
categories[].namestringyes—The category's name, as a task's category holds it.
conflictsobjectno{"additive":["/index.ts"],"generated":["pnpm-lock.yaml","/demo-trace.json","packages/contract/schema/**"],"high":0.5,"history":500,"hotspot":3}How planning scores the chance that two tasks change the same code.
conflicts.additivearray of stringno["**/index.ts"]Path patterns, matched as humanPaths are, for files tasks only add lines to, such as an index of exports. Two tasks that both change one score low.
conflicts.generatedarray of stringno["pnpm-lock.yaml","/demo-trace.json","packages/contract/schema/"]Path patterns for files a restack rebuilds, such as a lockfile. Two tasks that both change one do not conflict over it.
conflicts.highnumberno0.5The score, from 0 to 1, at which two tasks count as likely to conflict. prd plan stacks such a pair of new tasks one on the other when it can, and recommends an order when it cannot.
conflicts.historyintegerno500How many commits of the base branch to read to learn which files change together.
conflicts.hotspotintegerno3How many tasks that can run at the same time must share one source file before planning checks whether the file can be split.
humanPathsarray of stringno["/migrations/","/migrate/","/auth/","/payments/","infra/",".github/workflows/"]Path patterns for high-trust files, such as migrations and auth. A task that changes a matching file waits for a person's approval.
judgeobjectno{"automaticRouting":true,"flag":0.3,"maxRounds":2,"minProbability":0.5,"model":"jev-1.14.0","models":{"haiku":"Mechanical changes: a schema field, a rename, a command wired to existing code","sonnet":"Most tasks: a feature or service with its tests across a few files","opus":"Logic where a subtle bug costs a lot: derivation, ordering, redaction, concurrency"},"pass":0.7}The decision model that checks the plan at each planning step.
judge.automaticRoutingbooleannotrueWhether the judge's confident choice of model changes a task's model. When off, the choice is recorded and shown only.
judge.baseUrlstringno—Where to send judge requests in place of TypeSafe, such as a Cloudflare AI Gateway. Required when gatewayTokenEnv is set.
judge.flagnumberno0.3An answer whose probability is below this is flagged. Must be less than pass.
judge.maxRoundsintegerno2The most rounds of judging the section size check and the task size check each run. Before the last round, what the judge confidently finds too large is split; what is still too large in the last round is flagged.
judge.gatewayTokenEnvstringno—The name of the environment variable that holds an AI Gateway token, never the token itself. Needs baseUrl.
judge.minProbabilitynumberno0.5The probability a rated or classified answer's label needs to count. Below it the answer is unsure, and the planner's choice stands.
judge.modelstringno"jev-1.14.0"The TypeSafe decision model to ask.
judge.modelsmap of stringno{"haiku":"Mechanical changes: a schema field, a rename, a command wired to existing code","sonnet":"Most tasks: a feature or service with its tests across a few files","opus":"Logic where a subtle bug costs a lot: derivation, ordering, redaction, concurrency"}The model names a task can use, each with when to use it. The judge chooses among them when routing.catalog has no models.
judge.passnumberno0.7An answer whose probability is at or above this passes. Between flag and pass it is unsure.
plannerobjectno{"cli":"claude","provider":"anthropic","source":"cli"}The model that writes the spec and drafts the tasks.
planner.baseUrlstringno—Where to send API requests in place of the provider, such as a Cloudflare AI Gateway. Required when provider is openai-compatible, or when gatewayTokenEnv is set.
planner.cli"claude" or "codex"no"claude"The agent CLI that plans when source is cli.
planner.effortobjectno—How hard the model thinks at each planning step. Only the claude CLI reads it; a step with no level runs at the CLI's own.
planner.effort.spec"low" or "medium" or "high" or "xhigh" or "max"no—The level for writing spec sections.
planner.effort.tasks"low" or "medium" or "high" or "xhigh" or "max"no—The level for drafting tasks.
planner.gatewayTokenEnvstringno—The name of the environment variable that holds an AI Gateway token, never the token itself. Read when source is api, and needs baseUrl.
planner.keyEnvstringno—The name of the environment variable that holds the API key, when it is not the provider's usual one.
planner.modelstringno—The model that plans. Required when source is api; with a CLI, leaving it out lets the CLI choose.
planner.provider"anthropic" or "openai" or "openrouter" or "openai-compatible"no"anthropic"The API to call when source is api.
planner.smallstringno—A cheaper model for the small calls: indexing a section and splitting a section or a task. Defaults to model.
planner.source"cli" or "api"no"cli"cli plans with an agent CLI on this machine, under its own sign-in; api calls a provider with an API key.
redactobjectno{"deny":[]}What else to remove from session logs before they are stored.
redact.denyarray of stringno[]Strings to redact from stored session logs, on top of the secrets prddd finds itself. A match inside a string value is replaced; a match in a JSON key, a number or another non-string value stops the session being stored.
version1no1The config format's version. 1 is the only one.