# Sample Work Artifact: Coding-Agent Interaction Evaluation

This is a sanitized sample for G2i / Handshake / Mindrift-style AI coding-agent evaluation roles.

## Prompt Given To Agent

"Fix the React dashboard filter bug where clearing the search box leaves the old filtered results visible until the next refresh."

## What A Strong Agent Should Do

- Reproduce or inspect the filter state path before editing.
- Find where derived filtered results are memoized or stored.
- Check whether the clear action resets both query state and derived result state.
- Add or update a regression test for empty-query behavior.
- Keep the patch narrow and avoid unrelated UI refactors.

## Evaluation Notes

### Strong Response

The agent inspects the filter component and state owner, identifies that `filteredItems` is stored separately from `query`, and updates the clear handler to reset both. It adds a regression test that types a query, confirms a reduced result set, clears the input, and expects the full list to return. The explanation is concise and names the state synchronization issue.

### Weak Response

The agent changes CSS, adds a debounce, or forces a full page reload after clearing search. These may hide the symptom but do not address the state bug. A weak answer also claims success without running the relevant test or inspecting the affected component.

### Failure Taxonomy

- Symptom patching instead of root cause.
- Unverified claim of success.
- Overbroad refactor.
- Missing regression coverage.
- Incorrect state ownership assumption.

## Rating Template

| Dimension | Score | Notes |
| --- | ---: | --- |
| Root-cause identification | /5 |  |
| Patch scope | /5 |  |
| Test adequacy | /5 |  |
| Explanation quality | /5 |  |
| Trust / engineering judgment | /5 |  |

Overall judgment:

Recommended feedback:
