HW8: The Agentic Build

CMU 15-113: Effective Coding with AI

Due Date: Sun. 3/29 at 8:00 PM
Time Estimate: ~3 hours outside class
Deliverables: GitHub repo (link submitted through Google form), working app, spec, review, reflection, portfolio entry

Assignment Overview

Goal: So far in 15-113, you've mostly used AI as a conversational partner: you ask it to help you build something, it gives you code, you copy/paste/modify, and repeat. In this assignment, you'll try a more structured, agentic approach: instead of chatting back and forth, you'll write a detailed plan first, hand it off to Copilot's Agent Mode (or Cursor, or any other tool with agentic capabilities) to implement with minimal hand-holding, and then use Copilot again with a new agent as a code reviewer that checks the first agent's work. This mirrors how software engineers increasingly work with AI in industry, with less "pair programming" and more "delegating and reviewing."


Why This Matters: After experiencing the difference between conversational AI coding and a multi-agent plan-delegate-review workflow, you should begin to develop your own opinion about when each approach works best.

What You'll Build

A command-line Python quiz app with a local login system that reads questions from a JSON file, quizzes users, tracks scores and performance statistics securely (in a non-human-readable format), allows users to provide feedback on questions to influence future quiz selections, and saves results. You'll extend it with one additional feature of your choice.


While this might not be the most "original" app, it's complex enough to be interesting (file I/O, data structures, user interaction, error handling) and scoped enough that an AI agent can realistically build most of it from a good spec. Perhaps most importantly, it also produces clearly testable output, which makes the review phase meaningful.

Detailed Instructions

Phase 1: Write the Spec ~45 min

Before you touch Copilot, write a detailed specification for the quiz app in a file called SPEC.md. This is the most important phase. A good spec leads to a good agentic result; a vague spec leads to a mess.

Your spec must include:

Important: Write this spec yourself, without AI assistance. The whole point of this assignment is to see how the quality of your planning affects the quality of the AI's output. Using AI to write the spec defeats the purpose. (You can use AI to help you understand what a good spec looks like, but the actual content should be yours.)

Phase 2: The Agentic Build ~60 min

Now hand your spec to Copilot and let it build. Here's how:

Setup

  1. Create a new project folder and initialize a git repo (git init). Commit your SPEC.md as the first commit.
  2. Open the folder in VS Code with the GitHub Copilot extension active.
  3. Open the Copilot Chat panel (Ctrl+Shift+I or Cmd+Shift+I) and switch to Agent mode (click the mode selector at the top of the chat panel. It should say "Agent" rather than "Ask" or "Edit").

The Prompt

Give Copilot a prompt like this (adapt to your own spec):

Read SPEC.md in this project. Implement the full quiz application
exactly as specified. Create all necessary files. Include the sample
questions from the spec in the question bank JSON file. Make sure
error handling matches what the spec describes. After creating the
files, run the app to verify it starts without errors.

Rules for Phase 2

Phase 3: The AI Review ~45 min

Now switch roles. Instead of using Copilot as a builder, use it as a reviewer — an independent check on the code it just wrote.

Review Prompt

Open a new Copilot Chat session (click "+" to start fresh — this is important so the reviewer doesn't have the builder's context). Then make sure you are in agent mode and give it a prompt similar to this (but probaby not exactly; e.g. you might want to check for usability / UX issues too):

Review the Python code in this project against the spec in SPEC.md.
For each item in the acceptance criteria, check whether the code
actually implements it correctly. Also check for:
- Bugs or logic errors
- Missing error handling
- Code quality issues (unclear naming, repeated code, etc.)
- Security concerns (e.g., unsafe file handling)

Format your review as a numbered list of findings, each marked as
[PASS], [FAIL], or [WARN]. Be specific — reference file names and
line numbers.

Important: Save this review as REVIEW.md and add it to your repository!

Act on the Review

Note: It is very important that you make multiple, frequent commits, at the very least at the points specified above. This is largely how we will know that you followed the correct process for this assignment.

Deliverables

Item Where Notes
GitHub repo submitted through Google form Submitted through Google form Must show at least 3 commits (spec, raw build, post-review fixes with REVIEW.md)
Working quiz app In repo Should run with python quiz.py (or similar)
SPEC.md In repo Your spec, written without AI
REVIEW.md In repo Copy of the AI review output from Phase 3
REFLECTION.md In repo Your reflection (see below). Write this yourself — do not use AI.
Portfolio Your website Add a short entry for this project (screenshot, description, link)

Reflection

In REFLECTION.md, answer the following. Be honest and specific; there are no wrong answers here, but you must write this yourself, without AI. (Approx. 250-500 words total.)

  1. How far did the agent get? Did it fully implement your spec? What percentage of your acceptance criteria passed on the first try?
  2. Where did you intervene? List each time you had to step in during Phase 2. Why was the intervention needed? Could a better spec have prevented it?
  3. How useful was the AI review? Did it catch real bugs? Did it miss anything important? Did it flag things that weren't actually problems?
  4. Spec quality → output quality: In hindsight, what would you change about your spec to get a better result from the agent?
  5. When would you use this workflow? Based on this experience, when do you think plan-delegate-review is better than conversational back-and-forth? When is it worse?

Grading

Grade (Roughly) What We're Looking For
A (90-100) High spec quality (clear, complete, specific acceptance criteria), app works reasonably well and includes required features + an extension, no egregious security concerns, 3+ commits showing the assignment phases, interventions are logged, and the reflection is honest, specific, and thoughtful. All submission requirements met.
B (80-89) Good spec quality (clear, complete, specific acceptance criteria), app includes required features + an extension, and runs with few-or-no-bugs or security concerns, 2+ thoughtful commits documenting the assignment phases, interventions are logged, and the reflection is honest/thoughtful if a little vague. All or almost all submission requirements met.
(If some required features do not yet work, it may be possible to achieve this grade with an exceptionally thoughtful reflection on what went wrong.)
C (70-79) Assignment mostly complete but shallow or with less attention to detail. Spec quality is likely substandard or the instructions were either ignored or followed but not documened. May be missing a component, like the REVIEW.md file.
Below C Incomplete submission or insufficient thoughtfulness in key components/phases (for example, a poor spec or reflection, multiple misdocumented items, or clear use of AI to produce the SPEC.md or REFLECTION.md files).
Grading philosophy reminder: We're grading your process and learning, not the perfection of the final code. An honest reflection that says "the agent completely botched feature X and here's why" is more valuable than a perfect app with a vague reflection.

Tips

Optional Challenge: Multi-Reviewer

If you finish early and want to explore further, try running multiple review passes with different prompts — one focused on bugs, one on code style, one on security. Compare what each reviewer catches. This is a simplified version of how agentic code review systems work in industry (parallel specialized reviewers). Document your findings in your reflection if you try this.