aiwg
Version:
Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo
70 lines (50 loc) • 2.32 kB
Markdown
Use this template to inject past reflections into agent context before each iteration.
```
You have attempted this task {{trial_count}} times. Here are your reflections:
{{
- **Outcome**: {{this.outcome}}
- **Reflection**: {{this.reflection}}
- **Strategy Change**: {{this.strategy_change}}
{{/each}}
Based on these reflections:
1. Do NOT repeat actions that previously failed
2. Apply the most recent strategy change
3. If you notice you are stuck in a loop (repeating the same approach), try a fundamentally different approach
4. After this iteration, reflect on what you learned
```
## Usage
The `reflection-injection` skill fills this template with:
- `trial_count`: Current iteration number
- `reflections`: Array of k=5 most recent reflections from `.aiwg/ralph/reflections/`
```
You have attempted this task 3 times. Here are your reflections:
- **Outcome**: failure
- **Reflection**: The login function throws when token is null. Need to add null check.
- **Strategy Change**: Add null check at function entry before processing token.
- **Outcome**: failure
- **Reflection**: Null check added but refresh token path also fails. Token refresh needs same guard.
- **Strategy Change**: Apply null checks to both access and refresh token paths.
- **Outcome**: partial
- **Reflection**: Both token paths now handle null but test expects specific error message format.
- **Strategy Change**: Match error message format to test expectations: "Token required" not "Invalid token".
Based on these reflections:
1. Do NOT repeat actions that previously failed
2. Apply the most recent strategy change
3. If you notice you are stuck in a loop (repeating the same approach), try a fundamentally different approach
4. After this iteration, reflect on what you learned
```
## References
- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/reflection-memory.json - Reflection schema
- @$AIWG_ROOT/agentic/code/addons/ralph/docs/reflection-memory-guide.md - Guide
- @.aiwg/research/findings/REF-021-reflexion.md - Research foundation