Python Programming with Agentic AI Master Class: Six-Week Online Course

A six-week online master class for experienced Python developers who want an AI coding agent to multiply their output on a large codebase without multiplying its mistakes. Over 18 hours, students read how Smarter, a large Django codebase, shipped more feature releases in three weeks with Claude Code than in its first three and a half years, and stayed converged: the series model of convergence and divergence, measuring a codebase, hand-built subsystems, one way to do each thing, types and contracts, tests, linters, a runnable environment, what the agent actually reads, CLAUDE.md and Agent Skills, docstrings and commit bodies, the antipattern of a second way, detecting and fixing it, irreversible steps, honest review, and keeping the agent’s sources from decaying. Each topic is a one-hour module: a 30-minute recorded lecture, and a lab done in the week’s live session in the student’s own project. Week 1 covers convergence, week 2 the foundation, week 3 feedback, week 4 guidance, week 5 the antipattern, and week 6 the human in the loop. The online format suits this course well: between live sessions, the agent does real work in the student’s project, and the next week measures it. See Course Formats and Grading for the grading scale and the course policies, and Python Programming with Agentic AI Master Class for an overview of the subject.

At a Glance

Students

Experienced Python developers, technical leads and architects who are responsible for a large codebase, and who use, or are about to use, an AI coding agent on it.

Format

Each week, three 30-minute recorded lectures (1 hour 30) and one 90-minute live session for the week’s three labs: 3 hours of instruction a week, 18 in all.

Deployment

On each student’s computer, working before the first live session: Claude Code, the student’s project with its tests running, and Smarter from source under Docker Compose, for reading, counting and comparing.

Models

Claude Code, with the model of the student’s plan. Other coding agents can do most labs, but the Module 10 lab reads Claude Code’s transcripts. Smarter’s own test suite sends live prompts to an LLM provider.

Workload

3 hours of instruction and 3 to 5 hours of assignments each week, and 15 to 20 hours for the capstone, in week 6 and the two weeks after.

Cost

Free software, plus a Claude plan that includes Claude Code, or API credit, for about two months: from about $40 to about $400 per student, depending on the plan and how hard the capstone pushes the agent; check current prices when announcing the course. Running Smarter’s tests needs an OpenAI API key with a few dollars of credit, which can be capped with a project budget in the OpenAI dashboard.

Learning Objectives

By the end of the course, students can:

  1. Explain why an AI coding agent makes a codebase converge or diverge, in terms of telescoping and geometric series, and identify what sets the ratio in a given codebase.

  2. Measure a large Python codebase’s convergence from its Git history, tests, coverage, linters and the agent’s own transcripts, with Python scripts, and report what the figures do not show.

  3. Separate a codebase’s subsystems from its applications, and design by hand the foundation that cancels an agent’s errors: ownership, response contracts, errors, secrets, settings and types.

  4. Build the feedback loop that an agent runs alone: tests that define correct, pre-commit hooks, and an environment started and tested with one command.

  5. Write the guidance that an agent actually reads, CLAUDE.md, Agent Skills, docstrings and commit bodies, and keep it from decaying.

  6. Find a second way to do something, eliminate every copy in one change, write its rule where the agent reads first, and guard it with a test.

  7. Keep a human on irreversible steps, review agent-written code, and measure an agent’s productivity honestly.

Technical Prerequisites

  • Required: professional Python experience: packages and imports, classes and decorators, type hints, virtual environments, and a test framework such as unittest or pytest.

  • Required: the student’s project: a Python codebase of at least about 20,000 lines, in Git with at least a year of history, whose tests run on the student’s computer, and on which the student is allowed to use a coding agent. Check the employer’s or the project’s policy before the course. A student without one uses a fork of Smarter, or a large open-source Python project approved by the instructor.

  • Required: Git and GitHub: branches, git log, git blame, tags and pull requests; working in a terminal with common Linux commands.

  • Required by the first live session: Claude Code installed and signed in, and a first session run against the student’s project.

  • Required by the end of week 1: Docker Desktop or Docker Engine with Compose, at least 16 GB of memory, and Smarter running from source as described in Developer Setup Guide, with one of its Django apps’ tests run in the container.

  • Helpful: Django, Docker and Pydantic, which Smarter’s code uses throughout, and the sum of a geometric series, from any calculus text. Students new to coding agents can take Agentic Software Development with Claude Code first.

  • Not needed: machine learning, or experience with LLM APIs.

