How to explain to students
GitHub Copilot sits inside your IDE (VS Code, JetBrains, Vim, Neovim) and suggests as you type. For DevOps work — bash, Dockerfile, Terraform, GitHub Actions YAML — it's particularly strong because the input is structured and the patterns are well-known. Type a comment describing what you want; Copilot completes the rest.
It is not magic. It works best when you've already loaded context: open the related files, write a clear comment header, name your variables well. "Garbage in, garbage out" applies. The single biggest skill upgrade is learning to write the comment first.
🎯 Practice Questions
Show Answer
Practical implications:
1. Open the test file before completing the function — Copilot will write code that satisfies the existing tests.
2. Open
Dockerfile + package.json before writing compose.yaml — Copilot will use the right port + start command.3. Keep the file count reasonable — every open file consumes context budget.
# write a docker compose file and presses Tab. Copilot generates a generic 2-service stack. Why? What does the prompt need?Alt+] (next suggestion) often more useful than the first suggestion?How to explain to students
Pipeline errors are AI's natural habitat: they're text-heavy, the failure modes are well-documented, and the fix is usually a small config change. The pattern: (1) paste the FULL error + (2) the workflow file + (3) the question phrased as "what's the most likely cause and the cheapest fix?". AI gets to root cause in seconds for issues that would take 30 minutes of Googling.
Two anti-patterns to avoid: (a) "my pipeline is broken, help" — no context, useless answer. (b) Pasting just the last line of the error — the line above is usually the root cause.
🎯 Practice Questions
Show Answer
Example:
npm ERR! code 1npm ERR! path /appnpm ERR! command failednpm ERR! command sh -c node-gyp rebuildnpm ERR! make: *** [Release/foo.o] Error 1npm ERR! ../foo.cc:42: error: 'X' was not declared in this scope ← actual causePasting only "code 1" gets a generic answer. Pasting the full block gets a fix. Default to 30 lines above the failure.
How to explain to students
Linux errors range from clear ("No such file") to cryptic ("too many open files", kernel oops messages). AI is excellent at the cryptic kind — translating into "what's broken, where, why."
For one-liners: AI is faster than recall. Need a find ... | xargs ... | awk ... chain to "delete all log files older than 7 days but keep the latest 2 per directory"? Five seconds with AI. Five minutes from memory + man pages.
🎯 Practice Questions
rm -rf, find ... -exec rm, truncate). What's the safety routine before running it?Show Answer
1. Read every flag. If you don't know what a flag does, look it up in
man first. AI is fluent in obscure flags you might not know.2. Replace the destructive verb with a safe one.
-exec rm → -print. truncate -s 0 → ls -la. Run the modified version. Inspect the list.3. Re-add the destructive verb only after you've eyeballed the list. If anything looks off — anything — abort.
Bonus: in production-like envs, run on one host first, then expand. "Try it on staging" is the cheap save.
grep -P for Perl regex. It works on Mac but fails on Alpine in Docker. What's the explanation, and what's the more portable alternative?How to explain to students
AI is brilliant at generation (write me X) and translation (explain this). It is shaky on judgement (should we do X?) and weak on novel architecture (something not heavily represented in training data). The trap is using AI for judgement work because it produces a confident-sounding answer either way.
A senior engineer who relies on AI for judgement plateaus. A junior who uses AI for generation while practising judgement themselves accelerates. The goal of every prompt should ideally include "explain why" — so you build the muscle alongside the output.
🎯 Practice Questions
Show Answer
1. Can I explain every change in 1 sentence? If not, I don't understand it.
2. What test would catch this if it broke? Does that test exist?
3. What's the rollback path? One command? Many manual steps?
4. What did I assume the AI knew that it might not? (e.g. "this is the v5 AWS provider, not v4").
5. Would I have done it the same way without AI? If yes, ship. If no, write down why — that's where you learn.
30 seconds is enough. Skip it and you'll merge an AI-generated
chmod 777 within a year.
How to explain to students
2024–2026 saw the rise of agentic IDEs. Where Copilot suggests one line at a time, agentic tools take a goal ("add OIDC authentication to this CI workflow"), read your codebase, plan a multi-file edit, run terminal commands, and present a diff for you to approve. The leap is from "auto-complete" to "auto-PR".
Two major categories: IDE-native (Cursor, JetBrains AI Assistant, GitHub Copilot Workspace) and CLI-native (Claude Code, Aider, Continue). Both have their place. CLI-native tools are particularly strong for DevOps because much of the work happens at the shell.
🎯 Practice Questions
Show Answer
1. Subtle errors slip in — a wrong region, an over-permissive IAM, a typo in a healthcheck path. Each looks fine alone; combined they break prod.
2. You lose the learning loop — by reviewing the diff, you absorb how the change works. Skipping that means you can't reason about it later when it breaks.
3. Audit trail — a PR with the AI conversation attached is searchable, blameable, revertable. A direct apply is none of those.
Treat agentic output like an intern's PR — high value, must review.
How to explain to students
Pick one of the earlier projects (Docker, CI/CD, AWS) and use AI to do two real tasks: (1) refactor something already there (e.g. "convert this CI workflow to use OIDC"), (2) add a new feature (e.g. "add a Slack notification on deploy failure"). Document the prompts that worked, the false starts, and the verification steps. The artefact: a real PR + a short post-mortem write-up.
Sample quiz questions (interactive)
Fill-in-the-prompt
How to explain to students
Frame as a real task: "Pick any GitHub repo you maintain (or fork a public one). Use AI to add a CI job that lints + formats the code. Submit a PR. Document every prompt + verdict. Total time budget: 90 minutes."
📋 Assignment Requirements
- Pick a real repo: yours or a fork. Must have at least one source language (TS/JS, Python, Go, Bash, HCL — any).
- Add a
.github/workflows/lint.ymlthat runs on pull_request: lint + format-check + (if relevant) typecheck - Use exactly one AI tool (Copilot, Claude, ChatGPT, Cursor, Claude Code — your choice). Document which.
- Maintain an
ai-log.md: every prompt + 1-line summary of the response + your verdict (applied / edited / discarded) - Final workflow must fail the build on any lint or format violation
- Pin every action to
@vN— no@main - Demonstrate end-to-end: push a deliberately badly-formatted commit on a branch; show the workflow blocking it via a screenshot
- Write a 1-page
retro.mdcovering: what AI did well, where it hallucinated, total time spent, what you'd prompt differently next time - Open the PR in the original repo (or your fork's main branch). Include the
ai-log.md+retro.mdalongside the workflow. - Bonus: Add a pre-commit hook mirror so contributors fail fast locally
- Bonus: Use 2 different AI tools side-by-side and compare outcomes for the same prompt