Skip to content

Leaner agent bundles, settings and page slices, show classes only inside their breakpoint - #245

Merged
lorant-one merged 3 commits into
previewfrom
chore/benchmark-dry-run-rl26k0
Oct 19, 2026
Merged

lorant-one merged 3 commits into
previewfrom
chore/benchmark-dry-run-rl26k0

Conversation

@lorant-one

@lorant-one lorant-one commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

Before: after core#226, an agent still spent an extra turn on most tasks. It listed app/ before reading layout.tsx, which re-sent a 10-12k token bundle. A settings page opened the Table and NavItem slices after the settings bundle, and an onboarding form opened Switch and SegmentedControl after page.md. Every bundle spelled out IconName and the breakpoint prop keys as long TypeScript unions. A breakpoint show class (s-flex-show) also carried a base display: none, so l={{ hide: true }} s={{ hide: false }} stayed hidden above l.

After: AGENTS.md tells agents to open project files by path. The settings bundle carries Table and NavItem, and page.md carries Switch and SegmentedControl. IconName and the breakpoint keys are plain word lists, about 3% smaller per bundle. A show class has a rule only inside its own media query.

An internal dry run covered the eight pre-registered Lumen v2 tasks, 3 replicates each. It is a simulation, not a benchmark result. On this branch every task's median run took 3 model calls. Once UI's token total went from about 1.21x shadcn/ui's (after core#226) to about 0.90x. First-try gate passes were 23 of 24, and the one failure was a made-up between prop on Row.

How:

  • scripts/generate-ai-spec.js:
    • GridBreakpointProps/FlexBreakpointProps render as a comment listing the keys, with families collapsed (padding*).
    • IconName renders as one word list.
    • page.md gets its own components, and its AGENTS.md row says so.
  • ai/tasks/settings.json: adds Table and NavItem.
  • AGENTS.md: open project files by path, because a folder listing costs a turn.
  • packages/foundations/scripts/generate-utilities.mjs: no base rule for -flex-show/-grid-show. The JS guard from core#226 still emits them only where a wider breakpoint hides the element. Generated SCSS regenerated, with a foundations test.

Checks:

  • Core vitest: 3321 passed, with no unhandled errors.
  • Foundations vitest: 34 passed.
  • lint:gate passes.
  • check:docs passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz

Flex and Grid emit a show class only under a wider hide, which already
covers the wider widths, so the base rule only did harm:
l={{ hide: true }} s={{ hide: false }} stayed hidden above l.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
…entedControl in page

Breakpoint prop keys collapse families (padding*) and IconName is a plain
word list, about 3% smaller per bundle. The settings bundle carries Table
and NavItem, and page.md carries Switch and SegmentedControl, the slices
the settings and onboarding dry-run tasks opened after the bundle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
In the dry run a listing of app/ before reading layout.tsx cost a turn
that re-sent the 10-12k token bundle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
core-docs Ignored Ignored Oct 19, 2026 9:27am UTC

@lorant-one
lorant-one merged commit cbfdf06 into preview Oct 19, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
30 tasks done
@lorant-one lorant-one added the approved label Oct 20, 2026 — with Claude
lorant-one pushed a commit that referenced this pull request Oct 20, 2026
Main's fixes are carried into 3.0's props rather than taken as written:

- Breakpoint show classes only under a wider hide (Flex, Grid), sizes take
  "auto" and "fit", Text and Heading take s={{ hide }} (#226, #245).
- ThemeInit/ThemeProvider: defaultTheme and exact scheme scales beside 3.0's
  density (#246). Kbar's trigger is optional.
- AI harness: main's leaner bundle writer (grouped props, word-list types)
  with 3.0's mixin and key-diff compression; gotchas keep 3.0's wording and
  take main's inRules flags; the app-shell task and app starter, codemodded.
- FileTree follows the state contract: onExpandChange is onExpandedIdsChange
  (codemod entry), onSelectedIdChange is new, onSelect stays the action.
- Main's new native components (#224) take 3.0's props (textVariant,
  aria-label, onValueChange, onPageChange) and point units: their rem
  defaults are written as "Nrem". Native docs pages say points, not rem.
- Effects and Swiper fixes ported to their 3.0 homes (packages/fx,
  Carousel/SnapCarousel).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
@lorant-one
lorant-one deleted the chore/benchmark-dry-run-rl26k0 branch October 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants