University of Washington · eScience Institute

Generative-AI
for Software
Development

AI-in-Practice Summer Institute

Anthony Arendt & Don (Landung) Setiawan July 29, 2026

Many of us are using Generative AI for code development.

However, there are concerns about using gen-AI for scientific code. How do we ensure our results are robust and reproducible?

Today we will take a messy existing Jupyter notebook and apply some generative AI methods to demonstrate a few best practices.

Working with an agent in a codebase

Differences Between Chat and Agent

Chat

Answers
questions.

Agent

Reads your files,
runs your code,
edits your project.

What is a harness?

A harness is the surrounding system — the file access, tool permissions, and execution environment wrapped around the model. Saying "I'm using Claude" is under-specified: browser Claude, Claude Code, and Claude in VS Code all share the same underlying model but have completely different harnesses. The harness is what has changed most in the last two years, and it determines what AI can actually do on your behalf.

Every AI coding assistant has all of these six components.

LLM backbone

The language model itself — the reasoning engine that turns prompts into text, code, and plans. Every AI tool you use is built on top of one.

Tool use

The ability to read files, edit them, and run shell commands on your machine. Without tool use the model can only talk; with it the model can act.

Agent loop

The software that decides whether to call another tool or return a result to you. It turns a single prompt into a sequence of goal-directed actions.

Project memory

A file the agent reads on startup so it knows your codebase, conventions, and working style. You write it once; every session starts with that context already loaded.

MCP servers

A standard protocol for connecting external systems — databases, calendars, APIs — directly to an agent. Any service that speaks MCP becomes immediately available to any tool that supports the standard.

Skills

Reusable procedures the agent can invoke for a specific kind of task. Instead of re-explaining how to deploy or review code each time, you capture that workflow once.

Every AI coding assistant has all of these six components.

LLM backbone

The language model itself — the reasoning engine that turns prompts into text, code, and plans. Every AI tool you use is built on top of one.

Tool use

The ability to read files, edit them, and run shell commands on your machine. Without tool use the model can only talk; with it the model can act.

Agent loop

The software that decides whether to call another tool or return a result to you. It turns a single prompt into a sequence of goal-directed actions.

Project memory

A file the agent reads on startup so it knows your codebase, conventions, and working style. You write it once; every session starts with that context already loaded.

MCP servers

A standard protocol for connecting external systems — databases, calendars, APIs — directly to an agent. Any service that speaks MCP becomes immediately available to any tool that supports the standard.

Skills

Reusable procedures the agent can invoke for a specific kind of task. Instead of re-explaining how to deploy or review code each time, you capture that workflow once.

What the model knows vs. what you tell it

Built-in knowledge vs. In the prompt.

Built-in knowledge

  • Python and common libraries — the model has seen millions of lines of code and understands standard patterns, idioms, and APIs.
  • General best practices — it knows how to structure a function, write a test, or refactor a loop without being told.
  • When to stop — it has a sense of when a task is complete or when it needs more information before acting.

You don't control this — it is fixed at training time and has a knowledge cutoff date.

In the prompt

  • Your data's quirks — the model has never seen your CSV headers, your variable naming conventions, or your domain vocabulary.
  • Your lab's conventions — style guides, preferred libraries, and project structure exist nowhere in its training data.
  • Your specific goal — what "done" looks like for this task is something only you can define.

You control this!

We will be refactoring a messy notebook that processes weather station data.

Step 1 · Live demo

Asking for a Plan to Improve my Code

SET MODE Ask / Plan — not Agent SEND PROMPT Propose a refactor plan — no code yet REVIEW PLAN Check for scope creep and unwanted additions Satisfied with plan? Yes APPROVE PLAN Proceed to Step 2 No — push back and edit the plan

Live demo

AGENTS.md —
ten lines that change
how the agent behaves.

What What this project is
Stack Preferred libraries
Key Timestamps are UTC unless stated
Key Don't add type hints unless asked
Why Version-controlled — team asset, not personal preference
Why Cross-vendor — the file travels with the code

What just happened

The agent read your files,
followed your plan,
and edited your code.

01

We switched to agent mode, prompted it to extract the cleaning logic into a module, and it did exactly that.

02

The chat tells you what the agent claims it changed. The diff is where you confirm it.

03

The code looks right. But we should verify it to be sure.

What just happened

The agent preserved
the bug faithfully.

Act 3 — Verification

Why do we need
to verify our code?

Verification

There are multiple approaches.
Today we used two.

There are more advanced patterns — evals, test-first workflows, structured uncertainty flagging. The handout has starting points if you want to go deeper.

Reproducibility

The conversation is scaffolding but
The artifact is the science.

Your next step

Write an AGENTS.md
for one of your own
projects.

Four Durable Places to Shape Agent Behavior

01

Context
documents

Always loaded on startup. Facts and conventions the agent has in hand for this project.

AGENTS.md

02

Skills

Task-triggered procedures. The agent picks them up when the work matches.

skills/

03

Rules

Path-scoped constraints that are hard limits, not helpful suggestions.

.claude/

04

Custom
agents

Distinct personas with their own tool access. For focused, narrower jobs.

agents/

Taxonomy is portable across different provider's tools. The file names differ, but the concepts don't.

1 / 0