{"id":"agent-dev-issue-triage-bot-instructions","audience":"developers","category":"agents","track":"agents","technique":"examples","title":"Write instructions for a GitHub issue triage bot","free":false,"task":"You're writing the instructions for a bot that triages new GitHub issues on your open-source library. It must give each issue one label (bug, feature, question or docs), ask for the library version in a comment when a bug report doesn't include one, comment with a link to the original on a duplicate, and never close or assign issues. Output exactly 7 numbered plain-text lines: one action per issue in order, then DONE.","materialLabel":"New issues and the bot's actions (attached to your prompt automatically)","material":"New issues - github.com/tallyhub/datefmt (open-source date formatting library)\n\n#412 \"formatRelative returns 'in 0 days' for today\" - \"On v3.2.1, formatRelative(new Date()) shows 'in 0 days' instead of 'today'.\"\n#413 \"Support for Hebrew locale?\" - \"Would love he-IL support for RTL apps.\"\n#414 \"Crash on invalid dates\" - \"parseISO('2026-13-01') throws instead of returning null. Pretty sure this is a bug.\"\n#415 \"How do I format as 'Nov 6'?\" - \"What pattern gives short month + day?\"\n#416 \"README example for addBusinessDays is wrong\" - \"The example output says Monday but it should be Tuesday.\"\n#417 \"formatRelative says 'in 0 days'\" - \"Same as someone else reported, today shows as 'in 0 days'. v3.2.1.\"\n\nMaintainers: @lena-k, @tomas-r\n\nAvailable actions:\nlabel(issue, label)\ncomment(issue, text)\nclose(issue)\nassign(issue, user)\nDONE(summary)","rules":[{"type":"numberedItems","count":7},{"type":"plainText"}],"promptHints":[{"label":"Gives the labels","patterns":["bug","feature","question","docs"]},{"label":"Asks for the version","patterns":["version"]},{"label":"Handles duplicates","patterns":["duplicate","original","link"]},{"label":"Forbids closing or assigning","patterns":["close","assign"]},{"label":"Shows the action-log format","patterns":["action:","action log","numbered","\\b1\\.","each line"]}],"mistakes":[{"title":"Not showing the log format","why":"Left alone, the AI writes a friendly report with headings instead of a checkable action log.","fix":"Show it literally: \"Format every line like 1. ACTION: tool(args), then ASK_HUMAN: and DONE: lines. Plain text.\"","checks":["numberedItems","plainText"]},{"title":"Not giving the labels","why":"The AI makes up labels like \"enhancement\" or \"i18n\".","fix":"Say: \"One label: bug, feature, question or docs.\"","checks":["r0"]},{"title":"No rule for thin reports or duplicates","why":"The AI labels a bug without a version and leaves duplicates unlinked.","fix":"Add: \"Bug with no version: comment asking for it. Duplicate: comment linking the original.\"","checks":["r1"]},{"title":"Letting it close or assign","why":"The AI closes the duplicate and pings maintainers on everything.","fix":"Add: \"Never close or assign.\"","checks":["r2"]}],"hint":"Bots get one shot at every new issue. Give the exact labels, the two special cases and what the bot must never do.","rubricLabels":["Labels #412 bug, #413 feature, #415 question and #416 docs","#414 (a bug with no version) gets a comment asking which version they're on, and #417 gets a comment linking to #412 as the original","There is no close or assign line, and the last line starts with DONE"]}