{
  "schema_version": "1.0",
  "baseline": "A-document-access-v1",
  "updated_at": "2026-04-20",
  "owner": "session_a",
  "purpose_en": "Authoritative map of group_id → list of document paths, used by the shell to decide what a user may see. Also enumerates the visibility decision states produced by the resolution algorithm in document_access_schema.json.",
  "purpose_th": "ตารางของ group → รายการ document · ใช้ในการตัดสินว่าผู้ใช้เห็นอะไรได้บ้าง · รายการ state ที่ผลลัพธ์ resolution ให้ได้",
  "groups": [
    { "id": "start",      "label_en": "Start",      "label_th": "เริ่มต้น",   "color": "#F472B6", "default_visibility": "public" },
    { "id": "knowledge",  "label_en": "Knowledge",  "label_th": "ฐานความรู้", "color": "#38BDF8", "default_visibility": "public" },
    { "id": "planning",   "label_en": "Planning",   "label_th": "แผน",        "color": "#A78BFA", "default_visibility": "internal" },
    { "id": "runtime",    "label_en": "Runtime",    "label_th": "รันไทม์",    "color": "#34D399", "default_visibility": "internal" },
    { "id": "operations", "label_en": "Operations", "label_th": "ปฏิบัติการ", "color": "#FCD34D", "default_visibility": "internal" },
    { "id": "journey",    "label_en": "Journey",    "label_th": "การเดินทาง", "color": "#EC4899", "default_visibility": "internal" }
  ],
  "document_map": {
    "start": [
      "/index.html",
      "/hub.html",
      "/portal.html",
      "/links.html",
      "/index-portal.html",
      "/operations-portal.html",
      "/journey-console.html",
      "/document-groups.html",
      "/ai-content-dashboard.html"
    ],
    "knowledge": [
      "/kb/index.html",
      "/kb/overview.html",
      "/kb/phase-overview-1a-12f.html",
      "/kb/concepts.html",
      "/kb/brainstorm.html",
      "/kb/truth-tree.html",
      "/kb/checklist.html",
      "/kb/lexicon.html",
      "/kb/nerve-center.html",
      "/kb/atlas.html",
      "/kb/services.html",
      "/kb/portfolio.html",
      "/kb/packages.html",
      "/kb/showcase.html",
      "/kb/dependencies.html",
      "/kb/executive.html",
      "/kb/sales.html",
      "/kb/cases.html",
      "/kb/case-portal.html",
      "/kb/changelog.html",
      "/kb/new.html"
    ],
    "planning": [
      "/planning/index.html",
      "/planning/ia-governance.html",
      "/planning/discovery-audit.html",
      "/planning/feature-flags.html",
      "/planning/feature-flags-phase-2b.html",
      "/planning/feature-flags-phase-2b-plus.html",
      "/planning/feature-flags-batch-4-readiness.html",
      "/planning/admin-control-plane.html",
      "/planning/admin-control-plane-phase-2b.html",
      "/planning/admin-control-plane-batch-4-readiness.html",
      "/planning/cross-runtime-integration.html",
      "/planning/runtime-continuation-batch-1.html",
      "/planning/wizard-runtime.html",
      "/planning/cases-runtime.html",
      "/planning/dashboard-runtime.html",
      "/planning/generate-runtime.html",
      "/planning/hint-system.html",
      "/planning/signal-pipeline.html",
      "/planning/tenant-runtime.html",
      "/planning/terminal-recovery.html",
      "/planning/document-shell-standard.html",
      "/planning/document-note-system.html",
      "/planning/document-access-model.html",
      "/planning/document-share-export.html",
      "/planning/document-auth-backend.html",
      "/planning/document-shell-coverage.html",
      "/planning/document-note-backlog.html",
      "/planning/document-management-status.html",
      "/planning/document-note-backend.html",
      "/planning/document-auth-hardening.html",
      "/planning/document-server-gating.html",
      "/planning/document-http-gating.html",
      "/planning/document-team-usage.html",
      "/planning/document-production-candidate.html"
    ],
    "runtime": [
      "/runtime/wizard/index.html",
      "/runtime/enterprise-upload/index.html",
      "/runtime/intake-workspace/index.html",
      "/runtime/generated-assets/index.html",
      "/runtime/daily-queue/index.html",
      "/runtime/feature-flags/index.html",
      "/runtime/feature-flags/evaluator.html",
      "/runtime/feature-flags-service/service.html",
      "/runtime/feature-flags-service/phase-2b.html",
      "/runtime/feature-flags-service/phase-2b-plus.html",
      "/runtime/admin-control-plane/index.html",
      "/runtime/admin-control-plane-service/service.html",
      "/runtime/admin-control-plane-service/phase-2b.html",
      "/runtime/cross-runtime-integration/index.html"
    ],
    "operations": [
      "/operations-portal.html",
      "/dashboard.html",
      "/datasource-dashboard.html",
      "/hotel-dashboard.html",
      "/feature-tracker.html",
      "/feature-requests.html"
    ],
    "journey": [
      "/journey-console.html",
      "/kb/journey-intelligence-system.html",
      "/journey.html"
    ]
  },
  "visibility_states": [
    {
      "id": "visible",
      "label_en": "Visible",
      "label_th": "เห็น",
      "color": "#34D399",
      "meaning_en": "User may see the card and open the content.",
      "banner": false
    },
    {
      "id": "restricted",
      "label_en": "Restricted",
      "label_th": "ถูกจำกัด",
      "color": "#FCD34D",
      "meaning_en": "Card visible; content masked with a banner explaining what is restricted.",
      "banner": true,
      "banner_text_en": "Content restricted under your current access profile. Summary metadata shown; full content hidden.",
      "banner_text_th": "เนื้อหาถูกจำกัดภายใต้ profile ปัจจุบัน · แสดงแค่ metadata สรุป"
    },
    {
      "id": "hidden-doc",
      "label_en": "Hidden (document)",
      "label_th": "ซ่อน (เอกสาร)",
      "color": "#94A3B8",
      "meaning_en": "Card not rendered. If the user follows a direct link, they see the hidden banner.",
      "banner": true,
      "banner_text_en": "This specific document is not included in your current access profile.",
      "banner_text_th": "เอกสารนี้ไม่ได้อยู่ใน access profile ปัจจุบันของคุณ"
    },
    {
      "id": "hidden-group",
      "label_en": "Hidden (group)",
      "label_th": "ซ่อน (กลุ่ม)",
      "color": "#64748B",
      "meaning_en": "The whole group is not in the user's visible_groups. Group button is hidden from main nav; deep links show the hidden banner.",
      "banner": true,
      "banner_text_en": "This document's group is not visible under your current access profile.",
      "banner_text_th": "กลุ่มของเอกสารนี้ไม่ได้เปิดให้ profile ปัจจุบัน"
    },
    {
      "id": "not-granted",
      "label_en": "Not granted",
      "label_th": "ไม่ได้รับสิทธิ์",
      "color": "#FB7185",
      "meaning_en": "Explicit deny — doc_id in hidden_documents. Overrides any allow list.",
      "banner": true,
      "banner_text_en": "Access explicitly denied for this document under your current profile.",
      "banner_text_th": "ปฏิเสธสิทธิ์อย่างชัดเจนสำหรับเอกสารนี้ภายใต้ profile ปัจจุบัน"
    }
  ],
  "honest_limits": [
    "Matrix is client-side metadata. Server does not consult it.",
    "Visibility enforcement runs in the browser. A determined user can bypass by editing localStorage.",
    "Group membership is derived from the document audit in document-groups.html — not a cryptographic group claim.",
    "No wildcard rules (yet). Every doc_id is matched literally."
  ],
  "cross_references": {
    "schema":   "docs/assets/access/document_access_schema.json",
    "examples": "docs/assets/access/user_profile_examples.json",
    "labels":   "docs/assets/access/access_state_labels.json",
    "audit":    "docs/document-groups.html"
  }
}
