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
touching different categories now touch disjoint files, and the driver keeps
269
+
the residue (two PRs in the same category). Every gate reads the whole
270
+
directory as one set, so the ratchet semantics are unchanged — see
271
+
`packages/spec/scripts/lib/sharded-artifacts.ts`. Deliberately still single
272
+
files: `spec-changes.json` (keyed by version), `api-surface-signatures.json`
273
+
(1.3KB) and `authorable-surface.base.json` (written only by an explicit
274
+
`--update-base`, so never on the churn path).
275
+
260
276
The driver does **not** regenerate. Git runs merge drivers *while* it merges,
261
277
in index order, so the worktree still holds pre-merge sources — a generator
262
278
run there would describe a half-merged tree and write a confidently wrong
@@ -382,7 +398,7 @@ regenerate up front:
382
398
| The react-blocks contract |`check:react-blocks`|`gen:react-blocks`|
383
399
384
400
A `.describe()` string counts — it is not "just a comment", it lands in
385
-
`content/docs/references/`. Adding one export counts — it lands in `api-surface.json`.
401
+
`content/docs/references/`. Adding one export counts — it lands in `api-surface/`.
386
402
Both were learned the hard way in #4040: two separate red builds, neither a logic error.
387
403
388
404
Don't match by hand — one command runs **every** gate and reports **all** stale
@@ -420,7 +436,7 @@ inline when that gate is the one failing.)
420
436
pure checks with no generator — a failure there is a real finding to fix, not an artifact
421
437
to regenerate. `check:generated` names them as deliberately not run, so its "all up to
422
438
date" never reads as "everything passed". The last one asks the third question about the
423
-
export surface (#4446): `api-surface.json` shows a name on two entries but not whether
439
+
export surface (#4446): `api-surface/` shows a name on two entries but not whether
424
440
that is one declaration re-exported (fine) or two declarations sharing a name — the #4411
425
441
trap, judged by symbol identity against the built dist, with the accepted cases in the
426
442
shrink-only `dual-source-exports.baseline.json` (hand-edited under review, never
@@ -454,7 +470,7 @@ re-adding a skip.
454
470
455
471
`check:exported-any` is the one of those that also reads the built `dist/*.d.ts`, so the
456
472
stale-`dist` caveat above applies to it too. It asks the other half of the
457
-
`api-surface.json` question: that snapshot records an export *exists*, never what it
473
+
`api-surface/` question: that snapshot records an export *exists*, never what it
458
474
*resolves to*, which is how five exported symbols sat at `any` for a whole major with
459
475
every gate green (#4171). A recursive Zod schema needs an annotation to break its
460
476
circular inference, and `z.ZodType<any>` compiles, validates correctly, and silently
@@ -732,7 +748,7 @@ it to `OPEN_CAPABILITY_REGISTRIES` in the same PR that fixes it.
732
748
working tree.
733
749
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.
734
750
**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 so the rejection itself carries the prescription — `retiredKey()` (`packages/spec/src/shared/retired-key.ts`) on a non-strict schema, or an entry in the relevant `UNKNOWN_KEY_GUIDANCE` / `*_RETIRED_KEY_GUIDANCE` map (see `object.zod.ts`, `ai/tool.zod.ts`) when the schema is `.strict()`. The changeset is one of fourteen surfaces a retirement touches — follow the `spec-property-retirement` skill (`.claude/skills/`) rather than reconstructing the kit, and note the two routes imply **opposite** liveness-ledger dispositions.
735
-
4.**Added or removed a `packages/spec` export? Run `pnpm --filter @objectstack/spec gen:api-surface` and commit the result.** The `TypeScript Type Check` job diffs spec's built export surface against `api-surface.json`; a new export makes the snapshot stale and turns the job red. It reads the **built `dist` declarations**, so `OS_SKIP_DTS=1` — the flag you reach for to make local builds fast — skips exactly the artifact the gate inspects, and the check passes locally while failing in CI. Same shape for the other generated-artifact gates in that job (`check:docs`, `check:skill-refs`, `check:react-blocks`), which read `src/` and so do reproduce locally.
751
+
4.**Added or removed a `packages/spec` export? Run `pnpm --filter @objectstack/spec gen:api-surface` and commit the result.** The `TypeScript Type Check` job diffs spec's built export surface against `api-surface/` (one shard per entry point since #5837); a new export makes the snapshot stale and turns the job red. It reads the **built `dist` declarations**, so `OS_SKIP_DTS=1` — the flag you reach for to make local builds fast — skips exactly the artifact the gate inspects, and the check passes locally while failing in CI. Same shape for the other generated-artifact gates in that job (`check:docs`, `check:skill-refs`, `check:react-blocks`), which read `src/` and so do reproduce locally.
736
752
5. Update `CHANGELOG.md` / `ROADMAP.md` if user-facing or architectural.
737
753
6.**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