|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://json.schemastore.org/roomodes.json", |
| 4 | + "title": "Roo Coder Custom Modes", |
| 5 | + "description": "Schema for Roo Coder custom mode configuration files. Roo Coder is an AI-powered coding assistant that can be extended with custom modes to specialize its behavior for specific tasks. See https://docs.roocode.com/features/custom-modes for documentation.", |
| 6 | + "type": "object", |
| 7 | + "required": ["customModes"], |
| 8 | + "additionalProperties": false, |
| 9 | + "definitions": { |
| 10 | + "permission": { |
| 11 | + "title": "Permission", |
| 12 | + "description": "Tool access permission for a custom mode", |
| 13 | + "oneOf": [ |
| 14 | + { |
| 15 | + "title": "Simple Permission", |
| 16 | + "type": "string", |
| 17 | + "enum": ["read", "edit", "browser", "command", "mcp"], |
| 18 | + "enumDescriptions": [ |
| 19 | + "read: Read access to files", |
| 20 | + "edit: Edit access to all files", |
| 21 | + "browser: Web browser access", |
| 22 | + "command: Command execution access", |
| 23 | + "mcp: Model Context Protocol access" |
| 24 | + ] |
| 25 | + }, |
| 26 | + { |
| 27 | + "title": "Edit Permission with Path Restrictions", |
| 28 | + "description": "Edit permission with optional file path restrictions using regex patterns", |
| 29 | + "type": "object", |
| 30 | + "required": ["type"], |
| 31 | + "additionalProperties": false, |
| 32 | + "properties": { |
| 33 | + "type": { |
| 34 | + "const": "edit", |
| 35 | + "description": "Must be 'edit' for path-restricted edit permissions" |
| 36 | + }, |
| 37 | + "allowedPaths": { |
| 38 | + "type": "array", |
| 39 | + "description": "Regex patterns for allowed file paths. If specified, only files matching these patterns can be edited.", |
| 40 | + "items": { |
| 41 | + "type": "string", |
| 42 | + "format": "regex", |
| 43 | + "examples": ["^/src/.*\\.js$", "^/docs/.*\\.md$"] |
| 44 | + } |
| 45 | + }, |
| 46 | + "disallowedPaths": { |
| 47 | + "type": "array", |
| 48 | + "description": "Regex patterns for disallowed file paths. Files matching these patterns cannot be edited even if they match allowedPaths.", |
| 49 | + "items": { |
| 50 | + "type": "string", |
| 51 | + "format": "regex", |
| 52 | + "examples": [".*\\.env$", ".*/secrets/.*"] |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + ] |
| 58 | + }, |
| 59 | + "customMode": { |
| 60 | + "title": "Custom Mode", |
| 61 | + "description": "Definition of a custom mode in Roo Coder", |
| 62 | + "type": "object", |
| 63 | + "required": ["slug", "name", "roleDefinition"], |
| 64 | + "additionalProperties": false, |
| 65 | + "properties": { |
| 66 | + "slug": { |
| 67 | + "type": "string", |
| 68 | + "pattern": "^[a-z0-9-]+$", |
| 69 | + "minLength": 1, |
| 70 | + "maxLength": 50, |
| 71 | + "description": "Unique internal identifier for the mode. Must contain only lowercase letters, numbers, and hyphens.", |
| 72 | + "examples": ["code-reviewer", "test-writer", "api-designer"] |
| 73 | + }, |
| 74 | + "name": { |
| 75 | + "type": "string", |
| 76 | + "minLength": 1, |
| 77 | + "maxLength": 100, |
| 78 | + "description": "Display name for the mode in the Roo Coder UI. Can include spaces, capitalization, and emojis.", |
| 79 | + "examples": ["Code Reviewer", "Test Writer 🧪", "API Design Expert"] |
| 80 | + }, |
| 81 | + "roleDefinition": { |
| 82 | + "type": "string", |
| 83 | + "minLength": 10, |
| 84 | + "description": "Core identity and expertise of the mode. The first sentence becomes the default mode summary.", |
| 85 | + "examples": [ |
| 86 | + "I am a senior code reviewer focused on improving code quality, maintainability, and performance.", |
| 87 | + "I am a test automation expert specializing in comprehensive test coverage and best practices." |
| 88 | + ] |
| 89 | + }, |
| 90 | + "whenToUse": { |
| 91 | + "type": "string", |
| 92 | + "description": "Guidance for when to use this mode. Used by the Orchestrator mode and for mode switching suggestions.", |
| 93 | + "examples": [ |
| 94 | + "Use this mode when you need a thorough code review with focus on best practices", |
| 95 | + "Use this mode when creating or updating test files" |
| 96 | + ] |
| 97 | + }, |
| 98 | + "customInstructions": { |
| 99 | + "type": "string", |
| 100 | + "description": "Additional behavioral guidelines for the mode. Supports markdown formatting for structured instructions.", |
| 101 | + "examples": [ |
| 102 | + "## Review Process\n1. Analyze code structure\n2. Check for performance issues\n3. Verify security best practices" |
| 103 | + ] |
| 104 | + }, |
| 105 | + "groups": { |
| 106 | + "type": "array", |
| 107 | + "description": "Allowed toolsets and file access permissions for this mode", |
| 108 | + "items": { |
| 109 | + "$ref": "#/definitions/permission" |
| 110 | + }, |
| 111 | + "examples": [ |
| 112 | + ["read", "edit", "browser"], |
| 113 | + ["read", { "type": "edit", "allowedPaths": ["^/docs/.*\\.md$"] }] |
| 114 | + ] |
| 115 | + } |
| 116 | + } |
| 117 | + } |
| 118 | + }, |
| 119 | + "properties": { |
| 120 | + "customModes": { |
| 121 | + "type": "array", |
| 122 | + "description": "Array of custom mode definitions", |
| 123 | + "minItems": 1, |
| 124 | + "items": { |
| 125 | + "$ref": "#/definitions/customMode" |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | +} |
0 commit comments