vault: align ECC docs with current repo and add orchestration manual
Updated ECC notes to match the current state of affaan-m/everything-claude-code docs/token-optimization.md and docs/SKILL-PLACEMENT-POLICY.md: - Drop CLAUDE_AUTOCOMPACT_PCT_OVERRIDE recommendations (now warned against upstream — variable can only lower threshold, opposite of intent) - Add CLAUDE_CODE_SUBAGENT_MODEL=haiku as the new core token-saving setting - Flag the default `memory` MCP for disablement (no skill/agent/hook references) - Add Skill Placement Policy section (curated/learned/imported/evolved + provenance) - Cover missing commands: /checkpoint, /sessions, /security-scan, /claw, /projects Add new resource: ECC 编排实战手册.md (721 lines). Six orchestration patterns (dmux+worktree, sequential claude -p, continuous-claude, Ralphinho RFC-DAG, santa-loop, Task in-process) with real commands, real plan.json structures, real CLI flags, and explicit "could not verify online" markers for /multi-* and /feature-dev. All sourced to specific commands/*.md or skills/*.md files. Cross-link the new manual from 完整指南 and 用法速查.
This commit is contained in:
@@ -20,9 +20,13 @@ source: "https://github.com/affaan-m/everything-claude-code"
|
||||
90% 任务用 Sonnet,只在架构决策和安全分析时用 Opus,搜索探索用 Haiku。设置:
|
||||
|
||||
```json
|
||||
{ "model": "sonnet", "env": { "MAX_THINKING_TOKENS": "10000", "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50" } }
|
||||
{ "model": "sonnet", "env": { "MAX_THINKING_TOKENS": "10000", "CLAUDE_CODE_SUBAGENT_MODEL": "haiku" } }
|
||||
```
|
||||
|
||||
`CLAUDE_CODE_SUBAGENT_MODEL=haiku` 是省钱新核心 —— 子 agent(通过 Task 工具派发的)跑 Haiku,比默认便宜约 80%,文件读取/探索质量基本无损。
|
||||
|
||||
> ⚠️ **不要再设 `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`**。仓库 `docs/token-optimization.md` 已警告:该变量在新版 Claude Code 上只能"降低阈值"(让压缩更早触发),与延后压缩的目的相反。改用手动 `/compact` + `strategic-compact` skill。
|
||||
|
||||
用 mgrep 替代 grep 可减少约 50% token 使用。
|
||||
|
||||
## 记忆持久化
|
||||
|
||||
@@ -12,9 +12,12 @@ source: "https://github.com/affaan-m/everything-claude-code"
|
||||
### 1. 模型路由
|
||||
90% 任务用 Sonnet,Haiku 做搜索/文档,Opus 只用于架构和安全。用 `/model-route` 自动路由。
|
||||
|
||||
**子 agent 强制用 Haiku** —— 设置 `CLAUDE_CODE_SUBAGENT_MODEL=haiku`,所有通过 Task 工具派发的子 agent 都跑 Haiku,比默认便宜约 80%,文件读取/探索质量基本无损。这是新版的省钱大头。
|
||||
|
||||
### 2. MCP 精简
|
||||
- 保持 < 10 个 MCP 启用
|
||||
- 用 CLI + skill 替代 MCP wrapper(如 gh CLI 替代 GitHub MCP)
|
||||
- 用 CLI + skill 替代 MCP wrapper(如 `gh` 替代 GitHub MCP、`aws` 替代 AWS MCP)
|
||||
- 默认安装的 `memory` MCP 没有任何 skill/agent/hook 引用 → 优先关掉
|
||||
- 每个 MCP 消耗上下文窗口,多到一定程度 200k 变 70k
|
||||
|
||||
### 3. 工具替换
|
||||
@@ -30,11 +33,13 @@ mgrep 替代 grep/ripgrep,在 50 任务 benchmark 中减少约 2x token 使用
|
||||
"model": "sonnet",
|
||||
"env": {
|
||||
"MAX_THINKING_TOKENS": "10000",
|
||||
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50"
|
||||
"CLAUDE_CODE_SUBAGENT_MODEL": "haiku"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> ⚠️ **不要再设 `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`**。仓库 `docs/token-optimization.md` 已警告:该变量在新版 Claude Code 上只能"降低阈值"(让压缩更早触发),与延后压缩的目的相反。改用手动 `/compact` + `strategic-compact` skill 控制压缩时机。
|
||||
|
||||
## Skill 的渐进式加载
|
||||
|
||||
Skill 启动时只读描述(约 100 tokens),只在相关时才加载完整内容。这比把所有内容放在 CLAUDE.md 系统提示中高效得多。
|
||||
|
||||
@@ -15,7 +15,8 @@ source: "https://github.com/affaan-m/everything-claude-code"
|
||||
**最佳实践**:
|
||||
- 活跃 MCP <= 10 个,活跃工具总数 <= 80 个
|
||||
- 用 `disabledMcpServers` 动态禁用不用的
|
||||
- 重操作优先用 CLI(如 `gh`)而不是 MCP
|
||||
- **默认安装的 `memory` MCP 没有任何 skill/agent/hook 引用 → 优先关掉**(仓库 `docs/token-optimization.md` 明确建议)
|
||||
- 重操作优先用 CLI(如 `gh`、`aws`)而不是 MCP wrapper
|
||||
- 使用 `llms.txt` 模式获取文档,避免 MCP 常驻开销
|
||||
|
||||
这是 Claude Code 性能优化中**最重要的单一因素** — 比任何 Agent 或 Skill 都重要。
|
||||
|
||||
Reference in New Issue
Block a user