From 7d78f4abe53414ee6e11a1156f073811f6a3ac45 Mon Sep 17 00:00:00 2001 From: JekkiNoopy Date: Sat, 16 May 2026 18:48:34 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=8D=94=E4=BD=9C=E7=AD=86=E8=A8=98comm?= =?UTF-8?q?it=E8=A6=8F=E5=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/collaboration-notes.md | 40 +++++++++++++++++++++++++++++++- .cursor/rules/agent-must-ask.mdc | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.cursor/collaboration-notes.md b/.cursor/collaboration-notes.md index c4cf065..da5131d 100644 --- a/.cursor/collaboration-notes.md +++ b/.cursor/collaboration-notes.md @@ -45,10 +45,48 @@ --- -## 6. 相關規則檔 +## 6. 改完就給 commit(站主訂) + +**每做完一項改動**,回覆末尾**直接附**一段(不要為此反覆跑 `git status`/`git diff` 確認;助手自己知道改了什麼): + +```bash +git add . +git commit -m "類型 修改重點" +``` + +| 項目 | 約定 | +|------|------| +| **類型** | 三選一,以本次修改**為主**的那一種:`feat`(新功能/新行為)、`fix`(修 bug/修壞掉的行为)、`style`(純樣式/排版,無新功能) | +| **格式** | 類型後**空一格**,再接修改重點;整段 `""` 內建議維持 `類型 + 空格 + 重點` 一行 | +| **字數** | 修改重點**15 字以內**(中文為主,標點計入字數;過長請精簡) | + +**範例** + +```bash +git add . +git commit -m "feat 頂欄992px漢堡選單" +``` + +```bash +git add . +git commit -m "fix 三層子選單hover接軌" +``` + +```bash +git add . +git commit -m "style 內頁標題深灰配色" +``` + +- 站主若只說「檢查」、未說執行:**不附** commit(也沒有改檔)。 +- 一次對話若分多項獨立交辦,**每項做完各附一段** commit,不要合併成一句含糊帶過。 + +--- + +## 7. 相關規則檔 | 檔案 | 用途 | |------|------| +| `.cursor/collaboration-notes.md` §6 | **改完附 commit**(類型、15 字內重點) | | `.cursor/rules/agent-must-ask.mdc` | **必問再改**、禁止批次毀 UTF-8、header/nav 勿擅自改名 | | `.cursor/rules/ai-change-boundaries.mdc` | 變更範圍、共用 CSS | | `.cursor/rules/user-scope-and-nav.mdc` | 導覽開放、錨點刪除 | diff --git a/.cursor/rules/agent-must-ask.mdc b/.cursor/rules/agent-must-ask.mdc index d5fbc0a..f7265df 100644 --- a/.cursor/rules/agent-must-ask.mdc +++ b/.cursor/rules/agent-must-ask.mdc @@ -27,3 +27,4 @@ alwaysApply: true ## 回覆 - 站主說字太多時:**短句**,先答「做沒做、為什麼壞」,不要長篇道歉後又擅自改一輪。 +- **改完一項並已寫入檔案**:回覆末尾附 `git add .` + `git commit -m "feat|fix|style 重點"`(重點 **15 字以內**);細則見 `.cursor/collaboration-notes.md` §6。勿為附 commit 反覆查 git。