Open in VS Code: From your cloned
s26-06643repository, run in the terminal:code sse/00-ai-assisted-development/00-ai-assisted-development.ipynb
Module 00: Introduction to AI-Assisted Development#
Welcome to the future of software development.
Learning Objectives#
Understand what LLM coding agents are and how they work
Set up Claude Code or GitHub Copilot
Learn effective prompting strategies for code generation
Develop critical evaluation skills for AI-generated code
Understand the human-AI collaboration model
Use the plan-execute workflow to structure AI-assisted work
Manage context windows, token budgets, and subscription limits
Practice context engineering — loading the right information before asking the agent to act
The New Development Paradigm#
Software development has fundamentally changed. AI coding agents can:
Write code from natural language descriptions
Debug errors and explain fixes
Generate tests for existing code
Refactor and improve code quality
Write documentation
Explain unfamiliar codebases
But they are not magic. They:
Make mistakes and hallucinate (confidently generate incorrect information)
Don’t truly “understand” code
Can produce insecure or inefficient code
Need human guidance and oversight
Your job is to become an effective human-AI team.
What Are LLM Coding Agents?#
LLM (Large Language Model) coding agents are AI systems trained on vast amounts of code and text. They can:
Types of AI Coding Tools#
Tool |
Type |
Access |
Description |
|---|---|---|---|
Claude Code |
Agentic (terminal) |
CLI, VS Code extension |
Full terminal access, can run commands, edit files, explore codebases |
Claude |
Chat-based (browser) |
Conversational code generation in the browser |
|
GitHub Copilot |
Autocomplete + Agentic |
VS Code extension |
Suggests code as you type; also has an agentic chat mode |
Cursor |
Hybrid |
Desktop app |
Editor with AI chat and autocomplete |
Codex |
Agentic (terminal) |
CLI |
OpenAI’s coding agent for ChatGPT; runs in the terminal like Claude Code |
ChatGPT |
Chat-based (browser) |
Conversational code generation in the browser |
|
Gemini CLI |
Agentic (terminal) |
CLI |
Google’s coding agent; runs in the terminal, integrates with Gemini models |
Gemini |
Chat-based (browser) |
Google’s conversational AI in the browser |
|
Cody |
Hybrid |
VS Code extension |
Context-aware coding assistant |
Terminal Agents vs. Browser Chat vs. Editor Extensions#
Terminal agents (Claude Code, Codex, Gemini CLI):
Can execute multi-step tasks autonomously
Read and write files, run commands
Explore codebases and make decisions
Can complete entire features with one prompt
Browser-based chat (Claude, ChatGPT, Gemini):
Conversational code generation — paste code in, get code back
Good for quick questions, explanations, and brainstorming
Cannot directly access your files or run commands
Useful when you want to think through a problem before touching code
Editor extensions / autocomplete (Copilot, Cursor, Cody):
Suggest the next line or block of code as you type
Work within your editor alongside your files
Require you to drive the development
Some (Copilot, Cursor) also offer agentic chat modes
In this course we primarily use Claude Code (terminal agent), but the skills you learn — prompting, critical evaluation, iterative refinement — transfer to all of these tools. You should try several and develop a sense for when each is most useful.
Setting Up Claude Code#
Installation#
# Install via npm (requires Node.js)
npm install -g @anthropic-ai/claude-code
# Or via Homebrew on macOS
brew install claude-code
# Authenticate
claude login
Basic Usage#
# Start Claude Code in current directory
claude
# Ask Claude to do something
> Create a Python function that calculates the factorial of a number
# Claude will:
# 1. Write the code
# 2. Create/edit the file
# 3. Optionally run tests
Key Commands#
Command |
Description |
|---|---|
|
Show available commands |
|
Clear conversation history |
|
Summarize conversation to save context |
|
Show token usage and cost |
|
Cancel current operation |
Exercise 1: Hello Claude (5 min)#
Now that you know how to start Claude Code, try it out!
Instructions#
Open a terminal and create a temporary directory:
mkdir /tmp/hello-claude && cd /tmp/hello-claude
Start Claude Code:
claude
Ask it: “What directory am I in?”
Then ask: “Create a file called hello.py that prints hello world”
Observe what happens.
Reflect#
Did Claude ask for permission before creating the file?
Did it work on the first try?
Run
cat hello.pyto verify the file contents. Is it what you expected?Type
/costin Claude Code to see how many tokens that used.
When you are done, type /exit to leave Claude Code.
The Plan-Execute Workflow#
Now that you have seen what an AI agent can do with a simple task, let’s talk about how to use one for real work. The most important habit to develop is: plan first, execute second.
Why You Need a Plan#
When you sit down with an AI agent and start typing requests off the top of your head, several things go wrong:
You make vague requests because you have not thought through what you actually need
The agent goes in a direction you did not intend, and you spend time correcting it
You burn through tokens and context on exploratory dead ends
You end up with scattered code that does not fit together
A better approach: write a plan before you start coding. The plan does not need to be perfect. It needs to be specific enough that you and the agent are aligned on what “done” looks like.
The Two Phases#
Phase 1 — Plan: Think about what you want to build. Break it into steps. Write it down. You can use the AI to help you plan — in fact, Claude Code has a built-in plan mode (/plan) that prevents the agent from editing files while you think through the approach together.
Phase 2 — Execute: Give the agent the plan and let it work. Review what it produces. Update the plan as you learn things. Repeat.
This is not waterfall. You will go back and forth between planning and executing. But having a written plan means you always know where you are and what comes next.
What Makes a Good Plan#
A good plan is not just a list of steps. It’s a thinking tool that forces you to anticipate problems before you hit them. Here’s what to include:
Goal statement — One or two sentences describing what you are building and why. This keeps you focused when the work gets complicated.
Key questions to answer up front:
What are the inputs and outputs?
What libraries or APIs will you use? Why those and not alternatives?
What are the edge cases and error conditions?
What does “done” look like? How will you know it works?
Pros/cons analysis for design decisions — When you have a choice (e.g., argparse vs. click, SQLite vs. JSON files, REST vs. GraphQL), write down the trade-offs. This is valuable for two reasons: it forces you to think, and it gives the AI agent context about why you chose what you chose, so it can follow your intent.
## Design Decision: CLI Framework
- **argparse**: Standard library, no dependencies, verbose
- **click**: Cleaner API, adds a dependency, good docs
- **Decision**: argparse — we want zero dependencies for this tool
Anticipated problems — What could go wrong? What are you uncertain about? Writing these down lets you address them proactively instead of being surprised mid-implementation.
## Anticipated Problems
- The OpenAlex API rate-limits at 10 requests/second — need to add throttling
- Some authors have no institution listed — handle gracefully
- Test coverage for network calls requires mocking — may be complex
Milestones with checkpoint criteria — Break the work into stages, and define what “done” means for each stage. This prevents the common trap of building everything at once and having nothing that works.
## Milestones
1. **Core functions work in isolation** — can call each function in a REPL and get correct output
2. **Tests pass** — pytest runs clean, >80% coverage
3. **CLI works end-to-end** — can run from terminal with real arguments
4. **Package installs cleanly** — pip install -e . works, imports succeed
Status tracking — A checklist you update as you go. This is what you point the agent to when you start a new session.
A Complete Plan Example#
# Plan: Build a Temperature Converter CLI
## Goal
A command-line tool that converts between Celsius, Fahrenheit, and Kelvin.
Installable as a Python package with entry points.
## Design Decisions
- CLI framework: argparse (zero dependencies)
- Package layout: src/ layout with pyproject.toml
- Testing: pytest with parametrize for conversion pairs
## Anticipated Problems
- Kelvin cannot be negative — need input validation
- Floating point precision — round to 2 decimal places
- Users may pass invalid unit names — clear error messages needed
## Milestones
1. Conversion functions with tests
2. CLI entry point
3. Package structure and install
4. README with usage examples
## Steps
- [x] Step 1 — conversion functions created
- [x] Step 2 — tests for all conversions
- [ ] Step 3 — CLI entry point with argparse
- [ ] Step 4 — pyproject.toml and package structure
- [ ] Step 5 — README with examples
## Notes
- Decided to validate Kelvin >= 0 at the function level, not just CLI
- Added Rankine after initial plan — user requested it
Saving Plans to Markdown Files#
Plans should live in files, not just in your conversation. Save as PLAN.md in your project directory. When you start a new Claude Code session, you can point the agent to the plan:
Read PLAN.md and continue with the next incomplete step.
This is powerful because it survives across sessions. When you come back tomorrow, or when your context window fills up, the plan file keeps you oriented.
Refining Plans#
Your first plan will be wrong — or at least incomplete. That is fine. The workflow is:
Write an initial plan (even a rough one)
Ask the AI to review and improve it: “Read PLAN.md. Are there any steps I’m missing? Any edge cases I haven’t considered?”
Execute a few steps
Update the plan based on what you learned
Repeat
The plan is a living document. Update it as you go. Cross off completed steps. Add new steps when you discover them. Note decisions and their rationale so you remember why you made them.
Pacing Your Development#
AI agents can generate code faster than you can read it. This is a feature and a danger. If you let the agent sprint ahead — generating file after file, function after function — you will quickly end up with a codebase you do not understand, cannot debug, and cannot explain.
The rule: never develop faster than you can comprehend and test.
Signs You Are Moving Too Fast#
You accept code without reading every line
You have files you have not opened since the agent created them
You cannot explain what a function does without re-reading it
Tests do not exist yet, but you are already building the next feature
You are asking the agent to “just make it work” instead of understanding why it does not
How to Pace Yourself#
Work in small increments. Ask the agent to implement one function, one test, or one feature at a time. Review it. Run it. Understand it. Then move on. This feels slower in the moment but is faster in the long run because you avoid the costly “I have 500 lines of code I don’t understand and something is broken” state.
Use milestone checkpoints. After completing a milestone in your plan, stop and verify:
Does everything work? Run the tests.
Do you understand everything? Read through the code.
Is the plan still correct? Update it if needed.
Could you explain this to someone else? If not, you have a comprehension gap.
Test before you build more. Writing tests for each piece of code before moving to the next piece serves two purposes: it verifies correctness, and it forces you to understand the interface. If you cannot write a test for a function, you do not understand what it does well enough.
Review diffs, not just final output. When the agent edits an existing file, look at what changed — not just the final result. This is especially important when the agent refactors code or “fixes” something. Use git diff to see exactly what was modified.
Take breaks from the agent. Read through your code without the agent running. Try to trace the logic manually. Write notes about what each module does. This builds the mental model that lets you direct the agent effectively in the next session.
Pacing and Planning Work Together#
Your plan’s milestones are natural pacing checkpoints. Each milestone should be a point where:
Everything built so far works
Tests cover everything built so far
You can explain everything built so far
The plan is updated to reflect reality
If any of these are not true at a milestone, stop building new things and catch up. The AI agent will happily build the next feature on top of a broken foundation. You are the one who needs to say “not yet.”
Token Budgets, Context Windows, and Subscription Limits#
AI agents are not free and unlimited. Understanding their constraints will save you frustration and help you scope your work realistically.
What Are Tokens?#
LLMs process text in tokens — roughly 3/4 of a word. Every message you send and every response you receive costs tokens. When you ask Claude Code to read a file, that file’s contents become tokens in the conversation. When it writes code, those are tokens too.
The Context Window#
The context window is the total amount of text the model can “see” at once — your conversation history, file contents, tool outputs, everything. Think of it as the model’s working memory.
Model |
Approximate Context Window |
|---|---|
Claude (Opus/Sonnet) |
~200,000 tokens |
GPT-4o |
~128,000 tokens |
Gemini |
~1,000,000 tokens |
This sounds like a lot, but it fills up fast when you are reading files, running commands, and getting long outputs. When the context window fills up, the agent starts compacting — summarizing earlier parts of the conversation to make room. This means it may lose details from earlier in your session.
This is why plans in markdown files matter. The file persists even when the conversation gets compacted. You can always say: “Read PLAN.md to see where we are.”
Compacting Conversations#
In Claude Code, you can manually compact the conversation with the /compact command. This tells the agent to summarize the conversation so far and free up context space. Use it when:
You have been working for a while and the conversation is getting long
The agent seems to be “forgetting” earlier context or repeating itself
You are about to start a new phase of work and want a clean slate
You can also add a prompt to guide the summary: /compact Focus on the database schema decisions we made.
Subscription Limits#
Most AI tools have usage limits tied to your subscription tier:
Tool |
Free Tier |
Paid Tier |
|---|---|---|
Claude Code |
Limited messages/day |
Pro (\(20/mo): ~45x more usage; Max (\)100/200/mo): higher still |
GitHub Copilot |
Free for students |
Pro: unlimited completions |
ChatGPT / Codex |
Limited messages |
Plus (\(20/mo): more messages; Pro (\)200/mo): highest limits |
Gemini CLI |
Free daily quota |
Paid tiers for higher throughput |
These limits are real and you will hit them. On the Claude Pro plan, heavy coding sessions can exhaust your daily or weekly token budget. When that happens, you either wait for it to reset or switch to a different tool.
Scoping Your Work#
This is why planning matters practically, not just philosophically. If you have a limited token budget:
Break work into sessions. Do not try to build an entire project in one conversation. Plan a session around one or two concrete steps.
Front-load the thinking. Spend your tokens on execution, not exploration. If you have not decided what to build yet, think on paper first (or use the browser chat, which is often cheaper or free).
Use
/costfrequently. In Claude Code, type/costto see how many tokens you have used in the current session. This helps you gauge how much budget you have left.Save state externally. Update your
PLAN.md, commit your code, and write notes. If your session ends unexpectedly, you should be able to resume without losing progress.Start new conversations for new tasks. A fresh conversation has a clean context window. If you are switching from debugging to documentation, it may be more efficient to start a new session and point the agent to the relevant files.
Checking Your Usage#
In Claude Code:
/usage # Shows token usage for the current session
On the web:
Claude: Check your usage at claude.ai/settings under your plan details
ChatGPT: Settings > Usage in the ChatGPT interface
GitHub Copilot: Your GitHub settings page shows Copilot usage
Get in the habit of checking /usage after any large operation (reading a big file, generating a lot of code). It builds intuition for how quickly you consume tokens, which helps you plan your sessions.
Exercise 1b: Plan-Execute-Review (15 min)#
Practice the plan-execute workflow with a small project.
Instructions#
Create a project directory:
mkdir /tmp/unit-converter && cd /tmp/unit-converter
Write a plan file — create
PLAN.mdby hand (in VS Code or your editor) with a plan for a simple unit converter module. It should convert between at least two unit systems (e.g., metric/imperial for length, or Celsius/Fahrenheit/Kelvin for temperature). Include:A goal statement (1-2 sentences)
3-5 concrete steps
A status checklist
Any notes or decisions
Start Claude Code and give it the plan:
Read PLAN.md and implement the first two steps.
Check your usage after the agent finishes:
/cost
Update the plan — ask the agent to update PLAN.md to reflect what was completed:
Update PLAN.md to mark completed steps and add any new steps you discovered.
Compact the conversation to see how it works:
/compact
Then ask: “What have we done so far?” — does the agent still know?
Reflect#
How did having a written plan change the interaction compared to Exercise 1?
Did the agent follow the plan, or did it go off-script? How did you correct it?
After compacting, did the agent retain enough context to keep working?
Look at the updated
PLAN.md. Is it a useful record of what happened?
Takeaway: Plans are not just for you — they are a communication tool between you and the agent, and they survive beyond any single conversation.
Context Engineering: Feeding the Agent the Right Information#
You now know how to plan your work and how the context window works. The next skill is context engineering — the deliberate practice of loading the agent’s context with the information it needs before you ask it to act.
An AI agent can only work with what it can see. If you ask it to fix a bug but it has not read the relevant source file, it will guess. If you ask it to call an API but it has not seen the documentation, it will hallucinate endpoints. The quality of the output is directly proportional to the quality of the context you provide.
What Goes Into Context#
Everything the agent “knows” during a session comes from these sources:
Source |
How It Gets There |
Example |
|---|---|---|
Your messages |
You type them |
“Fix the parse_date function to handle ISO format” |
Files it reads |
You ask it to read, or it reads on its own |
“Read src/parser.py” |
Command output |
It runs a command and sees the result |
|
Web pages |
You paste content, or it fetches a URL |
API documentation, Stack Overflow answers |
Project instructions |
CLAUDE.md files loaded automatically |
Coding conventions, architecture notes |
Conversation history |
Everything said so far (until compacted) |
Earlier decisions, error messages |
The Context Engineering Workflow#
Before asking the agent to build or fix something, ask yourself: does the agent have everything it needs to do this well? If not, load the context first.
Step 1 — Gather relevant files:
Read src/converter.py and tests/test_converter.py
The agent now has the source code and existing tests in context. It can write new code that is consistent with what exists.
Step 2 — Bring in external documentation:
Fetch https://docs.python.org/3/library/argparse.html and summarize the key patterns for subcommands
Terminal agents like Claude Code can fetch web pages directly. For browser-based chat, you would copy-paste the relevant section of the docs. Either way, the agent now has accurate reference material instead of relying on (possibly outdated) training data.
Step 3 — Show it the problem:
Run pytest tests/test_converter.py -v and show me the output
Now the agent sees the actual test failures, not a description of them. Concrete output is always better than your summary of it.
Step 4 — Now ask for the action:
Fix the failing tests. The issue is in the kelvin_to_celsius function.
By this point, the agent has the source, the tests, the docs, and the error output. It can produce a targeted fix instead of a blind guess.
Sources of Context#
Local files and code:
Source files, config files, READMEs, existing tests
Ask the agent to read them:
Read pyproject.tomlorRead src/to scan a directoryFor large codebases, be selective — reading every file wastes context. Point the agent at the relevant modules.
Command output:
Test results:
pytest --tb=shortError messages and tracebacks
git diff,git log,git statusAny diagnostic command relevant to the task
Web pages and documentation:
Official documentation for libraries you are using
API references with current endpoints and parameters
Stack Overflow answers (paste the relevant answer, not the whole page)
In Claude Code:
Fetch [URL] and summarize [what you need]In browser chat: copy-paste the relevant section
Your own notes:
PLAN.mdwith your project plan and decisionsDesign documents, meeting notes, spec files
Previous error messages and what you tried
Project instructions (CLAUDE.md):
A
CLAUDE.mdfile in your project root is loaded automatically by Claude Code at the start of every sessionIt tells the agent about your conventions, project structure, and preferences
We will cover this in detail in Module 11 — for now, know that it exists and is the most efficient way to provide persistent project context
Common Context Engineering Mistakes#
Too little context: “Fix the bug” — the agent does not know which bug, which file, or what the expected behavior is. It will guess, and you will waste tokens correcting it.
Too much context: “Read every file in the project” — if you dump 50 files into context, the agent may lose focus. It is better to load 3-5 relevant files than the entire codebase.
Stale context: Pasting an error message from yesterday when the code has changed since then. Always re-run commands to get fresh output.
No documentation: Asking the agent to use a library it was not trained on (or whose API has changed) without providing current docs. Fetching the official docs takes seconds and prevents hallucinated APIs.
Trusting training data over docs: The agent’s training data has a cutoff date. If you are using a recently updated library, the agent may suggest outdated patterns. When in doubt, fetch the current docs.
Exercise 1c: Context Engineering in Practice (10 min)#
Experience how context quality affects output quality.
Instructions#
Using your unit converter project from Exercise 1b (or create a new temp directory):
Round 1 — No context: Start a fresh Claude Code session and ask:
Add Kelvin to Rankine conversion.
Note what the agent does. Does it know your project structure? Does it put the code in the right file?
Round 2 — With context: Start another fresh session and try:
Read src/converter.py and tests/test_converter.py. Then add Kelvin to Rankine
conversion following the same patterns as the existing functions, with tests.
Compare#
How different were the outputs?
Which version required more follow-up corrections?
How much time did the 10 seconds of context-loading save you?
Bonus round — Fetch documentation:
Fetch https://docs.python.org/3/library/unittest.html and convert my tests
from unittest to pytest style, keeping the same test cases.
Did fetching the docs help the agent produce better output than it would from memory alone?
Takeaway: The time you invest in loading context is always less than the time you spend fixing output that was generated without it.
Setting Up GitHub Copilot#
Installation#
Sign up at github.com/features/copilot
Free for verified students!
Install the extension in VS Code
Sign in with your GitHub account
Basic Usage#
Copilot works automatically as you type:
# Type a comment describing what you want
# Calculate the factorial of a number
# Copilot suggests:
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
Key Shortcuts (VS Code)#
Shortcut |
Action |
|---|---|
|
Accept suggestion |
|
Dismiss suggestion |
|
Next suggestion |
|
Previous suggestion |
|
Show all suggestions |
Effective Prompting Strategies#
The quality of AI output depends heavily on your prompts.
Be Specific#
Bad:
Write a function to process data
Good:
Write a Python function that:
- Takes a list of dictionaries with 'name' and 'score' keys
- Returns the average score
- Raises ValueError if the list is empty
- Include type hints and a docstring
Provide Context#
Bad:
Add error handling
Good:
Add error handling to the fetch_data function in api.py.
It should:
- Catch network errors and retry 3 times
- Log errors using the existing logger
- Raise a custom APIError on failure
Request Specific Formats#
Create a pytest test file for the Calculator class.
- Use pytest fixtures for setup
- Include edge cases (zero, negative numbers)
- Use parametrize for multiple test cases
- Follow the Arrange-Act-Assert pattern
Iterate and Refine#
Don’t expect perfection on the first try:
> Write a function to parse dates
[AI generates code]
> Good, but also handle ISO format dates
[AI updates code]
> Add error handling for invalid formats
[AI adds try/except]
> Write tests for this function
[AI generates tests]
Exercise 2: Prompt Comparison (10 min)#
Experience the difference between vague and specific prompts.
Instructions#
Try these two prompts with your AI agent (Claude Code or Copilot) and compare the results.
Prompt A (vague):
Write a function to process data
Prompt B (specific):
Write a Python function called summarize_scores that takes a list of dictionaries
with 'name' (str) and 'score' (float) keys, returns a dictionary with 'mean', 'max',
'min', and 'top_scorer' keys. Include type hints and a docstring.
Reflect#
How long and detailed was the output from Prompt A vs. Prompt B?
Could you use the output from Prompt A without modification? What about Prompt B?
What assumptions did the AI make for Prompt A that it didn’t need to make for Prompt B?
Which output would you be more confident putting into production code?
Takeaway: The time you spend writing a good prompt saves you time reviewing and fixing the output.
Critical Evaluation of AI Output#
Never blindly trust AI-generated code. Always:
1. Read and Understand#
Before accepting any code:
Read every line
Understand what it does
Ask AI to explain if needed
2. Check for Common Issues#
Issue |
What to Look For |
|---|---|
Security |
SQL injection, command injection, hardcoded secrets |
Edge cases |
Empty inputs, None values, boundary conditions |
Error handling |
Missing try/except, swallowed exceptions |
Performance |
Nested loops, repeated calculations, memory leaks |
Dependencies |
Unnecessary imports, version conflicts |
Style |
Inconsistent naming, missing docstrings |
3. Test Thoroughly#
AI-generated code needs testing just like any other code:
Run the code with sample inputs
Test edge cases
Run existing tests
Add new tests if needed
4. Question Hallucinations#
AI can confidently generate:
Nonexistent function names
Wrong API signatures
Outdated library versions
Incorrect algorithms
If something looks unfamiliar, verify it!
Exercise 3: Spot the Issues (10 min)#
Practice your critical evaluation skills on AI-generated code.
Instructions#
Ask your AI agent:
Write a Python function that reads a CSV file and returns the average of the second column.
Do not run the code yet. Instead, review it carefully and answer these questions:
Questions#
(a) What assumptions did the AI make?
Does it assume the CSV has headers?
Does it assume the second column is numeric?
Does it assume a specific delimiter?
Does it assume the file exists?
(b) What error handling is missing?
What happens if the file doesn’t exist?
What happens if the second column has non-numeric values?
What happens if the CSV has fewer than two columns?
What happens if the file is empty?
(c) What would break with unexpected input?
A CSV with a header row that isn’t numeric
A CSV that uses semicolons instead of commas
A CSV with missing values in the second column
A very large file (millions of rows)
Discuss#
Share your findings with a neighbor. Did you catch the same issues? Did they find something you missed?
Takeaway: Reading AI code critically is one of the most important skills in AI-assisted development.
The Human-AI Collaboration Model#
Think of AI as a very fast junior developer who:
Knows a lot of syntax and patterns
Works incredibly quickly
Makes confident mistakes
Needs supervision and guidance
Your Role#
You Do |
AI Does |
|---|---|
Define requirements |
Generate code |
Make design decisions |
Implement patterns |
Review and approve |
Write boilerplate |
Catch errors |
Generate tests |
Understand the system |
Document code |
Own the final product |
Suggest improvements |
When to Use AI#
Great for:
Boilerplate and scaffolding
Standard patterns (CRUD, API calls)
Test generation
Documentation
Explaining code
Debugging common errors
Be careful with:
Security-critical code
Complex algorithms
Domain-specific logic
Performance-critical code
Novel problems
Summary#
Concept |
Key Takeaway |
|---|---|
AI Coding Agents |
Tools that generate code from natural language |
Agentic vs Autocomplete |
Agentic can take actions, autocomplete suggests |
Plan-Execute Workflow |
Write a plan in a markdown file with goals, trade-offs, anticipated problems, and milestones |
Pacing |
Never develop faster than you can comprehend and test; use milestone checkpoints |
Context Engineering |
Load relevant files, docs, and command output before asking the agent to act |
Context Window |
The model’s working memory; fills up, gets compacted — save state externally |
Token Budgets |
Usage is limited by subscription tier; scope your sessions accordingly |
Effective Prompting |
Be specific, provide context, iterate |
Critical Evaluation |
Read, understand, test, question |
Human-AI Collaboration |
You design and review, AI implements |
Foundational Concepts to Commit to Memory#
Agentic vs. autocomplete: Agentic tools (Claude Code) can take multi-step actions autonomously; autocomplete tools (Copilot) suggest code inline as you type. Know which mode you are working in.
Plan first, execute second: Write a plan in a markdown file before asking the agent to build anything. Include a goal, design decisions with trade-offs, anticipated problems, and milestone checkpoints.
Never develop faster than you can comprehend and test: AI generates code faster than you can read it. Work in small increments, review every line, and test before building more. If you cannot explain it, stop and catch up.
Context engineering: The agent can only work with what it can see. Load relevant files, documentation, and command output into context before asking it to act. Quality in, quality out.
Context window: The total text the model can “see” at once. When it fills up, the agent compacts (summarizes) earlier conversation. Save important state to files, not just conversation.
Token budgets are real: Every subscription tier has limits. Use
/costto track usage, break work into sessions, and front-load your thinking before spending tokens on execution.Prompt specificity drives output quality: Vague prompts produce generic code. Specific prompts with types, edge cases, and format requirements produce usable code.
AI hallucinations are real: LLMs will confidently generate nonexistent function names, wrong API signatures, and incorrect algorithms. Always verify unfamiliar suggestions.
Read before you accept: Every line of AI-generated code becomes your responsibility the moment you commit it. If you cannot explain it, do not ship it.
Iterate, don’t one-shot: The best results come from a conversation — generate, review, refine, test. Treat the first output as a draft.
AI excels at common patterns: Well-documented tasks (sorting, CRUD, boilerplate) get high-quality output. Domain-specific or novel problems require expert review.
You own the design; AI owns the keystrokes: Requirements, architecture decisions, and correctness judgments are your job. Code generation and boilerplate are the AI’s job.
Knowing vs. Doing: Reflection#
This is a course about building things with software – not just studying software in the abstract. That distinction matters. AI coding agents make it possible to build working software faster than ever before, even in languages or frameworks you have never used. You can go from idea to prototype in an afternoon. That is genuinely powerful, and you should take full advantage of it.
But here is the tension: the less you know, the harder it is to tell whether what the AI produced is correct, secure, or even sensible. You saw this firsthand when comparing vague and specific prompts. The student who understands what type hints are, what edge cases matter, and what a good function signature looks like will write a better prompt, get better output, and catch problems faster. Knowledge is leverage. The more you have, the more productive you become – with or without AI.
The trap to avoid is thinking you need to master everything before you start building. You do not. That path leads to all learning and no doing, which means you never produce anything of value for anyone else. The right move is to learn enough to ask good questions, build something real, and then learn more as gaps reveal themselves. AI agents expand what is possible for you right now, beyond what you already know. Your job is to stay honest about what you understand and what you are trusting the AI to get right – and to keep closing that gap over time. There is always more to learn, and there is always more to build.
Additional Resources#
Claude Documentation – Overview of Claude models, capabilities, and usage
GitHub Copilot Documentation – Official guide to setting up and using GitHub Copilot
Cursor – AI-first code editor with built-in chat and autocomplete
OpenAI Codex – OpenAI’s terminal-based coding agent
Gemini CLI – Google’s open-source terminal AI agent
Next Steps#
In the next module, we’ll apply AI assistance to terminal and shell operations.