compound
Skill0 starsChanged 9 months agoMITView on GitHub
Post-task learning capture and knowledge promotion. Auto-invoke when a task or sprint is completed, when the user says "done", "finished", "wrap up", or when all acceptance criteria are checked off. Do NOT invoke when user says "ship it" — that triggers /ship-test-ensure instead.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- rcelebrone/DotAgentstheir own version, first seen Sep 23, 2026
- chrislacey89/skillstheir own version, first seen Sep 18, 2026
- minhtran3124/agent-harnesstheir own version, first seen Aug 12, 2026
- pfeff/claude-skillstheir own version, first seen Aug 3, 2026
- toverux/cantripstheir own version, first seen Jul 25, 2026
- psw7205/skillstheir own version, first seen May 26, 2026
Used with
Projects with it also use research, review and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 4 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
AWSSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- garagon/nanostack★ 207same name
- ai-native-camp/camp-2★ 19same name
- rcelebrone/DotAgents★ 15same name
- c-reichert/flowstate★ 9same name
- minhtran3124/agent-harness★ 9same name
- Andamio-Platform/coach★ 6same name
- chrislacey89/skills★ 3same name
- toverux/cantrips★ 3same name
- dirkkok101/skills★ 2same name
- pfeff/claude-skills★ 2same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- plan-build-testSkill
- planSkill
- playwright-stealthSkill
- ship-test-ensureSkill
- update-docsSkill
- workflow-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 10 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
If the failure was caused by missing/ambiguous agent instructions: → UPDATE the agent definition file directly (ask user first)
- Very specific: line 27
If the failure was caused by a missing enforcement hook: → PROPOSE a settings.json hook change (ask user first)
- Distinctive: line 29
If the failure was caused by a skill gap: → UPDATE the skill file directly (ask user first)
- Very specific: line 75
JSON safety: Before writing, validate the file parses correctly.
- Very specific: line 77
Create backup: copy current file to error-registry.json.bak before modifying.
- Distinctive: line 78
Add or update entry with:
- Very specific: line 96
If entry already exists for this pattern: increment occurrences, update last_seen, add project to projects_seen, merge any new …
- Very specific: line 97
If pattern seen in 3+ projects and auto_preventable: false: flag for hook creation
- Very specific: line 106
If succeeded on first try: increment first_try_success
- Very specific: line 107
If model was upgraded mid-task: increment required_upgrade
- Very specific: line 108
Source of truth for model performance: Read from sprint-executor return summaries (model_requested, first_try_success, task_types) and …
- Very specific: line 112
If any task type has attempts >= 10 and first_try_success / attempts < 0.7: → Propose model upgrade to user (e.g., sonnet → opus for that …
- Very specific: line 118
Write to ~/.claude/projects/-root/memory/ (use appropriate memory type: feedback, project, or reference)
- Distinctive: line 120
Only promote patterns confirmed across 2+ tasks (session-learnings) or 2+ projects (error-registry)
- Very specific: line 127
Write a structured postmortem to ~/.claude/evolution/session-postmortems/YYYY-MM-DD_project-name.md:
- Distinctive: line 166
If all tests pass: proceed to step 11
- Very specific: line 167
If any tests fail: fix the failures before continuing.
- Distinctive: line 178
When compound is triggered after a Quick Fix (single-file, <30 lines):
- Distinctive: line 181
Ask ONE question: "Would the system catch this automatically next time?"
- Distinctive: line 183
Add to error-registry if cross-project
- Distinctive: line 184
Add to session-learnings if project-specific
- Distinctive: line 186
If YES: log brief entry in session-learnings and move on
- Very specific: line 187
Update model-performance.json with the model used and outcome
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Compound: Learning Capture & Knowledge Promotion
- Review what was done — read PRD, recent changes, or conversation context
- Identify learnings:
- What worked well?
- What didn't work or was surprising?
- Were there any assumptions that turned out wrong?
- Did any tool/pattern perform better or worse than expected?
- Update session-learnings with key findings (use structured format — see Step 6)
Knowledge Promotion Chain — check if promotion is warranted:
- Does this pattern repeat from previous session-learnings? → promote to
docs/solutions/ - Does this affect architecture? → propose an ADR in
docs/architecture/decisions/ - Does this suggest a workflow change? → propose CLAUDE.md update (ask user first)
4b. System Update Loop (when compound identifies workflow failures):
- If the failure was caused by missing/ambiguous agent instructions: → UPDATE the agent definition file directly (ask user first)
- If the failure was caused by a missing enforcement hook: → PROPOSE a settings.json hook change (ask user first)
- If the failure was caused by a skill gap: → UPDATE the skill file directly (ask user first)
- Memory entries alone are NOT sufficient for systemic failures. Memory helps future conversations. System updates prevent future failures.
- Log every system change in
~/.claude/evolution/workflow-changelog.mdwith date, what, why, source.
4c. Feedback Capture (mine user corrections for learning signal): User corrections are the richest learning signal. Scan the conversation for:
- Explicit corrections: "no", "don't", "stop", "instead", "not that", "wrong"
- Approach rejections: "let's not", "that's not right", "try X instead"
- Preference signals: "I prefer", "always use", "never do"
For each correction found:
- Is it project-specific? → session-learnings
- Is it a general pattern applicable to other projects? → error-registry entry
- Did the model fail at something it should handle? → model-performance (mark first_try_success = false)
- Does it imply a missing rule or hook? → propose system update (4b)
- Does it record a failed approach? → add to error-registry
approaches_that_failed
- Does this pattern repeat from previous session-learnings? → promote to
- The Three Compound Questions:
- "What was the hardest decision made here?"
- "What alternatives were rejected, and why?"
- "What are we least confident about?"
Structured Session Learnings — when updating session-learnings, use categorized format:
## Errors - [CATEGORY] description → fix applied Categories: ENV, LOGIC, CONFIG, DEPENDENCY, SECURITY, TEST, DEPLOY, PROOT, MERGE, PERFORMANCE ## Rules Generated - Rule text (category: CATEGORY) ## Model Performance - model_name: N/M tasks first-try success (note any upgrades/downgrades needed) ## Metrics - Total retries: N - Phases that caught bugs: [list] - Phase 5 duration: NsCross-Project Promotion — check if learnings apply beyond the current project:
a. Error registry update — ALWAYS write errors to the registry, even on first occurrence. You can't detect cross-project patterns without capturing data points from day one.
- Read
~/.claude/evolution/error-registry.json - JSON safety: Before writing, validate the file parses correctly. If corrupt,
restore from
error-registry.json.bak(or create empty{"entries":[]}if no backup). - Create backup: copy current file to
error-registry.json.bakbefore modifying. - Add or update entry with:
{ "pattern": "error message or symptom regex", "category": "ENV|LOGIC|CONFIG|...", "root_cause": "why it happens", "fix": "how to fix it", "auto_preventable": false, "prevention": "hook/rule that prevents it (if auto_preventable)", "approaches_that_failed": [ { "approach": "what was tried", "why_bad": "why it didn't work" } ], "projects_seen": ["project-name"], "first_seen": "2026-03-14", "last_seen": "2026-03-14", "occurrences": 1 } - If entry already exists for this pattern: increment
occurrences, updatelast_seen, add project toprojects_seen, merge any newapproaches_that_failed - If pattern seen in 3+ projects and
auto_preventable: false: flag for hook creation - Write to temp file first, validate JSON parses, then replace original
b. Model performance update — ALWAYS record model performance, even on first session.
- Read
~/.claude/evolution/model-performance.json - JSON safety: Backup to
model-performance.json.bakbefore modifying. Validate JSON before and after write. Restore from backup if corrupt. - For each model used in this session, update the relevant task type:
- Increment
attempts - If succeeded on first try: increment
first_try_success - If model was upgraded mid-task: increment
required_upgrade
- Increment
- Source of truth for model performance: Read from sprint-executor return summaries
(
model_requested,first_try_success,task_types) and orchestrator metrics (sprint_model_performance). Don't guess — use the structured data. - Check adaptation thresholds:
- If any task type has
attempts >= 10andfirst_try_success / attempts < 0.7: → Propose model upgrade to user (e.g., sonnet → opus for that task type) - If any task type has
attempts >= 10andfirst_try_success / attempts > 0.9: → Propose model downgrade to user (e.g., sonnet → haiku for cost savings)
- If any task type has
c. Memory promotion — if a learning applies across all projects:
- Write to
~/.claude/projects/-root/memory/(use appropriate memory type: feedback, project, or reference) - Update
MEMORY.mdindex - Only promote patterns confirmed across 2+ tasks (session-learnings) or 2+ projects (error-registry)
d. Workflow changelog — if any system file was modified (CLAUDE.md, skill, agent, hook):
- Append entry to
~/.claude/evolution/workflow-changelog.mdwith date, what, why, source
- Read
Session Postmortem (run at end of session or when user says "wrap up"):
Write a structured postmortem to
~/.claude/evolution/session-postmortems/YYYY-MM-DD_project-name.md:# Session Postmortem — [date] — [project] ## Summary - Tasks completed: N - Tasks blocked: N - Total retries: N - Models used: [list with task counts] ## Error Categories - [CATEGORY]: N occurrences ## Verification Gate Effectiveness - Gate that caught real bugs: [list] - Gates that always passed (may be redundant for this project): [list] ## Model Performance This Session | Model | Task Type | Attempts | 1st Try | Rate | |-------|-----------|----------|---------|------| ## Compound Actions Taken - [list of system updates, promotions, rules generated] ## Open Questions - [from Three Compound Questions]- Write completion marker so the compound-reminder hook knows compound ran:
touch "/tmp/.claude-compound-done-${CLAUDE_SESSION_ID:-unknown}" - Workflow Integrity Gate — if compound modified ANY workflow files (
~/.claude/— hooks, skills, agents, settings.json, CLAUDE.md), run the integrity test suite:bash ~/.claude/test-workflow-mods/run-tests.sh- If all tests pass: proceed to step 11
- If any tests fail: fix the failures before continuing. The test suite validates that all hooks exist and are executable, settings.json registrations are correct and cross-referenced, CLAUDE.md documents all key concepts, agent/skill files have correct structure, and evolution infrastructure is intact.
- This step is MANDATORY when workflow files were modified. Skip ONLY if no
~/.claude/files were touched during this compound cycle.
- If using git backup for
~/.claude/: suggest committing workflow changes
Quick Fix Micro-Compound
When compound is triggered after a Quick Fix (single-file, <30 lines):
- Skip steps 1-5 (full compound is overkill)
- Ask ONE question: "Would the system catch this automatically next time?"
- If NO:
- Add to error-registry if cross-project
- Add to session-learnings if project-specific
- Propose a hook or rule if it's a recurring category
- If YES: log brief entry in session-learnings and move on
- Update model-performance.json with the model used and outcome
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

