Skip to content

The design workflow end to end

Difficulty: Beginner

Key concepts

  • design workflow
  • artifact
  • question log
  • requirements
  • acceptance criteria
  • traceability
  • iteration
  • exit criteria
  • How all 12 workflow steps look on one realistic problem, from a vague request to a design that can change.
  • What the artifact of each step looks like, and how small it can be.
  • How to tell when a step is done enough to move on.
  • Which signals mean you should go back to an earlier step.

The orientation lesson introduced the steps on a small to-do feature. This lesson applies them to the problem that the whole Requirements section uses, so that later lessons can zoom into one step at a time.

The running example: an office print-release service

Section titled “The running example: an office print-release service”

This is the request, exactly as it arrived from the office’s facilities manager:

“Printouts pile up at the printers and nobody collects them. Confidential pages get left lying around. We want print jobs to wait until the person is standing at the printer. And we need some control over how much people print.”

Nobody has said how many people, which printers, what “control” means, or what happens when a printer jams. That is normal. Real requests describe a problem and a few hoped-for outcomes, not a design. The workflow turns this paragraph into a design you can justify and test.

Everything about this office (the number of people, the printers, the answers people give) is invented for teaching. The numbers are realistic, but they are not measurements of a real office.

The steps and their artifacts on this problem

Section titled “The steps and their artifacts on this problem”

Each row shows a short extract of what the step produces for the print-release service. Later lessons in this section show each artifact in full.

Step Artifact for the print-release service (extract)
1. Problem statement The paragraph above, copied word for word, with who sent it and when.
2. Clarification questions A question log: “How should printing be limited?” answered “500 pages per person per month” (facilities manager, confirmed); “Can printers report how many pages they printed?” (IT, open).
3. Requirements and constraints FR-1: A submitted job is held, not printed. FR-2: A user releases their held jobs at any printer by badge. NFR-1: Printing starts within 10 seconds of release.
4. Use cases and acceptance criteria “Given a user with 20 pages of quota left, when they release a 30-page job, then the job is not printed and the printer’s panel says the quota is exceeded.”
5. Domain modeling Concepts: user, print job, printer, quota, release. Rules: no page of a job is printed twice; pages charged never exceed the quota.
6. Architecture and boundaries The release logic is a library with no knowledge of the print server or the badge system; each is reached through a small interface.
7. Responsibility assignment HeldJobs knows each user’s waiting jobs; QuotaAccount knows what a user may still print; ReleaseStation coordinates one release at one printer.
8. Detailed design ReleaseStation::release(badge_id) returns a result per job; HeldJobs owns jobs by value; a job’s state is an enum class.
9. Implementation Small increments: hold a job; list a user’s jobs; release with no quota; then quotas; then printer failures.
10. Testing One test per acceptance criterion, named after it, and one test per rule.
11. Trade-off review “Rejected: charging quota when the job is submitted. Reason: jobs that are never released would use up quota.”
12. Evolution New request: “let a user release a job for a colleague”. Its effect on requirements, the model, and the tests.

The class names in steps 7 and 8 (HeldJobs, QuotaAccount, ReleaseStation) are this section’s provisional names. The use-case lesson writes the C++ for them.

Notice that each artifact uses the words of the step before. The acceptance criterion in step 4 mentions “quota”, the term from the question log in step 2. The rule in step 5 restates a requirement as something that must always be true. The test in step 10 is named after the criterion. That chain, from a question to a requirement to a class to a test, is called traceability, and the traceability lesson builds it as a table.

The delivery framework has five steps: requirements, entities and relationships, class design, implementation, and extensibility. The 12 steps are the same five, each expanded so that it produces something written down. Each group produces artifacts that the next group uses as input; the last group’s artifacts feed the next change.

The 12 steps grouped by the five framework steps, with the artifacts each group hands to the next and the arrows that go back
Text description of the diagram

Five groups of steps, each followed by the artifacts it produces. Requirements (steps 1 to 4) produces the question log, the requirements, and the acceptance criteria, which are the input to Entities and relationships (steps 5 and 6). That group produces concepts, rules, and the boundaries between the core and outside systems, the input to Class design (steps 7 and 8). Class design produces classes, class outlines, and signatures, the input to Implementation (steps 9 and 10). Implementation produces code and tests, the input to Extensibility (steps 11 and 12), which produces a trade-off record and change notes. Four labelled arrows go back: from Entities and relationships to Requirements when modeling finds a rule nobody stated; from Class design to Requirements when the design needs an answer nobody has given; from Implementation to Class design when an acceptance criterion cannot be met by the current design; and from Extensibility to Requirements when a new request arrives.

Diagram source (Mermaid)
flowchart LR
U["1. Requirements<br/>steps 1-4"] --> UA[/"question log,<br/>requirements,<br/>acceptance criteria"/]
UA --> M["2. Entities and<br/>relationships<br/>steps 5-6"]
M --> MA[/"concepts, rules,<br/>boundaries"/]
MA --> D["3. Class design<br/>steps 7-8"]
D --> DA[/"classes, outlines,<br/>signatures"/]
DA --> B["4. Implementation<br/>steps 9-10"]
B --> BA[/"code and tests"/]
BA --> R["5. Extensibility<br/>steps 11-12"]
R --> RA[/"trade-off record,<br/>change notes"/]
M -->|rule nobody stated| U
D -->|missing answer| U
B -->|criterion cannot be met| D
R -->|new request| U