Schedule

Students watch the week’s three lectures before its live session. Each module is described under The Modules.

Week

Lectures

Assignment

1

Modules 1 to 3: eighteen days in October; telescoping and geometric series; measuring a codebase.

Assignment 1: A Convergence Baseline.

2

Modules 4 to 6: subsystems by hand; one way to do each thing; types and contracts.

Assignment 2: The Foundation, Mapped and Contracted.

3

Modules 7 to 9: tests define correct; linters cancel mechanically; a runnable environment.

Assignment 3: A Feedback Loop the Agent Runs Alone.

4

Modules 10 to 12: what the agent reads; CLAUDE.md and Skills; docstrings, ADRs and commit bodies.

Assignment 4: Guidance the Agent Reads.

5

Modules 13 to 15: a second way to do things; detecting divergence; the four-step fix.

Assignment 5: Eliminate a Second Way. Capstone choice.

6

Modules 16 to 18: irreversible steps; prompts, review and honest numbers; keeping the sources convergent.

Capstone, due two weeks after the last live session.

Live Sessions

This course’s live sessions differ from the standard session in Course Formats and Grading, because they hold the labs:

  • 15 minutes: questions on the week’s lectures, and what the convergence kit showed in the students’ projects since the last session.

  • 75 minutes: the week’s three labs, 25 minutes each. The instructor demonstrates the start of each lab in a clone of Smarter, then students work in pairs in breakout rooms, each pair taking turns on one student’s project.

Students finish any lab that runs over on their own, before starting the week’s assignment. Assignments are due before the next live session.

The Modules

Each module is a 30-minute lecture followed by a lab of about 30 minutes. The lecture reads one part of Smarter, a large Django codebase whose output rose more than tenfold once a coding agent was set loose on it, and which has, so far, converged. The lab applies the same idea to the student’s project, the large Python codebase that each student brings to the course and works on throughout it, with Claude Code as the agent. Most labs end with a Python script, a test or a written rule committed to the student’s project; together they become the student’s convergence kit. The file references are listed in full under The Modules in the Source Code.

#

Lecture

Lab

1

Eighteen days in October. Smarter’s first three and a half years were the work of one developer: fifteen minor versions, v0.0 to v0.14. Between September 30 and October 17, 2026, with Claude Code designing and writing most of the code, it shipped nineteen more, v0.15 to v0.33, plus about fifty patch releases: more feature releases in three weeks than in its whole history before. About 290,000 lines were added in those weeks, some 250,000 of them by the agent, while coverage rose to about 97%. Who built what: the subsystems that a human designed over years, against the applications, the resource families, where the agent wrote most of the code. Why the multiplier is neutral: an agent multiplies whatever it finds.

Install Claude Code against the student’s project and against a clone of Smarter. In Smarter, count commits, releases and lines by author and by week with git log and a short Python script, and reproduce the lecture’s figures. Discuss which measure is honest: lines, releases, or features in production.

2

Telescoping and geometric series. A codebase changed by an agent is a sum of changes, each with an error term. In a telescoping series each error is cancelled by what comes after it, tests, linters and review, and the sum stays bounded. In a geometric series each error becomes the example for the next, \(e_{n+1} = r e_n\), and the sum \(e_1 / (1 - r)\) is finite only while \(r < 1\). The ratio is not chosen when the agent starts: it is set by the foundation, the feedback and the guidance already in the codebase, and by one question, when the agent goes looking, which way does it find first?

