How AI Transformed Taobao’s Post‑Purchase Info‑Flow Across Android, iOS, and Weex
Facing the challenge of maintaining four codebases for Taobao’s post‑purchase information flow, the team leveraged AI‑driven code generation, prompt engineering, and RAG to automate template conversion from DX to Weex, dramatically cutting development cycles, reducing manual effort, and improving monitoring and stability across Android, iOS, and HarmonyOS.
Background
In 2023 the Taobao app migrated several post‑purchase pages from a native information‑flow implementation to Weex. The product now runs on more than four codebases (Android Java, iOS Objective‑C, HarmonyOS ArkTS, and Weex/JS), causing low development efficiency.
Challenges
Template duplication : each new card must be re‑implemented for Weex even when the same layout exists in native pages.
Requirement duplication : a single feature has to be built separately for Android, iOS, Weex, HarmonyOS and H5.
Repeated deployments : every change requires publishing a new npm package and redeploying the component across many services.
AI‑Driven Solution
The team introduced generative AI to automate repetitive tasks and streamline the workflow.
DX → Weex conversion
DX (DinamicX) is an internal DSL that generates native cards. A detailed Prompt describing the mapping rules (layout, style, device adaptation) was created. The conversion pipeline consists of:
Prompt preparation – write comprehensive conversion rules.
RAG retrieval – index DX and Weex documentation, then use vector search to supply relevant context to the LLM.
Code generation – feed DX snippets and the Prompt to a large language model (Claude performed best) via the VS Code plugin OneDay Copilot . The plugin calls the LLM API and returns generated Weex code.
Preview – render the generated Weex code directly in the editor or on a PC, avoiding repeated mobile scans.
Using this pipeline the team generated more than eight new card templates, reducing the time to create a new card from four days to less than two.
AI‑assisted cross‑platform development
Beyond template conversion, AI was employed for:
Intelligent search – natural‑language queries over internal docs.
Code completion – Copilot‑style suggestions for Java, Objective‑C, and Weex.
Prompt‑based code translation – e.g., “convert this Android Java code to iOS Objective‑C”.
AI Assistant for stability monitoring
An AI Agent monitors the post‑purchase information flow during gray‑release. The workflow is:
Perception – deployment events from pages (pay‑success, order‑detail, logistics) are sent to a backend service.
Input processing – relevant parameters are extracted and passed to the agent.
Reasoning – the agent decides which metrics to query (JS errors, white‑screen, crashes, card exposure, clicks).
Tool invocation – the backend provides APIs to fetch those metrics.
Decision – the agent produces a risk report, highlights issues in red/green, and notifies DingTalk groups.
After deployment, manual monitoring effort dropped from 1 person‑day per week to 0.1 person‑day, and the agent discovered several production problems.
Implementation Details
The conversion Prompt is stored as plain text and fed to the LLM together with DX source. The RAG component builds a vector store from internal DX/Weex documentation and retrieves the top‑k relevant passages during generation, mitigating hallucinations. The VS Code plugin OneDay Copilot embeds the Prompt, calls the Claude API, and inserts the generated code into the editor, eliminating context switches.
你是一个高级系统可靠性工程师(SRE),负责我们系统可靠、稳定、高效运行,现在业务正在灰度中;
请你将根据不同业务获取输入工具的参数,可以调用以下工具获取数据;
你的目标是分析目前有无风险,能否继续扩大灰度;
## 调用获取页面稳定性数据工具获取JS Error、白屏、降级、Crash数据:
其中支付成功参数为paySuccess
其中订单详情参数为orderDetail
其中查看物流参数为logistics
(注:后续接入新场景,直接这里加参数即可)
## 调用获取页面点击数据工具获取信息流卡片点击数据:
其中支付成功参数为paySuccess
其中订单详情参数为orderDetail
其中查看物流参数为logistics
## 返回的格式
1. 根据工具查询结果进行环比、同比分析,并把结果通知到不同的群内和@发布人;
2. 注明目前应用的中文名和灰度量,JS Error需标明是10.XX.XX版本以上;
3. 先显示总结,总分结构,请将有风险的行用红色字体显示,无风险的行用绿色字体显示。Results
Generated >8 Weex templates automatically, covering all new card types.
Layout and style automation cut card development effort by >50 % (new‑card cycle reduced from 4 days to <2 days).
Cross‑platform code volume: >2000 lines of Java and ~50 lines of Objective‑C were written to support eight+ features.
Manual stability monitoring effort reduced from 1 person‑day/week to 0.1 person‑day/week.
AI‑generated code showed higher accuracy than rule‑based converters, leveraging LLM reasoning and external knowledge (W3C, community).
Reflections & Future Work
The AI‑assisted pipeline demonstrates that generative models can dramatically accelerate repetitive engineering tasks such as DSL‑to‑frontend conversion, cross‑platform code translation, and operational monitoring. Remaining gaps include extending the RAG knowledge base to performance data, automating rollback actions when risks are detected, and further integrating AI agents with internal APIs for end‑to‑end automation.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
