fix(omo-codex): adapt synced skills for Codex tools
This commit is contained in:
@@ -37,3 +37,28 @@ test("#given synced aggregate Codex skills #when inspected #then component and s
|
||||
assert.match(content, /^---\n/);
|
||||
}
|
||||
});
|
||||
|
||||
test("#given synced aggregate Codex skills #when they contain OpenCode orchestration examples #then Codex tool compatibility guidance is injected", async () => {
|
||||
// given
|
||||
const skillsRoot = join(root, "skills");
|
||||
const opencodeOnlyToolPattern = /\b(?:call_omo_agent|background_output|team_[a-z_]+|task)\s*\(/;
|
||||
|
||||
// when
|
||||
const skillNames = (await readdir(skillsRoot, { withFileTypes: true }))
|
||||
.filter((entry) => entry.isDirectory())
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
|
||||
// then
|
||||
for (const skillName of skillNames) {
|
||||
const content = await readFile(join(skillsRoot, skillName, "SKILL.md"), "utf8");
|
||||
if (!opencodeOnlyToolPattern.test(content)) continue;
|
||||
|
||||
const compatibilityIndex = content.indexOf("## Codex Harness Tool Compatibility");
|
||||
assert.notEqual(compatibilityIndex, -1, `${skillName} is missing Codex compatibility guidance`);
|
||||
assert.ok(
|
||||
compatibilityIndex < content.search(opencodeOnlyToolPattern),
|
||||
`${skillName} must explain Codex tool translation before OpenCode-only examples`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user