{
  "contract_key": "org_department_draft_contract",
  "version": "v1",
  "status": "metadata_design_only",
  "business_purpose": "HR creates or adjusts canonical HRMS departments through a gated draft before any business-effective change.",
  "source_boundary": {
    "hrms": "canonical organization owner",
    "feishu_department": "current-state signal only",
    "legacy_d_departments": "migration reference only; not true master data"
  },
  "draft_types": [
    "create_department",
    "move_department",
    "assign_department_leader",
    "view_department_people"
  ],
  "required_fields": [
    "draft_id",
    "draft_type",
    "requested_by",
    "requested_at",
    "target_department",
    "before_state",
    "after_state",
    "reason",
    "impact_preview",
    "required_gate",
    "status"
  ],
  "target_department_fields": [
    "department_code",
    "department_name",
    "parent_department_code",
    "leader_employee_identity_ref",
    "effective_date"
  ],
  "guardrails": [
    "no DB writes in D2",
    "no business-effective org conclusion",
    "detect duplicate department code/name",
    "detect parent-child cycle",
    "leader must resolve via HRMS identity mapping",
    "D000-D004 cannot be used as final master data"
  ],
  "review_package": [
    "business_summary",
    "before_after_tree",
    "employee_distribution_impact",
    "permission_impact",
    "feishu_writeback_sandbox_preview",
    "rollback_note"
  ],
  "writes_db": false,
  "calls_feishu": false,
  "business_effective": false,
  "next_required_gate": "ORG_DEPARTMENT_DRAFT_SCHEMA_REVIEW_GATE"
}