Skip to content

Free public course · 12/40

Chapter 12: Architecture Design: The Art of the Blueprint (CONTEXT.md)

Lesson objectives

Required artifact: CONTEXT blueprint

  1. O1 · Can distinguish the scope, owner and handoff between in-system responsibility and external dependency (artifact: CONTEXT blueprint)

    Evidence: The CONTEXT blueprint states the scope and owner of both in-system responsibility and external dependency

  2. O2 · Can construct a CONTEXT blueprint with inclusions, exclusions and human acceptance conditions (artifact: CONTEXT blueprint)

    Evidence: The CONTEXT blueprint contains at least one exclusion, one handoff and one acceptance condition

  3. O3 · Can use a CONTEXT blueprint to separate system duties, external dependencies and human review (artifact: CONTEXT blueprint)

    Evidence: The artifact marks internal/external boundaries, authority and acceptance interfaces for one solution

Before this lesson: Chapter 11: Requirements Analysis: From Vague to Precise

Novice path

Chapter transfer task: Can use a CONTEXT blueprint to separate system duties, external dependencies and human review. Use the diagram's boundary relationship to complete the first evidence item in the CONTEXT blueprint, then check each owner and decision rule.

Experienced path

Apply this task to a current project before reading the explanation: Can use a CONTEXT blueprint to separate system duties, external dependencies and human review. Submit the CONTEXT blueprint, then check the relationship type, missing evidence and authority boundary.

Chapter 12 teaching diagram for the CONTEXT blueprint
Use boundaries, handoffs and acceptance conditions to test the CONTEXT blueprint; do not collapse the three elements into one responsibility.
Diagram text description

A dashed frame marks the scope of the CONTEXT blueprint. Three cards represent in-system responsibility, external dependency and human-review interface. Arrows show defined handoffs, not interchangeable responsibilities; crossing the frame or lacking acceptance evidence requires a stop and escalation.

Relationship semantics: The dashed frame is the responsibility boundary; handoffs connect the three elements, and work stops when evidence or authority crosses that boundary.

Adapted public course. Concepts, procedures and examples are adapted from the internal textbook. Case sizes, timings, improvement figures and target thresholds are illustrative, not site delivery results or universal standards. Verify tools, platforms and skills in your environment. Prompts do not grant permissions and retry counts do not authorize recovery. Preserve work and verify targets, sharing and external-state effects first.

Lesson explanation

This chapter and Chapter 13 maintain documents with distinct responsibilities:

DocumentQuestion answeredContent ownership
CONTEXT.md: project blueprintWhat are we building, and why?Overview, core terminology, tech stack and rationale, data model, API contracts, directory layout, milestones
ARCHITECTURE.md: constraints constitutionWhich implementation approaches are unacceptable (how-not-to)?Prohibitions, red lines, negative-space boundaries, lessons learned; template in Chapter 13

Maintain the stack, models, interfaces, and directories only in CONTEXT.md. ARCHITECTURE.md references these facts and specifies boundaries that must not be crossed. The blueprint must also reference the constitution: with Chapter 13’s directory skeleton, root CONTEXT.md should say “Read .docs/ARCHITECTURE.md before implementation.” If a blueprint change touches a red line, resolve the document conflict and record the decision before implementation; do not leave AI to choose which document to obey.

12.1 The Essence of a Blueprint: Not a Document, but a “Constrainer”

You ask AI to build a “user management module.” It obliges and finishes in an hour — using Express + MongoDB. You notice something is wrong: your project uses Next.js + PostgreSQL. You ask it to rewrite, and it switches to Prisma + Postgres. But this time it changed the field naming style in the user table from camelCase to snake_case — and all the code you had already written now has to change along with it.

Where did the problem come from? Not from AI being disobedient, but from you not giving it a “map.” You gave it a destination (“user management module”) but never told it which roads to take and which roads are off-limits. AI can only choose a route by intuition, and intuition is the least reliable thing in engineering.

In AI coding, a blueprint plays a role even more critical than in traditional architecture design: it is the common entry point for project facts. AI also needs the constraints constitution, task requirements, and relevant code; the blueprint explains the purpose these materials serve.

AI has no long-term memory. Every conversation, it sees a blank sheet. Without a blueprint, AI’s “default behavior” is to pick the highest-probability solution from its training data — and what dominates that data? React + Node.js + MongoDB CRUD examples. So if you do not spell things out, AI will default to this trio. A more insidious problem is naming style: in the first conversation AI used camelCase (because the sample code you gave was camelCase); in the second conversation (after you reset the context) AI did not see the earlier example and used snake_case (because snake_case is also common in training data). The code generated in the two conversations has inconsistent field naming styles, and the data models conflict.

The essence of a blueprint is not a document; it is a “constrainer.” By making project facts explicit, it narrows AI’s candidate approaches to the project’s scope. For example, CONTEXT.md records the reasons for choosing Prisma and the field contracts, while ARCHITECTURE.md says “do not bypass the ORM” and “do not break existing naming contracts.” Reading both gives a new session consistent grounds for action; compliance still requires acceptance checks.

So a blueprint must be complete (incompleteness means AI still has to guess the parts the blueprint does not cover), accurate (inaccuracy means AI makes decisions based on wrong information), and readable (unreadability means AI cannot quickly understand it, wasting the context window). A blueprint is not optional overhead; it is a mandatory foundation for AI coding.

Sources and boundaries

Registered sources support only the external claims used here. The CONTEXT blueprint, example numbers and exercise scenario are internal instructional design and require project-specific validation.

  • OWASP risks for LLM applications

    OWASP Foundation · 2026-09-17 · Model output, sensitive information, tool permissions and human control require explicit risk boundaries.

Record lesson practice

When you are signed in, your ticks are saved to your account. When you are not, they last only while this page is open. A self-check is not a review or certification, so keep your own evidence and note any gaps.

Save my practice

You can read the exercises without signing in. With an account, your practice text, plain-text attachments and the self-assessment for each submission can be saved to it. Unsaved input is lost when you leave the page or switch accounts.

Go to the learning hub for more free practice →