athena

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Athena — Active Knowledge Intelligence

Athena — 主动知识智能

Run the Mine → Grow → Defrag cycle to keep the knowledge flywheel healthy.
运行 Mine → Grow → Defrag 周期,保障知识飞轮健康运转。

What This Skill Does

该技能的功能

The flywheel captures learnings reactively (via
/retro
,
/post-mortem
). Athena closes the loop by actively mining for unextracted signal, validating existing learnings against current code, synthesizing cross-domain insights, and cleaning up stale or duplicate artifacts.
When to use: Before an evolve cycle, after a burst of development, or weekly. Athena is non-destructive — it proposes changes without modifying existing learnings.
Output:
.agents/athena/YYYY-MM-DD-report.md
知识飞轮会被动捕获经验沉淀(通过
/retro
/post-mortem
命令)。Athena则通过主动挖掘未提取的有效信号、对照当前代码验证已有经验、综合跨领域洞见、清理过时或重复的产物,形成闭环。
适用场景: 演进周期之前、集中开发之后,或者每周定期执行。Athena是非破坏性的——它只会提出变更建议,不会修改现有经验沉淀。
输出:
.agents/athena/YYYY-MM-DD-report.md

Execution Steps

执行步骤

Step 1 — Mine: Extract Signal

步骤1 — Mine:提取有效信号

