mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-20 15:01:46 +02:00
`scripts/ci/validate-agents.js` reads only `agents/`, so the translated copies under `docs/<locale>/agents/` were never validated against the agent they describe — and drifted. Two kinds of drift, both machine-checkable and both wrong in the same direction (the translations were made from an older revision and never re-synced): - **Model tier, 39 files.** Every one names a costlier tier than ships: haiku -> sonnet, sonnet -> opus. `security-reviewer` reads `opus` in ja-JP and zh-TW; it ships `sonnet`. - **Tool set, 15 files.** `security-reviewer` and `database-reviewer` list `Write` and `Edit` in **all seven locales** — both agents ship read-only (`Read, Grep, Glob, Bash`). `seo-specialist` in zh-CN adds a `Bash` the canonical agent does not have. Documenting a reviewer as able to write is the kind of inaccuracy someone auditing what these agents can touch would act on. Sync `model` and the `tools` set to canonical, preserving each locale's existing list style so the diff is only the values that were wrong. The `["a", "b"]` vs `a, b` formatting difference is left alone: it is consistent per locale and carries no meaning. Add `tests/ci/locale-agent-frontmatter.test.js` so this cannot drift back. `tools` is compared as a set, not a string, so the style difference stays legal; prose is not compared at all. The last case pins the specific failure: a canonical read-only agent may never be documented with Write or Edit. `.kiro/agents/` is deliberately excluded — it uses a different schema (`allowedTools: [read, shell]`, no `model`), not a translation of this one.
1.3 KiB
1.3 KiB
name, description, model, tools
| name | description | model | tools | ||
|---|---|---|---|---|---|
| conversation-analyzer | 使用此代理分析对话记录,以找到值得通过钩子预防的行为。由不带参数的 /hookify 触发。 | haiku |
|
对话分析代理
您负责分析对话历史,识别应通过钩子预防的Claude Code问题行为。
需关注的重点
明确纠正
- "不,别那么做"
- "停止执行X操作"
- "我说过不要..."
- "错了,改用Y方法"
挫败反应
- 用户撤销Claude的修改
- 重复出现"不对"或"错了"的回应
- 用户手动修正Claude的输出
- 语气中逐渐升级的挫败感
重复问题
- 同一错误在对话中多次出现
- Claude反复以不当方式使用工具
- 用户持续纠正的行为模式
已撤销的修改
- Claude编辑后出现
git checkout -- file或git restore file - 用户撤销或回退Claude的操作
- 重新编辑Claude刚修改过的文件
输出格式
针对每个识别到的行为:
behavior: "Description of what Claude did wrong"
frequency: "How often it occurred"
severity: high|medium|low
suggested_rule:
name: "descriptive-rule-name"
event: bash|file|stop|prompt
pattern: "regex pattern to match"
action: block|warn
message: "What to show when triggered"
优先处理高频次、高严重性的行为。