@orchid-labs/pluxx 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +574 -0
  3. package/bin/pluxx.js +37 -0
  4. package/dist/cli/agent.d.ts +90 -0
  5. package/dist/cli/agent.d.ts.map +1 -0
  6. package/dist/cli/dev.d.ts +2 -0
  7. package/dist/cli/dev.d.ts.map +1 -0
  8. package/dist/cli/doctor.d.ts +19 -0
  9. package/dist/cli/doctor.d.ts.map +1 -0
  10. package/dist/cli/index.d.ts +24 -0
  11. package/dist/cli/index.d.ts.map +1 -0
  12. package/dist/cli/init-from-mcp.d.ts +145 -0
  13. package/dist/cli/init-from-mcp.d.ts.map +1 -0
  14. package/dist/cli/install.d.ts +56 -0
  15. package/dist/cli/install.d.ts.map +1 -0
  16. package/dist/cli/lint.d.ts +18 -0
  17. package/dist/cli/lint.d.ts.map +1 -0
  18. package/dist/cli/migrate.d.ts +2 -0
  19. package/dist/cli/migrate.d.ts.map +1 -0
  20. package/dist/cli/prompt.d.ts +20 -0
  21. package/dist/cli/prompt.d.ts.map +1 -0
  22. package/dist/cli/publish.d.ts +70 -0
  23. package/dist/cli/publish.d.ts.map +1 -0
  24. package/dist/cli/runtime.d.ts +20 -0
  25. package/dist/cli/runtime.d.ts.map +1 -0
  26. package/dist/cli/sync-from-mcp.d.ts +32 -0
  27. package/dist/cli/sync-from-mcp.d.ts.map +1 -0
  28. package/dist/cli/test.d.ts +33 -0
  29. package/dist/cli/test.d.ts.map +1 -0
  30. package/dist/compatibility/matrix.d.ts +14 -0
  31. package/dist/compatibility/matrix.d.ts.map +1 -0
  32. package/dist/config/define.d.ts +18 -0
  33. package/dist/config/define.d.ts.map +1 -0
  34. package/dist/config/load.d.ts +7 -0
  35. package/dist/config/load.d.ts.map +1 -0
  36. package/dist/generators/amp/index.d.ts +13 -0
  37. package/dist/generators/amp/index.d.ts.map +1 -0
  38. package/dist/generators/base.d.ts +49 -0
  39. package/dist/generators/base.d.ts.map +1 -0
  40. package/dist/generators/claude-code/index.d.ts +7 -0
  41. package/dist/generators/claude-code/index.d.ts.map +1 -0
  42. package/dist/generators/cline/index.d.ts +14 -0
  43. package/dist/generators/cline/index.d.ts.map +1 -0
  44. package/dist/generators/codex/index.d.ts +9 -0
  45. package/dist/generators/codex/index.d.ts.map +1 -0
  46. package/dist/generators/cursor/index.d.ts +11 -0
  47. package/dist/generators/cursor/index.d.ts.map +1 -0
  48. package/dist/generators/gemini-cli/index.d.ts +13 -0
  49. package/dist/generators/gemini-cli/index.d.ts.map +1 -0
  50. package/dist/generators/github-copilot/index.d.ts +11 -0
  51. package/dist/generators/github-copilot/index.d.ts.map +1 -0
  52. package/dist/generators/hooks-warning.d.ts +3 -0
  53. package/dist/generators/hooks-warning.d.ts.map +1 -0
  54. package/dist/generators/index.d.ts +11 -0
  55. package/dist/generators/index.d.ts.map +1 -0
  56. package/dist/generators/opencode/index.d.ts +15 -0
  57. package/dist/generators/opencode/index.d.ts.map +1 -0
  58. package/dist/generators/openhands/index.d.ts +11 -0
  59. package/dist/generators/openhands/index.d.ts.map +1 -0
  60. package/dist/generators/roo-code/index.d.ts +14 -0
  61. package/dist/generators/roo-code/index.d.ts.map +1 -0
  62. package/dist/generators/shared/claude-family.d.ts +18 -0
  63. package/dist/generators/shared/claude-family.d.ts.map +1 -0
  64. package/dist/generators/warp/index.d.ts +13 -0
  65. package/dist/generators/warp/index.d.ts.map +1 -0
  66. package/dist/hook-events.d.ts +4 -0
  67. package/dist/hook-events.d.ts.map +1 -0
  68. package/dist/index.d.ts +7 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.js +5302 -0
  71. package/dist/mcp/introspect.d.ts +34 -0
  72. package/dist/mcp/introspect.d.ts.map +1 -0
  73. package/dist/permissions.d.ts +18 -0
  74. package/dist/permissions.d.ts.map +1 -0
  75. package/dist/schema.d.ts +9457 -0
  76. package/dist/schema.d.ts.map +1 -0
  77. package/dist/user-config.d.ts +19 -0
  78. package/dist/user-config.d.ts.map +1 -0
  79. package/dist/validation/platform-rules.d.ts +64 -0
  80. package/dist/validation/platform-rules.d.ts.map +1 -0
  81. package/package.json +76 -0
  82. package/src/cli/agent.ts +1030 -0
  83. package/src/cli/dev.ts +112 -0
  84. package/src/cli/doctor.ts +588 -0
  85. package/src/cli/index.ts +2414 -0
  86. package/src/cli/init-from-mcp.ts +1611 -0
  87. package/src/cli/install.ts +698 -0
  88. package/src/cli/lint.ts +1219 -0
  89. package/src/cli/migrate.ts +614 -0
  90. package/src/cli/prompt.ts +82 -0
  91. package/src/cli/publish.ts +401 -0
  92. package/src/cli/runtime.ts +86 -0
  93. package/src/cli/sync-from-mcp.ts +563 -0
  94. package/src/cli/test.ts +134 -0
  95. package/src/compatibility/matrix.ts +149 -0
  96. package/src/config/define.ts +20 -0
  97. package/src/config/load.ts +74 -0
  98. package/src/generators/amp/index.ts +63 -0
  99. package/src/generators/base.ts +188 -0
  100. package/src/generators/claude-code/index.ts +29 -0
  101. package/src/generators/cline/index.ts +35 -0
  102. package/src/generators/codex/index.ts +120 -0
  103. package/src/generators/cursor/index.ts +158 -0
  104. package/src/generators/gemini-cli/index.ts +83 -0
  105. package/src/generators/github-copilot/index.ts +32 -0
  106. package/src/generators/hooks-warning.ts +51 -0
  107. package/src/generators/index.ts +71 -0
  108. package/src/generators/opencode/index.ts +526 -0
  109. package/src/generators/openhands/index.ts +32 -0
  110. package/src/generators/roo-code/index.ts +35 -0
  111. package/src/generators/shared/claude-family.ts +215 -0
  112. package/src/generators/warp/index.ts +32 -0
  113. package/src/hook-events.ts +33 -0
  114. package/src/index.ts +23 -0
  115. package/src/mcp/introspect.ts +834 -0
  116. package/src/permissions.ts +258 -0
  117. package/src/schema.ts +312 -0
  118. package/src/user-config.ts +177 -0
  119. package/src/validation/platform-rules.ts +565 -0
