Skip to content

    Frontend System Design

    Capstone: Build, Audit and Review

    Build the capstone against its design doc, audit it with a scored checklist where missing evidence never passes, and review it so blockers cannot hide.

    By Published 12 min read

    Share

    Standard lessonadvancedReact labFrontend System Design

    Before this: Capstone: Architecture and Design Document, Performance Budgets and Profiling, Accessibility Fundamentals and WCAG

    What you'll learn: By the end of this lesson you will be able to build a capstone in slices that stay in step with its design doc, collect four kinds of audit evidence (lab measurement, field data, accessibility checks, tests), score a checklist so that missing evidence never counts as a pass and one failing blocker cannot be hidden by a high score, and run a review that ends in findings with owners and a recorded result.

    A house is built by the builder and checked by an inspector. The inspector does not ask whether the builder feels good about it. They bring a list, measure what the list names, and write "not inspected" next to anything they could not reach. A "not inspected" line is not a pass, and a clean report with five such lines is not a clean report.

    The capstone follows the same split. The design doc (the previous lesson in this module, named here as plain text because it is written in the same round) holds the plan and the audit plan. This lesson covers the other half: building to the plan, collecting evidence and reviewing the result.

    Sources: web.dev Web Vitals and performance budgets, Chrome for Developers on Lighthouse performance scoring, the WCAG-EM methodology, WCAG 2.2 conformance, and W3C guidance on accessibility evaluation tools. All read on 2026-12-02. The lab is a model that scores numbers you type in; it ran no Lighthouse, browser or screen reader.

    The core idea

    An audit judges evidence against a plan written before the build. A check with no evidence is not a pass, and a blocker that fails stops the release whatever the average says.

    Three illustrations run through the lesson:

    • Minimal example: one threshold check and what its three outcomes mean.
    • Realistic example: an order dashboard (a grocery-marketplace staff tool, an illustrative example) audited twice, before and after a round of fixes.
    • Failure example: an audit whose score is high while a blocker fails, and one whose blocker was never measured.

    Build: stay close to the doc

    Build in thin vertical slices: one screen, from the network call to the keyboard path, before the next screen. Each slice is judged against section 7 of the doc as soon as it exists, so a missed goal is found while it is cheap.

    Three habits keep the build and the doc together:

    1. A change that breaks a decision updates the record. The decision record format (title, context, decision, status, consequences, as Michael Nygard describes it) has a status for this: the old record stays, marked superseded, and a new one is written.
    2. The budget is enforced in the build, not remembered. web.dev says budgets can be added to the build process with tools such as Lighthouse CI, and that when a threshold is exceeded you either optimize or remove something, or decline to add the new thing. See performance budgets and profiling and CI/CD for front ends.
    3. Every screen has its states (loading, empty, error, refresh failed) before it counts as done. The error, loading and empty states lesson gives the model, and the testing pyramid and trophy lesson helps decide which tests cover them.

    Audit: four kinds of evidence

    Figure 1. From build to verdict

    Capstone audit: from evidence to verdictBuild to Lab run; Build to Field data; Build to Accessibility; Build to Tests; Lab run to Scored checklist (numbers); Field data to Scored checklist; Accessibility to Scored checklist; Tests to Scored checklist; Scored checklist to Review (verdict + report)Build: the capstoneBuildthe capstoneLab run: metrics, bundle sizeLab runmetrics, bundlesizeField data: p75 of real loadsField datap75 of real loadsAccessibility: tool + keyboard walkAccessibilitytool + keyboardwalkTests: pass and fail countsTestspass and failcountsScored checklist: rules, weightsScoredchecklistrules, weightsReview: a second personReviewa second personnumbersverdict + report

    How to read this: four kinds of evidence feed one checklist, and a person reads the report. The accent box is the part the lab below models; the other boxes are what produces the numbers it scores.

    Lab measurement. A lab run gives repeatable numbers for one build on one setup. The Lighthouse performance score is a weighted average of metric scores, and only metrics contribute to it, not the opportunities and diagnostics it lists. Its documentation also says a lot of the variability between runs is not due to Lighthouse: changing ads or A/B tests, network routing, device differences, browser extensions and antivirus software all move the numbers. So a lab number is a sample, and the audit should say how it was taken.

    Field data. web.dev says a good threshold to measure is the 75th percentile of page loads, segmented across mobile and desktop, and gives "good" values: LCP within 2.5 seconds, INP of 200 milliseconds or less, CLS of 0.1 or less. A capstone with no real users has no field data. Say so, and mark those checks as not measured; do not substitute a lab number and call it field. See Core Web Vitals and real user monitoring.

    Accessibility. The W3C's WCAG-EM method has five steps: define the scope, explore the target, select a representative sample, evaluate it, report. For a capstone small enough to check every page, check every page. The W3C also says that tools "can not determine accessibility, they can only assist", so the evidence includes a manual keyboard walk of each key flow. WCAG 2.2 conformance applies to full pages and complete processes: every page in a multi-step flow must meet the claimed level. See accessibility fundamentals and WCAG.

    Tests. The count of failing tests, and which flows have an end-to-end test. Passing tests show only that what was tested works.

    Illustration 1: the minimal example

    One check, "INP at the 75th percentile", with the limit from the doc:

    Evidence Outcome Meaning
    172 ms pass Inside the limit by more than 10 percent
    195 ms warn Inside the limit, within the last 10 percent (this lab's own rule)
    240 ms fail Over the limit of 200 ms
    (nothing measured) no-evidence Unknown. Not a pass

    The fourth row is the one that matters. A missing measurement is information about the audit, not about the product.

    The scoring model

    The lab for this lesson, examples/frontend/labs/capstone-audit-model, is a small model of such a checklist. It is a model, not a tool: it runs no Lighthouse and no browser, and every number is typed in. The sample data is hand-written and illustrative.

    Its rules, all documented in the code:

    1. 13 checks in five areas (performance, accessibility, resilience, testing, documentation), each tagged blocker, major or minor.
    2. Four statuses. pass, warn (within 10 percent of a limit), fail and no-evidence. The three Core Web Vitals limits are the published "good" values; every other limit (170 KB of JavaScript, 25 passing tests, 3 decision records) is an illustrative choice.
    3. Points. Pass 1, warn 0.5, fail 0 and no-evidence 0. Weights: blocker 3, major 2, minor 1. An area score and the overall score are weighted percentages.
    4. Verdict. A blocker that fails, or has no evidence, makes the verdict blocked whatever the score. Otherwise 85 or more is ready; below that, needs-work.

    Figure 2. How the verdict is reached

    flowchart TD accTitle: How the audit verdict is reached accDescr: Checks are run on the evidence. If any blocker fails or has no evidence, the verdict is blocked. Otherwise the weighted score decides: 85 or more is ready, lower is needs work. E["Evidence"] --> C["Run the 13 checks"] C --> B{"Any blocker failed
    or unmeasured?"} B -- yes --> X["Verdict: blocked"] B -- no --> S{"Weighted score
    85 or more?"} S -- yes --> R["Verdict: ready"] S -- no --> N["Verdict: needs work"]

    How to read this: the blocker question comes before the score. A score can be raised by many small passes, so it cannot be allowed to overrule one serious failure.

    The code stays pure: audit(evidence) returns results, area scores, the list of unmeasured checks and the verdict. The React part is thin: a status line (role="status"), filter buttons with aria-pressed, a table with row headers, and four number inputs where an empty box removes the measure and does not mean zero. The tests render it in jsdom, which is not a browser: they read roles, names and text, and nothing was seen on a screen.

    Build it

    The lab is in examples/frontend/labs/capstone-audit-model. It ran with Node 26.13.1, Vitest 5.1.0, React 19.3.1 and TypeScript 7.0.2: 34 tests in two files passed and the type check was clean.

    cd examples/frontend/labs/capstone-audit-model
    ../../node_modules/.bin/vitest run
    node src/demo.ts

    Illustration 2: the realistic example

    The demo audits the same imaginary order dashboard twice. Run 1 is a first attempt. These are the accessibility, resilience, testing and documentation parts of its report and the verdict:

    Expected output, captured from a real run (the first attempt, from the accessibility area to the verdict):

      accessibility (0/100)
        fail        blocker Automated accessibility violations: 3 violations reported
        fail        major   Pages in scope that were checked: 4 of 6 pages in scope checked
        fail        blocker Key user flows completed by keyboard alone: 2 of 3 flows completed
      resilience (0/100)
        fail        major   Screen states designed and shown: 5 of 6 states covered
        fail        major   Listed failure modes that were injected: 1 of 4 failure modes injected
      testing (100/100)
        pass        blocker Failing tests: 0 failing
        pass        minor   Passing tests: 31 passing, at least 25 wanted
      documentation (0/100)
        fail        minor   Decision records written: 2 records, at least 3 wanted
        no-evidence minor   Non-goals written down: not measured: nonGoalsListed
      overall 27/100, unmeasured: non-goals
      verdict: Blocked: inp, a11y-automated, a11y-keyboard

    Three blockers fail (INP in the performance area, automated accessibility violations and the keyboard flow). The testing area scores 100 and still the verdict is blocked, because green tests say nothing about a keyboard path. The last documentation check has no evidence: it is listed, scored zero and not hidden.

    After one round of fixes, the demo compares the two runs.

    Expected output, captured from a real run (the comparison and the blocker experiments, to the end of the file):

    === 3. What changed between the runs
      lcp                warn -> pass
      inp                fail -> pass
      js-budget          fail -> pass
      a11y-automated     fail -> pass
      a11y-coverage      fail -> pass
      a11y-keyboard      fail -> pass
      states             fail -> pass
      failure-injection  fail -> pass
      adrs               fail -> pass
      non-goals          no-evidence -> pass
    
    === 4. A high score does not hide a blocker
      overall 89/100, verdict: blocked (tests-failing)
      overall 89/100, verdict: blocked (inp)

    The second run reaches a ready verdict with a full score (the test suite asserts it). These numbers come from the sample data, not from a measurement of any site.

    Illustration 3: a failure

    The last two lines are the failure example. One failing test, or one unmeasured INP, takes the overall score to 89, above the 85 line, and the verdict is still blocked. Without the blocker rule, a reviewer who read only the score would see a number above the line.

    Break it. In runChecks, make a check with missing measures return pass. Two tests fail ("is reported as no-evidence, never as pass" and "an unmeasured blocker blocks too"). The README lists a second experiment. Restore the code afterwards.

    Review: a second person reads the evidence

    An audit produces a report; a review decides what to do with it. The reviewer is not the author, and reads in this order:

    1. The design doc's goals and non-goals, to know what the build promised.
    2. The audit plan (section 7) and the report: does every goal have a row, and does every row have evidence?
    3. The no-evidence and warn rows first, because they are where an audit is thinnest.
    4. The blockers, then the scores.
    5. A manual spot check: use the keyboard path on a key flow yourself.

    Figure 3. One review round

    sequenceDiagram accTitle: One capstone review round accDescr: The author submits the doc and the audit report. The reviewer checks that each goal has evidence, spot-checks one key flow, and returns findings. The author fixes or accepts each finding with an owner, reruns the affected checks, and the result is written into the doc. participant A as Author participant R as Reviewer participant D as Design doc A->>R: doc, audit report, evidence files R->>D: does each goal have a row? R->>R: spot-check one key flow R-->>A: findings (blocker, major, minor) A->>A: fix or accept each, with an owner A->>R: rerun of the affected checks R->>D: record the result in section 9

    How to read this: the loop ends in the doc, not in a chat. Only the checks that changed are rerun, and the result, including anything accepted instead of fixed, is written where the next reader will look.

    A finding says what is wrong, where, which goal it breaks and what would close it. "Accessibility needs work" is not a finding; "the Mark as packed button is not reachable by Tab on the order detail page (goal G2)" is.

    Trade-offs

    Choice Gain Cost
    Scored checklist Repeatable, comparable between runs A score can look more exact than the inputs deserve
    Blocker rule before the score One serious failure cannot hide Strict: a single blocker stops the release
    Counting no-evidence as zero Honest about gaps A new project looks bad until it measures
    Lab numbers only Fast, repeatable Not what users experience; varies between runs
    Sampling pages Less work A site-wide claim cannot be made from a sample
    Author-run audit Quick No independent eye

    In practice: auditing the order dashboard

    NOTE

    This is a realistic scenario, not a case history. It is a composite built from common team practice. It describes no specific company or product, and every number in it is an illustrative assumption.

    The situation

    The dashboard team has a green CI build and a Lighthouse screenshot in the pull request, and wants to call the capstone done on Friday. Nobody has walked the keyboard paths, field data does not exist yet, and one measure (non-goals written down) was never checked.

    Starting architecture

    Figure 4. Before the audit

    Before the audit: one screenshot as the evidenceCI build to Lighthouse screenshot; Lighthouse screenshot to Declared doneCI build: greenCI buildgreenLighthouse screenshot: one run, one pageLighthousescreenshotone run, one pageDeclared done: no plan, no reviewDeclared doneno plan, noreview

    How to read this: the warning boxes mark where evidence is thin: one run on one page stands in for the plan, and nothing is reviewed.

    Options considered

    Option Fixes Costs Risk
    Ship on the screenshot No delay Nothing new learned Unchecked blockers
    Audit against the plan, author only Evidence per goal A day No independent eye
    Audit plus second-person review Evidence and a fresh read A day and a reviewer Review comments to resolve

    The decision

    Field Decision record
    Context One screenshot is the only evidence; keyboard paths and field data are unchecked.
    Decision Fill in the evidence for every audit-plan row, score it with the checklist, and have a second person review. Mark what cannot be measured as no-evidence.
    Consequences, good Blockers are found before release; gaps are visible.
    Consequences, bad The first audit is blocked; Friday moves.
    Revisit when Real users exist and field data can replace the lab numbers.

    Rollout and verification

    1. Fill the evidence file from the audit plan; leave unmeasured values empty, never zero.
    2. Run the checklist; read the no-evidence rows first.
    3. Fix the blockers, rerun only the changed checks and compare the two reports.
    4. The reviewer repeats one keyboard flow by hand, then writes the result into section 9 of the doc.

    The 2 a.m. failure

    After release, an alert shows INP worse than in the lab, on phones. The audit passed because INP was measured in the lab on a desktop and the field check was marked "not applicable" instead of "no evidence".

    First three checks: (1) look at which evidence the INP row used and on what device; (2) compare the field percentile for mobile and desktop; (3) check whether the plan said the metric would be measured in the field. Mitigation: roll back the last change to the heaviest handler. Follow-up: the checklist treats "not applicable" for a blocker as no evidence unless the doc says why.

    Architect's notes

    • Measure first, then average. Blockers before scores, always.
    • Never let a gap look like a pass. The cheapest honesty in an audit is a no-evidence row.
    • Say how each number was taken: lab or field, which page, which device, how many runs.
    • Keep the scoring rule in the doc so a different reviewer reaches the same verdict.
    • A score is a summary. The review reads the rows.

    Common mistakes

    • Treating a missing measure as zero or as a pass.
    • One Lighthouse run as the whole performance evidence, when runs vary.
    • Tool-only accessibility checks with no keyboard walk.
    • Claiming conformance for pages not checked.
    • Review by the author alone.
    • Findings with no owner or no goal attached.
    • Moving the threshold after seeing the result.

    Key takeaways

    • The audit judges evidence against a plan written before the build.
    • Four evidence kinds: lab, field, accessibility (tool and manual) and tests.
    • Missing evidence is no-evidence, scored zero and listed, never a pass.
    • A failing or unmeasured blocker blocks the release whatever the score is.
    • Lighthouse scores vary between runs and cover metrics only; tools only assist accessibility evaluation.
    • A review ends in findings with owners and a result written into the doc.

    Practice exercises

    Exercise 1: Starter (30 min). Run the lab's tests and demo. Change one measure in src/sample.ts so that a pass becomes a warn, and predict the new overall score before you run it.

    Exercise 2: Intermediate (2 hours). Add a check to src/audit.ts for a second Web Vitals metric of your choice, with a test for each of its four statuses.

    Exercise 3: Advanced (half day). Audit your own capstone with the model: fill in the evidence, leave out what you did not measure, and write the findings for your reviewer.

    In this course:

    Official documentation

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments