{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://developerz.ai/schemas/maintainer.v1.json",
  "title": "maintainer.yml v1",
  "description": "Policy file for developerz.ai — commit as .dz/maintainer/maintainer.yml (the root .maintainer.yml is the legacy path, still read until deprecation). Every key is optional; omitted sections use their documented defaults.",
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "format": "uri"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "format_command": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "services": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "redis",
              "postgres"
            ]
          }
        },
        {
          "type": "object",
          "properties": {
            "needs": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "redis",
                  "postgres"
                ]
              }
            },
            "up": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            "down": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "tone": {
      "default": {
        "voice": "friendly",
        "language": "en"
      },
      "type": "object",
      "properties": {
        "voice": {
          "default": "friendly",
          "type": "string",
          "enum": [
            "friendly",
            "formal",
            "terse"
          ]
        },
        "language": {
          "default": "en",
          "type": "string",
          "maxLength": 35,
          "pattern": "^[A-Za-z]{2,8}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*$"
        }
      }
    },
    "triage": {
      "default": {
        "ask_for_repro": true,
        "required_fields": [
          "steps",
          "expected",
          "actual",
          "version"
        ],
        "dedupe": {
          "enabled": true,
          "similarity_threshold": 0.85
        },
        "shipped_lookback_days": 14,
        "qualify_into": [
          "bug",
          "feature",
          "dupe",
          "question"
        ],
        "confidence_threshold": 0.6,
        "non_goals": [],
        "close_unanswered_repro_after_days": false,
        "close_inactive_after_days": 60,
        "skip_project_members": false,
        "error_fix_confirm_after_hours": 24,
        "error_fix_confirm_environments": [
          "production"
        ]
      },
      "type": "object",
      "properties": {
        "ask_for_repro": {
          "default": true,
          "type": "boolean"
        },
        "required_fields": {
          "default": [
            "steps",
            "expected",
            "actual",
            "version"
          ],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "steps",
              "expected",
              "actual",
              "version",
              "environment",
              "logs"
            ]
          }
        },
        "dedupe": {
          "default": {
            "enabled": true,
            "similarity_threshold": 0.85
          },
          "type": "object",
          "properties": {
            "enabled": {
              "default": true,
              "type": "boolean"
            },
            "similarity_threshold": {
              "default": 0.85,
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        },
        "shipped_lookback_days": {
          "default": 14,
          "type": "integer",
          "minimum": 0,
          "maximum": 90
        },
        "qualify_into": {
          "default": [
            "bug",
            "feature",
            "dupe",
            "question"
          ],
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "bug",
              "feature",
              "dupe",
              "question",
              "docs",
              "chore"
            ]
          }
        },
        "labels": {
          "type": "object",
          "properties": {
            "qualification": {
              "type": "object",
              "properties": {
                "bug": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "feature": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "dupe": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "question": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "confidence_threshold": {
          "default": 0.6,
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "non_goals": {
          "default": [],
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "stale_after_days": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "stale_action": {
          "type": "string",
          "enum": [
            "comment_then_close",
            "comment_only"
          ]
        },
        "close_unanswered_repro_after_days": {
          "default": false,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean",
              "const": false
            }
          ]
        },
        "close_inactive_after_days": {
          "default": 60,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean",
              "const": false
            }
          ]
        },
        "skip_project_members": {
          "default": false,
          "type": "boolean"
        },
        "error_fix_confirm_after_hours": {
          "default": 24,
          "type": "integer",
          "minimum": 1,
          "maximum": 168
        },
        "error_fix_confirm_environments": {
          "default": [
            "production"
          ],
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "error_issues": {
      "default": {
        "enabled": true
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        }
      }
    },
    "handoff": {
      "default": {
        "mode": "none",
        "ask_reporter_first": true
      },
      "type": "object",
      "properties": {
        "mode": {
          "default": "none",
          "type": "string",
          "enum": [
            "webhook",
            "label",
            "fleet",
            "none"
          ]
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "webhook_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[a-z0-9][a-z0-9_-]*(?::[a-z0-9][a-z0-9_-]*)?$"
        },
        "ask_reporter_first": {
          "default": true,
          "type": "boolean"
        }
      }
    },
    "pr": {
      "default": {
        "wait_for_other_bots": [
          "coderabbit",
          "copilot",
          "dependabot"
        ],
        "required_checks": [],
        "large_threshold_lines": 500,
        "auto_merge": true,
        "auto_merge_scope": "any",
        "require_review": true,
        "require_up_to_date": false,
        "delete_declined_branches": false,
        "human_merge": {
          "paths": [],
          "branches": []
        },
        "close_awaiting_author_after_days": false,
        "close_inactive_after_days": 60
      },
      "type": "object",
      "properties": {
        "wait_for_other_bots": {
          "default": [
            "coderabbit",
            "copilot",
            "dependabot"
          ],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "coderabbit",
              "copilot",
              "dependabot",
              "renovate"
            ]
          }
        },
        "required_checks": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "large_threshold_lines": {
          "default": 500,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "auto_merge": {
          "default": true,
          "type": "boolean"
        },
        "auto_merge_scope": {
          "default": "any",
          "type": "string",
          "enum": [
            "any",
            "own",
            "own_and_dependency_bots",
            "not_project"
          ]
        },
        "require_review": {
          "default": true,
          "type": "boolean"
        },
        "require_up_to_date": {
          "default": false,
          "type": "boolean"
        },
        "delete_declined_branches": {
          "default": false,
          "type": "boolean"
        },
        "human_merge": {
          "default": {
            "paths": [],
            "branches": []
          },
          "type": "object",
          "properties": {
            "paths": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "branches": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "close_awaiting_author_after_days": {
          "default": false,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean",
              "const": false
            }
          ]
        },
        "close_inactive_after_days": {
          "default": 60,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean",
              "const": false
            }
          ]
        }
      }
    },
    "branches": {
      "default": {
        "close_inactive_after_days": 60
      },
      "type": "object",
      "properties": {
        "close_inactive_after_days": {
          "default": 60,
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean",
              "const": false
            }
          ]
        }
      }
    },
    "release": {
      "default": {
        "manager": "release-please",
        "channels": [
          "github-release"
        ],
        "bump_strategy": "tag_only"
      },
      "type": "object",
      "properties": {
        "manager": {
          "default": "release-please",
          "type": "string",
          "enum": [
            "release-please",
            "none"
          ]
        },
        "channels": {
          "default": [
            "github-release"
          ],
          "description": "Only `github-release` is supported; the registry channels are refused by design (no publish tokens held): publish from your own CI, on the tag the bot pushes. An EMPTY list is valid: with `release-please` and `bump_pr_first` the bot may open the bump PR, but it cuts no tag and no GitHub Release; the repository's own workflow owns them.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "github-release",
              "npm",
              "crates",
              "pypi",
              "rubygems"
            ]
          }
        },
        "bump_rules": {
          "description": "Override the default Conventional-Commits → semver mapping (#842). Merged over the built-in defaults, so listing only the types you want to change is enough. A merged Dependabot-only window (`chore(deps)`/`build(deps)`) cuts a patch by default; set `chore(deps): none` here to suppress dep-only releases.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "none",
              "patch",
              "minor",
              "major"
            ]
          }
        },
        "bump_strategy": {
          "default": "tag_only",
          "type": "string",
          "enum": [
            "tag_only",
            "bump_pr_first"
          ]
        },
        "manifest_path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "changelog_path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "cadence": {
          "type": "string",
          "enum": [
            "daily",
            "weekly",
            "monthly"
          ]
        }
      }
    },
    "escalate": {
      "default": {
        "always": [
          "hostile_tone",
          "direct_mention"
        ],
        "ask_before_acting": []
      },
      "type": "object",
      "properties": {
        "always": {
          "default": [
            "hostile_tone",
            "direct_mention"
          ],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "ask_before_acting": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "coding": {
      "default": {},
      "type": "object",
      "properties": {
        "models": {
          "type": "object",
          "properties": {
            "coding": {
              "type": "string",
              "enum": [
                "fast",
                "general",
                "smart",
                "heavy"
              ]
            },
            "debugging_qa": {
              "type": "string",
              "enum": [
                "fast",
                "general",
                "smart",
                "heavy"
              ]
            },
            "general": {
              "type": "string",
              "enum": [
                "fast",
                "general",
                "smart",
                "heavy"
              ]
            },
            "quick": {
              "type": "string",
              "enum": [
                "fast",
                "general",
                "smart",
                "heavy"
              ]
            }
          },
          "additionalProperties": false
        },
        "check_timeout_ms": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 3600000
        },
        "gate_supports_narrow": {
          "type": "boolean"
        },
        "disk_per_task_gb": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 2000
        }
      }
    },
    "ci": {
      "default": {
        "enabled": true,
        "self_fix": true,
        "public_repos": false
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "self_fix": {
          "default": true,
          "type": "boolean"
        },
        "public_repos": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "mcp_servers": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9][a-z0-9_-]*(?::[a-z0-9][a-z0-9_-]*)?$"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "transport": {
            "type": "string",
            "enum": [
              "sse",
              "http-streamable",
              "stdio"
            ]
          },
          "token_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9][a-z0-9_-]*(?::[a-z0-9][a-z0-9_-]*)?$"
          },
          "allowed_tools": {
            "default": [
              "*"
            ],
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "timeout_ms": {
            "default": 5000,
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 60000
          }
        },
        "required": [
          "name",
          "url",
          "transport"
        ]
      }
    },
    "integrations": {
      "default": {
        "slack": false
      },
      "type": "object",
      "properties": {
        "slack": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "tool_services": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "ui-debugger",
          "sentry-mcp"
        ]
      },
      "additionalProperties": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "kb": {
      "default": {
        "repo_notes": [],
        "pages": [],
        "memory": {
          "stale_after_days": 90,
          "delete_unused_after_days": 40,
          "consolidate": true
        },
        "background": {
          "max_pages": 40
        }
      },
      "type": "object",
      "properties": {
        "repo_notes": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "by": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            },
            "required": [
              "note"
            ]
          }
        },
        "pages": {
          "default": [],
          "maxItems": 30,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "purpose": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "parent": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "notes": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "required": [
              "title",
              "purpose"
            ]
          }
        },
        "memory": {
          "default": {
            "stale_after_days": 90,
            "delete_unused_after_days": 40,
            "consolidate": true
          },
          "type": "object",
          "properties": {
            "stale_after_days": {
              "default": 90,
              "type": "integer",
              "minimum": 7,
              "maximum": 9007199254740991
            },
            "delete_unused_after_days": {
              "default": 40,
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 7,
                  "maximum": 9007199254740991
                },
                {
                  "type": "boolean",
                  "const": false
                }
              ]
            },
            "consolidate": {
              "default": true,
              "type": "boolean"
            }
          }
        },
        "background": {
          "default": {
            "max_pages": 40
          },
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "max_pages": {
              "default": 40,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        }
      }
    },
    "schedules": {
      "default": [],
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9][a-z0-9_-]*(?::[a-z0-9][a-z0-9_-]*)?$",
            "description": "Unique name of this schedule within the file; it keys the firing, its task ids and its audit rows."
          },
          "days": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mon",
                "tue",
                "wed",
                "thu",
                "fri",
                "sat",
                "sun"
              ]
            },
            "description": "UTC days this schedule fires on: a non-empty subset of mon, tue, wed, thu, fri, sat, sun."
          },
          "hours_utc": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "description": "UTC hours (0-23) this schedule fires at on each listed day. Non-empty."
          },
          "brief_file": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Repo-relative path to the brief the scout works from, read at the default branch's HEAD when the schedule fires."
          },
          "repos": {
            "description": "Other `owner/repo`s of this account the same checkup also covers. The repo holding this file is always covered and must not be listed.",
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,99}\\/[A-Za-z0-9._-]{1,100}$"
            }
          }
        },
        "required": [
          "name",
          "days",
          "hours_utc",
          "brief_file"
        ],
        "additionalProperties": false
      }
    },
    "scout": {
      "default": {
        "survey": "broken_only"
      },
      "type": "object",
      "properties": {
        "survey": {
          "default": "broken_only",
          "type": "string",
          "enum": [
            "off",
            "broken_only",
            "full"
          ]
        }
      }
    },
    "devops": {
      "default": {
        "watch": "off"
      },
      "type": "object",
      "properties": {
        "watch": {
          "default": "off",
          "type": "string",
          "enum": [
            "off",
            "advisories"
          ]
        }
      }
    },
    "review": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "depth": {
          "default": "inline",
          "type": "string",
          "enum": [
            "inline",
            "deep"
          ]
        },
        "force": {
          "default": false,
          "type": "boolean"
        },
        "coding_agents": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "copilot",
              "devin"
            ]
          }
        },
        "profile": {
          "default": "chill",
          "type": "string",
          "enum": [
            "chill",
            "assertive"
          ]
        },
        "language": {
          "default": "en-US",
          "type": "string",
          "maxLength": 35,
          "pattern": "^[A-Za-z]{2,8}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*$"
        },
        "tone_instructions": {
          "default": "",
          "type": "string",
          "maxLength": 4000
        },
        "request_changes": {
          "default": true,
          "type": "boolean"
        },
        "approval": {
          "default": true,
          "type": "boolean"
        },
        "high_level_summary": {
          "default": true,
          "type": "boolean"
        },
        "learnings": {
          "default": true,
          "type": "boolean"
        },
        "chat_auto_reply": {
          "default": true,
          "type": "boolean"
        },
        "verified_tier": {
          "default": true,
          "type": "boolean"
        },
        "auto_review": {
          "default": {
            "enabled": true,
            "incremental": true,
            "drafts": false,
            "base_branches": [],
            "ignore_title_keywords": []
          },
          "type": "object",
          "properties": {
            "enabled": {
              "default": true,
              "type": "boolean"
            },
            "incremental": {
              "default": true,
              "type": "boolean"
            },
            "drafts": {
              "default": false,
              "type": "boolean"
            },
            "base_branches": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "ignore_title_keywords": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "anti_noise": {
          "default": {
            "severity_floor": "minor",
            "max_comments": 10,
            "dedupe": true
          },
          "type": "object",
          "properties": {
            "severity_floor": {
              "default": "minor",
              "type": "string",
              "enum": [
                "critical",
                "major",
                "minor",
                "nit"
              ]
            },
            "max_comments": {
              "default": 10,
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 200
            },
            "dedupe": {
              "default": true,
              "type": "boolean"
            }
          }
        },
        "path_filters": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "path_instructions": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1
              },
              "instructions": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4000
              }
            },
            "required": [
              "path",
              "instructions"
            ]
          }
        },
        "tolerated_check_failures": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "defer_to": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "coderabbit",
              "greptile",
              "copilot"
            ]
          }
        },
        "mandatory_passes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "correctness",
              "security",
              "tests",
              "api_contract",
              "style_nits"
            ]
          }
        }
      }
    }
  },
  "required": [
    "version"
  ]
}
