一键导入
compound
Compound Learning Loop. 跨 sprint 积累的经验沉淀到 compound/, 按 doc_type 分文件存档. 4 种 doc_type: learning / trick / decision / explore. 铁律[复利]: 一事一档, ≤100 行.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compound Learning Loop. 跨 sprint 积累的经验沉淀到 compound/, 按 doc_type 分文件存档. 4 种 doc_type: learning / trick / decision / explore. 铁律[复利]: 一事一档, ≤100 行.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | compound |
| description | Compound Learning Loop. 跨 sprint 积累的经验沉淀到 compound/, 按 doc_type 分文件存档. 4 种 doc_type: learning / trick / decision / explore. 铁律[复利]: 一事一档, ≤100 行. |
| effort | medium |
软件复杂度膨胀撑破上下文、隐知识丢失、需求漂移. compound/ 是复利工程的物理实现. "下一次 cs-arch / cs-feat-design / cs-issue-analyze 会回头读 compound/, 让经验在新工作里被复用".
| doc_type | 用途 | 触发时机 | 模板 |
|---|---|---|---|
| learning | 踩坑 → 教训 | polish 完成 / review P0 finding / 用户主动 /compound add learning | templates/learning.md |
| trick | 可复用模式 | impl 发现优雅写法 / 用户主动 /compound add trick | templates/trick.md |
| decision | 拍板技术选型 (类 ADR) | design 重大决策 / 用户主动 /compound add decision | templates/decision.md |
| explore | 代码调研结论 | docs_researcher 完成 / 用户主动 /compound add explore | templates/explore.md |
compound/YYYY-MM-DD-{doc_type}-{slug}.md
例:
compound/2026-05-25-decision-jwt-rs256-vs-hs256.mdcompound/2026-05-25-learning-useeffect-deps-infinite-loop.mdcompound/2026-05-26-trick-redis-pipeline-batch-fetch.mdcompound/2026-05-26-explore-react-19-concurrent-rendering.mddecision 改状态用 superseded-by: {slug} 引用, 不直接删| 时机 | doc_type | 写入责任 |
|---|---|---|
| polish 完成 (cleanup-pass.md 写完) | learning | polish_worker / 主 agent |
| review_pass1 发现 P0 finding | learning | reviewer subagent |
| design.md 含重大决策 (e.g. "我们决定 X 不用 Y") | decision | 主 agent / architect |
| impl 时发现优雅 pattern | trick | generator / 主 agent |
| docs_researcher 调研完成 | explore | docs_researcher |
用户显式 /compound add {type} | 任意 | 主 agent |
| 时机 | 读什么 | 责任 |
|---|---|---|
| plan stage 开始 | _index.pointers.latest_decisions 列出的 5 个 decision-*.md | 主 agent (强制) |
| design stage | grep 关键词读相关 learning-*.md + trick-*.md | 主 agent / architect |
| review stage (critic) | 历史 decision 冲突检查 + 历史 learning 重复踩坑检查 | critic subagent |
| brainstorm stage | 不读 compound (创意空间不污染) | (跳过) |
| 命令 | 作用 |
|---|---|
/compound add learning {slug} | 触发 learning 模板, 主 agent 填空 |
/compound add trick {slug} | 触发 trick 模板 |
/compound add decision {slug} | 触发 decision 模板 |
/compound add explore {slug} | 触发 explore 模板 |
/compound list [type] | 列出 compound 文件 (按 type 筛) |
/compound search {keyword} | grep 全 compound 搜关键词 |
跨季度时自动归档:
compound/*.md 移到 .ai_state/archive-{quarter}/compound/compound/ 只保留近 1 quarter + 所有 decision-*.md (永远保留 decision)见 ~/.claude/skills/compound/templates/{learning,trick,decision,explore}.md
v9.6.2 (lessons.md 单文件): v9.6.4+ (compound/ 颗粒化):
- 追加一段 - 新建一个文件
- grep 全文找 - grep 文件名 + 内容
- 3 个月后 500 行混合 - 一事一档, ≤100 行
- 跨 sprint 全部读 - latest_decisions 仅近 5 个
athena-migrate 处理 lessons.md, 用户三选:
compound/{today}-learning-legacy-migration.md详: ~/.claude/skills/athena-migrate/SKILL.md
Athena 全局首次配置 (跨项目, 一次性). 从分发包部署 settings/config/rules/standards/hooks/agents/skills 到 ~/.claude/ (CC) 与 ~/.codex/ (CX). 和 athena-init 区别: setup 全局一次性, init 每项目一次. 已装则转 verify/upgrade (走 athena-migrate).
会话记忆固化 skill (v9.8.0 新). 会话结束/中途, agent 自己总结本会话增量写进 .ai_state (_index.md 当前状态 + sprints/{slug}/session-log.md), 免去用户每次手动描述一堆让它存. 手动 /checkpoint 触发. 与 compact-snapshot hook 互补 (hook 机械兜底, skill 做需推理的总结).
Athena 主入口 skill. 接收用户任务, 做 PACE 路由分诊 (brainstorm/roadmap/plan/...), 启动对应 stage. v9.7.0: 铁律引用名称化 (CC/CX 编号非对称, 引用一律用 铁律[名称]).
Athena 项目初始化 skill. 在项目中执行 /athena-init 时调用. 职责: 探测平台 / 工具可用性, 创建 .ai_state/ 目录 + 复制 _index.md 模板 + 填入探测结果.
Bugfix 路径的结构化问题流程: report → analyze → fix-note 三件套档案, 落在 sprints/{slug}/. 把"偏轻"的 Bugfix 升级成可复现 / 可追溯 / 可复盘. 借 CodeStable issue 实体, 适配 agent-in-loop.
Athena 版本迁移工具. v9.6.4 重写: 含 v9.6.2 → v9.6.4 破坏式重构 (sprints/ + compound/ + 4 新 ai_state 文件 + lessons.md 三选项交互).