# Versions and stability

What Hatch promises to people who build on it, and what it doesn't. The npm packages, the vault format, the server's HTTP API and the plugin API are covered here. Everything else in this repo is internal and can change in any commit.

## What counts as public

- **The npm packages** (`@hatchmd/*`): what each package's `exports` field lists, and the types those entries declare. Deep imports into a package's files are not public. Each package's `api.md` lists exactly this, written by `npx tsx scripts/api-report.ts`; the pre-push check fails when a package's API changes and its `api.md` doesn't, so every API change shows up in review.
- **The vault format**: notes as Markdown, and the files under `.hatch/` that Hatch reads (site settings, components, plugins, the move log). Other tools, agents and Obsidian read these files too, so they change most carefully of all.
- **The HTTP API**: the routes in `apps/server/openapi.json`, with their error bodies (`code`, `retryable`, `requestId`).
- **The plugin API**: the types in `packages/plugin-api/src/types.ts`.
- **shadcn items** are copied into your project, so once installed they're yours. A new version of an item only reaches you when you add it again.

## Versions

Every package is released at the same version (`scripts/publish.json`), and Hatch's packages depend on each other at exactly that version.

While Hatch is below 1.0:

- A **patch** (0.1.0 to 0.1.1) fixes bugs and never breaks public API.
- A **minor** (0.1.x to 0.2.0) may break public API. Every break is listed under "Breaking" in [changelog.md](https://hatch-docs.pages.dev/building-on-hatch/changelog/), with what to change.

From 1.0, breaking changes wait for a major version.

## Deprecation

A public export isn't removed without warning. It's marked `@deprecated` in its JSDoc, naming what to use instead, and keeps working for at least one minor release before it goes. The changelog lists it under "Deprecated" when it's marked and under "Breaking" when it's removed. The only exception is a security fix that can't wait, which the changelog says plainly.

## Experimental

An export marked `@experimental` in its JSDoc can change or go in any release, patches included. Use it to try things, and pin the exact version if you depend on it.

## Stored formats

A change to anything Hatch stores (notes, `.hatch/` files, the server's database) ships with the code that reads the old form, or with a migration that runs by itself. Hatch never rewrites a note it didn't change.

## Security fixes

While Hatch is below 1.0, security fixes go into the latest release only. Report a problem through GitHub's private vulnerability reporting (see `.github/SECURITY.md`).