@@ -0,0 +1,565 @@
1
+ import type { TargetPlatform } from '../schema'
2
+
3
+ type RuleLevel = 'required' | 'supported' | 'fallback' | 'optional' | 'unknown'
4
+
5
+ export interface PlatformRuleSource {
6
+ label: string
7
+ url: string
8
+ }
9
+
10
+ export interface PlatformLimits {
11
+ skillDescriptionMax: number | null
12
+ skillDescriptionDisplayMax: number | null
13
+ skillListingBudgetMax: number | null
14
+ skillNameMax: number
15
+ skillNameMustMatchDir: boolean
16
+ manifestPromptMax: number | null
17
+ manifestPromptCountMax: number | null
18
+ manifestPathPrefix: string | null
19
+ instructionsMaxBytes: number | null
20
+ hooksFeatureFlag: string | null
21
+ rulesMaxLines: number | null
22
+ }
23
+
24
+ export interface PlatformRules {
25
+ platform: TargetPlatform
26
+ summary: string
27
+ limits: PlatformLimits
28
+ skillDiscoveryDirs: {
29
+ path: string
30
+ level: RuleLevel
31
+ notes?: string
32
+ }[]
33
+ frontmatter: {
34
+ standard: string[]
35
+ additional: string[]
36
+ notes?: string
37
+ }
38
+ manifest: {
39
+ files: string[]
40
+ required: boolean
41
+ notes?: string
42
+ }
43
+ mcp: {
44
+ files: string[]
45
+ rootKey?: string
46
+ transports: string[]
47
+ auth: string[]
48
+ notes?: string
49
+ }
50
+ hooks: {
51
+ supported: boolean
52
+ files: string[]
53
+ eventNames: string[]
54
+ notes?: string
55
+ }
56
+ instructions: {
57
+ files: string[]
58
+ format: string
59
+ notes?: string
60
+ }
61
+ sources: PlatformRuleSource[]
62
+ }
63
+
64
+ const STANDARD_SKILL_FRONTMATTER = [
65
+ 'name',
66
+ 'description',
67
+ 'license',
68
+ 'compatibility',
69
+ 'metadata',
70
+ 'disable-model-invocation',
71
+ ] as const
72
+
73
+ const NULL_LIMITS: PlatformLimits = {
74
+ skillDescriptionMax: null,
75
+ skillDescriptionDisplayMax: null,
76
+ skillListingBudgetMax: null,
77
+ skillNameMax: 64,
78
+ skillNameMustMatchDir: false,
79
+ manifestPromptMax: null,
80
+ manifestPromptCountMax: null,
81
+ manifestPathPrefix: null,
82
+ instructionsMaxBytes: null,
83
+ hooksFeatureFlag: null,
84
+ rulesMaxLines: null,
85
+ }
86
+
87
+ export const PLATFORM_LIMITS: Record<TargetPlatform, PlatformLimits> = {
88
+ 'claude-code': {
89
+ ...NULL_LIMITS,
90
+ skillDescriptionMax: 1536,
91
+ skillDescriptionDisplayMax: 250,
92
+ skillListingBudgetMax: 8000,
93
+ },
94
+ 'codex': {
95
+ ...NULL_LIMITS,
96
+ skillDescriptionMax: 1024,
97
+ skillNameMustMatchDir: true,
98
+ manifestPromptMax: 128,
99
+ manifestPromptCountMax: 3,
100
+ manifestPathPrefix: './',
101
+ instructionsMaxBytes: 32768,
102
+ hooksFeatureFlag: 'codex_hooks',
103
+ },
104
+ 'cursor': {
105
+ ...NULL_LIMITS,
106
+ skillNameMustMatchDir: true,
107
+ rulesMaxLines: 500,
108
+ },
109
+ 'opencode': {
110
+ ...NULL_LIMITS,
111
+ skillDescriptionMax: 1024,
112
+ skillNameMustMatchDir: true,
113
+ },
114
+ 'github-copilot': {
115
+ ...NULL_LIMITS,
116
+ skillDescriptionDisplayMax: 250,
117
+ },
118
+ 'openhands': {
119
+ ...NULL_LIMITS,
120
+ },
121
+ 'warp': {
122
+ ...NULL_LIMITS,
123
+ },
124
+ 'gemini-cli': {
125
+ ...NULL_LIMITS,
126
+ skillNameMustMatchDir: true,
127
+ },
128
+ 'roo-code': {
129
+ ...NULL_LIMITS,
130
+ },
131
+ 'cline': {
132
+ ...NULL_LIMITS,
133
+ skillDescriptionMax: 1024,
134
+ skillNameMustMatchDir: true,
135
+ },
136
+ 'amp': {
137
+ ...NULL_LIMITS,
138
+ },
139
+ }
140
+
141
+ type ResearchTarget = Extract<
142
+ TargetPlatform,
143
+ | 'claude-code'
144
+ | 'cursor'
145
+ | 'codex'
146
+ | 'opencode'
147
+ | 'openhands'
148
+ | 'warp'
149
+ | 'gemini-cli'
150
+ | 'roo-code'
151
+ | 'cline'
152
+ | 'amp'
153
+ >
154
+
155
+ export const PLATFORM_VALIDATION_RULES: Record<ResearchTarget, PlatformRules> = {
156
+ 'claude-code': {
157
+ platform: 'claude-code',
158
+ summary: 'Claude Code plugins use an optional manifest at .claude-plugin/plugin.json with auto-discovery for skills, commands, agents, hooks, MCP, and output styles.',
159
+ limits: PLATFORM_LIMITS['claude-code'],
160
+ skillDiscoveryDirs: [
161
+ { path: 'skills/', level: 'supported' },
162
+ ],
163
+ frontmatter: {
164
+ standard: [...STANDARD_SKILL_FRONTMATTER],
165
+ additional: [],
166
+ },
167
+ manifest: {
168
+ files: ['.claude-plugin/plugin.json'],
169
+ required: false,
170
+ notes: 'The manifest is optional; if present, name is the only required field.',
171
+ },
172
+ mcp: {
173
+ files: ['.mcp.json'],
174
+ rootKey: 'mcpServers',
175
+ transports: ['stdio', 'http', 'sse'],
176
+ auth: ['headers', 'env interpolation'],
177
+ notes: 'Claude Code supports either inline MCP config in plugin.json or a separate .mcp.json file.',
178
+ },
179
+ hooks: {
180
+ supported: true,
181
+ files: ['hooks/hooks.json'],
182
+ eventNames: [],
183
+ notes: 'Hook configs can be stored in hooks/hooks.json or inlined in plugin.json.',
184
+ },
185
+ instructions: {
186
+ files: ['CLAUDE.md'],
187
+ format: 'markdown',
188
+ },
189
+ sources: [
190
+ { label: 'Claude Code plugins reference', url: 'https://code.claude.com/docs/en/plugins-reference' },
191
+ { label: 'Claude Code hooks docs', url: 'https://code.claude.com/docs/en/hooks' },
192
+ { label: 'Claude Code skills docs', url: 'https://code.claude.com/docs/en/skills' },
193
+ ],
194
+ },
195
+ 'cursor': {
196
+ platform: 'cursor',
197
+ summary: 'Cursor plugins use .cursor-plugin/plugin.json plus auto-discovered rules, skills, agents, commands, hooks, and mcp.json at the plugin root; Cursor subagents are a related but separate surface under .cursor/agents and ~/.cursor/agents.',
198
+ limits: PLATFORM_LIMITS['cursor'],
199
+ skillDiscoveryDirs: [
200
+ { path: 'skills/', level: 'supported' },
201
+ { path: 'SKILL.md', level: 'fallback', notes: 'Used when no skills directory or manifest skill path is present.' },
202
+ ],
203
+ frontmatter: {
204
+ standard: [...STANDARD_SKILL_FRONTMATTER],
205
+ additional: [],
206
+ },
207
+ manifest: {
208
+ files: ['.cursor-plugin/plugin.json'],
209
+ required: true,
210
+ notes: 'Cursor documents plugin.json as the required plugin manifest.',
211
+ },
212
+ mcp: {
213
+ files: ['mcp.json'],
214
+ rootKey: 'mcpServers',
215
+ transports: ['stdio', 'http', 'sse'],
216
+ auth: ['headers', 'env interpolation'],
217
+ },
218
+ hooks: {
219
+ supported: true,
220
+ files: ['hooks/hooks.json'],
221
+ eventNames: [],
222
+ notes: 'Cursor plugin hooks live under hooks/hooks.json; project hooks also exist separately in .cursor/hooks.json.',
223
+ },
224
+ instructions: {
225
+ files: ['rules/', 'AGENTS.md'],
226
+ format: 'mdc + markdown',
227
+ notes: 'rules/ is the plugin-native instruction surface. AGENTS.md remains useful as shared repo guidance. Cursor subagents use markdown files under .cursor/agents or ~/.cursor/agents (with .claude/.codex compatibility paths).',
228
+ },
229
+ sources: [
230
+ { label: 'Cursor plugins reference', url: 'https://cursor.com/docs/reference/plugins' },
231
+ { label: 'Cursor plugins overview', url: 'https://cursor.com/docs/plugins' },
232
+ { label: 'Cursor hooks docs', url: 'https://cursor.com/docs/hooks' },
233
+ { label: 'Cursor skills docs', url: 'https://cursor.com/docs/skills' },
234
+ { label: 'Cursor rules docs', url: 'https://cursor.com/docs/rules' },
235
+ { label: 'Cursor MCP docs', url: 'https://cursor.com/docs/mcp' },
236
+ { label: 'Cursor CLI headless docs', url: 'https://cursor.com/docs/cli/headless' },
237
+ { label: 'Cursor CLI parameters', url: 'https://cursor.com/docs/cli/reference/parameters' },
238
+ { label: 'Cursor CLI authentication', url: 'https://cursor.com/docs/cli/reference/authentication' },
239
+ { label: 'Cursor subagents docs', url: 'https://cursor.com/docs/subagents' },
240
+ ],
241
+ },
242
+ 'codex': {
243
+ platform: 'codex',
244
+ summary: 'Codex plugins use .codex-plugin/plugin.json with skills, .mcp.json, optional app mappings, and AGENTS.md; current docs separate plugin packaging from hooks configuration and do not document plugin-provided slash commands.',
245
+ limits: PLATFORM_LIMITS['codex'],
246
+ skillDiscoveryDirs: [
247
+ { path: 'skills/', level: 'supported' },
248
+ ],
249
+ frontmatter: {
250
+ standard: [...STANDARD_SKILL_FRONTMATTER],
251
+ additional: [],
252
+ },
253
+ manifest: {
254
+ files: ['.codex-plugin/plugin.json'],
255
+ required: true,
256
+ notes: 'The build plugins guide documents plugin.json, skills/, .mcp.json, .app.json, and assets/ as the standard plugin structure.',
257
+ },
258
+ mcp: {
259
+ files: ['.mcp.json'],
260
+ rootKey: 'mcpServers',
261
+ transports: ['stdio', 'http', 'sse'],
262
+ auth: ['bearer_token_env_var', 'env_http_headers', 'http_headers', 'platform-managed auth'],
263
+ notes: 'The current build guide documents mcpServers as a path to .mcp.json in the plugin bundle.',
264
+ },
265
+ hooks: {
266
+ supported: true,
267
+ files: ['.codex/hooks.json', '~/.codex/hooks.json'],
268
+ eventNames: [],
269
+ notes: 'Codex documents hooks in project/user config, but the current plugin build guide does not document plugin-packaged hooks.',
270
+ },
271
+ instructions: {
272
+ files: ['AGENTS.md'],
273
+ format: 'markdown',
274
+ },
275
+ sources: [
276
+ { label: 'Codex build plugins docs', url: 'https://developers.openai.com/codex/plugins/build' },
277
+ { label: 'Codex hooks docs', url: 'https://developers.openai.com/codex/hooks' },
278
+ { label: 'Codex skills docs', url: 'https://developers.openai.com/codex/skills' },
279
+ { label: 'Codex MCP docs', url: 'https://developers.openai.com/codex/mcp' },
280
+ { label: 'Codex AGENTS.md guide', url: 'https://developers.openai.com/codex/guides/agents-md' },
281
+ ],
282
+ },
283
+ 'opencode': {
284
+ platform: 'opencode',
285
+ summary: 'OpenCode plugins are code-first TypeScript or JavaScript modules that register skills, commands, MCP servers, and hook handlers programmatically.',
286
+ limits: PLATFORM_LIMITS['opencode'],
287
+ skillDiscoveryDirs: [
288
+ { path: 'skills/', level: 'supported' },
289
+ ],
290
+ frontmatter: {
291
+ standard: [...STANDARD_SKILL_FRONTMATTER],
292
+ additional: [],
293
+ },
294
+ manifest: {
295
+ files: ['package.json', 'index.ts'],
296
+ required: true,
297
+ notes: 'OpenCode plugins are loaded as local modules or npm packages rather than a JSON manifest-only bundle.',
298
+ },
299
+ mcp: {
300
+ files: ['index.ts'],
301
+ transports: ['local', 'remote'],
302
+ auth: ['headers', 'programmatic env interpolation', 'OAuth'],
303
+ notes: 'OpenCode plugin code mutates Config["mcp"] programmatically; the underlying platform config supports local and remote servers.',
304
+ },
305
+ hooks: {
306
+ supported: true,
307
+ files: ['index.ts'],
308
+ eventNames: [],
309
+ notes: 'OpenCode hooks are plugin event handlers implemented in code, not a separate hooks.json file.',
310
+ },
311
+ instructions: {
312
+ files: ['index.ts'],
313
+ format: 'typescript',
314
+ notes: 'Plugins inject instructions into the runtime system prompt from code.',
315
+ },
316
+ sources: [
317
+ { label: 'OpenCode plugins docs', url: 'https://opencode.ai/docs/plugins/' },
318
+ { label: 'OpenCode skills docs', url: 'https://opencode.ai/docs/skills/' },
319
+ { label: 'OpenCode MCP servers docs', url: 'https://opencode.ai/docs/mcp-servers/' },
320
+ ],
321
+ },
322
+ 'openhands': {
323
+ platform: 'openhands',
324
+ summary: 'OpenHands plugins use a Claude-style manifest at .plugin/plugin.json and support skills, hooks, and MCP.',
325
+ limits: PLATFORM_LIMITS['openhands'],
326
+ skillDiscoveryDirs: [
327
+ { path: '.openhands/skills/', level: 'supported' },
328
+ { path: '.claude/skills/', level: 'supported' },
329
+ { path: '.agents/skills/', level: 'supported' },
330
+ ],
331
+ frontmatter: {
332
+ standard: [...STANDARD_SKILL_FRONTMATTER],
333
+ additional: ['triggers'],
334
+ notes: 'OpenHands skill docs mention support for trigger metadata in addition to Agent Skills frontmatter.',
335
+ },
336
+ manifest: {
337
+ files: ['.plugin/plugin.json'],
338
+ required: true,
339
+ notes: 'OpenHands plugin docs require a manifest under .plugin.',
340
+ },
341
+ mcp: {
342
+ files: ['.mcp.json'],
343
+ rootKey: 'mcpServers',
344
+ transports: ['stdio', 'http', 'sse'],
345
+ auth: ['headers-based env interpolation'],
346
+ },
347
+ hooks: {
348
+ supported: true,
349
+ files: ['hooks/hooks.json'],
350
+ eventNames: [],
351
+ notes: 'OpenHands supports hook configuration via hooks/hooks.json; event names align with Claude-style hooks in current docs.',
352
+ },
353
+ instructions: {
354
+ files: ['AGENTS.md'],
355
+ format: 'markdown',
356
+ },
357
+ sources: [
358
+ { label: 'OpenHands plugin guide', url: 'https://docs.openhands.dev/sdk/guides/plugins' },
359
+ { label: 'OpenHands skill guide', url: 'https://docs.openhands.dev/sdk/guides/skill' },
360
+ ],
361
+ },
362
+ 'warp': {
363
+ platform: 'warp',
364
+ summary: 'Warp supports skills, rules, and MCP with AGENTS.md as the current rules anchor.',
365
+ limits: PLATFORM_LIMITS['warp'],
366
+ skillDiscoveryDirs: [
367
+ { path: '.agents/skills/', level: 'supported' },
368
+ { path: '.warp/skills/', level: 'supported' },
369
+ { path: '.claude/skills/', level: 'supported', notes: 'Compatibility directory' },
370
+ { path: '.codex/skills/', level: 'supported', notes: 'Compatibility directory' },
371
+ ],
372
+ frontmatter: {
373
+ standard: [...STANDARD_SKILL_FRONTMATTER],
374
+ additional: [],
375
+ },
376
+ manifest: {
377
+ files: [],
378
+ required: false,
379
+ notes: 'Warp does not currently require a dedicated plugin manifest file.',
380
+ },
381
+ mcp: {
382
+ files: ['mcp.json'],
383
+ rootKey: 'mcpServers',
384
+ transports: ['stdio', 'http', 'sse'],
385
+ auth: ['headers', 'OAuth (remote server flows)'],
386
+ },
387
+ hooks: {
388
+ supported: false,
389
+ files: [],
390
+ eventNames: [],
391
+ notes: 'Warp docs reviewed for this ticket focus on skills, rules, and MCP; no standalone hooks schema found.',
392
+ },
393
+ instructions: {
394
+ files: ['AGENTS.md', 'WARP.md'],
395
+ format: 'markdown',
396
+ notes: 'AGENTS.md is current; WARP.md is backward compatible.',
397
+ },
398
+ sources: [
399
+ { label: 'Warp skills docs', url: 'https://docs.warp.dev/agent-platform/capabilities/skills' },
400
+ { label: 'Warp MCP docs', url: 'https://docs.warp.dev/agent-platform/capabilities/mcp' },
401
+ { label: 'Warp rules docs', url: 'https://docs.warp.dev/agent-platform/capabilities/rules' },
402
+ ],
403
+ },
404
+ 'gemini-cli': {
405
+ platform: 'gemini-cli',
406
+ summary: 'Gemini CLI uses gemini-extension.json, GEMINI.md instructions, and hook definitions in hooks/hooks.json.',
407
+ limits: PLATFORM_LIMITS['gemini-cli'],
408
+ skillDiscoveryDirs: [
409
+ { path: 'skills/', level: 'supported' },
410
+ ],
411
+ frontmatter: {
412
+ standard: [...STANDARD_SKILL_FRONTMATTER],
413
+ additional: [],
414
+ },
415
+ manifest: {
416
+ files: ['gemini-extension.json'],
417
+ required: true,
418
+ notes: 'Gemini extensions require a manifest file named gemini-extension.json.',
419
+ },
420
+ mcp: {
421
+ files: ['gemini-extension.json'],
422
+ rootKey: 'mcpServers',
423
+ transports: ['stdio', 'http', 'sse'],
424
+ auth: ['headers', 'env interpolation'],
425
+ },
426
+ hooks: {
427
+ supported: true,
428
+ files: ['hooks/hooks.json'],
429
+ eventNames: [],
430
+ notes: 'Gemini hook docs specify hooks/hooks.json; hook config is separate from gemini-extension.json.',
431
+ },
432
+ instructions: {
433
+ files: ['GEMINI.md'],
434
+ format: 'markdown',
435
+ },
436
+ sources: [
437
+ { label: 'Gemini extensions docs', url: 'https://geminicli.com/docs/extensions/' },
438
+ { label: 'Gemini extension reference', url: 'https://geminicli.com/docs/extensions/reference/' },
439
+ { label: 'Gemini hooks docs', url: 'https://geminicli.com/docs/hooks/' },
440
+ ],
441
+ },
442
+ 'roo-code': {
443
+ platform: 'roo-code',
444
+ summary: 'Roo Code supports project and mode-specific rules, project-level MCP config, and custom modes metadata.',
445
+ limits: PLATFORM_LIMITS['roo-code'],
446
+ skillDiscoveryDirs: [
447
+ { path: '.roo/skills/', level: 'supported' },
448
+ ],
449
+ frontmatter: {
450
+ standard: [...STANDARD_SKILL_FRONTMATTER],
451
+ additional: ['mode fields: slug, roleDefinition, whenToUse, customInstructions, groups'],
452
+ notes: 'Additional fields apply to custom mode definitions, not SKILL.md frontmatter.',
453
+ },
454
+ manifest: {
455
+ files: [],
456
+ required: false,
457
+ notes: 'Roo Code does not require a plugin manifest file.',
458
+ },
459
+ mcp: {
460
+ files: ['.roo/mcp.json', 'mcp_settings.json'],
461
+ rootKey: 'mcpServers',
462
+ transports: ['stdio', 'http', 'sse', 'streamable-http'],
463
+ auth: ['headers', 'OAuth', 'provider-specific env'],
464
+ },
465
+ hooks: {
466
+ supported: false,
467
+ files: [],
468
+ eventNames: [],
469
+ notes: 'No standalone hook event schema identified in Roo docs reviewed for this ticket.',
470
+ },
471
+ instructions: {
472
+ files: ['.roo/rules/', '.roo/rules-{modeSlug}/', '.roorules', '.roorules-{modeSlug}'],
473
+ format: 'markdown',
474
+ notes: '.roo/rules/ and mode-specific rules are preferred over legacy .roorules files.',
475
+ },
476
+ sources: [
477
+ { label: 'Roo custom instructions docs', url: 'https://docs.roocode.com/features/custom-instructions' },
478
+ { label: 'Roo custom modes docs', url: 'https://docs.roocode.com/features/custom-modes' },
479
+ { label: 'Roo MCP docs', url: 'https://docs.roocode.com/features/mcp/using-mcp-in-roo' },
480
+ { label: 'Roo MCP transports docs', url: 'https://docs.roocode.com/features/mcp/server-transports' },
481
+ ],
482
+ },
483
+ 'cline': {
484
+ platform: 'cline',
485
+ summary: 'Cline supports layered rules, .cline/mcp.json, and conditional rules via frontmatter path globs.',
486
+ limits: PLATFORM_LIMITS['cline'],
487
+ skillDiscoveryDirs: [
488
+ { path: '.cline/skills/', level: 'supported' },
489
+ { path: '.agents/skills/', level: 'supported' },
490
+ ],
491
+ frontmatter: {
492
+ standard: [...STANDARD_SKILL_FRONTMATTER],
493
+ additional: ['paths (for conditional .clinerules entries)'],
494
+ notes: 'The additional field applies to rule files, not SKILL.md.',
495
+ },
496
+ manifest: {
497
+ files: [],
498
+ required: false,
499
+ notes: 'Cline does not require a dedicated plugin manifest file.',
500
+ },
501
+ mcp: {
502
+ files: ['.cline/mcp.json'],
503
+ rootKey: 'mcpServers',
504
+ transports: ['stdio', 'http', 'sse'],
505
+ auth: ['headers', 'env interpolation'],
506
+ notes: 'Current Cline docs align with a Claude-style mcpServers object in project config.',
507
+ },
508
+ hooks: {
509
+ supported: true,
510
+ files: ['.clinerules/hooks/'],
511
+ eventNames: [],
512
+ notes: 'Hook scripts are documented under .clinerules/hooks/ conventions.',
513
+ },
514
+ instructions: {
515
+ files: ['.clinerules/', 'AGENTS.md'],
516
+ format: 'markdown',
517
+ notes: '.clinerules supports both always-on and conditional rule files.',
518
+ },
519
+ sources: [
520
+ { label: 'Cline rules docs', url: 'https://docs.cline.bot/customization/cline-rules' },
521
+ ],
522
+ },
523
+ 'amp': {
524
+ platform: 'amp',
525
+ summary: 'AMP uses AGENTS.md/AGENT.md for instruction hierarchy and .amp/settings.json for settings, hooks, and MCP.',
526
+ limits: PLATFORM_LIMITS['amp'],
527
+ skillDiscoveryDirs: [
528
+ { path: '.agents/skills/', level: 'supported' },
529
+ { path: '~/.config/amp/skills/', level: 'supported' },
530
+ ],
531
+ frontmatter: {
532
+ standard: [...STANDARD_SKILL_FRONTMATTER],
533
+ additional: [],
534
+ },
535
+ manifest: {
536
+ files: [],
537
+ required: false,
538
+ notes: 'AMP does not require a standalone plugin manifest file.',
539
+ },
540
+ mcp: {
541
+ files: ['.amp/settings.json', '~/.config/amp/settings.json'],
542
+ rootKey: 'amp.mcpServers',
543
+ transports: ['stdio', 'http'],
544
+ auth: ['headers', 'env interpolation', 'OAuth via server support'],
545
+ },
546
+ hooks: {
547
+ supported: true,
548
+ files: ['.amp/settings.json'],
549
+ eventNames: [],
550
+ notes: 'AMP manual documents hooks within settings, but event naming/details are less explicit than other platforms.',
551
+ },
552
+ instructions: {
553
+ files: ['AGENTS.md', 'AGENT.md'],
554
+ format: 'markdown',
555
+ notes: 'AMP prefers AGENTS.md and falls back to AGENT.md for compatibility.',
556
+ },
557
+ sources: [
558
+ { label: 'AMP manual', url: 'https://ampcode.com/manual' },
559
+ ],
560
+ },
561
+ }
562
+
563
+ export function getPlatformRules(platform: ResearchTarget): PlatformRules {
564
+ return PLATFORM_VALIDATION_RULES[platform]
565
+ }