|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://github.com/RooCodeInc/Roo-Code/blob/main/schemas/roomodes.json", |
| 4 | + "title": "Roo Code Custom Modes", |
| 5 | + "description": "Schema for .roomodes configuration files used by Roo Code to define custom modes.", |
| 6 | + "type": "object", |
| 7 | + "required": ["customModes"], |
| 8 | + "additionalProperties": false, |
| 9 | + "properties": { |
| 10 | + "customModes": { |
| 11 | + "type": "array", |
| 12 | + "description": "List of custom mode definitions.", |
| 13 | + "items": { |
| 14 | + "$ref": "#/definitions/CustomMode" |
| 15 | + } |
| 16 | + } |
| 17 | + }, |
| 18 | + "definitions": { |
| 19 | + "ToolGroup": { |
| 20 | + "type": "string", |
| 21 | + "enum": ["read", "edit", "command", "mcp", "modes"], |
| 22 | + "description": "A tool group name that grants the mode access to a set of tools." |
| 23 | + }, |
| 24 | + "GroupOptions": { |
| 25 | + "type": "object", |
| 26 | + "description": "Options that restrict a tool group's file access.", |
| 27 | + "properties": { |
| 28 | + "fileRegex": { |
| 29 | + "type": "string", |
| 30 | + "description": "A regular expression pattern to restrict which files the tool group can access." |
| 31 | + }, |
| 32 | + "description": { |
| 33 | + "type": "string", |
| 34 | + "description": "A human-readable description of the file restriction." |
| 35 | + } |
| 36 | + }, |
| 37 | + "additionalProperties": false |
| 38 | + }, |
| 39 | + "GroupEntryTuple": { |
| 40 | + "type": "array", |
| 41 | + "description": "A tuple of [toolGroupName, options] for tool groups with file restrictions.", |
| 42 | + "items": [{ "$ref": "#/definitions/ToolGroup" }, { "$ref": "#/definitions/GroupOptions" }], |
| 43 | + "additionalItems": false, |
| 44 | + "minItems": 2, |
| 45 | + "maxItems": 2 |
| 46 | + }, |
| 47 | + "GroupEntry": { |
| 48 | + "description": "A tool group permission entry. Either a simple tool group name string, or a [toolGroupName, options] tuple for groups with file restrictions.", |
| 49 | + "oneOf": [{ "$ref": "#/definitions/ToolGroup" }, { "$ref": "#/definitions/GroupEntryTuple" }] |
| 50 | + }, |
| 51 | + "CustomMode": { |
| 52 | + "type": "object", |
| 53 | + "description": "A custom mode definition.", |
| 54 | + "required": ["slug", "name", "roleDefinition", "groups"], |
| 55 | + "additionalProperties": false, |
| 56 | + "properties": { |
| 57 | + "slug": { |
| 58 | + "type": "string", |
| 59 | + "pattern": "^[a-zA-Z0-9-]+$", |
| 60 | + "description": "A unique identifier for the mode, containing only letters, numbers, and dashes." |
| 61 | + }, |
| 62 | + "name": { |
| 63 | + "type": "string", |
| 64 | + "minLength": 1, |
| 65 | + "description": "The display name of the mode." |
| 66 | + }, |
| 67 | + "roleDefinition": { |
| 68 | + "type": "string", |
| 69 | + "minLength": 1, |
| 70 | + "description": "The system prompt that defines the mode's role and behavior." |
| 71 | + }, |
| 72 | + "whenToUse": { |
| 73 | + "type": "string", |
| 74 | + "description": "A description of when this mode should be used, shown in the mode selection UI." |
| 75 | + }, |
| 76 | + "description": { |
| 77 | + "type": "string", |
| 78 | + "description": "A short description of the mode." |
| 79 | + }, |
| 80 | + "customInstructions": { |
| 81 | + "type": "string", |
| 82 | + "description": "Additional instructions appended to the system prompt." |
| 83 | + }, |
| 84 | + "groups": { |
| 85 | + "type": "array", |
| 86 | + "description": "The tool groups this mode has access to.", |
| 87 | + "items": { |
| 88 | + "$ref": "#/definitions/GroupEntry" |
| 89 | + } |
| 90 | + }, |
| 91 | + "source": { |
| 92 | + "type": "string", |
| 93 | + "enum": ["global", "project"], |
| 94 | + "description": "Where this mode was defined. Automatically set by Roo Code." |
| 95 | + } |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | +} |
0 commit comments