Skip to content

ash1794/vibe-engineering / plugins/vibe-engineering/skills/vibe-reflect-and-compound

vibe-reflect-and-compound

Verified

Captures reusable knowledge after work is done — learnings from feedback or failures, resolved bugs (symptom, root cause, prevention), and recurring code patterns — into the project's persistent memory file. Use after feedback, a non-trivial bug fix, a failed attempt, or the third repetition of a pattern.

vibe-reflect-and-compound

Every problem solved should leave something behind that makes the next one cheaper. This skill records it in the one place the agent will actually read next session.

When to Use This Skill

  • After receiving feedback on your work (positive or negative)
  • After resolving a non-trivial bug: it took more than ~10 minutes, was hard to reproduce, or had a surprising root cause
  • After a failed attempt or an approach that had to be abandoned
  • When you implement the same code pattern for the third time
  • At the end of a complex task

When NOT to Use This Skill

  • After trivial tasks (typos, renames, obvious fixes)
  • When nothing new was learned
  • During active implementation (reflect after, not during)
  • For architectural decisions (use vibe-decision-journal, which keeps ADRs in the repo)

Where to Save

Write to the memory file the current agent loads automatically. A separate LEARNINGS.md that nothing loads is write-only.

AgentLoaded automatically
Claude CodeCLAUDE.md (project) or auto-memory, if enabled
OpenAI CodexAGENTS.md
Gemini CLIGEMINI.md, or the built-in memory tool
Shared across toolsAGENTS.md, imported or referenced from the others

Keep the always-loaded file short. Put long entries in docs/learnings/ (bugs, patterns, learnings) and add a one-line pointer to them in the memory file.

Entry Types

1. Learning

- **[Pattern name]**: [actionable rule]. Applies when: [context]. Evidence: [what happened].

Be actionable and specific. Not "be careful with concurrency" but "run the race detector before committing code that touches sessionCache."

2. Bug

### [Category]: [short description] ([date])
Symptom: [what was observed]
Root cause: [the actual problem]
Why hard to find: [what misled the investigation]
Fix: [what changed] — Prevention: [test, lint rule, or guard added]
Files: [paths]

Categories: Concurrency, State, Validation, Integration, Environment, UI.

3. Pattern (only at the third occurrence)

### [Pattern name] — [category]
When to use: [situation]
Canonical example: [file:line]
Anti-pattern: [the common mistake]

Point to the canonical implementation in the codebase instead of copying code into the memory file.

Steps

  1. Gather — What happened? What was expected vs. what actually happened? What was the root cause?
  2. Extract — What would have caught this earlier? Is it a recurring theme? Search existing entries first, and update or merge instead of duplicating.
  3. Write the entry in the right format.
  4. Prune — Keep at most ~30 active learnings in the always-loaded file. Merge similar ones, and move stale ones to docs/learnings/archive.md.
  5. Confirm — Show the entry to the user before saving if it changes shared project instructions.

Output Format

Reflection: [context]

Trigger: [what prompted this]

Entries:

  1. [Type] [Name]: [one-line summary]

Saved to: [file path(s)] Active learnings: X/30

receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall