You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(prompt-variance): extract family prompt variance as a versioned package
Directors resolve default/muse/grok rows and assemble prompts through
packages/prompt-variance instead of hand-concatenated grokAntiThrash
booleans. Default/grok director output is byte-identical (sha256 match
across all directors); muse rules now also render in prompt-size rows.
Verification: bun test src/agent src/subagent src/prompts.test.ts
packages/prompt-variance/ — 1416 pass, 0 fail. tsc --noEmit reports only
the pre-existing vendor/intx-types semver error, identical on main.
// Muse Spark does not reliably stop a tool loop at medium reasoning effort:
55
+
// the same run with these three rules appended finished in 3 turns on 4.3x
56
+
// fewer input tokens (CL-7869). Byte-identical to the shipped text so the
57
+
// size table and the constructor append cannot drift apart.
58
+
exportconstmuseRow: PromptVarianceRow={
59
+
id: "muse",
60
+
render: "tail",
61
+
residual:
62
+
"Tool discipline:\n"+
63
+
"- Batch independent tool calls into a single turn.\n"+
64
+
"- Never re-read a file you have already read this session.\n"+
65
+
"- Do not narrate; act.",
66
+
advertisedToolDeny: [],
67
+
sectionOmit: [],
68
+
};
69
+
70
+
// Tiny residual for Grok/xAI workers: mining showed higher tools-only thrash
71
+
// than Codex on the same harness. Shared thrash harness + spawn contracts do
72
+
// the structural work; this is only a finish-bias nudge, not a full rewrite.
73
+
// Built from the current grok finish-bias text on origin/main; the CL-8297
74
+
// residual folds in here at merge time.
75
+
exportconstgrokRow: PromptVarianceRow={
76
+
id: "grok",
77
+
render: "tail",
78
+
residual: [
79
+
"Finish bias (xAI / Grok worker):",
80
+
"- Once you can answer the dispatch brief, prefer the structured report over another speculative tool call.",
81
+
"- If the next call would only re-open paths you already read, write the report instead.",
82
+
"- When the dispatch brief's done-definition is met, write the report envelope instead of making one more search or micro-edit.",
83
+
"- Route file and web work through the dedicated tools, never run_shell — mining showed grok reaching for shell first when a typed tool already covered the job.",
84
+
].join("\n"),
85
+
// Leaf value; resolvePromptVariance clears it for orchestrators.
0 commit comments