LLM Starting point With today's LLMs, couldn't much of this be automated? ▼ As I investigated There were several common patterns behind why it did not work ▼ The question I arrived at So how should we delegate the migration to AI efficiently? 4
Can it fix build errors on its own? 3 Can it make the visuals closer to the original? 4 Compared with the Compose implementation migrated by humans, what is missing? 9
do not provide information that is too close to the answer, such as the actual Compose implementation or Design System. What we want to observe is how far the LLM can get using only the information provided. We evaluate it using only a predefined scope of information. 10
▼ Generation The LLM generates Compose code ▼ Fix 1 Feed back compile errors and have the LLM fix them ▼ Fix 2 Show screenshots and have the LLM fix the result ▼ Answer check Compare against the actual migration result 11
validation Rollout Final scope 30 cases 249 cases 279 cases Compare approaches and decide on the method → Apply the same method to the remaining XML layouts → The entire set, not just a demo 12
Iterating Highly effective Partial improvement build error size and layout When given the error log, the LLM could fix them itself Showing a screenshot sometimes made the result closer to the original 15
Similar" Compare in the same environment as the human migration result Review not only the image, but also structure, state, and implementation intent Also check whether the human chose a one-to-one replacement 18
Overall Structure Is Reproduced Well Human migration LLM-genera ted * The original XML could not be captured due to Paparazzi limitations, so the manually migrated implementation was used as the comparison baseline 19
Design System Screen state determined at runtime Constraints imposed by the experiment rules Insufficient automated evaluation methods Scope decisions / final acceptance or rejection 24
included layout was not provided WebView case AndroidView was prohibited by the rules Could the cause be the input and rule settings rather than the LLM itself? 26
before repeat(8) + // TODO after repeat(8) + Row Column(...) { repeat(8) { index -> // TODO: generate rank{index+1} from // the included @layout/... later Box(...) { Text("rank${index + 1}") } } } repeat(8) { Row(...) { Box(...) Column(...) { ... // only tools: // text is available // the actual text is not // present in the input Text(text = "", ...) } } } → 27
If humans do it every time Number of cases × human work time required per case If we build a dedicated system Time to build the system + human work that remains even after automation 38
21 min Check and collect required information 10 min 20 min 10 min 3 min Case 1 Case 2 Case 3 Instructions to the LLM Review generated results Final check Direct code edits 0 min for all three cases 41
Build time (1 day = 8 hours) 480 min Time saved per case ÷ 5-10 min = Break-even number of cases 48-96 The more time it takes to build, the more cases are required to justify it 43
Information" Problem, the Answer Can Differ include Candidate cases: 10 Human input: 1.5 min (one case) Simple extrapolation: roughly 15 min total The development cost we can justify is quite small 44
We Add Missing Information," the Answer Changes tools Candidate cases: 151 Human input: 6 min (one case) Simple extrapolation: about 15 hours total Further validation may be highly worthwhile 45
LLMs 1 Classify the characteristics of the XML 2 Gather the information required for each characteristic 3 Ask AI to perform the migration using a method suited to those characteristics 4 Have a human review the generated result 48
contained in the XML Information from included layouts is required Values exist only in tools attributes Content is determined at runtime Uses custom Views WebView / MotionLayout …… 49
Has include → Also provide the included XML Has values in tools → Also provide the required sample values Content is determined at runtime → Add state and data information WebView, etc. → Revisit the allowed implementation methods and rules Requires redesign → A human decides the direction 50
↓ Classify characteristics ↓ Gather the required information ↓ Ask AI to migrate based on the classification ↓ Human review ↘ For highly repetitive cases → Consider additional automation 52
2 3 Separate the reasons it does not work Change how you delegate based on the reason Consider automation only for the repetitive parts What information, rules, or decisions are required? How many cases will it affect, and how much human work can it reduce? What is preventing AI from completing the task on its own? 54