vault: add ECC methodology deep-dive and zettelkasten insights
New resource note with 6 core methodologies, community best practices, pitfalls, and practical examples. Three zettelkasten notes extract key insights: hook vs prompt reliability, MCP context tradeoffs, and the instinct learning system. Updated existing guides with cross-links.
This commit is contained in:
24
6 - Zettelkasten/20260319120100 Hook驱动优于提示词驱动.md
Normal file
24
6 - Zettelkasten/20260319120100 Hook驱动优于提示词驱动.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
created: "2026-03-19 12:01"
|
||||
type: zettel
|
||||
tags: [claude-code, agent-reliability, automation]
|
||||
source: "https://github.com/affaan-m/everything-claude-code"
|
||||
---
|
||||
|
||||
# Hook 驱动优于提示词驱动
|
||||
|
||||
AI Agent 的行为控制有两种机制:提示词(Skill/Rule)和 Hook。核心区别在于**确定性**:
|
||||
|
||||
- **Hook**: 触发率 100%,确定性执行,不依赖模型判断
|
||||
- **提示词**: 触发率 50-80%,概率性,受上下文长度、模型注意力影响
|
||||
|
||||
因此,**关键质量控制(格式化、安全检查、状态保存)应通过 Hook 实现,而非依赖提示词**。提示词适合灵活的、需要判断力的任务;Hook 适合必须每次都执行的不变量。
|
||||
|
||||
这解释了 ECC v2 为什么把学习观察从 Skill 迁移到了 Hook — v1 中观察经常遗漏,v2 通过 PreToolUse/PostToolUse Hook 实现了 100% 捕获率。
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [[Everything Claude Code 方法论与最佳实践]]
|
||||
- [[Everything Claude Code 完整指南]]
|
||||
Reference in New Issue
Block a user