test: Codex generation tests + CI + docs for multi-agent support

Tests (28 new):
- Codex output path routing, frontmatter validation (name+description only)
- No .claude/skills/ path leaks in Codex output (regression guard)
- /codex skill exclusion, hook→prose conversion, multiline YAML
- --host agents alias, dynamic template discovery
- Codex skill validation + $B command validation
- find-browse priority chain verification
- Replace static ALL_SKILLS list with dynamic filesystem scan

CI:
- Add Codex freshness check to skill-docs workflow

Docs:
- AGENTS.md: Codex-facing project instructions
- README: multi-agent installation section
- CONTRIBUTING: dual-host development workflow
- CHANGELOG: v0.9.0 multi-agent support entry

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-19 01:04:21 -07:00
parent 10e6d39f27
commit 6fc696dfb8
9 changed files with 447 additions and 29 deletions
+26
View File
@@ -21,4 +21,30 @@ describe('locateBinary', () => {
expect(existsSync(result)).toBe(true);
}
});
test('priority chain checks .codex, .agents, .claude markers', () => {
// Verify the source code implements the correct priority order.
// We read the function source to confirm the markers array order.
const src = require('fs').readFileSync(require('path').join(__dirname, '../src/find-browse.ts'), 'utf-8');
// The markers array should list .codex first, then .agents, then .claude
const markersMatch = src.match(/const markers = \[([^\]]+)\]/);
expect(markersMatch).not.toBeNull();
const markers = markersMatch![1];
const codexIdx = markers.indexOf('.codex');
const agentsIdx = markers.indexOf('.agents');
const claudeIdx = markers.indexOf('.claude');
// All three must be present
expect(codexIdx).toBeGreaterThanOrEqual(0);
expect(agentsIdx).toBeGreaterThanOrEqual(0);
expect(claudeIdx).toBeGreaterThanOrEqual(0);
// .codex before .agents before .claude
expect(codexIdx).toBeLessThan(agentsIdx);
expect(agentsIdx).toBeLessThan(claudeIdx);
});
test('function signature accepts no arguments', () => {
// locateBinary should be callable with no arguments
expect(typeof locateBinary).toBe('function');
expect(locateBinary.length).toBe(0);
});
});