{
  "schema_version": "1.0",
  "baseline": "V4",
  "updated_at": "2026-04-22",
  "owner_session": "B",
  "phase": "Phase 12F — Hybrid Intake Workspace (B-owned contract · A-owned runtime)",
  "purpose_th": "Hybrid workspace สำหรับ Enterprise tenant · ผสม wizard-guided flow + free-form upload · ตัดสินใจกลางทางได้ว่าใช้ wizard หรือ upload · state ร่วมกัน · สลับระหว่างสอง mode ได้",
  "purpose_en": "Hybrid workspace for Enterprise tenants · combines wizard-guided flow + free-form upload · switchable mid-flow · shared state · lets a tenant toggle between guided and freeform intake without losing work",
  "hard_rules": [
    "Workspace is tenant-scoped only · never exposes cross-tenant data",
    "Mode toggle (wizard ↔ upload) preserves all assignments (tier · origin · mapping decisions)",
    "No step finalisation without sensitive-surface clearance where applicable",
    "Every AI suggestion during workspace steps requires_human_review=true",
    "Approval gates identical to enterprise_intake.json · workspace does not relax any gate"
  ],
  "b_owned_vs_a_owned": {
    "b_owned_th":"B เป็นเจ้าของ: workspace contract · panel layout spec · state-merge rules · mode-toggle behaviour · trilingual labels · approval-gate pass-through",
    "b_owned_en":"B owns: workspace contract · panel layout spec · state-merge rules · mode-toggle behaviour · trilingual labels · approval-gate pass-through",
    "a_owned_th":"A เป็นเจ้าของ: UI runtime · state persistence · multi-user collaboration · comment threads · notification pipeline · feature flags",
    "a_owned_en":"A owns: UI runtime · state persistence · multi-user collaboration · comment threads · notification pipeline · feature flags"
  },
  "workspace_panels": [
    {
      "id":"panel-overview",
      "label_th":"ภาพรวม workspace",
      "label_en":"Workspace overview",
      "label_zh":"工作区总览",
      "purpose_th":"แสดง progress · coverage score · conflict count · pending review · sensitive flag count",
      "purpose_en":"Shows progress · coverage score · conflict count · pending review · sensitive flag count",
      "shows":["progress_percent","coverage_score","conflicts_unresolved","reviews_pending","sensitive_flags_unresolved","last_activity_at"]
    },
    {
      "id":"panel-wizard",
      "label_th":"wizard-guided intake",
      "label_en":"Wizard-guided intake",
      "label_zh":"向导式导入",
      "purpose_th":"8-step flow เฉพาะ tenant · persona-of-tenant · pain · target segments · service interest · dashboard preference · upload-optional · review",
      "purpose_en":"8-step tenant-specific flow · tenant persona · pain · target segments · service interest · dashboard preference · upload-optional · review",
      "reuses":"Similar 8-step shape to premium_wizard.json but tenant-scoped + emits tenant canonical tree · not personal bundle",
      "differs_from_premium":[
        "Output is tenant KB draft (not personal view bundle)",
        "Persona selection references tenant actor roster (not Pattaya journey fixed set)",
        "Service selection includes tenant proposed services (not 73-catalog fixed)",
        "Dashboard selection may propose new tenant dashboards derived from dashboard_contract schema",
        "Mandatory founder-doc upload OR explicit 'no founder doc yet' flag"
      ]
    },
    {
      "id":"panel-upload",
      "label_th":"พื้นที่อัปโหลดอิสระ",
      "label_en":"Freeform upload area",
      "label_zh":"自由上传区域",
      "purpose_th":"drag-and-drop ไฟล์/โฟลเดอร์/ลิงก์ · ทุกหน่วยต้องกำหนด tier + origin · ดูได้ทีละชุด",
      "purpose_en":"Drag-and-drop files/folders/links · every unit needs tier + origin · viewable per bundle",
      "fields_per_unit":["tier","origin","uploader","uploaded_at","sensitive_markers","pii_scan_status","normalisation_status"]
    },
    {
      "id":"panel-normalise",
      "label_th":"normalisation",
      "label_en":"Normalisation",
      "label_zh":"规范化",
      "purpose_th":"แสดงผลการ flatten โฟลเดอร์ + ตัด chunk + ระบุ canonical node candidate",
      "purpose_en":"Shows folder flatten result + chunking + canonical node candidate assignment",
      "reuses":"source_mapping_engine rules · mapping_rules[]"
    },
    {
      "id":"panel-conflict",
      "label_th":"matrix ขัดแย้ง",
      "label_en":"Conflict matrix",
      "label_zh":"冲突矩阵",
      "purpose_th":"ตาราง comparison matrix · เลือก resolver · กด resolve หลังตัดสิน",
      "purpose_en":"Comparison-matrix table · pick a resolver · click resolve after deciding",
      "reuses":"enterprise_intake.conflict_resolution.comparison_matrix"
    },
    {
      "id":"panel-review-queue",
      "label_th":"คิว review",
      "label_en":"Review queue",
      "label_zh":"审核队列",
      "purpose_th":"ทุกหน่วย T5 · ทุก AI suggestion · sensitive-surface · conflict unresolved · มาอยู่ที่นี่",
      "purpose_en":"Every T5 unit · every AI suggestion · every sensitive-surface flag · every unresolved conflict lands here"
    },
    {
      "id":"panel-coverage",
      "label_th":"coverage score ของ tenant KB",
      "label_en":"Tenant KB coverage score",
      "label_zh":"租户 KB 覆盖率",
      "purpose_th":"แสดงว่า tenant มี founder/canonical/governance/services/actors/dashboard ครบหรือยัง",
      "purpose_en":"Shows whether the tenant has founder/canonical/governance/services/actors/dashboard coverage yet",
      "reuses":"enterprise_intake.coverage_scoring"
    },
    {
      "id":"panel-handoff",
      "label_th":"ส่งต่อสู่ tenant KB",
      "label_en":"Hand-off to tenant KB",
      "label_zh":"移交给租户 KB",
      "purpose_th":"เมื่อ coverage ≥ minimum_for_pilot + conflicts cleared + sensitive cleared → เสนอให้ promote เข้า tenant KB",
      "purpose_en":"When coverage ≥ minimum_for_pilot + conflicts cleared + sensitive cleared → offers to promote into tenant KB"
    }
  ],
  "state_model": {
    "persisted_fields":[
      "workspace_id",
      "tenant_id",
      "created_at",
      "last_activity_at",
      "mode_last_used (wizard | upload | both)",
      "wizard_progress (step map)",
      "uploaded_units (array · each with full metadata)",
      "conflict_ledger",
      "review_queue",
      "coverage_score",
      "sensitive_flags"
    ],
    "state_merge_rules":[
      "Switching from wizard → upload does not invalidate wizard answers · answers remain until explicitly reset by tenant admin",
      "Switching from upload → wizard preserves uploaded_units · wizard may reference them as 'existing upload' in relevant steps",
      "Reset is a deliberate tenant-admin action · logged in audit trail",
      "No automatic re-normalisation on state switch · tenant admin must re-trigger"
    ]
  },
  "collaboration": {
    "multi_user_th":"หลายคนใน tenant ทำงานใน workspace เดียวกันได้ · ทุก action (ตั้ง tier · resolve conflict · promote) มี actor + timestamp",
    "multi_user_en":"Multiple users per tenant can work in the same workspace · every action carries actor + timestamp",
    "comment_threads":"per unit + per conflict + per review item · A-owned",
    "notifications":"sensitive-flag raised · conflict escalated · review approved · all routed through A-owned notifier"
  },
  "workspace_view_modes": [
    {"id":"view-overview","label_th":"ภาพรวม","label_en":"Overview","label_zh":"总览"},
    {"id":"view-wizard","label_th":"โหมด wizard","label_en":"Wizard mode","label_zh":"向导模式"},
    {"id":"view-upload","label_th":"โหมดอัปโหลด","label_en":"Upload mode","label_zh":"上传模式"},
    {"id":"view-normalise","label_th":"normalisation","label_en":"Normalisation","label_zh":"规范化"},
    {"id":"view-conflict","label_th":"matrix ขัดแย้ง","label_en":"Conflict matrix","label_zh":"冲突矩阵"},
    {"id":"view-review","label_th":"คิว review","label_en":"Review queue","label_zh":"审核队列"},
    {"id":"view-coverage","label_th":"coverage","label_en":"Coverage","label_zh":"覆盖率"},
    {"id":"view-handoff","label_th":"ส่งต่อ","label_en":"Handoff","label_zh":"移交"}
  ],
  "phase_linkage": {
    "12A":"tt-intake-authority-rules · flow-subscriber-intake · flow-multi-source-mapping · flow-new-cr-pack",
    "12B":"lex-intake-source-mapping · lex-authority-tier · lex-ai-provenance · lex-factory-pattern",
    "12C":"view-intake-wizard-overlay · mm-intake-authority · mm-ai-provenance",
    "12D":"tenant_replication.template_checklist_hint · atlas.json operator cluster",
    "12E":"case_mapping_model rules reused for normalisation · sensitive_surface flag cross-ref"
  },
  "honest_note_th": "Hybrid workspace = contract เท่านั้น · A implement runtime. ผสม guided + free-form · switch ได้กลางทาง · state merge rule ชัด · tenant-scoped · ไม่มี cross-tenant · approval gate เหมือน enterprise_intake เดิม · ไม่มี auto-publish",
  "honest_note_en": "Hybrid workspace is contract-only · A implements runtime. Combines guided + freeform · mode-switchable mid-flow · explicit state-merge rules · tenant-scoped · no cross-tenant leakage · approval gates identical to enterprise_intake · no auto-publish"
}
