{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "targets": {
      "default": [
        "aider",
        "amazon-q",
        "amp",
        "antigravity",
        "augment-code",
        "claude-code",
        "cline",
        "codex-cli",
        "continue",
        "copilot",
        "crush",
        "cursor",
        "deepagents-cli",
        "factory-droid",
        "gemini-cli",
        "goose",
        "jules",
        "junie",
        "kilo-code",
        "kiro",
        "opencode",
        "pi-agent",
        "qwen-code",
        "replit-agent",
        "roo-code",
        "rovodev",
        "trae",
        "warp",
        "windsurf",
        "zed"
      ],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "aider",
          "amazon-q",
          "amp",
          "antigravity",
          "augment-code",
          "claude-code",
          "cline",
          "codex-cli",
          "continue",
          "copilot",
          "crush",
          "cursor",
          "deepagents-cli",
          "factory-droid",
          "gemini-cli",
          "goose",
          "jules",
          "junie",
          "kilo-code",
          "kiro",
          "opencode",
          "pi-agent",
          "qwen-code",
          "replit-agent",
          "roo-code",
          "rovodev",
          "trae",
          "warp",
          "windsurf",
          "zed"
        ]
      }
    },
    "features": {
      "default": [
        "rules",
        "commands",
        "agents",
        "skills",
        "mcp",
        "hooks",
        "ignore",
        "permissions"
      ],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "rules",
          "commands",
          "agents",
          "skills",
          "mcp",
          "hooks",
          "ignore",
          "permissions"
        ]
      }
    },
    "extends": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "target": {
            "type": "string",
            "enum": [
              "aider",
              "amazon-q",
              "amp",
              "antigravity",
              "augment-code",
              "claude-code",
              "cline",
              "codex-cli",
              "continue",
              "copilot",
              "crush",
              "cursor",
              "deepagents-cli",
              "factory-droid",
              "gemini-cli",
              "goose",
              "jules",
              "junie",
              "kilo-code",
              "kiro",
              "opencode",
              "pi-agent",
              "qwen-code",
              "replit-agent",
              "roo-code",
              "rovodev",
              "trae",
              "warp",
              "windsurf",
              "zed"
            ]
          },
          "as": {
            "type": "string",
            "enum": [
              "rules",
              "commands",
              "agents",
              "skills"
            ]
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "rules",
                "commands",
                "agents",
                "skills",
                "mcp",
                "hooks",
                "ignore",
                "permissions"
              ]
            }
          },
          "path": {
            "type": "string"
          },
          "pick": {
            "type": "object",
            "properties": {
              "skills": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "commands": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rules": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "agents": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "name",
          "source",
          "features"
        ],
        "additionalProperties": false
      }
    },
    "overrides": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "collaboration": {
      "default": {
        "strategy": "merge",
        "lock_features": []
      },
      "type": "object",
      "properties": {
        "strategy": {
          "default": "merge",
          "type": "string",
          "enum": [
            "merge",
            "lock",
            "last-wins"
          ]
        },
        "lock_features": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "conversions": {
      "type": "object",
      "properties": {
        "commands_to_skills": {
          "type": "object",
          "properties": {
            "codex-cli": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "boolean"
                    },
                    "global": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "agents_to_skills": {
          "type": "object",
          "properties": {
            "gemini-cli": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "boolean"
                    },
                    "global": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "cline": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "boolean"
                    },
                    "global": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "codex-cli": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "boolean"
                    },
                    "global": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "windsurf": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "boolean"
                    },
                    "global": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": false
    },
    "plugins": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "source": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "strict": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "source"
        ],
        "additionalProperties": false
      }
    },
    "pluginTargets": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9-]*$"
      }
    }
  },
  "required": [
    "version"
  ],
  "additionalProperties": false,
  "title": "agentsmesh.yaml",
  "description": "AgentsMesh configuration file (agentsmesh.yaml / agentsmesh.local.yaml)"
}
