Skip to content
Development
Skill

/execute-feedback

Execute tests on generated code and iterate until passing

From plugin
aiwg
229200 skills199 agents26 commands

Claude Code

$ npx -y skills add jmagly/aiwg --skill execute-feedback --agent claude-code

SKILL.md

execute-feedback.SKILL.md
namespace: aiwg
name: execute-feedback
platforms: [all]
description: Execute tests on generated code and iterate until passing
commandHint:
  category: code-quality

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:

1. **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

2. **Execute Tests**

  • Run the specified test command (or auto-detect)
  • Capture full output (stdout, stderr, exit code)
  • Parse test results: passed, failed, errors, skipped

3. **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

4. **Apply Fixes**

  • Generate targeted fix based on root cause analysis
  • Apply fix to source code
  • Increment attempt counter

5. **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

6. **Escalate if Needed**

  • After max attempts (default: 3), escalate to human
  • Include: all test results, failure analyses, fix attempts
  • Save debug memory session

7. **Update Debug Memory**

  • Record execution session in `.aiwg/ralph/debug-memory/sessions/`
  • Extract learned patterns to `.aiwg/ralph/debug-memory/patterns/`
  • Update success metrics

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/agent-loop/docs/executable-feedback-guide.md - Implementation guide
  • @$AIWG_ROOT/agentic/code/addons/agent-loop/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
Read more
@jmagly
Ships withaiwg

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.

229200 skills199 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
229
Star history of jmagly/aiwg on GitHub, a chart by star-history.com

Other skills on aiwg.

agent-loop-ext

agent-loop-ext

Crash-resilient external agent loop with state persistence and CI/CD integration

@jmagly@jmaglyInstall Skill
agent-loop

agent-loop

Detect requests for iterative autonomous agent loops and route to the appropriate loop executor

@jmagly@jmaglyInstall Skill
auto-test-execution

auto-test-execution

Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern

@jmagly@jmaglyInstall Skill
infer-completion-criteria

infer-completion-crite…

Infer measurable completion criteria for an agent-loop task from project docs, code, and AIWG standards when the user has not…

@jmagly@jmaglyInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about execute-feedback.

Which coding agents can use execute-feedback?
execute-feedback installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.