Files
ewoooc/templates/daily_report_v2.j2
OoO 838267c293 feat(p1+p3): logger 接 13 caller + Q&A/Nemotron/日報 feature flag 灰度
Phase 1 A4 — 13 個呼叫點接 ai_call_logger(覆蓋率 11.8% → 預估 50%+)
- TOP-1 nemoton_dispatcher: nemotron_dispatch caller (NIM 配額追蹤)
- TOP-2 openclaw_strategist: 4 reports (daily/weekly/monthly/meta) + qa caller
- TOP-3 hermes_analyst: hermes_analyst + hermes_intent (順修 commit 00591c5 殘留 bug)
- TOP-4 code_review_pipeline: code_review_hermes/openclaw/elephant 三鏈 (request_id 串)
- TOP-5 openclaw_bot_routes: openclaw_bot_main/gemini/nim 三層 fallback

Phase 3 A7 — OpenClaw Q&A → qwen3:14b(feature flag OFF)
- OPENCLAW_QA_OLLAMA_FIRST 灰度開關
- 繁中強制 system prompt + Gemini fallback chain
- _is_low_quality_response 品質守門(簡體字檢測 + 拒答訊號 + 結構分數)
- 黃金集 A/B 對照測試框架(10 樣本去 PII)

Phase 3 A8 — OpenClaw 日報 → Hermes 模板(feature flag OFF)
- OPENCLAW_DAILY_HERMES_TEMPLATE 灰度開關
- _compute_daily_kpi 純 SQL + Hermes 規則引擎
- _compute_gemini_insight 精簡 200 字洞察 prompt
- templates/daily_report_v2.j2 + _SafeUndefined 缺欄位優雅降級
- scripts/compare_daily_report_versions.py 雙版本盲測

Phase 3 A9 — Nemotron NIM → qwen3:14b(feature flag OFF)
- NEMOTRON_OLLAMA_FIRST 灰度開關(A2 紅燈:deepseek-r1 假支援,改 qwen3)
- _call_qwen3_dispatch + 既有 NIM tool_calls 解析共用
- 保留 ADR-004「🟡 [降級模式]」Hermes 規則引擎兜底

H6 PII fix — chat_id 進 ai_calls.meta 改 SHA1[:8](4 處 Bot Q&A)

Code Review pipeline — N3 動態 provider tag(gcp/secondary/111)+ A4 logger 三鏈

37 unit tests 全綠(routing 15 + golden 5 + qwen3 8 + daily template 8 + nemotron 1)

Operation Ollama-First v5.0 / Phase 1 A4 + Phase 3 A7+A8+A9

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:05:38 +08:00

64 lines
2.1 KiB
Django/Jinja
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
📊 momo 日報 {{ today }} ({{ weekday }})
═══════════════════════════════════════
## 📈 營收 KPI
| 指標 | 今日 | vs 昨日 | vs 7日均 |
|------|------|---------|----------|
| 營收 | {{ revenue.today | format_currency }} | {{ revenue.dod_pct | format_pct }} | {{ revenue.wow_pct | format_pct }} |
| 訂單筆數 | {{ orders.today_rows | default('—') }} | — | — |
| 上架 SKU | {{ orders.today_sku | default('—') }} | — | — |
| 平均客單 | {{ orders.avg_value_today | format_currency }} | — | — |
{% if revenue.today == 0 %}
⚠️ 今日營收為零,請檢查資料管線是否正常。
{% endif %}
## 🏆 TOP {{ top_skus | length }} 熱銷商品
{% if top_skus %}
{% for sku in top_skus %}
{{ loop.index }}. **{{ sku.name | default('—') }}**
數量:{{ sku.qty | default('—') }} 件 | 營收:{{ sku.revenue | format_currency }}
{% endfor %}
{% else %}
(今日無熱銷資料)
{% endif %}
## 🔍 競品價差警示
{% if price_gaps %}
{% for alert in price_gaps %}
- ⚠️ **{{ alert.sku_name | default(alert.sku) | default('—') }}**:我方 {{ alert.momo_price | format_currency }} vs {{ alert.competitor | default('競品') }} {{ alert.comp_price | format_currency }} (價差 {{ alert.gap_pct | format_pct }}
{% endfor %}
{% else %}
✅ 暫無重大價差警示
{% endif %}
## 📦 庫存異常
{% if inventory_alerts %}
{% for alert in inventory_alerts %}
- 🟡 {{ alert.sku_name | default(alert.sku) | default('—') }}{{ alert.reason | default('—') }}
{% endfor %}
{% else %}
✅ 庫存狀態正常
{% endif %}
## 💡 今日洞察 (AI 分析)
{{ gemini_insight | default('(本日洞察生成失敗,請查 logger') }}
## ✅ 48h 優先事項
{% if priority_actions %}
{% for action in priority_actions %}
{{ loop.index }}. {{ action }}
{% endfor %}
{% else %}
(暫無自動產生的行動建議)
{% endif %}
═══════════════════════════════════════
🤖 Operation Ollama-First v5.0 / daily_report_v2 (Hermes 模板模式)