Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
for sd in .claude/skills .cursor/skills .codex/skills .opencode/skills \
.windsurf/skills .cline/skills .roo/skills .continue/skills \
.gemini/skills .amazonq/skills .qwen/skills .kilocode/skills \
.augment/skills .kiro/skills .lingma/skills .junie/skills \
.augment/skills .kiro/skills .kimi-code/skills .lingma/skills .junie/skills \
.codebuddy/skills .cospec/skills .crush/skills .factory/skills \
.iflow/skills .pi/skills .qoder/skills .agents/skills \
.bob/skills .forge/skills .trae/skills .github/skills; do
Expand All @@ -138,7 +138,7 @@ jobs:
check_file "$PROJ/$sd/comet/scripts/comet-yaml-validate.sh"
check_file "$PROJ/$sd/comet/scripts/comet-archive.sh"
done
echo "All 28 platforms project Comet skills: OK"
echo "All 29 platforms project Comet skills: OK"
shell: bash

- name: Verify external installer status (project)
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
for sd in .claude/skills .cursor/skills .codex/skills .config/opencode/skills \
.windsurf/skills .cline/skills .roo/skills .continue/skills \
.gemini/skills .amazonq/skills .qwen/skills .kilocode/skills \
.augment/skills .kiro/skills .lingma/skills .junie/skills \
.augment/skills .kiro/skills .kimi-code/skills .lingma/skills .junie/skills \
.codebuddy/skills .cospec/skills .crush/skills .factory/skills \
.iflow/skills .pi/skills .qoder/skills .gemini/antigravity/skills \
.bob/skills .forge/skills .trae/skills .github/skills; do
Expand All @@ -226,7 +226,7 @@ jobs:
check_file "$HOME_DIR/$sd/comet/scripts/comet-yaml-validate.sh"
check_file "$HOME_DIR/$sd/comet/scripts/comet-archive.sh"
done
echo "All 28 platforms global Comet skills: OK"
echo "All 29 platforms global Comet skills: OK"
shell: bash

- name: Verify external installer status (global)
Expand Down
15 changes: 8 additions & 7 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,14 @@ npx skills add rpamis/comet
| GitHub Copilot | `.github/` | Gemini CLI | `.gemini/` |
| Amazon Q Developer | `.amazonq/` | Qwen Code | `.qwen/` |
| Kilo Code | `.kilocode/` | Auggie | `.augment/` |
| Kiro | `.kiro/` | Lingma | `.lingma/` |
| Junie | `.junie/` | CodeBuddy | `.codebuddy/` |
| CoStrict | `.cospec/` | Crush | `.crush/` |
| Factory Droid | `.factory/` | iFlow | `.iflow/` |
| Pi | `.pi/` | Qoder | `.qoder/` |
| Antigravity | `.agents/` | Bob Shell | `.bob/` |
| ForgeCode | `.forge/` | Trae | `.trae/` |
| Kimi Code | `.kimi-code/`| Kiro | `.kiro/` |
| Lingma | `.lingma/` | Junie | `.junie/` |
| CodeBuddy | `.codebuddy/`| CoStrict | `.cospec/` |
| Crush | `.crush/` | Factory Droid | `.factory/` |
| iFlow | `.iflow/` | Pi | `.pi/` |
| Qoder | `.qoder/` | Antigravity | `.agents/` |
| Bob Shell | `.bob/` | ForgeCode | `.forge/` |
| Trae | `.trae/` | | |

</details>

Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Updates the npm package and refreshes installed Comet skills in detected project

## Supported Platforms

`comet init` supports 28 AI coding platforms:
`comet init` supports 29 AI coding platforms:

