TECHIN 510 — Spring 2026

Prompts Are the New Code

Week 1: Dev Environment, Agentic Coding & Your First App
University of Washington • Global Innovation Exchange
01 / 29
What You Will Learn

Learning Objectives

1
Set up a professional dev environment Git, Python 3.11+, and Cursor
2
Conduct a structured user interview Synthesize findings into a one-sentence problem statement
3
Use agentic coding (Cursor Composer) Build a working Streamlit web app from a natural language prompt
4
Read and modify AI-generated code Identify what a function does and make a deliberate hand edit
02 / 29
What You Will Learn

Learning Objectives (continued)

5
Articulate the difference between generating and understanding code The core skill gap this course addresses
6
Sketch an Input-Process-Output architecture diagram With a feedback loop arrow for your app
7
Smoke-test the app Document 3 features with action, expected result, actual result, and pass/fail

Smoke test: A quick, surface-level check that your app launches without crashing. Not a deep test; just "does it turn on?"

03 / 29
Verification Journey

Testing Ladder Starts Here

1
Smoke Test Week 1 — Does it launch? Does the button work? Document 3 features pass/fail.
2
Physical Verification Week 3 — Does the sensor reading match reality? Plausibility checks on live data.
3
Assert & Validate Week 4 — DataFrame asserts, KPI consistency checks, data pipeline contracts.
4
Security Checks Week 6 — Auth, RLS policies, cross-user isolation, environment variables.
5
Automated Tests Week 8 — Vitest, pytest, CI pipelines, agent evaluation sets.

Never skip testing and validation when you build a solution.

04 / 29
Development Environment

Cursor Setup

Plan Mode

In Composer, press Shift+Tab to show Plan Mode.

The agent produces a plan (steps, file references) before coding. You can edit the plan and run it, or skip and prompt directly.

Usage Flow

Open Composer Cmd+I, then:

  • Type a short prompt
  • Review the proposed edit
  • Accept or Reject
  • Verify in the file
05 / 29
Cursor Workflow

Three Modes of Cursor

C
Composer / Agent  Cmd+I Generate and change code across files. The primary mode for building.
L
Chat  Cmd+L Ask questions about code. The agent explains but does not edit files.
K
Inline Edit  Cmd+K Select a few lines, type a change instruction. Edits only your selection.

Rule of thumb: Use Composer for building features, Chat for understanding code, Inline Edit for surgical changes.

06 / 29
Under the Hood

Models & MCP

Model Selector

Cursor connects to different language models. You can switch based on your needs.

Open the dropdown at the top of Composer. For this course, the default is fine for most cases.

MCP (Model Context Protocol)

MCP lets the agent use tools — fetch URLs, browse the web, query databases.

Try: The agent fetches a webpage and summarizes it. You see the tool call in the panel.

Takeaway: The agent isn't just auto-completing. It can reach out to the world through tools.

07 / 29
Configuring the Agent

Rules, Skills, Subagents

R
Rules Persistent instructions the agent reads every time. Scope: project (.cursor/rules/), user, or team.
S
Skills On-demand, portable procedures. The agent decides when to use them, or you invoke with /skill-name.
A
Subagents Separate agents for subtasks, running in parallel. The main agent delegates. More in Week 7.

Think of Rules as a standing brief, Skills as a reference manual, and Subagents as specialist assistants.

Plane 1: Everything here is Plane 1 — agents helping you code. The same mechanisms power Plane 2 (Week 7+): agents inside your product. We lean on subagents only once we can test and constrain them.

08 / 29
Code Example

.cursor/rules

# Week 1 .cursor/rules

## Stack
- Python 3.11+
- Streamlit for all UI components
- Keep all code in app.py (single file only)

## Code Style
- Add a comment above every function explaining what it does
- Use type annotations on all function signatures
- Print clear error messages if any API calls fail

## Behavior
- If I ask for a new feature, add it without removing existing features
- Prefer simple, readable code over clever, compact code
- Ask before making large structural changes

This file is your first system prompt — the same idea powers in-app agents (Week 7). Better context = better output. This is context engineering.

09 / 29
The Contractor Analogy

"It knows them in general. The .cursor/rules file tells it about YOUR project specifically. It's the difference between a contractor who knows how to build houses in general, and a contractor who has read your specific brief."

The file doesn't add knowledge — it adds context and constraints.

10 / 29

Why Prompts Are
the New Code

From vague instructions to precise specifications
11 / 29
Prompt Engineering

Bad Prompt vs. Good Prompt

