Agent skill
execute-feedback
Execute tests on generated code and iterate until passing
Install this agent skill to your Project
npx add-skill https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/agent-loop/skills/execute-feedback
SKILL.md
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
[file-path]- Source file to test (default: recently modified files)--test-command [cmd]- Test command to run (default: auto-detect)--max-attempts [n]- Maximum fix attempts (default: 3)--coverage [%]- Minimum coverage target (default: 80)--no-fix- Run tests only, report without fixing--verbose- Show full test output
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
research-document
Generate summaries and literature notes from research papers
research-archive
Package research artifacts for long-term archival
research-cite
Format citations and generate bibliographies
induct-research
Induct research sources into a research repository. Point at an issue, a single file, a directory of papers, or a URI and the skill reads, annotates, and files structured induction tasks — one per source. Similar to address-issues but for research corpora instead of code backlogs.
research-provenance
Query provenance chains and artifact relationships
research-quality
Assess source quality using GRADE methodology
Didn't find tool you were looking for?