In a timed session you do the five steps in a few minutes each and keep the artifacts in your head or on a whiteboard. On a real project you write each one down, because someone else will review it and because you will need it when the next change arrives.

The site is organized the same way. This Requirements section covers Requirements. The Modeling and Architecture sections cover Entities and relationships, and Modeling’s lessons on finding classes and member functions start Class design, which the Principles and Patterns sections continue. The C++ and Testing sections cover Implementation. Extensibility is taught in this section’s lessons on prioritization and on how answers change the design, in the Testing and evolution section, and at the end of every case study.

A common worry is “how do I know when to stop asking questions?” The workflow does not ask for complete artifacts, only for artifacts that are good enough for the next step. These are useful exit checks:

Step Done enough when…
1. Problem statement It is written down as received, with its source. You have not “improved” it.
2. Clarification questions Every question whose answer would change the design is answered, or has a labeled assumption.
3. Requirements Each requirement can be checked by a test or a measurement. None uses words like “fast” or “easy” alone.
4. Use cases and criteria Each main use case has its normal path and its important failures, each with a checkable criterion.
5. Domain modeling Every noun in the requirements maps to a concept, a value, or a deliberate omission; each rule is written.
6. Architecture You can say which part may depend on which, and the core logic does not depend on outside systems.
7. Responsibilities Each requirement has an owner; no class needs everyone else’s data to do its job.
8. Detailed design Ownership, lifetimes, and error results are decided for every public function.
9. Implementation The current increment works and its tests pass.
10. Testing Every acceptance criterion and rule has at least one test, and every test names what it checks.
11. Trade-off review Each major decision lists at least one alternative and why it lost.
12. Evolution For a likely change, you can name the artifacts and classes that change and the tests that prove it.

These checks matter most at step 2. Some questions are interesting but would not change the design: “What brand are the printers?” does not affect the release logic once IT confirms that the printers all speak to the same print server. You can leave that one unasked. “Can printers report how many pages they printed?” decides how quotas are charged when a printer jams, so it must be answered or assumed before step 8.

Going back is not a failure of planning. It is how the workflow catches mistakes cheaply. These are the signals to watch for, with an example of each from the print-release service:

Signal Go back to Print-release example
Two answers contradict each other 2. Questions Facilities says “500 pages per person”; a department head says “our team shares one budget”. Someone must decide which.
You cannot write an acceptance criterion 3. Requirements “Printing should be fast” has no number. Ask what “fast” means at the printer.
Modeling finds a rule nobody mentioned 2. Questions A job can have colour and black-and-white pages. Does a colour page count the same as a black-and-white page against the quota?
The design needs a fact nobody has 2. Questions Charging only printed pages after a jam needs the printer to report a page count. Ask IT, and record an assumption until they answer.
A test passes but the behaviour is clearly wrong 4. Criteria A test checks that the expiry check deletes a job, but it also deletes jobs that are printing at that moment. The criterion never said which jobs count as “held”.
A new request arrives 2. Questions, then 3 “Let a user release a job for a colleague.” Ask who may do this, and for whom, before changing anything.

Each row says which artifact to update. When the colour question is answered, you add the answer to the question log, adjust the quota requirement, add a criterion, and update the rule in the model. Without the artifacts, the answer would live only in someone’s memory or a chat message, and the next person would ask again.

Here is what often happens instead. A developer reads the request and starts at step 9:

  1. Write a PrintJob class and a Printer class.
  2. Add a std::vector<PrintJob> to each printer, so jobs wait at the printer they were sent to.
  3. Add a pages_printed counter to each user, and refuse printing above 500.

It looks reasonable, and parts of it are. But it has already made decisions that nobody asked about:

  • Jobs wait at one printer. If the user walks to a different printer, their job is not there. Was that what the office wanted? The request says “the printer”, which could mean either.
  • The quota counts every page, colour or not, and charges when printing starts. If the printer jams on page 3 of 40, the user may lose 40 pages of quota.
  • There is no expiry. Jobs that are never released stay forever, and confidential documents sit in a queue instead of on a tray.

Each of these is a reasonable choice, but each was made by accident. The workflow does not make you slower at writing classes. It makes you write the same classes after the questions that decide what they must do.

In a design interview you have perhaps 45 minutes. Spend the first part on steps 1 to 4 out loud: restate the problem, ask a handful of questions that change the design, state your assumptions, and list the main use cases. Then model, design, and sketch code. Leave a few minutes for trade-offs and “what if” changes. The interviewer is usually checking whether your design follows from what you asked.

In a real project the artifacts live where the team already works: a design document, an issue, a pull-request description. The question log might be a table in a shared document; the trade-off record might be a short decision note. The steps stay the same; only the format changes.

