Adapted from a Yale SOM Faculty Seminar on November 19, 2025 by Kyle Jensen. Kyle is a magician and I deserve almost no credit for this post.
Kyle wants you to know that much of the material here was based on a post here by HumanLayer.
Think of AI coding as a set of levels. You don’t have to reach Level 5 to be productive, but it helps to know what’s possible.
A rough mental model for AI coding performance:
\[\text{Performance} \approx \frac{(\text{correctness}^2 \times \text{completeness})}{\text{size}}\]As context size grows (more files, longer prompts, giant logs), performance tends to worsen. The job is to structure work so the model can stay correct and complete without being drowned in text.
If you’re coding from the web UI (ChatGPT, Claude, etc.), a few small tricks go a long way.
Use backticks to delineate code You can help out your LLM by clearly marking code blocks and even saying what language it is – make the subtext text:
Please rewrite this function:
```python
def bad(x,y):
return x+y # TODO: handle type errors
```
All the usual prompt best practices still apply
Use web search tools to prime the model
Under the hood, a “chat” is a structured pipeline:
You usually see only:
…but in between, it may:
Good AI coding tools expose more of this flow and let you customize it.
The web UI is great for experiments and small snippets, but it’s a bad home for a real project:
git, grep, pytest, make, Docker, etc.; the web UI usually doesn’t.For serious work, move into an AI-enabled IDE or terminal tool.
A quick comparison of the current ecosystem:
“The most AI‑forward IDE.”
Great choice if:
Lightweight, collaborative IDE:
Good if collaboration is more important than deep agent features (for now).
VS Code and Copilot is a great way to start, since as a student or educator you can get a subscription for free. See Paul’s post here for further discussion.
Inline AI chat – Ask questions right in the file:
Agent mode – The model can:
Which raises the question: what is an agent?
An agent is an LLM running in a loop with tools.
The agent repeatedly:
Cursor is built around this agent loop.
Agent‑forward workflow
The agent is the primary interface: you ask it to:
Automatic context indexing
Cursor continuously indexes your repo so the agent can:
MCP support (Model Context Protocol)
Lets you plug in external tools:
The agent gains new abilities without retraining.
You don’t have to live in a GUI; the command line has great options:
A favorite for powerful agent features:
Strong at delegating multi‑step work.
gpt-code style models to general‑purpose models for coding workflows.Very large context window (up to around a million tokens), useful for:
Tight integration with GitHub:
Nice free options for educators.
Claude’s skills system is an example of hierarchical agents.
Sweet features:
Delegation to sub‑agents
Upskilling on demand
Background task management
Parallel task execution
Using the Model Context Protocol (MCP), you can bolt new “superpowers” onto agents like Claude (and others).
Some favorites:
Full browser automation:
Codex (Chat with ChatGPT from Claude)
Prompt engineering used to be mainly about phrasing (“act as an expert…”). Now it’s about managing the entire context window.
Think of a coding session as a stack of context:
As you get closer to the context window limit, the model will:
Remember our rule:
Performance ≈ (correctness² × completeness) ÷ size
Managing size is now a core skill.
If you just keep chatting in a long session, eventually the LLM will auto‑compact:
This is rarely ideal for serious coding, where exact requirements and edge cases matter.
Instead of letting the model compact for you, you can compact intentionally.
Pattern:
Do exploratory research
Write artifacts to disk
research.txt, plan.md, design.md, etc.Ask the model explicitly:
research.txt.”plan.md.”Restart with a smaller, cleaner context
New session:
research.txt and plan.md. Then implement step 1.”You’re now working with short, precise docs instead of a giant, messy chat log.
Combine intentional compaction with sub‑agents:
research.txt.research.txt and writes plan.md.plan.md and edits the repo.
This is where things start to feel like real engineering management:
So… what are humans for now? mental alignment.
Imagine a triangle:
Tip: Style
Middle: Other priorities
Base: Mental alignment
“YOLO mode” (let the agent do everything) is fun—and dangerous.
Key risk factors:
Access to private data
Ability to communicate externally
Exposure to untrusted content
The Economist memorably called these the “lethal trifecta” of AI risk for coders: tools that can read secrets, talk to the world, and execute code.
Treat powerful agents like bridge engineers treat load‑bearing structures:
If you’re in an institutional environment, pair advanced AI setups with a safety review.