feat(ux): add sitewide ui ux agent
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-03 00:41:49 +08:00
parent a95357db27
commit feeef99474
9 changed files with 584 additions and 4 deletions

View File

@@ -83,6 +83,7 @@ Baymard 的商品頁與比較 UX 研究強調:使用者需要清楚的 product
- AI visual QA surface rollout: `/observability/ppt_audit_history` 已套用 compact AI visual QA workbench guardrails`tests/test_ppt_audit_text_density_guardrails.py` 鎖住首屏短標籤、預覽/審核/修復核心訊號與 non-raw env/table wording。
- Route HTML readback rollout: high-visibility AI observability surfaces 已新增 Flask route-level rendered HTML guard`tests/test_admin_observability_routes.py::test_high_visibility_ai_surfaces_route_html_readback_keeps_compact_contract` 鎖住 10 個 route 的 compact density marker 與 non-raw engineering wording。
- Runtime HTML readback rollout: `/api/ai-automation/surface-html-readback` 與 AI smoke 已接入 high-visibility AI surface contract readback`tests/test_ai_automation_smoke_service.py` 鎖住 10 個 surface、退化偵測、smoke check 與 scheduled health family。
- Sitewide UI/UX Agent rollout: `/api/ai-automation/sitewide-ui-ux-agent` 掃描真正頁面模板並產生整站專業化 inventory`/api/ai-automation/sitewide-ui-ux-repair-package` 會輸出 no-write controlled repair package把主流產品頁原則轉成可排序、可驗證的修復項。
## 下一步 TODO 候選

View File

@@ -101,7 +101,7 @@
## P1 - Product Visibility And Professional Website Experience
狀態: 進行中,本輪已完成 `/ai_intelligence``/observability/overview``/ai_automation_smoke``/observability/agent_orchestration``/observability/ai_calls``/observability/quality_trend``/observability/budget``/observability/business_intel``/observability/host_health``/observability/rag_queries``/observability/promotion_review``/observability/ppt_audit_history` 密集 AI 工作台文字密度守門,並新增高可見 AI surfaces route-level HTML readback 防退化 guardruntime AI smoke readback。
狀態: 進行中,本輪已完成 `/ai_intelligence``/observability/overview``/ai_automation_smoke``/observability/agent_orchestration``/observability/ai_calls``/observability/quality_trend``/observability/budget``/observability/business_intel``/observability/host_health``/observability/rag_queries``/observability/promotion_review``/observability/ppt_audit_history` 密集 AI 工作台文字密度守門,並新增高可見 AI surfaces route-level HTML readback 防退化 guardruntime AI smoke readback 與整站 UI/UX Agent inventory
目的: 讓 AI 自動化在產品裡可見,成為專業營運工作流,而不是只藏在後端。
@@ -177,6 +177,11 @@
- `/api/ai-automation/smoke` 已加入 `AI surface HTML readback`,從 7 項 smoke 擴充為 8 項。
- `/api/ai-automation/scheduled-health-summary` 已輸出 `ai_surface_html_readback` family讓排程健康摘要也能看見產品頁退化。
- 此檢查不寫 DB、不發通知、不要求 browser失敗時 next machine action 是 `repair_ai_surface_html_contract`
- 整站 UI/UX Agent inventory 已完成:
- `/api/ai-automation/sitewide-ui-ux-agent` 會掃描真正頁面模板,排除 partial/components/base layouts。
- 當前基線: 55 個頁面模板、31 個高優先模板、14 個 compact guardrail、15 個待專業化、0 個 raw engineering leak。
- `/api/ai-automation/sitewide-ui-ux-repair-package` 會產生 no-write controlled repair package優先修復高曝光頁且不寫 DB、不執行 shell、不讀 secrets。
- 第一批 controlled UI/UX repair 已套用到 `ai_history``ai_recommend`,整站 Agent 已回讀 issue count 從 17 降為 15。
已完成 / 下一步,必須照順序:
@@ -189,6 +194,8 @@
3. 增加 route / HTML readback避免產品頁退回 raw engineering wording。
- 已完成: 高可見 AI observability surfaces 已有 route-level rendered HTML guard。
- 已完成: 高可見 AI surface readback 已接入 runtime smoke 與 scheduled health summary。
4. 啟動整站 UI/UX Agent將所有頁面依主流專業 guardrails 排序並產生 controlled repair package。
- 已完成: Sitewide UI/UX Agent inventory 與 repair package API。
完成標準:
@@ -308,6 +315,7 @@
| P1.11 | PPT audit compact AI visual QA workbench guardrails | 已完成 | `/observability/ppt_audit_history` first viewport hides explanatory copy and avoids env/table wording; focused density guard test | P1.12 route-level HTML readback guard |
| P1.12 | High-visibility AI surface route HTML readback guard | 已完成 | 10 observability routes render compact markers and block raw engineering wording in Flask client readback | Continue P1 surface sweep and P3 automation expansion |
| P1.13 | Runtime AI surface HTML readback automation | 已完成 | `/api/ai-automation/surface-html-readback` + AI smoke check + scheduled health family + focused tests | P3 safe lane expansion |
| P1.14 | Sitewide UI/UX Agent inventory and repair package | 已完成 | 55 page templates inventoried, 31 high-priority, 15 controlled repair candidates, 0 raw engineering leaks; first repairs applied to `ai_history` and `ai_recommend` | Apply next controlled UI/UX repairs |
| P2.1 | External benchmark encoded into requirements | 已完成 | benchmark guide + focused guard test + first-viewport status | P3.1 safe lane expansion |
| P3.1 | Extend receipt / replay / drift pattern to more lanes | 已完成 | direct mapping candidate decision lane closeout route + focused tests | P3.2 scheduled automation health summaries |
| P3.2 | Scheduled automation health summaries | 已完成 | `/api/ai-automation/scheduled-health-summary` + smoke service focused tests | P3.3 rollback evidence packages |