mirror of
https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git
synced 2026-11-18 16:23:38 +00:00
* feat(cli): add Kimi Code platform (--ai kimi) Kimi Code discovers skills as SKILL.md folders (name + description frontmatter) in .kimi-code/skills/ (project) and ~/.kimi-code/skills/ (user). Add a kimi platform template, register the type, detect an existing .kimi-code folder, and document it in the README. Tests: add kimi to the dry-run and script-path e2e specs. check:assets, typecheck and those specs pass; init --ai kimi was run in an empty repo. Kimi Code itself was not run. Refs #455. * test(cli): add kimi install and detection specs Cover the rendered SKILL.md frontmatter, a real install into .kimi-code/skills (skill, data, scripts and sub-skills), and detection of a .kimi-code folder. Refs #455. * fix(scripts): expect 24 platform configs in validate-agent-guide Adding the kimi platform template raises the config count from 23 to 24. Keep the check strict and update the expected count. Refs #455. * test(cli): expect 24 platform configs in agent-query-contract The kimi platform raises the platform config count from 23 to 24. Refs #455.
49 lines
2.3 KiB
TypeScript
49 lines
2.3 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
import { loadPlatformConfig, renderSkillFile } from '../../src/utils/template.js';
|
|
|
|
const cases = [
|
|
['claude', '.claude/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['codex', '.agents/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['kiro', '.kiro/steering/ui-ux-pro-max/scripts/search.py'],
|
|
['droid', '.factory/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['zcode', '.zcode/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['kimi', '.kimi-code/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['amazonq', '.amazonq/skills/ui-ux-pro-max/scripts/search.py'],
|
|
['openclaw', '.agents/skills/ui-ux-pro-max/scripts/search.py'],
|
|
] as const;
|
|
const SEARCH_COMMAND_COUNT = 17;
|
|
|
|
function extractSearchScriptPaths(content: string): string[] {
|
|
return [...content.matchAll(/^python3\s+(\S*search\.py)\b/gm)].map(match => match[1]);
|
|
}
|
|
|
|
for (const [platform, localPath] of cases) {
|
|
test(`${platform} renders project-root and global script paths`, async () => {
|
|
const config = await loadPlatformConfig(platform);
|
|
|
|
const localContent = await renderSkillFile(config);
|
|
const localPaths = extractSearchScriptPaths(localContent);
|
|
expect(localPaths).toHaveLength(SEARCH_COMMAND_COUNT);
|
|
expect(new Set(localPaths)).toEqual(new Set([localPath]));
|
|
expect(localContent).not.toContain('{{SCRIPT_PATH}}');
|
|
|
|
const globalContent = await renderSkillFile(config, true);
|
|
const globalPaths = extractSearchScriptPaths(globalContent);
|
|
expect(globalPaths).toHaveLength(SEARCH_COMMAND_COUNT);
|
|
expect(new Set(globalPaths)).toEqual(new Set([`~/${localPath}`]));
|
|
expect(globalContent).not.toContain('{{SCRIPT_PATH}}');
|
|
});
|
|
}
|
|
|
|
test('copilot renders .github/skills paths locally and ~/.copilot/skills globally', async () => {
|
|
const config = await loadPlatformConfig('copilot');
|
|
|
|
const localPaths = extractSearchScriptPaths(await renderSkillFile(config));
|
|
expect(localPaths).toHaveLength(SEARCH_COMMAND_COUNT);
|
|
expect(new Set(localPaths)).toEqual(new Set(['.github/skills/ui-ux-pro-max/scripts/search.py']));
|
|
|
|
const globalPaths = extractSearchScriptPaths(await renderSkillFile(config, true));
|
|
expect(globalPaths).toHaveLength(SEARCH_COMMAND_COUNT);
|
|
expect(new Set(globalPaths)).toEqual(new Set(['~/.copilot/skills/ui-ux-pro-max/scripts/search.py']));
|
|
});
|