Worked example lessons
Follow a problem from its starting evidence to a completed response. Notice why each step is justified, then try the same reasoning on a different case.
Lesson previews
Imani is owning her first partner webinar and needs autonomy without ambiguity. Match delegation structure to task-specific competence and commitment. The common trap is to equate empowerment with under-specification. “Run with it” can feel trusting to the manager and confusing to the employee. Before “Can you own the partner webinar and keep me posted?” After “You own speaker prep and agenda. Marketing owns promotion copy. Legal reviews claims by Tuesday. Success is 75 registrants and two customer questions. Let us checkpoint on outline Friday and dry run next Wednesday.” Outcome Define what successful work produces. Outcome prevents effort from replacing…
5 minRewrite Vague Feedback Into SBIIThe original feedback is “You need to show more ownership.” SBII turns a label into a specific moment, behavior, impact, and intent question. The trap is replacing one vague phrase with another, such as “be more proactive” or “step up.” Those words sound managerial but do not create a behavioral target. Before “You need to show more ownership.” After “In yesterday’s launch review, when Finance asked who would confirm pricing, you stayed silent. The decision came back to me after the meeting. What was happening for you?” Situation Name the exact meeting: “In yesterday’s launch review...” Specificity prevents the person…
5 minRun GROW in Seven MinutesLina says she is losing control of a vendor workstream seven minutes before your next meeting. Use GROW as a compact sequence: Goal, Reality, Options, Will. The common shortcut is to dictate the vendor email immediately. That may fix today’s wording but leaves Lina dependent the next time a vendor slips. Before “Tell them this is unacceptable and copy me.” Lina sends your message and learns little. After “What do you need by Friday? What facts show the current gap? What options do you have? What will you send by 3 p.m.?” Lina owns the vendor move. Goal Ask: “What…
5 minCode an Exit Notequote-to-code confidence-chip before-after A messy exit note contains mission attachment, shifting priorities, canceled 1:1s, and lack of leadership path. Thematic coding: segment the note, code meaning, attach evidence, rate confidence, and form an action hypothesis The common trap is forcing the whole note into one generic category because the dashboard wants a single reason. Segment the note Break the quote into meaning units: mission liked, priorities changed, 1:1s moved, no path to lead. Segmentation prevents the loudest phrase from swallowing the rest of the evidence. Assign codes Code priority volatility, manager availability, and leadership-path opacity. The codes name work conditions,…
5 minAsk for Tests That Prove the RiskA reviewer wants tests for an auth guard but only writes “add tests.” Risk → failure mode → right test level → expected assertion. Vague test requests invite broad happy-path tests that pass while the risky branch remains broken. Please add tests for this. Required: add a guard test where permissions is null and the user is not an org admin; expected result is 403, not a thrown exception. This should fail if the null branch bypasses the guard again. Risk The auth guard can throw or bypass when permissions are null. The risk tells the author which behavior matters.…
5 minRewrite a Harsh CommentA reviewer wants to say “This abstraction is bad” on a notification PR. Label intent → name code behavior → explain impact → offer next move. The common shortcut is to publish the conclusion without the evidence. The author hears judgment, not a fixable technical concern. Before This abstraction is bad. Please clean it up. After Required: NotificationDispatcher now owns template selection, vendor payloads, and retry state. That couples three reasons to change, so adding push notifications will touch this class again. Can we move vendor formatting behind channel adapters before merge? 1. Label Choose “Required” because the abstraction creates…
5 minWrite the PR Description Reviewers NeedA PR description says only “fix invoice export.” Context → change → risk → verification. A thin description shifts discovery work to the reviewer and increases the chance that comments focus on visible details instead of intended behavior. fix invoice export Problem: invoice exports dropped annual-plan discounts. Change: centralizes discount calculation in InvoiceTotals and updates CSV export. Risk: tax-inclusive plans and legacy annual discounts. Verified: unit tests for monthly, annual, and tax-inclusive exports plus manual CSV check for org 4812. Context State the user-visible problem: annual discounts disappear in CSV export. Reviewers now know what behavior the code must repair.…
5 minWorked Walkthrough: From Repo Findings To A Safe PlanCodex inspected a flaky upload test and suggested touching the spec, the upload helper, a timeout constant, and an analytics hook. Root cause -> Minimal files -> Verification Discovery output often contains adjacent files that are plausible but not yet justified. If you execute the whole list, the diff grows faster than your certainty. Keep only root-cause files Retain the spec and upload helper because both map directly to the reproduced failure path. Each kept file must connect to the bug narrative, not just live nearby in the codebase. Reject weakly justified neighbors Drop the timeout constant and analytics hook…
5 minWorked Walkthrough: Build A PR Story From The DiffYou have a finished branch that changes a shared serializer, one checkout page, and two regression tests. Problem -> Fix -> Scope -> Proof If the PR description only lists files or implementation details, reviewers have to reverse-engineer why the shared helper and downstream page both belong in the same branch. State the problem Open with the duplicated line-item bug that customers saw during checkout retries. A reviewer should know what behavior changed before they see any file names. Name the chosen fix and scope boundary Explain that the serializer owns the retry contract, the page update follows that contract,…
5 minWorked Walkthrough: Turn A Vague Request Into A Codex BriefA teammate asks, “Please clean up login and make the tests stop failing.” Objective -> Constraints -> Evidence -> Verification Vague prompts make Codex decide scope and success criteria on its own, which is how cleanup requests balloon into multi-file rewrites. Objective Replace “clean up login” with “stabilize the flaky login redirect test in apps/web.” The objective names one behavior and one surface area, which keeps the run anchored to a measurable outcome. Constraints Add “preserve the current auth session contract and do not broaden beyond login redirect behavior.” Constraints stop helpful-looking edits from expanding into unrelated auth redesign. Evidence…
5 minPin a Bug with One TestA reset token can be used twice when two requests arrive close together. Regression test: reproduce the bug, pin the rule, patch the cause, keep the proof. The common shortcut is patching the visible line and relying on manual retesting, which forgets the concurrency lesson. State the rule A reset token may be consumed successfully once and must fail on the second use. The rule is smaller than the whole password-reset journey. Write the failing test Create a token, call the consume operation twice, assert success then rejection. The test fails because current behavior allows double use. Patch the cause…
5 minReplace Repeated Search with a MapOrders repeatedly scan the full customer list to attach customer details. Index once, then look up by key. The shortcut is assuming readable nested code is harmless because the staging sample is small. Find the repeated question For every order, the code asks: which customer has this customerId? Repeated identical questions are candidates for an index. Build the lookup once Create customersById = new Map(customers.map(c => [c.id, c])) before processing orders. One pass organizes the data for cheap retrieval. Replace scan with get For each order, call customersById.get(order.customerId) and handle missing customers explicitly. The lookup is fast and the missing-key…
5 minTurn Nesting into Guard ClausesA return-eligibility function hides the normal path under five nested conditionals. Guard clauses: handle disqualifying cases early, then leave the main path flat. The common shortcut is adding the new exception inside the deepest block, which makes every future rule harder to locate and reason about. Map outcomes List each current result: missing receipt, expired window, final-sale item, fraud hold, returnable. You cannot preserve behavior you have not named. Outcome mapping turns a tangle into a checklist. Move one guard Return early for missing receipt with the same reason code the nested branch already produced. A single guard clause should…
5 minBuild the First Cohort TableA team needs to analyze basic cohort-table construction, but the first draft uses a blended average and an unclear denominator. Build from decision to cohort start, cohort age, stable denominator, and next action. The common trap is changing the denominator or choosing a start event before users are eligible for the measured behavior. 1 Write the decision in one sentence. This prevents the chart from becoming decorative. 2 Choose the shared start event and assign every member to a cohort row. The start event creates the clock. 3 Compute cohort age and count the outcome at each age. Age columns…
5 minDiagnose Simpson’s Paradox in RetentionA team needs to analyze mix-shift diagnosis, but the first draft uses a blended average and an unclear denominator. Build from decision to cohort start, cohort age, stable denominator, and next action. The common trap is changing the denominator or choosing a start event before users are eligible for the measured behavior. 1 Write the decision in one sentence. This prevents the chart from becoming decorative. 2 Choose the shared start event and assign every member to a cohort row. The start event creates the clock. 3 Compute cohort age and count the outcome at each age. Age columns make…
5 minFrom Cohort Insight to ExperimentA team needs to analyze next-cohort experiment design, but the first draft uses a blended average and an unclear denominator. Build from decision to cohort start, cohort age, stable denominator, and next action. The common trap is changing the denominator or choosing a start event before users are eligible for the measured behavior. 1 Write the decision in one sentence. This prevents the chart from becoming decorative. 2 Choose the shared start event and assign every member to a cohort row. The start event creates the clock. 3 Compute cohort age and count the outcome at each age. Age columns…
5 minMake a Backup You Can Actually Restorestep trail before-after panel now-you-try card Keisha must edit app.conf for a workshop demo, but she needs a rollback path if the app fails to start. INSPECT -> COPY -> VERIFY -> EDIT -> TEST -> RESTORE READY The common shortcut is cp app.conf app.conf.bak without checking it. On the second attempt, that can overwrite the only known-good backup. Inspect Run pwd and ls -lh app.conf before changing anything. This confirms location, file name, and plausible file size before the backup. Copy Run cp app.conf app.conf.2026-06-25-0855.bak. A timestamped backup avoids clobbering earlier backups and makes the restore point identifiable. Verify…
5 minCount What Matters in a Text Filestep trail before-after panel now-you-try card Tariq needs the top repeated error codes from a 9,000-line support export. FILTER -> EXTRACT -> SORT -> COUNT -> RANK The common trap is running uniq -c on unsorted data and trusting the result. uniq counts adjacent repeats, not all repeats across the file. Filter Run grep -F "ERROR_CODE=" support.log | head. Prove the relevant lines exist and sample their format before extracting fields. Extract Use a field extractor such as awk to isolate the code value. If extra text remains, the count will split identical codes into false variants. Sort Pipe the…
5 minFind Large Files Without Wandering the Filesystemstep trail before-after panel now-you-try card Nadia needs to identify large build artifacts on a nearly full build machine without touching system files or deleting critical data. SCOPE -> DISCOVER -> SIZE -> SORT -> CONFIRM -> CLEAN The common trap is starting at / or deleting the largest file immediately. That mixes discovery with destructive action and ignores ownership. Scope Start in /builds/project-a, not the filesystem root. The starting point is the biggest safety control and avoids irrelevant permission errors. Discover Run find . -type f -size +500M -print. This is read-only discovery. It returns candidates, not delete permission.…
5 minWorked Walkthrough: Calculate the Real Liability CapA $480,000 annual SaaS contract is paid upfront. The cap is 'fees paid in the six months before the event giving rise to the claim.' A security incident occurs in month 10. Cap math: fee base -> time window -> carveouts -> exclusions The common shortcut is to read 'six months' as half the annual value. The clause says fees paid in the prior six months, which can be very different from fees attributable to that period. Fee base Identify whether the cap uses fees paid, fees payable, subscription value, affected order fees, or all amounts under the agreement. The…
5 minWorked Walkthrough: Turn Preference Comments Into Risk CommentsA comment says 'We do not like this clause' beside a one-way confidentiality provision. Risk comment: principle -> business risk -> fallback The common trap is treating comments as internal notes. In negotiation, comments are messages to the other side. Thin comments create delay because they do not explain the change. Principle Name the legal or business principle: confidentiality should be mutual when both sides disclose protected information. Principle prevents the comment from sounding like taste or policy. Business risk Name what could be exposed: roadmap, pricing, implementation details, and customer data. Concrete information categories make the risk real to…
5 minWorked Walkthrough: Rewrite Vague AcceptanceA SOW says deliverables are deemed accepted upon delivery, but the customer needs a real review and the vendor needs review to end. Acceptance rewrite: criteria -> review window -> specific rejection -> cure and re-review The trap is replacing automatic acceptance with open-ended approval. That solves the customer's problem by creating a vendor problem: payment and completion can be delayed indefinitely. Criteria Tie acceptance to Exhibit A, documented requirements, or agreed specifications. Objective criteria prevent 'I do not like it' from becoming a rejection standard. Window Add a defined review period, such as five business days after delivery. The…
5 minBuild the One-Page RecommendationThe team must turn one-page client recommendation into a recommendation the client can approve without reading the appendix first. Client question -> answer -> MECE reasons -> proof -> ask The common shortcut is to polish the wording before the logic is stable. That creates sentences that sound executive but collapse under the first client question. Another trap is to include every finding because the team worked hard for it. Consulting communication requires selection: evidence earns a place only when it helps the client decide, trust, or act. 1. Name the decision Write the client decision as a question: Should…
5 minRewrite the Vague Status UpdateThe team must turn status-to-decision rewrite into a recommendation the client can approve without reading the appendix first. Client question -> answer -> MECE reasons -> proof -> ask The common shortcut is to polish the wording before the logic is stable. That creates sentences that sound executive but collapse under the first client question. Another trap is to include every finding because the team worked hard for it. Consulting communication requires selection: evidence earns a place only when it helps the client decide, trust, or act. 1. Name the decision Write the client decision as a question: Should we…
5 min