Verified against GitHub Copilot coding agent · 2026-07-24
Write an issue tight enough to hand the Copilot coding agent unattended
An issue template for the @copilot coding agent that bounds file scope, states a testable done-state, flags the sandbox's own network limits, and tells the agent exactly how to handle a blocker instead of guessing silently through it.
The prompt
Ready to copy — highlighted parts are example details you can swap.
Assign this issue to @copilot, the GitHub Copilot coding agent. It runs unattended in its own ephemeral, Actions-backed sandbox, pushes commits to a draft pull request as it works, and only surfaces back to a human through that PR and its own comments on it — write this issue as a brief for an agent that cannot ask a clarifying question mid-task, only before it starts, or afterward in PR comments once a human replies. TASK Add a CSV export button to the /reports/[id] page that downloads the current filtered view, reusing the existing exportToCsv() helper. FILES LIKELY IN SCOPE app/reports/[id]/page.tsx, components/reports/ExportButton.tsx (new), lib/export/csv.ts DONE WHEN 1. Button appears only when the report has at least one row. 2. Clicking it downloads a CSV matching the visible filtered rows. 3. Existing report page tests still pass; a new test covers the zero-rows case. ENVIRONMENT AND NETWORK NOTES The sandbox's network allowlist has not been extended for this repo — do not add any dependency that requires a fresh npm registry mirror or an external API call not already used elsewhere in lib/export/. The agent's sandbox has its own network allowlist, separate from what your own machine can reach — do not assume it can install an arbitrary package or hit an external API just because your local dev environment can. If this task genuinely needs a dependency or a network call that is not already allowed in the environment, say so here explicitly rather than letting the agent discover the block partway through and improvise around it. RULES FOR THE AGENT - Stay inside the scope above. If the done-state above is provably unreachable without touching a file outside it, explain exactly why in the PR description rather than silently expanding scope. - Run the existing test suite and lint before opening the PR, and paste the exact command output in the PR description — not a claim that it passed, the actual output, since the PR description is the only account of the work a reviewer who was not watching the run has access to. - If any part of this issue is ambiguous, state the ambiguity and the interpretation chosen in the PR description, rather than picking silently and letting a reviewer discover the choice only by reading the diff closely. - Open the PR as a draft and do not mark it ready for review until every item under DONE WHEN is satisfied. A draft that looks finished but has not been marked ready is a signal worth trusting; a ready PR that turns out incomplete costs a reviewer's time twice over. COMMIT HYGIENE Keep commits scoped to a coherent unit of work rather than one giant commit at the end — a reviewer working through an autonomous agent's PR benefits from reading the commit history as a sequence of decisions, the same way they would review a human contributor's incremental work, not as a single undifferentiated diff. If exportToCsv() cannot handle the filtered-view shape, stop, open the draft PR with a comment explaining exactly what is missing, and do not invent a new export implementation. I will reply directly in PR comments within one business day; do not wait longer than that before pinging the thread again if no response arrives. When a human replies in a PR comment, treat that reply as the only new information the agent will get for the remainder of this task — there is no second channel back, so if the reply itself is ambiguous, the agent should say so in a follow-up comment rather than guessing at the intended meaning and pushing a new commit on that guess.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
The coding agent runs unattended inside its own ephemeral, GitHub Actions-backed sandbox and only ever surfaces back to a human through the draft pull request and its own comments on it — a mid-task clarifying question is not part of that loop the way it is in an interactive Copilot Chat session, so any ambiguity left in the issue gets resolved by the agent's own judgment rather than caught before it costs anything, which is exactly why the ambiguity-and-interpretation rule in this brief has to be a hard requirement rather than a nice-to-have. The sandbox's own network allowlist is a genuinely separate failure surface from anything a human contributor would hit locally — a package that installs fine on a developer's own machine can be blocked entirely inside the agent's environment if it was never added to that environment's allowed destinations, and an agent that hits that block mid-task has no path to ask before improvising some workaround, which is precisely the scenario the environment-notes section exists to head off before the run even starts, not after it fails partway through. Requiring literal, pasted command output for tests and lint, rather than a claim that they passed, closes the specific failure mode where the agent's own account of its work is the only verification a reviewer who was not watching the run actually has access to — a reviewer checking a pasted 42 passed, 0 failed line is checking evidence; a reviewer trusting the sentence tests pass is trusting the same process that wrote the code to also grade it honestly, with no independent check in between. Marking the PR draft-only until every done-state item is satisfied turns a checklist that could otherwise be satisfied loosely into an actual release gate the agent has to check itself against before flipping the one bit that tells a human this is ready to look at. The instruction to treat a human's PR comment reply as the only new information available for the rest of the task matters because there genuinely is no second channel back — an ambiguous reply that the agent guesses at rather than questioning in a follow-up comment compounds a misunderstanding into another commit, on a task where the human already spent their one clarifying opportunity and does not know a guess was made at all until the next diff arrives.
What you get back
PR description (excerpt): Implements CSV export on the filtered report view per the issue. Ambiguity encountered: filename format was not specified — used report-{id}-{date}.csv, matching the existing convention in lib/export/csv.ts's other call site. Test output: 47 passed, 0 failed (added export-zero-rows.test.ts). Ready for review.
Verified against
GitHub Copilot coding agent GA release, 2026-06 (Actions-backed sandbox) · 2026-07-24
Changelog
- 2026-07-24 — Initial publish, verified against the GitHub Copilot coding agent GA release.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
