{
  "name": "Views Store",
  "version": "1.7.5",
  "public_base": "https://cogentia.fractavolta.com",
  "ux": {
    "model": "gmail-style tags (not directory tree)",
    "tags": [
      "kind:*",
      "repo:*",
      "type:*"
    ],
    "tag_filter": "OR within dimension (kind|repo|type), AND across dimensions",
    "soft_hierarchy": "repo-kind.ext filenames; sort=name clusters by prefix",
    "default_sort": {
      "sort": "attention",
      "dir": "desc",
      "note": "importance (kind: issues/continuations/state first) then urgency (recent modified). Distinct: importance ≠ urgency."
    },
    "list_ordering": {
      "sidebar_kind": "importance order then alpha",
      "sidebar_repo": "alphabetical",
      "sidebar_type": "md, json, txt, … then alpha",
      "main_table": "user sort; default attention",
      "document_tables": "click headers; initial A→Z on first column when no dates dominate"
    },
    "kind_tags": [
      "issues",
      "continuations",
      "corpus-state",
      "index",
      "concepts",
      "env",
      "package",
      "config",
      "other"
    ]
  },
  "notable_views": {
    "corpus-state.md": {
      "tag": "kind:corpus-state",
      "description": "Operational summary of local SQLite index cache + embeddings coverage + optional Supabase inventory. Metadata/counts only — no vectors or chunk bodies.",
      "machine_readable": "/views/corpus-state.json",
      "generator": "node scripts/cogentia.js corpus-state export",
      "publish": "node scripts/cogentia.js publish push corpus-state"
    },
    "continuations-list.md": {
      "tag": "kind:continuations",
      "description": "Alive continuations (default liveness=alive), analogous to open issues."
    },
    "current-issues-list.md": {
      "tag": "kind:issues",
      "description": "Open GitHub issues aggregate."
    }
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/health",
      "description": "Liveness",
      "response": {
        "ok": "boolean",
        "views_dir": "string"
      }
    },
    {
      "method": "GET",
      "path": "/api/docs",
      "description": "This contract as JSON"
    },
    {
      "method": "GET",
      "path": "/api/views",
      "description": "List public views (same filters as HTML UI)",
      "query": {
        "tag": "comma-separated tag ids; OR within kind/repo/type, AND across (alias: tags)",
        "q": "search name/title/repo/kind/tags",
        "sort": "attention|modified|produced|name|kind|ext|type|size (default: attention = importance then urgency)",
        "dir": "asc|desc (default: desc)"
      },
      "response": {
        "views": "ViewObject[]",
        "count": "number (filtered)",
        "total": "number (full public inventory)",
        "tags": "{ kind: counts, repo: counts, type: counts }",
        "query": "echo of effective q/tag/sort/dir"
      }
    },
    {
      "method": "GET",
      "path": "/views/{filename}",
      "description": "One view: HTML by default; ?raw; ?download"
    },
    {
      "method": "GET",
      "path": "/",
      "description": "HTML tag browser (query: q, sort, dir, tag)"
    },
    {
      "method": "GET",
      "path": "/docs",
      "description": "Human-readable documentation HTML"
    }
  ],
  "view_object": {
    "name": "basename",
    "title": "frontmatter title or name",
    "size": "bytes",
    "modified": "ISO mtime",
    "produced": "ISO content/generation date (frontmatter or mtime)",
    "ext": "md|json|txt|…",
    "repo": "string|null",
    "kind": "string",
    "tags": "[{type,id,label}]",
    "tag_ids": "string[]",
    "url": "/views/…",
    "cross_refs": {
      "view_id": "string",
      "view_url": "https://cogentia.fractavolta.com/views/…",
      "relation": "derived_mirror|operational_export|config_sample",
      "kind": "string",
      "repo": "string|null",
      "github": "{ full_name, path, url }|null",
      "site": "{ url, label }|null"
    },
    "visible": "boolean",
    "visibility_reason": "string"
  },
  "examples": [
    "/api/views",
    "/api/views?tag=kind:continuations",
    "/api/views?tag=kind:corpus-state",
    "/api/views?tag=kind:index,repo:cogentia&sort=produced",
    "/api/views?tag=type:md,type:json",
    "/api/views?tag=repo:cogentia,repo:serra",
    "/api/views?sort=name&dir=asc",
    "/api/views?q=env",
    "/views/corpus-state.md",
    "/views/corpus-state.json?raw"
  ],
  "documentation": {
    "repo": "cogentia/docs/views-store.md",
    "live_html": "/docs",
    "live_json": "/api/docs"
  }
}