@workit-dev/pi 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/worker.js CHANGED
@@ -7410,7 +7410,7 @@ var workspaceConfigSchema = object({
7410
7410
  fanout: object({
7411
7411
  tierModels: unknown().optional().describe("The model per slice TIER (mundane, standard, hard), as one name or per host.")
7412
7412
  }).passthrough().optional().describe("Fanout settings."),
7413
- models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead) and whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
7413
+ models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
7414
7414
  resources: unknown().optional().describe("Heavy-check limits on this machine: slots, scope, heavy, light, memoryMax, cpuQuota, wait."),
7415
7415
  remotes: array(nonBlank.refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")).optional().describe("Remote URLs this entry owns: a checkout pushing to or opening PRs on one never exceeds this entry's grants, wherever the folder is (`owner/*` claims a whole owner). Only the user changes it, in their own terminal."),
7416
7416
  autonomy: object(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
@@ -7448,7 +7448,7 @@ var workspaceConfigSchema = object({
7448
7448
  });
7449
7449
  var workspacesFileSchema = object({
7450
7450
  workspaces: array(workspaceConfigSchema).optional().describe("Workspace entries, each mapping a path glob to its forge, policies and grants."),
7451
- models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead) and whether a model the lead names on a spawn wins (allowLeadOverride, default false).")
7451
+ models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false).")
7452
7452
  }).passthrough().superRefine((file, context) => {
7453
7453
  const names = new Set;
7454
7454
  for (const [index, workspace] of (file.workspaces ?? []).entries()) {
@@ -8716,16 +8716,19 @@ var HOST_KEYS = new Set([
8716
8716
  "pi",
8717
8717
  "default"
8718
8718
  ]);
8719
- var BUILT_IN_CLAUDE_CODE = {
8719
+ var CLAUDE_AGENT_FILES = {
8720
8720
  decider: { model: "fable", effort: "high" },
8721
- "implementer.hard": { model: "opus" },
8722
- "implementer.standard": { model: "sonnet" },
8723
- "implementer.mundane": { model: "haiku" },
8721
+ implementer: { model: "sonnet" },
8724
8722
  verifier: { model: "sonnet" },
8725
8723
  reviewer: { model: "opus" },
8726
- explore: { model: "haiku" },
8727
8724
  babysit: { model: "haiku" }
8728
8725
  };
8726
+ var BUILT_IN_CLAUDE_CODE = {
8727
+ ...CLAUDE_AGENT_FILES,
8728
+ "implementer.hard": { model: "opus" },
8729
+ "implementer.standard": { model: "sonnet" },
8730
+ "implementer.mundane": { model: "haiku" }
8731
+ };
8729
8732
  var isObject3 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
8730
8733
  var name = (value) => typeof value === "string" && value.trim() ? value.trim() : null;
8731
8734
  var leaf = (value) => {
@@ -8809,18 +8812,20 @@ var firstAvailable = (candidates, host, now = new Date) => {
8809
8812
  }
8810
8813
  return { ...primary, skipped, allExhausted: true };
8811
8814
  };
8815
+ var FILE_ROLES = new Set(["decider", "verifier", "reviewer", "babysit"]);
8812
8816
  var CLAUDE_ALIASES = new Set(["sonnet", "opus", "haiku", "fable"]);
8813
8817
  var CLAUDE_EFFORTS = new Set(["low", "medium", "high", "xhigh", "max"]);
8814
8818
  var CLAUDE_SPAWNS = [
8815
- ...["hard", "standard", "mundane"].map((tier) => ({
8816
- label: tier === "hard" ? "workit:implementer hard" : tier,
8819
+ ...MODEL_TIERS.map((tier) => ({
8820
+ label: `workit:implementer ${tier}`,
8817
8821
  selector: { role: "implementer", tier }
8818
8822
  })),
8819
- { label: "workit:verifier", selector: { role: "verifier" } },
8820
- { label: "workit:reviewer", selector: { role: "reviewer" } },
8823
+ ...["verifier", "reviewer", "decider"].map((role) => ({
8824
+ label: `workit:${role}`,
8825
+ selector: { role }
8826
+ })),
8827
+ { label: "workit:babysitter", selector: { role: "babysit" } },
8821
8828
  { label: "Explore", selector: { role: "explore" } },
8822
- { label: "ROLE: decider", selector: { role: "decider" } },
8823
- { label: "ROLE: babysit", selector: { role: "babysit" } },
8824
8829
  { label: "general-purpose", selector: { role: "default" } }
8825
8830
  ];
8826
8831
  var uniformImplementerModel = (cwd, host, dir) => {
package/dist/workit.js CHANGED
@@ -9171,7 +9171,7 @@ var workspaceConfigSchema = object({
9171
9171
  fanout: object({
9172
9172
  tierModels: unknown().optional().describe("The model per slice TIER (mundane, standard, hard), as one name or per host.")
9173
9173
  }).passthrough().optional().describe("Fanout settings."),
9174
- models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead) and whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
9174
+ models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
9175
9175
  resources: unknown().optional().describe("Heavy-check limits on this machine: slots, scope, heavy, light, memoryMax, cpuQuota, wait."),
9176
9176
  remotes: array(nonBlank.refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")).optional().describe("Remote URLs this entry owns: a checkout pushing to or opening PRs on one never exceeds this entry's grants, wherever the folder is (`owner/*` claims a whole owner). Only the user changes it, in their own terminal."),
9177
9177
  autonomy: object(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
@@ -9209,7 +9209,7 @@ var workspaceConfigSchema = object({
9209
9209
  });
9210
9210
  var workspacesFileSchema = object({
9211
9211
  workspaces: array(workspaceConfigSchema).optional().describe("Workspace entries, each mapping a path glob to its forge, policies and grants."),
9212
- models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead) and whether a model the lead names on a spawn wins (allowLeadOverride, default false).")
9212
+ models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false).")
9213
9213
  }).passthrough().superRefine((file, context) => {
9214
9214
  const names = new Set;
9215
9215
  for (const [index, workspace] of (file.workspaces ?? []).entries()) {
@@ -17886,16 +17886,19 @@ var HOST_KEYS = new Set([
17886
17886
  "pi",
17887
17887
  "default"
17888
17888
  ]);
17889
- var BUILT_IN_CLAUDE_CODE = {
17889
+ var CLAUDE_AGENT_FILES = {
17890
17890
  decider: { model: "fable", effort: "high" },
17891
- "implementer.hard": { model: "opus" },
17892
- "implementer.standard": { model: "sonnet" },
17893
- "implementer.mundane": { model: "haiku" },
17891
+ implementer: { model: "sonnet" },
17894
17892
  verifier: { model: "sonnet" },
17895
17893
  reviewer: { model: "opus" },
17896
- explore: { model: "haiku" },
17897
17894
  babysit: { model: "haiku" }
17898
17895
  };
17896
+ var BUILT_IN_CLAUDE_CODE = {
17897
+ ...CLAUDE_AGENT_FILES,
17898
+ "implementer.hard": { model: "opus" },
17899
+ "implementer.standard": { model: "sonnet" },
17900
+ "implementer.mundane": { model: "haiku" }
17901
+ };
17899
17902
  var isObject6 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
17900
17903
  var name = (value) => typeof value === "string" && value.trim() ? value.trim() : null;
17901
17904
  var leaf = (value) => {
@@ -17985,12 +17988,15 @@ var fallbackText = (chosen) => {
17985
17988
  const passed = chosen.skipped.map((one) => `${one.model} (${one.provider} exhausted until ${shortTime(one.until)})`).join(", ");
17986
17989
  return chosen.allExhausted ? `every model configured for it is exhausted: ${passed}; it runs on ${chosen.model} anyway. Add a model of another provider to the list in workspaces.json, then run \`workit models show\`.` : `fell back past ${passed}.`;
17987
17990
  };
17988
- var leadOverrideAllowed = (cwd, dir) => {
17991
+ var modelsKey = (cwd, key, dir) => {
17989
17992
  for (const source of modelSources(cwd, dir))
17990
- if (isObject6(source.models) && Object.hasOwn(source.models, "allowLeadOverride"))
17991
- return source.models.allowLeadOverride === true;
17992
- return false;
17993
+ if (isObject6(source.models) && Object.hasOwn(source.models, key))
17994
+ return source.models[key];
17995
+ return;
17993
17996
  };
17997
+ var leadOverrideAllowed = (cwd, dir) => modelsKey(cwd, "allowLeadOverride", dir) === true;
17998
+ var enforceMode = (cwd, dir) => modelsKey(cwd, "enforce", dir) === "strict" ? "strict" : "advise";
17999
+ var FILE_ROLES = new Set(["decider", "verifier", "reviewer", "babysit"]);
17994
18000
  var CLAUDE_ALIASES = new Set(["sonnet", "opus", "haiku", "fable"]);
17995
18001
  var CLAUDE_EFFORTS = new Set(["low", "medium", "high", "xhigh", "max"]);
17996
18002
  var FULL_CLAUDE_ID = /^(?:[\w.-]+[./])?claude-(?:\d[\d.-]*-)?(sonnet|opus|haiku|fable)(?:[-.@[]|$)/u;
@@ -18016,7 +18022,7 @@ var chooseSpawnModel = (cwd, selector, host, given, accept, dir) => {
18016
18022
  const givenModel = name(given.model);
18017
18023
  const label = roleLabel(selector);
18018
18024
  const configured = resolved.source !== "built-in";
18019
- if (givenModel && (!configured || leadOverrideAllowed(cwd, dir)))
18025
+ if (givenModel && (!configured || enforceMode(cwd, dir) === "advise" || leadOverrideAllowed(cwd, dir)))
18020
18026
  return none;
18021
18027
  const model = accept(resolved.model);
18022
18028
  const effort = resolved.effort && !name(given.effort) ? resolved.effort : null;
@@ -18042,37 +18048,31 @@ var chooseSpawnModel = (cwd, selector, host, given, accept, dir) => {
18042
18048
  model,
18043
18049
  effort,
18044
18050
  basis,
18045
- note: givenModel ? `Workit replaced model ${givenModel} with ${model} on this spawn: role ${label} is set in ${resolved.source}.${why} Next time ${next} on the spawn. To let a spawn's own model win, set "allowLeadOverride": true under models in workspaces.json.` : `Workit set ${model}${effort ? ` (effort ${effort})` : ""} on this spawn: role ${label}, ${resolved.source}.${why}${configured ? "" : " Name a model to choose another."}`
18046
- };
18047
- };
18048
- var claudeSpawnArgs = (cwd, selector, dir) => {
18049
- const choice = chooseSpawnModel(cwd, selector, "claude_code", {}, claudeAgentModel, dir);
18050
- if (!choice.model)
18051
- return null;
18052
- const effort = choice.effort?.toLowerCase() ?? null;
18053
- return {
18054
- model: choice.model,
18055
- effort: effort && CLAUDE_EFFORTS.has(effort) ? effort : null
18051
+ note: givenModel ? `Workit replaced model ${givenModel} with ${model} on this spawn: role ${label} is set in ${resolved.source}.${why} Next time ${next} on the spawn, or set models.enforce "advise" so a named model wins.` : `Workit set ${model}${effort ? ` (effort ${effort})` : ""} on this spawn: role ${label}, ${resolved.source}.${why}${configured ? "" : " Name a model to choose another."}`
18056
18052
  };
18057
18053
  };
18058
18054
  var CLAUDE_SPAWNS = [
18059
- ...["hard", "standard", "mundane"].map((tier) => ({
18060
- label: tier === "hard" ? "workit:implementer hard" : tier,
18055
+ ...MODEL_TIERS.map((tier) => ({
18056
+ label: `workit:implementer ${tier}`,
18061
18057
  selector: { role: "implementer", tier }
18062
18058
  })),
18063
- { label: "workit:verifier", selector: { role: "verifier" } },
18064
- { label: "workit:reviewer", selector: { role: "reviewer" } },
18059
+ ...["verifier", "reviewer", "decider"].map((role) => ({
18060
+ label: `workit:${role}`,
18061
+ selector: { role }
18062
+ })),
18063
+ { label: "workit:babysitter", selector: { role: "babysit" } },
18065
18064
  { label: "Explore", selector: { role: "explore" } },
18066
- { label: "ROLE: decider", selector: { role: "decider" } },
18067
- { label: "ROLE: babysit", selector: { role: "babysit" } },
18068
18065
  { label: "general-purpose", selector: { role: "default" } }
18069
18066
  ];
18070
18067
  var claudeSpawnTable = (cwd, dir) => {
18071
18068
  const rows = CLAUDE_SPAWNS.flatMap(({ label, selector }) => {
18072
- const args = claudeSpawnArgs(cwd, selector, dir);
18073
- return args ? [`${label} ${args.model}${args.effort ? `/${args.effort}` : ""}`] : [];
18069
+ const want = resolveRoleModel(cwd, selector, "claude_code", dir);
18070
+ const model = want && want.source !== "built-in" ? claudeAgentModel(want.model) : null;
18071
+ const effort = want?.effort?.toLowerCase();
18072
+ const file = label.startsWith("workit:") ? CLAUDE_AGENT_FILES[selector.role] : undefined;
18073
+ return model && (model !== file?.model || effort !== file.effort) ? [`${label} ${model}${effort ? `/${effort}` : ""}`] : [];
18074
18074
  });
18075
- return rows.length ? `Agent spawn model/effort (pass them, workers with run_in_background: true): ${rows.join(", ")}. Implementer prompt: \`workit fanout brief <slice>\` after \`workit fanout worktree create <slice>\`, even for one slice.` : null;
18075
+ return `Spawn Workit roles by name (workit:implementer, workit:verifier, workit:reviewer, workit:decider, workit:babysitter; search: Explore), workers with run_in_background: true, and pass no model or effort unless the user named one${rows.length ? `; configured here (pass them): ${rows.join(", ")}` : ""}. Implementer prompt: \`workit fanout brief <slice>\` after \`workit fanout worktree create <slice>\`, even for one slice.`;
18076
18076
  };
18077
18077
  var uniformImplementerModel = (cwd, host, dir) => {
18078
18078
  const tiers = MODEL_TIERS.map((tier) => resolveRoleModel(cwd, { role: "implementer", tier }, host, dir));
@@ -18080,7 +18080,7 @@ var uniformImplementerModel = (cwd, host, dir) => {
18080
18080
  return first && tiers.every((t) => t?.model === first.model && t.effort === first.effort) ? first : null;
18081
18081
  };
18082
18082
  var ROLE_SELECTORS = MODEL_ROLES.flatMap((role) => role === "implementer" ? MODEL_TIERS.map((tier) => ({ role, tier })) : [{ role }]);
18083
- var AGENT_ROLE = /^(?:workit[:-])?(decider|implementer|verifier|reviewer|explore|babysit)$/iu;
18083
+ var AGENT_ROLE = /^(?:workit[:-])?(decider|implementer|verifier|reviewer|explore|babysit)(?:(?<=babysit)ter)?$/iu;
18084
18084
  var ROLE_LINE = /^[ \t]*ROLE:[ \t]*(decider|implementer|verifier|reviewer|explore|babysit)\b/imu;
18085
18085
  var TIER_LINE = /^[ \t]*TIER:[ \t]*(mundane|standard|hard)\b/imu;
18086
18086
  var isBrief = (text) => TIER_LINE.test(text) && /^WORKTREE:/mu.test(text);
@@ -30401,11 +30401,12 @@ var respawn = (input, reasons, dropped, limits) => {
30401
30401
  return {
30402
30402
  kind: "deny",
30403
30403
  reason: [
30404
- `workit spawn args: spawn again with exactly ${args} (description and prompt as written${without}).`,
30405
- ...reasons,
30406
- "Workit denies instead of rewriting the spawn: Claude Code's auto mode refuses a hook-rewritten spawn.",
30404
+ `workit spawn args: ${reasons.join(" ")}`,
30405
+ `Retry as: Agent ${args} (description and prompt as written${without}).`,
30406
+ "Why: auto mode refuses a hook-rewritten spawn.",
30407
30407
  limits
30408
- ].filter(Boolean).join(" "),
30408
+ ].filter(Boolean).join(`
30409
+ `),
30409
30410
  unblock: args
30410
30411
  };
30411
30412
  };
@@ -30440,18 +30441,19 @@ var agentModelDecision = (cwd, tool, options = {}) => {
30440
30441
  if (!selector)
30441
30442
  return asWritten(null);
30442
30443
  const choice = chooseSpawnModel(cwd, selector, "claude_code", tool, claudeAgentModel);
30444
+ const file = String(tool.subagent_type).startsWith("workit:") ? CLAUDE_AGENT_FILES[selector.role] : undefined;
30443
30445
  const effort = choice.effort?.toLowerCase() ?? null;
30444
30446
  const input = { ...tool };
30445
- if (choice.model)
30447
+ if (choice.model && (given(tool.model) || choice.model !== file?.model))
30446
30448
  input.model = choice.model;
30447
- if (effort && CLAUDE_EFFORTS.has(effort) && !given(tool.effort))
30449
+ if (effort && CLAUDE_EFFORTS.has(effort) && !given(tool.effort) && effort !== file?.effort)
30448
30450
  input.effort = effort;
30449
30451
  const needs = [
30450
30452
  input.model === tool.model ? null : `model ${String(input.model)}`,
30451
30453
  input.effort === tool.effort ? null : `effort ${String(input.effort)}`
30452
30454
  ].filter(Boolean);
30453
30455
  if (!needs.length)
30454
- return asWritten(choice.note);
30456
+ return asWritten(choice.model ? null : choice.note);
30455
30457
  if (!auto) {
30456
30458
  const note = choice.note ?? `Workit set effort ${String(input.effort)} on this spawn: its role's configured effort.`;
30457
30459
  return {
@@ -30461,12 +30463,18 @@ var agentModelDecision = (cwd, tool, options = {}) => {
30461
30463
  `)
30462
30464
  };
30463
30465
  }
30466
+ if (enforceMode(cwd) === "advise") {
30467
+ if (changed)
30468
+ return respawn(tool, change.reasons, change.dropped, limits);
30469
+ const ran = file ? `${file.model}${file.effort ? `/${file.effort}` : ""}` : "its default model";
30470
+ const pass = spawnArgsText({ model: input.model, effort: input.effort });
30471
+ return asWritten(`Workit: this ${String(tool.subagent_type || "general-purpose")} spawn runs on ${ran}; ${choice.basis} sets ${needs.join(" and ")}. To use it, pass ${pass} on the spawn.`);
30472
+ }
30464
30473
  const replaced = given(tool.model) && input.model !== tool.model;
30465
30474
  return respawn(input, [
30466
30475
  ...change.reasons,
30467
- `It needs ${needs.join(" and ")}: ${choice.basis ?? "its role"}.`,
30468
- replaced ? `That replaces model ${String(tool.model)}: a configured role model wins unless "allowLeadOverride": true is set under models in workspaces.json.` : ""
30469
- ].filter(Boolean), change.dropped, limits);
30476
+ `It needs ${needs.join(" and ")} (${choice.basis}, models.enforce strict)${replaced ? `, not ${String(tool.model)}` : ""}.`
30477
+ ], change.dropped, limits);
30470
30478
  };
30471
30479
 
30472
30480
  // packages/workit-core/src/hooks/spawn-gate.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/pi",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",
@@ -39,7 +39,7 @@ units of ~100+ lines each. Coupled work stays with one owner. Workit never spawn
39
39
  6. **Retry once, then escalate.** A stuck or failed slice gets one retry with
40
40
  a fresh brief (`workit fanout brief <slice> --mode resume`, same branch);
41
41
  if that fails too, re-slice it, take it over, or report the gap. Never
42
- chain resumes. A fix round and recheck that both fail: a decider, not a
42
+ chain resumes. A fix round and recheck that both fail: the decider agent, not a
43
43
  third round; product choices go to the user (`references/orchestration.md`).
44
44
  7. **Verify by the workspace `verification` setting** (`workit grant show`).
45
45
  A report is a pointer, never evidence. `proportional` (default): each slice's lane (`workit pr status`) decides; none needs no verdict, self the author's `--self`, focused and full a verifier (Claude Code: the `model` and `effort` of `workit models show --role verifier`) after the last push; one verdict at a stack's top covers its unchanged lower PRs, and a stale one with `reverify: focused` re-checks only the new diff, reusing green CI. `self`: a verifier that wrote none
@@ -5,35 +5,37 @@ and fans in. Workit records and checks; the host's own subagents run the work.
5
5
 
6
6
  ## TIER to model
7
7
 
8
- TIER is a field of each slice and of its brief. Role models come from the
9
- workspace (`models.roles`; `fanout.tierModels` still feeds the implementer
10
- tiers) and, on Claude Code, built-in defaults: the brief has a `model:` line
11
- (with `effort:` when set) under TIER and a `verifier:` line; `workit fanout
12
- status` names the model next to each spawnable slice; `workit models show
13
- [--role r] [--host h] --json` lists every role (decider, implementer tiers,
14
- verifier, reviewer, explore, babysit). Pass exactly that `model` (and `effort`
15
- where the host's spawn call takes one) on the spawn call: a subagent that
16
- passes none inherits your model. Scouting and PR babysitting use the `explore`
17
- and `babysit` roles. A role with no model (other hosts without config) runs
18
- on the host's model, and TIER only sizes the timebox and decides whether to
19
- race. Claude Code's built-in defaults, when nothing is configured:
20
-
21
- | Role or TIER | `model` on the Agent call |
8
+ TIER is a field of each slice and of its brief. Each Workit role is a host
9
+ agent that carries its own model: spawn it by name and pass no `model` or
10
+ `effort` unless the user named one (a named model always wins).
11
+
12
+ | Host | Spawn by name |
13
+ | --- | --- |
14
+ | Claude Code | `workit:implementer`, `workit:verifier`, `workit:reviewer`, `workit:decider`, `workit:babysitter`; search: `Explore` |
15
+ | OpenCode | `workit-implementer`, `workit-verifier`, `workit-reviewer`, `workit-decider`, `workit-babysitter` |
16
+ | Codex | the same `workit-*` names |
17
+ | Cursor | `workit-verifier`, `workit-reviewer`, `workit-decider`, `workit-babysitter` |
18
+
19
+ Claude Code, with nothing configured (pass a brief's `SPAWN:` line as printed):
20
+
21
+ | Role or TIER | Model |
22
22
  | --- | --- |
23
- | decider | `fable`, effort `high` |
24
- | hard | `opus` |
25
- | standard | `sonnet` |
26
- | mundane | `haiku` |
27
- | verifier | `sonnet` |
28
- | reviewer | `opus` |
29
- | explore, babysit | `haiku` |
30
-
31
- Claude Code and OpenCode also get the role's model set on the spawn by
32
- Workit; a configured one beats a `model` you pass unless
33
- `models.allowLeadOverride` is true. A general spawn takes
34
- `models.roles.default`, or the role its prompt's `ROLE: <role>` line names.
35
- `models.lead` (your own model) is advisory. `workit models show` marks each
36
- role `enforced` or `advisory` per host: on advisory, pass the model.
23
+ | decider | `fable`, effort `high` (agent file) |
24
+ | hard | `opus` (the brief's SPAWN line) |
25
+ | standard, verifier | `sonnet` (agent file) |
26
+ | mundane | `haiku` (the brief's SPAWN line) |
27
+ | reviewer | `opus` (agent file) |
28
+ | babysitter | `haiku` (agent file) |
29
+
30
+ A role
31
+ configured in `models.roles` to another model is listed in your session
32
+ contract (Claude Code) or set on the host's agent (OpenCode, Codex); `workit
33
+ models show [--role r] [--host h]` prints per host whether it comes from the
34
+ `agent file`, a `spawn fill` or is `advisory` (pass it yourself), and the
35
+ `models.enforce` mode. Under `strict` a configured role model beats a named
36
+ one and Claude Code's auto mode denies a spawn that lacks it. A role with no
37
+ model runs on the host's model, and TIER only sizes the timebox and decides
38
+ whether to race. `models.lead` (your own model) is advisory.
37
39
 
38
40
  ## Rolling window
39
41
 
@@ -66,10 +68,9 @@ reversibility (the option cheapest to undo wins a tie), and the exact change
66
68
  list. The fixer applies that list once, then one focused recheck follows.
67
69
 
68
70
  - Hard call (shared contract, security, migration): two deciders on different
69
- models (Claude Code, OpenCode, Cursor: the `decider` role model and a
70
- different `model` on the spawn, kept on a configured decider role only with
71
- `models.allowLeadOverride`; Codex and Pi: one decider). If they disagree, you take the
72
- more reversible option.
71
+ models (Claude Code, OpenCode, Cursor: one bare decider spawn and one that
72
+ names another `model`; Codex and Pi: one decider). If they disagree, you
73
+ take the more reversible option.
73
74
  - Record it: `workit ledger decision "<pick>" --by decider --why "<why it is
74
75
  the more reversible>" --view "<decider A: view>" --view "<decider B: view>"`.
75
76
  The row is listed as a decider call; it is never the user's answer to a
@@ -45,7 +45,7 @@ those files since the judged head and reuse green CI there (no fresh install, no
45
45
  under your own session (the one the lead or the hook gave you).
46
46
  8. **Bound the loop.** A failed verdict gets one fix round and one recheck of
47
47
  the changed hunks. Still failing, or stuck: no third round; the lead spawns
48
- a decider (read the `workit-fanout` skill's SKILL.md and follow it). A product choice goes to the user.
48
+ the decider agent by name, no model (read the `workit-fanout` skill's SKILL.md and follow it). A product choice: the user.
49
49
  9. **Harness note** (optional): friction caused by the repo or harness, not
50
50
  the change (a flaky fixture, a missing check, a misleading doc or skill
51
51
  line), goes on its own `Harness note:` line in the report and any PR
@@ -29,7 +29,7 @@ once the verdict is accepted. `merged`: step 7. `null` (closed, not merged):
29
29
  stop and report. Stop early only for a new consequential choice, a host
30
30
  denial, a review comment that needs a product decision, a required update
31
31
  that repeats because the base keeps moving, or after 3 failed fix attempts on
32
- the same check. Fix round and recheck both failed: a decider (read the `workit-fanout` skill's SKILL.md and follow it).
32
+ the same check. Fix round and recheck both failed: the decider agent (read the `workit-fanout` skill's SKILL.md and follow it).
33
33
 
34
34
  1. **Open.** Last before the PR, if `workit grant show` has `changelog: update|create`: write the Unreleased entry with `workit changelog apply`, commit it; with `docs: when-user-facing` fix only docs the diff made false (`references/changelog.md`).
35
35
  Full local check (`workit check ci` when `.workit/checks.json` has a `ci` group), push once: `workit git push`, then `workit pr template` and fill the template it prints: every heading, each `<!-- -->` replaced (Workit's: `references/pr-body.md`).