# TaiwanStar Agent Rules Index 本文件為 Agent 規則入口與導覽摘要,不承載完整規範細節。 ## Rule Sources (Single Source of Truth) 以下檔案為唯一真實來源(Single Source of Truth): - [.agents/rules/star-cloud-api.md](.agents/rules/star-cloud-api.md) - [.agents/rules/versioning.md](.agents/rules/versioning.md) 任何規則更新,請只修改上述原始檔案;`AGENTS.md` 僅同步摘要與導覽。 ## Critical Rules Snapshot ### Star-Cloud API - 除 `B014`(綁定)外,請求需帶 `Authorization: Bearer [MachineToken]`。 - 涉及 Token(`ApiKey`)變更時,必須同步持久化到資料庫。 - 網路錯誤不可吞例外,需回傳可見錯誤到 UI(如 Toast/Handler)。 ### Versioning - 禁止直接手改成品 `versionCode`/`versionName` 值。 - 版號管理透過 `verMajor`、`verMinor`、`verPatch` 變數。 - OTA 發版時,`versionCode` 必須嚴格遞增。 - 中國醫現場版 (`Cmuh`) 修正預設以 `:app:assembleCmuhS9XYUDebug` 驗證。 ## When Rules Conflict - 規則細節若有衝突,以 `.agents/rules` 下原始規則檔為準。 - `AGENTS.md` 僅作導覽與快速摘要,不作為完整規範來源。