44 lines
3.2 KiB
Markdown
Raw 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.

# humanization · 去 AI 味与人感体系(agent-example 先行验证副本)
本目录是去 AI 味与人感体系的资产层与执行骨架,初始拷贝自父仓 [`muse-deai/`](../../muse-deai/)(提交 `92a88e86`,一级能力),自拷贝之日起由 agent-example 自治管理与演进。
## 权威与演进规则
- **验证期本目录自治**:合同、规则、样例、骨架的改动直接在本仓演进,Git 历史留痕;父仓 muse-deai 同主题暂停更新,不产生两套并行版本。
- **同步方向只有一条**:验证收敛、人感体系从 agent-example 升华进 Muse 时,把验证过的资产同步回父仓 muse-deai 并更新设计文档。升华之前不向父仓回填。
- 设计 SoT(概念定义、五技能合同、验收口径)归属父仓 [`design-docs/专题-09-去AI味与人感体系设计.md`](../../design-docs/专题-09-去AI味与人感体系设计.md);本目录不重复定义概念,验证中发现合同级缺陷时向父仓提请修订。
- 案例卡的正式载体是 `muse-example` 库(见 `.claude/skills/capture-ai-flavor-cases`);本目录 `cards/` 只存合成示例。`src/deai/cards.py` 保留早期离线 API 兼容层,但输出/读取已对齐 `ai-flavor-case-v1`,生产采集入口仍是 `capture_cases.py`。
## 目录
```text
contracts/ 数据合同:案例/规则/样例/发现/patch/审计 + voice_baseline/prevention
src/deai/ 执行骨架:规则装载与完整指纹、载体 scope/mask、五层诊断、基线画像、门禁、评测生命周期
rules/ 规则库 v0(26 条 active,覆盖 regex/handler/density/model_judgment 四类触发器);active 必须配齐四类样例;其中 16 条为 2026-08-16 所有者决定跳过 holdout 激活,证据栏留痕。
这 16 条的 holdout 是欠账:升回父仓或申报专题-09 §12 一级验收前必须补齐,或提请父仓修订 SoT。
26 条超出专题-09 §10 一级「10–20 条」区间,验证期定位是机制覆盖先行,升华进 Muse 时对齐区间或提请修订
samples/ 样例库(sf / snf / boundary / regression),候选规则也必须先有四类夹具
cards/ 合成案例卡示例
research/ 20 项开源研究机制追踪矩阵 + 中文轻量去重人感规则目录(研究候选,不等于 active)
tests/ 合同负路测试:../.venv/bin/python -m unittest discover -s tests -v(在 humanization/ 下运行)
eval/ 判别试跑与回归探针:../.venv/bin/python eval/run_eval.py
config.yaml 模型角色分离配置(改写模型 ≠ 选择模型,代码强制)
```
## 与五个技能 skill 的对应
| 技能 | skill | 消费本目录什么 |
|---|---|---|
| 1 定基线 | `establish-voice-baseline` | 产出声音账,供修订保护项与前置预防正样例 |
| 2 前置预防 | `prevent-ai-flavor` | `rules/` active 规则的负约束 |
| 3 诊断 | `diagnose-ai-flavor` | `src/deai/diagnose.py` + `rules/` |
| 4 修订 | `revise-ai-flavor` | `patch.py` / `gates.py` / `pairwise.py` / `report.py` |
| 5 挖掘 | `capture-ai-flavor-cases` | 案例卡 → `rules/` 候选(propose-rule 门) |
## 运行测试
```bash
cd agent-example/humanization
../.venv/bin/python -m unittest discover -s tests -v
```