Skip to content

Ship an element reference skill for Boost - #114

Draft
simonhamp wants to merge 1 commit into
mainfrom
feat/boost-guidelines
Draft

simonhamp wants to merge 1 commit into
mainfrom
feat/boost-guidelines

Conversation

@simonhamp

@simonhamp simonhamp commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Adds an element reference to the Boost files this plugin ships, so agents don't have to read vendor source to find props. It's the mobile-ui half of NativePHP/mobile-air#517.

In the stack benchmark, a bare NativePHP run took 67 to 77 turns and $1.70 to $2.10 per trial because the model doesn't know SuperNative or these elements. With a short guide as CLAUDE.md it took 14 turns, $0.38 and 3 minutes. Most of the guide's element knowledge belongs here.

What's added

A new nativephp-mobile-ui skill (resources/boost/skills/nativephp-mobile-ui/SKILL.md, 117 lines):

  • The events and how handler arguments work.
  • A table of the common elements and the props that matter: layout, text, button, the three text inputs, list, icon, top-bar.
  • Text inputs: .debounce.300ms, taking the text from @submit, keep-focus-on-submit being iOS only.
  • List items: the camelCase props, leading and trailing slots, on-trailing-press (from Read on-trailing-press on list items #108), swipe actions, and a worked example.
  • A custom row for when a list item can't do it (strikethrough).
  • Layout notes and what the elements look like in Native::test() trees.

The always-loaded guideline gets 7 lines: a pointer to the skill, the three text input tag names with the binding advice, and the list-item camelCase and swipe rules.

How I checked it

  • In a copy of mobile-starter main with this branch and the mobile-air branch as path repos, I rendered the skill's three Blade examples unchanged in one screen and drove them with Native::test(): checkbox change, trailing button, swipe action, row press and @submit all reach the right method with the right arguments.
  • The props listed are the ones applyAttributes() reads on main. <native:text-input> throws "Unknown native element type: text_input".
  • php artisan boost:install --no-interaction renders the guideline into AGENTS.md with no Blade errors and installs the skill unchanged.
  • composer test: 264 passed, 3 failed. The same 3 ListItemImageSourceTest tests fail on main (the lock file pins nativephp/mobile 4.0.0-rc.1).

Lines to update when these merge

🤖 Generated with Claude Code

Adds a nativephp-mobile-ui skill with the elements, their props and events,
list-item slots and swipe actions, text input binding advice and the traps
agents hit. The always-loaded guideline gets three short rules and a pointer
to the skill.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant