docs: add UUID naming rule to AGENTS.md + DOCS_STANDARD.md — never bare uuid, always file_uuid/identity_uuid
This commit is contained in:
@@ -3,7 +3,7 @@ document_type: "standard_doc"
|
||||
service: "MOMENTRY_CORE"
|
||||
title: "文件創建規範"
|
||||
date: "2026-04-27"
|
||||
version: "V2.0"
|
||||
version: "V2.1"
|
||||
status: "active"
|
||||
owner: "Warren"
|
||||
created_by: "OpenCode"
|
||||
@@ -35,11 +35,25 @@ related_documents:
|
||||
|
||||
---
|
||||
|
||||
## UUID 命名規範
|
||||
|
||||
API 路徑、查詢參數、JSON key、程式碼變數中**禁止使用裸 `uuid`**:
|
||||
|
||||
| 情境 | 必須使用 | 禁止使用 |
|
||||
|------|----------|----------|
|
||||
| 影片/檔案資源 | `file_uuid` | `uuid` |
|
||||
| 身份資源 | `identity_uuid` | `uuid` |
|
||||
| 查詢參數 | `file_uuid=`, `identity_uuid=` | `uuid=` |
|
||||
| 路由路徑 | `:file_uuid`, `:identity_uuid` | `:uuid` |
|
||||
| JSON key | `"file_uuid"`, `"identity_uuid"` | `"uuid"` |
|
||||
|
||||
例外:資料庫內部 primary key(如 `identities.uuid` 欄位)可保留原名。
|
||||
|
||||
## 版本歷史
|
||||
|
||||
| 版本 | 日期 | 目的 | 操作人 | 工具/模型 |
|
||||
|------|------|------|--------|-----------|
|
||||
| V1.0 | 2026-03-18 | 創建文件規範 | Warren | OpenCode / MiniMax M2.5 |
|
||||
| V2.1 | 2026-05-14 | 新增 UUID 命名規範 | M5 | OpenCode |
|
||||
| V2.0 | 2026-04-27 | 添加 AI Agent 友好完整規範(10.6-10.12) | OpenCode | GLM-5 |
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user