Skip to content
Back to search

prism-coder

Persistent session memory for AI coding agents — local-first, with on-device inference, associative recall, and drift detection. Works with Claude Code, Cursor, and Codex.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/dcostenco/prism-coder with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/dcostenco/prism-coder'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dcostenco--prism-coder/badge.svg)](/listings/dcostenco--prism-coder)

HTML

<a href="/listings/dcostenco--prism-coder"><img src="/api/listings/dcostenco--prism-coder/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prism also ships as a plugin, which registers the MCP server and the startup skill for you.

Both hosts install straight from this repository. There is nothing to host and no server to run: the catalogue is the `.claude-plugin/marketplace.json` file committed here, and your client clones it from GitHub.

**Claude Code:**

claude plugin marketplace add dcostenco/prism-coder
claude plugin install prism-coder@prism

**Codex:**

codex plugin marketplace add dcostenco/prism-coder
codex plugin add prism-coder@prism

The plugin registers `prism-mcp` via `npx -y prism-mcp-server`. If you already configured Prism by hand — `prism connect` writes an `mcp_servers.prism-mcp` entry — you have that server twice under one key. Install the plugin **or** run `prism connect`, not both.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 21 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "prism",
  3. "description": "Prism \u2014 the memory your coding agent forgets to have. On-device recall, drift detection, and local inference. Nothing leaves your machine by default.",
  4. "owner": {
  5. "name": "Synalux",
  6. "email": "support@synalux.ai"
  7. },
  8. "plugins": [
  9. {
  10. "name": "prism-coder",
  11. "description": "Your coding agent forgets everything between sessions. Prism gives it a memory that sticks: your decisions, open TODOs, and changed files, restored the moment you return. It goes past a notes store \u2014 associative recall surfaces related past work, drift detection catches a long session wandering off-goal, and an on-device model reasons over all of it. Local-only by default: your work and the model reading it never leave your machine.",
  12. "author": {
  13. "name": "Synalux",
  14. "email": "support@synalux.ai"
  15. },
  16. "category": "productivity",
  17. "source": "./plugins/prism",
  18. "homepage": "https://synalux.ai"
  19. }
  20. ]
  21. }