Pick three recent agent-written or human-written changes in the student’s project, and for each, name the example it copied, the feedback that checked it, and an error that nothing would have caught. Estimate the project’s ratio, and write down why.

3

Measuring a codebase. What a clone can tell you, and how to count it reproducibly: commits, lines and releases by author over time; tests and coverage per package; the share of commits with a real body; the number of files that call a low-level primitive directly. Counting at release tags rather than today, so that a trend shows. Round, durable figures, and how to say what a figure does not show.

Write convergence.py, the first tool of the convergence kit: a Python script that uses subprocess and git to print a baseline of the student’s project as a table, with coverage from coverage json. Commit it with its output as the project’s baseline.

4

Subsystems by hand. The parts of a codebase that every feature inherits, and that a human should design: tenancy and ownership, a single shape for every response, errors, secrets referenced by name, and typed settings. Smarter’s MetaDataWithOwnershipModel, its journal, its Secrets and its settings layer, and how little of them the agent changed while writing whole applications on top. “The agent writes the difference. The foundation cancels the rest.”

Draw the student’s project as subsystems and applications. For each subsystem, name its canonical module and the question it answers (who owns this? what does an error look like?), and mark the ones that are missing, where every feature answers the question for itself.

5

One way to do each thing. Patterns as templates: the manifest loader and the abstract broker that every Smarter resource kind extends, and why a new kind is mostly the difference from the last one. The pattern-first rule (find two or three implementations, prefer the newest, copy them) and why it works only when the nearest example is also the best one. Python’s tools for one way: base classes, mixins, decorators and protocols.

List the student’s project’s canonical helpers, each beside the low-level primitive it wraps (the HTTP client, os.environ, raw SQL, the cache, json.dumps in a view). This list is the input to Modules 13 to 15.

6

Types and contracts. Annotations as a rule rather than a style, typed aliases instead of Any, Pydantic models instead of dictionaries, and a published contract tested from outside the codebase. The bugs that Smarter’s Python SDK found by calling the API as a stranger would, from a 500 on a list route to an apply response that leaked a masked API key and the caller’s IP address.

Add annotations and a Pydantic model to one subsystem boundary of the student’s project, and write one test that calls it from the outside, the way a client would. Ask the agent to change the code behind it, and see whether the contract holds it.

7

Tests define correct. Tests as the agent’s definition of correct and as executable examples; base classes that build fixtures once and clean up after themselves; and the coverage campaign that raised Smarter from about 75% to about 97% and found well over a hundred bugs, from an endpoint that never checked ownership to a middleware that computed a 403 and threw it away. Marking a found bug as an expected failure, so that it is recorded before it is fixed. Tests that call real, billable services, and when that is right.

Ask the agent to raise the coverage of one package of the student’s project, with instructions to record each bug it finds as an expected failure rather than fixing it. Review what it found, and check each one yourself.

8

Linters cancel mechanically. A pre-commit configuration as the one lint standard that the agent and the human both run: formatters, flake8, isort, autoflake, pyupgrade, bandit, codespell and commit message rules. Why agents copy what they see and invent what is missing, and how a hook cancels both before they become examples.

Add a pre-commit configuration to the student’s project, or tighten the existing one, and run it on the whole tree. Have the agent fix the findings in one package, and review which fixes were mechanical and which changed behavior.

9

A runnable environment. “An agent that can run your code converges. An agent that can’t is guessing.” Smarter’s make init and Docker Compose stack, the rule that the agent runs the tests itself, and the traps that had to be written down: a container with no bind mount, a shell that does not split words, a dev server that never returns.

Give the student’s project one command that runs its whole test suite from a clean clone, and one that starts it. Hand the agent a failing test with no other help, and time how long it takes to run, read and fix it.

10