<details>
<summary>View full platform list</summary>
Expand All @@ -238,13 +238,14 @@ Updates the npm package and refreshes installed Comet skills in detected project
| GitHub Copilot | `.github/` | Gemini CLI | `.gemini/` |
| Amazon Q Developer | `.amazonq/` | Qwen Code | `.qwen/` |
| Kilo Code | `.kilocode/` | Auggie | `.augment/` |
| Kiro | `.kiro/` | Lingma | `.lingma/` |
| Junie | `.junie/` | CodeBuddy | `.codebuddy/` |
| CoStrict | `.cospec/` | Crush | `.crush/` |
| Factory Droid | `.factory/` | iFlow | `.iflow/` |
| Pi | `.pi/` | Qoder | `.qoder/` |
| Antigravity | `.agents/` | Bob Shell | `.bob/` |
| ForgeCode | `.forge/` | Trae | `.trae/` |
| Kimi Code | `.kimi-code/`| Kiro | `.kiro/` |
| Lingma | `.lingma/` | Junie | `.junie/` |
| CodeBuddy | `.codebuddy/`| CoStrict | `.cospec/` |
| Crush | `.crush/` | Factory Droid | `.factory/` |
| iFlow | `.iflow/` | Pi | `.pi/` |
| Qoder | `.qoder/` | Antigravity | `.agents/` |
| Bob Shell | `.bob/` | ForgeCode | `.forge/` |
| Trae | `.trae/` | | |

</details>

