Skip to main content

Module skill_synth

Module skill_synth 

Source
Expand description

Skill synthesis: auto-generate, refine, and retire skills (EVO-4).

  • Generate: 既总结成功经验,也总结失败经验
    • 成功驱动:高成功率重复模式 → SKILL.md + script
    • 失败驱动:持续失败模式 → 补全能力缺口的 Skill
  • Refine: failed skill → analyze error trace → LLM fix → retry (max 2 rounds)
  • Retire: low success rate or unused skills → archive

§React / Check / Retry

重度依赖大模型能力,每个环节都有校验与重试:

  • Check: L3 内容门禁、L4 安全扫描、test_skill_invoke 实测
  • Retry: 任何 LLM 输出 JSON 解析失败时,将错误反馈给大模型并重试 1 次
  • 代码修改/修复仅由大模型完成,不使用正则或模式匹配

All evolved skills live in chat/skills/_evolved/ with .meta.json metadata. A10: Newly generated skills go to _evolved/_pending/ until user confirms.

Structs§

SkillMeta
SkillValidation
单个技能的验证结果

Functions§

confirm_pending_skill
evolve_skills
Run skill evolution: generate new skills or refine existing ones.
list_pending_skills
list_pending_skills_with_review
reject_pending_skill
repair_one_skill
修复单个技能:打包整个目录给模型,模型返回修复,应用后验证,最多 MAX_REFINE_ROUNDS 轮
repair_skills
修复技能:先验证,再对失败的逐个打包修复
track_skill_usage
Update .meta.json after a skill execution (called from agent_loop).
validate_skills
验证技能:对每个 skill infer → test → doc check,返回结果列表。 若 skill_names_filterSome 且非空,仅验证该列表中的技能名(目录名),否则验证全部。