AeroTools
Home AI Prompts Test-First Bug Fixing Approach

Test-First Bug Fixing Approach

chatgpt • writing content • 15 uses
Free
What is this prompt for?

Puts the model in editing mode rather than writing mode: it cuts the padding and tightens the sentences, leaving the meaning alone.

What it actually does: I have a bug, $ bug . Take a test-first approach, 1) Read the relevant source files and existing tests.

Main use cases:
  • Summarising long documents without losing the meaning
  • Building a clear outline before you start writing
  • Editing text and improving its tone and rhythm
Benefits and results:
  • A steady voice that reflects a clear identity
  • Time saved on first drafts
  • Sharper writing, so readers ask fewer questions
Prompt length: 103 words Reading time: ~1 min Best with: Claude Pro (recommended for writing), ChatGPT Plus, Gemini Advanced

Prompt

I have a bug: ${bug}. Take a test-first approach: 1) Read the relevant source files and existing tests. 2) Write a failing test that reproduces the exact bug. 3) Run the test suite to confirm it fails. 4) Implement the minimal fix. 5) Re-run the full test suite. 6) If any test fails, analyze the failure, adjust the code, and re-run—repeat until ALL tests pass. 7) Then grep the codebase for related code paths that might have the same issue and add tests for those too. 8) Summarize every change made and why. Do not ask me questions—make reasonable assumptions and document them.

Related Prompts

AeroTools

AeroAssistant

Online AI
Hello! I am your official AeroTools AI Assistant. How can I help you use our tools today?