Files
gstack/test/voice-directive.test.ts
T
8d1db315af voice: ban the "load-bearing" stock phrase
Models overuse "load-bearing"; it joins the AI-vocabulary ban line in both
voice tiers. The tier-2 voice directive is also tightened (the meta
"compressed for runtime" tag and the bounded closer's restated exemption
clause) so the shared preamble shrinks by 163 bytes per tier-2+ skill,
which also pays for the reply-language rule that follows. The ship goldens
are refreshed for the new render.

Co-authored-by: Nader Helmy <creator.nader@gmail.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-08 15:10:10 +00:00

15 lines
744 B
TypeScript

import { describe, expect, test } from 'bun:test';
import { generateVoiceDirective } from '../scripts/resolvers/preamble/generate-voice-directive';
import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types';
const ctx: TemplateContext = { skillName: 'review', tmplPath: 'review/SKILL.md.tmpl', host: 'claude', paths: HOST_PATHS.claude };
const tiers: number[] = [1, 3];
describe('shared voice directive', () => {
test.each(tiers)('tier %i bans the load-bearing stock phrase on the AI-vocabulary line', tier => {
const banLine = generateVoiceDirective(ctx, tier).split('\n').find(line => line.includes('No AI vocabulary:'));
expect(banLine).toBeDefined();
expect(banLine!).toContain('load-bearing');
});
});