{
  "version": "0.1.0",
  "name": "openclaw-agent-action-ontology-mvp",
  "purpose": "Minimal business object layer for OpenClaw agents to bind work to objects, states, actions, permissions, evidence, and reports.",
  "objectTypes": {
    "account": {
      "label": "客户公司 / 目标企业",
      "fields": ["name", "industry", "size", "status", "owner_human", "owner_agent", "summary"],
      "statuses": ["new", "researching", "qualified", "active", "inactive", "archived"],
      "allowedEdges": ["has_contact", "has_opportunity", "has_project", "has_deliverable", "has_risk"]
    },
    "contact": {
      "label": "联系人",
      "fields": ["name", "role", "organization", "relationship_status", "owner_human", "owner_agent", "summary"],
      "statuses": ["new", "known", "engaged", "decision_maker", "inactive"],
      "allowedEdges": ["belongs_to_account", "participates_in_meeting", "related_to_opportunity"]
    },
    "opportunity": {
      "label": "销售机会 / 商机",
      "fields": ["title", "account_id", "value_estimate", "stage", "owner_human", "owner_agent", "summary"],
      "statuses": ["new", "qualified", "discovery_scheduled", "discovery_done", "proposal_needed", "proposal_ready", "proposal_sent", "negotiating", "waiting_customer", "won", "lost", "dormant"],
      "allowedEdges": ["belongs_to_account", "has_contact", "has_meeting", "has_task", "has_deliverable", "has_risk"]
    },
    "project": {
      "label": "交付项目 / 内部项目",
      "fields": ["title", "goal", "definition_of_done", "owner_human", "owner_agent", "summary"],
      "statuses": ["intake", "planning", "in_progress", "blocked", "review", "delivered", "accepted", "archived"],
      "allowedEdges": ["belongs_to_account", "has_task", "has_meeting", "has_deliverable", "has_risk"]
    },
    "task": {
      "label": "任务",
      "fields": ["title", "description", "due_at", "priority", "owner_human", "owner_agent", "summary"],
      "statuses": ["todo", "in_progress", "waiting_human", "waiting_external", "done", "cancelled"],
      "allowedEdges": ["belongs_to_project", "belongs_to_opportunity", "blocks_object", "has_evidence"]
    },
    "meeting": {
      "label": "会议 / 语音事件",
      "fields": ["title", "started_at", "participants", "summary", "owner_human", "owner_agent"],
      "statuses": ["captured", "transcribed", "summarized", "actions_extracted", "archived"],
      "allowedEdges": ["belongs_to_account", "belongs_to_project", "belongs_to_opportunity", "produces_task", "produces_risk", "has_evidence"]
    },
    "deliverable": {
      "label": "交付物 / 文档 / PPT / 方案 / 代码产物",
      "fields": ["title", "artifact_uri", "owner_human", "owner_agent", "summary"],
      "statuses": ["draft", "internal_review", "ready_for_client", "sent", "accepted", "needs_revision"],
      "allowedEdges": ["belongs_to_project", "belongs_to_opportunity", "depends_on_task", "has_evidence"]
    },
    "risk": {
      "label": "风险 / 阻塞",
      "fields": ["title", "description", "severity", "owner_human", "owner_agent", "summary"],
      "statuses": ["identified", "assessing", "mitigating", "escalated", "resolved", "accepted"],
      "allowedEdges": ["affects_project", "affects_opportunity", "blocks_task", "has_evidence"]
    }
  },
  "actionContracts": {
    "create_task": {
      "objectTypes": ["project", "meeting", "opportunity", "risk"],
      "riskLevel": "low",
      "approvalRequired": false,
      "requiredInputs": ["title", "owner", "due_at"],
      "expectedOutput": "task object",
      "verification": "task exists and is linked to source object"
    },
    "summarize_object": {
      "objectTypes": ["account", "contact", "opportunity", "project", "task", "meeting", "deliverable", "risk"],
      "riskLevel": "low",
      "approvalRequired": false,
      "requiredInputs": ["object_id"],
      "expectedOutput": "object summary",
      "verification": "summary stored as object event"
    },
    "link_evidence": {
      "objectTypes": ["account", "contact", "opportunity", "project", "task", "meeting", "deliverable", "risk"],
      "riskLevel": "low",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "source_uri", "source_type"],
      "expectedOutput": "evidence link",
      "verification": "evidence link exists and is associated with object"
    },
    "update_status_low_risk": {
      "objectTypes": ["task", "risk", "deliverable"],
      "riskLevel": "low",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "new_status", "reason"],
      "expectedOutput": "status update event",
      "verification": "object status changed and event logged"
    },
    "create_followup": {
      "objectTypes": ["meeting", "opportunity"],
      "riskLevel": "low",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "followup_title", "owner", "due_at"],
      "expectedOutput": "follow-up task",
      "verification": "follow-up task linked to source object"
    },
    "draft_proposal": {
      "objectTypes": ["opportunity", "account"],
      "riskLevel": "medium",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "proposal_goal"],
      "expectedOutput": "deliverable draft",
      "verification": "draft deliverable exists"
    },
    "draft_customer_message": {
      "objectTypes": ["contact", "opportunity"],
      "riskLevel": "medium",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "message_goal"],
      "expectedOutput": "message draft",
      "verification": "draft exists; external send remains blocked"
    },
    "prepare_meeting_brief": {
      "objectTypes": ["account", "opportunity", "meeting"],
      "riskLevel": "medium",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "meeting_goal"],
      "expectedOutput": "meeting brief deliverable",
      "verification": "brief deliverable exists"
    },
    "escalate_risk": {
      "objectTypes": ["risk", "project"],
      "riskLevel": "medium",
      "approvalRequired": false,
      "requiredInputs": ["object_id", "reason", "human_owner"],
      "expectedOutput": "human escalation event",
      "verification": "risk status is escalated and event logged"
    },
    "send_external_message": {
      "objectTypes": ["contact", "opportunity"],
      "riskLevel": "high",
      "approvalRequired": true,
      "requiredInputs": ["object_id", "recipient", "message_body"],
      "expectedOutput": "approval request before send",
      "verification": "message is not sent without approved approval_request"
    },
    "mark_opportunity_won_or_lost": {
      "objectTypes": ["opportunity"],
      "riskLevel": "high",
      "approvalRequired": true,
      "requiredInputs": ["object_id", "final_status", "reason"],
      "expectedOutput": "approval request before status transition",
      "verification": "status changes only after human approval"
    },
    "commit_client_deliverable": {
      "objectTypes": ["deliverable", "project"],
      "riskLevel": "high",
      "approvalRequired": true,
      "requiredInputs": ["object_id", "client_recipient", "artifact_uri"],
      "expectedOutput": "approval request before client delivery",
      "verification": "deliverable status changes only after human approval"
    }
  }
}