Vague
Build a web app

  • No framework, no data source, no features, no design. The AI guesses everything.
  • Most agents nowadays are equipped with skills to force you to be more specific.
  • Specific
    Build a Streamlit web app that
    shows current weather for Seattle
    using the Open-Meteo API (no API
    key required). Display temperature
    in Fahrenheit, humidity percentage,
    and wind speed in mph. Add a
    Refresh button. Make it
    mobile-friendly.

    Specificity is a design decision. Every detail you include prevents a bad guess.

    12 / 29
    The Professional Ratio

    40 / 20 / 40

    Planning, Coding, Testing
    40% Planning
    20% Coding
    40% Testing

    "Professional developers spend 40% of their time planning what to build. Writing the spec. Talking to users. Drawing the architecture. 20% is the actual generation. 40% is testing and verification."

    13 / 29
    The Anti-Pattern

    The Vibe Coding Hangover

    0%
    80% Prompting & Iterating
    20%

    "The feeling of inheriting a codebase full of AI-generated code you don't understand and cannot fix. It looks like it works. Then something breaks at 2am before a deadline. And you have no idea where to look."

    Every lab is designed to force this ratio. Keep this ratio in mind when you are working on the lab.

    14 / 29

    Live Demo

    Build a Streamlit App
    Build a Streamlit web app that
    shows current weather for Seattle
    using the Open-Meteo API (no API
    key required). Display temperature
    in Fahrenheit, humidity percentage,
    and wind speed in mph. Add a
    Refresh button. Make it
    mobile-friendly.

    "Watch what I do, not what the AI does. The AI is just the keyboard. I'm the architect."

    15 / 29
    Your Role

    The Architect's Three Jobs

    1
    Describe with precision Framework, data source, specific metrics, design decisions, code conventions
    2
    Review before accepting Check imports, function signatures, UI structure. Does the structure match your intent?
    3
    Verify it works Run the app, test each feature, document pass/fail for every interaction
    16 / 29
    Architecture

    Input — Process — Output

    INPUT PROCESS OUTPUT User clicks Refresh button Python calls Open-Meteo API Parses JSON Formats data Streamlit renders temperature, humidity, wind speed FEEDBACK LOOP

    I-P-O: Your First Architecture View

    Separation of Concerns: Input (UI) vs. Process (logic + API) vs. Output (rendering). This three-part split reappears as 3-tier architecture in Week 5.

    17 / 29
    Reading AI Code

    Code Review Walkthrough

    1
    Imports import streamlit as st (UI framework) + import requests (network calls)
    2
    Function signatures function def — takes parameters, returns some data
    3
    UI structure st.metric calls for number cards, st.button('Refresh') for interaction
    4
    Overall pattern Fetch data → render data. Matches the I-P-O diagram.

    Check structure and intent now. Save edge cases and math verification for the testing checklist.

    18 / 29
    Before You Click Run

    Predict Before Running

    Before running the code, I want your prediction.

    Why predict? Prediction forces you to form a mental model of the code before seeing the output. This is how understanding develops.

    This is PRIMM in action — Predict, Run, Investigate, Modify, Make. We'll formalize this framework in Week 3.
    19 / 29
    Iterative Development

    Adding a Feature

    The app works. Now we add wind direction — an incremental prompt:

    Add a wind direction indicator (N, NE, E, SE, S, SW, W, NW)
    based on the wind_direction_10m field from the Open-Meteo API.
    Show it next to the wind speed metric with a compass emoji.
    What Changed
    • New API field: wind_direction_10m
    • Degree-to-compass conversion function
    • Updated st.metric display
    What Didn't Change
    • Existing features remain intact
    • Same I-P-O structure
    • The .cursor/rules enforced this
    20 / 29

    Think-Pair-Share

    Explain AI Code

    Turn to the person next to you. Explain the code in plain English. No jargon.

    21 / 29
    Activity

    The Exercise

    8 lines of code from our demo app. Explain what each section does to your neighbor — as if they have never written code. Your code might be different than what you see on screen.

    # Fetch weather data from API
    def get_weather(city: str) -> dict:
        url = f"https://api.open-meteo.com/v1/forecast?latitude=47.6&longitude=-122.3"
        response = requests.get(url)
        return response.json()
    
    # Display results
    data = get_weather("Seattle")
    st.metric("Temperature", f"{data['current']['temperature_2m']}F")

    The word "function" is allowed. Everything else — translate it.

    22 / 29

    The Interview

    Why Talking to Users Matters

    The app we just built is technically functional.

    But does anyone actually need a Seattle weather app?

    23 / 29
    User Research

    From Technical to Useful

    The same technical components can solve completely different problems when pointed at the right need:

    ?
    The GIX facilities coordinator Needs to know if it's safe to set up the outdoor event space before 6am
    ?
    The biking commuter Needs the 6am wind forecast specifically for their route
    ?
    The field researcher Needs micro-weather for a specific zip code during data collection

    The first thing you do in lab today is not open a computer. It's a conversation with a GIX staff member.

    24 / 29
    Your Deliverable

    Problem Statement Template

    "When [person] needs to [task], they currently [workaround], which causes [pain]."

    This sentence emerges from the interview. Walk in curious — not with an app idea already in your head.

    25 / 29
    Up Next in Lab

    Preview: Dorothy's Challenge

    In today's lab, you'll meet Dorothy, who needs a system for purchase requests. There's a catch:

    Does data need to be persistent? If your answer is yes, how can we record and retrieve information robustly? How do you structure the data?

    Keep this constraint in mind as you conduct your interview and draft your problem statement.

    26 / 29
    Architecture

    The Agent Loop

    YOU AGENT AGENT AGENT YOU Clear prompt Plans steps Uses tools: terminal, file read/write, internet Proposes code Review + accept / reject ITERATE UNTIL DONE

    You are always at both ends of this loop. The agent is the middle. You start it, and you judge the result.

    27 / 29
    Next Steps

    Project Matchmaking

    1
    Share Your Ideas Post your project ideas on the course GitHub marketplace as issues.
    2
    Hire Developers Start discussing project ideas and form your teams by hiring developers.
    3
    Move Forward Once paired up, proceed to fee negotiation, spec drafting, and initial architecture.
    28 / 29
    Preparation

    Before Next Class

    Next week, we will start writing code using terminal-based agents.

    Action Item: Please get either Claude Code or Open Code ready before next week's class.

    29 / 29