One sourced answer from the context your team already has.
ContextCake links company policy, team practice, and personal judgment through shared OKF identities, then resolves them into an effective knowledge graph for people and AI agents.
Download for Mac · Website · Live demo · Documentation · Quick start · Contributing
Get the signed, notarized app from the latest release: open the DMG, drag ContextCake to Applications, and the app walks you through adding your first sources and connecting your AI client. Each release page carries the matching ZIP and SHA-256 checksums.
The app is Apple silicon (arm64) only. On an Intel Mac or Linux, run the engine from source instead — see the quick start below.
Teams do not have one source of truth. They have an org policy, a service runbook, a team decision, and the local note that explains the exception. Flattening those into another wiki loses both the useful detail and the disagreement.
ContextCake keeps each scope separate, then resolves them at read time. The result is an answer an agent can use with its source, date, and structural discrepancies intact.
| What you need | What ContextCake does |
|---|---|
| Local nuance without copying every policy | Higher-priority layers override only the sections they address. Everything else inherits. |
| An AI agent that can explain its answer | Returns provenance for frontmatter and every resolved section. |
| A safe way through disagreement | Surfaces structural discrepancies with complete evidence; applies explicit decisions transactionally; suggests governed rules only after repeated, consistent choices. |
| Knowledge from more than one system | Layers any folder of Markdown, any GitHub repository, local OKF bundles, and trusted foreign MCP graphs in one cascade. |
Context lives in separate repositories or directories. Repository membership remains the access-control model: ContextCake only reads the sources you configure locally.
┌─────────────────────────────────────────────────────────────┐
│ Personal · level 3 Your drafts, notes, and local overrides │
├─────────────────────────────────────────────────────────────┤
│ Team · level 2 Runbooks, decisions, and system docs │
├─────────────────────────────────────────────────────────────┤
│ Company · level 0 Organization-wide canonical knowledge │
└─────────────────────────────────────────────────────────────┘
↓ resolve at read time
one effective, sourced answer for an agent
Resolution is section-by-section, not whole-document replacement. A team can override the database choice while inheriting the company backup policy.
<!-- company/decisions/primary-db.md -->
## Engine {#engine}
Postgres.
## Backups {#backups}
Nightly snapshots to cold storage.
<!-- team/decisions/primary-db.md -->
## Engine {#engine}
SingleStore (chosen for HTAP workloads).Effective concept
Engine → SingleStore (team wins; company value remains a dated conflict)
Backups → Nightly snapshots to cold storage. (inherited from company)
Learn the model in more depth: layer cake, merge semantics, and conflicts and provenance.
Prerequisite: Node.js 18+. The core has no runtime npm dependencies, install scripts, or network fetches.
git clone https://github.com/ContextCake/context-cake.git
cd context-cake
# Resolve the bundled three-layer example as JSON.
node resolver.mjs \
--manifest apps/playground/manifest.json \
--concept decisions/primary-db
# Open the visual playground at http://127.0.0.1:8790.
npm run playgroundWant a verified walkthrough instead? This prepares a deliberate disagreement across company, team, and personal layers, then proves inheritance, conflicts, and provenance end to end.
npm run demo:verifyNext: build your first cascade or open the live demo.
ContextCake serves the resolved graph over the Model Context Protocol (MCP). Point any stdio MCP client at a manifest you trust:
node mcp-server.mjs --manifest apps/playground/manifest.jsonFor Claude Code, use absolute paths because MCP clients launch servers from their own working directory:
claude mcp add contextcake -- \
node /ABSOLUTE/PATH/context-cake/mcp-server.mjs \
--manifest /ABSOLUTE/PATH/context-cake/apps/playground/manifest.jsonThe server exposes a small, read-focused interface:
| Tool | Use it to |
|---|---|
search |
Find concepts across every configured layer. |
read_file |
Read the effective concept, including section provenance and conflicts; pass layer for the raw source concept. |
list_concepts |
Discover effective concept IDs, optionally filtered by type. |
get_links |
Traverse incoming and outgoing links in the effective graph. |
find_captures |
Search recent team captures (investigations, decisions, gotchas, artifacts), ranked by relevance and recency. |
whats_new |
List captures and curated-concept changes since a timestamp. |
With --capture, two write tools are added — log_capture (stage a capture, returns a preview) and confirm_capture (share it after the user approves). See the agent connection guide and complete MCP tools reference.
Caution
A manifest is a trust boundary. An mcp source may start the command named in that manifest with your user privileges. Only run manifests and configure sources you trust. Read the trust-boundary guide before connecting external sources.
A manifest defines the sources and their precedence. Four source adapters cover most places knowledge already lives:
| Source kind | What becomes a layer |
|---|---|
files |
Any folder of .md, .mdx, or .txt — repository docs, an Obsidian vault, a wiki export. No conversion needed. |
github |
Any public or authenticated GitHub repository, read over the API without a clone: CLAUDE.md, AGENTS.md, README.md, and docs/** by default. |
okf-local |
A local OKF bundle — Markdown directories with YAML frontmatter for types, dates, and links. |
mcp |
A trusted foreign MCP graph, translated into the same resolved view at read time. |
{
"layers": [
{
"name": "personal",
"level": 3,
"source": "okf-local",
"path": "~/kb-personal"
},
{
"name": "team",
"level": 2,
"source": "okf-local",
"path": "~/kb-team"
},
{
"name": "company",
"level": 0,
"source": "mcp",
"command": "node",
"args": ["./company-graph-server.mjs"]
}
]
}---
type: decision
title: Primary database
updated: 2026-07-15
---
## Engine {#engine}
Postgres.Only type is required for a local OKF concept. See the manifest reference, OKF bundle guide, and foreign MCP source guide.
ContextCake can turn repository activity into draft knowledge while preserving a human review point for sensitive changes.
repository activity
→ classify-context.mjs
→ ingest.mjs
→ signals.json
→ write.mjs
→ OKF layer bundle
→ promote.mjs (when a personal concept should become shared)
team_candidatesignals become draft concepts in the selected layer.review_requiredsignals are staged under_review/for approval.ignoreandlocalsignals are not written to the shared layer.
# Create demo signals, inspect what would be written, then write deliberately.
node ingest.mjs --demo
node write.mjs \
--signals apps/control-surface/signals.json \
--manifest apps/playground/manifest.json \
--target-layer team \
--dry-runRead the capture/write-path guide and promotion guide.
Team sync (shared working memory): agent sessions can capture investigations, decisions, gotchas, and artifacts into a git-backed live layer that every teammate's harness reads within ~2 minutes — two-phase show-before-share, 14-day decay unless promoted through review, and content-free reuse telemetry. See the team-sync pack for setup.
| Surface | Purpose | Start here |
|---|---|---|
packages/core/ |
Dependency-free resolver, source adapters, MCP server, and write path | Architecture |
apps/playground/ |
Local interactive explorer for a cascade | npm run playground |
apps/console/ |
React + Vite console for inspecting a resolved graph | Console README |
apps/desktop/ |
macOS desktop shell around the same engine | Desktop README |
apps/site/ |
Public website and documentation | Documentation |
The site, console, and core release independently. For the precise meaning of merged, preview, and live on each surface, see Go Live.
The root engine deliberately has no install step. The console, site, and desktop app manage their own dependencies and lockfiles.
# Core engine, MCP, sources, write path, and playground integration
npm test
# Console
npm --prefix apps/console ci
npm --prefix apps/console run typecheck
npm --prefix apps/console test
npm --prefix apps/console run build
# Public site
npm --prefix apps/site ci
npm --prefix apps/site run build
# macOS desktop shell (uses the live Console build)
npm --prefix apps/console run build:live
npm --prefix apps/desktop ci
npm --prefix apps/desktop test
npm --prefix apps/desktop run test:navigation
npm --prefix apps/desktop run test:cli-status
npm --prefix apps/desktop run smoke
npm --prefix apps/desktop run smoke:bootfail
# Public GitHub Release download + first-launch counts
npm run metrics:appnpm test starts a local playground server, so it requires an environment that allows binding to 127.0.0.1. See CONTRIBUTING.md for repository conventions, validation expectations, and issue labels.
- Getting started — obtain the source archive, verify it, and make a first cascade.
- Concepts — layers, merge rules, provenance, conflicts, and the trust boundary.
- Reference — CLI flags, manifests, MCP tools, and override syntax.
- Architecture — decisions, diagrams, and the resolver design.
- Security policy — responsible disclosure and supported-version policy.
- Threat model — what is protected, who is assumed hostile, and the limits we do not claim.
- Network egress — every host the app can contact, and how to verify it yourself.
- App metrics — download counts, confirmed first launches, and metric limitations.
Contributions are welcome. Before opening a pull request, please read CONTRIBUTING.md, keep packages/core/ dependency-free, and run the checks relevant to the surface you changed. Commits must be signed off with git commit -s to certify the Developer Certificate of Origin — there is no CLA. For security issues, use private vulnerability reporting rather than a public issue.
ContextCake is released under the MIT License.
