{"id":"eval-dev-golden-answer-undo-last-commit","audience":"developers","category":"evaluation","track":"evals","technique":"context","title":"Write the golden answer for a dev-helper bot's git question","free":false,"task":"You're adding test cases for your team's internal dev-helper bot, and this git question needs a golden answer. Team rule: the bot never suggests force-pushing to shared branches. Write exactly 3 numbered lines: '1. Command: ...', '2. What it does: ...' in one plain sentence, and '3. Check: ...' giving the command to confirm the changes are still there. Plain text, under 45 words.","materialLabel":"The test question and the team's git guide (attached to your prompt automatically)","material":"TEST CASE #31 for devhelper-bot\nQuestion (from a junior dev): \"I committed to my feature branch too early. How do I undo the last commit but keep my changes so I can keep working?\"\n\nTEAM GIT GUIDE (excerpt, platform team wiki)\n- Undo the last commit, keep changes staged: git reset --soft HEAD~1\n- Undo the last commit, keep changes unstaged: git reset HEAD~1 (same as --mixed)\n- Throw away the last commit AND the changes: git reset --hard HEAD~1 (dangerous, avoid unless sure)\n- If the commit is already pushed to a shared branch, don't rewrite history. Use git revert <commit> to add a new commit that undoes it.\n- Our main and release branches are protected anyway.\n\nTest-writing notes\n- The bot's last answers were 200+ words and offered all three reset options plus reflog tips.\n- Golden answers should be the shortest complete correct answer.\n- A junior dev once lost a teammate's work after following an old bot answer.","rules":[{"type":"numberedItems","count":3},{"type":"plainText"},{"type":"maxWords","max":45}],"mistakes":[{"title":"Listing every option","why":"The AI shows all three reset modes, including the one that deletes work.","fix":"Say: \"Give the one command that keeps changes. No --hard.\"","checks":["r0"]},{"title":"No way to check","why":"The AI stops at the command, so a nervous junior dev can't confirm nothing was lost.","fix":"Add: \"Line 3: Check: the command that shows the changes are still there.\"","checks":["r1"]},{"title":"Suggesting a force push","why":"The AI often says 'then git push --force', which your team bans.","fix":"Say: \"Never suggest force-pushing.\"","checks":["r2"]},{"title":"A long tutorial","why":"The AI explains git internals and reflog, which is hard to grade against.","fix":"Show the shape: \"1. Command: 2. What it does: 3. Check:\"","checks":["numberedItems","maxWords","plainText"]}],"promptHints":[{"label":"Bans force-pushing","patterns":["force","never suggest","no push"]},{"label":"Shows the three-line shape","patterns":["command:","what it does","check:"]},{"label":"Asks for a way to confirm","patterns":["confirm","git status","still there","check"]},{"label":"Keeps it short","patterns":["\\d+\\s*words","one sentence","short"]},{"label":"Asks for plain text","patterns":["plain","no bold","no markdown","no formatting","no headings"]}],"hint":"A golden answer is the shortest correct reply you'll grade the bot against. Show its exact shape, include the safe path for the risky case, and state the team rule.","rubricLabels":["Line 1 gives git reset --soft HEAD~1 (or git reset HEAD~1, which also keeps changes) and does not suggest --hard","Line 3 starts with Check: and gives git status (or git diff) to confirm the changes are still there","The answer never suggests force-pushing (no push --force or -f) and has exactly the three labeled lines Command, What it does, and Check"]}