|
| 1 | +# Deprecation policy |
| 2 | + |
| 3 | +This document defines how **`@will-cppa/pinecone-read-only-mcp`** deprecates and removes public APIs. It applies to: |
| 4 | + |
| 5 | +- npm package exports (`@will-cppa/pinecone-read-only-mcp` core and `/alliance`) |
| 6 | +- MCP tool input/output schemas and registered tool names |
| 7 | +- TypeScript types and functions published from `package.json` `exports` |
| 8 | + |
| 9 | +For step-by-step upgrades, see [MIGRATION.md](./MIGRATION.md). For publish mechanics, see [RELEASING.md](./RELEASING.md). |
| 10 | + |
| 11 | +## Semantic versioning while `0.y.z` |
| 12 | + |
| 13 | +This package currently ships as **`0.y.z`**. Under [Semantic Versioning §4](https://semver.org/spec/v2.0.0.html#spec-item-4), **minor releases may include breaking changes** until the first `1.0.0` release. Consumers should **pin an exact version** (for example `@will-cppa/pinecone-read-only-mcp@0.2.0`) in `package.json`, MCP server config, and Docker tags. |
| 14 | + |
| 15 | +After **`1.0.0`**, this project intends to follow standard semver: breaking changes land only in **major** releases, and the deprecation window below becomes **binding** for removals that were previously announced as deprecated. |
| 16 | + |
| 17 | +## Deprecation window |
| 18 | + |
| 19 | +When we deprecate a public surface (field, type, tool name, export, or behavior): |
| 20 | + |
| 21 | +| Phase | When | Requirement | |
| 22 | +| ----- | ---- | ------------- | |
| 23 | +| **Deprecated** | Minor release `0.N.0` (or patch if only docs/warnings) | Listed under `### Deprecated` in [CHANGELOG.md](../CHANGELOG.md) with a **removal target** (minimum next minor + one more minor, i.e. at least **two minor releases** later). | |
| 24 | +| **Supported** | Entire window | Replacement API available; [MIGRATION.md](./MIGRATION.md) documents before/after. | |
| 25 | +| **Removed** | No earlier than `0.(N+2).0` | Listed under `### Removed`; migration section retained in MIGRATION.md for one further release when practical. | |
| 26 | + |
| 27 | +**Example:** deprecated in `0.2.x` → earliest removal in `0.4.0`. |
| 28 | + |
| 29 | +Renames may ship the **replacement immediately** alongside the deprecated alias (for example `document_id` with `paper_number` still present). Consumers should migrate to the replacement during the window. |
| 30 | + |
| 31 | +### Grandfathered deprecations |
| 32 | + |
| 33 | +APIs deprecated **before** this policy was published follow the removal target recorded in CHANGELOG and source comments at deprecation time. The `paper_number` field on query result rows (use `document_id` instead) was deprecated in **0.2.0** with removal planned no earlier than the **next major** release after `1.0.0`; it will not be removed in a `0.y` minor without an explicit CHANGELOG entry and MIGRATION update. |
| 34 | + |
| 35 | +## How we deprecate (maintainer checklist) |
| 36 | + |
| 37 | +For each deprecated public surface: |
| 38 | + |
| 39 | +1. **CHANGELOG** — Add under `[Unreleased]` → `### Deprecated` with removal target version and link to MIGRATION. |
| 40 | +2. **MIGRATION.md** — Add a section with rationale, before/after examples, and anchor-friendly heading. |
| 41 | +3. **Types** — Add JSDoc `@deprecated` on exported TypeScript symbols where applicable. |
| 42 | +4. **Runtime (optional)** — For MCP-visible response fields, emit at most **one `WARN` log per process** per deprecation (see existing `paper_number` pattern in `format-query-result.ts`). |
| 43 | +5. **Alliance vs core** — State which layer (`core` or `alliance`) owns the surface when only one changes. |
| 44 | + |
| 45 | +Do **not** remove a deprecated surface without completing items 1–2 and without waiting for the deprecation window (unless semver allows an immediate breaking minor while `0.y.z` — see below). |
| 46 | + |
| 47 | +## Migration support commitment |
| 48 | + |
| 49 | +For every deprecated public API we commit to: |
| 50 | + |
| 51 | +- **Documented migration** in [MIGRATION.md](./MIGRATION.md) for at least the full deprecation window. |
| 52 | +- **No silent removal** — removal appears in CHANGELOG `### Removed` and references the MIGRATION anchor. |
| 53 | +- **Clear ownership** — note when a change affects only Alliance presets, only core, or both. |
| 54 | + |
| 55 | +Breaking changes that ship **without** a prior deprecation period (allowed while `0.y.z` for minors, or for security fixes) still require a MIGRATION section and, when user-visible, [breaking-change release notes](./templates/breaking-change-release-notes.md). |
| 56 | + |
| 57 | +## Breaking changes without prior deprecation |
| 58 | + |
| 59 | +While **`0.y.z`**, a minor release **may** ship breaking changes without a prior deprecation cycle (as in **0.2.0**). Such releases must still include: |
| 60 | + |
| 61 | +- CHANGELOG entries using **`Breaking (MCP):`**, **`Breaking (types):`**, **`Breaking (runtime / tooling):`**, or similar categories (see [CHANGELOG format](#changelog-format-for-breaking-changes)). |
| 62 | +- [MIGRATION.md](./MIGRATION.md) upgrade steps. |
| 63 | +- GitHub Release notes from the [breaking-change template](./templates/breaking-change-release-notes.md) when the release is published. |
| 64 | + |
| 65 | +Security fixes may break behavior when required; document impact in CHANGELOG and MIGRATION. |
| 66 | + |
| 67 | +## Future instance APIs (`ServerContext`) |
| 68 | + |
| 69 | +A planned refactor introduces **`ServerContext`** and **`createServer(config)`** while keeping legacy module-level getters during a transition. That work will: |
| 70 | + |
| 71 | +- Add new instance APIs without removing legacy getters in the same release. |
| 72 | +- Document legacy getters under `### Deprecated` with a named removal target per this policy. |
| 73 | +- Link migration steps from [MIGRATION.md](./MIGRATION.md) to this document. |
| 74 | + |
| 75 | +Until that migration guide is published, treat this section as the policy constraint for that refactor. |
| 76 | + |
| 77 | +## CHANGELOG format for breaking changes |
| 78 | + |
| 79 | +This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each version block should use the sections that apply: `### Added`, `### Changed`, `### Deprecated`, `### Removed`, `### Fixed`. |
| 80 | + |
| 81 | +### Breaking entries |
| 82 | + |
| 83 | +Group breaking items under `### Changed` (or a dedicated breaking subsection) using category labels: |
| 84 | + |
| 85 | +```markdown |
| 86 | +### Changed |
| 87 | + |
| 88 | +- **Breaking (MCP):** … |
| 89 | +- **Breaking (types):** … |
| 90 | +- **Breaking (runtime / tooling):** … |
| 91 | +``` |
| 92 | + |
| 93 | +Each breaking bullet should state: |
| 94 | + |
| 95 | +- **What changed** — concrete behavior or schema difference. |
| 96 | +- **Who is affected** — MCP clients, library embedders, operators, etc. |
| 97 | +- **Migration** — link to [MIGRATION.md](./MIGRATION.md#anchor) (or “see MIGRATION.md § …”). |
| 98 | + |
| 99 | +### Deprecated entries |
| 100 | + |
| 101 | +```markdown |
| 102 | +### Deprecated |
| 103 | + |
| 104 | +- `old_name` on … — use `new_name` instead; removal targeted in **0.4.0** (deprecated **0.2.0**). See [MIGRATION.md](./MIGRATION.md#anchor). |
| 105 | +``` |
| 106 | + |
| 107 | +Contributors: see [CONTRIBUTING.md](./CONTRIBUTING.md) for PR expectations. |
| 108 | + |
| 109 | +## Release hygiene |
| 110 | + |
| 111 | +- **`package.json` `version`** is the single source of truth for the published npm version. |
| 112 | +- **`SERVER_VERSION`** (MCP `serverInfo.version`) is read from `package.json` at runtime and must stay aligned (see [RELEASING.md](./RELEASING.md)). |
| 113 | +- Breaking GitHub Releases should use [docs/templates/breaking-change-release-notes.md](./templates/breaking-change-release-notes.md). |
| 114 | + |
| 115 | +## Related documentation |
| 116 | + |
| 117 | +| Document | Role | |
| 118 | +| -------- | ---- | |
| 119 | +| [MIGRATION.md](./MIGRATION.md) | Per-version upgrade how-to | |
| 120 | +| [CHANGELOG.md](../CHANGELOG.md) | Authoritative change list | |
| 121 | +| [CONTRIBUTING.md](./CONTRIBUTING.md) | PR and CHANGELOG expectations | |
| 122 | +| [RELEASING.md](./RELEASING.md) | npm publish via GitHub Releases | |
| 123 | +| [templates/breaking-change-release-notes.md](./templates/breaking-change-release-notes.md) | GitHub Release body template | |
0 commit comments