Expand Down
7 changes: 7 additions & 0 deletions src/core/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ export const PLATFORMS: Platform[] = [
supportsHooks: true,
hookFormat: 'kiro',
},
{
id: 'kimicode',
name: 'Kimi Code',
skillsDir: '.kimi-code',
globalSkillsDir: '.kimi-code',
openspecToolId: 'kimi',
},
{
id: 'lingma',
name: 'Lingma',
Expand Down
1 change: 1 addition & 0 deletions src/core/superpowers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const SKILLS_AGENT_MAP: Record<string, string | null> = {
kilocode: 'kilo',
auggie: 'augment',
kiro: 'kiro-cli',
kimicode: 'kimi-code-cli',
lingma: null,
junie: 'junie',
codebuddy: 'codebuddy',
Expand Down
4 changes: 2 additions & 2 deletions test/ts/ci-workflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('CI workflows', () => {
expect(workflow).not.toContain('check_glob "$HOME_DIR/$sd/openspec-*"');
expect(workflow).not.toContain('check_dir "$HOME_DIR/$sd/brainstorming"');
expect(workflow).not.toContain('check_dir "$HOME_DIR/$sd/using-superpowers"');
expect(workflow).toContain('All 28 platforms project Comet skills: OK');
expect(workflow).toContain('All 28 platforms global Comet skills: OK');
expect(workflow).toContain('All 29 platforms project Comet skills: OK');
expect(workflow).toContain('All 29 platforms global Comet skills: OK');
});

it('defines PR title linting with Comet-specific semantic scopes', async () => {
Expand Down
13 changes: 12 additions & 1 deletion test/ts/detect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ describe('detect', () => {
});

describe('platform global skills directories', () => {
it('declares Kimi Code global skills under the user .kimi-code directory', () => {
const kimicode = PLATFORMS.find((platform) => platform.id === 'kimicode');

expect(kimicode).toBeDefined();
expect(kimicode?.skillsDir).toBe('.kimi-code');
expect(kimicode?.globalSkillsDir).toBe('.kimi-code');
expect(kimicode?.openspecToolId).toBe('kimi');
});

it('declares Lingma global skills under the user .lingma directory', () => {
const lingma = PLATFORMS.find((platform) => platform.id === 'lingma');

Expand Down Expand Up @@ -75,10 +84,12 @@ describe('detect', () => {
it('detects multiple platforms', async () => {
await fs.mkdir(path.join(tmpDir, '.claude'));
await fs.mkdir(path.join(tmpDir, '.cursor'));
await fs.mkdir(path.join(tmpDir, '.kimi-code'));
const detected = await detectPlatforms(tmpDir);
expect(detected.has('claude')).toBe(true);
expect(detected.has('cursor')).toBe(true);
expect(detected.size).toBeGreaterThanOrEqual(2);
expect(detected.has('kimicode')).toBe(true);
expect(detected.size).toBeGreaterThanOrEqual(3);
});

it('returns empty set when no platforms detected', async () => {
Expand Down
30 changes: 29 additions & 1 deletion test/ts/init-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('comet init E2E', () => {
const { initCommand } = await import('../../src/commands/init.js');
const result = await captureJsonOutput(() => initCommand(tmpDir, { yes: true, json: true }));

expect((result.results as unknown[]).length).toBeGreaterThanOrEqual(28);
expect((result.results as unknown[]).length).toBeGreaterThanOrEqual(29);

const manifest = await readManifest();
const platformDirs = [
Expand All @@ -209,6 +209,7 @@ describe('comet init E2E', () => {
'.kilocode',
'.augment',
'.kiro',
'.kimi-code',
'.lingma',
'.junie',
'.codebuddy',
Expand Down Expand Up @@ -321,4 +322,31 @@ describe('comet init E2E', () => {
fs.access(path.join(tmpDir, '.lingma', 'skills', 'comet', 'SKILL.md')),
).rejects.toThrow();
}, 20_000);

it('installs Kimi Code global Comet skills to the user Kimi Code skills directory', async () => {
mockExternalSuccess();

await fs.mkdir(path.join(tmpDir, '.kimi-code'), { recursive: true });
const fakeHome = path.join(tmpDir, 'fake-home');
await fs.mkdir(fakeHome, { recursive: true });

vi.spyOn(os, 'homedir').mockReturnValue(fakeHome);

const { initCommand } = await import('../../src/commands/init.js');
const result = await captureJsonOutput(() =>
initCommand(tmpDir, { yes: true, scope: 'global', json: true }),
);

expect(result.selectedPlatforms).toEqual(['kimicode']);

const manifest = await readManifest();
for (const skillPath of manifest.skills) {
const dest = path.join(fakeHome, '.kimi-code', 'skills', skillPath);
await expect(fs.access(dest)).resolves.toBeUndefined();
}

await expect(
fs.access(path.join(tmpDir, '.kimi-code', 'skills', 'comet', 'SKILL.md')),
).rejects.toThrow();
}, 20_000);
});
19 changes: 19 additions & 0 deletions test/ts/openspec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ describe('openspec', () => {
});

describe('installOpenSpec', () => {
it('accepts the Kimi OpenSpec tool id from platform definitions', async () => {
mockedExecFileSync.mockReturnValueOnce(Buffer.from('/usr/bin/openspec'));
mockedExecFileSync.mockReturnValueOnce(Buffer.from('ok'));

const { installOpenSpec } = await import('../../src/core/openspec.js');
const result = await installOpenSpec('/tmp/test', ['kimi'], 'project');

expect(result).toBe('installed');
expect(mockedExecFileSync.mock.calls[1][0]).toBe('openspec');
expect(mockedExecFileSync.mock.calls[1][1]).toEqual([
'init',
'/tmp/test',
'--tools',
'kimi',
'--profile',
'custom',
]);
});

it('installs openspec when CLI is available', async () => {
mockedExecFileSync.mockReturnValueOnce(Buffer.from('/usr/bin/openspec'));
mockedExecFileSync.mockReturnValueOnce(Buffer.from('ok'));
Expand Down
6 changes: 4 additions & 2 deletions test/ts/superpowers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ describe('superpowers', () => {
expect(SKILLS_AGENT_MAP['gemini']).toBe('gemini-cli');
expect(SKILLS_AGENT_MAP['qwen']).toBe('qwen-code');
expect(SKILLS_AGENT_MAP['kiro']).toBe('kiro-cli');
expect(SKILLS_AGENT_MAP['kimicode']).toBe('kimi-code-cli');
expect(SKILLS_AGENT_MAP['iflow']).toBe('iflow-cli');
expect(SKILLS_AGENT_MAP['factory']).toBe('droid');
expect(SKILLS_AGENT_MAP['amazon-q']).toBe('universal');
expect(SKILLS_AGENT_MAP['costrict']).toBe('universal');
expect(SKILLS_AGENT_MAP['lingma']).toBeNull();
});

it('has entries for all 28 platforms', async () => {
it('has entries for all 29 platforms', async () => {
const { SKILLS_AGENT_MAP } = await import('../../src/core/superpowers.js');
const platformIds = [
'claude',
Expand All @@ -78,6 +79,7 @@ describe('superpowers', () => {
'kilocode',
'auggie',
'kiro',
'kimicode',
'lingma',
'junie',
'codebuddy',
Expand All @@ -95,7 +97,7 @@ describe('superpowers', () => {
for (const id of platformIds) {
expect(SKILLS_AGENT_MAP).toHaveProperty(id);
}
expect(Object.keys(SKILLS_AGENT_MAP)).toHaveLength(28);
expect(Object.keys(SKILLS_AGENT_MAP)).toHaveLength(29);
});
});

Expand Down
Loading