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 摘要。