Configure autonomy and per-stage engine and model
Decide how far unattended runs go, and which engine, model and effort each stage of the delivery cycle uses.
Goal: set until and the gates in ## Autonomy, then give every stage of the cycle its own engine, model and effort with a workflow profile.
Prerequisites
tech/automation.md(every key)- The cycle scripts installed in
.claude/skills/pair-workflow-cycle/scripts/ - For a profile: the engines it names installed, and
pair.config.jsonat the project root
Steps
How far a run goes
- Set
## Autonomy-
In your assistant: edit
until,prepare,mergeandfilterintech/automation.md. -
With
/pair-assistant(optional, Claude Code): "let green cards go up to merge" shows the diff first, then writes it through record-decision.
-
- Check the effective values
- With pair-cli:
node .claude/skills/pair-workflow-cycle/scripts/autonomy-policy.mjs resolveprints each value with its source (argument, adoption, KB default). - With
/pair-assistant(optional, Claude Code): it echoes the effective gates.
- With pair-cli:
- Override per run when needed
- With pair-cli:
--until,--prepare,--mergeonpair-cli run --card(forwarded to every child card under--parallel).
- With pair-cli:
Engine, model and effort per stage
-
Write the profile in
pair.config.json, inline or as a file under a glob.-
In your assistant:
pair.config.json Per stage,
engine(default,pi,opencode,claude,codex),model(default, an id,cheap/balanced/frontier,by-tier),effort(default,low,medium,high,xhigh,max) andcontext(fresh,reuse;reuseonly intoprepareandgreen). A stage declares only what differs fromdefaults. With pair-cli,effortreachesclaudeandcodex; for other engines the run warns and marks itignoredin the table. -
With
/pair-assistant(optional, Claude Code): "use profile mixed for the review" shows the edit, then records it as an ADL.
-
-
Let the model follow the risk tier (optional): set
"model": "by-tier"and add totech/automation.md:An untagged card or a tier the policy omits runs on the engine's default model, never a halt.
-
Print the resolved table
- With pair-cli:
node .claude/skills/pair-workflow-cycle/scripts/workflow-profile.mjs resolve --root . --profile mixed --tier risk:green. The JSON'stablehas one line per stage with engine, model, effort and context, each with the level that decided it. A run prints the same table before its first dispatch.
- With pair-cli:
-
Pick the profile per run
- With pair-cli:
pair-cli run --card 217 --profile mixed, or--workflow-config ./file.jsonfor an external file used verbatim. Both also work with--root,--paralleland--watch: every child card gets the same flag. - In your assistant:
/pair-workflow-cycletakes the same as$profileand$workflowConfig.
- With pair-cli:
Cascade, highest first: --workflow-config > --profile > workflowProfiles.default > KB default (the run's engine, its default model, default effort, fresh context). An unknown name or a bad value halts (profile-unresolved, profile-invalid, profile-name-collision), never a silent fallback.
Verify
autonomy-policy.mjs resolveprints each gate with its source; defaults areuntil: pr,prepare: always,merge: always: nothing merges and no Draft card is prepared unattended until you change them.workflow-profile.mjs resolveprintsProfile: mixed, its source and hash, then a line per stage; with no profile it printsProfile: KB default.- A stage asking
context: reuseintovalidateorverifyis refused at load, so the independent checks always run fresh.