refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3)

The 6 long-form-review fasit fixtures (agents/fixtures/*-cases.md) were registered
by Claude Code as junk `fixtures:*` agents because agents/ is scanned recursively.
They are test fixtures, not capabilities. Moved them + their 6 lint tests to
tests/ + tests/fixtures/ and retargeted the 5 agent fasit-refs. Count-neutral
namespace hygiene (ls agents/*.md still 19).

- agents/fixtures/*-cases.md            -> tests/fixtures/        (6)
- agents/__tests__/*-fixture.test.mjs   -> tests/                 (6; ../fixtures -> ./fixtures)
- 5 agent refs ${CLAUDE_PLUGIN_ROOT}/agents/fixtures -> /tests/fixtures
- version-sync 0.5.2 -> 0.5.3 (plugin.json / README badge / CLAUDE.md / CHANGELOG)

Verify: fixture-lint 35/35 at new path; render 20/20, hooks 139/139; test-runner 109/0/0.
Reinstall/reload required for the 6 spurious agents to leave the registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CrTb8ktf1XZWEVwgz5MTTo
This commit is contained in:
Kjell Tore Guttormsen 2026-06-24 13:29:57 +02:00
commit 9111f006cc
21 changed files with 24 additions and 14 deletions

View file

@ -0,0 +1,80 @@
import { describe, test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
// Lint-test for the language-reviewer fasit fixture.
// Mirrors the structure-only discipline of editorial-reviewer-fixture.test.mjs,
// persona-reviewer-fixture.test.mjs and fact-checker-fixture.test.mjs: this test
// asserts the SHAPE of the fixture — the one judging axis (norsk-språkkvalitet),
// all five checks (L1L5), the three severities, the six Del 4 cases that form
// the gold standard, the direction-not-copy boundary, and the cold-reader /
// context-isolation principle. Whether the agent's live flags actually reproduce
// the fasit directions is [GATE]/[OPERATØR], never self-certified here.
const FIXTURE_PATH = fileURLToPath(
new URL('./fixtures/language-reviewer-cases.md', import.meta.url)
);
const fixture = readFileSync(FIXTURE_PATH, 'utf8');
// The five checks of the one axis.
const CHECKS = ['L1', 'L2', 'L3', 'L4', 'L5'];
// The single axis name (Norwegian, as the agent and the writing contract use it).
const AXIS = 'norsk-språkkvalitet';
// The three-rung severity scale.
const SEVERITIES = ['BLOCK', 'REWORK', 'NICE'];
describe('language-reviewer fixture structure', () => {
test('names the judging axis (norsk-språkkvalitet)', () => {
assert.ok(
new RegExp(AXIS, 'i').test(fixture),
`fixture must name the axis "${AXIS}"`
);
});
test('documents all five checks (L1L5)', () => {
for (const check of CHECKS) {
assert.ok(
fixture.includes(check),
`fixture must reference the check "${check}"`
);
}
});
test('defines the three-rung severity scale', () => {
for (const sev of SEVERITIES) {
assert.ok(
fixture.includes(sev),
`fixture must define the severity "${sev}"`
);
}
});
test('documents the six Del 4 cases', () => {
const cases = fixture.match(/^###\s+Case\s+\d+\b/gim) || [];
assert.equal(
cases.length,
6,
`fixture must document exactly 6 Del 4 cases (found ${cases.length})`
);
});
test('keeps the jury-judges-writer-writes boundary (direction, not copy)', () => {
assert.ok(
/direction, not rewritten copy/i.test(fixture),
'fixture must state the direction-not-copy boundary'
);
});
test('documents the cold-reader / context-isolation principle', () => {
assert.ok(
/cold/i.test(fixture) &&
/(context pollution|framing-bias)/i.test(fixture),
'fixture must document the cold-reader / context-isolation principle ' +
'(context pollution / framing-bias)'
);
});
});