What the agent reads. Claude Code’s transcripts are JSON lines on disk, one file per session. Classified by a short script, three weeks of Smarter’s sessions show what the agent reads and runs: existing code, tests, pre-commit and the runtime in nearly every session, Skills in four of five, git log in three of four, and ADRs in one in ten. Guidance sets the direction of a change, and feedback cancels its errors.

Write reads.py for the convergence kit: a Python script that reads the student’s own Claude Code transcripts, classifies each tool call by pattern, and prints each source’s reach across sessions. Compare the table with Smarter’s, and say what surprised you.

11

CLAUDE.md and Skills. A short, always-loaded file that holds only what applies to every task and points to everything else; Agent Skills as folders of know-how loaded on demand; and the evidence: one line in CLAUDE.md took the first skill’s load rate from 15% to 77% of sessions. Skills written by the agent after the work, with the traps it hit, and rules that carry their reasons, because a rule without reasons gets reasoned around.

Write a CLAUDE.md of no more than about 150 lines for the student’s project, and its first skill, a SKILL.md that says which narrower skill or document covers each kind of work. Run the same task with and without them, and compare.

12

Docstrings, ADRs and commit bodies. Docstrings are the contract of the code the agent did not write, and the only guidance that can disagree with the code beside it. ADRs as the project’s constitution, read rarely because their rules have moved into skills. Commit bodies that explain what was wrong, what changed and how it was tested, written for the next agent, which runs git log in most sessions.

Count the share of the student’s project’s commits with a body of five lines or more over time, and add it to convergence.py. Rewrite the docstrings of one canonical helper so that they state its contract, and write the commit for it.

13

A second way to do things. The antipattern that starts a geometric series: a second way that lives beside the canonical one, never wrong enough to fail a test. Smarter’s @cache_results decorator, and the hand-rolled cache.get() and cache.set() calls that grew beside it, release by release, because the agent copies the nearest example, not the best one; what each copy carried, from opaque keys to an API key in the key-building code; and the search that showed the same cat every time.

