agent-loop-ext
Crash-resilient external agent loop with state persistence and CI/CD integration
Inject relevant past reflections into agent context at iteration start so agents learn from prior mistakes without repeating them
$ npx -y skills add jmagly/aiwg --skill reflection-injection --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/reflection-injectionContext preview
The summary Claude sees to decide when to auto-load this skill.
Inject relevant past reflections into agent context at iteration start so agents learn from prior mistakes without repeating them
namespace: aiwg name: reflection-injection platforms: [all] description: Inject relevant past reflections into agent context at iteration start so agents learn from prior mistakes without repeating them
Automatically inject relevant past reflections into agent context when starting new iterations or retrying after failures.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
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.
When triggered, this skill:
1. **Load reflection history**:
2. **Filter for relevance**:
3. **Format for injection**:
4. **Track usage**:
activation:
always_active_for:
- ralph-loop-orchestrator
- ralph-verifier
triggered_by:
- ralph_iteration_start
- agent_retry_after_failure
- explicit_user_request
skip_when:
- no_reflection_history: true
- first_iteration_of_first_loop: trueThis skill uses:
This skill's persistence flows through `resolveStorage('reflections')`. On the default `fs` backend reflections live at `.aiwg/reflections/`. To redirect into Obsidian, Logseq, Fortemi, or another backend without changing this skill, configure `roots.reflections` or `backends.reflections` in `.aiwg/storage.config` (#934).
When this skill needs to read/write reflections from a Bash step, prefer the storage-routed CLI:
aiwg reflections list --prefix sessions/
aiwg reflections get sessions/2026-04-28.md
echo "# reflection" | aiwg reflections put sessions/2026-04-28.md
echo '{"event":"reflect","summary":"..."}' | aiwg reflections append-log sessions/log.jsonlThe legacy direct-fs paths continue to work on the default `fs` backend — byte-identical to what the adapter writes — but only the adapter route honors `storage.config` redirection.
Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Repo: jmagly/aiwg
Crash-resilient external agent loop with state persistence and CI/CD integration
Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
Enable agent loops to learn from similar past tasks and share patterns across loops
Query and manage the executable feedback debug memory
Execute tests on generated code and iterate until passing