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
{{ message }}
Repository navigation
Commit 79f2c02
Browse filesBrowse the repository at this point in the historyBrowse files
fix(docs): agent/ui.md described a UI tier the run does not emit
`meta docs --agent` promises "each page is skipped when its tier has nothing to
describe". It emitted `agent/ui.md` for an estate with `generators: []`, no
`view.*` node and no route anywhere — and the page was not empty, it was
specific and wrong: a control/HTML-type/rules table per entity for forms that
do not exist, and an `Endpoint` line per object for addresses nothing serves.
The audience is an agent the surface explicitly instructs to read the page
BEFORE touching a tier, which is the audience least able to check.
The gate was `hasUiSurface(obj) = servesReadApi(obj)` — a METADATA predicate,
which answers "could a UI be generated for this object?" and can never answer
"does this run generate one?". Whether an artifact exists is a generator fact.
So the page now gates on a generator marker, aggregated the way
`emitsHonoRoutes` and `emitsNames` already are: `emitsUiTier` on each
form/hook/grid generator, collected by the runner into
`ResolvedGenConfig.includeUiTier`, with `runEmitsUiTier` as the ONE derivation
both doors call — `meta gen`'s runner and `meta docs`, which is the other door
onto this page.
An owned copy ejected before the marker existed would otherwise lose the page
in silence, so a name match keeps it emitting AND warns, naming the one-line
fix; a config `includeUiTier` covers a copy that was also renamed. Nothing
degrades quietly.
Found while wiring the second door: `meta docs` read the RAW config, where a
generator wired by stable name (`generators: ["routes-hono"]`, legal under
ADR-0021 #1) is a string carrying no marker at all — so `api-docs` documented
the Fastify-only surface for a project that had wired the Hono one. Both
aggregations now run after `resolveGenerators`, and an unresolvable suite says
so rather than silently answering "no".
Gates: the marker/name parity pair in `cli` (the only package that depends on
every UI codegen package), the aggregation and warning in `codegen-ts`, and the
page's own emit asserted as a SET difference so suppressing ui.md cannot take a
sibling page with it. Each proved by breaking it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTcEKXTQMYt84fAjuw5A2M
0 commit comments