Canonical: https://botbento.com/usecases/automated-code-refactoring-and-test-execution/
Format: Markdown representation of the public HTML page.

[Home](/) / [Use cases](/usecases/) / [Coding](/usecases/?category=coding)

Coding · Intermediate

# Automated code refactoring and test execution

Inspect repositories, apply code edits, and execute test suites from the command line

[Use with BotBento ](https://app.botbento.com/?ref=usecases&utm_source=botbento.com&utm_medium=usecases&utm_campaign=automated-code-refactoring-and-test-execution)Copy promptShare[Markdown](/text/usecases/automated-code-refactoring-and-test-execution/index.md)[العربية](/ar/usecases/automated-code-refactoring-and-test-execution/)

Opens BotBento. Paste the prompt into a bot; nothing is preconfigured.

- When you askReceive bug report or refactor task
- ThenEdit files and execute test suites
- ResultPresent test outputs and file diffs

Work directly within project repositories to diagnose issues, modify source files, and run test suites. The agent analyzes error logs, suggests code updates across modules, and confirms passing tests before preparing changes for review.

## Prompt to start with

BotBentoRecommended

```
When given a coding task or bug report, inspect repository files and run relevant commands in the terminal. Propose and apply required code changes to resolve the task, then execute test suites to confirm correctness. Always ask for explicit user approval before deleting any files, executing destructive shell commands, or pushing commits to remote branches.
```

Copy

## Tools it uses

TerminalGitHub

## Works with

BotBento

## Tags

- coding
- testing
- refactoring
- debugging

## Source

[goose: an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM](https://github.com/aaif-goose/goose)
GitHub · checked 2026-10-15

Summarized in our own words. Any results described there are the authors’ own, not measured by BotBento.

By BotBento Editorial · Added 2026-10-15 · Updated 2026-10-15 · [Suggest a correction](/contact/)

## Related use cases

-

Codingadvanced

## [Coordinating multi-agent coding workflows](/usecases/coordinating-multi-agent-coding-workflows/)

Break complex programming objectives into specialized subtasks executed across local agent teams

TerminalGitHub
-

Codingadvanced

## [Dynamic code repair loop runner](/usecases/dynamic-code-repair-loop-runner/)

Iterate on failing test suites and monitor convergence before pushing changes

TerminalGitHubChat
-

Codingintermediate

## [Analyzing code dependencies and symbol impact](/usecases/analyzing-code-dependencies-and-symbol-impact/)

Map symbol relationships and check architectural blast radius across repositories

ChatGitHubTerminal
