addyosmani / addyosmani/agent-skills

New skill: compound — capture learnings into docs/solutions/ after solving a problem

未关闭
#435 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
93.8k
派生
10k
平均合并
3 天 15 小时
30 天内合并 PR
23

描述

## Summary

Add a new skill similar to `/ce-compound` from [compound-engineering-plugin](https://github.com/EveryInc/compound-engineering-plugin/blob/main/docs/skills/ce-compound.md). This is the "knowledge-capture" closing loop: after a non-trivial problem is solved, the skill writes a structured doc to `docs/solutions/` so the next time the same problem is hit, it takes minutes instead of hours.

## Why

Solutions to non-trivial problems often live only in conversation/chat history and get lost. Teams end up re-solving the same problem multiple times. This skill closes that gap by capturing:
- Symptoms
- Root cause
- What didn't work (the most expensive part of the investigation)
- The working solution
- Why it works / prevention guidance

## Reference implementation

See `ce-compound` skill doc: https://github.com/EveryInc/compound-engineering-plugin/blob/main/docs/skills/ce-compound.md

Key behaviors worth adapting:

- **Two modes**: Full (parallel research/cross-referencing, duplicate detection) vs Lightweight (single-pass, fewer tokens) — mode auto-selected based on context budget, not asked.
- **Two tracks**: Bug track (Symptoms → What Didn't Work → Solution → Why This Works → Prevention) vs Knowledge track (Context → Guidance → Why This Matters → When to Apply → Examples).
- **Overlap detection**: scores new learning against existing docs across problem statement, root cause, solution approach, referenced files, and prevention rules — updates an existing doc on high overlap instead of creating a duplicate.
- **Discoverability check**: ensures the project's instruction file (e.g. `AGENTS.md`) actually references `docs/solutions/` so future agent sessions know to check it.
- **Auto-invoke triggers**: phrases like "that worked", "it's fixed", "problem solved" trigger the capture flow automatically.
- **Grounding validation**: verifies cited paths/commits/claims against the actual repo tree before finalizing the doc.

## Suggested output artifact

```
docs/solutions/[category]/[filename].md
```
with YAML frontmatter (`module`, `tags`, `problem_type`, etc.) for searchability.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。