For a small change to existing code, most steps take a sentence. You still ask what is unclear (step 2), still check the criteria (steps 4 and 10), and still note what the change costs (step 11).

  • When the answer is already known. If the team has built three print-release services, steps 2 and 5 are mostly a check that nothing differs this time.
  • When you are exploring. A throw-away prototype to see whether the printers can report page counts is a fine first step. Label it as a prototype, and do not let it become the design by default.
  • When the change is tiny. Renaming a message on the printer panel needs no domain model.

Even then, writing down the question and the decision takes a minute and saves the next person from repeating the debate.

The workflow costs time before the first line of code, and some of its artifacts will be thrown away when answers change. In exchange, the design decisions become visible and reviewable, and most changes land in a known place. For a problem with several groups of people involved, like this one (staff, facilities, IT, security), that trade is almost always worth it. For a one-person tool you will use once, it may not be.

There is also a risk in the other direction: treating the workflow as a form to fill in. If a step’s artifact would be empty or obvious, write one line saying so and move on.

  • Rewriting the problem statement. Step 1 records what was asked. Your interpretation belongs in steps 2 and 3, where it can be checked.
  • Asking every question you can think of. Ask the ones whose answers change the design first; park the rest.
  • Hiding assumptions in the design. “Jobs wait at one printer” is an assumption until someone confirms it. Write it in the question log.
  • Treating the order as strict. Sketching a class while asking questions is fine, as long as the sketch is updated when the answers arrive.
  • No link from tests back to requirements. Without it, nobody can tell which requirement a failing test protects, or which requirement has no test.

Two weeks after the design is agreed, the security officer adds: “We need a record of who released which job, at which printer, and when. Expired jobs should be recorded too.”

Walk it through the workflow:

  • Questions: How long must the records be kept? Who may read them? Does a record include the document’s name, which may itself be confidential?
  • Requirements: one new functional requirement for the record, and one constraint on how long it is kept.
  • Criteria: “Given a held job, when its owner releases it at printer 2-East, then a record shows the user, the job, the printer, and the time.”
  • Model: a new concept, the release record. It is a value: once written, it never changes.
  • Design and tests: ReleaseStation reports each release, and the expiry check reports each expired job, to a small recording interface, so neither cares where records are stored. New tests check that each release and each expiry writes exactly one record.

Because every artifact already exists, the change is a set of small, named edits, not a rethink. That is the payoff the workflow promises.

Exercise: Which step produced this artifact?

Here are ten artifacts from the print-release project. For each, name the workflow step (1 to 12) that produced it.

  • A. “Rejected: storing held jobs on each printer. Reason: users release at any printer.”
  • B. “Do visitors need to print?”
  • C. “QuotaAccount::try_charge(int pages) returns false and changes nothing if the pages do not fit.”
  • D. “NFR-2: The service keeps working for jobs already released if the badge system is down.”
  • E. “Test release_refused_when_quota_exceeded.”
  • F. “A print job belongs to exactly one user.”
  • G. “The release logic must not include any header from the print server’s library.”
  • H. “Given a job held for more than 24 hours, when the expiry check runs, then it is deleted and no longer appears at any printer.”
  • I. “New request: release jobs from a phone. Affects FR-2 and ReleaseStation; new criterion for phone release.”
  • J. “ReleaseStation coordinates; it asks HeldJobs for the jobs and QuotaAccount whether they fit.”
Show the explained answer
Artifact Step Why
A 11. Trade-off review It records an alternative and why it lost.
B 2. Clarification questions It asks about something the request did not mention.
C 8. Detailed design An exact signature, with its error behaviour decided.
D 3. Requirements A numbered, non-functional requirement about how the service behaves when something fails.
E 10. Testing A test, named after what it checks.
F 5. Domain modeling A rule about concepts that must always hold (an invariant).
G 6. Architecture A dependency rule between large parts.
H 4. Use cases and criteria A Given/When/Then condition that a test can check.
I 12. Evolution A change, with the artifacts and classes it affects.
J 7. Responsibility assignment Who knows and does what, without exact signatures yet.

The pairs most often mixed up:

  • D or H? D says what must be true of the service; H describes one scenario in a form a test can follow. A requirement usually has several criteria.
  • F or D? F is about the problem’s concepts and holds no matter how the software is built. D is about the software’s behaviour.
  • J or C? J assigns responsibilities in words; C fixes the exact interface. You can agree on J and still argue about C.
  • A or G? G is a decision; A is the record of a rejected alternative. A trade-off record often explains a decision like G.
  • The workflow turns a vague request into artifacts that each build on the previous one: questions, requirements, criteria, concepts and rules, components, classes, signatures, code, tests, and a trade-off record.
  • Each step needs to be done well enough for the next step, not completely. At step 2, that means answering or assuming every question that would change the design.
  • Specific signals (contradictions, untestable requirements, new rules, missing facts, new requests) tell you which earlier step to revisit, and which artifact to update.
  • The print-release service is this section’s running example. The next lessons take its steps one at a time, starting with clarification questions.