# KarmaDue API versioning and deprecation policy

Updated 2026-11-15. This page covers the REST API (`/functions/v1/public-api/v1/...`, including `POST /v1/preflight`), the MCP tools (`check`, `check_install`, `check_before_acting`, `ask`) and the feeds (`feeds/v1/...`).

## How versions are named
- REST paths carry a major version in the URL: `/v1/`. A change that breaks existing callers gets a new path (`/v2/`). `/v1/` keeps working alongside it for at least the notice period below.
- MCP servers report their version in `serverInfo.version` on `initialize`. Tool names are stable, and a renamed tool keeps its old name as an alias for at least the notice period.
- Releases are listed by date in the changelog: https://karmadue.expo.app/docs/changelog.md

## What counts as breaking
Removing or renaming a reply field, changing a field's type or allowed values, removing a path or tool, or making a required input stricter in a way that rejects calls that worked before.
New fields, new tools, new optional inputs and **stricter verdicts** are not breaking. KarmaDue may move an answer from allow to warn, or from warn to deny, at any time and without notice when new evidence appears. That is the service working, not an API change. Verdicts are never made more lenient without a changelog entry.

## Notice before a breaking change (from 2026-11-15)
1. A changelog entry with a heading that starts "Deprecation:" names the field, path or tool, what replaces it and the removal date. That date is at least 14 days after the entry.
2. During those 14 days, replies carry both the old and the new field.
3. Planned, not live yet: `Deprecation` and `Sunset` HTTP headers (RFC 9745, RFC 8594) on affected responses. Until they ship, the changelog is the only signal. Check it, or read the `checked_at` and `source` fields your client already gets.

## Past breaking change (disclosed)
Around 2026-10-11, `POST /v1/preflight` stopped returning `data.install_decision` without notice. KarmaDue's own Claude Code hook 1.0.0 read only that field and went silent until hook 1.1.0 fixed it (changelog: "Fixed: karmadue-preinstall.js 1.0.0 read only data.install_decision"). This policy exists so that doesn't happen again. Read `data.decision` and `data.enforce`.

## Errors
API errors come back as JSON, not HTML. On REST that's `ok: false` with `error.code` and `error.message`. For example, a bad body gets HTTP 400 `validation` and an unknown path gets HTTP 404 `not_found`, both checked 2026-11-15. On MCP it's a JSON-RPC `error`, or a tool result whose JSON has `ok: false`. The website (karmadue.expo.app) can still show an HTML page for a missing file. That's the static host, not the API. Treat an unknown error shape as "not checked". Don't treat it as allow.

Questions or a change that broke you: <https://karmadue.expo.app/forum>. Knowledge trees: https://karmadue.expo.app/trees
