Best for
- Use when auditing stale, overlapping, superseded, or drifted learnings; avoid general refactor, debugging, or code review unless the learnings store is explicit.
EveryInc/compound-engineering-plugin/skills/ce-compound-refresh/SKILL.md
Refresh the repo's captured learnings against the current codebase. Use when auditing stale, overlapping, superseded, or drifted learnings; avoid general refactor, debugging, or code review unless the learnings store is explicit.
Decision brief
Audit the learnings under /solutions/ against the current codebase, apply the maintenance actions the evidence supports, and deliver a complete per-doc report plus committed changes. The report and the corrected document set are the deliverables; the store only compounds value i…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/EveryInc/compound-engineering-plugin --skill "skills/ce-compound-refresh"Inspect the Agent Skill "ce-compound-refresh" from https://github.com/EveryInc/compound-engineering-plugin/blob/6a2a0f9940ab0b3577ce26226ee393390470e412/skills/ce-compound-refresh/SKILL.md at commit 6a2a0f9940ab0b3577ce26226ee393390470e412. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Run this once at the start of this invocation, before any subagent dispatch, and follow the directives it prints — except where one conflicts with this skill's own rules on asking the user questions, whether those rules are scoped to a non-interactive mode or apply in every mode…
If the arguments contain mode:non-interactive (or its deprecated alias mode:headless), strip those tokens (the remainder is a scope hint) and run non-interactive; otherwise run interactive.
Wherever this skill asks the user something, use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), requestuserinput in Codex, askquestion in Antigravity CLI (agy), askuser in Pi (…
If invoked specifically to create or bootstrap CONCEPTS.md ("create a CONCEPTS.md", "build the concept map"), the intent is ambiguous between two jobs — disambiguate with a blocking question:
This skill reviews and refreshes learnings under /solutions/. Resolve when you first compose a /solutions/ path (per the block below); pass the resolved /solutions/ path to any subagent, not the config.
Permission review
The documentation asks the agent to run terminal commands or scripts.
NODE="$(for c in node nodejs; do command -v "$c" >/dev/null 2>&1 && "$c" -e '' >/dev/null 2>&1 && { echo "$c"; break; }; done)";The documentation asks the agent to read local files, directories, or repositories.
**Read** `docs_root` from `<repo-root>/.compound-engineering/config.local.yaml`, then `config.yaml`; first non-empty value wins (`<repo-root>` = `git rev-parse --show-toplevel`). Unset -> `<root>` is `docs`, exactly as before.The documentation asks the agent to create, modify, or delete local files.
| **Delete** | No longer useful, applicable, or distinct | Delete the file — git history is the archive; there is no `_archived/` |The documentation asks the agent to create, modify, or delete local files.
**Relocation** (an Update variant): move a doc only when directory and frontmatter category disagree or content unambiguously belongs in a different **existing** category. A mismatch proves something is wrong, not which side — resolve the dThe documentation asks the agent to read local files, directories, or repositories.
If `CONCEPTS.md` exists at the repo root, run the same check for it (e.g., a `CONCEPTS.md # shared domain vocabulary — read when orienting to the codebase` line). Skip entirely when it doesn't exist — never nag for an artifact the project hEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 23,773 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Audit the learnings under <root>/solutions/ against the current codebase, apply the maintenance actions the evidence supports, and deliver a complete per-doc report plus committed changes. The report and the corrected document set are the deliverables; the store only compounds value if every doc in it can be trusted.
Run this once at the start of this invocation, before any subagent dispatch, and follow the directives it prints — except where one conflicts with this skill's own rules on asking the user questions, whether those rules are scoped to a non-interactive mode or apply in every mode, in which case this skill's rules win and no blocking question is asked. Run the fence exactly as written, as its own command: do not pipe or filter it (no head, tail, or grep), do not truncate its output, and do not bundle it into a batch with other commands. Its output opens with a === skill context header and ends with CE_CONTEXT_END; if you received one of those lines without the other, the output was truncated — rerun the fence verbatim once. That recovery is the only rerun: otherwise do not rerun it within the same invocation; a later invocation of this or any other skill runs its own. If no Node runtime is available the skill proceeds unchanged.
SKILL_DIR="<absolute path of the directory containing the SKILL.md you just read>";
NODE="$(for c in node nodejs; do command -v "$c" >/dev/null 2>&1 && "$c" -e '' >/dev/null 2>&1 && { echo "$c"; break; }; done)";
if [ -n "$NODE" ]; then
"$NODE" "$SKILL_DIR/scripts/context.mjs" || echo "context script failed; continue with the skill's normal behavior";
else
echo "no Node runtime; continue with the skill's normal behavior";
fi
If the arguments contain mode:non-interactive (or its deprecated alias mode:headless), strip those tokens (the remainder is a scope hint) and run non-interactive; otherwise run interactive.
Interactive: apply unambiguous actions directly; ask the user only on genuine judgment calls (see Decide).
Non-interactive: never pause for input, in any phase.
status: stale, stale_reason: [what you found], stale_date: YYYY-MM-DD to its frontmatter. Err toward stale-marking over incorrect action. If even that write fails, record it as recommended.Wherever this skill asks the user something, use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_question in Antigravity CLI (agy), ask_user in Pi (requires the pi-ask-user extension). Fall back to numbered options in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question. Ask one question at a time, prefer multiple choice, lead with the recommended option and a one-sentence rationale.
If invoked specifically to create or bootstrap CONCEPTS.md ("create a CONCEPTS.md", "build the concept map"), the intent is ambiguous between two jobs — disambiguate with a blocking question:
<root>/solutions/ classification work. Read references/concepts-vocabulary.md and follow its Seed goal and Scope of a seed (repo-wide) rules: seed the project's core domain nouns from the declared domain model, write the preamble (see Vocabulary Capture), cluster per the organization rules, run the Discoverability Check, then commit via the Commit flow — do not leave the bootstrap uncommitted.CONCEPTS.md is seeded (if absent) and reconciled during Vocabulary Capture.In non-interactive mode, default to the refresh cycle and note in the report that a standalone repo-wide bootstrap was not run.
This skill reviews and refreshes learnings under <root>/solutions/. Resolve <root> when you first compose a <root>/solutions/ path (per the block below); pass the resolved <root>/solutions/ path to any subagent, not the config.
Resolve the CE artifact root <root> before composing any artifact path.
docs_root from <repo-root>/.compound-engineering/config.local.yaml, then config.yaml; first non-empty value wins (<repo-root> = git rev-parse --show-toplevel). Unset -> <root> is docs, exactly as before..git/. Otherwise stop with an error naming docs_root and the value -- never fall back to docs.<root> as the sole artifact location: create it if absent, compose each path as <root>/<subdir> with this skill's own subdirectory, and never also read docs.Find all .md files under <root>/solutions/, excluding README.md files and anything under _archived/ (if _archived/ exists, flag it in the report as legacy to clean up). READMEs are excluded as review candidates only: whenever an action deletes, renames, moves, consolidates, or replaces a doc a catalog README lists, update that README's rows mechanically as part of the action's cleanup.
If a scope argument was provided, narrow with the first strategy that produces results: subdirectory name → frontmatter (module/component/tags) → filename → content keyword. No matches: ask the user to clarify (interactive) or report the miss and exit (non-interactive).
If the store is empty, report:
No candidate docs found in <root>/solutions/.
Run `ce-compound` after solving problems to start building your knowledge base.
For a broad sweep (9+ docs), triage before deep investigation: read all frontmatter, cluster by module/category, spot-check whether primary referenced files still exist, and start with the highest-impact cluster (interactive: confirm the starting area with the user; non-interactive: process all clusters in impact order). Review individual learning docs before the pattern docs that depend on them — stale learnings make a pattern look more valid than it is. If the user named a pattern doc, you may start there, but inspect its supporting learnings before changing it.
For each learning in scope, read it and cross-reference its claims against the current codebase. Dimensions that go stale independently: referenced paths/classes/modules; the recommended solution itself (does it still match how the code works?); code snippets; cross-referenced docs; overlap with other in-scope docs (note pairs covering the same problem/files/solution and which appears broader or more current); and domain vocabulary (note project-specific terms and whether CONCEPTS.md defines them accurately — collect the signal, don't edit yet). On Claude Code only, also scan the injected auto-memory block for same-domain notes: memory-sourced signals are supplementary — they corroborate codebase evidence or prompt deeper investigation, never alone justify Replace or Delete, and in non-interactive mode memory-only drift means stale-mark. Match depth to specificity: a doc citing exact paths and snippets needs more verification than a general principle.
After individual docs, evaluate the set: overlaps, supersession (an older narrow doc a newer doc subsumes), and outright contradictions between docs — contradictions actively mislead and outrank individual staleness. Note category-shape problems (a directory whose docs span unrelated themes, a near-empty category) as report-only observations — never restructure directories or create categories.
Subagents. Use them for context isolation, choosing the lightest approach that fits: main thread for small scopes, parallel investigation subagents for 3+ independent docs, batches for broad sweeps; docs that overlap or share a root issue are investigated together, not parallelized. When spawning any subagent, omit the mode parameter so the user's permission settings apply, and include in its prompt:
Use dedicated file search and read tools (Glob, Grep, Read) for all investigation. Do NOT use shell commands (ls, find, cat, grep, test, bash) for file operations. This avoids permission prompts and is more reliable.
Also scan the "user's auto-memory" block injected into your system prompt (Claude Code only). Check for notes related to the learning's problem domain. Report any memory-sourced drift signals separately from codebase-sourced evidence, tagged with "(auto memory [claude])" in the evidence section. If the block is not present in your context, skip this check.
Two subagent roles: investigation subagents are read-only and return evidence + a recommended action; replacement subagents write successor docs (one per Replace or Split candidate, run one at a time, sequentially). The orchestrator merges results, resolves contradictions, and performs all deletions and metadata edits centrally.
Assign each doc one outcome:
| Outcome | Meaning | Action |
|---|---|---|
| Keep | Still accurate and useful | No edit — report it as reviewed. Do not write a review breadcrumb or last_refreshed on its own. |
| Update | Solution still correct; references drifted (paths, names, links, snippets, metadata, misfiling) | Fix in place |
| Consolidate | Docs overlap heavily, both correct | Merge unique content into the canonical doc, delete the subsumed one |
| Replace | Guidance is now misleading; a trustworthy successor can be written | Successor via subagent, then delete the old |
| Delete | No longer useful, applicable, or distinct | Delete the file — git history is the archive; there is no _archived/ |
Judgment rules that are easy to get wrong:
ce-compound for the user's next encounter with that area instead of guessing.Before any Delete, two checks:
Auto-delete (no confirmation needed, either mode) only when all three hold: the implementation once lived in this repo and is gone (or the doc is fully superseded or plainly redundant); the problem domain is gone — or, for a superseded/redundant doc, the surviving canonical doc itself already states the subsumed doc's guidance (topical overlap is not coverage: verify the specific content exists there before deleting); inbound citations are absent or unambiguously decorative. Any condition fails → Replace, Update, Consolidate, stale-mark, or ask.
Pattern docs (<root>/solutions/patterns/) get the same five outcomes evaluated as derived guidance: does the generalized rule still hold given the refreshed learnings beneath it? A pattern with no supporting learnings is itself a stale signal. Base any pattern Replace on the refreshed learning set, not fresh invention.
Apply unambiguous Keeps, Updates, and Consolidations directly — no confirmation. Ask (per Blocking questions) only when: the action is genuinely ambiguous; a Delete fails the auto-delete gate; the canonical doc in a Consolidate isn't clear-cut; you are about to Replace; or you are about to Split (it writes successors and deletes the original — confirm fragment boundaries like a Replace). Present the file path, 2-4 evidence bullets, and the recommended action; offer only plausible alternatives plus "skip for now". For broad sweeps, work in batches and confirm continuation between them rather than front-loading a full maintenance queue.
Read references/per-action-flows.md and follow the section matching each doc's classification — it owns the step-by-step criteria, the relocation and split procedures, the replacement subagent contract (pass references/schema.yaml, references/yaml-schema.md, and assets/resolution-template.md; validate with the bundled frontmatter and doc-claims scripts), and citation cleanup. One flow per doc.
After the per-doc actions execute, reconcile the domain terms flagged during investigation with CONCEPTS.md.
First, read references/concepts-vocabulary.md — unconditionally. Its qualifying criteria are non-obvious; a "nothing qualifies" judgment without reading it is a shortcut, not a result.
Aggregate qualifying terms across the learnings in scope; when one term surfaced with different shades of precision, union the shades into one entry.
If CONCEPTS.md exists: add missing terms, refine entries where the corpus surfaced new precision, then reconcile the in-scope core nouns — re-derive the area's core domain nouns per the reference's Seed goal and backfill any central-but-missing ones. Bounded to the area in scope; never a repo-wide sweep.
If it doesn't exist and at least one term qualified: bootstrap it — seed the in-scope area's core domain nouns per the Seed goal alongside the surfaced terms, holding the bar conservatively for borderline terms at creation. Start the file with this preamble under a # Concepts heading:
Shared domain vocabulary for this project — entities, named processes, and status concepts with project-specific meaning. Seeded with core domain vocabulary, then accretes as ce-compound and ce-compound-refresh process learnings; direct edits are fine. Glossary only, not a spec or catch-all.
1-4 terms → flat headings; more → cluster by domain relationship per the reference.
Scrub violations in existing entries per the reference's criteria (implementation specifics, config values that drift, status/owner/date metadata, duplicates, undefined project-specific siblings). The full sweep is appropriate here because refresh is an audit.
Do not expand beyond the area in scope (the explicit repo-wide bootstrap path is the exception), and do not retroactively inject (see CONCEPTS.md) pointers into learnings.
If nothing qualified, record that explicitly in the report's CONCEPTS.md line (e.g., "scanned, no qualifying terms") — the visible scan record is the audit signal that the reference was consulted. Apply vocabulary edits silently in every mode — no user prompt.
Print the full report as markdown — it is the deliverable, not an internal summary. After processing the scope:
Compound Refresh Summary
========================
Scanned: N learnings
Kept: X
Updated: Y
Consolidated: C
Replaced: Z
Deleted: W
Skipped: V
Marked stale: S
CONCEPTS.md: <scanned, no qualifying terms | created with N entries (M seeded) | updated — N added, N refined, N reconciled, N scrubbed | repo-wide map created with N entries>
Then, for EVERY file processed: path, classification, evidence found (tag memory-sourced findings "(auto memory [claude])"), and the action taken or recommended; for Consolidate, which doc was canonical, what was merged, what was deleted. Group Keeps under a reviewed-without-edits section.
In non-interactive mode the report is the sole deliverable — self-contained, never abbreviated — and actions split into two sections. Applied: writes that succeeded, with the same per-file detail. Recommended: writes that failed (with enough context for a human to apply them), plus everything that never runs unattended — relocations that failed the four-condition gate (doc, target, failing condition), splits (doc, proposed fragment boundaries), category-shape observations, and the discoverability recommendation if any. If no writes succeed, the report is a maintenance plan. If _archived/ exists, list its files and recommend disposition (restore, delete, or consolidate).
Skip if no files changed. Check the current branch, whether the tree has unrelated uncommitted changes, and recent commit style. Stage only the files this refresh modified. Write a descriptive message summarizing the refresh (e.g., "update 3 stale learnings, consolidate 2 overlapping docs, delete 1 obsolete doc") in the repo's convention.
Non-interactive defaults: on the repo's default branch (main, master, or whatever the remote designates) → create a branch named for what was refreshed (e.g., docs/refresh-auth-learnings), commit, attempt a PR (if PR creation fails, report the branch name); on a feature branch → separate commit on that branch; git failures → put the recommended commands in the report and continue.
Interactive: ask (per Blocking questions), with the recommended option first. On the default branch: branch+commit+PR (recommended; specific branch name) / commit directly to the current branch / don't commit. On a clean feature branch: commit to it (recommended) / separate branch / don't commit. On a dirty feature branch: selective-stage and commit only refresh changes / don't commit.
After the report, check that the project's instruction files would lead an agent to discover <root>/solutions/ before working in a documented area. Runs every time — the store only compounds value when agents can find it.
Find the root instruction files (AGENTS.md, CLAUDE.md, or both); the substantive file is the target — ignore a shim that just @-includes the other. Neither exists: skip this check.
Assess semantically (not by string match) whether a reader would learn: the store exists, enough structure to search it (categories, frontmatter fields like module, tags, problem_type), and when it's relevant. If the spirit is met, done.
If not, draft the smallest addition that communicates those three things, matching the file's style — prefer one line in an existing related section (a directory listing, architecture tree, conventions block) over a new headed section. Keep the tone informational, not imperative ("relevant when implementing or debugging in documented areas", not "always search before implementing" — imperatives cause redundant reads when a workflow already searches). Substitute the resolved concrete root for <root> in what you write — readers without this plugin cannot resolve the placeholder. Calibration example for a directory listing:
<root>/solutions/ # documented solutions to past problems (bugs, best practices, workflow patterns), organized by category with YAML frontmatter (module, tags, problem_type)
Interactive: show the proposed change and where it goes, explain why it matters (fresh sessions and plugin-less collaborators won't find the store otherwise), and get consent via a blocking question before editing. Non-interactive: emit a "Discoverability recommendation" line in the report instead of editing instruction files — non-interactive scope is doc maintenance, not project config.
If CONCEPTS.md exists at the repo root, run the same check for it (e.g., a CONCEPTS.md # shared domain vocabulary — read when orienting to the codebase line). Skip entirely when it doesn't exist — never nag for an artifact the project hasn't adopted.
If this check edited an instruction file after Commit already ran, amend the commit (same branch, not yet pushed) or add a small follow-up commit (e.g., docs: add solutions discoverability to AGENTS.md), and push it if the branch was already pushed so an open PR includes it. If the user chose "don't commit", leave the edits uncommitted alongside the rest.
ce-compound captures a newly solved, verified problem; this skill maintains the store as the codebase evolves — each doc's accuracy and the set's design. Replace only with real evidence; otherwise stale-mark and point the user at ce-compound. Consolidate proactively: every capture adds a doc, and redundant docs drift silently.
Alternatives
ruvnet/RuView
Comprehensive GitHub code review with AI-powered swarm coordination
EveryInc/compound-engineering-plugin
Structured code review for bugs, regressions, tests, and standards. Use before PRs or when asked for review; report-only by default, with explicit local apply available for user-directed fix workflows.
dotnet/skills
Grades a specified set of test methods individually and produces a concise table mapping each test (fully-qualified name) to a letter grade (A–F), a score band, and a one-line note — designed to be posted as a PR comment. Use when the caller wants per-test feedback on a curated list of methods (for example, the new or modified tests in a pull request), not a suite-wide audit. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. Input is a list of test methods (or
ruvnet/ruflo
Comprehensive GitHub code review with AI-powered swarm coordination