Skip to content

One declaration of the description cap, and a card that explains why it is plain - #25

Merged
scheemunai merged 1 commit into
mainfrom
fix/one-source-cap
Sep 5, 2026
Merged

One declaration of the description cap, and a card that explains why it is plain#25
scheemunai merged 1 commit into
mainfrom
fix/one-source-cap

Conversation

@scheemunai

Copy link
Copy Markdown
Owner

Two things, both small.

The description cap was declared twice — literals in lib/schemas/templates.ts and again in manifestEntrySchema in services/templates.ts, which imports that file and then wrote its own numbers. They agreed and already differed on optionality, with nothing asserting they stayed equal. That cap is enforced by the seeder at start-up, so a disagreement stops the app booting rather than failing a request — report hit 328 during a redesign and would have done exactly that. Collapsed to TEMPLATE_NAME_MAX / TEMPLATE_DESCRIPTION_MAX / TEMPLATE_DESCRIPTION_TARGET, imported by both. Same move as deleting VIEWPORT_BY_SLUG: collapse, don't assert.

one-pager's card now says what it is. It is not standing in for a missing template — it is the only built-in that takes slots, i.e. the worked example of a documented capability. Unexplained, it read as the card that failed to load; named, it does work no other card can.

…it is plain

TWO DECLARATIONS OF A BOOT FAILURE. `name .max(80)` and `description .max(300)` were
written as literals in `lib/schemas/templates.ts` and again in `manifestEntrySchema`
inside `services/templates.ts` — which imports that file and then declared its own
numbers anyway. They agreed, and already differed on optionality, with nothing
asserting they stayed equal.

It matters more here than almost anywhere: the description cap is enforced by the
seeder at start-up, so a disagreement does not surface as a validation error on a
request — it stops the application booting. `report` reached 328 characters during a
redesign and would have done exactly that. Raising one cap and not the other is a
one-character change with a deploy-shaped failure behind it.

Collapsed rather than asserted, which is the same move as deleting `VIEWPORT_BY_SLUG`:
`TEMPLATE_NAME_MAX` and `TEMPLATE_DESCRIPTION_MAX` are exported once and imported by
both. `TEMPLATE_DESCRIPTION_TARGET = 285` goes with them, so the headroom rule has a
name rather than living only in prose.

ONE-PAGER'S CARD NOW SAYS WHAT IT IS. Beside nineteen designed templates, an
unexplained plain card reads as the one that failed to load. It is not standing in for
anything — it is the only built-in that takes slots at all, which makes it the worked
example of a documented capability, demonstrated nowhere else if it went. Its
description now says so: the markdown starter, the only built-in that takes slots, and
deliberately plain because it is a form to fill rather than a page to rewrite.

An unexplained plain thing looks broken. An explained one looks like a choice.

Co-Authored-By: CRHQ <noreply@crhq.ai>
@scheemunai
scheemunai merged commit 9b0a30d into main Sep 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants