{
  "task_id": "HRMS_ORG_POSITION_OPERATING_HUB_AND_DRAFT_CONTRACT_PACK_D2",
  "generated_at": "2026-06-09T03:28:15.137339+00:00",
  "previous_gate": "HRMS_ORG_POSITION_GOVERNANCE_MVP_BUILD_PLAN_READY",
  "next_gate": "HRMS_ORG_POSITION_DRAFT_SCHEMA_GAP_REVIEW_GATE",
  "scope": "static operating hub plus metadata-only draft contracts and gated action matrix",
  "business_positioning": {
    "hrms": "organization and position governance master system",
    "feishu_department": "current-state signal only",
    "feishu_title": "current-state signal only",
    "current_actions": "draft / gated only; no business-effective change"
  },
  "counts": {
    "employees": 12,
    "departments": 20,
    "positions": 15,
    "permission_roles": 8,
    "permission_subjects": 13,
    "page_permission_rules": 120,
    "data_scope_rules": 6,
    "field_permission_rules": 195,
    "action_permission_rules": 141
  },
  "distribution_summary": {
    "fdep_departments": 15,
    "legacy_d_departments": 5,
    "employees_on_fdep_departments": 4,
    "employees_on_legacy_departments": 8,
    "fpos_positions": 7,
    "legacy_positions": 8,
    "employees_on_fpos_positions": 4,
    "employees_on_legacy_positions": 8,
    "top_departments_by_employee_count": [
      {
        "department_id": "D001",
        "department_name": "平台运营部",
        "employee_count": 2,
        "position_count": 0
      },
      {
        "department_id": "D002",
        "department_name": "增长营销部",
        "employee_count": 2,
        "position_count": 0
      },
      {
        "department_id": "D003",
        "department_name": "供应链采购部",
        "employee_count": 2,
        "position_count": 0
      },
      {
        "department_id": "FDEP_139EC359",
        "department_name": "Product Management",
        "employee_count": 2,
        "position_count": 1
      },
      {
        "department_id": "D004",
        "department_name": "品牌内容部",
        "employee_count": 1,
        "position_count": 0
      },
      {
        "department_id": "D000",
        "department_name": "跨境电商业务",
        "employee_count": 1,
        "position_count": 0
      },
      {
        "department_id": "FDEP_47C7260A",
        "department_name": "Supply Chain",
        "employee_count": 1,
        "position_count": 1
      },
      {
        "department_id": "FDEP_42619C1F",
        "department_name": "Finance",
        "employee_count": 1,
        "position_count": 1
      }
    ]
  },
  "d1_inputs": {
    "summary_exists": true,
    "org_assets_loaded": 300,
    "position_assets_loaded": 300,
    "canvas_assets_loaded": 300,
    "d1_next_gate": "HRMS_ORG_POSITION_GOVERNANCE_MVP_BUILD_PLAN_READY"
  },
  "reusable_asset_entries": {
    "organization": [
      {
        "path": "data/outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "data/outputs/hrms_unified_nav_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "outputs/hrms_unified_nav_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "algorithm-shadow-validation-runthrough-workbench.html",
        "asset_type": "page",
        "classification": "可直接复用",
        "url_path": "/algorithm-shadow-validation-runthrough-workbench.html",
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "algorithm-talent-review-workbench.html",
        "asset_type": "page",
        "classification": "可直接复用",
        "url_path": "/algorithm-talent-review-workbench.html",
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "assessment-answer-operational-mvp.html",
        "asset_type": "page",
        "classification": "可直接复用",
        "url_path": "/assessment-answer-operational-mvp.html",
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      },
      {
        "path": "assessment-mvp-workbench.html",
        "asset_type": "page",
        "classification": "可直接复用",
        "url_path": "/assessment-mvp-workbench.html",
        "reason": "已有组织/部门页面、API 或数据读取资产，可作为 HRMS canonical org 的资产基础"
      }
    ],
    "position": [
      {
        "path": "data/outputs/api_insight_common_v1.css",
        "asset_type": "api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "outputs/api_insight_common_v1.css",
        "asset_type": "api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "assets/hrms-config-interactions.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "data/outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "data/outputs/hrms_unified_nav_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "hrms_22f1_sso_debug_patch.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      },
      {
        "path": "outputs/backups/hrms_config_centers_client_interaction_layer_ux_fix_apply_1_20260528_193612/hrms-config-interactions.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有岗位/FPOS/职位相关资产，可先复用为岗位治理过渡资产"
      }
    ],
    "canvas": [
      {
        "path": "assets/hrms-config-interactions.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "data/outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "data/outputs/feishu_client_sso_code_test_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "data/outputs/feishu_client_sso_code_test_v2.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "data/outputs/hrms_auth_client_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "data/outputs/hrms_unified_nav_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "hrms_22f1_sso_debug_patch.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      },
      {
        "path": "outputs/api_insight_common_v1.js",
        "asset_type": "frontend_or_api_code",
        "classification": "可直接复用",
        "url_path": null,
        "reason": "已有组织画布、影响预览或飞书只读/沙箱相关资产，可复用为画布 MVP 基座"
      }
    ]
  },
  "schema_readiness": {
    "org_draft": {
      "required_for_next_apply_prep": true,
      "exists": true,
      "matched_tables": [
        "org_change_drafts"
      ],
      "nearby_tables": [
        "feishu_org_department_staging",
        "feishu_org_departments_cache",
        "feishu_org_diff_reports",
        "feishu_org_sync_runs",
        "feishu_org_users_cache",
        "hrms_org_department_import_drafts",
        "org_change_audit_logs",
        "org_change_drafts",
        "org_change_reviews",
        "org_change_rollback_refs",
        "org_snapshots"
      ],
      "row_count": 3,
      "safe_columns": [
        "draft_id",
        "draft_type",
        "target_employee_id",
        "current_department_id",
        "proposed_department_id",
        "current_position_id",
        "proposed_position_id",
        "permission_subject_id",
        "reason",
        "draft_status",
        "can_apply_now",
        "before_payload",
        "after_payload",
        "impact_payload",
        "permission_impact_payload",
        "rollback_ref",
        "created_at",
        "updated_at"
      ],
      "readiness_status": "READY_FOR_CONTRACT_MAPPING",
      "note": "Existing table can be reviewed against D2 contract before any write path."
    },
    "position_draft": {
      "required_for_next_apply_prep": true,
      "exists": false,
      "matched_tables": [],
      "nearby_tables": [
        "hrms_position_import_drafts",
        "hrms_position_master_staging",
        "positions"
      ],
      "row_count": null,
      "safe_columns": [],
      "readiness_status": "SCHEMA_GAP_REVIEW_REQUIRED",
      "note": "No exact draft/sandbox table detected; review schema gap before apply prep."
    },
    "org_canvas_change_draft": {
      "required_for_next_apply_prep": true,
      "exists": true,
      "matched_tables": [
        "org_change_drafts"
      ],
      "nearby_tables": [
        "feishu_org_department_staging",
        "feishu_org_departments_cache",
        "feishu_org_diff_reports",
        "feishu_org_sync_runs",
        "feishu_org_users_cache",
        "hrms_org_department_import_drafts",
        "org_change_audit_logs",
        "org_change_drafts",
        "org_change_reviews",
        "org_change_rollback_refs",
        "org_snapshots"
      ],
      "row_count": 3,
      "safe_columns": [
        "draft_id",
        "draft_type",
        "target_employee_id",
        "current_department_id",
        "proposed_department_id",
        "current_position_id",
        "proposed_position_id",
        "permission_subject_id",
        "reason",
        "draft_status",
        "can_apply_now",
        "before_payload",
        "after_payload",
        "impact_payload",
        "permission_impact_payload",
        "rollback_ref",
        "created_at",
        "updated_at"
      ],
      "readiness_status": "READY_FOR_CONTRACT_MAPPING",
      "note": "Existing table can be reviewed against D2 contract before any write path."
    },
    "writeback_sandbox_job": {
      "required_for_next_apply_prep": true,
      "exists": true,
      "matched_tables": [
        "feishu_writeback_jobs"
      ],
      "nearby_tables": [
        "feishu_writeback_jobs"
      ],
      "row_count": 1,
      "safe_columns": [
        "job_id",
        "draft_id",
        "mode",
        "target_feishu_department_id",
        "target_user_id",
        "request_payload",
        "response_payload",
        "job_status",
        "rollback_ref",
        "created_at",
        "updated_at"
      ],
      "readiness_status": "READY_FOR_CONTRACT_MAPPING",
      "note": "Existing table can be reviewed against D2 contract before any write path."
    }
  },
  "page_quality_score": 94,
  "redline_status": {
    "db_write": false,
    "department_created": false,
    "position_created": false,
    "org_draft_created": false,
    "position_draft_created": false,
    "org_apply_executed": false,
    "position_apply_executed": false,
    "feishu_call": false,
    "feishu_writeback": false,
    "active_permission_rule_change": false,
    "schema_migration": false,
    "service_restart": false,
    "nginx_systemd_postgres_change": false,
    "sensitive_output": false
  },
  "url_status": {
    "/hrms-org-position-governance-operating-hub.html": "200",
    "/outputs/hrms_org_position_operating_hub_summary_v1.json": "200",
    "/outputs/hrms_org_department_draft_contract_v1.json": "200",
    "/outputs/hrms_position_draft_contract_v1.json": "200",
    "/outputs/hrms_org_canvas_change_draft_contract_v1.json": "200",
    "/outputs/hrms_feishu_writeback_sandbox_contract_v1.json": "200",
    "/outputs/hrms_org_position_gated_action_matrix_v1.json": "200",
    "/outputs/hrms_org_position_draft_schema_readiness_v1.json": "200",
    "/outputs/hrms_org_position_operating_hub_page_quality_check_v1.json": "200",
    "/outputs/hrms_org_position_d2_next_gate_v1.json": "200"
  },
  "acceptance": {
    "url_200_all": true,
    "quality_score": 94,
    "quality_passed": true,
    "redline_touched": false,
    "next_gate": "HRMS_ORG_POSITION_DRAFT_SCHEMA_GAP_REVIEW_GATE"
  }
}