Roo-Code/schemas/roomodes.json
JunghwanNA 17d812c6a6 Point the .roomodes schema identity at the actual JSON document
The generated schema currently advertises a GitHub blob page as its $id,
which returns HTML rather than the schema document itself.

This updates the source-of-truth generator and checked-in schema to use
a JSON-serving raw URL, and adds a regression assertion for the canonical
metadata value.

Constraint: Must keep the checked-in schema aligned with the generator output
Rejected: Leave the blob URL in place | Schema consumers dereferencing $id receive HTML
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If the schema is moved in the future, keep $id pointing at a JSON-serving canonical URL
Tested: pnpm --dir packages/types exec vitest run src/__tests__/roomodes-schema.spec.ts src/__tests__/roomodes-schema-sync.spec.ts
Not-tested: External IDE/schema consumer end-to-end dereference behavior
2026-04-17 00:43:15 +09:00

96 lines
2.1 KiB
JSON

{
"type": "object",
"properties": {
"customModes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": "^[a-zA-Z0-9-]+$"
},
"name": {
"type": "string",
"minLength": 1
},
"roleDefinition": {
"type": "string",
"minLength": 1
},
"whenToUse": {
"type": "string"
},
"description": {
"type": "string"
},
"customInstructions": {
"type": "string"
},
"source": {
"type": "string",
"enum": ["global", "project"]
},
"groups": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"enum": ["read", "edit", "command", "mcp", "modes", "browser"]
},
{
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "string",
"enum": ["read", "edit", "command", "mcp", "modes", "browser"]
},
{
"type": "object",
"properties": {
"fileRegex": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
}
},
"rulesFiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"relativePath": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": ["relativePath"],
"additionalProperties": false
}
}
},
"required": ["slug", "name", "roleDefinition", "groups"],
"additionalProperties": false
}
}
},
"required": ["customModes"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json",
"title": "Roo Code Custom Modes",
"description": "Schema for .roomodes configuration files used by Roo Code to define custom modes."
}