zizi c9f69d9d6d 治理: Skill 测试治理第一阶段——harness 控制平面 + 实现测试迁出运行时目录
范围(不含 design-story-foundation、docs/、humanization/README.md 等进行中改动):

1. 新增 harness/ 控制平面
   - skill_harness.py 静态审计:32 个运行时 Skill 的 frontmatter/manifest/文档污染,当前 0 问题
   - run_selected.py 选择性执行器:manifest 与磁盘一一对账、依赖阻断、
     空跑与 skip-only 失败关闭、AST 测试形状门
   - manifests/skills.json:32 个 Skill 的合同责任方与协作领域登记
   - manifests/test-inventory.json:81 个测试资产登记
   - specs/skill-testing.md 与 README.md:测试分层、证据边界与 harness 职责

2. 实现测试从 .claude/skills/*/scripts/ 迁至 tests/skills/<skill>/
   - 71 个测试文件迁移并修复项目根与临时目录运行导入
   - 数据库触发器测试宽泛异常收窄为 psycopg.errors.RaiseException
   - 抽取离线大测试拆出真实 PG smoke(默认阻断,不计入离线通过)
   - 抽取 presence 去重边界拆出独立测试:493 + 78 = 571 项检查不变

3. 运行时文档清理
   - 13 个 SKILL.md 移除自测/离线验证段落、测试命令与测试文件事实源表述,
     只保留运行时合同;业务运行合同、额度、授权与离线模式均保留

4. SoT 同步
   - AGENTS.md:新增 Skill 领域索引(7 个合同责任方分组,覆盖 32 个运行时 Skill)
   - 领域 07:测试入口改由 harness/manifests/ 登记,SKILL.md 不承载测试命令
   - humanization 覆盖矩阵:活动测试路径同步迁移

验证证据: harness 自测 15 项 + runner 自测 13 项通过;静态审计 32 Skill / 0 问题;
73 个非数据库测试通过;8 个集成条目中 6 个 PostgreSQL 项被依赖门明确阻断;
py_compile 与 git diff --check 通过。未连接 PostgreSQL、网络、真实模型或额度。

已知边界: 真正 skill_behavior_eval 仍为 0,尚未验证任何 Skill 自然语言行为;
evaluate-frozen-replay 的 raw 存储边界冲突留待单独治理。
2026-08-19 01:50:20 +08:00

309 lines
8.9 KiB
JSON

{
"schema_version": 1,
"skills": [
{
"name": "access-database",
"contract_owner": "平台运行与证据",
"collaborates_with": [
"上下文与知识检索",
"导入、清洗与抽取",
"规划与作品基础",
"写作与候选主权",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/access-database/SKILL.md"
},
{
"name": "assemble-context",
"contract_owner": "上下文与知识检索",
"collaborates_with": [
"规划与作品基础",
"写作与候选主权",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/assemble-context/SKILL.md"
},
{
"name": "call-content-model",
"contract_owner": "平台运行与证据",
"collaborates_with": [
"导入、清洗与抽取",
"质量与回放评测"
],
"skill_path": ".claude/skills/call-content-model/SKILL.md"
},
{
"name": "capture-ai-flavor-cases",
"contract_owner": "去 AI 味与人感",
"collaborates_with": [
"质量与回放评测",
"写作与候选主权"
],
"skill_path": ".claude/skills/capture-ai-flavor-cases/SKILL.md"
},
{
"name": "check-content-consistency",
"contract_owner": "质量与回放评测",
"collaborates_with": [
"上下文与知识检索",
"规划与作品基础",
"写作与候选主权"
],
"skill_path": ".claude/skills/check-content-consistency/SKILL.md"
},
{
"name": "clean-book-text",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据"
],
"skill_path": ".claude/skills/clean-book-text/SKILL.md"
},
{
"name": "decide-candidate",
"contract_owner": "写作与候选主权",
"collaborates_with": [
"平台运行与证据",
"质量与回放评测",
"导入、清洗与抽取",
"规划与作品基础"
],
"skill_path": ".claude/skills/decide-candidate/SKILL.md"
},
{
"name": "deconstruct-book",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"质量与回放评测"
],
"skill_path": ".claude/skills/deconstruct-book/SKILL.md"
},
{
"name": "design-story-foundation",
"contract_owner": "规划与作品基础",
"collaborates_with": [],
"skill_path": ".claude/skills/design-story-foundation/SKILL.md"
},
{
"name": "diagnose-ai-flavor",
"contract_owner": "去 AI 味与人感",
"collaborates_with": [
"质量与回放评测",
"写作与候选主权"
],
"skill_path": ".claude/skills/diagnose-ai-flavor/SKILL.md"
},
{
"name": "embed-knowledge",
"contract_owner": "上下文与知识检索",
"collaborates_with": [
"导入、清洗与抽取"
],
"skill_path": ".claude/skills/embed-knowledge/SKILL.md"
},
{
"name": "establish-voice-baseline",
"contract_owner": "去 AI 味与人感",
"collaborates_with": [
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/establish-voice-baseline/SKILL.md"
},
{
"name": "evaluate-frozen-replay",
"contract_owner": "质量与回放评测",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/evaluate-frozen-replay/SKILL.md"
},
{
"name": "execute-claude-task",
"contract_owner": "平台运行与证据",
"collaborates_with": [
"质量与回放评测"
],
"skill_path": ".claude/skills/execute-claude-task/SKILL.md"
},
{
"name": "expand-scene",
"contract_owner": "写作与候选主权",
"collaborates_with": [
"上下文与知识检索",
"质量与回放评测"
],
"skill_path": ".claude/skills/expand-scene/SKILL.md"
},
{
"name": "extract-chapter-knowledge",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/extract-chapter-knowledge/SKILL.md"
},
{
"name": "extract-work-knowledge",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索"
],
"skill_path": ".claude/skills/extract-work-knowledge/SKILL.md"
},
{
"name": "freeze-context",
"contract_owner": "上下文与知识检索",
"collaborates_with": [
"平台运行与证据",
"质量与回放评测"
],
"skill_path": ".claude/skills/freeze-context/SKILL.md"
},
{
"name": "import-book",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据"
],
"skill_path": ".claude/skills/import-book/SKILL.md"
},
{
"name": "maintain-work-extraction",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据"
],
"skill_path": ".claude/skills/maintain-work-extraction/SKILL.md"
},
{
"name": "optimize-content-quality",
"contract_owner": "质量与回放评测",
"collaborates_with": [
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/optimize-content-quality/SKILL.md"
},
{
"name": "plan-chapter",
"contract_owner": "规划与作品基础",
"collaborates_with": [
"上下文与知识检索",
"质量与回放评测"
],
"skill_path": ".claude/skills/plan-chapter/SKILL.md"
},
{
"name": "plan-story",
"contract_owner": "规划与作品基础",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/plan-story/SKILL.md"
},
{
"name": "polish-prose",
"contract_owner": "写作与候选主权",
"collaborates_with": [
"上下文与知识检索",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/polish-prose/SKILL.md"
},
{
"name": "prevent-ai-flavor",
"contract_owner": "去 AI 味与人感",
"collaborates_with": [
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/prevent-ai-flavor/SKILL.md"
},
{
"name": "record-run-evidence",
"contract_owner": "平台运行与证据",
"collaborates_with": [
"上下文与知识检索",
"导入、清洗与抽取",
"规划与作品基础",
"写作与候选主权",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/record-run-evidence/SKILL.md"
},
{
"name": "review-knowledge-cards",
"contract_owner": "导入、清洗与抽取",
"collaborates_with": [
"平台运行与证据",
"质量与回放评测"
],
"skill_path": ".claude/skills/review-knowledge-cards/SKILL.md"
},
{
"name": "revise-ai-flavor",
"contract_owner": "去 AI 味与人感",
"collaborates_with": [
"质量与回放评测",
"写作与候选主权"
],
"skill_path": ".claude/skills/revise-ai-flavor/SKILL.md"
},
{
"name": "rewrite-selection",
"contract_owner": "写作与候选主权",
"collaborates_with": [
"上下文与知识检索",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/rewrite-selection/SKILL.md"
},
{
"name": "score-content-quality",
"contract_owner": "质量与回放评测",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"写作与候选主权"
],
"skill_path": ".claude/skills/score-content-quality/SKILL.md"
},
{
"name": "search-knowledge",
"contract_owner": "上下文与知识检索",
"collaborates_with": [
"规划与作品基础",
"写作与候选主权",
"质量与回放评测"
],
"skill_path": ".claude/skills/search-knowledge/SKILL.md"
},
{
"name": "write-next-chapter",
"contract_owner": "写作与候选主权",
"collaborates_with": [
"平台运行与证据",
"上下文与知识检索",
"质量与回放评测",
"去 AI 味与人感"
],
"skill_path": ".claude/skills/write-next-chapter/SKILL.md"
}
]
}