Skip to content

Commit b166af8

Browse files
jonathanMLDevzho
andauthored
added deprecation-policy.md and updated related documents (#122)
Co-authored-by: zho <jornathanm910923@gmail.com>
1 parent 6a07fd8 commit b166af8

8 files changed

Lines changed: 187 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Tagged releases are published to npm from GitHub Actions when a **GitHub Release
88

99
## [Unreleased]
1010

11+
### Added
12+
13+
- Formal deprecation policy ([docs/deprecation-policy.md](docs/deprecation-policy.md)) and breaking-change release notes template ([docs/templates/breaking-change-release-notes.md](docs/templates/breaking-change-release-notes.md)).
14+
1115
## [0.2.0] - 2026-05-29
1216

1317
### Changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ A Model Context Protocol (MCP) server that provides semantic search over Pinecon
1313

1414
Version **0.2.0** includes breaking MCP and type changes. See [docs/MIGRATION.md](docs/MIGRATION.md) for before/after examples and the [CHANGELOG](CHANGELOG.md#020---2026-05-29) **Changed** section for the full list.
1515

16+
## Release policy
17+
18+
While the package is **`0.y.z`**, minor releases may include breaking changes ([semver §4](https://semver.org/spec/v2.0.0.html#spec-item-4)) — pin an exact npm version for reproducible MCP and library use. Deprecated APIs stay available for at least **two minor releases** before removal; breaking releases ship with CHANGELOG entries, [MIGRATION.md](docs/MIGRATION.md) steps, and (for publishes) structured GitHub Release notes. Full rules: [docs/deprecation-policy.md](docs/deprecation-policy.md).
19+
1620
## Documentation
1721

1822
| Doc | Description |
@@ -22,6 +26,7 @@ Version **0.2.0** includes breaking MCP and type changes. See [docs/MIGRATION.md
2226
| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Env vars, CLI flags, library config |
2327
| [docs/FAQ.md](docs/FAQ.md) | Common questions |
2428
| [docs/MIGRATION.md](docs/MIGRATION.md) | Deprecations & breaking changes |
29+
| [docs/deprecation-policy.md](docs/deprecation-policy.md) | Release & deprecation policy |
2530
| [docs/CI_CD.md](docs/CI_CD.md) | GitHub Actions, SBOM, Docker, releases |
2631
| [docs/RELEASING.md](docs/RELEASING.md) | npm publish via GitHub Releases |
2732
| [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) | How to contribute |

docs/CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ npm ci
4141
- Keep changes focused; update `CHANGELOG.md` `[Unreleased]` for user-visible behavior.
4242
- Documentation changes should keep [README](../README.md) links; run `npm run docs:link-check` locally if you touch many relative links.
4343

44+
### Deprecations and breaking changes
45+
46+
Follow [deprecation-policy.md](./deprecation-policy.md). In summary:
47+
48+
- **Deprecating** an API: add `### Deprecated` in CHANGELOG with a removal target (minimum two minor releases), update [MIGRATION.md](./MIGRATION.md), and use `@deprecated` in types when applicable.
49+
- **Breaking** a release (especially while `0.y.z`): use labeled bullets — `**Breaking (MCP):**`, `**Breaking (types):**`, etc. — each with what changed, who is affected, and a link to a MIGRATION anchor.
50+
- **Removing** deprecated APIs: add `### Removed` only after the deprecation window; keep migration text in MIGRATION.md.
51+
4452
## Documentation
4553

4654
Authoritative reference lives under [`docs/`](./README.md). When adding tools or config knobs, update `docs/TOOLS.md` and `docs/CONFIGURATION.md` in the same PR when possible.

docs/MIGRATION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Migration guide
22

3+
Deprecation timelines and maintainer obligations are defined in [deprecation-policy.md](./deprecation-policy.md).
4+
35
This guide is for **library and MCP client authors** upgrading from earlier **0.1.x** lines. The **[0.2.0]** section of [`CHANGELOG.md`](../CHANGELOG.md) is the authoritative list of changes; this document shows **how** to migrate.
46

57
Under [semver 0.y.z](https://semver.org/spec/v2.0.0.html#spec-item-4), **0.1.x → 0.2.0 is a breaking minor** — pin `@0.2.0` only after reading this guide.

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Guides for operators, MCP client authors, and library embedders.
1111
| [CI_CD.md](./CI_CD.md) | GitHub Actions, CodeQL, SBOM, Codecov, releases |
1212
| [FAQ.md](./FAQ.md) | Common questions |
1313
| [MIGRATION.md](./MIGRATION.md) | Breaking changes and upgrade paths |
14+
| [deprecation-policy.md](./deprecation-policy.md) | Deprecation window, semver, CHANGELOG conventions |
15+
| [templates/breaking-change-release-notes.md](./templates/breaking-change-release-notes.md) | GitHub Release body template for breaking versions |
1416
| [RELEASING.md](./RELEASING.md) | npm publish via GitHub Releases |
1517

1618
The main [README.md](../README.md) remains the high-level overview; deep reference lives here.

docs/RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Packages are published to npm as **`@will-cppa/pinecone-read-only-mcp`**.
55
## Mechanism
66

77
1. Merge changes to `main` with an updated [`CHANGELOG.md`](../CHANGELOG.md).
8-
2. Create a **GitHub Release** (publish event) with a version tag aligned with semver.
8+
2. Create a **GitHub Release** (publish event) with a version tag aligned with semver. When the release includes breaking changes, use the body from [templates/breaking-change-release-notes.md](./templates/breaking-change-release-notes.md) and follow [deprecation-policy.md](./deprecation-policy.md).
99
3. The [Publish workflow](../.github/workflows/publish.yml) runs the full CI suite (`workflow_call` to `ci.yml`), then executes `npm publish --provenance --access public` on Ubuntu with `NODE_AUTH_TOKEN`.
1010

1111
## Requirements

docs/deprecation-policy.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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 |
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Breaking-change release notes (template)
2+
3+
Copy the section below into the **GitHub Release** description when a version includes breaking changes. Replace placeholders in `ALL_CAPS` or angle brackets.
4+
5+
---
6+
7+
## `vX.Y.Z` — Breaking changes
8+
9+
**Summary:** One or two sentences describing why this release matters and the main upgrade action (for example “MCP tool errors now use `ToolError`; update clients that parsed `{ status: 'error' }`.”).
10+
11+
### What changed
12+
13+
| Change | Affected consumers | Action |
14+
| ------ | ------------------ | ------ |
15+
| _Short title_ | MCP clients / library embedders / operators | _Concrete step (pin version, update schema, set env var)_ |
16+
||||
17+
18+
### Upgrade checklist
19+
20+
- [ ] Pin `@will-cppa/pinecone-read-only-mcp@X.Y.Z` in `package.json`, MCP config, and Docker image tags (avoid floating `latest` until validated).
21+
- [ ] Read [CHANGELOG.md](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/blob/vX.Y.Z/CHANGELOG.md#xyz---YYYY-MM-DD) for the full list.
22+
- [ ] Follow [docs/MIGRATION.md](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/blob/vX.Y.Z/docs/MIGRATION.md) for before/after examples.
23+
- [ ] Review [docs/deprecation-policy.md](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/blob/vX.Y.Z/docs/deprecation-policy.md) for ongoing deprecations.
24+
- [ ] Run your integration tests against the new version.
25+
26+
### npm
27+
28+
- Package: `@will-cppa/pinecone-read-only-mcp`
29+
- Version: `X.Y.Z`
30+
- Install: `npm install @will-cppa/pinecone-read-only-mcp@X.Y.Z`
31+
32+
If you rely on reproducible builds, pin the exact version rather than a range until you have verified compatibility.
33+
34+
### Links
35+
36+
- [CHANGELOG — vX.Y.Z](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/releases/tag/vX.Y.Z)
37+
- [MIGRATION.md](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/blob/vX.Y.Z/docs/MIGRATION.md)
38+
- [Deprecation policy](https://github.com/cppalliance/pinecone-read-only-mcp-typescript/blob/vX.Y.Z/docs/deprecation-policy.md)
39+
40+
---
41+
42+
**Maintainers:** delete this heading and the instructions above when publishing; keep only the release body. See [RELEASING.md](../RELEASING.md).

0 commit comments

Comments
 (0)