You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec): retired-key tombstones + ship CHANGELOG in the npm artifact (#2543)
An agent upgrading a downstream app meets exactly one guaranteed channel:
the create() rejection. Today it dead-ends ('not assignable to never' /
bare unknown-key); the docs site is off-artifact and version-skewed, and
the changesets' migration notes never left the monorepo (CHANGELOG.md was
not in the files allowlist — verified absent from a real consumer's
node_modules).
- UNKNOWN_KEY_GUIDANCE tombstones for compactLayout / detail / views /
defaultDetailForm: each rejection names the replacement + version +
decision. Entries age out ~two majors after removal.
- CHANGELOG.md added to the files allowlist (216KB, grep-target).
- llms.txt: 'Upgrading Across Spec Versions' — tombstone first, then grep
the shipped CHANGELOG; never re-add keys or downgrade to pass.
- AGENTS.md: breaking changesets must carry FROM→TO migration notes, and
removing an authorable key requires a tombstone.
spec object tests 75/75 green (3 new tombstone assertions);
npm pack --dry-run confirms CHANGELOG.md ships.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Upgrade path for retired spec keys — the error IS the guide:
6
+
7
+
-**Tombstone entries** in `UNKNOWN_KEY_GUIDANCE`: `create()` rejecting a retired key (`compactLayout`, the `detail` block, object-level `views`, `defaultDetailForm`) now names the replacement, the version/decision that removed it, and the one-line fix — instead of a bare unknown-key error. Tombstones age out ~two majors after the removal.
8
+
-**`CHANGELOG.md` now ships inside the npm package** (`files` allowlist): every breaking entry's migration notes travel with the exact version installed, greppable offline from `node_modules/@objectstack/spec/CHANGELOG.md`.
9
+
-**`llms.txt` gains an "Upgrading Across Spec Versions" section** teaching agents the two-step protocol: read the tombstone, then grep the shipped CHANGELOG — and never to re-add rejected keys or downgrade to silence errors.
Copy file name to clipboardExpand all lines: AGENTS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,7 @@ export default {
261
261
never `gh pr merge --auto`). A finished task = a merged PR, not a dirty
262
262
working tree.
263
263
3.**Add a changeset for feature work.** When the change is a feature or functional improvement, run `pnpm changeset` (or add a `.changeset/*.md` entry) describing it before committing. Pure bug fixes do **not** require a changeset.
264
+
**Breaking changesets must carry their migration.** If the change removes or renames anything an author can write (a spec key, an export, a config field), the changeset body must state the FROM → TO mapping and the one-line fix — this text ships to consumers as `CHANGELOG.md` inside the npm package and is what an upgrading agent greps after the tombstone error. Removing an authorable spec key also requires a tombstone entry in the relevant `UNKNOWN_KEY_GUIDANCE` map (see `object.zod.ts`) so the rejection itself carries the prescription.
264
265
4. Update `CHANGELOG.md` / `ROADMAP.md` if user-facing or architectural.
265
266
5.**Delete temporary artifacts** — screenshots, traces, scratch logs, `.playwright-mcp/`, throwaway `tmp*.ts`, ad-hoc scripts. Repo must look identical to before, minus intended changes.
0 commit comments