diff --git a/.agents/skills/mpx2web-workspace/babel.config.json b/.agents/skills/mpx2web-workspace/babel.config.json new file mode 100644 index 0000000000..d1536dd98e --- /dev/null +++ b/.agents/skills/mpx2web-workspace/babel.config.json @@ -0,0 +1,22 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "modules": false, + "shippedProposals": true + } + ] + ], + "plugins": [ + [ + "@babel/transform-runtime", + { + "corejs": 3, + "version": "^7.10.4" + } + ], + "@mpxjs/babel-plugin-inject-page-events" + ], + "sourceType": "unambiguous" +} diff --git a/.agents/skills/mpx2web-workspace/compile-fixtures/campaign-tracker-web.js b/.agents/skills/mpx2web-workspace/compile-fixtures/campaign-tracker-web.js new file mode 100644 index 0000000000..9a57efb6ea --- /dev/null +++ b/.agents/skills/mpx2web-workspace/compile-fixtures/campaign-tracker-web.js @@ -0,0 +1,13 @@ +'use strict' + +const campaignTracker = { + async create () { + return { + track () {}, + destroy () {} + } + } +} + +module.exports = campaignTracker +module.exports.default = campaignTracker diff --git a/.agents/skills/mpx2web-workspace/compile-fixtures/product-exposure-web.js b/.agents/skills/mpx2web-workspace/compile-fixtures/product-exposure-web.js new file mode 100644 index 0000000000..8fc677a226 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/compile-fixtures/product-exposure-web.js @@ -0,0 +1,13 @@ +'use strict' + +const productExposure = { + async create () { + return { + track () {}, + destroy () {} + } + } +} + +module.exports = productExposure +module.exports.default = productExposure diff --git a/.agents/skills/mpx2web-workspace/eslint.config.mjs b/.agents/skills/mpx2web-workspace/eslint.config.mjs new file mode 100644 index 0000000000..061dd0e581 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/eslint.config.mjs @@ -0,0 +1,6 @@ +import { mpxConfig } from '@mpxjs/eslint-config' + +export default mpxConfig({ + mpx: true, + typescript: true +}) diff --git a/.agents/skills/mpx2web-workspace/iteration-11/.gitignore b/.agents/skills/mpx2web-workspace/iteration-11/.gitignore new file mode 100644 index 0000000000..591cd81987 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.py[cod] +*.log +*.pid diff --git a/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/grade.cpython-313.pyc b/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/grade.cpython-313.pyc new file mode 100644 index 0000000000..ff75328574 Binary files /dev/null and b/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/grade.cpython-313.pyc differ diff --git a/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/run_evals.cpython-313.pyc b/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/run_evals.cpython-313.pyc new file mode 100644 index 0000000000..ecb3da9311 Binary files /dev/null and b/.agents/skills/mpx2web-workspace/iteration-11/__pycache__/run_evals.cpython-313.pyc differ diff --git a/.agents/skills/mpx2web-workspace/iteration-11/benchmark.json b/.agents/skills/mpx2web-workspace/iteration-11/benchmark.json new file mode 100644 index 0000000000..2320852354 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/benchmark.json @@ -0,0 +1,474 @@ +{ + "metadata": { + "skill_name": "mpx2web", + "iteration": 11, + "generated_at": "2026-09-05T18:47:03.200474+00:00", + "models": [ + "gpt-5.6-luna", + "gpt-5.6-terra", + "gpt-5.6-sol" + ], + "samples_per_model_configuration": 3, + "configurations": { + "mpx2web": "使用 Skill", + "no_skill": "无 Skill" + }, + "grader_model": "gpt-5.5", + "grader_reasoning_effort": "high", + "grading_mode": "blind independent model review plus conclusive tri-state deterministic overrides" + }, + "models": [ + { + "slug": "luna-medium", + "label": "5.6 Luna / medium", + "model": "gpt-5.6-luna", + "reasoning_effort": "medium", + "has_skill": { + "runs": 39, + "passed": 289, + "total": 330, + "pass_rate": 0.8758, + "strict_passed": 279, + "strict_pass_rate": 0.8455, + "label": "使用 Skill", + "sample_pass_rates": [ + 0.8909, + 0.8636, + 0.8727 + ], + "sample_mean": 0.8757, + "sample_stddev": 0.0113, + "sample_min": 0.8636, + "sample_max": 0.8909, + "strict_delivery": { + "passed": 279, + "total": 330, + "pass_rate": 0.8455, + "sample_pass_rates": [ + 0.8909, + 0.7727, + 0.8727 + ], + "sample_mean": 0.8454, + "sample_stddev": 0.052 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.8843, + 0.8592, + 0.8818 + ], + "sample_mean": 0.8751, + "sample_stddev": 0.0113 + }, + "capability": { + "passed": 223, + "total": 258, + "pass_rate": 0.8643 + }, + "business_preservation": { + "passed": 66, + "total": 72, + "pass_rate": 0.9167 + }, + "stability": { + "stable_pass": 81, + "stable_fail": 1, + "variable": 28 + }, + "compile": { + "status": "failed", + "compiled_mpx": 68, + "eligible_mpx": 69, + "candidate_passed": 38, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 10397778, + "duration_seconds": 5837.127, + "tool_calls": 372, + "output_lines": 10845, + "output_bytes": 286163 + } + }, + "no_skill": { + "runs": 39, + "passed": 153, + "total": 330, + "pass_rate": 0.4636, + "strict_passed": 150, + "strict_pass_rate": 0.4545, + "label": "无 Skill", + "sample_pass_rates": [ + 0.4455, + 0.4545, + 0.4909 + ], + "sample_mean": 0.4636, + "sample_stddev": 0.0196, + "sample_min": 0.4455, + "sample_max": 0.4909, + "strict_delivery": { + "passed": 150, + "total": 330, + "pass_rate": 0.4545, + "sample_pass_rates": [ + 0.4364, + 0.4364, + 0.4909 + ], + "sample_mean": 0.4546, + "sample_stddev": 0.0257 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.4367, + 0.4457, + 0.4678 + ], + "sample_mean": 0.4501, + "sample_stddev": 0.0131 + }, + "capability": { + "passed": 106, + "total": 258, + "pass_rate": 0.4109 + }, + "business_preservation": { + "passed": 47, + "total": 72, + "pass_rate": 0.6528 + }, + "stability": { + "stable_pass": 36, + "stable_fail": 48, + "variable": 26 + }, + "compile": { + "status": "failed", + "compiled_mpx": 67, + "eligible_mpx": 69, + "candidate_passed": 37, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 4073500, + "duration_seconds": 5326.674, + "tool_calls": 216, + "output_lines": 10101, + "output_bytes": 299836 + } + }, + "delta": 0.4121 + }, + { + "slug": "terra-medium", + "label": "5.6 Terra / medium", + "model": "gpt-5.6-terra", + "reasoning_effort": "medium", + "has_skill": { + "runs": 39, + "passed": 316, + "total": 330, + "pass_rate": 0.9576, + "strict_passed": 316, + "strict_pass_rate": 0.9576, + "label": "使用 Skill", + "sample_pass_rates": [ + 0.9364, + 0.9909, + 0.9455 + ], + "sample_mean": 0.9576, + "sample_stddev": 0.0238, + "sample_min": 0.9364, + "sample_max": 0.9909, + "strict_delivery": { + "passed": 316, + "total": 330, + "pass_rate": 0.9576, + "sample_pass_rates": [ + 0.9364, + 0.9909, + 0.9455 + ], + "sample_mean": 0.9576, + "sample_stddev": 0.0238 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.935, + 0.9915, + 0.9493 + ], + "sample_mean": 0.9586, + "sample_stddev": 0.024 + }, + "capability": { + "passed": 248, + "total": 258, + "pass_rate": 0.9612 + }, + "business_preservation": { + "passed": 68, + "total": 72, + "pass_rate": 0.9444 + }, + "stability": { + "stable_pass": 100, + "stable_fail": 0, + "variable": 10 + }, + "compile": { + "status": "passed", + "compiled_mpx": 69, + "eligible_mpx": 69, + "candidate_passed": 39, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 10256349, + "duration_seconds": 6125.593, + "tool_calls": 315, + "output_lines": 10995, + "output_bytes": 301728 + } + }, + "no_skill": { + "runs": 39, + "passed": 173, + "total": 330, + "pass_rate": 0.5242, + "strict_passed": 173, + "strict_pass_rate": 0.5242, + "label": "无 Skill", + "sample_pass_rates": [ + 0.5182, + 0.5182, + 0.5364 + ], + "sample_mean": 0.5243, + "sample_stddev": 0.0086, + "sample_min": 0.5182, + "sample_max": 0.5364, + "strict_delivery": { + "passed": 173, + "total": 330, + "pass_rate": 0.5242, + "sample_pass_rates": [ + 0.5182, + 0.5182, + 0.5364 + ], + "sample_mean": 0.5243, + "sample_stddev": 0.0086 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.4976, + 0.5081, + 0.5179 + ], + "sample_mean": 0.5079, + "sample_stddev": 0.0083 + }, + "capability": { + "passed": 121, + "total": 258, + "pass_rate": 0.469 + }, + "business_preservation": { + "passed": 52, + "total": 72, + "pass_rate": 0.7222 + }, + "stability": { + "stable_pass": 45, + "stable_fail": 41, + "variable": 24 + }, + "compile": { + "status": "passed", + "compiled_mpx": 69, + "eligible_mpx": 69, + "candidate_passed": 39, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 3379574, + "duration_seconds": 4918.617, + "tool_calls": 148, + "output_lines": 11317, + "output_bytes": 327297 + } + }, + "delta": 0.4333 + }, + { + "slug": "sol-high", + "label": "5.6 Sol / high", + "model": "gpt-5.6-sol", + "reasoning_effort": "high", + "has_skill": { + "runs": 39, + "passed": 320, + "total": 330, + "pass_rate": 0.9697, + "strict_passed": 320, + "strict_pass_rate": 0.9697, + "label": "使用 Skill", + "sample_pass_rates": [ + 0.9636, + 0.9818, + 0.9636 + ], + "sample_mean": 0.9697, + "sample_stddev": 0.0086, + "sample_min": 0.9636, + "sample_max": 0.9818, + "strict_delivery": { + "passed": 320, + "total": 330, + "pass_rate": 0.9697, + "sample_pass_rates": [ + 0.9636, + 0.9818, + 0.9636 + ], + "sample_mean": 0.9697, + "sample_stddev": 0.0086 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.9711, + 0.9776, + 0.9637 + ], + "sample_mean": 0.9708, + "sample_stddev": 0.0057 + }, + "capability": { + "passed": 249, + "total": 258, + "pass_rate": 0.9651 + }, + "business_preservation": { + "passed": 71, + "total": 72, + "pass_rate": 0.9861 + }, + "stability": { + "stable_pass": 102, + "stable_fail": 0, + "variable": 8 + }, + "compile": { + "status": "passed", + "compiled_mpx": 69, + "eligible_mpx": 69, + "candidate_passed": 39, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 14196015, + "duration_seconds": 10695.051, + "tool_calls": 787, + "output_lines": 14309, + "output_bytes": 352412 + } + }, + "no_skill": { + "runs": 39, + "passed": 199, + "total": 330, + "pass_rate": 0.603, + "strict_passed": 180, + "strict_pass_rate": 0.5455, + "label": "无 Skill", + "sample_pass_rates": [ + 0.5909, + 0.6091, + 0.6091 + ], + "sample_mean": 0.603, + "sample_stddev": 0.0086, + "sample_min": 0.5909, + "sample_max": 0.6091, + "strict_delivery": { + "passed": 180, + "total": 330, + "pass_rate": 0.5455, + "sample_pass_rates": [ + 0.5909, + 0.5273, + 0.5182 + ], + "sample_mean": 0.5455, + "sample_stddev": 0.0323 + }, + "macro_eval": { + "sample_pass_rates": [ + 0.5815, + 0.5935, + 0.5988 + ], + "sample_mean": 0.5913, + "sample_stddev": 0.0072 + }, + "capability": { + "passed": 144, + "total": 258, + "pass_rate": 0.5581 + }, + "business_preservation": { + "passed": 55, + "total": 72, + "pass_rate": 0.7639 + }, + "stability": { + "stable_pass": 56, + "stable_fail": 33, + "variable": 21 + }, + "compile": { + "status": "failed", + "compiled_mpx": 65, + "eligible_mpx": 69, + "candidate_passed": 35, + "candidate_total": 39, + "declared_outputs_complete": true + }, + "efficiency": { + "total_tokens": 6370876, + "duration_seconds": 8878.274, + "tool_calls": 472, + "output_lines": 16254, + "output_bytes": 397499 + } + }, + "delta": 0.3667 + } + ], + "overall": { + "functional": { + "has_skill_mean": 0.9343, + "no_skill_mean": 0.5303, + "delta": 0.404 + }, + "capability": { + "has_skill_mean": 0.9302, + "no_skill_mean": 0.4793, + "delta": 0.4509 + }, + "strict_delivery": { + "has_skill_mean": 0.9242, + "no_skill_mean": 0.5081, + "delta": 0.4161 + } + } +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/benchmark.md b/.agents/skills/mpx2web-workspace/iteration-11/benchmark.md new file mode 100644 index 0000000000..903dda54fb --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/benchmark.md @@ -0,0 +1,18 @@ +# Mpx2Web iteration-11 跨模型 Benchmark + +- 模型:3 个;每个模型 Has Skill / No Skill 各采样 3 次 +- 候选结果:234 个 +- 独立评分:gpt-5.5 / high +- 评分:功能、业务保真、逐文件编译与严格交付分开统计 +- 基线:`--resume` 仅复用候选指纹完全一致的 No Skill 产物;最终评分使用当前评分指纹 + +| 模型 | 无 Skill 功能分 | 使用 Skill 功能分 | 功能提升 | 无/有 Skill 严格交付 | 无/有 Skill 能力分 | 编译候选(无/有) | 逐项证据 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | --- | +| 5.6 Luna / medium | 46.4% | 87.6% | +41.2pp | 45.5% / 84.5% | 41.1% / 86.4% | 37/39 / 38/39 | [查看](model-runs/luna-medium/benchmark.md) | +| 5.6 Terra / medium | 52.4% | 95.8% | +43.3pp | 52.4% / 95.8% | 46.9% / 96.1% | 39/39 / 39/39 | [查看](model-runs/terra-medium/benchmark.md) | +| 5.6 Sol / high | 60.3% | 97.0% | +36.7pp | 54.5% / 97.0% | 55.8% / 96.5% | 35/39 / 39/39 | [查看](model-runs/sol-high/benchmark.md) | +| 整体均值 | 53.0% | 93.4% | +40.4pp | 50.8% / 92.4% | 47.9% / 93.0% | — | — | + +## 结论边界 + +该结论覆盖冻结的 13 个场景、三个生成模型以及每种配置三次采样;不包含旧版 Skill 对照。它验证源码契约与隔离 Web 编译,不等同于真实浏览器 E2E。各模型的完整结果、评分和逐文件编译证据位于 `model-runs//`。 diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/eval_metadata.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/eval_metadata.json new file mode 100644 index 0000000000..6dc3135d0d --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/eval_metadata.json @@ -0,0 +1,62 @@ +{ + "eval_id": 0, + "eval_name": "storefront-style-compat", + "complexity": "normal", + "focus": "web-style-isolation/webview-small-font", + "business_scenario": "社区电商小程序首页商品瀑布流", + "prompt": "附件中的商城首页在目标业务 WebView 中出现价格单位异常放大、局部样式相互影响和卡片排版偏移,标准浏览器与微信小程序表现正常。请修复目标 WebView 的显示问题,同时保持现有视觉、分类、商品详情和购物车链路。输出修改后的完整首页和商品卡文件。", + "files": [ + "input/src/pages/home/index.mpx", + "input/src/components/product-card.mpx" + ], + "outputs": [ + "src/pages/home/index.mpx", + "src/components/product-card.mpx" + ], + "preserves_cases": [ + "iteration-4/eval-0-small-font", + "iteration-4/eval-1-style-isolation" + ], + "assertions": [ + { + "id": "w0", + "text": "候选商品卡文件通过 scoped 建立可直接验证的 Web 组件级样式隔离;小程序 JSON 的 styleIsolation 不能替代这项 Web 证据", + "category": "web-style" + }, + { + "id": "w1", + "text": "商品图片使用稳定业务类选择器,不依赖 image 标签选择器", + "category": "web-style" + }, + { + "id": "w2", + "text": "首页标题、商品标题和商品圆角图片继续保持各自视觉", + "category": "cross-platform-regression" + }, + { + "id": "w3", + "text": "小程序保留币种与单位的原始 10px 字号", + "category": "cross-platform-regression" + }, + { + "id": "w4", + "text": "目标 WebView 中币种与单位先以不触发强制放大的基础字号排版,再缩放回约 10px 的视觉字号", + "category": "web-style" + }, + { + "id": "w5", + "text": "目标 WebView 的缩放补偿具有与基线方向一致的 transform-origin,且校正 flex 布局占位,不改变卡片宽度或价格行基线", + "category": "web-style" + }, + { + "id": "w6", + "text": "小字号补偿仅隔离在 Web 输出", + "category": "conditional-compile" + }, + { + "id": "w7", + "text": "商城首页仍保留分类切换、商品详情和加入购物车业务链路", + "category": "business-regression" + } + ] +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/components/product-card.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/components/product-card.mpx new file mode 100644 index 0000000000..6239682078 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/components/product-card.mpx @@ -0,0 +1,174 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/pages/home/index.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/pages/home/index.mpx new file mode 100644 index 0000000000..019fc15148 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/input/src/pages/home/index.mpx @@ -0,0 +1,203 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/components/product-card.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/components/product-card.mpx new file mode 100644 index 0000000000..cb2a775394 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/components/product-card.mpx @@ -0,0 +1,186 @@ + + + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/pages/home/index.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/pages/home/index.mpx new file mode 100644 index 0000000000..8f00ce5ae2 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/outputs/src/pages/home/index.mpx @@ -0,0 +1,199 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/published_source.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/published_source.json new file mode 100644 index 0000000000..65ca4125ba --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/published_source.json @@ -0,0 +1,11 @@ +{ + "slug": "sol-high", + "label": "5.6 Sol / high", + "model": "gpt-5.6-sol", + "reasoning_effort": "high", + "run_number": 2, + "functional_rate": 1.0, + "strict_rate": 1.0, + "selection": "median functional score across three models and three samples", + "source": "model-runs/sol-high/eval-0-storefront-style-compat/mpx2web/run-2" +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/agent.jsonl b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/agent.jsonl new file mode 100644 index 0000000000..0d50652707 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/agent.jsonl @@ -0,0 +1,27 @@ +{"type":"thread.started","thread_id":"01a070e0-61fb-7760-94ee-19ea27cedbf8"} +{"type":"turn.started"} +{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"我会先完整读取你指定的 `mpx2web` Skill,再按它的路由仅打开本题需要的 reference;之后只检查两个输入文件,并只写两个声明的输出文件。"}} +{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,240p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/SKILL.md\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_1","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,240p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/SKILL.md\"","aggregated_output":"---\nname: mpx2web\ndescription: Mpx 输出 Web(Mpx2Web)的 Web-only 差异指南,聚焦 Web 配置、浏览器能力、H5 SDK、Vue 组件、Web CSS、路由部署、SSR/SEO 与 Web 运行时差异。用于把已有 Mpx 页面或组件适配到 Web、排查 Web 构建或运行问题,以及核对跨端业务是否退化。\nmetadata:\n version: \"1.9.4\"\n author: wangcuijuan\n---\n\n# Mpx2Web Web-only 差异指南\n\n## 定位\n\n本 SKILL 只保留 Mpx 输出 Web 时的 **Web-only** 内容。输入文件已经提供的普通 Mpx 结构与项目既有写法就是默认基线;不要为了补充通用背景而预读其它跨端 Skill,也不要把 RN-only 结论带入 Web 任务。仅当具体通用语法无法从输入与本仓库确定时,才查询对应 Mpx 官方资料或项目源码中的单个符号。\n\nWeb-only 内容包括:\n\n- Web 运行时配置:路由、部署路径、挂载节点、分包、异步组件、SSR。\n- 浏览器能力:DOM、`window` / `document`、HTML/SVG 原生标签、Web 标准无障碍属性。\n- H5 生态:第三方 H5 SDK、Vue 组件、自定义 Web 内建组件。\n- Web 样式:`rpx` 到 Web 单位转换、viewport、浏览器私有 CSS 与浏览器页面滚动差异。\n- Web 降级:浏览器无法提供的宿主能力在 Web 下的替代方向。\n\n## 知识归属原则\n\n本入口只负责判断和路由,不重复维护各维度事实:\n\n- 配置键、页面配置、路由、分包与挂载统一由 `web-json-reference.md` 维护。\n- 模板语法、事件转换、内建组件属性/事件与缺失组件统一由 `web-template-reference.md` 维护。\n- 实例、生命周期和宿主语义差异统一由 `web-script-reference.md` 维护。\n- DOM、H5 SDK、Vue 组件和自定义内建组件统一由 `web-hybrid-dev.md` 维护。\n- SSR 生命周期、服务端限制、状态注水与 hydrate 统一由 `ssr-reference.md` 维护。\n- WebView 协议、白名单与来源安全统一由 `webview-bridge-reference.md` 维护。\n- API 支持表与任务实例语义统一由 `web-api-reference.md` 维护。\n\n遇到具体能力时读取唯一归属文件,不凭通用 Vue/Web 经验推断,也不要把摘要复制到其它 reference。\n\n## 知识库索引\n\n| 知识库 | 何时读取 |\n| --- | --- |\n| [条件编译](./references/conditional-compile.md) | 判断某段逻辑是否属于 Web-only,是否应隔离到 Web 输出 |\n| [Web 模板能力参考](./references/web-template-reference.md) | 使用 HTML/SVG 原生标签、Web 标准属性、核对 Web 内建基础组件能力或处理 Web 缺失/降级组件时读取 |\n| [Web 脚本能力参考](./references/web-script-reference.md) | 处理 Web 页面状态、生命周期、实例差异与宿主语义时读取;配置和 SSR 细节转到各自专项 |\n| [Web 样式实践](./references/web-style-practice.md) | 处理 Web 下的 `rpx` 转换、viewport、浏览器私有 CSS 与页面滚动差异时读取 |\n| [Web 环境 API 参考](./references/web-api-reference.md) | 核对 `@mpxjs/api-proxy` 在 Web 的浏览器实现与不可用能力时读取 |\n| [Web JSON 配置参考](./references/web-json-reference.md) | 处理 Web 路由、tabBar、分包、异步组件、Web 配置时读取 |\n| [H5 生态混合开发](./references/web-hybrid-dev.md) | 接入 DOM、H5 SDK、Vue 组件、自定义 Web 内建组件时读取 |\n| [WebView Bridge 参考](./references/webview-bridge-reference.md) | 在 `web-view` 嵌入页中使用 `@mpxjs/webview-bridge`,处理消息、导航、自定义 API、宿主 SDK 与来源安全时读取 |\n| [SSR 专项参考](./references/ssr-reference.md) | 处理 SSR、SEO、服务端数据预取、状态注水与切换竞态、同构请求层、异步分包 hydrate 时读取 |\n\n## Web-only 判断\n\n改造或新建前先判断问题是否真的属于 Web-only:\n\n- 只是普通模板、普通脚本、普通样式或普通 JSON 配置:沿用输入与仓库现有写法,不加载 Web 专项 reference。\n- 需要浏览器对象、DOM、H5 SDK、Vue 组件、Web-only CSS:使用本 skill。\n- 需要 Web 路由、部署、分包、异步组件、SSR/SEO:使用本 skill。\n- Web 下缺失某类宿主能力,需要 Web 替代方案:使用本 skill。\n- 需要判断某个基础组件在 Web 下是否可用:读取 Web 模板能力参考中的组件说明,按其中明确列出的能力使用。\n\n## 既有行为保护线\n\n- 不因命名偏好批量把 `wx.xxx` 改成 `mpx.xxx`,也不做反向替换;先按输入项目的 API Proxy 安装方式和现有可编译写法判断。只有目标端确实不支持当前调用契约时才改 API。\n- 标准 `wx:ref` 可以继续跨端使用;只有 ref 名称或调用链本身存在平台差异时才使用 `ref@web`。平台隔离应落在真正有差异的能力上,而不是装饰所有属性。\n- 保留仍有业务语义的 `navigator` 和 `open-type`。`navigateTo` 是脚本 API,声明式 `navigator` 对应值是 `navigate`;只有 EventChannel 等声明式标签无法表达的回调契约才改成脚本导航。\n- 视口悬浮元素应保持 `position: fixed` 并移出带 transform 的滚动内容;不要为了绕开 transform 改成相对容器的 `absolute`。\n- `.mpx` 模板使用 `bindscroll` / `bindscrolltoupper` / `bindscrolltolower`,Vue 2 自定义实现内部才使用 `@scroll` / `v-on`;不要把两套模板语法互换。\n\n## 任务流程\n\n1. 先读输入和任务症状,建立“能力台账”:逐项列出任务要求、原有业务不变量、对应输出文件、实现入口和验证方式。优先保留可工作的代码,只修改能解释症状的最小范围。不得把多个独立要求合并成一句笼统的“已兼容”。\n2. 使用知识库目录或文本搜索定位对应小节,只读取解决当前问题需要的段落;不要整篇读取大型 reference,不要扫描整个运行时源码。reference 仍不明确时,只查询对应组件、配置键或 API 的实现符号。\n3. 定位 Web-only 差异点:能力缺失、浏览器增强、H5 生态接入、Web 配置或 SSR。\n4. 优先保持通用 Mpx 实现不变,只把 Web-only 片段隔离出来;浏览器私有 CSS 的每一次出现都必须位于 Web-only 样式块或完整配对的 Web 条件块中。条件语法必须与所在区块匹配:模板节点使用 `@web` / `@wx` 或 `wx:if=\"{{__mpx_mode__ === 'web'}}\"`,模板属性和事件使用 `属性@mode`,脚本使用真实的 `if (__mpx_mode__ ...)`,动态 JSON 使用 `\n\n\n\n\n\n\n\n\n\n\n\n","exit_code":0,"status":"completed"}} +{"type":"item.started","item":{"id":"item_4","type":"command_execution","command":"/bin/zsh -lc \"sed -n '18,79p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/references/web-style-practice.md && sed -n '95,119p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/references/web-style-practice.md\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_4","type":"command_execution","command":"/bin/zsh -lc \"sed -n '18,79p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/references/web-style-practice.md && sed -n '95,119p' /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/references/web-style-practice.md\"","aggregated_output":"## rpx 转换与 viewport\n\nWeb 输出下样式中的 `rpx` 默认会转换为视口单位,换算基准为 `750rpx = 100vw`。\n\n`webConfig.transRpxFn` 可自定义 Web 输出的 `rpx` 转换规则,例如转为 `rem` 或其它单位。\n\n```js\nmodule.exports = {\n pluginOptions: {\n mpx: {\n plugin: {\n webConfig: {\n transRpxFn: function (match, value) {\n if (value === '0') return value\n return `${value * 0.01}rem`\n }\n }\n }\n }\n }\n}\n```\n\n移动端 Web 页面需要在 HTML 模板中配置正确的 viewport;Mpx 样式文件本身不负责注入 viewport。\n\n---\n\n## 选择器与基础标签转换\n\nWeb 编译会把 `view`、`image` 等小程序基础标签转换为原生标签或 `mpx-*` 内建 Vue 组件,源模板标签名不保证保留到最终 DOM。业务样式不要依赖基础标签选择器或在类选择器下嵌套基础标签选择器,应给目标节点添加稳定类名。\n\n```html\n\n \n\n```\n\n```css\n.card-image {\n width: 50px;\n height: 50px;\n}\n```\n\n不要使用 `.card image { ... }` 推断转换后的节点结构。类选择器还能避免自定义 Web 内建组件或编译映射变化导致样式失效。\n\n---\n\n## 组件样式隔离\n\nWeb 默认使用普通 CSS 级联,不会自动复刻微信小程序的组件样式隔离。需要隔离组件样式时,在样式块添加 `scoped`:\n\n```html\n\n```\n\n也可以通过 Mpx 编译配置 `autoScopeRules` 按 `include` / `exclude` 批量启用作用域。选择哪种方式取决于项目是否需要统一隔离;不要把支付宝或小程序运行时的 `styleIsolation` 字段直接当作 Web 的隔离实现。\n\n---\n## 小字号兼容\n\nMpx2Web 没有统一的 `12px` 最小字号限制,标准浏览器通常可以渲染 `10px` 等更小字号。部分目标浏览器、WebView、系统字体设置或文本自动调整策略可能把小字号钳制或放大;只有在目标环境实测存在该问题时,才使用较大基础字号配合 `transform: scale()`。不要把环境兼容现象写成所有 Web 输出都成立的框架限制。\n\nCSS transform 只改变绘制结果,不会缩小 flex/inline 布局中的原始排版盒。若把 `12px` 文本缩放到视觉上的 `10px`,仍按 `12px` 盒子占位会改变价格行间距、卡片有效宽度或基线。兼容方案必须同时满足:\n\n- `transform-origin` 与排版方向一致;左到右文本通常使用左侧与基线方向的原点,例如 `left bottom`,不要无依据使用中心缩放。\n- 用包裹层的明确视觉宽度、匹配的 `width`/`flex-basis`,或按缩放差值计算的负尾边距补偿占位。补偿值应由基础字号、缩放比例和实际字形/设计宽度推导,不要复制固定像素。\n- 在真实 WebView 验证父级卡片宽度、相邻金额间距和整行 baseline;只出现 `scale()` 与 `transform-origin` 不能证明布局已对齐。\n\n下面仅展示“12px 排版盒缩到 10px,并把多出的 2px 占位收回”的结构,实际宽度应按业务字形测量:\n\n```css\n.small-text {\n display: inline-block;\n width: 12px;\n font-size: 12px;\n transform: scale(0.833333);\n transform-origin: left bottom;\n margin-inline-end: -2px;\n}\n```\n\n---\n\n","exit_code":0,"status":"completed"}} +{"type":"item.completed","item":{"id":"item_5","type":"agent_message","text":"已定位到可解释全部症状的最小修复:页面与组件样式在 Web 默认级联下互相污染,且商品图依赖基础标签选择器;目标 WebView 还会放大 10px 的价格单位。修复会给两处样式加作用域、改用稳定类选择器,并仅在 Web 输出中用 12px→10px 缩放且回收 2px 布局占位。分类、详情跳转和加购脚本均不改。"}} +{"type":"item.started","item":{"id":"item_6","type":"file_change","changes":[{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/components/product-card.mpx","kind":"add"},{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/pages/home/index.mpx","kind":"add"}],"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_6","type":"file_change","changes":[{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/components/product-card.mpx","kind":"add"},{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/pages/home/index.mpx","kind":"add"}],"status":"completed"}} +{"type":"item.completed","item":{"id":"item_7","type":"agent_message","text":"两个完整输出文件已生成。现在按 Skill 要求回读输出,并先做条件编译语义检查;随后分别尝试商品卡组件和首页页面的 Web 真实编译,若当前最小工作区缺少业务构建依赖,我会明确记录该限制。"}} +{"type":"item.started","item":{"id":"item_8","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,260p' outputs/src/pages/home/index.mpx && sed -n '1,320p' outputs/src/components/product-card.mpx\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_8","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,260p' outputs/src/pages/home/index.mpx && sed -n '1,320p' outputs/src/components/product-card.mpx\"","aggregated_output":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","exit_code":0,"status":"completed"}} +{"type":"item.started","item":{"id":"item_9","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/validate-conditional-compile.js outputs/src/pages/home/index.mpx outputs/src/components/product-card.mpx'","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_9","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/validate-conditional-compile.js outputs/src/pages/home/index.mpx outputs/src/components/product-card.mpx'","aggregated_output":"[ok] checked 2 file(s)\n","exit_code":0,"status":"completed"}} +{"type":"item.started","item":{"id":"item_10","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/compile-validate.js outputs/src/components/product-card.mpx --target=web'","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.started","item":{"id":"item_11","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/compile-validate.js outputs/src/pages/home/index.mpx --type=page --target=web'","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_11","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/compile-validate.js outputs/src/pages/home/index.mpx --type=page --target=web'","aggregated_output":"MpxCliNotFoundError: 未找到安装了 @mpxjs/mpx-cli-service 的业务项目,无法执行真实编译校验。起点: /private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/pages/home/index.mpx\n","exit_code":2,"status":"failed"}} +{"type":"item.completed","item":{"id":"item_10","type":"command_execution","command":"/bin/zsh -lc 'node /Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web/scripts/compile-validate.js outputs/src/components/product-card.mpx --target=web'","aggregated_output":"MpxCliNotFoundError: 未找到安装了 @mpxjs/mpx-cli-service 的业务项目,无法执行真实编译校验。起点: /private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev/outputs/src/components/product-card.mpx\n","exit_code":2,"status":"failed"}} +{"type":"item.completed","item":{"id":"item_12","type":"agent_message","text":"条件编译检查已通过(2/2)。两个真实 Web 编译入口都已按 Skill 分别执行,但该固定工作区未安装 `@mpxjs/mpx-cli-service`,因此编译器在启动前即报告 `MpxCliNotFoundError`;这是验证环境缺失,不是文件语法报错。最后我会用仅涉及输入/输出的差异检查,确认业务模板与脚本没有被改动。"}} +{"type":"item.started","item":{"id":"item_13","type":"command_execution","command":"/bin/zsh -lc 'diff -u input/src/pages/home/index.mpx outputs/src/pages/home/index.mpx; diff -u input/src/components/product-card.mpx outputs/src/components/product-card.mpx'","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_13","type":"command_execution","command":"/bin/zsh -lc 'diff -u input/src/pages/home/index.mpx outputs/src/pages/home/index.mpx; diff -u input/src/components/product-card.mpx outputs/src/components/product-card.mpx'","aggregated_output":"--- input/src/pages/home/index.mpx\t2026-08-28 21:20:59\n+++ outputs/src/pages/home/index.mpx\t2026-09-05 17:24:28\n@@ -113,7 +113,7 @@\n })\n \n \n-\n \n+\n+\n + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/outputs/src/pages/home/index.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/outputs/src/pages/home/index.mpx new file mode 100644 index 0000000000..8f00ce5ae2 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/outputs/src/pages/home/index.mpx @@ -0,0 +1,199 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/run.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/run.json new file mode 100644 index 0000000000..2bfeea4565 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/run.json @@ -0,0 +1,41 @@ +{ + "description": "Eval-0 mpx2web run-2", + "configuration": "mpx2web", + "run_number": 2, + "model": "gpt-5.6-sol", + "reasoning_effort": "high", + "cwd": "isolated temporary workspace", + "command": [ + "codex", + "exec", + "--ignore-user-config", + "--ephemeral", + "--disable", + "plugins", + "--disable", + "remote_plugin", + "--disable", + "apps", + "--skip-git-repo-check", + "-C", + "/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-7j826zev", + "-s", + "workspace-write", + "-m", + "gpt-5.6-sol", + "-c", + "model_reasoning_effort=\"high\"", + "--color", + "never", + "--json", + "" + ], + "returncode": 0, + "outputs_complete": true, + "compile_status": "passed", + "compile_boundary": "所有声明输出逐文件检查条件编译语义;所有可作为 page/component 入口的 .mpx 均逐文件执行真实 Web 编译;app.mpx、HTML 和独立配置仅做完整性门禁,JS 另做语法检查。", + "duration_ms": 173385, + "fingerprint": "2a3ff298d4a976168877032773e340355660a173fa3b257e3e5c724e5c6be62e", + "fixture_digest": "ad95b9ecc465ab9f72a6aa62649af4b2c8374ba3632380d5182d93a914f27212", + "skill_digest": "1f123b81a318ea271594c560de2eab455e72e094edaaa74da9063b92d8c61169" +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/timing.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/timing.json new file mode 100644 index 0000000000..2dca9c0ef7 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/mpx2web/run-1/timing.json @@ -0,0 +1,5 @@ +{ + "total_tokens": 237640, + "duration_ms": 173385, + "total_duration_seconds": 173.385 +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/components/product-card.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/components/product-card.mpx new file mode 100644 index 0000000000..cfade3f021 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/components/product-card.mpx @@ -0,0 +1,190 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/pages/home/index.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/pages/home/index.mpx new file mode 100644 index 0000000000..050344fb25 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/outputs/src/pages/home/index.mpx @@ -0,0 +1,203 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/published_source.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/published_source.json new file mode 100644 index 0000000000..30b03d3bfa --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/published_source.json @@ -0,0 +1,11 @@ +{ + "slug": "sol-high", + "label": "5.6 Sol / high", + "model": "gpt-5.6-sol", + "reasoning_effort": "high", + "run_number": 2, + "functional_rate": 0.375, + "strict_rate": 0.375, + "selection": "median functional score across three models and three samples", + "source": "model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2" +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/agent.jsonl b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/agent.jsonl new file mode 100644 index 0000000000..af58764c4f --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/agent.jsonl @@ -0,0 +1,18 @@ +{"type":"thread.started","thread_id":"01a06389-ff1c-7722-be45-a6e4ed7f484b"} +{"type":"turn.started"} +{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"我会按要求只读取两个输入文件,以及本任务适用的 `mpx-development-guides` Skill 和它明确指定的相关参考;不会读取任何 Mpx2Web Skill、旧输出、评分、benchmark、review.html 或其他组文件。接下来只会写入两个声明的输出路径。"}} +{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,240p' /Users/didi/.agents/skills/mpx-development-guides/SKILL.md\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_1","type":"command_execution","command":"/bin/zsh -lc \"sed -n '1,240p' /Users/didi/.agents/skills/mpx-development-guides/SKILL.md\"","aggregated_output":"---\nname: mpx-development-guides\ndescription: Mpx 框架开发指南集合,包含项目结构、开发语法、跨端输出、分包配置等,当用户询问 Mpx 开发相关问题时强制调用。\n---\n\n# Mpx 开发指南\n\n本 Skill 提供了 Mpx 框架的基础开发指南索引。Mpx 是一款致力于提高小程序开发体验和开发效率的增强型小程序框架。\n\n## 1. Mpx 框架简介\nMpx 是对小程序原生开发标准的补强和扩充,支持单文件开发、数据响应、增强模板语法等。\n- **详细介绍**: [intro.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/intro.md)\n\n## 2. 快速开始\n- **项目创建与运行**: [start.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/start.md)\n- **项目结构**: [project-structure.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/project-structure.md)\n- **IDE 配置**: [ide.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/ide.md)\n\n## 3. 核心概念\nMpx 的核心由 App、Page 和 Component 组成。\n- **App (应用实例)**: [app.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/app.md) - 介绍 App 的生命周期、全局配置等。\n- **Page (页面)**: [page.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/page.md) - 介绍页面的创建、生命周期、配置等。\n- **Component (组件)**: [component.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/component.md) - 介绍自定义组件的创建、属性、生命周期、插槽等。\n\n## 4. 基础语法\nMpx 支持类似 Vue 的开发体验。\n- **单文件组件 (SFC)**: [single-file.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md)\n- **模板语法**: [template.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/template.md)\n- **数据绑定**: [data-binding.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/data-binding.md)\n- **列表渲染 (wx:for)**: [list-render.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/list-render.md)\n- **条件渲染 (wx:if)**: [conditional-render.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/conditional-render.md)\n- **事件处理**: [event.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/event.md)\n- **样式处理 (CSS)**: [css.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/css.md)\n- **Class 与 Style 绑定**: [class-style-binding.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/class-style-binding.md)\n\n## 5. 响应式系统\nMpx 提供了强大的数据响应能力。\n- **响应式原理**: [reactive.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/reactive.md) - 包含 watch, computed 等。\n- **双向绑定**: [two-way-binding.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/two-way-binding.md) - wx:model 语法。\n- **引用 (Refs)**: [refs.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/refs.md)\n\n## 6. 其他\n- **生命周期**: [lifecycle.md](file:///Users/didi/work/mpx/docs-vitepress/guide/basic/lifecycle.md)\n\n使用此 Skill 时,请根据用户的问题查阅上述对应的文档文件,并提供准确的代码示例和解释。\n","exit_code":0,"status":"completed"}} +{"type":"item.completed","item":{"id":"item_2","type":"agent_message","text":"`mpx-development-guides` 要求按问题查阅对应文档。这里主要涉及单文件组件结构、页面/组件边界和样式处理,我会读取其中直接对应的 `single-file.md`、`page.md`、`component.md`、`css.md`,据此进行兼容修复。"}} +{"type":"item.started","item":{"id":"item_3","type":"command_execution","command":"/bin/zsh -lc \"wc -l /Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md /Users/didi/work/mpx/docs-vitepress/guide/basic/page.md /Users/didi/work/mpx/docs-vitepress/guide/basic/component.md /Users/didi/work/mpx/docs-vitepress/guide/basic/css.md && sed -n '1,260p' /Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md && sed -n '1,320p' /Users/didi/work/mpx/docs-vitepress/guide/basic/page.md && sed -n '1,360p' /Users/didi/work/mpx/docs-vitepress/guide/basic/component.md && sed -n '1,360p' /Users/didi/work/mpx/docs-vitepress/guide/basic/css.md\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_3","type":"command_execution","command":"/bin/zsh -lc \"wc -l /Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md /Users/didi/work/mpx/docs-vitepress/guide/basic/page.md /Users/didi/work/mpx/docs-vitepress/guide/basic/component.md /Users/didi/work/mpx/docs-vitepress/guide/basic/css.md && sed -n '1,260p' /Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md && sed -n '1,320p' /Users/didi/work/mpx/docs-vitepress/guide/basic/page.md && sed -n '1,360p' /Users/didi/work/mpx/docs-vitepress/guide/basic/component.md && sed -n '1,360p' /Users/didi/work/mpx/docs-vitepress/guide/basic/css.md\"","aggregated_output":"wc: /Users/didi/work/mpx/docs-vitepress/guide/basic/single-file.md: open: No such file or directory\nwc: /Users/didi/work/mpx/docs-vitepress/guide/basic/page.md: open: No such file or directory\nwc: /Users/didi/work/mpx/docs-vitepress/guide/basic/component.md: open: No such file or directory\nwc: /Users/didi/work/mpx/docs-vitepress/guide/basic/css.md: open: No such file or directory\n 0 total\n","exit_code":1,"status":"failed"}} +{"type":"item.completed","item":{"id":"item_4","type":"agent_message","text":"Skill 索引中的相关参考路径在当前环境不存在,因此无法继续读取这些 reference;我会遵循已读取的 Skill 基础约束,并基于两个指定输入文件做最小范围修复。现在检查两份输入的完整内容。"}} +{"type":"item.started","item":{"id":"item_5","type":"command_execution","command":"/bin/zsh -lc \"wc -l input/src/pages/home/index.mpx input/src/components/product-card.mpx && sed -n '1,500p' input/src/pages/home/index.mpx && sed -n '1,500p' input/src/components/product-card.mpx\"","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_5","type":"command_execution","command":"/bin/zsh -lc \"wc -l input/src/pages/home/index.mpx input/src/components/product-card.mpx && sed -n '1,500p' input/src/pages/home/index.mpx && sed -n '1,500p' input/src/components/product-card.mpx\"","aggregated_output":" 203 input/src/pages/home/index.mpx\n 174 input/src/components/product-card.mpx\n 377 total\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","exit_code":0,"status":"completed"}} +{"type":"item.completed","item":{"id":"item_6","type":"agent_message","text":"问题来源已经定位到三类兼容风险:价格区域混用了 `px` 与 `rpx`;首页和商品卡都使用了通用 `.title`,且首页还有裸 `image` 选择器,在样式隔离实现不完整的 WebView 中会串扰;卡片与图片缺少明确的盒模型约束,边框串入后会导致宽度和排版偏移。修复会保留模板事件、接口、分类切换、详情跳转和加购逻辑,只收紧类名/选择器并统一尺寸单位。"}} +{"type":"item.started","item":{"id":"item_7","type":"command_execution","command":"/bin/zsh -lc 'test -d outputs/src/pages/home && test -d outputs/src/components'","aggregated_output":"","exit_code":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_7","type":"command_execution","command":"/bin/zsh -lc 'test -d outputs/src/pages/home && test -d outputs/src/components'","aggregated_output":"","exit_code":0,"status":"completed"}} +{"type":"item.started","item":{"id":"item_8","type":"file_change","changes":[{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/components/product-card.mpx","kind":"add"},{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/pages/home/index.mpx","kind":"add"}],"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_8","type":"file_change","changes":[{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/components/product-card.mpx","kind":"add"},{"path":"/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/pages/home/index.mpx","kind":"add"}],"status":"completed"}} +{"type":"item.completed","item":{"id":"item_9","type":"agent_message","text":"已完成目标 WebView 兼容修复:\n\n- 价格区域由 `px` 等值转换为 `rpx`,避免单位异常放大。\n- 首页与商品卡样式全面命名空间化,消除 `.title`、裸 `image` 等样式串扰。\n- 补充明确盒模型、图片边框和文本收缩规则,修复卡片排版偏移。\n- 保留分类切换、商品详情跳转及购物车链路。\n\n输出文件:\n\n- [首页 index.mpx](/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/pages/home/index.mpx)\n- [商品卡 product-card.mpx](/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so/outputs/src/components/product-card.mpx)"}} +{"type":"turn.completed","usage":{"input_tokens":98620,"cached_input_tokens":75520,"cache_write_input_tokens":0,"output_tokens":6462,"reasoning_output_tokens":1976}} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/compile.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/compile.json new file mode 100644 index 0000000000..c3b77fea9f --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/compile.json @@ -0,0 +1,93 @@ +{ + "compile_fingerprint": "7d1437c4542e8e28115624077b1c8d7ba557a32d2f939edb894b26b633a8bd71", + "status": "passed", + "all_declared_outputs_present": true, + "declared_output_count": 2, + "compile_eligible_mpx_count": 2, + "compiled_mpx_count": 2, + "checks": [ + { + "kind": "mpx-conditional-compile-semantics", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "checkedFiles": 1, + "files": [ + { + "file": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx", + "errors": [] + } + ] + }, + "stderr": "" + }, + { + "kind": "mpx-conditional-compile-semantics", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "checkedFiles": 1, + "files": [ + { + "file": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx", + "errors": [] + } + ] + }, + "stderr": "" + }, + { + "kind": "mpx-web-compile", + "type": "page", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "target": "web", + "projectRoot": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace", + "errors": [], + "warnings": [], + "summary": { + "total": 0, + "byCategory": {} + }, + "durationMs": 3033 + }, + "stderr": "" + }, + { + "kind": "mpx-web-compile", + "type": "component", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "target": "web", + "projectRoot": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace", + "errors": [], + "warnings": [], + "summary": { + "total": 0, + "byCategory": {} + }, + "durationMs": 2482 + }, + "stderr": "" + } + ], + "boundary": "所有声明输出逐文件检查条件编译语义;所有可作为 page/component 入口的 .mpx 均逐文件执行真实 Web 编译;app.mpx、HTML 和独立配置仅做完整性门禁,JS 另做语法检查。" +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/grading.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/grading.json new file mode 100644 index 0000000000..b9bbd10c5d --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/grading.json @@ -0,0 +1,227 @@ +{ + "eval_id": 0, + "eval_name": "storefront-style-compat", + "configuration": "no_skill", + "run_number": 2, + "grading_fingerprint": "bfd322193ae93c3fc526a0338948b773bf86446774a1a6d927ba8111fea56050", + "model_grading_fingerprint": "ca48b099a390f688ea8fe5771c799d9d28c6ede7943f320df37804624bb54a36", + "grader": { + "model": "gpt-5.5", + "reasoning_effort": "high", + "blind_configuration": true, + "duration_ms": 68860 + }, + "expectations": [ + { + "id": "w0", + "text": "候选商品卡文件通过 scoped 建立可直接验证的 Web 组件级样式隔离;小程序 JSON 的 styleIsolation 不能替代这项 Web 证据", + "category": "web-style", + "passed": false, + "evidence": "outputs/src/components/product-card.mpx:商品卡没有可从候选文件直接验证的 Web scoped 样式隔离。", + "verification_methods": [ + "independent_code_review", + "deterministic_check" + ], + "deterministic_check": { + "status": "fail", + "evidence": "outputs/src/components/product-card.mpx:商品卡没有可从候选文件直接验证的 Web scoped 样式隔离。" + } + }, + { + "id": "w1", + "text": "商品图片使用稳定业务类选择器,不依赖 image 标签选择器", + "category": "web-style", + "passed": true, + "evidence": "outputs/src/components/product-card.mpx:4 商品图片使用 class=\"product-cover\";65-72 通过 .product-card .product-cover 设置图片样式,未使用 image 标签选择器。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w2", + "text": "首页标题、商品标题和商品圆角图片继续保持各自视觉", + "category": "cross-platform-regression", + "passed": true, + "evidence": "outputs/src/pages/home/index.mpx:5/138-142 首页标题改为 home-title 且保留红色 40rpx 加粗;outputs/src/components/product-card.mpx:9/90-99 商品标题保留 30rpx、加粗、单行省略;65-72 商品图保留 300rpx 高度和 20rpx 20rpx 0 0 圆角。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w3", + "text": "小程序保留币种与单位的原始 10px 字号", + "category": "cross-platform-regression", + "passed": false, + "evidence": "input/src/components/product-card.mpx:122-125 原币种与单位为 font-size: 10px;outputs/src/components/product-card.mpx:128-131 改为 font-size: 20rpx,未保留小程序原始 10px 字号。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w4", + "text": "目标 WebView 中币种与单位先以不触发强制放大的基础字号排版,再缩放回约 10px 的视觉字号", + "category": "web-style", + "passed": false, + "evidence": "outputs/src/components/product-card.mpx:128-131 仅设置 font-size: 20rpx、line-height: 28rpx;全文件未出现 transform/scale 等将 WebView 基础字号缩放回约 10px 的处理。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w5", + "text": "目标 WebView 的缩放补偿具有与基线方向一致的 transform-origin,且校正 flex 布局占位,不改变卡片宽度或价格行基线", + "category": "web-style", + "passed": false, + "evidence": "outputs/src/components/product-card.mpx 全文件未出现 transform-origin、scale 或用于缩放后占位校正的宽度/负边距等补偿;120-125 价格行仍只是 flex、baseline、height: 64rpx。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w6", + "text": "小字号补偿仅隔离在 Web 输出", + "category": "conditional-compile", + "passed": false, + "evidence": "outputs/src/components/product-card.mpx:128-131 的币种与单位字号是通用样式,未使用 Web 专属条件样式或平台隔离;且不存在小字号缩放补偿。", + "verification_methods": [ + "independent_code_review" + ] + }, + { + "id": "w7", + "text": "商城首页仍保留分类切换、商品详情和加入购物车业务链路", + "category": "business-regression", + "passed": true, + "evidence": "outputs/src/pages/home/index.mpx:11-20 保留分类 tab 与 bindtap=\"switchCategory(item.id)\",79-95 保留分类切换和 fetchProducts;23-30 保留 product-card 的 bindselect/bindaddcart;97-110 保留详情 navigateTo 和加入购物车 POST 链路;outputs/src/components/product-card.mpx:40-45 保留 select/addcart 事件触发。", + "verification_methods": [ + "independent_code_review" + ] + } + ], + "summary": { + "passed": 3, + "failed": 5, + "total": 8, + "pass_rate": 0.375 + }, + "strict_delivery_summary": { + "passed": 3, + "failed": 5, + "total": 8, + "pass_rate": 0.375, + "compile_passed": true + }, + "metrics": { + "total_tokens": 105082, + "input_tokens": 98620, + "output_tokens": 6462, + "tool_calls": 5, + "duration_ms": 136557 + }, + "timing": { + "total_tokens": 105082, + "duration_ms": 136557, + "total_duration_seconds": 136.557 + }, + "compile": { + "compile_fingerprint": "7d1437c4542e8e28115624077b1c8d7ba557a32d2f939edb894b26b633a8bd71", + "status": "passed", + "all_declared_outputs_present": true, + "declared_output_count": 2, + "compile_eligible_mpx_count": 2, + "compiled_mpx_count": 2, + "checks": [ + { + "kind": "mpx-conditional-compile-semantics", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "checkedFiles": 1, + "files": [ + { + "file": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx", + "errors": [] + } + ] + }, + "stderr": "" + }, + { + "kind": "mpx-conditional-compile-semantics", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "checkedFiles": 1, + "files": [ + { + "file": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx", + "errors": [] + } + ] + }, + "stderr": "" + }, + { + "kind": "mpx-web-compile", + "type": "page", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/pages/home/index.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "target": "web", + "projectRoot": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace", + "errors": [], + "warnings": [], + "summary": { + "total": 0, + "byCategory": {} + }, + "durationMs": 3033 + }, + "stderr": "" + }, + { + "kind": "mpx-web-compile", + "type": "component", + "files": [ + "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace/iteration-11/model-runs/sol-high/eval-0-storefront-style-compat/no_skill/run-2/outputs/src/components/product-card.mpx" + ], + "passed": true, + "returncode": 0, + "detail": { + "success": true, + "target": "web", + "projectRoot": "/Users/didi/Documents/openSource1/mpx/.agents/skills/mpx2web-workspace", + "errors": [], + "warnings": [], + "summary": { + "total": 0, + "byCategory": {} + }, + "durationMs": 2482 + }, + "stderr": "" + } + ], + "boundary": "所有声明输出逐文件检查条件编译语义;所有可作为 page/component 入口的 .mpx 均逐文件执行真实 Web 编译;app.mpx、HTML 和独立配置仅做完整性门禁,JS 另做语法检查。" + }, + "claims": [], + "eval_feedback": { + "suggestions": [ + "断言对“Web 输出隔离”的可接受形式需要更明确:如果只接受 + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/outputs/src/pages/home/index.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/outputs/src/pages/home/index.mpx new file mode 100644 index 0000000000..050344fb25 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/outputs/src/pages/home/index.mpx @@ -0,0 +1,203 @@ + + + + + + + diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/run.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/run.json new file mode 100644 index 0000000000..c65ae27957 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/run.json @@ -0,0 +1,41 @@ +{ + "description": "Eval-0 no_skill run-2", + "configuration": "no_skill", + "run_number": 2, + "model": "gpt-5.6-sol", + "reasoning_effort": "high", + "cwd": "isolated temporary workspace", + "command": [ + "codex", + "exec", + "--ignore-user-config", + "--ephemeral", + "--disable", + "plugins", + "--disable", + "remote_plugin", + "--disable", + "apps", + "--skip-git-repo-check", + "-C", + "/private/var/folders/yf/mcf8m_nn1896w8kbdfxnhnw40000ks/T/mpx2web-eval-onu893so", + "-s", + "workspace-write", + "-m", + "gpt-5.6-sol", + "-c", + "model_reasoning_effort=\"high\"", + "--color", + "never", + "--json", + "" + ], + "returncode": 0, + "outputs_complete": true, + "compile_status": "passed", + "compile_boundary": "所有声明输出逐文件检查条件编译语义;所有可作为 page/component 入口的 .mpx 均逐文件执行真实 Web 编译;app.mpx、HTML 和独立配置仅做完整性门禁,JS 另做语法检查。", + "duration_ms": 136557, + "fingerprint": "cb79be57a5635e32c01e16a45db13257433bd382952b5cd941eff837343e1f45", + "fixture_digest": "ad95b9ecc465ab9f72a6aa62649af4b2c8374ba3632380d5182d93a914f27212", + "skill_digest": "20232f3aeb397f28e32d38cc016ce6dbffa2112effd52813b0cbec243c1307ce" +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/timing.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/timing.json new file mode 100644 index 0000000000..b426a29a20 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-0-storefront-style-compat/no_skill/run-1/timing.json @@ -0,0 +1,5 @@ +{ + "total_tokens": 105082, + "duration_ms": 136557, + "total_duration_seconds": 136.557 +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/eval_metadata.json b/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/eval_metadata.json new file mode 100644 index 0000000000..349a1a32a4 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/eval_metadata.json @@ -0,0 +1,79 @@ +{ + "eval_id": 1, + "eval_name": "community-publish-bridge", + "complexity": "normal", + "focus": "web-missing-host-api/conditional-isolation", + "business_scenario": "社区动态发布页的位置、地图与媒体选择", + "prompt": "社区动态发布页需要同时支持微信小程序和 Web。微信小程序已有位置选择、地图查看、图片选择和发布能力;Web 宿主的 Bridge、地图与媒体协议尚未确定,现阶段不能假定任何未声明接口。请完成安全的跨端改造并保留所有已支持业务,输出完整 .mpx 文件。", + "files": [ + "input/src/pages/community/publish.mpx" + ], + "outputs": [ + "src/pages/community/publish.mpx" + ], + "preserves_cases": [ + "iteration-4/eval-3-unsupported-api" + ], + "assertions": [ + { + "id": "a0", + "text": "非 Web 分支通过 wx.xxx 或应用入口已配置 API Proxy 的 mpx.xxx 直接调用 chooseLocation、openLocation 与 chooseMedia,不以动态方法名或自定义适配器改写宿主能力", + "category": "cross-platform-regression", + "required_patterns": [ + { + "pattern": "(?:wx|mpx)\\.chooseLocation\\s*\\(", + "description": "通过 wx 或 mpx 直接调用 chooseLocation" + }, + { + "pattern": "(?:wx|mpx)\\.openLocation\\s*\\(", + "description": "通过 wx 或 mpx 直接调用 openLocation" + }, + { + "pattern": "(?:wx|mpx)\\.chooseMedia\\s*\\(", + "description": "通过 wx 或 mpx 直接调用 chooseMedia" + } + ] + }, + { + "id": "a1", + "text": "Web 缺失能力只在 choosePlace、openPlace、choosePhoto 或由它们直接调用的专用 helper 中隔离;不得引入通用平台调用层,也不得改写请求、路由或提示能力", + "category": "conditional-compile" + }, + { + "id": "a2", + "text": "Web 位置选择在协议未确定时必须停留在可识别的待接入边界(空分支、注释或结构化占位均可,措辞不限),不得声明或调用虚构接口", + "category": "web-api" + }, + { + "id": "a3", + "text": "Web 地图打开在协议未确定时必须停留在可识别的待接入边界(空分支、注释或结构化占位均可,措辞不限),不得声明或调用虚构接口", + "category": "web-api" + }, + { + "id": "a4", + "text": "Web 媒体选择在协议未确定时必须停留在可识别的待接入边界(空分支、注释或结构化占位均可,措辞不限),不得声明或调用虚构接口", + "category": "web-api" + }, + { + "id": "a5", + "text": "未提供 Web 接入协议时,三项缺失能力及其专用 helper 不得采用或虚构 globalThis/window/document/navigator 上的 Bridge、SDK 或浏览器替代实现;文件中与这些能力无关的浏览器环境守卫不因此判错", + "category": "web-api" + }, + { + "id": "a6", + "text": "Web 已支持的请求、路由和提示继续走 Mpx 官方 API 链路:srcMode=wx 的源码可保留会被跨端编译转换的 wx.xxx,也可沿用项目现有的 mpx.xxx;仅在不依赖应用级 options/custom/Promise 化配置时使用 @mpxjs/api-proxy 命名导入。不得为输出 Web 改成 fetch、location.assign、alert 或无业务协议的自定义包装", + "category": "web-api", + "forbidden_patterns": [ + { + "pattern": "(?:\\bfetch\\s*\\(|\\blocation\\.assign\\s*\\(|\\balert\\s*\\()", + "description": "自行用 fetch、location.assign 或 alert 重实现已有能力" + } + ] + }, + { + "id": "a7", + "text": "发布内容、图片、位置、话题、评论开关与提交后详情跳转业务链路保持完整", + "category": "business-regression" + } + ] +} diff --git a/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/input/src/pages/community/publish.mpx b/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/input/src/pages/community/publish.mpx new file mode 100644 index 0000000000..df1eaaaaa3 --- /dev/null +++ b/.agents/skills/mpx2web-workspace/iteration-11/eval-1-community-publish-bridge/input/src/pages/community/publish.mpx @@ -0,0 +1,405 @@ +