1. Identify the user's question about ArkTS syntax, migration, or performance.
2. Determine the specific context of the question (e.g., syntax query, migration issue).
3. Consult relevant documentation and examples to formulate a solution.
4. Generate ArkTS code based on the solution.
5. Compile the generated code using build scripts.
6. If compilation fails, analyze the error and retry (up to 3 times).
7. If compilation continues to fail, ask the user for guidance.
8. Present the final solution or code example to the user, with explanations and references.