install
source · Clone the upstream repo
git clone https://github.com/jmagly/aiwg
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jmagly/aiwg "$T" && mkdir -p ~/.claude/skills && cp -r "$T/agentic/code/addons/agent-loop/skills/execute-feedback" ~/.claude/skills/jmagly-aiwg-execute-feedback-45a332 && rm -rf "$T"
manifest:
agentic/code/addons/agent-loop/skills/execute-feedback/SKILL.mdsource content
Execute Feedback Command
Run executable feedback loop on generated code: execute tests, analyze failures, fix, and retry.
Instructions
When invoked, perform the executable feedback loop per REF-013 MetaGPT:
-
Identify Target
- Load the specified file or recently modified code files
- Determine test framework (jest, pytest, cargo test, go test, etc.)
- Find existing tests or generate test stubs if none exist
-
Execute Tests
- Run the specified test command (or auto-detect)
- Capture full output (stdout, stderr, exit code)
- Parse test results: passed, failed, errors, skipped
-
Analyze Failures
- For each failing test:
- Extract error type and message
- Identify root cause (null check, type error, logic error, etc.)
- Map to source code location
- Check debug memory for similar past failures
- For each failing test:
-
Apply Fixes
- Generate targeted fix based on root cause analysis
- Apply fix to source code
- Increment attempt counter
-
Re-Execute
- Run tests again after fix
- Compare results to previous attempt
- If all pass: record success in debug memory, return
- If still failing: repeat from step 3
-
Escalate if Needed
- After max attempts (default: 3), escalate to human
- Include: all test results, failure analyses, fix attempts
- Save debug memory session
-
Update Debug Memory
- Record execution session in
.aiwg/ralph/debug-memory/sessions/ - Extract learned patterns to
.aiwg/ralph/debug-memory/patterns/ - Update success metrics
- Record execution session in
Arguments
- Source file to test (default: recently modified files)[file-path]
- Test command to run (default: auto-detect)--test-command [cmd]
- Maximum fix attempts (default: 3)--max-attempts [n]
- Minimum coverage target (default: 80)--coverage [%]
- Run tests only, report without fixing--no-fix
- Show full test output--verbose
References
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md - Executable feedback rules
- @$AIWG_ROOT/agentic/code/addons/ralph/docs/executable-feedback-guide.md - Implementation guide
- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/debug-memory.yaml - Debug memory schema
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/flows/executable-feedback.yaml - Workflow schema
- @.aiwg/research/findings/REF-013-metagpt.md - Research foundation