Repository navigation
Description
Summary
Three things in uno-testing's loop cost an Uno session more than the equivalent Flutter session, and two of them the skill text prescribes. From the skill-ab catalog scenario in unoplatform/private (results, studio main@ffb6fad, App MCP 2.0.0-dev.15, Uno.Sdk 7.0.0-dev.81, one session per arm):
| Uno, with skills | Uno, no skills | Flutter | |
|---|---|---|---|
| cost | $12.34 | $11.85 | $3.52 |
| tool calls | 642 | 613 | 153 |
| model calls | 201 | 200 | 111 |
| mean context per call | 183k | 165k | 79k |
dotnet build / flutter output carried per call |
10k | 14k | 3k |
| app starts and restarts | 14 (211 s) | 15 | ~9 flutter run launches |
uno_app_find_elements |
122 | 203 | 0 (39 driver calls) |
| screenshots | 43 | 57 | 0 |
The same app came out of all three, and every harness check passed. The gap is the loop, not the code. With and without skills, Uno costs the same, so it's not the skill text's size; it's what the loop does.
1. Step 1 prescribes a build before the start (text change)
Build once, start once. … Build once with
dotnet build -f net10.0-desktop… so compile errors surface as build output. Thenuno_app_start(…).
uno_app_start builds too, so every start is two builds; a compile error fails the start, and its stdoutFile holds the full log. The sessions ran dotnet build in the shell 5–6 times; the output stayed in context at 10–14k tokens per call, against 3k for Flutter. Fix: drop the pre-build; uno_app_start(stdoutFile) keeps the full log out of context and still fails on compile errors.
2. Restarts to reset state (text gap)
Nothing in the skill says not to restart to get a clean state. A1's fourth launch: "Given all these hot reloads, state could be inconsistent, so restarting the app fresh is cleanest." Hot Reload had reported applied. The no-skills session restarted after five consecutive edits (launches 4–8) with Hot Reload Ready each time. A desktop start or restart took 15–23 s in these sessions, plus the ~13 s before Hot Reload is ready again (unoplatform/uno#25530).
Of A1's 14 launches, 7 were unavoidable (first start, Android, one per data mode, back to normal). Of the other 7: 3 repeated a --data=slow launch to catch a 4 s loading screen (unoplatform/uno.app-mcp#210 and #138 cover that), 1 added logging then restarted, 1 was the "clean state" restart, 1 was a build-first start, 1 fixed a real bug.
Fix: a rule next to the Hot Reload one. After applied, re-navigate or refresh the data to reset state; restart only for RudeEdit, InternalError, or a change the status says Hot Reload didn't cover.
3. Polling for state (needs a tool)
The skill tells the agent to wait with find_elements(waitForMs) after an action, and it did. But waitForMs waits for a match to exist, not for items to reach 40 or a row to become selected, so the agent re-read the scrollbar 31 times and the list ~45 times. The critical rule "poll until it clears, then assert" describes exactly the loop that cost the calls. unoplatform/uno.app-mcp proposals for uno_app_wait_for and uno_app_scroll_into_view are filed; once they land, step 6 and that rule should say "wait on the state in one call".
What the text already gets right
- Screenshots: the rules say save to a file and read one back only for a visual assertion. The agent saved 41 of 43 with
path, and asked for the image back (returnImage: true) on 34 of them, judging them visual. 36 came back inline atmaxWidth600–900. AmaxWidth: 412default in the text would halve what those cost, but the big savings are in 1–3. - Hot Reload flow:
applied/RudeEdit/ restart once is clear and was followed.
Related
- Build apps addressable and verify them by element, on Windows and Android #183 (verify by element) and uno-dev: edit the running app through Hot Reload and confirm each edit #191 (edit through Hot Reload): this is the measured cost of the loop they describe.
- unoplatform/uno.app-mcp#208 (restart without rebuild), test(evals): per-skill evals for claude plugin eval, modeled on dotnet/skills #209 (tool list size), feat(skills): fill five gaps in AncestorBinding, cards, SafeArea, Simple icon buttons and MVUX selection #210 (window size), feat: enable uno-platform-studio plugin for Kimi Code CLI #138 (env on start).
- A
unoplatform/privatespec (006, agent edit-loop cost) holds the measurements and the order of work; its PR will link here.
Activity
kazo0 commentedon Oct 20, 2026
The spec that collects these measurements is unoplatform/private#1216 (spec 006, agent edit-loop cost), open as a draft.
perf(skills): uno-build-app makes the App MCP start the build; no she…
perf(skills): hub descriptions lead with the task; the feature contra…
feat(hooks): deny a shell dotnet build and a restart after an applied…
vatsashah45 commentedon Oct 20, 2026
Three-session medians on the same pins (App MCP 2.0.0-dev.15, Uno.Sdk 7.0.0-dev.81) sharpen two points here.
The restart habit is the model's, not the skill text's. The no-skills arm (
catalog-20261020-093343, unoplatform/private#1218: a plugin holding onlyplugin.json, so the Uno MCPs and nothing else) relaunched 16–30 times a session; the with-skills sessions on the same brief relaunched 23–38 (catalog-20261019-225302unoplatform/private#1214,catalog-20261020-034157unoplatform/private#1215). Screenshot volume is the same with or without skills too. Section 2's rule is still worth adding, but the bigger lever is on the App MCP side (unoplatform/uno.app-mcp#210 start-at-size, #211 wait-for-state): 5–17 launches a session are--data=slowrelaunches chasing the loading screenshot.The step-by-step procedure serializes tool use. Same brief, one typical session a side (#1218):
The skill text is 7% of the with-skills context; most of the 60% extra is ~40% more model calls over the same tool uses. MAUI's and Avalonia's agents sit at 1.5–1.7 tools per call as well. Steps 3–7 (baseline, locate, act, wait and re-snapshot, assert) read as one step per turn and are followed that way. Suggestion for the rewrite, alongside 1–3: say that independent checks go out together (snapshot and screenshot in one turn, several
find_elementsat once, act-then-wait in one turn once #211 lands). Filed separately so it can be tracked on its own: #200.What the skills buy on this brief, for the record: with them 100% of app actions are addressed to an element and the recommended stack is picked 6/6; without them the agent clicks coordinates (127
pointer_clickin one session) and picks plain MVVM 3/3. Cost: $14.23 median with skills (six sessions, $12.89–$22.38) against $9.15 without ($8.75–$14.00), about 35%.kazo0 commentedon Oct 20, 2026
Measured on the catalog brief with studio branch
dev/steve/uno-testing-loop(2026-10-20):uno-build-app, not here: every shelldotnet buildran beforeuno-testingwas loaded (new-app.md's baseline andverification.md's table prescribed them). With the start as the build: shell builds 0, build output 1–2k tokens per call (from 10–14k). The shell-build gate added alongside never had to fire.--data=NORMAL,nOrmal,norMal… and an invented--shot=loading2. The agent: "The hook blocked the start … so I need to try adding--data=normalto the arguments to get past it." That session cost $18.35 against $10–12 without the gate. The gate is reverted; launches go back to the product: unoplatform/uno.app-mcp#208, feat(skills): fill five gaps in AncestorBinding, cards, SafeArea, Simple icon buttons and MVUX selection #210, feat: enable uno-platform-studio plugin for Kimi Code CLI #138, Hot Reload takes ~13 s to become Ready on every app relaunch, even with the DevServer already running uno#25530.uno-toolkitand readresponsive.mdfor the first time on this brief.Branch kept: the text changes, the
uno-build-appchange, the hub descriptions, the shell-build gate. The lesson is in unoplatform/private#1216.