Run mechanical extraction. Mine scans git history,
.agents/research/
, and code complexity hotspots for patterns never captured as learnings.
bash
ao mine --since 26h                    # default: all sources, last 26h
ao mine --since 7d --sources git,agents  # wider window, specific sources
Read
.agents/mine/latest.json
and extract: co-change clusters (files changing together), orphaned research (unreferenced
.agents/research/
files), and complexity hotspots (high-CC functions with recent edits).
Fallback (no ao CLI): Use
git log --since="7 days ago" --name-only
to find recurring file groups. List
.agents/research/*.md
and check references in learnings.
执行结构化提取。Mine 会扫描git历史、
.agents/research/
目录、代码复杂度热点,识别从未被沉淀为经验的模式。
bash
ao mine --since 26h                    # 默认:所有来源,最近26小时
ao mine --since 7d --sources git,agents  # 更长时间窗口,指定扫描来源
读取
.agents/mine/latest.json
并提取:共变集群(同步变更的文件组)、孤立研究文档(未被引用的
.agents/research/
文件)、复杂度热点(近期有编辑的高圈复杂度函数)。
备选方案(无ao CLI时): 使用
git log --since="7 days ago" --name-only
查找高频共同变更的文件组,列出
.agents/research/*.md
文件并检查其在经验沉淀中的引用情况。

Step 2 — Grow: LLM-Driven Synthesis

步骤2 — Grow:LLM驱动的信息综合

This is the reasoning phase. Perform each sub-step using tool calls.
2a. Validate Top Learnings
Select the 5 most recent files from
.agents/learnings/
. For each:
  1. Read the learning file
  2. If it references a function or file path, use Read to verify the code still exists
  3. Classify as: validated (matches), stale (changed), or contradicted (opposite)
2b. Rescue Orphaned Research
For each orphaned research file from mine output: read it, summarize the key insight in 2-3 sentences, and propose as a new learning candidate with title and category.
2c. Cross-Domain Synthesis
Group mine findings by theme (e.g., "testing patterns", "CLI conventions"). For themes with 2+ findings, write a synthesized pattern candidate capturing the common principle.
2d. Gap Identification
Compare mine output topics against existing learnings. Topics with no corresponding learning are knowledge gaps. List each with: topic, evidence, suggested learning title.
这是推理阶段,通过工具调用完成每个子步骤。
2a. 验证核心经验沉淀
.agents/learnings/
中选择最新的5个文件,对每个文件执行:
  1. 读取经验沉淀文件
  2. 如果它引用了某个函数或文件路径,使用Read工具验证对应代码是否仍存在
  3. 分类为:验证通过(匹配)、过时(已变更)、矛盾(完全相反)
2b. 盘活孤立研究文档
对Mine阶段输出的每个孤立研究文件:读取内容,用2-3句话总结核心洞见,作为新的经验沉淀候选,给出标题和分类建议。
2c. 跨领域信息综合
按主题分组Mine阶段的发现(例如:"测试模式"、"CLI规范")。对有2条以上发现的主题,输出综合后的模式候选,提炼通用原则。
2d. 知识缺口识别
将Mine阶段输出的主题与现有经验沉淀对比,没有对应经验沉淀的主题即为知识缺口。列出每个缺口的主题、佐证证据、建议的经验沉淀标题。

Step 3 — Defrag: Mechanical Cleanup

步骤3 — Defrag:结构化清理

Run cleanup to find stale, duplicate, and oscillating artifacts.
bash
ao defrag --prune --dedup --oscillation-sweep
Read
.agents/defrag/latest.json
and note: orphaned learnings (unreferenced, >30 days old), near-duplicate pairs (>80% content similarity), and oscillating goals (alternating improved/fail for 3+ cycles).
Fallback:
find .agents/learnings -name "*.md" -mtime +30
for stale files. Check
.agents/evolve/cycle-history.jsonl
for alternating result patterns.
执行清理,查找过时、重复、振荡的产物。
bash
ao defrag --prune --dedup --oscillation-sweep
读取
.agents/defrag/latest.json
并记录:孤立经验沉淀(未被引用、超过30天的文件)、近似重复对(内容相似度超过80%)、振荡目标(3个以上周期里在达成/失败间反复切换的目标)。
备选方案:
find .agents/learnings -name "*.md" -mtime +30
查找过时文件,检查
.agents/evolve/cycle-history.jsonl
中的交替结果模式。

Step 4 — Report

步骤4 — 生成报告

bash
mkdir -p .agents/athena
Write
.agents/athena/YYYY-MM-DD-report.md
:
markdown
undefined
bash
mkdir -p .agents/athena
编写
.agents/athena/YYYY-MM-DD-report.md
markdown
undefined

Athena Report — YYYY-MM-DD

Athena 报告 — YYYY-MM-DD

New Learnings Proposed

拟新增经验沉淀

Validations

验证结果

  • Validated: N | Stale: N (list files) | Contradicted: N (list with explanation)
  • 验证通过:N | 过时:N(列出文件) | 矛盾:N(列出并说明原因)

Knowledge Gaps

知识缺口

  • [topic]: [evidence] → suggested learning: "[title]"
  • [主题]: [佐证证据] → 建议沉淀为:"[标题]"

Defrag Summary

清理摘要

  • Orphaned: N | Duplicates: N | Oscillating goals: N
  • 孤立文件:N | 重复文件:N | 振荡目标:N

Recommendations

建议

  1. [Actionable next step]

If `bd` is available, create issues for knowledge gaps:

```bash
bd add "[Knowledge Gap] <topic>" --label knowledge --label athena
Report findings to the user: proposed learnings, validation results, gaps, and defrag actions recommended.
  1. [可执行的下一步动作]

如果有`bd`工具,为知识缺口创建issue:

```bash
bd add "[Knowledge Gap] <topic>" --label knowledge --label athena
向用户反馈报告结果:拟新增的经验沉淀、验证结果、知识缺口、建议的清理动作。

Examples

示例

User says:
/athena
— Full Mine → Grow → Defrag cycle, report in
.agents/athena/
.
User says:
/athena --since 7d
— Mines with a wider window (7 days).
Pre-evolve warmup: Run
/athena
before
/evolve
for a fresh, validated knowledge base.
用户输入:
/athena
— 执行完整的Mine → Grow → Defrag周期,报告输出到
.agents/athena/
目录。
用户输入:
/athena --since 7d
— 扩大时间窗口到7天执行Mine阶段。
演进前预热: 执行
/evolve
前先运行
/athena
,获得最新的、经过验证的知识库。

Troubleshooting

故障排查

ProblemCauseSolution
ao mine
not found
ao CLI not in PATHUse manual fallback in Step 1
No orphaned researchAll research already referencedSkip 2b, proceed to synthesis
Empty mine outputNo recent activityWiden
--since
window
Oscillation sweep emptyNo oscillating goalsHealthy state — no action needed
问题原因解决方案
找不到
ao mine
命令
ao CLI不在PATH中使用步骤1中的手动备选方案
无孤立研究文档所有研究文档都已被引用跳过2b,直接进入信息综合步骤
Mine阶段无输出近期无活动扩大
--since
的时间窗口
振荡扫描无结果无振荡目标状态健康,无需额外动作