Lesson 06 · Cloud to Code

Build specification and plan.

Convert an agreed architecture into precise, testable, ordered work.

Watch the lesson

Open the interactive HTML presentation →  ·  Read the transcript

What you’ll learn

Convert an agreed architecture into precise, testable, ordered work.

Prerequisite: previous lessons. Practice: 15–20 minutes.

Lesson plan

  1. From design to contract
  2. Write a concrete requirement
  3. Design acceptance
  4. Preservation and boundaries
  5. Plan dependencies and ownership
  6. Kickoff readiness

Lecture script

From design to contract

A build specification is an agreement about what must happen. It lets an implementation agent make the right small decisions while leaving the important ones settled. Begin with the outcome, users, scope, and non-goals. Then describe behavior in terms of inputs, outputs, validation, state changes, errors, security, and the things the work must preserve. Link each important requirement to acceptance evidence. Include examples so a fresh reader can distinguish expected behavior from a plausible guess.

Write a concrete requirement

For the tracker, compare “validate the form” with: “Require a contact name and one preferred contact method. If either is missing, explain the missing field and keep the entered values. Do not save an incomplete inquiry.” This is a proposed example; the real owner must approve the fields. It tells the agent what to accept, reject, and show the visitor. It also creates several test cases without prescribing every line of code.

Design acceptance

Acceptance criteria are conditions that can be observed. Assign stable identifiers such as A-01, and connect each to one or more checks. A-01 might say a valid fictional inquiry appears once in the owner list. A test could submit a valid synthetic record and retrieve it. Record the scope of the evidence: a local test demonstrates local behavior; it does not prove that a live provider is configured. Include negative paths, such as missing fields, unauthorized access, and a storage failure.

Preservation and boundaries

A spec must say what remains unchanged. If the existing public website is out of scope, explicitly preserve it. If sending email is not authorized, say that the tracker records status without sending messages. Name external dependencies, privacy expectations, and what happens when an integration cannot be reached. Write a concrete rollback: the way to return to the previous known state if the change fails. Do not pretend an untested rollback has already worked.

Plan dependencies and ownership

A plan orders the work. One possible sequence is to agree on the inquiry record, build validation and storage, build the owner view against the agreed contract, integrate, then verify. Parallel workers can work safely when their file ownership and interfaces are clear. If two people change the same shared contract at once, integration becomes harder. For each phase, list its goal, prerequisites, owned files or subsystem, checks, evidence, and completion condition.

Kickoff readiness

Before handing the plan to an agent, ask whether a fresh person could explain what is in scope, which decisions are settled, how success will be checked, and when to stop. Separate an approved plan from authorization to execute it. The kickoff will identify the repository, baseline, read order, allowed actions, forbidden actions, work sequence, proof, and handoff. We will build that briefing in Lesson 8. A good spec reduces guessing without making safe, routine implementation choices impossible.

Define the real-world result

For the tracker, the overall outcome might be that an owner can find and manage inquiries received through a web form. That sentence does not yet specify every field or validation rule. Add a scope section identifying the first release, such as public form submission and a private status list. Add non-goals such as email import, automatic replies, or payments if those are not part of the approved work. These boundaries protect both the owner and the implementation agent from assumptions.

Describe inputs and errors

Write down the fields, which are required, how invalid values are identified, and what the person sees. “The form should be friendly” is a preference, but it does not define how an empty required field behaves. A stronger criterion says the field is named in a clear message and the previously entered values remain available. Also say whether the failed submission creates a record. These details give the developer room to choose the interface while preserving the important behavior.

Make proof traceable

Connect each requirement to an acceptance ID and a check. For example, A-02 could describe rejecting an inquiry with no contact method. A test submits that invalid data and checks for both an error and absence of a saved record. Record whether the test runs locally, against a staging service, or in production. A green local check is useful evidence for local behavior, but it does not prove a live deployment is configured or that a provider delivered anything.

Include compatibility and recovery

What existing data and behavior must remain intact? If an older inquiry already has a status, a new view should not erase it. If the deployment fails, the plan should identify the earlier version or reversal procedure and the point at which rollback is safe. Some changes, such as sending a real message, cannot be unsent; they need special care and explicit authorization. Label an untested recovery plan as a plan, then rehearse it when appropriate and allowed.

Build a dependency graph

Before implementation, list what must exist before something else can be completed. The view depends on an agreed record format; tests depend on defined expected behavior. Workers may draft a view and validation logic in parallel after the shared format is agreed, but they should not edit the same files without coordination. The conductor collects each result and checks the integrated behavior. This is how parallel work saves time without turning shared interfaces into a guessing game.

Check the contract with examples

Ask the agent to walk through one valid inquiry, one invalid inquiry, and one storage failure against the spec. Where it has to guess, add the missing rule or label it as an intentional implementation choice. Check that acceptance covers the non-goals too: if automatic email is forbidden, a test or inspection should show that submitting an inquiry does not trigger it. A good contract helps the team build the agreed outcome and recognize when work is still incomplete.

Review the sequence as a learner

Imagine you are the agent seeing the project for the first time. Which document tells you what to build? Which decision explains why email import was deferred? Can you identify a task that can be completed and tested without waiting for an unrelated task? Can you state when to stop if access is missing? If the answer to any of these is unclear, add a specific reference or boundary to the plan. The goal is to remove consequential ambiguity while leaving room for reasonable implementation choices.

Try it yourself

Write three tracker requirements: one successful submission, one invalid submission, and one unauthorized access attempt. Give each an acceptance ID and check. Identify one existing behavior or data set the change must preserve and propose how to roll back if the new behavior fails. Arrange three implementation phases with dependencies and distinct ownership.

See a completed fictional example

Sample A-01: Given valid synthetic contact and event details, when the organizer submits, one inquiry appears in the private list. Check with a local submission and retrieval test; label the result offline-tested. A-02: missing contact method produces an error and creates no record. A-03: an unauthorized request cannot read the private list. Preserve existing submitted records; if the new view fails, restore the previous known revision according to the documented rollback procedure. Order: agree the record contract, build validation/storage, then integrate the view and run boundary checks.

Self-check rubric

Check each item and revise anything a fresh reader would have to guess.