AI-Assisted Coding · Module 1Lesson 8

Study explanation · Lesson 08 · 11 min

Hands-on B: architecture and the ADR

With reviewed stories as context, AI explores architecture options quickly, but it doesn’t decide. You compare two lightweight options against four criteria, reject the assumptions it slipped in, and write a one-paragraph ADR in your own words.

Listen to this lesson

Hear the lesson read aloud, with each sentence highlighted as you go.

Narrated by an AI voice.

AI explores; you decide

Once the requirements are reviewed, they become the context for architecture. AI is good at exploring options quickly, but it is not the decision maker. The ADR must be written in your own words, because it is the evidence that you made the call.

Key ideaAI proposes options. The decision, and the paragraph that records it, are yours.

Two options on the table

The notes discuss two lightweight options and the trade-off each one carries.

Two lightweight options, one trade-off each · Lecture notes p. 14

FastAPI + JSON file

  • Very simple
  • Good first learning project
  • Less realistic for larger backends

FastAPI + SQLite / SQLModel

  • More realistic storage and queries
  • Adds complexity earlier
  • Still a local database

Neither is “right”: your ADR says which fits, and why.

Architecture options discussed · Lecture notes p. 14
Architecture option discussedTrade-off
FastAPI + JSON file storageVery simple and good for a first learning project, but less realistic for larger backends.
FastAPI + SQLite / SQLModelMore realistic backend storage and query behavior, but adds complexity earlier.

Read with careSQLite is a local database, which is different from the “production database” the scope excludes. The notes present both options without choosing; the decision is meant to be yours.

Four evaluation criteria

Judge both options against the same four questions. B2 turns them into a comparison table.

Evaluation criteria · Lecture notes p. 15
Evaluation criterionQuestion to ask
SimplicityCan you understand and maintain this structure alone?
TestabilityDoes the structure make tests easy to write?
Local run / deployabilityCan you run it locally with one or two commands?
FamiliarityDo you already know the tools, or can you learn them quickly?

Assumptions to catch

AI architecture proposals tend to arrive with extras nobody asked for. The notes name the ones to look for.

  • Authentication.
  • Docker or cloud deployment.
  • Microservices.
  • Heavy ORMs.
  • Redis or Celery.
  • Frontend frameworks that were not requested.

The ADR requirement

Write one paragraph, in your own words. It must include each of these.

  • The chosen architecture.
  • Why it fits the four criteria.
  • At least two AI assumptions you rejected.
  • One risk you would revisit if the project grew.

B1–B3: explore, compare, check

The library’s Part B prompts keep the human in the decision at every step. B1 and B2 both end with “do not choose for me,” and B3 reviews your ADR without rewriting it.

  1. B1 · Paste 3–4 representative stories and ask for two lightweight options, A the simplest local storage and B a light local database, each with stack, folders, a Pydantic data sketch and three trade-offs.
  2. B2 · Compare A and B on the four criteria in a table, weaknesses included, with no third option and no final decision.
  3. Write your ADR yourself.
  4. B3 · Ask for a completeness check only: present or missing, with minimal suggestions, and no replacement ADR.

Read with careThe notes ask for one risk in the ADR, while B3 checks for “one or two risks.” Either satisfies both. For an example of a rejected assumption: in the author’s own Module 1 work, the assistant assumed a storage strategy had to be picked straight away, and the author deferred persistence until a later module needed it.

Key takeaways

  • Reviewed requirements are the context for architecture.
  • Compare options against simplicity, testability, local run and familiarity.
  • Catch the extras: auth, Docker, cloud, microservices, heavy ORMs, Redis or Celery, unrequested frontends.
  • The ADR is one paragraph, in your words, with two rejected assumptions and a risk.

Built from the Module 1 lecture notes, prompt library and additional readings; the videos they accompany were not supplied.

Your study checkpoint

Ready to continue?

Mark the lesson complete once you have read it and tried its idea on something real.

Next · Lesson 9