Skip to main content
Back to Prompt Library
Build the complete application

Implementation brief

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build a Repository Bug-Fixing Agent

Format
Code-aware
Lines
50
Sections
11
Linked challenge
Build a Repository Bug-Fixing Agent

Prompt source

Original prompt text with formatting preserved for inspection.

50 lines
11 sections
No variables
1 code block
## Who Uses It
A software maintainer handling incoming bug reports.

## What You Will Build
Build an agent that turns a bug report into a reproducible failure, a code patch, and a reviewable change package. Let maintainers inspect the evidence before accepting the fix.

## Inputs
- Issue description
- Local repository files
- Allowed test commands

## Workflow
1. Read the issue and inspect relevant files.
2. Create a failing reproduction test.
3. Implement the smallest supported fix.
4. Run the allowed checks and assemble a local change package.

## Interface
An issue workspace with reproduction logs, a code diff, test results, and an accept-or-reject review panel.

## Working Demo
Import the repository, reproduce total(100, 10) returning 110, fix it to return 90, and display passing tests with the diff.

## Deliverables
- A working local application with the specified review interface.
- Source code, dependency lockfile, and setup commands.
- A recorded end-to-end demo using the supplied starter data.
- Example outputs, action logs, and automated tests.

## Starter Data
These fictional records are a small development fixture, not a production dataset. Implement the mock services described in the brief.

```json
{
  "request": "Fix discounts being charged as an addition.",
  "files": {
    "pricing.py": "def total(price, discount):\n    return price + discount\n",
    "test_pricing.py": "from pricing import total\ndef test_no_discount():\n    assert total(100, 0) == 100\n"
  },
  "issue": {
    "price": 100,
    "discount": 10,
    "expected_total": 90
  },
  "allowed_commands": [
    "pytest"
  ]
}
```

## Constraints
Run code only in an isolated local workspace. Do not push commits or open remote pull requests.
Choose an available model that supports your implementation. Record its identifier and version.

## Evaluation
Review the complete application, not only the starter-case answers.
- The new regression test fails on the original code.
- The existing test and regression test pass after the change.
- The review package contains a diff and actual test logs.
Add one normal case, one incomplete-input case, and one failure-recovery case.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Preserve the source structure until you know which part of the prompt is actually driving the result quality.

Tune next

Change domain facts, examples, and tool context first before you rewrite the instruction scaffold.

Verify after

Validate one failure mode at a time so prompt changes stay attributable instead of getting noisy.