{
  "schema": "leumas.docs.page/1",
  "id": "pkg:@leumas/consensus",
  "slug": "engines/consensus",
  "kind": "capabilities",
  "bucket": "package",
  "title": "@leumas/consensus",
  "name": "@leumas/consensus",
  "eyebrow": null,
  "chip": null,
  "summary": "Consensus Groups engine — panels of AI members (chatbot rows or inline provider/model/persona specs) that deliberate and synthesize one answer. Modes: panel (fan-out + judge, from the legacy...",
  "keywords": [
    "consensus",
    "ollama-consensus",
    "council-of-high-intelligence",
    "cross-examination",
    "run-consensus",
    "consensus api",
    "leumas consensus",
    "anonymized"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "# @leumas/consensus\n\nConsensus Groups: panels of AI members that deliberate and synthesize **one** answer.\n\n- **A group** (`/db/consensus_groups`, zero-backend CRUD) = members + a chairman + a mode + settings.\n  A member is a `chatbots` row (`kind: 'chatbot'` — the 18 seeded council personas work out of the\n  box) or an inline `{ provider, model, system }`. Any member can be research-augmented\n  (`research: { enabled, loops, searchApi }`) — it runs `@leumas/research` before answering.\n- **Modes**\n  - `panel` — parallel answers → judge synthesis (the legacy ollama-consensus pipeline,\n    generalized over every provider; synthesis imports `buildConsensusPrompt` from `@leumas/a-ollama`).\n  - `council` — the full council-of-high-intelligence protocol (MIT): restate gate → blind Round 1 →\n    **anonymized** Round 2 cross-examination (anti-conformity directive) → Round 3 `STANCE:` lines →\n    confidence-weighted vote (⅔ of total base weight; domain seat ×1.5; honest split when unmet) →\n    a separate **Chairman** model synthesizes the verdict, leading with unknowns.\n  - `quick` — 2 rounds (rapid analysis → anonymized stances), same vote + chairman.\n  - `duo` — 2-member dialectic (no anonymization), chairman adjudicates.\n- **Surfaces** — `createConsensusRouter` at `/api/consensus` (`POST /run` + `POST /run/stream` SSE),\n  the `run-consensus` action (rules/functioncalls/MCP), and Studio's **Intelligence** domain.\n- **Gating** — logged-in + `intelligence` membership (admins bypass) + PassNode `feature:consensus.run`.\n\nRuns persist to `/db/consensus_runs` (checkpointed per phase). Smoke: `pnpm smoke:consensus`.\n",
  "source": {
    "path": "shared/engines/consensus/README.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 1860,
    "hash": "cc10f13ae164372ea5418c89ab4ccb26b9752e6d"
  },
  "urls": {
    "html": "/p/engines/consensus",
    "json": "/docs/engines/consensus.json",
    "md": "/docs/engines/consensus.md"
  },
  "links": {
    "composes": [
      "pkg:@leumas/actions"
    ],
    "usedBy": [],
    "product": [],
    "howTo": [],
    "skills": []
  },
  "exports": null
}