In a clone of Smarter, count the files that call cache.get( or cache.set( directly at v0.14, v0.15, v0.19 and today, and read each one that is left. Decide which are legitimate exceptions and which are copies, and say why.

14

Detecting divergence. The antipattern lives in the comparison between changes, so look across the codebase and across time: count both ways at every release tag, grep for each primitive outside its helper’s home, find the helpers that the newest code skips, look for shared fingerprints such as the same key function or constant names, and treat a recurring bug shape as a symptom of a pattern.

Write ways.py for the convergence kit: for each helper and primitive pair from Module 5, it counts both ways at every tag of the student’s project and prints the trend. Find the student’s project’s worst second way.

15

The four-step fix. Name the pattern, not the instance; fix every copy in one change, because a leftover copy is the next feature’s template; write the rule, its reasons and its exceptions where the agent reads first; and add a mechanical guard that fails on the second way. The commit that did all four in Smarter, the mistake it made on the way (a cache on a generic transport that overrode every caller’s settings), and the reverse() cache that showed one way must also be the right way.

Write the guard for the student’s worst second way: a unit test that walks the project’s modules with Python’s ast module and fails on any direct use of the primitive outside its allowed modules. Run it, and watch it fail.

16

Irreversible steps. Guardrails belong in the environment, not in the developer’s attention span. The one-line DNS change that ran on every Smarter deployment, filled the host data it lacked with a plausible guess, and took production offline; the fix; and what lasted: a service layer for every cloud call, an in-memory provider for tests, and a skill that hands write commands to the human.

Inventory the student’s project’s irreversible operations: deployments, migrations, DNS, payments, email, deletes. For each, decide how a test fakes it and how the agent is kept from running it, and add the rule to CLAUDE.md.

17

Prompts, review and honest numbers. A prompt as a single unit of work with a verifiable done; a definition of done that the agent checks itself against; reviewing an agent’s pull request as a colleague’s, including tests weakened rather than bugs fixed; and productivity measured honestly, with lines, releases and defects, and with the conditions that made the pace possible.

Write three prompts for real work in the student’s project, each with its outcome, evidence and done. Run one, and review the pull request against its definition of done.

18

Keeping the sources convergent. Sources are terms in the series too: a stale rule is copied with the agent’s full confidence. The commit that moved notes from one machine’s agent memory into the repository, and the decay modes it exposed. A periodic convergence review: rerun the kit, compare the agent’s sources with its code, and keep cancelling.

Run the whole convergence kit on the student’s project, compare it with the Module 3 baseline, and choose the capstone.

The Modules in the Source Code

Every lecture, lab and assignment in this course rests on the files and commits below. Every reference is to the main branch of a public repository in github.com/smarter-sh, so that students can open each one during class. Python paths in the smarter repository are under smarter/smarter/. The figures quoted in the lectures were counted on main in October 2026, excluding release commits, migrations and generated files; students recount them in the labs.

Converge or Diverge

Module

What to read

Where to look

  1. Eighteen days in October

The release history from v0.14 to v0.33: nineteen minor releases between September 30 and October 17, 2026, more than the fifteen in the project’s whole history before. The first feature that Claude Code designed and wrote, the manifest-declared Guardrail, and the three-part Converge or Diverge series on blog.smarter.sh that measures what happened.

CHANGELOG.md, commit 329527e8e, Part 1

  1. Telescoping and geometric series

The two ways a series of agent changes can add up, and the one question that sets the ratio: when the agent goes looking, which way does it find first?

Part 2, skills/smarter-development/SKILL.md

  1. Measuring a codebase

What can be counted from a clone: commits and lines by author, releases, tests, coverage, commit bodies, and the files that use a primitive directly. The project’s coverage target and how it is enforced.

Makefile, .github/workflows/test.yml, CLAUDE.md

The Foundation

Module

What to read

Where to look

  1. Subsystems by hand

The human-designed subsystems that every application inherits: tenancy and ownership, the response journal, encrypted Secrets referenced by name, and a typed settings layer. “The agent writes the difference. The foundation cancels the rest.”

apps/account/models/metadata_with_ownership.py, lib/journal/, apps/secret/models.py, common/conf/

  1. One way to do each thing

The manifest loader and the abstract broker that every resource kind extends, with kubectl-style verbs, so that a new kind is the difference from the last one. ADR 005, ADR 024.

lib/manifest/loader.py, lib/manifest/broker/abstract_broker_class.py, apps/guardrail/

  1. Types and contracts

Type annotations as a rule, typed aliases instead of Any, Pydantic models instead of raw JSON, and an OpenAPI document that tests every route from the outside. The API bugs that the Python SDK found when it called the platform as a stranger would. ADR 027, ADR 031.

lib/typing.py, apps/api/v1/contract/, commit 04f67ed01, smarter-python

Feedback

Module

What to read

Where to look

  1. Tests define correct

The test base classes, and the coverage campaign of early October 2026 that took the Python suite from about 75% to about 97% coverage and found bugs on the way, each commit’s body listing what was wrong: 23 in the framework code, 13 in accounts, 9 in the API and CLI, and 43 that tests had marked as expected failures.

lib/unittest/base_classes.py, commit da46f38a9, commit e92adae59, commit d118c6bd6, commit 9b7f0ea59

  1. Linters cancel mechanically

About two dozen pre-commit hooks, from black and flake8 to bandit, codespell and commitlint, as the one lint standard that the agent and the human both run.

.pre-commit-config.yaml, skills/smarter-code-quality/SKILL.md

  1. A runnable environment

One command that starts Django, Celery, MariaDB and Redis; the rules for running tests in the containers; and the traps written down so that an agent never tests old code in a container with no bind mount.

docker-compose.yml, Makefile, skills/smarter-docker-environment/SKILL.md

Guidance

Module

What to read

Where to look

  1. What the agent reads

Three weeks of Claude Code transcripts, classified by a short script: what 94 code-changing sessions read and ran, ranked by reach, from searching existing code (99%) to architecture decision records (10%) and the project’s own MCP server (none).

Part 3, skills/README.md

  1. CLAUDE.md and Skills

The always-loaded file, its hard rules and its pointer to the first skill, which raised that skill’s load rate from 15% to 77% of code-changing sessions; the day the accumulated notes became one skills/ folder; and the skills written from mistakes.

CLAUDE.md, commit 6a6a8774d, commit 1c59d0a86, skills/

  1. Docstrings, ADRs and commit bodies

Docstrings as the contract of code the agent did not write; ADRs as the constitution that the skills now carry; and commit bodies, which went from 4% to 44% of commits with five lines or more once the agent wrote them for the next agent. ADR 029.

lib/cache/decorators.py, skills/smarter-docstrings/SKILL.md, skills/smarter-git-commits/SKILL.md, ADR

The Antipattern

Module

What to read

Where to look

  1. A second way to do things

The canonical cache decorator, and the hand-rolled cache.get() and cache.set() calls that grew beside it from four files at v0.14 to nine at v0.19, with the same opaque keys in each copy, and the image search that showed the same cat every time.

lib/cache/decorators.py, lib/cache/lazy_cache.py, apps/llmtool/plugin/image_search.py, apps/mcpclient/

  1. Detecting divergence

Counting both ways at every release tag, grepping for a primitive outside its helper’s home, and finding the helpers that the newest code skips.

The release tags (git tag), apps/llmtool/plugin/, apps/guardrail/services/strategies/semantic_strategy.py

  1. The four-step fix

One commit that moved every copy onto the decorator in 59 files and wrote the rule, with its reasons and exceptions, into the first skill; the generic-transport cache that the fix itself got wrong; and the year-long reverse() cache that showed the canonical helper used where it did not belong.

commit eeb7a7a19, commit 5be6cf37c, lib/django/shortcuts.py, lib/django/tests/test_views.py

The Human in the Loop

Module

What to read

Where to look

  1. Irreversible steps

The DNS change that ran on every deployment, invented the host data it lacked, and took production offline for about 20 minutes; the fix; and the service layer, in-memory provider and safety skill that now keep every cloud call out of the tests.

commit eb6995baf, apps/api/management/commands/verify_dns_configuration.py, apps/infrastructure/providers/memory.py, skills/smarter-infrastructure-safety/SKILL.md

  1. Prompts, review and honest numbers

Prompts as single units of work with a verifiable done; the definition of done the agent checks itself against; a test-coverage commit to review as a colleague would; and why a 25-times multiplier is neutral.

CLAUDE.md, commit c97f2a475, skills/smarter-python-testing/SKILL.md

  1. Keeping the sources convergent

The commit that moved notes from one machine’s agent memory into the repository, and the decay it exposed: facts that lived on one machine, rules whose reasons had expired, and instructions the agent kept breaking.

commit 577454464, skills/smarter-git-commits/SKILL.md, skills/smarter-development/SKILL.md

Grading

Component

Weight

Graded assignments

50% (5 × 10%)

Participation (live sessions and labs)

10%

Capstone project

40%

The grading scale, the rubric levels and the course policies are those of Course Formats and Grading.

Graded Assignments

Each assignment builds on the week’s labs in the student’s project, and is submitted as a pull request against the student’s project or a fork of it. A student whose project’s code cannot leave their employer submits the convergence kit’s output and the written parts instead, with names changed.

Assignment 1: A Convergence Baseline

Students finish convergence.py and commit the student’s project’s baseline: commits, lines and releases by author over time, tests and coverage per package, and commit bodies. A paragraph reproduces one of Smarter’s figures from Module 1 with the same script, and another estimates the student’s project’s ratio with evidence from three recent changes.

Turn in: the pull request with the script and its output, and the two paragraphs.

Criterion

Pts

Exemplary

Developing

Measurement

8

Reproducible from a clean clone, counted at tags, with what each figure does not show.

Today’s counts only.

Smarter’s figure

4

Reproduced, with any difference from the lecture explained.

Copied from the lecture.

Ratio

6

Argued from three real changes, each with the example it copied and the feedback that checked it.

A guess.

Verification

2

Each figure spot-checked by hand.

Took the script’s word for it.

Assignment 2: The Foundation, Mapped and Contracted

Students write a two-page foundation map of the student’s project, with each subsystem’s canonical module, the missing subsystems, and each canonical helper beside the primitive it wraps. They then annotate one subsystem boundary, give it a Pydantic model, and test it from the outside, and show whether the contract held when the agent changed the code behind it.

Turn in: the foundation map, and the pull request with the contract test.

Criterion

Pts

Exemplary

Developing

Foundation map

8

Every subsystem and its canonical module, the missing ones named, helpers paired with primitives.

A list of folders.

Types and model

5

Annotated, no unexplained Any, the boundary a Pydantic model.

Dictionaries in and out.

Contract test

7

Calls the boundary as a client would, and caught, or would have caught, the agent’s change.

Tests the internals.

Assignment 3: A Feedback Loop the Agent Runs Alone

Students give the student’s project one command that runs its tests from a clean clone and one that starts it, and a pre-commit configuration run on the whole tree. They have the agent raise one package’s coverage by at least ten points, recording each bug it finds as an expected failure, and check every one themselves.

Turn in: the pull request, and a list of the bugs found, each marked confirmed or not.

Criterion

Pts

Exemplary

Developing

One command

5

The agent runs the tests and starts the project alone, on a clean clone.

Needs the student’s help.

Pre-commit

4

Hooks run on the whole tree, findings fixed or deliberately configured.

Hooks installed but never run.

Coverage

5

Ten points or more, tests that assert behavior.

Lines executed, nothing asserted.

Bugs found

6

Each recorded as an expected failure and checked by hand.

Took the agent’s word for it.

Assignment 4: Guidance the Agent Reads

Students write a CLAUDE.md of no more than about 150 lines for the student’s project, and a first skill that points to the narrower ones, with at least one skill written from a mistake the agent made. They finish reads.py, and report what the agent read in their own sessions before and after the guidance existed, and the share of commits with real bodies since week 1.

Turn in: the pull request, and the reads.py table with a paragraph on what changed.

Criterion

Pts

Exemplary

Developing

CLAUDE.md

5

Short, universal rules only, each with its reason, pointing to the first skill.

Everything in one long file.

Skills

6

A skill written from a real mistake, with the trap, the rule and its reason.

Generic advice the model already knows.

Evidence

6

Transcripts show the skill loaded; limits of the classification stated.

Assumed the agent read it.

Commit bodies

3

Bodies that say what was wrong, what changed and how it was tested.

Subject lines only.

Assignment 5: Eliminate a Second Way

Students finish ways.py, find the student’s project’s worst second way, and fix it in four steps: the pattern named, every copy fixed in one change by the agent and reviewed by the student, the rule written with its reasons and exceptions in a skill, and a guard test built with ast that fails on a new copy.

Turn in: the pull request, with ways.py’s output before and after, and a commit body that explains what was wrong, what changed and how it was tested.

Criterion

Pts

Exemplary

Developing

Detection

4

Both ways counted at every tag, with the growth shown and the copies’ shared fingerprints.

One grep today.

One change

6

Every copy fixed, legitimate exceptions kept and named, the tests passing.

Some copies left for later.

Rule

4

Written where the agent reads first, with reasons and exceptions.

A rule without reasons.

Guard

6

A test that fails on a planted copy and passes on the exceptions.

No guard, or one that was never seen to fail.

Capstone Projects

Students choose one in week 5, work on it in week 6, and submit it two weeks after the last live session.

Capstone A: A Convergence Campaign in Your Own Project

Learning objective. Make a large Python codebase converge under an AI coding agent, and show with measurements that it did.

Students run a campaign of at least two weeks in the student’s project, with Claude Code doing most of the work and the student designing, prompting and reviewing it. The campaign starts from the Module 3 baseline and must include: one subsystem designed or repaired by hand, with types and a contract test from the outside; a test suite and pre-commit hooks that the agent runs alone from one command; a CLAUDE.md and at least three skills, at least one written from a mistake the agent made during the campaign; the project’s worst second way eliminated in one change, with its rule and a mechanical guard; and a real feature or set of fixes delivered on top, so that the foundation is tested by work, not only described.

What students turn in:

  • The pull requests of the campaign, in the student’s project or a fork of it, with their commit bodies.

  • The convergence kit (convergence.py, reads.py, ways.py and the guard test), committed and runnable from a clean clone.

  • A convergence report of about four pages: the baseline and final figures, side by side; the ratio before and after, argued from evidence; what the agent read, from the student’s own transcripts; every mistake the agent made and where it is now written down; and what is still diverging.

  • A ten-minute presentation.

How it is graded (100 points):

Criterion

Pts

Exemplary

Developing

Measurement

25

Baseline and final figures from the kit, reproducible from a clean clone, with what each figure does not show.

Figures from the agent’s summary, never recounted.

Foundation and feedback

20

A subsystem that the new code inherits, typed and tested from outside; tests and hooks the agent runs alone.

A test command that needs the student’s help.

Second way eliminated

20

Every copy fixed in one change, the rule written with its reasons and exceptions, and a guard test that fails on a new copy.

Some copies fixed, or a rule with no guard.

Guidance

15

A short CLAUDE.md, skills that the transcripts show were loaded, each mistake turned into a rule.

Skills written but never loaded.

Delivered work

10

A real feature or fixes, reviewed and merged, on top of the foundation.

Only infrastructure for the agent.

Report and presentation

10

Honest about what still diverges; clear and on time.

Claims convergence without evidence.

Capstone B: A Convergence Audit of Smarter

Learning objective. Audit a large agent-developed Python codebase for divergence, find a second way to do something that its maintainers have not found, and propose the fix.

Students audit Smarter, or another large open-source Python project developed with coding agents that the instructor approves, with the convergence kit. The audit counts both ways for every canonical helper and primitive pair the student can find in smarter/smarter/lib/ and smarter/smarter/common/, at every minor release tag from v0.14 to today; finds at least one second way that is growing, or a helper that the newest code skips; and checks it against the rules in CLAUDE.md and skills/. The student then writes the four-step fix as a plan, and implements it in a fork with Claude Code, including the skill change and the guard test. A fix that is to be proposed to Smarter is agreed with the maintainers in a GitHub issue first, and follows Agentic Development.

What students turn in:

  • The audit: a table of every pair counted at every tag, with the script that produced it.

  • The fork’s pull request, with the fix, the rule, the guard test and a commit body in Smarter’s style, and the tests run in Smarter’s containers.

  • A report of about four pages: the method, the findings ranked by growth, the evidence that each one is a copy rather than an exception, and what the fix changes in the series.

  • A ten-minute presentation.

How it is graded (100 points):

Criterion

Pts

Exemplary

Developing

Method

20

Every pair counted at every tag by a script anyone can rerun.

Today’s counts only.

Findings

25

A growing second way, with its fingerprints traced through the history and the commits that copied it.

A one-off use reported as a pattern.

Verification

15

Each finding read in the source and checked against the written exceptions.

Took the agent’s word for it.

Fix

25

Every copy fixed in one change, the rule written with reasons and exceptions, a guard test, Smarter’s tests passing.

A fix of one instance.

Report and presentation

15

Clear about the evidence and its limits; on time.

Overruns, or overstates the findings.

Further Study