TaiwanStar_general_size_s_C.../AGENTS.md
sky121113 71a059183a [REFACTOR] 優化中國醫(Cmuh)售貨與領藥流程,重構 API 連線模組,並自動升版至 24
1. 重構 Cmuh 的 SaleFlowHandler:新增 ORDC_EMPTY、MATERIAL_NOT_FOUND、STOCK_NOT_ENOUGH 等明確領藥錯誤代碼,最佳化多貨道庫存匹配與扣減邏輯,改善掃碼按鈕的動態 UI 綁定時序。
2. 增強 Dialog UI 提示:重構 PickupErrorTipDialog 與 DispatchDialog,優化 dialog_pickup_error_tip.xml 佈局結構,確保出貨異常時能正確顯示對應的中文 Toast 與圖示。
3. 重構 HttpAPI 與網路層:重構後台 API 與 HttpConnect 的 Socket/連線異常處理,確實向 UI 回傳網路錯誤訊息(非吞例外),提升在極端網路環境下的穩定度。
4. 健全持久化與日誌模組:強化 StarCloudAPI 機台 Token 變更時的本地 SQLite 同步邏輯,提升 Logs 模組的非同步儲存與排程上傳穩定性。
5. 自動升版:配合實體機台 OTA 發版鐵律,將 app/build.gradle 中的 verPatch 變數由 23 遞增至 24。
6. 更新工作流說明:優化 .agents/workflows/compiler-apk.md 文件中的智慧尺寸判斷指令說明。
2026-05-28 17:48:03 +08:00

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

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.

# 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` 必須嚴格遞增。
## When Rules Conflict
- 規則細節若有衝突,以 `.agents/rules` 下原始規則檔為準。
- `AGENTS.md` 僅作導覽與快速摘要,不作為完整規範來源。