Skip to content

docs(agents): list which spec artifact each CI gate guards, and how to regenerate it - #4046

Merged
os-zhuang merged 2 commits into
mainfrom
claude/console-screen-flow-submit-jfpjy4
Jul 30, 2026
Merged

docs(agents): list which spec artifact each CI gate guards, and how to regenerate it#4046
os-zhuang merged 2 commits into
mainfrom
claude/console-screen-flow-submit-jfpjy4

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Follow-up to #4040 — the DX gap that PR hit twice. Docs only, no code.

Why

packages/spec has eight checked-in generated artifacts, each with its own CI gate, split across two jobs (TypeScript Type Check in lint.yml, Check Generated Artifacts in ci.yml). Each job runs its gates sequentially, so the first stale artifact masks every one behind it — you get one red build per artifact, not one for all of them.

AGENTS.md documents the auto-gen boundary ("never hand-edit content/docs/references/") but never maps a change to the generator it invalidates. So the mapping gets rediscovered from red CI.

#4040 paid it twice, neither time a logic error:

  1. Correcting a .describe() string → stale content/docs/references/automation/node-executor.mdxcheck:docs red.
  2. Fixed that, pushed → now check:api-surface red, because five new exports weren't in api-surface.json. Invisible until the first was fixed.

A .describe() reads like a comment and lands in published docs; adding one export lands in a snapshot. Neither is obvious from the diff.

What this adds

A change → gate → regenerate table:

You changed Gate that fails Regenerate with
A .describe() / TSDoc on any schema check:docs gen:schema && gen:docs
A public export (added / removed / renamed) check:api-surface gen:api-surface
An authorable key on a metadata schema check:authorable-surface gen:schema
An ADR-0087 conversion / migration registry check:spec-changes, check:upgrade-guide gen:spec-changes, gen:upgrade-guide
A SKILL.md check:skill-docs, check:skill-refs gen:skill-docs, gen:skill-refs
The react-blocks contract check:react-blocks gen:react-blocks

Plus a copy-pasteable loop that runs all eight, so the tooling says which artifact is stale instead of CI saying it one push at a time.

It also records that check:liveness, check:empty-state, check:skill-examples and check:react-conformance have no generator — a failure there is a real finding to fix, not an artifact to regenerate. Worth stating, because the reflex after reading the table would be to look for a gen: counterpart that doesn't exist.

A trap found while verifying this section

Running the loop on a clean checkout of merged main reported:

@objectstack/spec public API changed: 2 breaking (removed/narrowed), 0 added.
  ./data   - canonicalAstOperator (function)
  ./api    - FieldErrorCode (type)

Nothing had been removed. check:api-surface reads the built dist/*.d.ts, not src/ — and my dist predated the merge, so the newer checked-in snapshot looked like it had lost exports. pnpm build and it passes.

That is exactly the shape of a bug someone would otherwise file against main, so the caveat is now in the section, the loop starts with pnpm build, and the phantom pair is named so the next person recognises it.

Test plan

Every command in the new section was run as written, from a clean checkout of merged main (e4c61a7) after pnpm build:

check:docs                   PASS
check:api-surface            PASS
check:authorable-surface     PASS
check:spec-changes           PASS
check:upgrade-guide          PASS
check:skill-refs             PASS
check:skill-docs             PASS
check:react-blocks           PASS

Single file, +43/−0, no code touched.

Note on the branch

The designated branch's previous PR (#4040) is merged and GitHub auto-deleted the branch, so this is a fresh branch of the same name off merged main (e4c61a7) with one new commit — not stacked on merged history, and no force-push involved.

Not done here

An aggregate gen:all / check:generated script would beat a documented loop, but it adds a script name and a maintenance surface to a repo with strong conventions — worth your call rather than my guess. Say the word and I'll add it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq


Generated by Claude Code

…o regenerate it

`packages/spec` has eight checked-in generated artifacts, each with its own gate,
split across two CI jobs that run their gates sequentially — so the first stale
artifact masks every one behind it and you get one red build per artifact.
AGENTS.md documented the auto-gen boundary but never mapped a change to the
generator it invalidates, so the mapping had to be rediscovered from red CI.

#4040 paid that twice, neither time a logic error: a `.describe()` string landed in
`content/docs/references/` (`check:docs`), and one new export landed in
`api-surface.json` (`check:api-surface`) — the second only visible after the first
was fixed.

Adds a change → gate → regenerate table, plus a loop that runs all eight so the
tooling reports which artifact is stale instead of CI doing it one per push. Also
records that `check:liveness` / `check:empty-state` / `check:skill-examples` /
`check:react-conformance` have no generator — a failure there is a real finding,
not an artifact to regenerate.

Includes a caveat found while verifying this: `check:api-surface` reads the built
`dist/*.d.ts`, so a stale `dist` reports exports as REMOVED when nothing was
removed — the snapshot is just newer than the build. It reported two phantom
breaking removals (`canonicalAstOperator`, `FieldErrorCode`) on an untouched tree
until `pnpm build` was run, which is exactly the shape of a bug someone would
otherwise file against `main`.

Every command in the new section was run as written, from a clean checkout of the
merged main: all eight gates PASS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 30, 2026 6:31am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/s labels Jul 30, 2026
`Check Changeset` requires every PR to add a `.changeset/*.md` (diffed against the
PR base, so the directory's existing entries can't mask a missing one). An
empty-frontmatter changeset is the sanctioned "releases nothing" declaration, on par
with the `skip-changeset` label, and there is ample precedent for docs-only changes
(`adr-0104-design-doc-only.md` and others).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq
@os-zhuang
os-zhuang marked this pull request as ready for review July 30, 2026 06:45
@os-zhuang
os-zhuang merged commit a65a4bc into main Jul 30, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/console-screen-flow-submit-jfpjy4 branch July 30, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants