Skip to content

Commit 4883bba

Browse files
committed
feat: add Grok as a first-class Comet platform
Install Grok Skills into the shared .agents root, keep rules and the Hook Router under .grok, and recognize Grok's native write/search_replace tools.
1 parent 8df507c commit 4883bba

22 files changed

Lines changed: 129 additions & 22 deletions

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to @rpamis/comet will be documented in this file.
44

5+
## What's Changed [0.4.0-beta.19] - 2026-08-13
6+
7+
### Added
8+
9+
- **Grok platform support**: `comet init`, `comet update`, `comet doctor`, and `comet uninstall` now treat Grok as a first-class host. Project Skills share the `.agents` root with Codex, while rules and the Hook Router live under `.grok/rules/` and `.grok/hooks/comet.json`. The Router recognizes `--platform grok` and matches Grok's native `write` / `search_replace` tools.
10+
511
## What's Changed [0.4.0-beta.18] - 2026-08-12
612

713
### Fixed

README-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ comet eval ./generated-skill/comet/eval.yaml --suite langsmith --html
414414

415415
## 支持平台
416416

417-
`comet init` 支持 33 个 AI 编码平台:
417+
`comet init` 支持 34 个 AI 编码平台:
418418

419419
<details>
420420
<summary>查看完整平台列表</summary>
@@ -437,7 +437,7 @@ comet eval ./generated-skill/comet/eval.yaml --suite langsmith --html
437437
| Antigravity 2.0 | `.agents/` | Bob Shell | `.bob/` |
438438
| ForgeCode | `.forge/` | Trae | `.trae/` |
439439
| Trae CN | `.trae-cn/` | ZCode | `.zcode/` |
440-
| MimoCode | `.mimocode/` | | |
440+
| MimoCode | `.mimocode/` | Grok | `.agents/` |
441441

442442
</details>
443443

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ does not expand the backend command list; see the [Skill creation guide](docs/op
443443

444444
## Supported Platforms
445445

446-
`comet init` supports 33 AI coding platforms:
446+
`comet init` supports 34 AI coding platforms:
447447

448448
<details>
449449
<summary>View full platform list</summary>
@@ -466,7 +466,7 @@ does not expand the backend command list; see the [Skill creation guide](docs/op
466466
| Antigravity 2.0 | `.agents/` | Bob Shell | `.bob/` |
467467
| ForgeCode | `.forge/` | Trae | `.trae/` |
468468
| Trae CN | `.trae-cn/` | ZCode | `.zcode/` |
469-
| MimoCode | `.mimocode/` | | |
469+
| MimoCode | `.mimocode/` | Grok | `.agents/` |
470470

471471
</details>
472472

assets/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.4.0-beta.18",
2+
"version": "0.4.0-beta.19",
33
"skills": [
44
"comet/SKILL.md",
55
"comet/agents/openai.yaml",

assets/skills/comet-native/scripts/comet-native-hook-guard.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

assets/skills/comet-native/scripts/comet-native-runtime.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

assets/skills/comet/scripts/comet-hook-router.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

domains/comet-entry/hook-adapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const WRITE_TOOL_NAMES = new Set([
1111
'edit',
1212
'editfile',
1313
'patch',
14+
'searchreplace',
1415
'strreplaceeditor',
1516
'write',
1617
'writefile',
@@ -45,6 +46,7 @@ export const COMET_HOOK_PLATFORM_IDS = new Set([
4546
'qoder',
4647
'trae',
4748
'trae-cn',
49+
'grok',
4850
]);
4951

5052
function isRecord(value: unknown): value is Record<string, unknown> {

domains/integrations/superpowers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const SKILLS_AGENT_MAP: Record<string, string | null> = {
1818
continue: 'continue',
1919
'github-copilot': 'github-copilot',
2020
gemini: 'gemini-cli',
21+
// Grok reads Superpowers from the shared .agents root that Codex owns.
22+
grok: 'codex',
2123
'amazon-q': 'universal',
2224
qwen: 'qwen-code',
2325
kilocode: 'kilo',

domains/skill/platform-inspect.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
computeRuleDestPath,
1313
isManagedHookCommand,
1414
readManifest,
15+
resolveClaudeCodeHookMatcher,
1516
} from './platform-install.js';
1617
import { readJsonObjectFile } from './json-object.js';
1718
import type { InitWorkflowSelection } from '../comet-entry/types.js';
@@ -392,14 +393,20 @@ export async function inspectCometHooksForPlatform(
392393
path.join(platformBase, platform.hookConfigFile ?? 'settings.local.json'),
393394
expectedHooks,
394395
(config) => collectGroupedCommands(config, 'PreToolUse'),
395-
(config, expected) => countGroupedHookMatches(config, 'PreToolUse', expected),
396+
(config, expected) =>
397+
countGroupedHookMatches(config, 'PreToolUse', expected, (matcher) =>
398+
resolveClaudeCodeHookMatcher(platform.id, matcher),
399+
),
396400
);
397401
for (const legacyFile of platform.legacyHookConfigFiles ?? []) {
398402
const legacy = await inspectSingleHookJson(
399403
path.join(platformBase, legacyFile),
400404
expectedHooks,
401405
(config) => collectGroupedCommands(config, 'PreToolUse'),
402-
(config, expected) => countGroupedHookMatches(config, 'PreToolUse', expected),
406+
(config, expected) =>
407+
countGroupedHookMatches(config, 'PreToolUse', expected, (matcher) =>
408+
resolveClaudeCodeHookMatcher(platform.id, matcher),
409+
),
403410
);
404411
if (legacy.error) {
405412
inspection = { ...inspection, present: false, error: legacy.error };

0 commit comments

Comments
 (0)