Agent-assisted UI development
Use the GSPC selected by your project to look up widgets, check scenes and find the C API your application calls. You can run these commands directly in a terminal.
Find what you need
Section titled “Find what you need”| Task | Where to start |
|---|---|
| Choose a widget | Browse the widget library or run gspc cards --list for types and summaries. |
| Start a scene with known widgets | gspc cards --brief --guide --resolve-aliases label button returns authoring rules, object fragments, field types/enums, dynamic/layout fields and doc_paths. Omit --brief for details on the card’s selected fields and an example_path to a complete scene. |
| Check project or standalone scenes | Run gspc verify --context <path> with an existing context (locate it with gspc doctor . --build build), or pass scene files and target options. For ESP32-S3 with PSRAM, use gspc verify scenes/main.json --platform-soc esp32s3 --psram. Add --layout-check, --include-api or --budget-flash <bytes> as needed. Use gspc image-audit for image Flash/RAM trade-offs and gspc bundle-diff for OTA compatibility. |
| Check whether C can change a property | Run gspc authoring scenes/main.json --object power --runtime-property color (also supports x/y/w/h/opacity and color aliases). The result locates the object and lists its current C setters. For a missing setter, check existing_binding or the compiler-checked additions in suggestion.add, when present. Use --context <path> for your target configuration. |
| Update a named widget from C | Run gspc api --context <path> --name NAME for an object’s or callback’s C signatures. Without a build context, pass the files selected by the Bundle’s SCENES in registration order. With a sim_bridge project in pc/, python managed_components/espressif__esp-gsp/tools/sim_bridge/build.py --project pc --api [NAME...] also queries these signatures. Include the generated Bundle header in C (default bundle_gsp.h). See Runtime and generated API. |
| Try the UI on a computer | Use the scene preview (sim_bridge/run.py --scenes ... --watch [--i18n i18n.json --locale ar]) for layout, i18n/RTL, widgets and declarative actions. Use sim_bridge (run.py --scenario-schema prints the compact scenario schema) to run application C callbacks and timers. |
| Localize, convert EAF, or scan LVGL | Run gspc i18n check --i18n i18n.json scenes/*.json for missing keys, placeholder parity and glyph-width overflows; gspc eaf-convert to statically transcode .eaf into native animations, or gspc eaf4-export to create a standalone playback file; gspc migrate-scan <lvgl-dir> --emit-skeleton out/ for LVGL readiness and draft scenes. |
| Preview layout, color or asset changes on a board | Use the project’s usual board workflow. If the running firmware has a compatible receiver, follow the USB live reload example to pack and push just the Bundle. Reset restores the example’s embedded UI. |
| Preserve UI state through Light-sleep | Follow the Light-sleep lifecycle. Use the application’s wakeup policy and the board’s display ownership to choose between retaining and rebuilding the display. |
| Deliver a UI that survives restart | Update the resources the project loads at boot. For an embedded Bundle, rebuild and flash the application with the updated resources and code. Restart the board and verify the UI and its interactions. |
With jq, you can look up one field’s type and accepted values:
gspc cards label | jq '.cards[0].fields[] | select(.name == "text_wrap")'The source checkout stores the same widget pages under docs/src/content/docs/components/<widget>.mdx (add zh-cn/ before components/ for Chinese).
Some fields are listed by name in more_fields. Their definitions are on the widget page and in the authoring reference.
For timeline and rig metadata, open the *.api.json generated by the build. Each property’s timeline_writable flag indicates whether a clip can drive it. A joint-driven property also names its joint in derived_from_joint.
DeepSeek Harness
Section titled “DeepSeek Harness”The optional DeepSeek Harness plugin finds the project’s GSPC and exposes widget queries, scene diagnostics and Bundle budget checks. Install it from npm with DeepSeek Harness 0.2.2-rc.5.
dsh plugin --profile web add gsp-deepseek-harnessRestart Harness and open the ESP-IDF application directory. Replace web with your profile name if needed. Fast checks use the last built Bundle configuration. Build the project to refresh it after changing CMake registration or target settings.
Install the Skill
Section titled “Install the Skill”The canonical Skill is skills/esp-gsp-ui in the
ESP-GSP repository. Install it from the
same tag or commit as the ESP-GSP version used by the project. For Codex,
$skill-installer can install that path.
Use $skill-installer to install skills/esp-gsp-ui from espressif/esp-gsp atthe ref used by this project.From an existing source checkout, copy or link it into the skills directory used by your coding agent. For example, with Codex:
mkdir -p ~/.codex/skillscp -R skills/esp-gsp-ui ~/.codex/skills/Invoke it as $esp-gsp-ui on the next turn. The Skill belongs to the GitHub
development experience and is not included in the ESP-IDF
component archive. A project using the managed component still has the
bilingual documentation, widget examples, and generated references that the
Skill reads. Without installing the Skill, follow this guide and use
gspc doctor, gspc cards, and gspc diagnose directly.
Migrate an LVGL scene
Section titled “Migrate an LVGL scene”Provide the source project path and the page or flow to migrate. The Skill reads its callers, selected LVGL headers/configuration and build metadata; you do not need to identify the version beforehand. You can request an assessment, a single page or a complete migration.
Use $esp-gsp-ui to migrate the Settings page in /path/to/lvgl-project to nativeGSP scenes and C integration. Preserve brightness submission, Wi-Fi state andBack/re-entry behavior. Keep the existing visual intent. Build the affectedapplication and verify actual input and state; report any remaining gaps.To match the original UI, include its assets and screenshots of the LVGL states you want to preserve. Describe any intended changes. To compare performance, measure both versions on the same board with the same workload.
The Skill’s references/lvgl-migration.md covers semantic differences and
integration checks. The source checkout’s examples/usage/design_reference
provides a worked example and an optional runner for the LVGL version.
Give it a useful requirement
Section titled “Give it a useful requirement”For a reference design, provide the independent image, original assets, font files, logical dimensions and required states/actions. Native scene authoring does not require an editor plugin. Keep interactive controls and dynamic text native; use separate images for static decoration. Compare captured states against the independent design and verify actual input plus application state. Runtime text changes do not automatically reflow sibling objects.
Provide the project path and describe the desired page behavior. The Skill reads existing target, display, bundle and tool settings from the project. For a new project, include the display size or orientation when it is relevant. Existing project configuration is used when available, and product decisions that are not represented in the project can be supplied in the request.
Useful details include page states, dynamic data, navigation, available assets, and the interactions you want checked. You do not need to know generated API names or resource slot rules.
For assets that should stay outside the firmware, follow the
external-assets workflow and point the agent at
examples/usage/external_assets. Keep the manifest, target Image placeholders,
and the UI profile compatible, and request a fallback and status check for
missing or replaced files. For an SD/NAND font, use the
font-file workflow: apply the loaded font
before UI startup with an explicit size limit, then close it after the UI has
stopped. This keeps storage ownership and font lifetime in the application
while the generated UI API remains unchanged.
A concise creation request can be:
Use $esp-gsp-ui in this ESP-IDF project. Create scenes/settings.json for a480x320 RGB888 display with a brightness slider, Wi-Fi toggle, languagedropdown, and Back action. Integrate the generated API, build the project, andpreview the page in the simulator.For a reference image, attach it and state whether it is a visual reference or an asset that must ship. A static image does not define pressed, disabled, scrolling, loading, error, or navigation behavior; include those states in the request when they matter.
For an existing UI, name the behavior rather than asking for a blind rewrite:
Use $esp-gsp-ui to add an application-backed Wheel to scenes/setup.json.The available options come from the application and can change after loading.Keep the current selection when possible, support an empty list, and previewscrolling and selection.For a reported problem, provide the steps and expected result:
Use $esp-gsp-ui to investigate this: tapping Enter switches to the clock pageand also triggers the card at the same position. Reproduce it in the simulator,find the cause, and fix it so one touch only activates the starting page.Project configuration and scene diagnostics
Section titled “Project configuration and scene diagnostics”The build_contract in the doctor report identifies the target, component names and source paths. If the build directory belongs to another project or target, check stale_reasons. A pending context needs its Bundle built. Regenerate the context after changing CMake, sdkconfig or the target profile.
Context diagnostics cover registered scenes, shared resources and project capacities. See diagnostics for common errors and how --fix works.
Preview results and interaction
Section titled “Preview results and interaction”- Scene identity. The daemon’s
compile/previewreportssuccess,stale,inputIdentityandartifactIdentityfor the requested input and the Bundle on screen. A failed compile can leave the last successful preview visible. Load the Bundle and API file from the same compile. - Layout and text. When the compiler advertises
scene_inspection, useinspect: {"name":"title"}to identify the object or style responsible for initial placement. Compile-levelGSPC-TEXT-CLIPPEDidentifies clipped initial static text. The daemon’sdiagnostics/pullacceptslevel: "compile"when advertised bydoctor/get. - Input and navigation. Test overlapping controls with coordinate taps. Use
callbacks: []for an area that should trigger no callback,wait_componentto wait for a Drawer or PageFlow to settle, andwait_sceneafter navigation. See native scenario checks for keyboard input, screenshot comparison and assertions.
Choose the preview path
Section titled “Choose the preview path”From an application root with ESP-GSP installed and a pc/CMakeLists.txt, run:
python -m pip install -U esp-gsp-toolspython managed_components/espressif__esp-gsp/tools/sim_bridge/run.py --project pcThe browser lets you interact with the UI driven by application C code. For a new project, run the Hello World example.
To replay input, add --scenario pc/check.json. The Toggle scenario checks the callback and logical state, then waits for the thumb to finish moving before capturing the screen. Inspect the recorded steps in report.json.
See Display integration for panel orientation, touch mapping and refresh timing.
Observe grouped UI results
Section titled “Observe grouped UI results”Use the target-frame receipt RPC
when several updates must share a completion target. Preserve the returned
opaque receipt ID, require a COMPLETE outcome, then compare the relevant
pixels with the reference. Backend capability and the reached stage identify
which display evidence is available. Release the receipt with release_update
after verification, including when the goal or visual check fails.