fix(agents): no agent is pinned below the high floor

Operator rule (2026-10-05): standard is Opus 5.5 at reasoning effort High. Four retrieval agents (architecture-mapper, dependency-tracer, git-historian, task-finder) pinned effort: medium in frontmatter, which overrides the session level, so every /trekplan exploration ran part of its swarm below the floor. They came from fdd3ad8 on the premise that unpinned agents inherit high; e4e37f9 corrected that (unpinned inherits the session; Opus 5.5 defaults to medium), so the reason for medium was already gone. All four now pin high; the other agents keep following the session (operator's choice). docs/profiles.md (one bullet for the eight pinned agents), CLAUDE.md and README.md updated; the model-default sentence stays. Dated decision records and CHANGELOG untouched.

Red: 4 of 5 new tests fail on the pre-fix files - effort floor over all agents (offenders: the four), the four pin exactly high, no live doc says retrieval runs at medium (hits docs/profiles.md:76, CLAUDE.md:85, README.md:806), profiles.md names the four as high. Known-positive control green on arrival.
Verify 153/153 (agent-frontmatter, doc-consistency). SC9 probe: npm test green under a scratch HOME with CLAUDE_PLUGIN_DATA empty, nothing under its plugin data dir. Suite 1393 (1391/0/2).

The change is repo-true, not installed-true, until a release.

Voyage order 20261005T104513Z-1250514346, plan step 5/5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-10-05 17:40:53 +02:00
commit 84a0621fcc
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
9 changed files with 60 additions and 12 deletions

View file

@ -167,3 +167,24 @@ test('agent bodies retain at least 32 <example> blocks (M4: relocation moves, ne
`— examples may have been deleted instead of relocated (M4)`,
);
});
// Operator rule (2026-10-05): "standard" is Opus 5.5 at reasoning effort High. A pinned
// `effort:` overrides the session level, so a pin below `high` runs that agent below the
// floor whatever the session is set to. Unpinned agents follow the session.
const EFFORT_FLOOR = new Set(['high', 'xhigh', 'max']);
const RETRIEVAL_AGENTS = ['architecture-mapper.md', 'dependency-tracer.md', 'git-historian.md', 'task-finder.md'];
test('no agents/*.md pins a reasoning effort below high', () => {
const pinned = agentFiles
.map((f) => [f, getTopLevelValue(extractFrontmatter(read(`agents/${f}`)) || '', 'effort')])
.filter(([, v]) => v !== null);
assert.ok(pinned.length > 0, 'no agent carries effort: - the check would prove nothing');
const below = pinned.filter(([, v]) => !EFFORT_FLOOR.has(v)).map(([f, v]) => `agents/${f}: effort: ${v}`);
assert.deepEqual(below, [], 'fix the agent file - the floor is the operator\'s rule');
});
test('the four retrieval agents pin effort: high', () => {
for (const f of RETRIEVAL_AGENTS) {
assert.equal(getTopLevelValue(extractFrontmatter(read(`agents/${f}`)), 'effort'), 'high', `agents/${f}`);
}
});

View file

@ -2111,3 +2111,31 @@ test('/trekbrief --approve: CLAUDE.md, README.md and docs/command-modes.md say t
assert.match(line, /trekbrief (stats )?record/, `${rel}: the --approve row must say it writes the trekbrief record`);
}
});
// --- effort floor: no live doc claims retrieval agents run at medium ------------
// Operator rule (2026-10-05): no agent is pinned below `high`. The model DEFAULT
// sentence ("Opus 5.5 ... default reasoning effort `medium`") stays true and is not a pin.
const RETRIEVAL_MEDIUM = /retrieval(?: agents)?\s*(?:→|->|at)\s*`medium`/i;
test('effort floor: no live doc claims retrieval agents run at medium', () => {
const hits = [];
for (const f of ['docs/profiles.md', 'CLAUDE.md', 'README.md']) {
read(f).split('\n').forEach((l, i) => { if (RETRIEVAL_MEDIUM.test(l)) hits.push(`${f}:${i + 1}`); });
}
assert.deepEqual(hits, [], 'the four retrieval agents pin `high` now');
});
test('effort floor: known-positive control — the query finds the old phrases, not the model default', () => {
for (const phrase of ['**Retrieval agents → `medium`:**', '(retrieval → `medium`, adversarial', 'retrieval at `medium`, adversarial']) {
assert.match(phrase, RETRIEVAL_MEDIUM, phrase);
}
assert.doesNotMatch('both with default reasoning effort `medium`', RETRIEVAL_MEDIUM);
});
test('effort floor: profiles.md names the four retrieval agents as high', () => {
const axes = (read('docs/profiles.md').split('\n## Model & effort axes\n')[1] || '').split('\n## ')[0];
const bullet = axes.split('\n- ').find((b) => ['task-finder', 'git-historian', 'dependency-tracer', 'architecture-mapper'].every((a) => b.includes(a)));
assert.ok(bullet, 'one bullet in §Model & effort axes names all four retrieval agents');
assert.match(bullet, /`high`/);
assert.doesNotMatch(bullet, /`medium`/);
});