@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
|
|
8719
|
+
var CLAUDE_AGENT_FILES = {
|
|
8720
8720
|
decider: { model: "fable", effort: "high" },
|
|
8721
|
-
|
|
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
|
-
...
|
|
8816
|
-
label:
|
|
8819
|
+
...MODEL_TIERS.map((tier) => ({
|
|
8820
|
+
label: `workit:implementer ${tier}`,
|
|
8817
8821
|
selector: { role: "implementer", tier }
|
|
8818
8822
|
})),
|
|
8819
|
-
|
|
8820
|
-
|
|
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
|
|
17889
|
+
var CLAUDE_AGENT_FILES = {
|
|
17890
17890
|
decider: { model: "fable", effort: "high" },
|
|
17891
|
-
|
|
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
|
|
17991
|
+
var modelsKey = (cwd, key, dir) => {
|
|
17989
17992
|
for (const source of modelSources(cwd, dir))
|
|
17990
|
-
if (isObject6(source.models) && Object.hasOwn(source.models,
|
|
17991
|
-
return source.models
|
|
17992
|
-
return
|
|
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
|
|
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
|
-
...
|
|
18060
|
-
label:
|
|
18055
|
+
...MODEL_TIERS.map((tier) => ({
|
|
18056
|
+
label: `workit:implementer ${tier}`,
|
|
18061
18057
|
selector: { role: "implementer", tier }
|
|
18062
18058
|
})),
|
|
18063
|
-
|
|
18064
|
-
|
|
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
|
|
18073
|
-
|
|
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
|
|
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)
|
|
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:
|
|
30405
|
-
|
|
30406
|
-
"
|
|
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 ")}
|
|
30468
|
-
|
|
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
|
@@ -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:
|
|
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.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| Role or TIER |
|
|
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
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
35
|
-
`models.
|
|
36
|
-
|
|
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:
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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:
|
|
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`).
|