# /terms/ 稽核報告 — 2026-05-09

> 由 Hans 2026-05-09 完成的全站 /terms/ 稽核
> 重點不是少數詞條寫錯，而是資料模型、SSR 篩選、Markdown 輸出、內容生成模板、來源規範沒有打穩

## P0：立即修正

### P0-01 `/terms/?tag=` 篩選失效
點擊「模型訓練」後 URL 變成 `/terms/?tag=模型訓練`，但頁面仍顯示「共找到 489 個術語」。
SSR 必須讀 query 並真的篩選。

### P0-02 結果非空時仍輸出「沒有找到符合條件的術語」
empty-state 必須條件渲染，不是 CSS 隱藏。

### P0-03 Continuous Deployment 與 Continuous Integration 混在一起
拆兩頁：
- `/terms/continuous-integration/`（CI）
- `/terms/continuous-deployment/`（CD）
舊錯誤 slug 做 301 redirect。

### P0-04 Overfitting 重複詞條
保留 `/terms/overfitting/`，`/terms/overfitting-1/` redirect。

### P0-05 Underfitting 重複詞條 + 內部生成提示外露
`/terms/underfitting-1/` 內文直接寫「這張卡和另一張欠擬合卡談的是同一概念」。
redirect + 全清「這張卡」「另一張卡」「可以把它當成不同入口」字串。

### P0-06 iPAS 詞條佔比數字不可驗證
無 `sample_size` + `year_range` + `methodology_url` 不得輸出百分比。

### P0-07 Markdown 版本不可用：整份 .md 被壓成單行
`/terms/{slug}.md` 必須符合：
- Content-Type: `text/markdown; charset=utf-8`
- 至少 20 行
- 含 H1 + 多個 H2

### P0-08 `/llms.txt` 是空的
建立 `/llms.txt` + `/llms-full.txt` + `/terms/index.md` + `/terms/index.json`。

### P0-09 HTML 渲染有 raw Markdown 與表格錯誤
A/B Testing 頁出現 `Q1（直覺題）： **` 這類 raw Markdown。
深入了解表格被渲染成 blockquote 純文字。

### P0-10 來源連結重複、錯配、不可追溯
不同來源標題不得共用同一 URL。

## P1：內容正確性

- **P1-01 LLaMA / Llama 不應寫成「開源」** — 改 open-weight / community license
- **P1-02 Semantic Kernel 內容過時** — Skills → Plugins，Planner → Function calling / agent orchestration
- **P1-03 LangChain 頁通用生成模板** — 刪「看情況，但如果任務目標是分類、分群、壓縮、檢索，或最佳化」
- **P1-04 Deep Learning 容易混淆寫法錯亂** — 重寫，刪「95% 以上準確率」「近鄰參考」
- **P1-05 Graph RAG 摘要過度宣稱** — 不寫「優於傳統向量檢索」
- **P1-06 MLOps / Machine Learning Operations 重複** — 合併成 `/terms/mlops/` + aliases
- **P1-07 No Code / Low Code 命名混亂** — 拆兩頁或合一頁
- **P1-08 SEO 標題亂用縮寫** — 主標題只能用業界通用縮寫
- **P1-09 「開始模擬考」連結語意不準** — 連到詞條專屬測驗或改 CTA 文案

## P2：UX / SEO / 資料治理

- **P2-01** tag 數量需要說明「可重複計算」
- **P2-02** 「台灣第一個」這類宣稱要有依據

## 工程修正順序

1. **Step 1 修資料模型** — 加 `canonical_slug`、`status`、`license`、`ipas`、`sources` 欄位
2. **Step 2 重複詞 migration** — overfitting-1 / underfitting-1 / Machine Learning Operations
3. **Step 3 重寫 renderer** — 不讓 raw Markdown 進 HTML，改 structured Section
4. **Step 4 Markdown / AI crawler 輸出** — 多行 .md / index.md / index.json / llms.txt / llms-full.txt
5. **Step 5 pre-publish validator** — `scripts/validate-terms.ts` 已建立

## 7 條架構規則

1. 一個概念只能有一個 canonical active page
2. 所有別名、縮寫、舊稱只能進 aliases，不要開新頁
3. 沒有來源的數字、授權、考試比例、版本資訊，不得發布
4. HTML 與 Markdown 分開渲染，不要混用 raw Markdown
5. 每次 build 前跑 validator，沒過就不能 deploy
6. iPAS 比例需 sample_size + year_range + methodology
7. license 拆 license_type + commercial_use + source_url
