{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "PRD Workflow Manager Configuration",
  "description": "Configuration schema for PRD Workflow Manager plugin",
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "Configuration version"
    },
    "mode": {
      "type": "string",
      "enum": ["full", "lightweight", "skills-only"],
      "description": "Plugin operation mode: full (all features), lightweight (no PRDs), skills-only (just reusable skills)",
      "default": "full"
    },
    "modules": {
      "type": "object",
      "description": "Enable/disable plugin modules",
      "properties": {
        "prd": {
          "type": "boolean",
          "description": "Enable PRD workflow commands (/create-prd, /review-prd, /code-prd, etc.)",
          "default": true
        },
        "quality": {
          "type": "boolean",
          "description": "Enable quality commands (/quality-check, linting, testing)",
          "default": true
        },
        "security": {
          "type": "boolean",
          "description": "Enable security commands (/security-audit)",
          "default": true
        },
        "git": {
          "type": "boolean",
          "description": "Enable Git workflow enhancements (/smart-commit, /smart-pr)",
          "default": true
        },
        "devops": {
          "type": "boolean",
          "description": "Enable DevOps commands (future: /deploy, /rollback)",
          "default": false
        },
        "orchestration": {
          "type": "boolean",
          "description": "Enable multi-PRD orchestration (/orchestrate)",
          "default": true
        }
      }
    },
    "prd_workflow": {
      "type": "object",
      "properties": {
        "enabled": { "type": "boolean" },
        "directories": {
          "type": "object",
          "properties": {
            "draft": { "type": "string" },
            "review": { "type": "string" },
            "ready": { "type": "string" },
            "in_progress": { "type": "string" },
            "complete": { "type": "string" },
            "archived": { "type": "string" }
          }
        },
        "prd_id": {
          "type": "object",
          "properties": {
            "prefix": {
              "type": "string",
              "description": "PRD ID prefix (e.g., 'PRD', 'WTC-PRD', 'FEAT')"
            },
            "separator": {
              "type": "string",
              "description": "Separator between prefix and number (e.g., '-', '_')"
            },
            "number_padding": {
              "type": "integer",
              "minimum": 1,
              "maximum": 6,
              "description": "Number of digits for padding (e.g., 3 for '001')"
            }
          }
        },
        "branch_naming": {
          "type": "object",
          "properties": {
            "prefix": {
              "type": "string",
              "description": "Branch prefix (e.g., 'feat', 'feature', 'task')"
            },
            "separator": {
              "type": "string",
              "description": "Separator in branch name (e.g., '-', '/', '_')"
            },
            "pattern": {
              "type": "string",
              "description": "Branch naming pattern with variables: {prefix}, {prd_id}, {separator}, {feature_name}"
            }
          }
        },
        "worktree": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Enable Git worktree creation for parallel development"
            },
            "parent_directory": {
              "type": "string",
              "description": "Parent directory for worktrees (relative to project root)"
            },
            "naming_pattern": {
              "type": "string",
              "description": "Worktree naming pattern. Variables: {project}, {feature}, {prd_id}, {branch}"
            },
            "auto_install_dependencies": {
              "type": "boolean",
              "description": "Automatically run dependency installation in new worktrees"
            },
            "auto_open_editor": {
              "type": "boolean",
              "description": "Automatically open editor in new worktree"
            }
          }
        }
      }
    },
    "security": {
      "type": "object",
      "properties": {
        "enabled": { "type": "boolean" },
        "scan_dependencies": { "type": "boolean" },
        "scan_code": { "type": "boolean" }
      }
    },
    "quality": {
      "type": "object",
      "properties": {
        "enabled": { "type": "boolean" },
        "linting": { "type": "object" },
        "testing": { "type": "object" }
      }
    }
  }
}
