# /ce-compound: Turn each solved problem into a test, rule or learning

Source: https://trendhub.net/skills/everyinc-compound-engineering-plugin/ce-compound
Skill folder: https://github.com/EveryInc/compound-engineering-plugin/tree/main/skills/ce-compound
Pack: Compound Engineering (https://trendhub.net/skills/everyinc-compound-engineering-plugin)
Works with: Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, Kimi Code CLI, Grok Build CLI, Devin CLI, Factory Droid, Qwen Code, Pi, Antigravity CLI, Cline

ce-compound captures the lesson of one verified fix in the cheapest form that stops it recurring: a test, a lint rule, a coding standard line or a learning doc. It only writes when a future engineer working from the current code would likely repeat the mistake. A refresh mode audits existing learnings for drift.

## When to use it

- A fix proved an earlier belief about how something behaves was wrong.
- A review caught a real defect worth guarding against.
- Your learnings folder has grown stale, overlapping or out of date.

## How it works

1. **Choose capture or refresh**: It runs capture unless refresh is requested explicitly, and asks once if an interactive request is ambiguous.
2. **Apply the durability test**: It writes nothing unless losing the lesson would plausibly cause a repeat or long rediscovery, and says why when it skips.
3. **Research**: Subagents gather related docs and session history into scratch files while the orchestrator drafts.
4. **Pick the cheapest form**: It writes at most one test, lint rule, standards condition or learning, updating an existing learning rather than duplicating it.
5. **Report**: It ends with a completion report, or a clear documentation-skipped signal in non-interactive runs.

## What it steers the agent away from

- Documenting routine work that went as planned
- Batching several lessons into one record
- Changing product code while recording a lesson

## What it can touch

Reads the session and repository, writes one test, lint rule, standards entry or learning under the solutions folder plus CONCEPTS.md updates; refresh mode can delete outdated docs and open a PR.

## Pairs well with

- `/ce-code-review`
- `/ce-debug`
- `/ce-plan`

## Questions

### How do later runs use the learnings?

ce-brainstorm and ce-plan read the solutions folder as grounding, so the next piece of work starts with the recorded lesson.

### Can it run without prompts?

Yes. With mode:non-interactive it asks nothing and ends on a fixed completion or skipped signal, which is how lfg uses it.
