{
  "metadata": {
    "generated_at": "2026-05-28T20:38:41+08:00",
    "stage": "P1_HRMS_ACTION_BUTTON_SYSTEM_REGISTRY",
    "purpose": "只读 HRMS 统一动作按钮体系 Registry，为 create draft、impact preview、owner direct approval、run test、reset cleanup、controlled apply 提供统一动作模型。",
    "action_button_system_registry_readonly": true,
    "writes_database": false,
    "modifies_backend": false,
    "modifies_permissions": false,
    "modifies_frontend_pages": false,
    "calls_backend_api": false,
    "executes_assessment": false,
    "executes_algorithm": false,
    "generates_org_capability_score": false,
    "triggers_org_canvas": false,
    "executes_people_action": false,
    "feishu_writeback_required": false,
    "expands_permission": false
  },
  "action_system_summary": {
    "action_type_count": 13,
    "button_state_count": 17,
    "execution_layer_count": 5,
    "module_adaptation_count": 5,
    "test_flow_count": 5,
    "action_model_field_count": 28,
    "owner_direct_approval_supported": true,
    "file_based_test_supported_later": true,
    "sandbox_runthrough_supported_later": true,
    "reset_cleanup_required_later": true,
    "production_controlled_apply_required_later": true
  },
  "action_button_taxonomy": [
    {
      "action_type": "link_action",
      "purpose": "跳转页面或打开 registry / report。",
      "allowed_stage": [
        "ui_only_preview"
      ],
      "forbidden_stage": [
        "business_write"
      ],
      "input_required": [
        "url"
      ],
      "output_expected": [
        "navigation"
      ],
      "backend_required_later": false,
      "file_based_supported": false,
      "sandbox_supported": false,
      "production_allowed": true,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_p1_behavior": "直接跳转或打开新页面。",
      "future_p2_behavior": "可纳入统一导航审计。",
      "user_feedback_required": "必须有真实 URL。"
    },
    {
      "action_type": "preview_action",
      "purpose": "打开详情、drawer、tabs、notice。",
      "allowed_stage": [
        "ui_only_preview"
      ],
      "forbidden_stage": [
        "backend_call"
      ],
      "input_required": [
        "target section"
      ],
      "output_expected": [
        "drawer_or_notice"
      ],
      "backend_required_later": false,
      "file_based_supported": false,
      "sandbox_supported": false,
      "production_allowed": false,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_p1_behavior": "仅前端展示。",
      "future_p2_behavior": "可接入 file-based preview 输出。",
      "user_feedback_required": "必须展示即时反馈。"
    },
    {
      "action_type": "create_draft_action",
      "purpose": "创建 file-based / sandbox 草案。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "production_controlled_apply"
      ],
      "input_required": [
        "object type",
        "TEST_ namespace"
      ],
      "output_expected": [
        "draft object"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前显示 future_action_disabled。",
      "future_p2_behavior": "创建 TEST_ 草案文件或 sandbox 草案。",
      "user_feedback_required": "说明后续 Draft 阶段开放。"
    },
    {
      "action_type": "edit_draft_action",
      "purpose": "编辑草案。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "effective"
      ],
      "input_required": [
        "draft id",
        "diff"
      ],
      "output_expected": [
        "updated draft"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前只展示编辑原则。",
      "future_p2_behavior": "编辑 TEST_ 草案并记录 diff。",
      "user_feedback_required": "必须说明不改 active 配置。"
    },
    {
      "action_type": "clone_draft_action",
      "purpose": "复制现有配置为草案。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "direct production"
      ],
      "input_required": [
        "source id"
      ],
      "output_expected": [
        "cloned TEST_ draft"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前只展示复制说明。",
      "future_p2_behavior": "从只读配置生成 TEST_ 草案。",
      "user_feedback_required": "必须展示来源和 TEST_ 前缀。"
    },
    {
      "action_type": "compare_version_action",
      "purpose": "版本对比 / diff。",
      "allowed_stage": [
        "ui_only_preview",
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "none"
      ],
      "input_required": [
        "source version",
        "target version"
      ],
      "output_expected": [
        "diff report"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": true,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_p1_behavior": "当前展示 diff 入口说明。",
      "future_p2_behavior": "生成 file-based diff 报告。",
      "user_feedback_required": "必须显示差异和无写入说明。"
    },
    {
      "action_type": "generate_impact_preview_action",
      "purpose": "生成影响预览。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "production_effective_without_gate"
      ],
      "input_required": [
        "draft id",
        "schema refs",
        "permission refs"
      ],
      "output_expected": [
        "impact preview result"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前打开 impact preview 说明。",
      "future_p2_behavior": "生成 file-based impact preview JSON。",
      "user_feedback_required": "必须展示影响范围、风险、Gate、reset。"
    },
    {
      "action_type": "owner_direct_approval_action",
      "purpose": "负责人直批，仅限 test fixture / sandbox。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "production_controlled_apply"
      ],
      "input_required": [
        "draft id",
        "impact preview",
        "reset plan"
      ],
      "output_expected": [
        "owner approval record"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前只显示负责人直批原则。",
      "future_p2_behavior": "记录 project_owner 直批 sandbox。",
      "user_feedback_required": "必须提示不代表 production effective。"
    },
    {
      "action_type": "run_test_case_action",
      "purpose": "运行测试案例。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough",
        "demo_tenant_runthrough"
      ],
      "forbidden_stage": [
        "production_controlled_apply_without_gate"
      ],
      "input_required": [
        "test case id",
        "fixture"
      ],
      "output_expected": [
        "test output",
        "validation report"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前显示后续在 Sandbox 阶段开放。",
      "future_p2_behavior": "运行 TEST_ fixture 并生成输出。",
      "user_feedback_required": "必须显示运行状态、结果和 reset 提示。"
    },
    {
      "action_type": "view_output_action",
      "purpose": "查看测试输出、影响预览结果、validation report。",
      "allowed_stage": [
        "ui_only_preview",
        "file_based_test",
        "db_sandbox_runthrough"
      ],
      "forbidden_stage": [
        "none"
      ],
      "input_required": [
        "output ref"
      ],
      "output_expected": [
        "report view"
      ],
      "backend_required_later": false,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": true,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_p1_behavior": "当前打开 report / drawer。",
      "future_p2_behavior": "查看 file-based 或 sandbox 输出。",
      "user_feedback_required": "必须展示输出来源和是否 business_effective=false。"
    },
    {
      "action_type": "reset_cleanup_action",
      "purpose": "reset / cleanup 测试数据。",
      "allowed_stage": [
        "file_based_test",
        "db_sandbox_runthrough",
        "demo_tenant_runthrough"
      ],
      "forbidden_stage": [
        "production_without_gate"
      ],
      "input_required": [
        "run id",
        "reset plan"
      ],
      "output_expected": [
        "reset report"
      ],
      "backend_required_later": true,
      "file_based_supported": true,
      "sandbox_supported": true,
      "production_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前显示 reset 原则。",
      "future_p2_behavior": "执行 TEST_ 数据 reset 并生成报告。",
      "user_feedback_required": "必须展示可回滚、可审计、not_for_feishu_writeback。"
    },
    {
      "action_type": "submit_controlled_apply_action",
      "purpose": "提交正式 controlled apply。",
      "allowed_stage": [
        "production_controlled_apply"
      ],
      "forbidden_stage": [
        "ui_only_preview",
        "file_based_test_without_validation"
      ],
      "input_required": [
        "approved draft",
        "impact preview",
        "audit",
        "rollback"
      ],
      "output_expected": [
        "controlled apply request"
      ],
      "backend_required_later": true,
      "file_based_supported": false,
      "sandbox_supported": false,
      "production_allowed": true,
      "owner_direct_approval_allowed": false,
      "reset_required": true,
      "audit_required": true,
      "current_p1_behavior": "当前禁用并说明未来开放。",
      "future_p2_behavior": "进入正式 Gate、审批、审计、回滚。",
      "user_feedback_required": "必须明确正式生效风险。"
    },
    {
      "action_type": "disabled_future_action",
      "purpose": "未来功能按钮，有明确提示，不可无反馈。",
      "allowed_stage": [
        "ui_only_preview"
      ],
      "forbidden_stage": [
        "silent_click"
      ],
      "input_required": [
        "reason"
      ],
      "output_expected": [
        "inline notice"
      ],
      "backend_required_later": false,
      "file_based_supported": false,
      "sandbox_supported": false,
      "production_allowed": false,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": false,
      "current_p1_behavior": "显示 disabled / planned 提示。",
      "future_p2_behavior": "按阶段替换为具体动作类型。",
      "user_feedback_required": "点击必须有说明反馈。"
    }
  ],
  "button_state_machine": [
    {
      "state_id": "hidden",
      "allowed_actions": [
        "none"
      ],
      "forbidden_actions": [
        "all"
      ],
      "visible_to_roles": [
        "authorized roles"
      ],
      "required_preconditions": [
        "role hidden or missing prerequisite"
      ],
      "next_states": [
        "visible_preview_only"
      ],
      "blocking_conditions": [
        "role not allowed"
      ],
      "user_message": "当前角色不可见。",
      "audit_required": false
    },
    {
      "state_id": "visible_preview_only",
      "allowed_actions": [
        "preview_action",
        "link_action"
      ],
      "forbidden_actions": [
        "business_write"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "page loaded"
      ],
      "next_states": [
        "visible_disabled_future",
        "ready_for_file_based_test"
      ],
      "blocking_conditions": [
        "no data model"
      ],
      "user_message": "当前仅前端预览，不写库。",
      "audit_required": true
    },
    {
      "state_id": "visible_disabled_future",
      "allowed_actions": [
        "disabled_future_action"
      ],
      "forbidden_actions": [
        "run_test_case_action"
      ],
      "visible_to_roles": [
        "authorized roles"
      ],
      "required_preconditions": [
        "future capability"
      ],
      "next_states": [
        "ready_for_file_based_test"
      ],
      "blocking_conditions": [
        "missing fixture"
      ],
      "user_message": "后续在 Draft / Sandbox 阶段开放。",
      "audit_required": false
    },
    {
      "state_id": "ready_for_file_based_test",
      "allowed_actions": [
        "create_draft_action",
        "clone_draft_action"
      ],
      "forbidden_actions": [
        "production apply"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "TEST_ namespace",
        "fixture schema"
      ],
      "next_states": [
        "file_based_running"
      ],
      "blocking_conditions": [
        "missing input"
      ],
      "user_message": "可创建 file-based 测试草案。",
      "audit_required": true
    },
    {
      "state_id": "file_based_running",
      "allowed_actions": [
        "view_output_action"
      ],
      "forbidden_actions": [
        "edit draft",
        "reset cleanup"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "draft exists"
      ],
      "next_states": [
        "file_based_completed",
        "validation_failed"
      ],
      "blocking_conditions": [
        "runtime error"
      ],
      "user_message": "file-based 测试运行中。",
      "audit_required": true
    },
    {
      "state_id": "file_based_completed",
      "allowed_actions": [
        "view_output_action",
        "generate_impact_preview_action"
      ],
      "forbidden_actions": [
        "production apply"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "output exists"
      ],
      "next_states": [
        "ready_for_owner_approval",
        "reset_required"
      ],
      "blocking_conditions": [
        "validation missing"
      ],
      "user_message": "测试输出已生成。",
      "audit_required": true
    },
    {
      "state_id": "ready_for_owner_approval",
      "allowed_actions": [
        "owner_direct_approval_action"
      ],
      "forbidden_actions": [
        "submit_controlled_apply_action"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "impact preview",
        "reset plan"
      ],
      "next_states": [
        "owner_approved_for_sandbox"
      ],
      "blocking_conditions": [
        "missing owner"
      ],
      "user_message": "等待负责人直批 sandbox。",
      "audit_required": true
    },
    {
      "state_id": "owner_approved_for_sandbox",
      "allowed_actions": [
        "run_test_case_action"
      ],
      "forbidden_actions": [
        "production effective"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "approved_by project_owner"
      ],
      "next_states": [
        "ready_for_sandbox_run"
      ],
      "blocking_conditions": [
        "approval expired"
      ],
      "user_message": "已允许 sandbox 测试，不代表正式生效。",
      "audit_required": true
    },
    {
      "state_id": "ready_for_sandbox_run",
      "allowed_actions": [
        "run_test_case_action"
      ],
      "forbidden_actions": [
        "production apply"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "sandbox isolation",
        "reset script"
      ],
      "next_states": [
        "sandbox_running"
      ],
      "blocking_conditions": [
        "no reset script"
      ],
      "user_message": "可运行 sandbox runthrough。",
      "audit_required": true
    },
    {
      "state_id": "sandbox_running",
      "allowed_actions": [
        "view_output_action"
      ],
      "forbidden_actions": [
        "reset cleanup until finished"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "sandbox started"
      ],
      "next_states": [
        "sandbox_completed",
        "validation_failed"
      ],
      "blocking_conditions": [
        "run failed"
      ],
      "user_message": "Sandbox 运行中。",
      "audit_required": true
    },
    {
      "state_id": "sandbox_completed",
      "allowed_actions": [
        "view_output_action",
        "reset_cleanup_action"
      ],
      "forbidden_actions": [
        "production apply without gate"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "output and report"
      ],
      "next_states": [
        "reset_required",
        "ready_for_controlled_apply_candidate"
      ],
      "blocking_conditions": [
        "impact unresolved"
      ],
      "user_message": "Sandbox 已完成，请查看输出并 reset。",
      "audit_required": true
    },
    {
      "state_id": "validation_failed",
      "allowed_actions": [
        "view_output_action",
        "reset_cleanup_action"
      ],
      "forbidden_actions": [
        "controlled apply"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "failure report"
      ],
      "next_states": [
        "reset_required",
        "ready_for_file_based_test"
      ],
      "blocking_conditions": [
        "unresolved failure"
      ],
      "user_message": "验证失败，需要修复或 reset。",
      "audit_required": true
    },
    {
      "state_id": "reset_required",
      "allowed_actions": [
        "reset_cleanup_action"
      ],
      "forbidden_actions": [
        "new run"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "test output exists"
      ],
      "next_states": [
        "reset_completed"
      ],
      "blocking_conditions": [
        "reset failed"
      ],
      "user_message": "需要 reset / cleanup。",
      "audit_required": true
    },
    {
      "state_id": "reset_completed",
      "allowed_actions": [
        "view_output_action",
        "create_draft_action"
      ],
      "forbidden_actions": [
        "none"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "reset report"
      ],
      "next_states": [
        "ready_for_file_based_test"
      ],
      "blocking_conditions": [
        "cleanup incomplete"
      ],
      "user_message": "Reset 完成，可继续下一轮测试。",
      "audit_required": true
    },
    {
      "state_id": "ready_for_controlled_apply_candidate",
      "allowed_actions": [
        "submit_controlled_apply_action"
      ],
      "forbidden_actions": [
        "direct apply"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "validated sandbox",
        "impact preview",
        "approval"
      ],
      "next_states": [
        "submitted_for_controlled_apply"
      ],
      "blocking_conditions": [
        "missing gate package"
      ],
      "user_message": "可提交正式 controlled apply 候选。",
      "audit_required": true
    },
    {
      "state_id": "submitted_for_controlled_apply",
      "allowed_actions": [
        "view_output_action"
      ],
      "forbidden_actions": [
        "edit draft"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "gate request"
      ],
      "next_states": [
        "blocked"
      ],
      "blocking_conditions": [
        "approval rejected"
      ],
      "user_message": "已提交正式 Gate，等待审批。",
      "audit_required": true
    },
    {
      "state_id": "blocked",
      "allowed_actions": [
        "view_output_action",
        "reset_cleanup_action"
      ],
      "forbidden_actions": [
        "all execution"
      ],
      "visible_to_roles": [
        "HR Owner",
        "OD Owner",
        "Org Capability Config Admin",
        "System Admin",
        "Auditor"
      ],
      "required_preconditions": [
        "blocking reason"
      ],
      "next_states": [
        "reset_required",
        "ready_for_file_based_test"
      ],
      "blocking_conditions": [
        "policy block"
      ],
      "user_message": "当前被阻断，请查看原因。",
      "audit_required": true
    }
  ],
  "execution_layers": [
    {
      "layer_id": "ui_only_preview",
      "purpose": "当前页面内交互，不写库、不调用后端。",
      "writes_database": false,
      "calls_backend_api": false,
      "business_effective_allowed": false,
      "feishu_writeback_allowed": false,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_stage_allowed": true,
      "required_preconditions": [
        "stage gate",
        "role allowed"
      ],
      "forbidden_actions": [
        "silent execution",
        "unapproved production apply"
      ]
    },
    {
      "layer_id": "file_based_test",
      "purpose": "生成 file-based draft / fixture / output，可由负责人直批，可 reset。",
      "writes_database": false,
      "calls_backend_api": true,
      "business_effective_allowed": false,
      "feishu_writeback_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_stage_allowed": false,
      "required_preconditions": [
        "stage gate",
        "role allowed"
      ],
      "forbidden_actions": [
        "silent execution",
        "unapproved production apply"
      ]
    },
    {
      "layer_id": "db_sandbox_runthrough",
      "purpose": "写入 TEST_ / sandbox 数据，必须具备 DB 隔离、reset script、rollback。",
      "writes_database": true,
      "calls_backend_api": false,
      "business_effective_allowed": false,
      "feishu_writeback_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_stage_allowed": false,
      "required_preconditions": [
        "stage gate",
        "role allowed"
      ],
      "forbidden_actions": [
        "silent execution",
        "unapproved production apply"
      ]
    },
    {
      "layer_id": "demo_tenant_runthrough",
      "purpose": "未来 demo tenant 全链路跑通。",
      "writes_database": false,
      "calls_backend_api": false,
      "business_effective_allowed": false,
      "feishu_writeback_allowed": false,
      "owner_direct_approval_allowed": true,
      "reset_required": true,
      "audit_required": true,
      "current_stage_allowed": false,
      "required_preconditions": [
        "stage gate",
        "role allowed"
      ],
      "forbidden_actions": [
        "silent execution",
        "unapproved production apply"
      ]
    },
    {
      "layer_id": "production_controlled_apply",
      "purpose": "正式组织、正式员工、正式配置，必须走 Gate、审批、审计、回滚。",
      "writes_database": true,
      "calls_backend_api": false,
      "business_effective_allowed": true,
      "feishu_writeback_allowed": false,
      "owner_direct_approval_allowed": false,
      "reset_required": false,
      "audit_required": true,
      "current_stage_allowed": false,
      "required_preconditions": [
        "stage gate",
        "role allowed"
      ],
      "forbidden_actions": [
        "silent execution",
        "unapproved production apply"
      ]
    }
  ],
  "module_action_adaptations": [
    {
      "module_id": "assessment_template_config_center",
      "module_name": "测评模板配置中心",
      "supported_action_types": [
        "link_action",
        "preview_action",
        "create_draft_action",
        "edit_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action",
        "submit_controlled_apply_action",
        "disabled_future_action"
      ],
      "primary_button_groups": [
        "创建模板草案",
        "编辑模板草案",
        "生成影响预览",
        "负责人直批测试",
        "运行测试测评",
        "查看测评结果",
        "reset 测试任务",
        "提交正式发放申请"
      ],
      "test_actions": [
        "create_draft_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "preview_actions": [
        "link_action",
        "preview_action",
        "generate_impact_preview_action",
        "view_output_action"
      ],
      "future_actions": [
        "create_draft_action",
        "edit_draft_action",
        "run_test_case_action",
        "reset_cleanup_action"
      ],
      "production_apply_actions": [
        "submit_controlled_apply_action"
      ],
      "redlines": [
        "no_database_write_in_p1",
        "no_backend_api_call_in_p1",
        "no_people_action_execution",
        "no_feishu_writeback",
        "production_apply_requires_controlled_gate"
      ]
    },
    {
      "module_id": "algorithm_config_center",
      "module_name": "算法配置中心",
      "supported_action_types": [
        "link_action",
        "preview_action",
        "create_draft_action",
        "edit_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action",
        "submit_controlled_apply_action",
        "disabled_future_action"
      ],
      "primary_button_groups": [
        "创建算法草案",
        "修改权重 / 阈值草案",
        "生成 impact preview",
        "运行 shadow validation",
        "查看算法输出",
        "reset 测试输出",
        "controlled refactor / apply"
      ],
      "test_actions": [
        "create_draft_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "preview_actions": [
        "link_action",
        "preview_action",
        "generate_impact_preview_action",
        "view_output_action"
      ],
      "future_actions": [
        "create_draft_action",
        "edit_draft_action",
        "run_test_case_action",
        "reset_cleanup_action"
      ],
      "production_apply_actions": [
        "submit_controlled_apply_action"
      ],
      "redlines": [
        "no_database_write_in_p1",
        "no_backend_api_call_in_p1",
        "no_people_action_execution",
        "no_feishu_writeback",
        "production_apply_requires_controlled_gate"
      ]
    },
    {
      "module_id": "position_capability_task_config_center",
      "module_name": "岗位-能力-任务配置中心",
      "supported_action_types": [
        "link_action",
        "preview_action",
        "create_draft_action",
        "edit_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action",
        "submit_controlled_apply_action",
        "disabled_future_action"
      ],
      "primary_button_groups": [
        "创建岗位配置草案",
        "编辑能力模型",
        "配置任务规则",
        "生成影响预览",
        "运行岗位测试案例",
        "查看人岗匹配输出",
        "reset 测试记录",
        "controlled apply"
      ],
      "test_actions": [
        "create_draft_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "preview_actions": [
        "link_action",
        "preview_action",
        "generate_impact_preview_action",
        "view_output_action"
      ],
      "future_actions": [
        "create_draft_action",
        "edit_draft_action",
        "run_test_case_action",
        "reset_cleanup_action"
      ],
      "production_apply_actions": [
        "submit_controlled_apply_action"
      ],
      "redlines": [
        "no_database_write_in_p1",
        "no_backend_api_call_in_p1",
        "no_people_action_execution",
        "no_feishu_writeback",
        "production_apply_requires_controlled_gate"
      ]
    },
    {
      "module_id": "org_capability_model_config_center",
      "module_name": "组织能力模型配置中心",
      "supported_action_types": [
        "link_action",
        "preview_action",
        "create_draft_action",
        "edit_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action",
        "submit_controlled_apply_action",
        "disabled_future_action"
      ],
      "primary_button_groups": [
        "创建组织能力模型草案",
        "生成组织能力 impact preview",
        "owner direct approval",
        "运行 6 个组织能力测试案例",
        "查看组织能力测试输出",
        "生成组织画布草案，测试态",
        "生成人事动作约束草案，测试态",
        "reset cleanup",
        "production controlled apply"
      ],
      "test_actions": [
        "create_draft_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "preview_actions": [
        "link_action",
        "preview_action",
        "generate_impact_preview_action",
        "view_output_action"
      ],
      "future_actions": [
        "create_draft_action",
        "edit_draft_action",
        "run_test_case_action",
        "reset_cleanup_action"
      ],
      "production_apply_actions": [
        "submit_controlled_apply_action"
      ],
      "redlines": [
        "no_database_write_in_p1",
        "no_backend_api_call_in_p1",
        "no_people_action_execution",
        "no_feishu_writeback",
        "production_apply_requires_controlled_gate"
      ]
    },
    {
      "module_id": "config_governance_center",
      "module_name": "配置治理中心",
      "supported_action_types": [
        "link_action",
        "preview_action",
        "create_draft_action",
        "edit_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action",
        "submit_controlled_apply_action",
        "disabled_future_action"
      ],
      "primary_button_groups": [
        "查看全局待办",
        "查看风险",
        "查看 impact preview",
        "查看 sandbox 状态",
        "查看 reset 报告",
        "提交 controlled apply，未来"
      ],
      "test_actions": [
        "create_draft_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "preview_actions": [
        "link_action",
        "preview_action",
        "generate_impact_preview_action",
        "view_output_action"
      ],
      "future_actions": [
        "create_draft_action",
        "edit_draft_action",
        "run_test_case_action",
        "reset_cleanup_action"
      ],
      "production_apply_actions": [
        "submit_controlled_apply_action"
      ],
      "redlines": [
        "no_database_write_in_p1",
        "no_backend_api_call_in_p1",
        "no_people_action_execution",
        "no_feishu_writeback",
        "production_apply_requires_controlled_gate"
      ]
    }
  ],
  "test_flow_button_chains": [
    {
      "flow_id": "assessment_template_test_flow",
      "button_sequence": [
        "create_draft_action",
        "run_test_case_action",
        "view_output_action",
        "generate_impact_preview_action",
        "reset_cleanup_action"
      ],
      "required_input": [
        "TEST_ template draft",
        "TEST_ task",
        "mock/imported result"
      ],
      "expected_output": [
        "result mapping",
        "validation report",
        "reset report"
      ],
      "owner_direct_approval_step": "owner_direct_approval_action",
      "sandbox_flags": {
        "sandbox_run": true,
        "test_fixture": true,
        "business_effective": false,
        "not_for_feishu_writeback": true,
        "resettable": true,
        "namespace_prefix": "TEST_"
      },
      "reset_step": "reset_cleanup_action",
      "current_stage_allowed": "ui_only_preview design; future file_based_test allowed after Apply",
      "future_backend_required": true,
      "production_gate_required_later": true,
      "flow_name": "测评模板测试跑通链路"
    },
    {
      "flow_id": "algorithm_shadow_validation_flow",
      "button_sequence": [
        "clone_draft_action",
        "generate_impact_preview_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "required_input": [
        "algorithm draft",
        "test input dataset"
      ],
      "expected_output": [
        "shadow validation diff",
        "algorithm output",
        "reset report"
      ],
      "owner_direct_approval_step": "owner_direct_approval_action",
      "sandbox_flags": {
        "sandbox_run": true,
        "test_fixture": true,
        "business_effective": false,
        "not_for_feishu_writeback": true,
        "resettable": true,
        "namespace_prefix": "TEST_"
      },
      "reset_step": "reset_cleanup_action",
      "current_stage_allowed": "ui_only_preview design; future file_based_test allowed after Apply",
      "future_backend_required": true,
      "production_gate_required_later": true,
      "flow_name": "算法 Shadow Validation 跑通链路"
    },
    {
      "flow_id": "position_capability_runthrough_flow",
      "button_sequence": [
        "create_draft_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "required_input": [
        "TEST_ position",
        "TEST_ employee",
        "capability model"
      ],
      "expected_output": [
        "person-position match output",
        "validation report",
        "reset report"
      ],
      "owner_direct_approval_step": "owner_direct_approval_action",
      "sandbox_flags": {
        "sandbox_run": true,
        "test_fixture": true,
        "business_effective": false,
        "not_for_feishu_writeback": true,
        "resettable": true,
        "namespace_prefix": "TEST_"
      },
      "reset_step": "reset_cleanup_action",
      "current_stage_allowed": "ui_only_preview design; future file_based_test allowed after Apply",
      "future_backend_required": true,
      "production_gate_required_later": true,
      "flow_name": "岗位能力测试跑通链路"
    },
    {
      "flow_id": "org_capability_score_generation_flow",
      "button_sequence": [
        "create_draft_action",
        "generate_impact_preview_action",
        "owner_direct_approval_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "required_input": [
        "TEST_ org",
        "assessment result",
        "position data"
      ],
      "expected_output": [
        "org capability test score",
        "validation report",
        "reset report"
      ],
      "owner_direct_approval_step": "owner_direct_approval_action",
      "sandbox_flags": {
        "sandbox_run": true,
        "test_fixture": true,
        "business_effective": false,
        "not_for_feishu_writeback": true,
        "resettable": true,
        "namespace_prefix": "TEST_"
      },
      "reset_step": "reset_cleanup_action",
      "current_stage_allowed": "ui_only_preview design; future file_based_test allowed after Apply",
      "future_backend_required": true,
      "production_gate_required_later": true,
      "flow_name": "组织能力评分测试跑通链路"
    },
    {
      "flow_id": "org_canvas_people_action_constraint_flow",
      "button_sequence": [
        "view_output_action",
        "generate_impact_preview_action",
        "run_test_case_action",
        "view_output_action",
        "reset_cleanup_action"
      ],
      "required_input": [
        "org capability test output",
        "org canvas draft",
        "people action constraint"
      ],
      "expected_output": [
        "org canvas draft",
        "people action constraint draft",
        "impact preview",
        "reset report"
      ],
      "owner_direct_approval_step": "owner_direct_approval_action",
      "sandbox_flags": {
        "sandbox_run": true,
        "test_fixture": true,
        "business_effective": false,
        "not_for_feishu_writeback": true,
        "resettable": true,
        "namespace_prefix": "TEST_"
      },
      "reset_step": "reset_cleanup_action",
      "current_stage_allowed": "ui_only_preview design; future file_based_test allowed after Apply",
      "future_backend_required": true,
      "production_gate_required_later": true,
      "flow_name": "组织画布与人事动作约束测试链路"
    }
  ],
  "action_button_data_model": [
    "action_id",
    "action_type",
    "action_label",
    "module",
    "target_object_type",
    "target_object_id",
    "lifecycle_state",
    "execution_layer",
    "allowed_roles",
    "forbidden_roles",
    "required_inputs",
    "expected_outputs",
    "current_behavior",
    "future_behavior",
    "owner_direct_approval_required",
    "owner_direct_approval_allowed",
    "sandbox_run_required",
    "reset_required",
    "audit_required",
    "rollback_required",
    "business_effective_allowed",
    "feishu_writeback_allowed",
    "backend_api_required_later",
    "current_frontend_only",
    "disabled_reason",
    "user_feedback_message",
    "next_action",
    "validation_rules"
  ],
  "role_visibility_and_redlines": {
    "Employee": "不可见配置 / registry / apply 类按钮。",
    "Manager": "不可见高风险配置按钮。",
    "HRBP": "可见建议类按钮，但不可直接 apply。",
    "HR Owner / OD Owner": "可见草案 / impact / test 按钮。",
    "Boss / Executive": "可见审批和高风险查看按钮。",
    "System Admin": "可见工程资产按钮，但不能单独生效业务配置。",
    "Auditor": "可见审计 / rollback / reset report。",
    "owner_direct_approval": "只用于 sandbox / test fixture。",
    "production_apply": "必须另走 controlled apply gate。"
  },
  "registry_relationships": {
    "hrms_config_centers_client_interaction_layer": "/outputs/hrms_config_centers_client_interaction_layer_ux_fix_summary_v1.json",
    "assessment_template_config_center": "/outputs/assessment_template_config_center_summary_v1.json",
    "algorithm_config_center": "/outputs/algorithm_config_center_summary_v1.json",
    "position_capability_task_config_center": "/outputs/position_capability_task_config_center_summary_v1.json",
    "org_capability_model_config_center": "/outputs/org_capability_model_config_center_summary_v1.json",
    "org_capability_schema_registry": "/outputs/org_capability_schema_registry_v1.json",
    "org_capability_permission_policy_registry": "/outputs/org_capability_permission_policy_registry_v1.json",
    "org_capability_impact_registry": "/outputs/org_capability_impact_registry_v1.json",
    "future_test_fixture_registries": "planned",
    "future_sandbox_runthrough_reports": "planned"
  },
  "p0_p1_p2_p3_saas_action_boundary": {
    "P0": [
      "action model design only"
    ],
    "P1": [
      "readonly action button registry",
      "frontend preview",
      "file-based test design"
    ],
    "P2": [
      "file-based test execution",
      "sandbox runthrough",
      "reset cleanup"
    ],
    "P3": [
      "production controlled apply"
    ],
    "SaaS": [
      "multi-tenant action workflow",
      "permission-aware button rendering",
      "API/Webhook action boundary",
      "audit trail",
      "approval workflow customization"
    ]
  },
  "validation_rules": [
    "registry_is_readonly",
    "json_load_required",
    "action_type_count_must_be_13",
    "button_state_count_must_be_17",
    "execution_layer_count_must_be_5",
    "module_adaptation_count_must_be_5",
    "test_flow_count_must_be_5",
    "action_model_field_count_must_be_at_least_28",
    "no_database_write",
    "no_backend_change",
    "no_permission_change",
    "no_backend_api_call",
    "no_assessment_execution",
    "no_algorithm_execution",
    "no_org_capability_score_generation",
    "no_org_canvas_trigger",
    "no_people_action_execution",
    "no_feishu_writeback",
    "no_permission_expansion"
  ],
  "rollback": {
    "backup_dir": "/var/www/talent-review/outputs/backups/hrms_action_button_system_apply_1_20260528_203841",
    "target_existed_before": false,
    "single_file_restore_command": "rm -f /var/www/talent-review/outputs/hrms_action_button_system_registry_v1.json",
    "new_file_rollback_command": "rm -f /var/www/talent-review/outputs/hrms_action_button_system_registry_v1.json",
    "rename_rollback_command": "mv /var/www/talent-review/outputs/hrms_action_button_system_registry_v1.json /var/www/talent-review/outputs/hrms_action_button_system_registry_v1.json.rollback_20260528_203841"
  }
}