README.md · README · 2,331 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Prism Coder
  2. **Give your AI agent memory that lasts — and see the cloud tokens it never had to spend.** Persistent sessions, knowledge graphs, offline tool-routing, and an auditable savings meter. Fully local and free.
  3. > **Current release: v20.22.5 — local oMLX images and memory accounting**
  4. > Choose an independent image model from discovered local inventory. Compatible
  5. > oMLX servers support controlled PNG image requests with local screening and
  6. > generation. Image accuracy depends on the model; Ollama image execution remains
  7. > unavailable for the saved image choice. See the [oMLX guide](docs/omlx.md).
  8. [![npm](https://img.shields.io/npm/v/prism-mcp-server?color=cb0000&label=npm)](https://www.npmjs.com/package/prism-mcp-server)
  9. [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-00ADD8)](https://github.com/modelcontextprotocol/servers)
  10. [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
  11. [![Models on HuggingFace](https://img.shields.io/badge/🤗-prism--coder-yellow)](https://huggingface.co/dcostenco)
  12. ![Prism dashboard Local AI connection panel with Preview connection, Use this server, and optional managed-server setup](docs/screenshots/local-ai-connection.png)
  13. *Local AI dashboard development preview. Screenshots below use an isolated demo
  14. with illustrative inventory and responses; they do not show a live account or
  15. prove model accuracy. The npm release may show an earlier interface.*
  16. Prism Coder is an [MCP server](https://modelcontextprotocol.io) that gives Claude, Cursor, and other AI tools long-term memory that survives across sessions. It ships with the open-weight `prism-coder` model fleet (2B–27B) for fast, offline tool-routing — no cloud required. And it keeps score: every call served locally is metered, so `prism savings` shows the token volume that never reached your cloud model — [measured honestly, in tokens](#local_savings--what-local-serving-actually-displaced).
  17. **No account needed. No API keys. Runs on your machine.**
  18. A paid subscription adds cloud sync, higher model tiers, and team features through the [Synalux portal](https://synalux.ai).
  19. ---
  20. ## What Prism gives you
  21. - **Session memory that survives restarts** — resume projects with handoff notes,
  22. recent work, open TODOs, and configurable quick, standard, or deep context.
  23. - **Local-first inference** — local Ollama models use automatic 2B/4B/9B/27B
  24. selection based on installed models, available RAM, context fit, and
  25. subscription entitlements. Eligible text-only coding can prefer configured
  26. oMLX; explicit task choices override the saved backend preference.
  27. - **A savings meter you can audit** — `prism savings` (or the `local_savings`
  28. tool from any host) reports the token volume local serving kept off your
  29. cloud model: headline, local share, per-model breakdown. It reports tokens,
  30. never an invented dollar figure, and prints its assumptions and known
  31. undercounts inline — a number you can check, not marketing.
  32. - **Route-output enforcement** — route mode returns only well-formed calls to
  33. tools the host actually advertised. Standard and higher plans can add
  34. authenticated deterministic correction; `route_guard: "local"` disables that
  35. correction only. `cloud_fallback: false` forbids cloud inference fallback and
  36. `verify: false` (with no `evidence`) disables the grounding verifier. With all
  37. three off, no request carries your prompt, draft or evidence; the per-call
  38. entitlement check and telemetry still contact the portal and carry neither.
  39. - **One setup for every agent** — `prism connect` configures Claude Code,
  40. Claude Desktop, Cursor, Gemini CLI, and Codex while preserving unrelated
  41. settings.
  42. - **Subscription-aware skills** — entitled skills are synchronized before the
  43. host launches, with safe upgrades, downgrades, conflict preservation, and
  44. offline last-good recovery.
  45. - **Hook-free startup** — MCP metadata and native instructions request Prism's
  46. startup context without requiring lifecycle hooks or a Prism-owned launcher.
  47. Where a host offers hooks (Claude Code, Codex), `prism connect` adds two
  48. small ones on top: mid-session prompt routing, and a post-compaction
  49. re-injection of the protected-floor digest.
  50. - **Prompt-triggered Factory** — enabled by default for suitable bounded
  51. implementation requests with explicit files, an allowed write list, and a
  52. verification command. The host starts and monitors the recommended pipeline;
  53. BCBA requests stay with the host. A dashboard toggle or
  54. `PRISM_DARK_FACTORY_ENABLED=false` disables Factory after an MCP restart.
  55. Try the [three-test filename fix](examples/factory-filename-fix/README.md).
  56. - **Safe escalation and observability** — inference outcomes are explicit,
  57. reserved text remains fail-closed (clinical images are processed locally,
  58. never sent to the cloud), and local/cloud usage is recorded for
  59. review.
  60. ### Local AI in the dashboard
  61. Run `prism dashboard`, open **Account & Settings → Local AI**, then work through
  62. **Connection → Models → Test**. These controls configure local inference;
  63. session memory continues to work without installing a model.
  64. | Step | What you do | What to expect |
  65. | --- | --- | --- |
  66. | **1. Connection** | Choose an existing oMLX server or a Prism-managed installation, then **Preview connection**. | Review the effect on coder, reviewer and image assignments before **Use this server** switches the shared oMLX connection. Saved model IDs are preserved. |
  67. | **2. Models** | Choose coder and reviewer models for each backend and **Save coding preference**. Save the separate **Image model** form independently. | Saving records a choice; it does not download or load weights. Missing saved IDs stay visible instead of being silently replaced. |
  68. | **3. Test** | Select backend and purpose, then **Test saved model**. | A small request may load the saved model. The result reports execution or a blocking reason, with no cloud inference fallback. |
  69. **Coding and review.** Auto prefers configured oMLX for eligible coding. You can
  70. choose Ollama instead; explicit task choices take precedence. oMLX coding and
  71. review need the integration's separate text safety classifier. Local drafts and
  72. reviews still need host inspection and tests.
  73. ![Local AI coding model selectors with separate coder and reviewer assignments](docs/screenshots/local-ai-coding-models.png)
  74. **Images have their own choice.** Select an oMLX vision model under **Image
  75. model**, then **Save image preference**. It may be the same model used for
  76. coding, but the setting is independent. **Refresh image models** reads
  77. metadata without loading a model. Vision metadata and RAM estimates are
  78. advisory; each request repeats compatibility and resource checks. The saved
  79. Ollama image option currently refuses execution; leave the image backend
  80. **Not selected** to retain existing image routing.
  81. ![Independent image-model preference and selected-model server compatibility status](docs/screenshots/local-ai-image-model.png)
  82. **Read image-test results in two parts.** The built-in diagnostic sends a red
  83. square. **Reference facts** describe that known PNG; **AI observations** contain
  84. the model's answer. A wrong answer cannot change the reference. A passing test
  85. proves execution, not visual accuracy. User images do not receive catalog facts
  86. from this diagnostic. Starting another test or changing backend or purpose
  87. clears the previous image result.
  88. ![Image diagnostic with execution status, separate Reference facts and AI observations, and an accuracy warning](docs/screenshots/local-ai-image-results.png)
  89. **Server setup is optional and separate from npm.** On supported Apple Silicon
  90. Macs, expand **Install or update a Prism-managed server** to install the server
  91. without downloading the optional coding starter pack. Add models through
  92. **Open oMLX model manager**. Installing a server update does not restart it or
  93. switch your connection. **Restart managed server** interrupts local inference
  94. and is available only when Prism can establish managed ownership and idle
  95. activity. External servers use their own upgrade and restart procedure.
  96. Updating the Prism npm package or restarting your AI client does **not** upgrade
  97. an external oMLX server. If image status says **Server update required**, follow
  98. the [existing-server upgrade guide](docs/omlx.md#upgrade-an-existing-omlx-server).
  99. **Tested Prism-compatible source** identifies the compatible revision;
  100. **Latest upstream releases** is for release notes and may lack Prism's routes.
  101. See the [oMLX guide](docs/omlx.md) for requirements and troubleshooting.
  102. ## Get started
  103. Memory search automatically applies ACT-R ranking: relevance plus recency,
  104. frequency and memory associations. No upvote or prompt instruction is required.
  105. To opt out, use **Account & Settings → Preferences → Automatic Memory Ranking
  106. (ACT-R)**, then restart your AI client. `PRISM_ACTR_ENABLED=false` also disables
  107. it. This ranking is separate from the neural graph's stored importance filter.
  108. ```bash
  109. npm install -g prism-mcp-server
  110. prism connect
  111. prism dashboard
  112. ```
  113. Use `prism connect --dry-run` to preview changes, `prism connect --all` to
  114. configure every detected host, or `prism connect --refresh` to reconcile
  115. Prism-managed entries after an upgrade. Restart the host after connecting.
  116. `prism dashboard` opens the current local Mind Palace without a Synalux login.
  117. Prism works locally without an account, API key, or cloud subscription. Add a
  118. Synalux subscription when you want cloud memory, paid-tier skills, or team
  119. features.
  120. To check your plan, open **⚙ Account & Settings → Account** in the dashboard.
  121. Free users see **Start 14-day trial**; paid users see **Manage subscription**.
  122. During a trial, the same panel shows the paid tier and exact end date. No card
  123. is required to start. Add payment details before the end date to continue; if
  124. you do not, the subscription cancels and local Prism Free remains available.
  125. You can also compare plans directly at [synalux.ai/pricing#prism-plans](https://synalux.ai/pricing#prism-plans).
  126. After a few sessions, ask what it's been worth:
  127. ```bash
  128. prism savings --period month
  129. ```
  130. ```
  131. 💾 Local serving — LAST 30 DAYS
  132. ~510K tokens kept off your cloud model
  133. 53 call(s) served locally of 58 routed (91%)
  134. ```
  135. Your numbers will differ — that's the point: it reports what *your* machine
  136. actually served, not a projection. Full report anatomy and the honesty rules
  137. behind it are in the
  138. [`local_savings` section](#local_savings--what-local-serving-actually-displaced).
  139. ### Install as a plugin
  140. Prism also ships as a plugin, which registers the MCP server and the startup
  141. skill for you.
  142. Both hosts install straight from this repository. There is nothing to host and
  143. no server to run: the catalogue is the `.claude-plugin/marketplace.json` file
  144. committed here, and your client clones it from GitHub.
  145. **Claude Code:**
  146. ```bash
  147. claude plugin marketplace add dcostenco/prism-coder
  148. claude plugin install prism-coder@prism
  149. ```
  150. **Codex:**
  151. ```bash
  152. codex plugin marketplace add dcostenco/prism-coder
  153. codex plugin add prism-coder@prism
  154. ```
  155. The plugin registers `prism-mcp` via `npx -y prism-mcp-server`. If you already
  156. configured Prism by hand — `prism connect` writes an `mcp_servers.prism-mcp`
  157. entry — you have that server twice under one key. Install the plugin **or**
  158. run `prism connect`, not both.
  159. ### What `prism connect` changes about host subagents
  160. `connect` steers bounded work to `prism_infer` on your machine rather than to
  161. host-spawned agents. What it writes differs per host, and **it does not disable
  162. subagents everywhere** — Claude Code keeps them and is pointed at an economy
  163. model instead. Prism's local workers stay available over MCP in every case.
  164. | Host | Setting written | Effect |
  165. |---|---|---|
  166. | Claude Code | `env.CLAUDE_CODE_SUBAGENT_MODEL = "sonnet"` in `~/.claude/settings.json` | Subagents stay **enabled**, pinned to an economy model. Fan-out is discouraged by policy text, not by config |
  167. | Gemini CLI | `experimental.enableAgents = false` in `~/.gemini/settings.json` | Subagents **off**. Gemini exposes one boolean, so that is all there is to set |
  168. | Codex | `features.multi_agent = false` in `$CODEX_HOME/config.toml` (default `~/.codex`), plus a bounded fallback: 2 threads, depth 1, cheap subagent model, 900s cap | Subagents **off**, with a bounded profile underneath so a deliberate re-enable lands somewhere sane |
  169. Two things worth knowing:
  170. - **`experimental` is Gemini's namespace, not ours.** Prism is not enabling
  171. anything experimental — it writes `false` to a flag Gemini already defines at
  172. that path. Writing anywhere else would have no effect.
  173. - **That namespace is by definition temporary.** If Gemini promotes
  174. `enableAgents` out of `experimental`, Prism keeps writing the old path, Gemini
  175. reads the new one, and host subagents quietly turn back on. Nothing errors and
  176. the settings file still looks correct. If you see host subagents running while
  177. `enableAgents` reads `false`, check whether the key has moved before assuming
  178. `connect` failed to write it.
  179. Both writes are idempotent in the sense that a host already configured this way
  180. is left untouched — but they are **re-applied on every `prism connect` run**,
  181. not only on `--refresh`. If you deliberately re-enable host subagents, the next
  182. `connect` will turn them off again. Keep them on by not re-running `connect`,
  183. or by re-enabling after each run.
  184. ---
  185. <details>
  186. <summary>Release history (optional)</summary>
  187. ## What's New in v20.22.5
  188. - **Independent image model:** Settings exposes a separate image choice from
  189. discovered oMLX/Ollama inventory, without changing coder/reviewer assignments.
  190. - **Controlled local images:** compatible oMLX servers accept inline PNGs after
  191. model capability, settings and resource checks. Images and derived content
  192. stay local. Transport support does not certify recognition accuracy; selected
  193. Ollama image execution remains unavailable.
  194. - **Memory and model switching:** count macOS free and file-backed pages once,
  195. and reclaim eligible idle oMLX models without interrupting active or pinned
  196. work. Memory estimates do not guarantee fit.
  197. - **Reliability:** updated oMLX installer pin, device-key race fixes, dependency
  198. and CodeQL remediation, shared idle Factory polling, and the civilian-use
  199. policy correction for Syria. Full details are in [CHANGELOG.md](CHANGELOG.md).
  200. ## What's New in v20.22.4
  201. - **Dashboard and CLI setup:** Settings → Local Coding and `prism local` install
  202. a pinned oMLX server/model pack with progress, retry and managed startup, or
  203. connect an existing server. See the [oMLX guide](docs/omlx.md) for requirements.
  204. - **Saved coding preference:** choose Auto, oMLX or Ollama without restarting
  205. Prism. Auto prefers configured oMLX for eligible text-only coding; an explicit
  206. per-task backend overrides that preference.
  207. - **Discovered model roles:** select installed coder and reviewer models for
  208. each backend, including the same model for both roles. Explicit task model
  209. choices win. Reported sizes and conservative memory estimates help compare
  210. choices; unknown metadata stays unknown and estimates do not guarantee fit.
  211. - **Managed isolation:** model discovery, Hub cache and cluster launchers stay
  212. private to the managed installation. Competing Ollama residency refuses the
  213. call without unloading other jobs.
  214. - **Setup-state hardening:** bounded reads use one file handle and reject
  215. symlinks, closing the filesystem race reported by CodeQL.
  216. - **Vision boundary:** this release does not enable image requests through the
  217. controlled oMLX coding path. Picture-recognition tests remain separate work.
  218. ## What's New in v20.22.3
  219. - **Dependency fixes:** Hono 4.13.11 addresses its static-path middleware
  220. bypass advisory; Vite 8.2.4 addresses its development editor-launch advisories.
  221. - **Local resource probes use numeric loopback by default.** The default
  222. Ollama endpoint is now `http://127.0.0.1:11434`, so a stalled `localhost`
  223. DNS lookup cannot block those probes. Explicit URL overrides are preserved;
  224. IPv6-only servers need an explicit URL.
  225. - **Read-only oMLX inspection accepts release-candidate versions.** Valid
  226. `rcN` labels no longer invalidate status. Inspection still reports
  227. generation disabled and the provider not qualified; it is not an activation
  228. or a generation check.
  229. - **Stable oMLX setup:** the current setup link uses the Prism integration
  230. based on upstream `v0.7.1`. Stock oMLX still lacks the required control routes.
  231. ## What's New in v20.22.2
  232. **Why it matters:** an agent that followed `session_task_route`'s advice was
  233. refused on explicit oMLX before anything ran.
  234. - **A complexity hint no longer refuses explicit oMLX.** `session_task_route`
  235. recommends a `task_complexity` for every code task. That hint picks Ollama's
  236. starting tier, but on explicit oMLX it lowered the model ceiling, so a call
  237. that passed the recommended arguments was refused with `omlx_model_ceiling`.
  238. Now only an explicit `model_ceiling` below the top tier, or a plan below it,
  239. refuses. Thinking on oMLX stays with the server's settings.
  240. ## What's New in v20.22.1
  241. **Why it matters:** on explicit oMLX, a long prompt could keep the device busy
  242. for minutes while being classified, and `timeout_ms` did not limit it.
  243. - **The call budget now covers classification.** `timeout_ms` (default 300 s)
  244. starts before the safety screen, and each classifier read is bounded by the
  245. remaining budget as well as its own 90 s.
  246. - **A failed read ends the classification.** An oversize prompt is read in
  247. 3,600-character windows; a read that fails already means refusal on this
  248. path, so the remaining windows are no longer read. Before, a stalled server
  249. could cost about four minutes per window.
  250. - **Tests:** the owned-job marker tests pin the size limit and the
  251. non-blocking open directly.
  252. ## What's New in v20.22.0
  253. **Why it matters:** on Apple Silicon, `prism_infer` can now draft code on an
  254. oMLX server instead of Ollama, opt-in per call, behind its own safety screen.
  255. Separately, Layer 1 now marks two more kinds of auth request reserved, on every
  256. path.
  257. - **Opt-in oMLX backend:** `local_backend: "omlx"` with `mode: "code"`, text
  258. only. Nothing changes for calls that do not ask for it. It **requires** the
  259. oMLX build with Prism's control routes, published as the
  260. [`prism-v0.7.1rc1` branch of dcostenco/omlx](https://github.com/dcostenco/omlx/tree/prism-v0.7.1rc1)
  261. ([install and settings](https://github.com/dcostenco/omlx/blob/prism-v0.7.1rc1/PRISM.md)); with stock oMLX every call is refused.
  262. - **Its own safety screen:** the 9b classifier on the same oMLX server reads
  263. every request; rules only refuse. In our tests, of 327 labelled sensitive
  264. requests, the 9b alone let 2 run locally, against 19 for the 4b classifier
  265. on Ollama; two rules written after reviewing those rows bring this path to
  266. 0, so 0 is not an out-of-sample figure. Of 294 routine requests, 2 were
  267. escalated (27 on Ollama). Of 135 adversarial probes, 3 ran locally, all one
  268. shape (a documentation field).
  269. - **Speed and cost:** a classifier read took about 0.37 s at the 95th
  270. percentile on an idle machine and up to 0.65 s under load. The first read
  271. after a long idle took 14.5 s, because macOS had paged the classifier out,
  272. so Prism waits up to 90 s for it instead of refusing. The classifier holds
  273. about 9.2 GB while loaded (9.7 GB peak).
  274. - **Fails closed:** a classifier failure, an unreadable answer or a missing
  275. model refuses the call; it never falls back to a keyword check or to
  276. Ollama. A long prompt is read whole, in windows, not as an excerpt.
  277. - **Frees memory first:** Ollama's loaded models are unloaded before the call
  278. (they reload on the next Ollama call), so the two runtimes do not hold large
  279. models at once.
  280. - **Layer 1, every path:** a request that decides whether signed-out,
  281. anonymous or guest users may reach a route, page or endpoint (granting or
  282. blocking it), makes one public, or gives them admin rights is marked
  283. reserved by rule, and so is code that exchanges an authorization code for
  284. tokens. Measured on the 327 sensitive requests on
  285. the default Ollama path: 18 now run locally, against 19 before; routine
  286. escalations are unchanged (27 of 294).
  287. ## What's New in v20.21.27
  288. **Why it matters:** a script that feeds Prism Browser through a pipe can
  289. now pause between blocks of commands. Before, commands that had already
  290. arrived waited for the next write, and never ran if the 600 s idle timeout
  291. came first, so a script that checked a result before sending more stalled
  292. and then failed.
  293. - **Every piped command runs when it arrives.** The reader waited on
  294. `select()` for new pipe data while `readline()` had already buffered the
  295. commands sent so far. It now reads the descriptor itself and decodes it as
  296. the text stream did (its encoding, universal newlines). Measured with two
  297. commands written together and a third written only after the reader hands
  298. over the second: the second came out only with the third before, and
  299. before the third is written now.
  300. - **Unchanged:** the idle timeout, `\` line continuation (CRLF endings
  301. included), comment lines, and streams `select()` cannot watch, now read
  302. blocking. At the idle timeout, a command still being written is dropped,
  303. never run cut short.
  304. ## What's New in v20.21.26
  305. **Why it matters:** routine wording no longer lets a mixed request skip
  306. Layer 1, the safety screen that decides whether a request may run on your
  307. device. A BCBA who asks in one message for an operational
  308. definition and how many mL of a drug to give, or a developer who asks for a
  309. code review and then authentication code, now has that request screened by
  310. Layer 1's rules and, unless the request or conversation is already marked
  311. reserved, a classifier read. Before, it could be answered by a local model
  312. with no classifier read.
  313. - **Rules no longer clear requests.** Before, one routine clause let Layer 1's
  314. rules clear the whole request, so it skipped the classifier. "Write an
  315. operational definition for tantrums and tell me how many mL of Benadryl to
  316. give at bedtime" was answered locally with no classifier read, and so was
  317. "review the dashboard component for hook order and then write the JWT
  318. validation middleware". Now rules can only mark a request reserved. The
  319. routine shortcut is gone for a single prompt and for the current prompt of a
  320. follow-up; the prompt's classifier read is skipped only if the request or
  321. conversation is already marked reserved. A long prompt that reaches the
  322. classifier is read as excerpts, as before.
  323. - **What happens to a flagged request.** A text request that a rule marks
  324. reserved, or that the classifier flags, goes to a stronger cloud model when
  325. your plan includes cloud and the call does not pass `cloud_fallback: false`.
  326. Otherwise it is refused, and the refusal says why. Requests the classifier
  327. clears remain eligible to run locally, so routine drafting (operational
  328. definitions, data sheets, antecedent strategies) and routine code work still
  329. run on your device when the local model can answer.
  330. - **Seclusion by another name.** Placement phrases such as "put him in the
  331. quiet room until he calms down" (also isolation, time-out, padded and
  332. calm-down rooms) are now marked reserved by rule. This catches placement
  333. requests of that shape (him, her, them, or the client, student or child
  334. placed into the room) that never use the word "seclusion". Other wording,
  335. and other mentions of these rooms, are left to the classifier.
  336. - **Measured:** of 46 mixed requests built to test this bypass, which should
  337. never be answered locally, 41 were cleared to run locally before this
  338. release and 9 after: 32 fewer sensitive requests reaching a local model. Of
  339. 294 routine requests, 2 more than before are escalated (or refused, without
  340. cloud).
  341. - **Limits, unchanged in this release.** Keep them in mind when deciding
  342. whether a local answer needs your review:
  343. - The classifier can miss a request, and a missed request still runs
  344. locally. The 9 above are such misses.
  345. - Some classifier failures fall back to a keyword check, and text that
  346. passes it can still run locally.
  347. - A request with images is processed on this device even when flagged, and
  348. is never sent to the cloud.
  349. - **Cost:** requests that used the shortcut now need a classifier read, unless
  350. screening has already marked them reserved. That added check is the price of
  351. closing the bypass; in our tests the read took about 0.3 s at the 95th
  352. percentile.
  353. ## What's New in v20.21.25
  354. Semantic memory search now automatically applies ACT-R ranking, combining
  355. relevance with recency, frequency and associations. **Account & Settings →
  356. Preferences → Automatic Memory Ranking (ACT-R)** lets you opt out after an AI
  357. client restart; an explicit environment value takes precedence.
  358. Synalux Cloud uses authenticated, owner-scoped access-history and candidate-link
  359. APIs. Cloud deployment requires the matching Portal history migration. Stored
  360. importance thresholds remain separate, and HRR drift detection remains independent.
  361. ## What's New in v20.21.24
  362. - Synalux cloud preserves initial importance and handles votes, graduated
  363. insights, and stale-score decay through the authenticated Portal API.
  364. - Voting rejects inactive or inaccessible records; decay preserves archived
  365. history. Existing scores remain unchanged.
  366. - Graph importance thresholds use stored scores. Automatic retrieval ranking
  367. and access tracking do not automatically turn ordinary memories into high-score rules.
  368. ## What's New in v20.21.23
  369. - Factory routes suitable bounded implementation prompts and executes only the
  370. allowed file actions, with independent verification and explicit lifecycle results.
  371. - Paid pipeline creation, updates, aborts, and verification records use the
  372. authenticated Portal API. Startup waits for paid storage initialization before
  373. reporting Factory readiness.
  374. - The default-enabled toggle distinguishes the saved setting from the active
  375. MCP setting and shows when a restart is required.
  376. ## What's New in v20.21.22
  377. - Factory pipeline lists for cloud accounts use the authenticated Portal API,
  378. including exact project and status filters, without direct database credentials.
  379. - Invalid, incomplete, or oversized reads show an unavailable state. A valid empty
  380. list remains distinct from a failed read.
  381. - This release covers pipeline lists. Cloud pipeline creation, controls, and
  382. execution still need separate validation.
  383. ## What's New in v20.21.21
  384. - Prism Dashboard now reports unavailable analytics and factory reads clearly,
  385. prevents stale project results, and keeps graph filters and counts in sync.
  386. - Project analytics can be read through the authenticated Portal API with
  387. validated 14-day activity data.
  388. ## What's New in v20.21.20
  389. - Fixed: a `session_save_ledger` call refused with `context_not_loaded`, or the
  390. greeting-only reply that writes nothing, restarted the hourly drift reminder.
  391. A ledger save restarts it now only when it writes an entry.
  392. - A written ledger entry's reply also asks for the handoff when the checkpoint
  393. ends a unit of work.
  394. - A ledger save skipped as a duplicate of one saved in the last 5 minutes now
  395. says nothing new was written, instead of "saved".
  396. - Fixed: with Supabase storage, a handoff whose save failed was reported as
  397. updated. It is now an error the agent can see and retry.
  398. ## What's New in v20.21.19
  399. - Prism Browser emulates phones and tablets. `--device iphone-17`, or one of
  400. five other measured iPhones and iPads, turns on touch CSS, the pixel ratio,
  401. and the iPhone safe area, so a layout that only breaks on the phone can be
  402. caught in a test. `--touch`, `--device-scale-factor`, and `--safe-area` set
  403. each part on its own.
  404. ## What's New in v20.21.18
  405. - Fixed: when a save was refused with `context_not_loaded`, the instructions
  406. Prism installs for Claude Code, Codex and Gemini CLI forbade the one call
  407. that recovers. The refusal now prints that call, `session_load_context`
  408. with the same project and conversation_id, and the installed instructions
  409. allow it. First-turn startup is unchanged.
  410. ## What's New in v20.21.17
  411. - Fixed: the on-device screen refused some ordinary coding requests. With a
  412. Synalux account (free included), it now reads each request through a policy
  413. that Synalux serves, pinned by its SHA-256. Without an account, or with
  414. images attached, the screen is unchanged.
  415. - `prism_infer` route mode: set `allow_parallel_calls` to keep a reply that
  416. calls several of the tools you offered in `allowed_tools`.
  417. ## What's New in v20.21.16
  418. ### Conversations: checked on your device, and free with an account
  419. - A local answer to a conversation is checked on your device before it is
  420. served. If the check fails or cannot run, the answer goes to the cloud when
  421. your plan and settings allow it, and is withheld otherwise.
  422. - On Pro and Team, a local answer that passes is also confirmed by Synalux, on
  423. a copy pseudonymized on your device; the mapping stays on your device. With
  424. an image attached, or with the cloud off, the checked local answer is served.
  425. - When the on-device screen's 4b is unsure about a conversation, the 9b reads
  426. it again before the conversation is refused or sent to the cloud.
  427. - Everything local is free with no account and no cap on the local model size.
  428. A free Synalux account adds multi-turn `prism_infer` and 20 cloud answers a
  429. day. Pro ($15/month) and Team ($20/seat/month) are Prism's own plans.
  430. - Optional You.com web search: set `YDC_API_KEY` to enable
  431. `youcom_web_search` (contributed by @mouse-value-add in #227).
  432. - Fixed: the 2b and 4b no longer answer Prism's own requests as a tool router.
  433. A system prompt built into those models had turned some answers into tool
  434. calls and made the on-device screen refuse some ordinary requests.
  435. ## What's New in v20.21.15
  436. ### Follow-ups: see what runs locally, and a stricter screen when the classifier is down
  437. - `local_savings` (and `prism savings`) shows a line for follow-ups, calls that
  438. carried your conversation. It covers how many the local model answered (and
  439. how many of those the 9b answered), how many the on-device screen refused and
  440. at which stage, how many your plan's multi-turn limits refused, and how many
  441. went to the cloud.
  442. - A short chat answer ("16", "Yes") counts as an answer. Before, the quality
  443. gate treated it as empty, and a paid plan re-asked the cloud.
  444. - When the on-device classifier fails every read on a follow-up, the follow-up
  445. is no longer answered on a keyword check alone. It goes to the cloud if your
  446. plan allows it, and is refused otherwise.
  447. ## What's New in v20.21.14
  448. ### Skills load when they help, and you can see why they loaded
  449. - Background task notifications, reports from other agents and continuation
  450. summaries no longer load skills in the middle of a task, so a word inside an
  451. agent's report cannot pull in unrelated rules.
  452. - Pasting Prism's startup output into a prompt no longer loads skills that
  453. happen to share a word with it.
  454. - Tasks that say they need host tools or reserved judgment stay with the host
  455. instead of failing on the local worker.
  456. - Every routed-skills header ends with the routing table version (for example
  457. "Routing table v41."), so a past skill load can be checked against the exact
  458. rules that chose it.
  459. - Skills with their own triggers now load even when their file uses Windows
  460. line endings or mentions `prompt_triggers:` in its description; before, they
  461. were delivered but silently never loaded.
  462. ## What's New in v20.21.13
  463. ### Paid plans and trials are clear in Account & Settings
  464. - Free users can open the Prism plan comparison and start a 14-day trial.
  465. - Trial users see their paid tier, exact end date, and the action to add payment
  466. details before automatic cancellation.
  467. - Active and payment-recovery states lead to the correct hosted billing action;
  468. an unavailable verification is labeled instead of being presented as paid.
  469. - Local Prism Free remains available without an account or subscription.
  470. ## What's New in v20.21.12
  471. ### Multiple MCP hosts keep a working dashboard link
  472. - Each running Prism host now registers its local dashboard independently.
  473. - `prism dashboard` and the startup message verify the newest candidates and
  474. fall back to an older live dashboard when a newer host stops.
  475. - Instance cleanup cannot remove another host's registration, and the open
  476. message preserves the linked account and plan description.
  477. ## What's New in v20.21.11
  478. ### Linked accounts persist across dashboard refreshes
  479. - A host process with an obsolete launch credential now recovers from the
  480. newer account saved by the dashboard after the obsolete credential is
  481. rejected.
  482. - Valid host credentials remain authoritative; sign-out, concurrent account
  483. changes, network failures, and server failures do not trigger an unsafe
  484. credential switch.
  485. - `prism dashboard` opens the active local dashboard without relabeling a
  486. linked Standard, Advanced, or Enterprise account as Free.
  487. ## What's New in v20.21.10
  488. ### Signed-out Free dashboards keep working locally
  489. - Signing out now switches Project View, project details, and graph reads to
  490. local SQLite without requiring an account, configuration edit, or restart.
  491. - The saved Synalux backend preference remains ready for the next sign-in;
  492. accidental missing cloud credentials still fail closed.
  493. - Latest Activity uses the newest durable session when it is newer than the
  494. saved handoff. Recent Sessions are newest first, and saved handoff versions
  495. remain available as restore points.
  496. ## What's New in v20.21.9
  497. ### Prism Free opens without a Synalux account
  498. - Run `prism dashboard` to open the current local Mind Palace. No sign-in,
  499. account-link code, API key, paid plan, or Free-plan redemption is required.
  500. - A bare local dashboard address now gives the exact local-open command instead
  501. of rendering a broken account state.
  502. - Account & Settings shows Prism Free as active. Synalux linking remains an
  503. optional action for cloud sync, billing, and paid features.
  504. - Local access stays protected without printing its browser capability into
  505. startup output, and unsafe state paths or redirected identity probes fail
  506. closed.
  507. ## What's New in v20.21.8
  508. ### Dashboard graphs use the authenticated Portal
  509. - The selected cloud project now shows its real session nodes and stored links
  510. instead of collapsing to a keyword-only project bubble.
  511. - **Synthesize Edges** uses the authenticated Synalux Portal embedding contract;
  512. the Prism dashboard process does not need a Google or Gemini API key.
  513. - Existing vectors and links are reused on repeat runs, synthesis fan-out is
  514. bounded, and Portal failures are shown rather than rendered as an empty graph.
  515. - **Account & Settings** now shows the current user, role, and Free, Standard,
  516. Advanced, or Enterprise plan, with visible sign-in, upgrade, billing, and
  517. sign-out actions.
  518. - A selected paid plan survives the Portal sign-in round trip, live and test
  519. Stripe catalogs resolve every paid tier, and localized checkout never reuses
  520. a USD Price for another currency.
  521. ## What's New in v20.18.1
  522. ### Task skills survive compaction and update in place
  523. - **Prompt-routed task skills now return after compaction.** The hook restores
  524. the three most recently active task skills alongside the protected-floor
  525. digest, so a short follow-up such as `continue` keeps the workflow and visual
  526. verification rules that governed the work before context was compacted.
  527. - **A completed managed-skill sync refreshes active task rules on the next
  528. prompt.** The hook compares the materialized generation on disk with its
  529. per-session state, re-authorizes every restored name against the current
  530. manifest, and injects the current bodies. A downgrade clears stale paid task
  531. state; Prism-managed directories cannot use the user-owned local-skill
  532. exception.
  533. - **User-owned local skills now route with their actual body.** A local
  534. `SKILL.md` remains usable while signed out, while an entitled platform body
  535. takes precedence if both sources use the same name.
  536. - **Codex hook context is anchored to the user's request.** Routed rules tell
  537. the model to execute the preceding user request with the rules applied,
  538. avoiding the trailing developer-context placement being mistaken for a new
  539. task. The anchor and all restored content share the 9,800-character limit.
  540. - **Hook version 5 enforces its command version.** A still-running host with a
  541. trusted v4 command cannot execute the rewritten v5 script. After upgrading,
  542. run `prism connect --refresh --no-models`; Codex must trust both new v5 hook
  543. entries in `/hooks`. Restart the host if it has not reloaded the new hook
  544. definitions. Once v5 is active, later skill-body generations refresh on the
  545. next prompt without another host restart.
  546. - State names are validated and bounded before they become CLI arguments, and
  547. the two-call refresh paths fit inside the host's 15-second hook timeout.
  548. ## What's New in v20.18.0
  549. ### The protected floor rides the bootstrap — and survives compaction
  550. - **`session_bootstrap` now inlines a digest of the protected floor** on
  551. paid tiers at standard and deep depth: one inert line per rule, derived
  552. from each skill's first paragraph (or its pinned `digest:`), plus its
  553. section map, ~5.6K chars for the full floor. Small-context hosts such as
  554. Codex were re-reading the sixteen SKILL.md files every session (median 8
  555. re-reads / 36KB, worst 823 / 5.1MB in rollout logs) because the bootstrap
  556. only *named* them. The digest is paid for on top of the context budget, so
  557. the ledger/handoff share at every depth is byte-identical to before. Quick
  558. depth stays names-only — the opt-out.
  559. - **A second hook re-injects the digest after compaction.** `prism connect`
  560. registers the prism-route script on `SessionStart` matched to `compact`
  561. (Claude Code and Codex); it runs `prism floor-digest`, which applies the
  562. same tier and depth decisions as the bootstrap, and adds nothing on
  563. startup/resume/clear. Hosts without hooks (Gemini, Cursor) still get the
  564. digest on every bootstrap. **Codex: UNVERIFIED against a live compaction.**
  565. The hook is registered and the script accepts the documented payload
  566. spellings, but no Codex compaction has been observed end-to-end; on a
  567. payload it does not recognise it re-injects nothing rather than something
  568. wrong. If the digest comes from a generation whose skill files never
  569. finished syncing, the re-injected block carries the same STALE warning the
  570. bootstrap shows.
  571. - **Codex trust is reported honestly after a hook rewrite.** Approvals are
  572. keyed by definition hash, so a rewritten `hooks.json` — this release adds
  573. the SessionStart entry — voids prior trust: connect prints AWAITING TRUST
  574. for both entries instead of a green ✓ for a hook Codex would silently skip,
  575. and trust recorded for an older hook version is never mistaken for current.
  576. - **A host config that no longer parses is left alone.** If
  577. `~/.claude/settings.json` or `~/.codex/hooks.json` exists but is not valid
  578. JSON, connect keeps it byte-identical, registers no hook there, and says so
  579. — it no longer replaces the file with a minimal hooks-only one. The npm
  580. postinstall notice says the same, instead of asking you to trust a Codex
  581. hook it never registered.
  582. - Fixed: a symptom-routed skill whose closing frontmatter fence is its last
  583. line was inlined with its YAML (triggers included) as if it were the rule.
  584. - Fixed: a digest line that crosses into a new section keeps that section's
  585. heading in front of it — whatever opened the section (an H2, a mid-document
  586. H1, an empty heading, a setext underline) — so "Delegate to" / "Do NOT
  587. delegate" rules cannot read with the wrong polarity once joined. A skill
  588. file on disk is used only when it digests: empty, cut off inside its
  589. frontmatter, or frontmatter-only files fall back to the stored copy instead
  590. of rendering YAML as the rule.
  591. - Fixed: on Windows, a Codex hook approval is recognised even though Codex
  592. stores the path with escaped backslashes.
  593. - The publish gate now refuses release notes that run *ahead* of the package
  594. version (CHANGELOG, README, translated READMEs) — reading the newest
  595. version on the heading line, so a `v20.17.3 – v20.18.0` range counts as
  596. 20.18.0, and surviving a typographic apostrophe or a BOM.
  597. ## What's New in v20.17.3
  598. - **A plugin install can no longer enable the prompt-routing hook.** The
  599. package's maintenance paths (npm postinstall, server startup) now only
  600. refresh a hook that an explicit `prism connect` previously installed —
  601. a prism MCP registration in host config no longer counts as consent.
  602. First install of the hook happens through `prism connect` or not at all.
  603. - **The Claude Code plugin launcher is fully deterministic.** It runs the
  604. exact pinned server version with npm lifecycle scripts disabled, and
  605. the plugin now documents its security posture in `plugins/prism/README.md`.
  606. ## What's New in v20.17.2
  607. - **Pasted logs can no longer falsely activate skills.** Symptom-triggered
  608. routing now strips fenced blocks and routable skill-name mentions (including
  609. inside compound identifiers like container/pod names) from the routing view
  610. of a prompt, so quoting an agent log or a skill list doesn't load skills the
  611. text merely mentions. Skills named by ordinary words keep routing normally.
  612. - **Symptom-routed skills now arrive whole.** Startup budgets deliver the full
  613. rule text at every depth that fits; when a rule genuinely cannot fit, the
  614. display says exactly how much is missing and how to load the rest, instead
  615. of silently truncating.
  616. - **Routing can no longer be silently disabled by one bad skill.** Corrupt or
  617. hostile trigger tables — wrong value shapes, patterns named after object
  618. prototype properties — are skipped per entry instead of taking down all
  619. prompt routing (or, in one case, the vault export) for the session.
  620. ## What's New in v20.17.1
  621. - **Fixes a broken CLI in 20.17.0** — a command-name collision made every
  622. `prism` CLI invocation exit with a commander error at startup (the MCP
  623. server was unaffected). The handoff-sync command is `prism handoff …`;
  624. `prism sync` remains cross-backend data synchronization. If you installed
  625. 20.17.0, update.
  626. ## What's New in v20.17.0
  627. ### Cross-Machine Session Handoff — End-to-End Encrypted
  628. - **Resume a session on any of your machines.** With `prism handoff enable` (paid,
  629. off by default), each `session_save_handoff` seals the handoff to all your
  630. account's device keys and relays the CIPHERTEXT; another machine pulls with
  631. `sync_pull_handoff` (or `prism handoff pull <project>`) and opens it locally.
  632. - **The relay stores ciphertext only** — X25519 + AES-256-GCM sealed
  633. envelopes. No key that opens a handoff ever exists server-side. The channel
  634. is deliberately separate from savings sync, which carries counters only.
  635. - **TOFU device pinning** surfaces a compromised relay: sealing to a key this
  636. machine has never seen warns loudly, keyed on the client-derived recipient
  637. id so a swapped key can't hide behind a familiar device name.
  638. - `prism handoff status|devices` to inspect; revoke a lost machine from the portal.
  639. ## What's New in v20.16.0
  640. ### See What Local Serving Saves You — Meterable, Auditable, Team-Wide
  641. - **`local_savings` tool + `prism savings` CLI** — the token volume local
  642. serving kept off your cloud model: all time, trailing 30/7 days, or any
  643. `--days N` window. Tokens, never an invented dollar figure, with the
  644. assumptions and known undercounts printed inline.
  645. - **Team roll-up (paid)** — `prism savings --sync-enable` uploads per-day
  646. counters only (never content; the payload is a closed field set the server
  647. also enforces); `prism savings --team` shows the workspace-wide total with
  648. per-member share. Off by default.
  649. - **E2E sync foundation** — sealed multi-recipient envelopes (X25519 +
  650. HKDF-SHA256 + AES-256-GCM on node:crypto, no new dependency) and per-device
  651. identities, adversarially reviewed: cross-machine session sync will ship on
  652. a relay that only ever stores ciphertext.
  653. - **Push-time public-leak guard** — outgoing diffs AND commit messages are
  654. scanned before anything leaves the machine.
  655. ## What's New in v20.12.1
  656. - **`prism connect --refresh` now converges every registration it owns**, not
  657. just the top-level one — directory-scoped entries could otherwise keep
  658. launching an old build indefinitely.
  659. - **`prism update` checks the installed package**, not the CLI that happens to
  660. be running, so it can no longer report "current" while the install is stale.
  661. - **The opt-in scheduled updater can actually start** — the LaunchAgent now
  662. carries a PATH that includes node and npm.
  663. ## What's New in v20.12.0
  664. - **Prism now tells you when it's out of date.** Session startup shows a
  665. one-line update notice when a newer release exists — cache-backed, at most
  666. one registry check per day, silent offline. `PRISM_NO_UPDATE_CHECK=1`
  667. opts out.
  668. - **Hands-free updates, if you want them.** `prism autoupdate enable` sets up
  669. a daily `prism update --if-idle`: it updates only the global npm package,
  670. defers while any Prism server is running, and never touches host
  671. configuration — that stays behind a visible `prism connect`.
  672. ## What's New in v20.11.1
  673. - **Saving memory never gets refused.** The save path used to reject
  674. `session_save_ledger`/`save_handoff` calls when its path-to-project
  675. heuristic disagreed with the project you declared — and the registry the
  676. heuristic trusted could contain junk from earlier auto-registration, so
  677. legitimate sessions ended unsaved. Your declaration now always wins; the
  678. disagreement is returned as an advisory warning, and auto-registration
  679. only accepts real repository roots.
  680. - **Screenshots are evidence again.** `prism browser` captures on macOS were
  681. silently *upscaled* to the size cap, so a screenshot no longer showed what
  682. actually rendered. Only genuinely oversized captures are resized now, and
  683. the cap no longer clips a standard 1920-wide viewport.
  684. ## What's New in v20.10.0 – v20.11.0
  685. - **Skill routing now works mid-session.** New prompts are matched on-device
  686. as the conversation moves — not just on turn one — and injected within each
  687. host's real context limits (Claude Code caps hook output at 10k chars;
  688. Codex truncates by default), with pointer-first delivery when a payload
  689. can't fit inline.
  690. - **`prism connect` is a converge command.** It self-updates first, re-execs,
  691. then reconciles MCP registration, skills, and hooks — no more
  692. "fresh config, stale code" machines.
  693. - **Scoped skills route on prompts too**, and startup output survives hosts
  694. that discard structured tool content.
  695. ## What's New in v20.9.0 – v20.9.3
  696. - **Your skills follow your account.** `skill_save` stores a skill at the
  697. scope you choose: this machine only (`local`, works offline and signed out),
  698. your account (`user` — every machine you sign into receives it), or a
  699. workspace (`team` — shared with members, admin-managed, optionally targeted
  700. to specific people).
  701. - **Trim the catalog you don't use.** `skill_manage` can release platform
  702. skills you never touch — freeing host skill-catalog budget — and restore
  703. them any time, losslessly. Deleting a scoped skill archives its final
  704. content locally first, so nothing is ever silently unrecoverable.
  705. - **Delivery that queues instead of failing.** Concurrent sessions no longer
  706. starve skill sync on the local config store (WAL + busy-timeout) — a failure
  707. that previously reported only "partial" where nobody could see it.
  708. - **Withheld rules still bind.** When the context budget can't inline a
  709. skill's text, the manifest of withheld names now states that those skills
  710. still govern the work and names every way to load them before completion
  711. claims.
  712. - **The budget the floor never spent.** A long-standing accounting bug meant
  713. no unprotected skill ever inlined at any normal context level — the
  714. always-inlined protected floor was debiting the budget meant for everything
  715. else. Task-matched skills (like the completion-evidence checklist) now
  716. actually arrive.
  717. ## What's New in v20.8.2
  718. - **Skill delivery now admits failure instead of hiding it.** A filesystem
  719. permission edge case (a umask stripping the owner-execute bit) could leave
  720. skill sync writing nothing while reporting itself current — measured at nine
  721. days on a real machine. Broken managed directories are repaired in place,
  722. every directory is created umask-proof, and the repair path refuses symlinks
  723. via an `O_NOFOLLOW` descriptor.
  724. - **A stale install tells you at startup.** Prism now tracks the generation
  725. that actually reached disk separately from the one the database accepted; if
  726. they diverge, the startup banner says so in a warning placed where display
  727. truncation cannot cut it. A successful sync clears it automatically.
  728. ## What's New in v20.7 – v20.8.0
  729. - **First run proves the memory instead of describing it** — `session_bootstrap`
  730. seeds one demo memory and shows it *recalled from disk*, so the save→recall
  731. loop is felt in session 1. One-shot, contained in its own `prism-demo`
  732. project, removable with one call.
  733. - **Dashboard fixed** — a quoting typo (shipped 2026-05-29) killed the inline
  734. script at parse time, so every dashboard since rendered "Loading projects..."
  735. forever. Fixed, and the ES5 lint now `node --check`s the built inline script
  736. so an unparseable dashboard can never ship again.
  737. - **Trusted Publishing** — npm releases authenticate via GitHub OIDC. No stored
  738. token to expire or leak, and every release carries a signed [provenance
  739. attestation](https://docs.npmjs.com/generating-provenance-statements) — you
  740. can verify the tarball you install was built from this repo by CI
  741. (`npm audit signatures`).
  742. - **TLS enforced for cloud sync** — a remote `http://` storage URL is upgraded
  743. to `https://` instead of silently sending session content in the clear.
  744. - **Codex plugin collision + enabled-state detection** — `prism connect` skips
  745. its own registration only when a plugin *actually* provides `prism-mcp`
  746. (cache present **and** enabled), preventing both duplicate and missing
  747. servers.
  748. - Windows CI stabilized; registry/npm listings realigned and deduplicated.
  749. ## What's New in v20.6.0
  750. ### Delivery Is Not a Suggestion
  751. An audit of a real incident (an agent wiped demo data after *announcing* the
  752. wipe — with the ask-first rule committed, bundled, and absent from what any
  753. agent actually received) found the protected floor had outgrown every delivery
  754. budget: "unprotected" had quietly come to mean "never delivered".
  755. - **`ask-first` and `feature-preservation` join the protected floor** (14 → 16).
  756. Protected skills are always inlined; these two now reach every session.
  757. - **Sync conflicts are loud and named.** Startup used to say "· 2 local
  758. conflicts preserved" while safety skills sat months stale; it now names each
  759. frozen skill and states how to resume updates.
  760. - **`--storage` accepts `auto` and `synalux`** — the CLI rejected its own
  761. documented default and the production backend.
  762. - **Disclosure:** skill delivery informs; it does not gate. A live probe showed
  763. a host agent still edit unverified source with the rule loaded. If your
  764. threat model includes an agent acting against a loaded rule under task
  765. pressure, pair this package with mechanical gates (hooks, permissions,
  766. least-privilege roles). True of every prior release; stated from this one.
  767. ## What's New in v20.5.3
  768. ### Grounding Evidence Carries Its Age
  769. Memory-grounded answers labelled their sources but never dated them, so a
  770. two-year-old note and yesterday's reached the model identically. Nothing in the
  771. evidence let it discount the stale one. Prompted by an external review naming
  772. the right risk for local-first memory: *the data stays local, but bad grounding
  773. becomes permanent* — storing everything on your machine removes the outside
  774. pressure that would otherwise surface a stale note.
  775. Evidence now reads:
  776. ```
  777. [SOURCE 1: ledger:8286581d (recorded 2025-05-29, 431 days ago)]
  778. ```
  779. The date already existed in storage and was being dropped at the snippet layer,
  780. so this is plumbing rather than new data collection. Zone-less SQLite
  781. timestamps are normalised to UTC — read as local, a ten-minute-old record
  782. parsed hours into the future and its age was suppressed entirely, meaning the
  783. feature silently did nothing on the freshest memories. An absent or unparseable
  784. date renders as nothing rather than defaulting to now; defaulting would make
  785. the oldest memories, the ones most likely to be stale, appear freshest.
  786. `tests/integration/grounding-staleness.test.ts` runs the reviewer's own probe —
  787. seed a deliberately outdated note beside a contradicting fresh one and assert
  788. the model receives both, visibly dated. Anyone can run it.
  789. **Not solved, and not claimed:** retrieval does not weight recency. A stale note
  790. shown *beside* a fresh one is the easy case — the model sees both dates and can
  791. weigh them. The hard case is a stale note retrieved *alone*, because ranking is
  792. by keyword match and an old store returns old results; then the age label is the
  793. only defence and there is no fresher record to compare against. Tracked as
  794. `TECH_DEBT.md` #4.
  795. ## What's New in v20.5.0 – v20.5.2
  796. ### The First Message Never Leaves Your Machine
  797. Symptom-triggered skills — the rules that fire on "can't see X", "no rows",
  798. "the list is empty" — are meant to load on the turn an incident report arrives.
  799. They never did: every host template called `session_bootstrap` with `{}`, so
  800. there was no prompt to match against.
  801. Fixing that raised the question of where matching happens. It now happens
  802. locally. The 28 keyword rules are already public, so there was nothing a local
  803. match could not compute, and `callPortal()` has no `prompt` parameter at all —
  804. the guarantee is structural, not a promise. The portal request carries the
  805. project and role only.
  806. A matched rule now arrives as **content**, not as a name. Native hosts outside
  807. the skill-file mirror had no way to read a rule they were only told about, so
  808. the rule body is inlined into the startup display, bounded and sized against
  809. the real per-project budget.
  810. ## What's New in v20.4.0
  811. ### An Explicitly Named Cloud Backend Fails Loud
  812. Setting `PRISM_STORAGE=synalux` or `=supabase` with incomplete credentials used
  813. to downgrade silently to local SQLite. The switch was logged to stderr, which
  814. MCP hosts discard, so nothing surfaced it: sessions kept serving stale local
  815. context while the cloud held newer history, and `context_source` read `local`
  816. rather than any kind of warning. A session could run that way for weeks.
  817. Naming a backend outright is a strong statement of intent, so it now throws —
  818. naming the missing variables and the `PRISM_STORAGE=local` opt-out — instead of
  819. quietly splitting your session history. `auto` is unchanged: it keeps its
  820. documented `synalux > supabase > local` degradation, pinned by a test.
  821. **Upgrade note:** if you explicitly set `PRISM_STORAGE=synalux|supabase` and
  822. your credentials are incomplete, startup now fails with a named error instead
  823. of silently using local data. That error is the fix — set the missing variable,
  824. or choose `PRISM_STORAGE=local` deliberately. Default (`auto`) configs are
  825. unaffected.
  826. The throw is deliberately not treated as a recoverable startup fault: that path
  827. exists for transient errors (rate limits, 5xx, DNS), which may degrade behind a
  828. visible notice. A missing credential is a configuration fault and must not be
  829. papered over.
  830. Also: the skill block is now budgeted by default rather than only on request,
  831. so a large skill payload cannot crowd out briefing and history.
  832. ## What's New in v20.3.2
  833. ### Web Scholar: SSRF Hardening
  834. Security release. Web Scholar scrapes article URLs that come from
  835. search-engine output, so the target is attacker-influenceable through SEO
  836. poisoning — and because what it scrapes is written into the memory corpus and
  837. passed to the configured LLM, a redirection to a local address meant reading an
  838. internal service *and* sending the result onward.
  839. The host guard matched string prefixes instead of parsing the address, and six
  840. spellings of a local address got through: `[::1]` (`URL.hostname` keeps the
  841. brackets), `127.0.0.2` (only `.1` was enumerated, not all of `127.0.0.0/8`),
  842. `0.0.0.0`, `[::ffff:127.0.0.1]`, `localhost.` (a trailing dot defeated every
  843. suffix check at once), and `[64:ff9b::7f00:1]` (NAT64 embeds IPv4 in its low
  844. bits). Host classification now parses addresses and also covers CGNAT,
  845. benchmarking, multicast, reserved, and IPv6 unique-local and link-local ranges.
  846. DNS rebinding is closed too. Every check read the URL string, so a hostname the
  847. attacker controls passed all of them and could still resolve to `127.0.0.1`.
  848. Targets are now resolved first, every returned address is validated, and the
  849. connection is pinned to those addresses so the name is never resolved a second
  850. time — which also shuts the window between the check and the connect.
  851. Scrape failures no longer vanish into a bare `catch {}`, a run is bounded by
  852. `PRISM_SCHOLAR_SCRAPE_BUDGET_MS` (default 60s) instead of stalling on a raised
  853. article count, and responses are capped at 8 MiB.
  854. This is reachable only when scholar actually runs — `scholar_research`, or the
  855. background loop under `PRISM_SCHOLAR_ENABLED=true` — and when the attacker also
  856. controls DNS or a search result. Upgrade if you use Web Scholar.
  857. ---
  858. ## What's New in v20.3.1
  859. ### Prism Browser Reports Real Failures
  860. `prism browser` could not fail a test. `eval 1 === 2` returned `status: ok`
  861. with exit code 0, a page serving HTTP 500 reported `status: ok`, and console
  862. errors and uncaught page exceptions were discarded entirely. This release adds
  863. assertions — `assert-text`, `assert-visible`, `assert-count`, `assert-url`,
  864. `assert-title`, `assert-eval`, `assert-no-page-errors` — that return
  865. `status: failed` and a non-zero exit. `open` now reports `http_status` and
  866. fails on 400 or higher, screenshots are validated rather than assumed, and
  867. `eval` returns native JSON with its type instead of a Python `repr`.
  868. The fingerprint layer had never been applied: a wrong keyword argument made
  869. the stealth library throw on every launch — 1,139 failures and 0 successes
  870. since April — while the runner reported it as active. It is fixed, and a layer
  871. that cannot be applied now fails loudly. The headless build no longer
  872. advertises itself through `navigator.userAgentData` or the `Sec-CH-UA` header,
  873. and a patch that corrupted `Object.getOwnPropertyDescriptor` on every page
  874. under test has been removed. These remain best-effort test aids, not a
  875. guarantee against bot detection.
  876. `--local-only` now actually isolates: WebSocket, EventSource, WebRTC and
  877. `sendBeacon` egress bypass request routing and were never blocked, and service
  878. workers were allowed through. `--cleanup` was a no-op in the two modes agents
  879. use. Site isolation, phishing detection and popup blocking are no longer
  880. disabled by default, since these profiles hold live authenticated cookies.
  881. New for test runs: `--ephemeral-profile` and `--storage-state` for hermetic
  882. authenticated flows, `pages`/`switch-page` so OAuth popups are reachable,
  883. `--fail-fast`, `--fast`, `--trace`/`--video`/`--har`, and
  884. `profiles --prune-older-than` for profile maintenance.
  885. ---
  886. ## What's New in v20.2.7
  887. ### Session Saves Survive Agent Restarts
  888. Prism now remembers that a conversation successfully loaded its project context
  889. when the MCP server restarts or another Prism process handles the next request.
  890. `session_save_ledger` and `session_save_handoff` no longer fail with a false
  891. `context_not_loaded` error in that flow.
  892. The recovery remains fail-closed: authorization is limited to the exact project
  893. and conversation, expires with the existing context window, and stores no
  894. plaintext conversation identifier. Cross-project, forged, malformed, expired,
  895. or future-dated receipts are still rejected. The release also updates PostCSS
  896. to the patched 8.5.23 release.
  897. ---
  898. ## What's New in v20.3.0
  899. ### Hybrid Memory Search (Portal Tier)
  900. `session_search_memory` on the portal tier (Synalux-backed installs) now
  901. fuses semantic similarity with exact-term lexical matching via weighted
  902. reciprocal-rank fusion. Measured on blind probes against a real
  903. 8.5k-entry corpus: fused retrieval was **never worse** than semantic
  904. alone at top-5, and exact identifiers — TPNs, function names, error
  905. strings — now rescue queries that embedding similarity blurs. Results say how they were found — `hybrid retrieval`
  906. headers, per-hit `sem#/lex#` arms — and a lexical-only rescue is labelled
  907. `exact-term match` instead of pretending to a similarity score. Local
  908. SQLite installs keep pure vector search; hybrid needs the portal's
  909. lexical index.
  910. ## What's New in v20.2.6
  911. ### Safer Configuration Updates Across Every Agent
  912. `prism connect` now reads Claude, Cursor, Gemini, and Codex configuration
  913. through a single verified file snapshot, preventing another process from
  914. swapping a file between Prism's safety check and its read. Supported symlinked
  915. dotfiles still work, while dangling or planted symlinks fail loudly instead of
  916. being followed or overwritten. This release also carries the patched
  917. dependencies and cross-platform release checks introduced in v20.2.5.
  918. Cloud fallback is now documented consistently as Gemini 3.6 Flash. Plan
  919. ceilings govern automatic `prism_infer` routing; direct use of any downloaded
  920. model through local Ollama remains free on every tier.
  921. ---
  922. ## What's New in v20.2.4
  923. ### Reliable Session Memory That Shows Work, Not Greetings
  924. Greeting-only assistant replies are skipped before ledger writes. Existing
  925. greeting rows are filtered at read time across native startup, MCP context, and
  926. `prism load --json`, while entries containing decisions, TODOs, changed files,
  927. or non-session events remain visible. Historical rows are not destructively
  928. deleted. If Synalux has a transient startup failure, Prism displays one bounded
  929. local last-good snapshot and clearly labels it; permanent authorization or
  930. validation failures still fail loud, and later writes remain cloud-routed.
  931. ---
  932. ## What's New in v20.2.2
  933. ### One Local-First Workflow Across Every Agent
  934. `prism connect` now installs one orchestration contract for Claude Code,
  935. Claude Desktop, Cursor, Gemini CLI, and Codex. Bounded delegated work goes to
  936. `session_task_route` and the local `prism_infer` worker first; routine work must
  937. not create background host agents. Local workers can receive the active
  938. project's dashboard-configured quick, standard, or deep memory and select a
  939. RAM-safe 2B/4B/9B/27B model at call time. The router forwards complexity but
  940. does not choose the model; `prism_infer` owns the final decision using memory
  941. and context fit, installed models, live RAM, entitlements, and explicit caller
  942. overrides.
  943. Codex and Gemini native agent fan-out are disabled during connect. Codex keeps
  944. a two-thread, one-level Terra/low fallback profile if the developer explicitly
  945. re-enables native agents later. Claude Code keeps native agents as a last-resort
  946. path but pins their model to Sonnet. Cursor and Claude Desktop do not expose a
  947. supported global subagent-policy file, so they receive the identical workflow
  948. through Prism's MCP server instructions. `prism_infer` safety boundaries and
  949. the host's final verification responsibility are unchanged.
  950. ### Subscription-Tier Skills Arrive Before the First Host Launch
  951. `prism connect` now downloads the authoritative Synalux skill manifest and
  952. materializes entitled packages in the native `~/.agents/skills` directory
  953. before the command exits. Codex therefore sees the current skillset on its
  954. first launch instead of requiring a second restart. Prism rechecks the same
  955. snapshot at MCP startup, session load, and every five minutes—skill delivery
  956. never depends on a host lifecycle hook.
  957. On the first user turn, Prism's native skill, MCP metadata, and managed host
  958. instructions request one `session_bootstrap({})` call. Prism then uses the
  959. dashboard's developer name, Auto-Load Projects, and quick, standard, or deep
  960. setting. The response stays focused on greeting and session state because tier
  961. skills are already present in the host's native skill directory.
  962. Hook-free MCP can provide and prioritize that ready-to-display block, but the
  963. host model still owns the final assistant message and may summarize it. Prism
  964. does not claim a deterministic verbatim greeting on third-party chat surfaces;
  965. that would require a host lifecycle hook, launcher, extension, or Prism-owned
  966. panel. Context loading itself remains complete even when a host shortens the
  967. visible reply.
  968. Free accounts receive only the public hook-free `prism-startup` package; the MCP
  969. server still supplies a compact, non-proprietary safety and evidence contract.
  970. Authenticated paid accounts receive the protected behavioral and engineering
  971. packages plus the current subscribed routing set. The paid
  972. `evidence-first-protocol` keeps ordinary coding lightweight: one correlated
  973. reproduction is enough to begin an edit, while strict acceptance starts only
  974. before a completion claim, push, or release and inspects only the exact artifacts
  975. used as proof. Upgrades install newly entitled packages; verified downgrades
  976. remove only Prism-owned packages while preserving local skills and locally
  977. modified conflicts.
  978. When upgrading an older Claude Code installation, `prism connect` removes only
  979. the exact Prism-owned startup, skill-sync, handoff, and drift hook actions from
  980. the legacy bootstrap. It also removes the recognized legacy Prism startup
  981. sections from `~/CLAUDE.md`, preserves every other instruction, and installs a
  982. small ownership-marked native block that selects `session_bootstrap({})` on the
  983. first turn. User hooks, custom instruction sections, and near matches remain
  984. untouched; native skills and server-side reminders preserve those Prism
  985. features without depending on host lifecycle hooks. On Claude Code and Codex
  986. connect additionally registers the prism-route script twice: on every prompt
  987. (mid-session skill routing) and on `SessionStart` matched to `compact` only
  988. (post-compaction protected-floor digest). Because hosts expose no native
  989. session-end callback, handoff at shutdown is instruction-driven rather than a
  990. guaranteed lifecycle event.
  991. After Claude Code's native user registration succeeds, the same default or
  992. `--refresh` command checks the nearest `.mcp.json` from the current directory
  993. through the home directory. It removes only the exact legacy
  994. `prism-mcp` entry `{ "command": "npx", "args": ["-y", "prism-mcp-server"] }`
  995. that would otherwise shadow the user registration. Custom Prism entries and
  996. their additional fields, plus unrelated servers, are preserved; malformed
  997. files fail loud without changes. `--dry-run` reports the recognized migration
  998. without changing the file.
  999. ---
  1000. ## What's New in v20.2.1
  1001. ### Subscription-Aware Memory Storage
  1002. `prism connect` now carries an explicit `PRISM_STORAGE=auto|local|synalux|supabase`
  1003. into every managed host registration and rejects invalid values before changing a
  1004. config file. In `auto`, a portal-confirmed free tier uses local SQLite, while
  1005. Standard, Advanced, and Enterprise use Synalux cloud memory. If entitlement
  1006. resolution is unavailable, Prism fails closed instead of splitting history across
  1007. backends. Storage remains independent of local-first model routing.
  1008. ---
  1009. ## What's New in v20.2.0
  1010. ### One Command Connects Every Supported Host
  1011. Install Prism globally and run `prism connect`. It detects Claude Code, Claude
  1012. Desktop on macOS, Windows, and Linux (beta), Cursor, Gemini CLI, and Codex, then safely registers the
  1013. server from the installed package. Existing custom entries are untouched;
  1014. `--dry-run` previews changes and `--refresh` updates only Prism-managed entries.
  1015. ---
  1016. ## What's New in v20.1.0
  1017. ### Every Inference Outcome Is Now Observable
  1018. `prism_infer` gains a failure contract: pass `escalation: "report"` and every call returns a structured `gate_outcome` — `success`, `degraded` (gate-failed output served anyway, explicitly flagged), or `refused` (typed, with reason, instead of a thrown error). Degraded output can no longer serve silently.
  1019. ### Big Prompts Work Locally
  1020. Prompts over 4000 chars were blanket-refused when cloud was off. Now the full text gets a deterministic reserved-keyword scan plus a head+middle+tail excerpt classification — clean oversize prompts serve locally with a distinct `UNCERTAIN_LENGTH` audit marker. Clinical/reserved handling is unchanged (and its keyword floor got stronger).
  1021. ### No More Silent Truncation
  1022. Tier context limits now match the live Modelfiles (27b/9b are 4096-token models; 4b/2b are 32768 — the old table had it backwards). Tiers that can't hold your prompt are skipped with a visible `ctx_insufficient` reason; if nothing fits, you get the full prompt on cloud or a loud error — never an answer computed from a silently-clipped prompt.
  1023. ### Know Which Plan You're Actually Running Under
  1024. Entitlements carry a `source` field: `portal` (real), `unconfigured` (free by design), or `fallback_free` (portal unreachable — free limits ASSUMED). Pass `strict_entitlements: true` to fail loud instead of running degraded.
  1025. ---
  1026. ## What's New in v20.0.8
  1027. ### verify_behavior Works Again
  1028. The `verify_behavior` tool crashed on every call (`-32602 expected object, received string`) — the handler returned a bare string instead of an MCP `CallToolResult` object. Fixed, with contract + fail-closed regression tests so the safety gate can never silently break again. If you're on 20.0.6/20.0.7, update.
  1029. ### From v20.0.7: Reserved-Content Safety, Skills Auth, Delegation Metrics
  1030. Reserved clinical content is now Claude-or-refuse (never served by a smaller model than the one that refused it), skill delivery gained a JWT auth fallback (paid-tier skills now reach machines using only `PRISM_SYNALUX_API_KEY`), and every `prism_infer` call is recorded in a persistent `infer_metrics` ledger. Full details in [CHANGELOG.md](CHANGELOG.md).
  1031. ---
  1032. ## What's New in v20.0.5
  1033. ### Local-First Delegation — 15 Categories, Measured Rate
  1034. The `local-inference-first` skill covers 15 hard-trigger categories (code gen, regex, format conversion, summarization, documentation, factual lookup, classification, shell commands, config gen, and more). Pasted code blocks now trigger delegation regardless of question phrasing. Measured delegation rate: **30-35% on engineering sessions, 40-60% on transform/content sessions**. Rate depends on prompt mix, not the skill — the instruments now self-validate with `nonDelegatedCount` to prevent curated-set tautologies.
  1035. ### Think-Only Retry (v20.0.4)
  1036. Qwen 3.5 models (9B/27B) with thinking enabled could burn all tokens on `<think>` blocks and return empty content, causing a cascade to 4B. Now detects think-only responses and retries the same tier with thinking disabled — preserving model quality instead of falling to a smaller model.
  1037. ---
  1038. ## What's New in v20.0.3
  1039. ### Layer 1 Cold-Model Resilience
  1040. (As shipped in an earlier release; the current contract is the header of `src/utils/layer1.ts`.) The reserved-category classifier retries once with a longer timeout on cold-model failure, then falls back to a deterministic keyword backstop; keyword-clean text is served locally. Over-length prompts (>4K chars) get the full-text keyword floor plus a head+middle+tail excerpt read and a distinct UNCERTAIN_LENGTH marker — prompt padding cannot force the ERROR branch. This eliminates the cold-start refusal problem without weakening the safety gate.
  1041. ### Keyword Backstop for Reserved Content
  1042. When the LLM classifier fails (timeout, injection, resource pressure), a deterministic regex floor catches reserved vocabulary (restraint, seclusion, self-harm, suicide, overdose, crisis de-escalation, etc.) including inflected and verb forms. Blocks prompt-padding and classifier-injection attacks on the ERROR path.
  1043. ### Single-Source Safety Text
  1044. The safety statement in the MCP server `instructions` field now imports from `boundaries.ts` — one source of truth instead of two hand-maintained copies. Boundaries version bumped to v3 with an explicit delivery decision documented in code.
  1045. ### Reserved-Category Safety Gate — All Tiers (v20.0.2)
  1046. The Layer 1 semantic classifier now runs for **every** user, not just paid tiers. Reserved clinical content is refused on free tier when cloud is unavailable — fail-closed.
  1047. ### Ledger Dedup (v20.0.2)
  1048. `session_save_ledger` deduplicates identical entries within a 5-minute window.
  1049. ### Evidence Script (v20.0.2)
  1050. `scripts/generate-evidence.sh` regenerates all 5 evidence files with built-in assertions. Run `bash scripts/generate-evidence.sh` to verify the full pipeline.
  1051. ---
  1052. ## What's New in v20.0.0
  1053. ### License: AGPL-3.0 → Apache-2.0
  1054. Prism MCP is now Apache-2.0. The thin-client architecture means all proprietary value (skill resolution, tier gating, billing, cloud inference) lives server-side — the open client carries no moat to protect. Apache-2.0 removes the enterprise adoption friction that AGPL caused.
  1055. ### Thin Client Architecture
  1056. Skill routing, budget management, and content resolution have moved server-side to the Synalux portal. The MCP client is now a thin API caller — simpler, smaller, and portable across any host (Claude Code, Gemini, Cursor, autonomous scripts). Offline fallback reads the last successful response from local SQLite.
  1057. ### Clean-Room Voyage AI Adapter
  1058. The Voyage AI embedding adapter was independently reimplemented from the [Voyage API docs](https://docs.voyageai.com/reference/embeddings-api) to ensure 100% project-owned copyright. Default model updated to `voyage-3.5`. See [PROVENANCE.md](./PROVENANCE.md) for details.
  1059. ### Server-Side Drift Detection
  1060. Session drift detection (GATE 5) no longer requires Claude Code hooks. The timer runs server-side per conversation, piggybacked on every MCP tool response. Works for any host.
  1061. ### CLA Requirement
  1062. External contributions now require signing the [Individual CLA](./CLA.md). The CLA check is merge-blocking on the `main` branch.
  1063. ---
  1064. </details>
  1065. ## Quickstart
  1066. The free tier needs no account, no API key, and no cloud. Install Prism, then
  1067. register it with every supported MCP host already installed on your machine:
  1068. ```bash
  1069. npm install --global prism-mcp-server
  1070. prism connect
  1071. ```
  1072. `prism connect` detects Claude Code, Claude Desktop (macOS/Windows/Linux), Cursor,
  1073. Gemini CLI, and Codex.
  1074. Use `prism connect --all` to target all five, `--host <name>` for one host, or
  1075. `--dry-run` to preview the files that would change. Existing `prism` and
  1076. `prism-mcp` entries are never overwritten by default. `--refresh` updates only
  1077. an entry previously created by Prism; custom entries remain untouched.
  1078. For Claude Code, both the default command and `--refresh` also remove the exact
  1079. legacy project-scoped `npx -y prism-mcp-server` entry from the effective
  1080. ancestor `.mcp.json` after the native user registration succeeds. No custom or
  1081. near-match project entry is changed.
  1082. Close the target MCP hosts before a non-dry-run registration so they cannot
  1083. edit their configuration at the same time.
  1084. The same connection installs the local-first orchestration contract:
  1085. | Host | Managed containment |
  1086. |---|---|
  1087. | Codex | `features.multi_agent=false`; a 2-thread, depth-1 Terra/low fallback profile is retained for explicit re-enable |
  1088. | Gemini CLI | `experimental.enableAgents=false` |
  1089. | Claude Code | `CLAUDE_CODE_SUBAGENT_MODEL=sonnet`; managed instructions reserve it for last-resort fallback |
  1090. | Cursor | Canonical policy delivered through MCP initialize instructions |
  1091. | Claude Desktop | Canonical policy delivered through MCP initialize instructions |
  1092. All five receive `PRISM_AGENT_POLICY=local-first` in their managed Prism MCP
  1093. entry. Routine tasks use the RAM-aware local worker; native/background fan-out
  1094. is not the default workflow. `session_task_route` supplies a complexity hint;
  1095. `prism_infer` remains the single owner of model and thinking selection and can
  1096. choose 27B when its viability gates support it.
  1097. Set `PRISM_STORAGE` before running `prism connect` to preserve an explicit
  1098. storage choice in the generated host entries. This does not change local-model
  1099. routing; Synalux cloud storage separately requires an active cloud-memory
  1100. entitlement.
  1101. Codex registration preserves unrelated `~/.codex/config.toml` content, appends
  1102. only the marked Prism MCP block, and updates only the documented local-first
  1103. feature/agent keys. `CODEX_HOME` is respected when set and must already exist,
  1104. matching Codex's own contract. Restart Codex CLI, the
  1105. IDE extension, or the ChatGPT desktop app after connecting.
  1106. Restart the connected host and your agent now has memory backed by a local
  1107. SQLite database (`~/.prism-mcp/data.db`). See [IDE setup](docs/IDE_SETUP.md)
  1108. for manual configuration and host-specific paths.
  1109. **Optional — local model fleet** for offline tool-routing. Pull whichever fits your hardware:
  1110. ```bash
  1111. ollama pull dcostenco/prism-coder:2b # 3.3 GB · on-device / lowest RAM · sees images (100% on our routing suite)
  1112. ollama pull dcostenco/prism-coder:4b # 3.5 GB · verifier · sees images (100%)
  1113. ollama pull dcostenco/prism-coder:9b # 6.7 GB · default router · sees images (95.7%, reasons before answering)
  1114. ollama pull dcostenco/prism-coder:27b # 16.8 GB · complex code / quality · text only (100%)
  1115. ```
  1116. Prism detects both the namespaced (`dcostenco/prism-coder:9b`) and bare (`prism-coder:9b`) Ollama tags automatically.
  1117. The 2b/4b/9b tiers carry a vision tower and accept screenshots through
  1118. `prism_infer({ images: [...] })` — pass absolute paths or base64. Image
  1119. requests are refused rather than answered blind when no tier (or the Layer 1
  1120. safety classifier) can actually see the image, so a text-only model is never
  1121. handed a prompt about a screenshot it never received. The 27b is text only.
  1122. ### Optional oMLX for local coding
  1123. Use **Account & Settings → Local AI** in `prism dashboard` for the
  1124. [Connection → Models → Test workflow](#local-ai-in-the-dashboard), opt-in setup,
  1125. progress, retry, and independent coding/image choices. Or use
  1126. `prism local install` followed by `prism local start`. npm installation never
  1127. downloads models automatically. The managed pack requires Apple Silicon,
  1128. macOS 15+, Python 3.11–3.13, 32 GiB memory and 40 GiB free disk; it keeps existing
  1129. servers and jobs running. Auto prefers configured oMLX for eligible coding;
  1130. explicit smaller model ceilings stay on Ollama, and task overrides take priority.
  1131. For manual setup, install the **Prism integration** of oMLX, its required
  1132. 9B classifier, and a drafting model such as Qwen3.8-27B oQ4e. Set a loopback API
  1133. key, enable chunked prefill, disable MTP/DFlash/speculative prefill, and configure
  1134. model context/thinking budgets. Then verify a call with `local_backend: "omlx"`,
  1135. `mode: "code"`, and the exact advertised `local_model`. Ollama need not be
  1136. running. Prism may reclaim idle, unpinned oMLX models when needed for a request;
  1137. active or protected work and device contention can still block it.
  1138. Follow the [step-by-step oMLX guide](docs/omlx.md) for pinned install/download
  1139. commands, server startup, a first MCP call, and troubleshooting. Its
  1140. [tested model table](docs/omlx.md#tested-models-and-trade-offs) separates native
  1141. oMLX checkpoints from the experimental Strata GGUF runtime. The
  1142. [coding and review results](docs/omlx.md#observed-coding-and-review-results)
  1143. show measured trade-offs and limits; they do not establish an overall winner.
  1144. Stock oMLX cannot serve this Prism path, and explicit oMLX has no inference
  1145. fallback. Local reviews remain advisory.
  1146. ---
  1147. ## What it does
  1148. Your AI agent forgets everything between sessions. Prism fixes that — and adds verification, drift detection, and multi-agent coordination on top.
  1149. ### Mind Palace — persistent memory that survives across sessions
  1150. Every conversation feeds a persistent store. The next session loads the right context automatically — no re-explaining.
  1151. <p align="center">
  1152. <img src="docs/mind-palace-dashboard-v20.8-full.png" alt="Mind Palace Dashboard — full page: session ledger, memory analytics, lifecycle controls, background scheduler" width="700" />
  1153. </p>
  1154. The dashboard shows your current project state, pending TODOs, intent health, and a neural knowledge graph — all built automatically from your agent sessions.
  1155. It runs on loopback and is gated by a local token by default — run
  1156. `prism dashboard` to open it without signing in. This local browser step is not
  1157. a Free-plan redemption.
  1158. Requests with an untrusted `Host`/`Origin` are refused, closing the DNS-rebinding
  1159. exposure fixed in GHSA-9cvx-7x8q-3g6m. See [docs/IDE_SETUP.md](docs/IDE_SETUP.md#securing-the-dashboard)
  1160. to pin the token, disable it, or configure Basic Auth / JWKS.
  1161. ### Export — read the record outside the agent
  1162. `session_export_memory` writes your memory out as plain files you can read,
  1163. diff, and commit. Nothing goes through a model to produce it.
  1164. ```
  1165. markdown human-readable — drop it in a PR to show what the agent actually did
  1166. json machine-readable — import into another Prism instance
  1167. vault zipped Markdown with YAML frontmatter and [[wikilinks]] (Obsidian, Logseq)
  1168. ```
  1169. This is the surface to reach for when you want to answer "did the agent verify
  1170. this, or is it claiming it did?" — the export is a record you review after the
  1171. fact, in a diff or a pull request, rather than a live view you have to go and
  1172. open. The same data is available from the dashboard's **Export ZIP** and
  1173. **Export Vault** buttons.
  1174. ### Knowledge Graph — semantic + keyword + graph search
  1175. Ask "what did I decide about the auth flow last month?" and get an answer with citations, combining vector similarity, full-text search, and graph traversal.
  1176. <p align="center">
  1177. <img src="docs/knowledge-graph.jpg" alt="Knowledge Graph — 190 keywords, 47 edges, 12 projects visualized" width="500" />
  1178. </p>
  1179. ### Session History — immutable audit trail
  1180. Every session is logged with files changed, decisions made, and TODOs. Search, filter, and replay any past session.
  1181. <p align="center">
  1182. <img src="docs/session-ledger.jpg" alt="Session Ledger — 93 sessions, 847 decisions logged across 12 projects" width="700" />
  1183. </p>
  1184. ### Inference Metrics — see where your tokens go
  1185. Every `prism_infer` call tracks which model handled it (local Ollama vs cloud) and how many tokens were consumed. When you save a session, Prism shows a summary:
  1186. ```
  1187. 📊 Inference Metrics (this session):
  1188. Total calls: 12 — Local: 10 (83%) | Cloud: 2 (17%)
  1189. Prompt tokens: 7,840 evaluated / 8,420 submitted est.
  1190. Completion tokens: 3,150
  1191. Cloud tokens saved (est.): 11,570 — token volume handled locally instead of cloud
  1192. Avg latency: 1,240ms
  1193. By model:
  1194. prism-coder:27b: 6 calls, 7,200 tokens, avg 1,800ms
  1195. prism-coder:9b: 4 calls, 2,870 tokens, avg 620ms
  1196. synalux-27b: 2 calls, 1,500 tokens, avg 1,100ms
  1197. ```
  1198. **Cloud tokens saved** is the honest routing metric — it accrues only when local Ollama handles a call that would otherwise have gone to Synalux cloud inference. A compact version appears inline after every 5th `prism_infer` call: `📊 local 10 (83%) · cloud 2 (17%) · ~11,570 tok · avg 1,240ms · 11,570 cloud tok saved`.
  1199. Local calls use actual Ollama token counts (`prompt_eval_count` / `eval_count` from Ollama); cloud calls use char/4 estimates. Metrics are tracked locally — no portal dependency, no env vars, works offline. Per-call data is also forwarded to the Synalux portal as best-effort analytics (independent of the display).
  1200. ### Session Drift Detection
  1201. Long agent sessions can wander from their original goal. `session_detect_drift` compares current work against the stated goal and returns `on_track / minor_drift / major_drift` so the agent can self-correct.
  1202. ### Behavioral Verification — catch bad edits before they happen
  1203. AI agents apply patterns from checklists without understanding the real-world impact. The `verify_behavior` tool challenges the agent with a scenario it must answer **before** editing — forcing it to think through what the end user will experience.
  1204. ```
  1205. Agent: "I'll revert this kitchen display change"
  1206. Prism: "⚠️ Scenario: A cook sees a 3-item ticket. One item is voided.
  1207. What should the cook see after the void?"
  1208. Agent: "The ticket stays visible with the remaining 2 items."
  1209. Prism: "Correct — your revert would hide the ticket entirely."
  1210. ```
  1211. 17 built-in domains (billing, auth, ordering, clinical, HR, and more). Custom domains per workspace on Enterprise. No hooks needed — works in any MCP client.
  1212. ### Time Travel
  1213. Roll back to any previous session state. Compare diffs between versions. Restore a known-good state with one click.
  1214. <p align="center">
  1215. <img src="docs/time-travel-timeline.jpg" alt="Time Travel — version timeline with diff view and one-click restore" width="500" />
  1216. </p>
  1217. ### Cognitive Routing
  1218. Three memory types, automatically sorted: **episodic** (what happened — session logs, decisions), **semantic** (what's true — facts, architecture), and **procedural** (how to do X — workflows, patterns). When you search, the router picks the right store instead of dumping everything.
  1219. ### Multi-Agent Hivemind
  1220. Coordinate multiple AI agents working on the same project. Each agent has its own session, but they share memory through the knowledge graph. The Hivemind Radar shows real-time agent status, tasks, and activity.
  1221. <p align="center">
  1222. <img src="docs/hivemind-radar.jpg" alt="Hivemind Radar — 5 agents with real-time status, tasks, and activity feed" width="500" />
  1223. </p>
  1224. ### Neural Search
  1225. Search across all memories with highlighted results, knowledge graph editing, and memory density metrics.
  1226. <p align="center">
  1227. <img src="docs/v6_cognitive_load_dashboard.jpg" alt="Neural Search with Knowledge Graph Editor and Memory Density" width="500" />
  1228. </p>
  1229. ---
  1230. ## Local-first and privacy
  1231. The free tier runs entirely on your machine. Paid tiers add cloud sync through the Synalux portal, which is what enables cross-device memory and team sharing.
  1232. | | Local tier (free) | Cloud tier (paid) |
  1233. |---|---|---|
  1234. | Memory storage | Local SQLite | Synalux portal (Supabase-backed) |
  1235. | Inference | Local Ollama models | Local models + Gemini 3.6 Flash fallback |
  1236. | API keys required | None | Synalux subscription key |
  1237. | Web search / scrape | Not included | Via Synalux portal (provider keys server-side) |
  1238. | What leaves your machine | Nothing | Memory text, file paths, search queries, and inference prompts/drafts when their cloud feature is used, sent to the portal over TLS. Cloud memory writes have personal identifiers redacted; inference and route requests are transient. |
  1239. | Works offline | ✅ | Local features yes; sync/cloud no |
  1240. **Handling sensitive data.** Cloud memory writes pass through automatic
  1241. redaction (SSNs, dates of birth, medical record numbers, phone numbers, emails,
  1242. and clinical identifiers are stripped before storage). Cloud inference and
  1243. route correction send the request over TLS for processing and do not store it
  1244. as Prism memory. The **local tier** (no Synalux key) is the air-gap;
  1245. `route_guard: "local"` only skips the route correction, and `cloud_fallback`
  1246. and `verify` govern the other two channels.
  1247. ---
  1248. ## Models
  1249. This section describes the default **Ollama fleet**. For explicit oMLX coding,
  1250. see [tested oMLX models and trade-offs](docs/omlx.md#tested-models-and-trade-offs).
  1251. The `prism-coder` fleet uses Qwen3.5 for MCP tool-routing AND general inference. The 9B and 27B are fine-tuned; the 2B and 4B use stock Qwen3.5-4B at different quantization levels. The 27B scored 100% on our internal 115-case tool-routing suite and 100% on an internal 15-problem coding eval, at $0 inference cost. These are self-run evaluations, not [BFCL](https://gorilla.cs.berkeley.edu/leaderboard.html) leaderboard submissions.
  1252. `prism_infer` supports three modes: `route` (tool routing, fast), `chat` (conversation) and `code` (code generation). Reasoning is decided by the **tier**, not the mode: a tier carrying `MODEL_TIERS.prefersThinking` also carries a `minLocalTokens` floor so reasoning cannot crowd out the answer, and only those tiers use `<think>` blocks (stripped before the response is served). The 9B does; the 4B and 2B do not, because on those tiers reasoning drew down the same `num_predict` budget the answer needed and returned an empty response. An explicit `think: true` still overrides, for a caller who has sized `max_tokens` for it. If the local model fails a quality gate (empty, think-only, or truncated), paid tiers automatically escalate to Gemini 3.6 Flash via the Synalux portal.
  1253. Every route-mode result is parsed locally and checked against `allowed_tools`
  1254. before it reaches the host. Malformed or unadvertised calls become `NO_TOOL`.
  1255. With `route_guard: "auto"` (the default), Standard and higher plans also send
  1256. a well-formed draft for one of Prism's seven trained tools—or an unadvertised
  1257. draft that may need correction—to Synalux for authenticated deterministic
  1258. correction. Advertised custom host tools remain local. `route_guard: "local"`
  1259. disables that correction only: cloud inference fallback is governed by
  1260. `cloud_fallback`, and the grounding verifier is a separate channel with its
  1261. own switch (`verify`, on by default when `evidence` is given). With all three
  1262. off, no request carries your prompt, draft or evidence; the entitlement check
  1263. and telemetry still contact the portal and carry neither.
  1264. | Model | Ollama tag | Size | Vision | Routing accuracy¹ | Role | Automatic routing tier |
  1265. |---|---|---|---|---|---|---|
  1266. | Qwen3.5-4B Q4_K_S | `prism-coder:2b` | 3.3 GB | ✅ | 100% | On-device / lowest RAM (4.5 GiB free) | Free |
  1267. | Qwen3.5-4B Q4_K_M | `prism-coder:4b` | 3.5 GB | ✅ | 100% | Verifier (5.2 GiB free) | Free |
  1268. | Qwen3.5-9B (LoRA) | `prism-coder:9b` | 6.7 GB | ✅ | 95.7%² | Default router / workhorse (9 GiB free) | Free |
  1269. | Qwen3.5-27B (LoRA) | `prism-coder:27b` | 16.8 GB | — | 100% | Complex code / quality (21 GiB free) | Free |
  1270. ¹ Self-run on a narrow 115-case MCP tool-selection suite, `temperature: 0`,
  1271. measured through the call path `prism_infer` actually uses (`/api/chat`, each
  1272. model's own template). It says these models pick the right tool on our own eval,
  1273. nothing more — not a general capability measure, and not an independent
  1274. benchmark result. Earlier revisions of this table quoted 99.1–100% from a
  1275. harness that hand-rolled a ChatML prompt with `raw: true`, bypassing the
  1276. template; those numbers described a path no caller exercises. Full methodology
  1277. caveats below.
  1278. ² The 9B is the one tier that reasons before answering, and it is measured with
  1279. reasoning enabled: 95.7% with thinking, 83.5% without. `prism_infer` sets this
  1280. per-tier (`MODEL_TIERS.prefersThinking`), so callers get the 95.7% path by
  1281. default. Reasoning costs roughly 600 tokens, which is why the 9B also carries a
  1282. 2,048-token local floor.
  1283. **Vision.** The 2B/4B/9B tags ship a separate `projector` layer (0.68–0.92 GB)
  1284. and read images; the 27B is text-only. `prism_infer` probes for that layer and
  1285. skips a tier with no vision rather than sending it an image — asked directly, a
  1286. text-only model will still answer confidently about pixels it never received.
  1287. Exercised against the real models in `tests/integration/visionScreenshot.test.ts`.
  1288. These tiers control automatic `prism_infer` selection, not Ollama itself. Any
  1289. user can run any downloaded on-device model directly through Ollama on every
  1290. plan.
  1291. Weights: [huggingface.co/dcostenco](https://huggingface.co/dcostenco) (public GGUF). Latency depends on model size and hardware — see [Benchmarks](#benchmarks) to measure it on your own machine rather than trusting a printed number.
  1292. ### Cascade
  1293. ```
  1294. query → prism-coder:9b (local router, default)
  1295. → prism-coder:4b (grounding verifier)
  1296. → prism-coder:2b (iPhone / mobile, auto-selected by RAM)
  1297. → prism-coder:27b (complex tasks, on demand)
  1298. → Gemini 3.6 Flash cloud fallback (paid tiers, for max quality)
  1299. ```
  1300. ### Multi-Layer Verification
  1301. Route output and evidence-grounded answers use separate gates. Every tier gets
  1302. the local route parser and advertised-tool registry; Standard and higher plans
  1303. can add the private deterministic route correction. Evidence verification is
  1304. opt-in (or automatic when evidence is supplied) and remains separate from route
  1305. selection.
  1306. | Layer | What | Model | Cost |
  1307. |---|---|---|---|
  1308. | **L1** | Crisis/medical safety rules and local classification | Backend-specific classifier (required 9B on oMLX) | Varies |
  1309. | **L3-Registry** | Envelope validation + advertised-tool enforcement (all tiers) | None | 0 ms |
  1310. | **L3-Route** | Authenticated deterministic route correction (Standard+) | None | Network latency |
  1311. | **L3-Tier0** | Integer grounding (set membership) | None (deterministic) | 0 ms |
  1312. | **L3-Tier2** | NLI verifier (claim → ENTAILED/NEUTRAL/CONTRADICTED) | prism-coder:2b | ~200 ms |
  1313. | **L4** | Hallucination judge (opt-out for clinical) | prism-coder:4b | ~500 ms |
  1314. Fail-closed on the verified path: when the grounding verifier runs, timeout,
  1315. ambiguity, or missing evidence yields a refusal, not pass-through. If the paid
  1316. route correction is unavailable, the local registry still blocks malformed
  1317. and unadvertised calls and reports an allowed preserved route as degraded.
  1318. ---
  1319. ## Benchmarks
  1320. Published benchmark numbers are concise summaries of internal deterministic
  1321. evaluation. Evaluators, exhaustive cases, exact tier-routing matrices, and raw
  1322. model outputs stay in the private engineering repository and are not included
  1323. in the npm package or public source tree.
  1324. **Routing evaluation.** On a narrow tool-selection suite, the fleet achieved
  1325. near-saturated results across three seeds. This measures offline MCP routing
  1326. reliability, not general model capability.
  1327. | Model | Routing accuracy | Notes |
  1328. |---|---|---|
  1329. | prism-coder:2b (Q4_K_S) | 100% | The 2B was requantised when vision shipped; the old 99.1% was Q3_K_M |
  1330. | prism-coder:4b | 100% | |
  1331. | prism-coder:9b | 95.7% with reasoning | 83.5% without — the only tier where this differs |
  1332. | prism-coder:27b | 100% | |
  1333. | Claude (frontier, same eval) | ~98% | Stronger everywhere outside this narrow task |
  1334. Measured through `/api/chat` with each model's own template — the path
  1335. `prism_infer` uses. `temperature: 0`, so the three seeds only reshuffle case
  1336. order and cannot disagree; earlier revisions cited that agreement as
  1337. confirmation, which it never was.
  1338. **Memory uplift (LoCoMo-Plus, self-published).** A separate long-context dialogue benchmark ([dcostenco/Locomo-Plus](https://github.com/dcostenco/Locomo-Plus)) measures how much structured memory helps a base model retain multi-day context. Results show large gains when a model is paired with Prism memory versus running raw. Note this benchmark is authored, run, and LLM-judged by this project — treat it as a reproducible demonstration, not an independent third-party result, and run it yourself with the commands in that repo.
  1339. **Code generation evaluation.** In a small July 2026 deterministic execution
  1340. check, the local 9B passed 2/3 tasks; the local 27B and Gemini 3.6 Flash each
  1341. passed 3/3. This is a self-published regression signal, not an independent
  1342. leaderboard or a claim of broad model equivalence.
  1343. For the separate October 2026 coding and advisory-review comparison, see
  1344. [oMLX and Strata results and limitations](docs/omlx.md#observed-coding-and-review-results).
  1345. ### Cloud Escalation (`cloud_fallback`)
  1346. For the default **Ollama backend**, Prism tries an eligible local model first.
  1347. If the quality gate detects an empty, truncated, think-only, or looping
  1348. response, or the safety screen
  1349. finds the request uncertain or reserved, a paid plan escalates the request
  1350. through Gemini 3.6 Flash. Free-tier routing stays local and reports the
  1351. outcome without making a cloud call.
  1352. The flag follows the plan. Leave it unset and your plan decides: paid plans
  1353. escalate, free plans never do. Pass `false` to forbid cloud inference fallback
  1354. for a call, which the clinical delegation rules do for drafting; pass `true`
  1355. to ask for it, which still requires a plan with cloud. A request that carries
  1356. an image is never escalated; screenshots stay on this device.
  1357. Explicit `local_backend: "omlx"` never falls back to cloud inference or Ollama,
  1358. regardless of plan or `cloud_fallback`. See [oMLX behavior](docs/omlx.md#runtime-behavior-and-failure-handling).
  1359. ---
  1360. ## Why Prism Coder
  1361. **Your local data stays on your device.** Memory, local models and the answer
  1362. check run on your machine, with no account. Data leaves it only when you turn
  1363. on a cloud feature, and then only what that feature needs; see
  1364. [Local-first and privacy](#local-first-and-privacy).
  1365. - **Free without an account**, with no cap on the local model size.
  1366. - **Memory and models in one MCP server:** persistent memory, a knowledge graph
  1367. and automatic routing to local Ollama models, with cloud answers only when
  1368. your plan and settings allow them.
  1369. - **Checked answers:** a multi-turn local answer is checked on your device
  1370. before it is served.
  1371. ### How it compares
  1372. Prices from each vendor's pricing page, checked on 2026-09-26. Plans change
  1373. often; follow the links for current terms. The table compares published plans
  1374. only; it is not a claim that a product lacks an unlisted feature.
  1375. | Product | What it is | Free | Individual | Team, per seat |
  1376. |---|---|---|---|---|
  1377. | **Prism Coder** | Local memory and model routing (MCP), optional cloud | Everything local, no account | Pro $15/mo | $20, 2-seat minimum |
  1378. | [GitHub Copilot](https://docs.github.com/en/copilot/get-started/plans) | Coding assistant | Limited | Pro $10, Pro+ $39, Max $100 | Business $19, Enterprise $39 |
  1379. | [Cursor](https://cursor.com/pricing) | AI code editor | Hobby, limited | Pro $20 | Teams $40 |
  1380. | [Windsurf](https://devin.ai/blog/windsurf-pricing-plans) | AI code editor | Free plan | Pro $20, Max $200 | Teams $40 |
  1381. | [Claude](https://claude.com/pricing) | Assistant; Claude Code from Pro | Free (no Claude Code) | Pro $20, Max from $100 | Team $25 ($20 billed annually) |
  1382. | [Amazon Q Developer](https://aws.amazon.com/q/developer/pricing/) | Coding assistant | 50 agentic requests a month | Pro $19 per user | -- |
  1383. | [Ollama](https://ollama.com/pricing) | Local model runtime, cloud models | Local models, starter cloud credits | Pro $20 ($60 of cloud credits), Max $100 | Team $500/mo, unlimited users |
  1384. | [Mem0](https://mem0.ai/pricing) | Memory API | 10,000 adds, 1,000 retrievals a month | Starter $19; graph memory from Pro $249 | -- |
  1385. | [Supermemory](https://supermemory.ai/pricing/) | Memory API | $5 of credits a month | Pro $19 (3 seats), Max $100 | -- |
  1386. | [Zep](https://www.getzep.com/pricing/) | Memory (knowledge graph) | 10,000 credits a month | Flex $125 | -- |
  1387. | [Pieces](https://pieces.app/pricing) | On-device developer memory | None (7-day trial) | Pro $18.99 | Enterprise $22.99 |
  1388. | [MemPalace](https://www.mempalace.net/) | Open-source local memory (MIT) | Free | -- | -- |
  1389. ---
  1390. ## Plans
  1391. Everything that runs on your machine is free, with no account and no cap on the local model. A free Synalux account adds what needs Synalux; Pro and Team add cloud features and higher limits.
  1392. | | **Free** (no account) | **Free account** | **Pro** $15/mo | **Team** $20/seat/mo |
  1393. |---|---|---|---|---|
  1394. | Local models via Ollama (automatic `prism_infer` routing) | up to 27b | up to 27b | up to 27b | up to 27b |
  1395. | Local memory, knowledge graph, dashboard, MCP tools | ✅ | ✅ | ✅ | ✅ |
  1396. | Multi-turn `prism_infer`, with the on-device answer check | -- | 12 turns / 32k chars | 12 turns / 32k chars | 20 turns / 64k chars |
  1397. | Cloud answers (Gemini 3.6 Flash; a free account's conversations: 3.5 Flash-Lite) | -- | 20/day | 1,000/month (500 in the trial; 200/day max) | 1,500/month per seat (200/day max) |
  1398. | Cloud confirmation of a local answer (on a pseudonymized copy) | -- | -- | ✅ | ✅ |
  1399. | Grounding verifier (fact-check AI output; counts as a cloud answer) | -- | -- | ✅ | ✅ |
  1400. | Cloud search | -- | -- | 1,000/month (150/day max) | 1,500/month per seat (150/day max) |
  1401. | Memory sync (cloud) | -- | -- | ✅ | ✅ |
  1402. | Full skill library, super-skills, agent routing, account and team skills | -- | -- | ✅ | ✅ |
  1403. | Seats | 1 | 1 | 1 | 2 or more |
  1404. Pro starts with a 14-day trial. No card is required to start; add payment
  1405. details before the trial ends to continue, or the subscription cancels
  1406. automatically and Prism Free remains available. View the exact deadline under
  1407. **⚙ Account & Settings → Account** in `prism dashboard`. A cloud confirmation
  1408. counts as one of the day's cloud answers. To start a Team plan:
  1409. [contact sales](https://synalux.ai/support).
  1410. ---
  1411. ## How agents use it
  1412. Prism exposes 40+ MCP tools. The core memory loop:
  1413. | Tool | What it does |
  1414. |---|---|
  1415. | `session_bootstrap` | Hook-free first-turn greeting and dashboard-configured context |
  1416. | `session_load_context` | Explicit project reload, recovery after a `context_not_loaded` save refusal, or older-server startup fallback |
  1417. | `session_save_ledger` | Append an immutable session log entry |
  1418. | `session_save_handoff` | Save live state for the next session |
  1419. | `knowledge_search` | Semantic + keyword search over all memories |
  1420. | `query_memory_natural` | Memory-first Q&A with a grounded live-source fallback on paid tiers |
  1421. | `session_detect_drift` | Detect when a session has drifted from its goal |
  1422. | `verify_behavior` | Pre-edit scenario challenge — catch bad changes before they happen |
  1423. | `knowledge_ingest` | Teach Prism a codebase or document |
  1424. | `prism_infer` | Local-first inference (route/chat/code modes, thinking, cloud escalation) |
  1425. | `inference_metrics` | Session delegation or persisted MCP + VS Code panel local/cloud stats |
  1426. | `local_savings` | Token volume local serving kept off your cloud model, all time / 30 days / session |
  1427. ### `query_memory_natural` — memory first, current sources when needed
  1428. Ask one natural-language question instead of choosing separate memory, search,
  1429. scrape, and inference tools. Prism searches its accumulated project memory
  1430. first. If no useful evidence exists, paid tiers run one bounded Synalux search
  1431. (Firecrawl, Gemini 3.6 Google Search grounding, then legacy Brave fallback),
  1432. resolve and preserve the source URLs, scrape the leading page, and ask a
  1433. RAM-safe local Prism Coder model to answer from that evidence. The paid-tier
  1434. Gemini 3.6 verifier checks the draft before it is served. Reserved or uncertain
  1435. clinical content never enters the web-grounded local path; it follows Prism's
  1436. cloud-or-refuse safety boundary.
  1437. ### `prism_infer` — local-first inference with cloud escalation
  1438. ```typescript
  1439. prism_infer({
  1440. prompt: "Write a binary search in Python",
  1441. mode: "code", // "route" | "chat" | "code"
  1442. think: true, // enable <think> reasoning (default: true for chat/code)
  1443. model_ceiling: "27b", // use the quality tier
  1444. })
  1445. // → 27B generates code locally ($0), with thinking for quality
  1446. // → If quality gate fails + paid tier → auto-escalate to Gemini 3.6 Flash
  1447. // Follow-ups carry the conversation (paid plans). The host curates the turns;
  1448. // Prism bounds them to your plan's caps (user+assistant text only), safety-
  1449. // screens every turn (each alone, then each in context; a short routine
  1450. // request skips its own model read), counts them against
  1451. // the tier's context, and never stores them. A free plan or a host with no
  1452. // portal is refused: multi_turn_not_in_plan.
  1453. prism_infer({
  1454. messages: [
  1455. { role: "user", content: "Write a binary search in Python" },
  1456. { role: "assistant", content: "<the accepted answer>" },
  1457. ],
  1458. prompt: "Now make it return the insertion point when the value is absent",
  1459. mode: "code",
  1460. })
  1461. ```
  1462. #### Multi-turn: why it matters, and why it is a paid feature
  1463. A single `prism_infer` call has no memory. The host asks a question, the local
  1464. model answers, and the next call starts from nothing: "now add a timeout to it"
  1465. means nothing to a model that never saw "it". Without history the host either
  1466. restates the whole context in every prompt (tokens, and the answer drifts) or
  1467. gives up on local delegation and does the follow-up itself in the cloud. With
  1468. `messages`, the host hands back the turns it accepted and the local model
  1469. continues the thread at $0, which is what makes local delegation useful for
  1470. real work instead of one-shot snippets.
  1471. It is paid because it cannot run without Synalux behind it:
  1472. - **The caps are served by the portal, per plan.** How many turns and how many
  1473. characters a conversation may carry is an entitlement your plan returns,
  1474. not a number the client decides. No portal, no policy, and the call is
  1475. refused as `multi_turn_not_in_plan`.
  1476. - **Ambiguous turns go to Synalux cloud.** Every turn is safety-screened on
  1477. device, alone and in context. A turn the screen finds uncertain is never
  1478. served by the local model; it goes to the cloud when the plan allows it,
  1479. and is refused otherwise. Free has no cloud, so the only honest answer for
  1480. free is no history at all.
  1481. - **Nothing is stored.** Prism bounds, screens, counts and forwards the turns
  1482. the host sends, and keeps none of them.
  1483. <details>
  1484. <summary>Without multi-turn (free plan, or no `messages`): every call starts cold</summary>
  1485. ```typescript
  1486. // Call 1
  1487. prism_infer({ prompt: "My project codename is Nightjar. Reply OK.", mode: "chat" })
  1488. // → "OK" (local model, $0)
  1489. // Call 2 — the model never saw call 1
  1490. prism_infer({ prompt: "What is my codename? One word.", mode: "chat" })
  1491. // → "I don't have that information." (local model, correct and useless)
  1492. // Call 3 — a coding follow-up with no thread
  1493. prism_infer({ prompt: "Now add a timeout parameter to it.", mode: "code" })
  1494. // → guesses what "it" is, or asks (the host has to redo the work)
  1495. // A free plan that sends messages anyway:
  1496. prism_infer({ messages: [/* … */], prompt: "…" })
  1497. // → refused: multi_turn_not_in_plan (no portal entitlement, no cloud)
  1498. ```
  1499. </details>
  1500. <details>
  1501. <summary>With multi-turn (paid plan): the thread continues locally, and the screen decides per turn</summary>
  1502. ```typescript
  1503. // The host keeps the turns it accepted and passes them back.
  1504. prism_infer({
  1505. messages: [
  1506. { role: "user", content: "My project codename is Nightjar. Reply OK." },
  1507. { role: "assistant", content: "OK" },
  1508. ],
  1509. prompt: "What is my codename? One word.",
  1510. mode: "chat",
  1511. })
  1512. // → "Nightjar" (local model, $0; history_turns: 2)
  1513. prism_infer({
  1514. messages: [
  1515. { role: "user", content: "We named the helper countActiveUsers(data). Confirm." },
  1516. { role: "assistant", content: "Confirmed." },
  1517. ],
  1518. prompt: "Write the one-line call that stores its result in n.",
  1519. mode: "code",
  1520. })
  1521. // → "n = countActiveUsers(data)" (local model, $0)
  1522. // A turn the on-device screen finds uncertain, alone or in context, is not
  1523. // served locally: it goes to Synalux cloud on a paid plan, or is refused with
  1524. // cloud_fallback: false. The result names the reason (layer1_uncertain) so
  1525. // the host can decide what to do with the thread.
  1526. prism_infer({
  1527. messages: [
  1528. { role: "user", content: "The ticket for this bug is SYN-4471. Acknowledge." },
  1529. { role: "assistant", content: "Acknowledged." },
  1530. ],
  1531. prompt: "Which ticket is this bug filed under?",
  1532. cloud_fallback: true,
  1533. })
  1534. // → "SYN-4471" (Gemini 3.6 Flash; used_cloud: true)
  1535. ```
  1536. Measured on 20.21.14 through the real handler, on the local 9b with cloud off:
  1537. - Every benign follow-up that reached the local 9b with its conversation
  1538. attached was answered correctly. Without the conversation, most answers were
  1539. invented.
  1540. - The on-device screen still refuses too many benign follow-ups: 11 of 26 in
  1541. our tests. Each refusal names its reason. Cutting these false refusals is
  1542. the current work.
  1543. - Every reserved multi-turn probe was refused before any generation (11 of 11).
  1544. </details>
  1545. | Mode | Think | Model | Use case |
  1546. |------|-------|-------|----------|
  1547. | `route` | Off (fast) — except a tier that reasons better, e.g. 9B | 9B default | MCP tool routing |
  1548. | `chat` | Per tier: on for 9B, off for 4B/2B | 27B preferred | Conversation, reasoning |
  1549. | `code` | Per tier: on for 9B, off for 4B/2B | 27B preferred | Code generation, debugging |
  1550. Think is a **tier** property, not a mode property. Tiers with
  1551. `prefersThinking` also declare a `minLocalTokens` floor that reserves budget for
  1552. the answer; tiers without it spend the whole `num_predict` allowance inside
  1553. `<think>` and return nothing. Pass `think` explicitly to override either way.
  1554. Full TypeScript signatures live in [`src/tools/`](src/tools/); architecture in [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
  1555. ### `inference_metrics` — see your local-model usage on demand
  1556. Call `inference_metrics` anytime mid-session to see how many `prism_infer` calls ran locally vs cloud. Use `period: "all"` to atomically import the Synalux VS Code panel spool and include its local-serve rate in the persisted totals:
  1557. ```
  1558. 📊 Inference Metrics — local-model delegation (this session):
  1559. Total calls: 5 — Local: 5 (100%) | Cloud: 0 (0%)
  1560. Tokens: 1,240 in + 380 out = 1,620 total
  1561. Avg latency: 420ms
  1562. By model:
  1563. prism-coder:27b: 3 calls, 1,100 tokens, avg 520ms
  1564. prism-coder:9b: 2 calls, 520 tokens, avg 270ms
  1565. ```
  1566. The same block also appears automatically in `session_save_ledger` and `session_save_handoff` responses at session end.
  1567. **Note:** The default session view tracks this MCP process's `prism_infer` delegation. The all-time view combines persisted MCP calls with Synalux VS Code panel inference. Neither view includes the host agent's own token spend; use that host's native usage reporting when available.
  1568. ### `local_savings` — what local serving actually displaced
  1569. `inference_metrics` reports raw counters. `local_savings` answers the question
  1570. behind them: how much work never reached your cloud model. Call the tool in any
  1571. host, or run `prism savings` from a terminal — `--period all|month|week|session`,
  1572. `--days N` for any custom trailing window (e.g. `--days 90` for a quarter), and
  1573. `--json` for machine-readable output:
  1574. ```
  1575. 💾 Local serving — LAST 30 DAYS (2026-08-02 → 2026-08-26)
  1576. ~510K tokens kept off your cloud model
  1577. 53 call(s) served locally of 58 routed (91%)
  1578. Breakdown: 461,400 prompt + 48,400 completion
  1579. By model:
  1580. prism-coder:9b: 41 call(s), ~505K tokens
  1581. prism-coder:4b: 12 call(s), ~4.8K tokens
  1582. Follow-ups with your conversation:
  1583. 12 answered locally (12 by the 9b) · 2 refused by the on-device screen · 0 sent to cloud
  1584. Refusals by stage: follow-up alone 1 · turns together 1
  1585. Counts tokens a local model handled instead of your cloud model. On the token
  1586. axis, the token count is measured — a floor, with known undercounts listed
  1587. when present. On the displacement axis, prism cannot observe the call your
  1588. host would have made, so whether all of it would have hit the cloud is an
  1589. assumption. Read it as: at most this much displacement, of at least this
  1590. token volume.
  1591. Caveats:
  1592. · 12 local call(s) hit the KV cache, so Ollama reported 0 prompt tokens for
  1593. context that was really submitted — prompt tokens are undercounted.
  1594. · 3 refused call(s) excluded — nothing was served, so nothing was displaced.
  1595. ```
  1596. **Why tokens and not money.** Prism reports token volume and never a dollar
  1597. figure, because it cannot honestly produce one: published rates change and a
  1598. bundled price table would be wrong on a timer; prism never observes which model
  1599. your host would have used, and that choice alone is a multiple-fold spread on
  1600. the same tokens; and most users are on flat plans where a currency figure means
  1601. nothing at all. Tokens are the one unit prism measured itself. If you know your
  1602. own effective rate, multiply — the split is printed for exactly that reason.
  1603. **Follow-ups.** Calls that carried your conversation (`messages`) get their
  1604. own line:
  1605. - how many the local model answered, and how many of those the 9b answered;
  1606. - how many the on-device screen refused, and at which stage (the follow-up read
  1607. alone, an earlier turn read alone, or the turns read together);

Lines 2,001–2,331 are not shown. The link to the file on GitHub has every line.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.