tachigo Dev Portal — Phase 1 Link Layer 設計文件
日期:2026-05-14 狀態:proposed 前置 spec:2026-05-14-project-atlas-design.md(已 merge 並由 #679、#680 實作 P0)
背景
組長已於 #676、#679、#680 完成 tachigo Dev Portal 第一階段(Docusaurus app apps/docs/、6 個 P0 導覽頁、客製首頁、sidebar 結構、frontmatter schema、docs/ markdown 全掛載到 /tachigo/)。
此 spec 接續 2026-05-14-project-atlas-design.md 中「後續可擴充」段落所列的方向:
- 加入搜尋索引與 owner tags
- 從
graph.json產出 domain cards 或 impact path - 提供 agent-friendly 結構化入口(原 spec 已聲明 source links 應讓 agent 容易引用)
本階段聚焦:讓每份 doc 顯示其相關 issue / PR、提供 PR/issue → doc 反向索引、提供標準 AI manifest、補上全文搜尋。不重做骨架、不搬檔、不引入新 app。
與前置 spec 非目標清單的對齊說明
前置 spec 2026-05-14-project-atlas-design.md 中「不新增後端 API、資料庫或外部服務」一句,在本 spec 的語境下作如下釐清:
- 規範對象:呈現層內容、AI inference、搜尋的「hosted service」(如 Algolia DocSearch、OpenAI、其他 SaaS chatbot 後端)。本 Phase 1 全部避開。
- 非規範對象:靜態檔 hosting(如 GitHub Pages、Cloudflare Pages、Netlify)。任何靜態站台都需要 host,hosting 平台選擇是部署決策,與「不引入外部服務」非同一範疇。
部署 hosting 屬獨立決策,由 PR 6 追蹤票 #699 另案處理,不在 Phase 1 Link Layer 範圍內。
不做(明確不在本 spec 範圍內)
- 不新增 app、不搬
docs/檔案、不改動既有 6 個 Dev Portal 頁的 routing 與 sidebar - 不新增 UI library
- 不做 AI chatbot(與原 spec 一致)
- 不引入外部 hosted search service(Algolia 等)
- 不重寫既有 doc 內容
- 不把 graphify 產物 commit 進 repo(沿用原 spec 決策)
- 不變更
apps/docs的i18n設定、不增加新語系 - 不變更後端 API、schema、或 runtime 行為
使用者與場景
- 新同事:在 doc 頁面底部直接看到「這份文件對應的設計 issue / 實作 PR」,不用切去 GitHub 自己搜。
- 日常開發者:從 PR/issue 反向找回相關 doc;改 doc 時用 frontmatter 補連結。
- AI agent:透過
/llms.txt、/llms-full.txt、/manifest.json一次取得 portal 結構與內容,不需 crawl 多頁。 - 架構 reviewer:透過 frontmatter 校驗確保 doc 與實作 PR 之間的對應不漂移。
核心決策
| 問題 | 決策 |
|---|---|
| 在哪實作? | 全部以 plugin / theme override / build script 形式長在現有 apps/docs/ 內 |
| doc ↔ PR 關聯來源? | 手動 frontmatter(canonical)+ build-time GitHub API 反查(補強) |
| AI manifest 格式? | 標準 llms.txt + llms-full.txt + 客製 manifest.json |
| 搜尋方案? | @easyops-cn/docusaurus-search-local(純前端、中文友善、無外部服務) |
| frontmatter schema 校驗? | Build-time validator,欄位錯誤直接 build fail |
| PR 拆分? | 5 個獨立 PR,每個 < 600 行;僅 PR 5 因 lockfile 可能申請 scope-exception label,其餘 PR 不得使用此 exception |