reflection-injection

Solid

Inject relevant past reflections into agent context at iteration start so agents learn from prior mistakes without repeating them

AI & Automation 142 stars 21 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# reflection-injection Automatically inject relevant past reflections into agent context when starting new iterations or retrying after failures. ## Triggers Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description): - "inject reflection" → explicit reflection injection shorthand - "add metacognition" → metacognitive step insertion ## Purpose This skill implements the Reflexion episodic memory injection pattern. Before each iteration, it loads relevant past reflections and injects them into the agent's context, enabling learning from past mistakes without repeating them. ## Behavior When triggered, this skill: 1. **Load reflection history**: - Read `.aiwg/ralph/reflections/loops/` for current loop reflections - Read `.aiwg/ralph/reflections/patterns/` for cross-loop patterns - Apply sliding window: k=5 most recent reflections 2. **Filter for relevance**: - Match reflections by task type similarity - Match by error type if retrying after failure - Match by file/module if working on specific code 3. **Format for injection**: - Convert reflections to natural language summary - Use @$AIWG_ROOT/agentic/code/addons/ralph/templates/self-reflection-prompt.md template - Prepend to agent context 4. **Track usage**: - Record which reflections were injected - Track whether injected reflections led to success - Update pattern effectiveness scores ## Activation Conditions ```ya...

Details

Author
jmagly
Repository
jmagly/aiwg
Created
9 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

ralph-reflect

View and manage agent loop reflections and episodic memory

142 Updated yesterday
jmagly
AI & Automation Listed

reflect

Analyzes conversation transcripts to extract user corrections, patterns, and preferences, then proposes skill improvements. Use this skill when users provide corrections, express preferences about code style, or when patterns emerge from successful approaches. Can be triggered manually with /reflect or automatically at session end when enabled.

101 Updated 4 months ago
haddock-development
AI & Automation Listed

reflect

Analyzes conversation transcripts to extract user corrections, patterns, and preferences, then proposes skill improvements. Use this skill when users provide corrections, express preferences about code style, or when patterns emerge from successful approaches. Can be triggered manually with /reflect or automatically at session end when enabled.

1 Updated today
Raghasruthi
AI & Automation Listed

reflect

CRITICAL learning capture. Extracts HIGH/MED/LOW confidence patterns from conversations to prevent repeating mistakes and preserve what works. Use PROACTIVELY after user corrections ("no", "wrong"), after praise ("perfect", "exactly"), when discovering edge cases, or when skills are heavily used. Without reflection, valuable learnings are LOST forever. Acts as continuous improvement engine for all skills. Invoke EARLY and OFTEN - every correction is a learning opportunity.

34 Updated today
rjmurillo
AI & Automation Listed

reflect

Self-improvement through conversation analysis. Extracts learnings from corrections and success patterns, permanently encoding them into agent definitions. Philosophy - Correct once, never again.

11 Updated today
stevengonsalvez