claude-code/claude-zh/rules/common/agents.md

23 lines
995 B
Markdown
Raw Permalink 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.

# Agent 相關規範
## 核心原則
- **意圖 (Intent)**:在開始之前,清除受指示的任務中是否存在「隱藏的含義」或「後續步驟」,以避免不必要的迴圈。
- **一致性 (Consistency)**:確保 Agent 產出的內容遵循專案的架構慣例;避免在同一個模組中混用不同的技術風格。
- **極簡性 (Simmplification)**:如果能用一個工具來實現多個動作,則優先使用單一工具(保持原子性)。
## 併發與平行處理
- 主動使用平行處理工具。
- 只有在目前步驟需要上一步驟輸出作為輸入時,才使用循序執行。
- **警告**:避免在使用平行處理工具時修改同一個檔案(同步衝突風險)。
## Agent 分工
針對複雜問題,使用分工明確的子 Agent
- 事實審查者 (Factual reviewer)
- 資深工程師 (Senior engineer)
- 安全專家 (Security expert)
- 一致性審查者 (Consistency reviewer)
- 冗餘檢查員 (Redundancy checker)