diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 85c01c7a..8d8f7be8 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -753,11 +753,6 @@ describe('DESIGN_OUTSIDE_VOICES resolver', () => { expect(content).toContain('design direction'); }); - test('codex host produces empty outside voices', () => { - const codexContent = fs.readFileSync(path.join(ROOT, '.agents', 'skills', 'gstack-design-review', 'SKILL.md'), 'utf-8'); - expect(codexContent).not.toContain('Design Outside Voices'); - }); - test('branches correctly per skillName — different prompts', () => { const planContent = fs.readFileSync(path.join(ROOT, 'plan-design-review', 'SKILL.md'), 'utf-8'); const consultContent = fs.readFileSync(path.join(ROOT, 'design-consultation', 'SKILL.md'), 'utf-8'); @@ -844,10 +839,6 @@ describe('DESIGN_REVIEW_LITE extended with Codex', () => { expect(content).toContain('SCOPE_FRONTEND'); }); - test('codex host does not include Codex design block', () => { - const codexContent = fs.readFileSync(path.join(ROOT, '.agents', 'skills', 'gstack-ship', 'SKILL.md'), 'utf-8'); - expect(codexContent).not.toContain('Codex design voice'); - }); }); // ─── Codex Generation Tests ───────────────────────────────── @@ -855,6 +846,11 @@ describe('DESIGN_REVIEW_LITE extended with Codex', () => { describe('Codex generation (--host codex)', () => { const AGENTS_DIR = path.join(ROOT, '.agents', 'skills'); + // .agents/ is gitignored (v0.11.2.0) — generate on demand for tests + Bun.spawnSync(['bun', 'run', 'scripts/gen-skill-docs.ts', '--host', 'codex'], { + cwd: ROOT, stdout: 'pipe', stderr: 'pipe', + }); + // Dynamic discovery of expected Codex skills: all templates except /codex const CODEX_SKILLS = (() => { const skills: Array<{ dir: string; codexName: string }> = []; @@ -1106,6 +1102,18 @@ describe('Codex generation (--host codex)', () => { } } }); + + // ─── Design outside voices: Codex host guard ───────────────── + + test('codex host produces empty outside voices in design-review', () => { + const codexContent = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-design-review', 'SKILL.md'), 'utf-8'); + expect(codexContent).not.toContain('Design Outside Voices'); + }); + + test('codex host does not include Codex design block in ship', () => { + const codexContent = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-ship', 'SKILL.md'), 'utf-8'); + expect(codexContent).not.toContain('Codex design voice'); + }); }); // ─── Setup script validation ───────────────────────────────── diff --git a/test/skill-validation.test.ts b/test/skill-validation.test.ts index dd5a5c3d..2085eaec 100644 --- a/test/skill-validation.test.ts +++ b/test/skill-validation.test.ts @@ -1328,6 +1328,10 @@ describe('Codex skill', () => { }); test('codex-host ship/review do NOT contain adversarial review step', () => { + // .agents/ is gitignored — generate on demand + Bun.spawnSync(['bun', 'run', 'scripts/gen-skill-docs.ts', '--host', 'codex'], { + cwd: ROOT, stdout: 'pipe', stderr: 'pipe', + }); const shipContent = fs.readFileSync(path.join(ROOT, '.agents', 'skills', 'gstack-ship', 'SKILL.md'), 'utf-8'); expect(shipContent).not.toContain('codex review --base'); expect(shipContent).not.toContain('CODEX_REVIEWS'); @@ -1402,6 +1406,11 @@ describe('Skill trigger phrases', () => { describe('Codex skill validation', () => { const AGENTS_DIR = path.join(ROOT, '.agents', 'skills'); + // .agents/ is gitignored (v0.11.2.0) — generate on demand for tests + Bun.spawnSync(['bun', 'run', 'scripts/gen-skill-docs.ts', '--host', 'codex'], { + cwd: ROOT, stdout: 'pipe', stderr: 'pipe', + }); + // Discover all Claude skills with templates (except /codex which is Claude-only) const CLAUDE_SKILLS_WITH_TEMPLATES = (() => { const skills: string[] = [];