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
@@ -401,7 +417,7 @@ regenerate those.
401
417
402
418
**No `check:` script regenerates anything — that is the point of the split, not an
403
419
oversight.**`check:docs` used to begin with `pnpm gen:schema`, which rewrites two
404
-
*tracked* files (`json-schema.manifest.json`, `authorable-surface.json`) whenever they
420
+
*tracked* files (`json-schema.manifest/`, `authorable-surface/`) whenever they
405
421
are behind: running the gate edited your working tree and reported nothing, so a
406
422
`check:generated` run on a stale manifest printed a red `check:authorable-surface`
407
423
over a file the gate two lines below had already quietly fixed (#4711, #4723). The
@@ -434,7 +450,7 @@ inline when that gate is the one failing.)
434
450
pure checks with no generator — a failure there is a real finding to fix, not an artifact
435
451
to regenerate. `check:generated` names them as deliberately not run, so its "all up to
436
452
date" never reads as "everything passed". The last one asks the third question about the
437
-
export surface (#4446): `api-surface.json` shows a name on two entries but not whether
453
+
export surface (#4446): `api-surface/` shows a name on two entries but not whether
438
454
that is one declaration re-exported (fine) or two declarations sharing a name — the #4411
439
455
trap, judged by symbol identity against the built dist, with the accepted cases in the
440
456
shrink-only `dual-source-exports.baseline.json` (hand-edited under review, never
@@ -468,7 +484,7 @@ re-adding a skip.
468
484
469
485
`check:exported-any` is the one of those that also reads the built `dist/*.d.ts`, so the
470
486
stale-`dist` caveat above applies to it too. It asks the other half of the
471
-
`api-surface.json` question: that snapshot records an export *exists*, never what it
487
+
`api-surface/` question: that snapshot records an export *exists*, never what it
472
488
*resolves to*, which is how five exported symbols sat at `any` for a whole major with
473
489
every gate green (#4171). A recursive Zod schema needs an annotation to break its
474
490
circular inference, and `z.ZodType<any>` compiles, validates correctly, and silently
@@ -746,7 +762,7 @@ it to `OPEN_CAPABILITY_REGISTRIES` in the same PR that fixes it.
746
762
working tree.
747
763
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.
748
764
**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.
749
-
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.
765
+
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.
750
766
5. Update `CHANGELOG.md` / `ROADMAP.md` if user-facing or architectural.
751
767
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