Library › Agents & Automation AI › Software developers
Brief a coding agent to update dependencies safely
- For Software developers
- You practice Setting limits and rules
- Time about 5 minutes
About this exercise
You want a coding agent to handle this week's dependency updates. Write its brief: bump only patch and minor versions, keep express below 4.20 (bump it to 4.19.2, a known bug breaks your sessions), send any major version to you with ASK_HUMAN, run tests once after all bumps, open one PR and never merge. Output a plain-text numbered action log of at most 10 lines, ending with a DONE line listing the bumped packages.
Common mistakes when you ask AI for this
- Not showing the log format. Left alone, the AI writes a friendly report with headings instead of a checkable action log. Try: Show it literally: "Format every line like 1. ACTION: tool(args), then ASK_HUMAN: and DONE: lines. Plain text."
- Not pinning the known problem. The AI takes the latest version of everything, including the express release that breaks your sessions. Try: Add: "Bump express to 4.19.2 only, nothing 4.20 or newer."
- No order or stop rule. The AI may open the PR before testing, take the major React jump, or merge when CI passes. Try: Add: "Majors go to ASK_HUMAN. Run tests after all bumps, then open one PR. Never merge."
- No finish line. Without a done rule the summary is vague. Try: Say: "End with DONE listing each bumped package."
What a strong prompt includes
- Limits to patch and minor
- Pins express
- Sets the order
- Forbids merging
- Shows the action-log format
Related exercises
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add labels to a signup form without rewriting the page (Coding AI · High school students)
- Announce the employee assistance program in three steps (Writing AI · HR and recruiting)
- Answer a patient portal message about delayed lab results (Writing AI · Nurses and healthcare workers)