ForkFree

Prompts / Coding

Evidence-Backed Feature Tracing

You get a clear, step-by-step explanation of one feature, with every claim tied to a line of code. It works because the reply must split proven facts from guesses and gaps, so you can trust what you read.

Partly workedThe trace is accurate and well evidenced, with Confirmed, Inferred and Unknown lists and sensible requests for extra code. But it runs to roughly 430 words against the 350 limit, and several Confirmed bullets have no bracketed quote, so it misses the length and "proof for every claim" requirements.

The prompt

Act as a senior software engineer who explains unfamiliar code and never states a claim without proof.

Task: Explain how one feature works in the code I give you, tracing it from the trigger to the final result.

Feature: {feature_name}
Code: {code_excerpt}

Steps:
1. Find the entry point where {feature_name} starts, such as a button handler, route or command.
2. Follow the path step by step, naming each function or file and what it does to the data.
3. For every claim, quote the exact line or name that proves it.
4. Sort your findings into three groups: confirmed from the code, inferred but not shown, and unknown.
5. Do not guess what is missing from the excerpt. Say what extra code you would need.

Output: A numbered trace from trigger to result, each step with its evidence in brackets. Then three short lists headed Confirmed, Inferred and Unknown. Keep it under 350 words.

Change the parts in curly braces. Use it when you inherit a codebase or review a contractor's work and need to understand a single feature quickly.

What happened when we ran it

We sent

Act as a senior software engineer who explains unfamiliar code and never states a claim without proof.

Task: Explain how one feature works in the code I give you, tracing it from the trigger to the final result.

Feature: Export orders to CSV
Code: // orders.js
document.querySelector('#export-btn').addEventListener('click', () => exportOrders(currentFilter));

async function exportOrders(filter) {
  const rows = await fetch('/api/orders?status=' + filter).then(r => r.json());
  const csv = toCsv(rows, ['id', 'customer_email', 'total', 'created_at']);
  downloadFile('orders-' + Date.now() + '.csv', csv);
}

function toCsv(rows, columns) {
  return [columns.join(','), ...rows.map(r => columns.map(c => r[c]).join(','))].join('\n');
}

// downloadFile is imported from ./utils and not shown here.

Steps:
1. Find the entry point where Export orders to CSV starts, such as a button handler, route or command.
2. Follow the path step by step, naming each function or file and what it does to the data.
3. For every claim, quote the exact line or name that proves it.
4. Sort your findings into three groups: confirmed from the code, inferred but not shown, and unknown.
5. Do not guess what is missing from the excerpt. Say what extra code you would need.

Output: A numbered trace from trigger to result, each step with its evidence in brackets. Then three short lists headed Confirmed, Inferred and Unknown. Keep it under 350 words.

The model replied

# Export Orders to CSV: Trace **Trace** 1. **Trigger:** User clicks the export button. [`document.querySelector('#export-btn').addEventListener('click', ...)`] 2. **Handler:** The click calls `exportOrders` with the current filter. [`() => exportOrders(currentFilter)`] 3. **Fetch:** `exportOrders` requests orders from the server, with the filter in the query string. [`fetch('/api/orders?status=' + filter)`] 4. **Parse:** The response is parsed as JSON into `rows`. [`.then(r => r.json())`, `const rows = await`] 5. **Convert:** `toCsv` is called with the rows and four column names. [`toCsv(rows, ['id', 'customer_email', 'total', 'created_at'])`] 6. **Build CSV:** `toCsv` makes a header line from the column names. It then makes one line per row by picking each column's value and joining with commas. All lines are joined with newlines. [`columns.join(',')`, `rows.map(r => columns.map(c => r[c]).join(','))`, `.join('\n')`] 7. **Download:** `downloadFile` receives a filename with a timestamp and the CSV string. [`downloadFile('orders-' + Date.now() + '.csv', csv)`] **Confirmed** - The click starts the flow, and `currentFilter` is passed on. - The data comes from `/api/orders`, filtered by `status`. - Output has a header row, then data rows, in the order id, customer_email, total, created_at. - The filename is `orders-<timestamp>.csv`. - `toCsv` does no quoting or escaping. [`.join(',')` only] - `exportOrders` has no error handling. [no `try/catch`, no `r.ok` check] **Inferred (not shown)** - `downloadFile` likely triggers a browser download. Its name suggests this, but its body is not shown. - `rows` is presumably an array, because `rows.map` requires one. If the API returns anything else, the code would throw. - Because nothing escapes values, fields containing commas, quotes or newlines (such as an email or a name) would likely corrupt the CSV. This follows from the `toCsv` code, but I haven't seen real data. **Unknown** - Where `currentFilter` is defined and what values it takes. I would need the rest of `orders.js`. - Whether `filter` is URL-encoded. The code does not encode it. I would need to see the values `currentFilter` can hold. - What `/api/orders` returns, including its shape, pagination and auth. I would need the server route or API docs. - What `downloadFile` does, including MIME type, Blob use and BOM. I would need `./utils`. - How `null` or `undefined` values appear in the output. `join` turns them into empty strings, but only when the value is directly `null` or `undefined`. Other types would need checking against real data.

Run on Claude Sonnet 5.5, 30 Oct 2026. Automatic check: 3 out of 5.

Mentioned for

Claude, ChatGPT, Gemini

Where it came from

Found on GitHub, shared by JoasASantos: JoasASantos/REA-Prompts.

This is our own version of the idea, written and tested by us. The original may differ.

More coding prompts

Coding Struggled in our test
Fast Evidence-Based Binary Investigation

It gives you an agent run that finds answers in unfamiliar binaries or app bundles quickly, with each claim tied to evidence. Batching commands and labelling certainty cuts wasted turns and stops guesses passing as facts.

Found on GitHub, shared by aicodeking
Coding Struggled in our test
Code-Built Animated Explainer in One File

You get a working, looping animation in a single file that you can open in any browser, plus a plan you can edit. Asking for a scene timeline first and a self-check at the end keeps the code organised and cuts down on broken output.

Found on GitHub, shared by yihui-dev
Coding Partly worked
Build a Pass/Fail Test Set for Prompts

You get a ready-made set of test inputs with yes/no checks and a pass mark for any prompt you rely on. Turning vague quality worries into specific checks lets you compare prompt versions fairly and spot regressions.

Found on GitHub, shared by promptfoo