In our Culture and Methodologies category, dive into Agile, career development, team management, and methodologies such as Waterfall, Lean, and Kanban. Whether you're looking for tips on how to integrate Scrum theory into your team's Agile practices or you need help prepping for your next interview, our resources can help set you up for success.
The Agile methodology is a project management approach that breaks larger projects into several phases. It is a process of planning, executing, and evaluating with stakeholders. Our resources provide information on processes and tools, documentation, customer collaboration, and adjustments to make when planning meetings.
There are several paths to starting a career in software development, including the more non-traditional routes that are now more accessible than ever. Whether you're interested in front-end, back-end, or full-stack development, we offer more than 10,000 resources that can help you grow your current career or *develop* a new one.
Agile, Waterfall, and Lean are just a few of the project-centric methodologies for software development that you'll find in this Zone. Whether your team is focused on goals like achieving greater speed, having well-defined project scopes, or using fewer resources, the approach you adopt will offer clear guidelines to help structure your team's work. In this Zone, you'll find resources on user stories, implementation examples, and more to help you decide which methodology is the best fit and apply it in your development practices.
Development team management involves a combination of technical leadership, project management, and the ability to grow and nurture a team. These skills have never been more important, especially with the rise of remote work both across industries and around the world. The ability to delegate decision-making is key to team engagement. Review our inventory of tutorials, interviews, and first-hand accounts of improving the team dynamic.
Staff Engineers in the Age of AI: Rethinking Technical Leadership
Seven AI Adoption Failures and How to Overcome Them
It’s 3:00 a.m. on a Saturday. An alert fires. Someone on call wakes up, logs into four tools, and starts piecing together what changed, what broke, and whether the two are related. An hour later they have a hypothesis. Two hours later they have a fix. That workflow hasn’t changed much in a decade. What has changed is the volume of code and telemetry it has to cover. At Elastic, code creation from engineers and their agentic assistants grew five times between January and April 2026. More code means more services, more deployments, more failure modes, and more telemetry than the people watching it can read. Site reliability engineers (SREs) now spend about 30% of their time on operational work that isn’t engineering at all. This is where an AI SRE can help alleviate the burden on the human SRE. Let’s explore what that looks like in practice. What an AI SRE Does (and Doesn’t Do) An AI SRE isn’t a chatbot that answers questions. It’s an agent that takes an alert, analyzes it, and can act upon it. In increasing order of capability, it can: Detect and alert by monitoring logs, metrics, and traces for anomaliesGather context by pulling together telemetry, service topology, and recent deployments before an SRE looks at anythingDiagnose by forming hypotheses and testing them against the telemetryAct by executing a fix within boundaries an SRE defines The practical payoff of levels 2 and 3 is that when the 3:00 a.m. alert fires, the agent starts investigating immediately. By the time a human is paged, there’s already a timeline, a likely cause, and the supporting evidence. In pilots surveyed, teams saw roughly a 30% reduction in time to resolution with an AI SRE involved, and about 60% of SREs said they were optimistic about having their role augmented this way.1 Watch video 1: The advent of the AI SRE and machine-speed observability Step 1: Ensure Data Quality Before You Implement an AI SRE AI SREs can only correlate telemetry that lines up. Consistent schemas and structures across logs, metrics, and traces are what make end-to-end reasoning possible. Two things matter most here: 1. Consistent schemas across signals: OpenTelemetry (OTel), the open standard for collecting logs, metrics, and traces, gives you shared semantic conventions: the same service names, resource attributes, and trace context everywhere. That shared vocabulary is what makes end-to-end reasoning possible. OTel-native instrumentation also keeps your telemetry portable, so you’re not locked to one back end. 2. Keep every signal: Sampling away 90% of your metrics to control costs creates a gap in tomorrow’s investigation. An agent can’t follow data you dropped. Choose a datastore that doesn’t force that tradeoff. Beyond the raw data, think about context engineering. The model doesn’t ship with knowledge of your infrastructure, incident history, or runbooks. That has to be assembled and delivered in a form it can use: unified and indexed data, a retrieval layer that returns the right evidence (hybrid keyword and vector search tends to beat either alone), structured tools and schemas the agent understands, memory that carries state across a workflow, and precomputed context so the agent reasons on facts instead of a wall of text at query time. Step 2: Find Yourself on the Maturity Curve Most teams don’t need to jump straight to autonomous remediation. The curve looks like this, with the degree of automation rising alongside the risk of an inaccurate decision: Manual queries: You write queries, read dashboards, and conduct root cause analysis without AI assistance.Natural language Q&A: You ask questions in plain English instead of a query language.Conversational AI: A large language model (LLM)-backed assistant investigates with you.Agentic AI: Agents use tools, build memory, invoke skills, and coordinate in multi-agent workflows.AI SRE: An agent can independently investigate and learn, and it has autonomy to act. To move right along the curve, add capabilities in this order: Composable skills: Package a workflow, such as investigating a latency spike or checking SLO status, so any agent can invoke it when an alert triggers.Tools and functions: Give the agent specific, limited actions it can call.MCP servers: Model Context Protocol (MCP) is an open standard for connecting AI systems to external tools and data. It’s how an agent triggers a runbook or reaches into another system without a custom integration for each one.Broader permissions: Host access to pull telemetry, query logs, and eventually execute scripts. The guiding rule: The agent is only as good as the ground it stands on. Get the data foundation right first, and each stage of the curve opens up. Watch video 2: How to prepare for AI SREs Step 3: Deploy It Like Production Code, Not a Plugin LLMs produce probabilistic outputs. Treating an AI SRE like a standard application is how you end up with an agent restarting the wrong service. A safe rollout looks like this: Define the operational boundary first: Apply least privilege. An agent that analyzes latency doesn’t need write access to your orchestration tools.Build a golden dataset: Run historical, resolved incidents through the agent and check whether it reaches the known root cause. That’s your accuracy baseline before live data ever touches it.Red-team it: Try prompt injection. Try to get it to expose PII from logs or run unauthorized commands.Shadow mode: Run the agent alongside live operations, log its recommendations, and compare them against what your humans did.Coworker mode: Let it surface findings and draft RCAs, but require explicit human approval before any action.Graded autonomy: Remove the human from the loop only for specific, reversible, low-risk actions, such as restarting a non-critical service on an SLO breach, with automated validation that the fix worked. Step 4: Improve It With Every Incident An agent you install and walk away from stagnates. The ones that sharpen are treated like junior engineers: They get feedback, they follow a method, and they remember. Human feedback after every incident: When the agent’s hypothesis was wrong, say so. Over time, that feedback shapes how it investigates in your environment specifically. Decision trees: Give the agent a sequential process: Was there a recent deployment? A dependency failure? Resource saturation? Ruling out causes in order, rather than evaluating everything at once, mirrors how experienced engineers reason. It also produces an auditable path, since every branch the agent took is recorded and reviewable. Knowledge graphs: Signals alone don’t explain anything. A graph that captures how services, dependencies, deployments, runbooks, and past incidents relate gives the agent persistent context, so it can explain why something failed given everything around it, not just that it failed. One more thing. An agent that learns is an agent that changes, and its behavior in production will drift from what you tested in staging. Monitor the AI SRE with LLM observability as closely as it monitors your systems: Log every prompt, retrieval, and tool call, and track hallucination rates and prompt drift alongside latency and token spend. Watch video 3: Improving AI SREs over time Where to Start If you take one thing from this: Don’t start with the agent. Start with correlated, consistent, complete telemetry. Then pick a point on the maturity curve one step ahead of where you are, deploy in shadow mode, and build the feedback loop before you grant any autonomy. For a full map of sequencing that investment, including a 10-step production playbook and the four dimensions of LLM observability, see the guide Transforming observability with agentic AI and the autonomous AI SRE.
I spent six months replacing my own daily admin work with a small fleet of AI agents instead of writing about them. Three run in steady state; a fourth spins up on demand. Between them, they touch email, calendar, Slack, GitHub, a dozen SaaS APIs, a stack of PDFs, and a SQLite database I keep refusing to migrate. This is a field report on the engineering, written for the people who will actually have to build and operate this in production. The headline finding, for an audience of architects and engineers, is simple: the model is the cheap part. The work is everything downstream of it, and it looks far more like site reliability engineering than like AI research. The Model Stopped Being the Bottleneck I run roughly 600 euros a month across frontier models plus the agent layer. Adding another agent is a rounding error. I route most traffic to one provider and fall back to another on a bad day. By month two, the model was picking up context, calling tools, summarizing documents, and writing code well enough that it was no longer the limiting factor for anything I shipped. Model choice became an implementation detail behind an interface, the way you would treat any swappable dependency. That reframes the whole problem. If the model is a commodity capability behind a clean boundary, then the value and the risk both live in the system around it. The Seven Concerns That Are Actually Hard When I add a new agent, here is what I spend my time on. None of the frameworks I tried handle these to a production standard, so treat this as the reference architecture you build first. 1. Identity and least-privilege secrets. Every agent gets credentials scoped to exactly what it touches. If the email agent is compromised, the blast radius must stop there. This is standard service-account hygiene, applied per agent. 2. State management. Agents need durable, structured memory across days and weeks, not vector search over chat history. The real shape is operational state: the 18 active negotiations and their status, the document approved last Thursday, the record that changed on Monday. Building that was about 70 percent of the total work and broke most often. Model it like a domain database, not a transcript. 3. Write paths with safety. Read-only agents are toys. The moment an agent can mutate the outside world, you need idempotency keys, audit trails, rollback, and confirmation loops. These are the same primitives you would demand of any service that writes to production. The model does not give them to you. 4. Rate limiting and backoff against external tools. Not the model's rate limit. The downstream API's limit, including the 429 that gets returned as a body the model then happily parses as a success. Wrap every tool with explicit backoff and treat partial failures as first-class. 5. Retries with resumable state. If an agent fails on step 14 of a 20-step plan, it should resume, not restart. This is the durable-execution problem. A multi-step agent run is a workflow with checkpoints, not a single call. The pattern you want is closer to Temporal than to a request handler. 6. Observability with agent semantics. For every run, I capture the input, the model output, which tools were called, what they returned, and the final action. Stored, queryable, grep-able. Standard trace spans are not enough. You want to answer "which tool did the agent pick, and what did it expect to happen next?" 7. Escalation and kill switches. Every agent has an explicit "when to ask the human" rule and a channel to ask on. If I do not answer within two minutes, it stops and waits. And every agent has a literal off switch, not "redeploy after a fix." Cost and Prompt Drift Are Operational Risks, Not Setup Tasks Two failure modes deserve their own monitoring. Cost does not creep; it spikes. An agent running at 2 euros a day becomes 40 euros a day because it started looping on a tool error and nobody noticed. I run a daily digest of tokens per agent per task. Without it, I would be staring at a five-figure bill. Budget caps per agent, per task, per day, with auto-throttle on runaway loops, belong in your platform layer. Prompts rot. A prompt that was perfect at launch degrades over weeks as the model updates, the data shape shifts, or the task drifts into edges it never handled. I version every prompt and diff outputs on a sample set weekly. Treat prompts like code under test, or pay for treating them like stale documentation. Input is hostile. A document arrived last month with a prompt injection buried in the line items, instructing my agent to forward a contract to an external address. A paranoid parser caught it. Treat every external input as untrusted user input, because it is. The Build Order That Works Do not start with a framework. Start with the smallest, most annoying daily task that has a clean input and a clean output. Write a 60-line script. Plug a model into it. Watch it fail. Fix the failures. Only after you have shipped three of those and run them for a month without intervention should you reach for abstractions. The teams I see succeeding work this way. The teams that picked a framework first and went looking for a task are mostly still searching. The payoff is a compounding curve. Once the glue exists, each new agent is cheaper than the last. My first took three weeks. My fourth took two hours. If you remember one thing: "agentic" is much closer to a well-instrumented, long-running background job than to anything futuristic. Build the SRE layer first. The prompt is the last 20 percent. This piece is adapted from an essay first published at https://idofishman.ai/writing/agent-stack-six-months.
I’ve used AppScan across two roles and three products. The first time, I treated the report as gospel and spent three weeks chasing findings that turned out to be artifacts of how the scanner authenticated. The second time, I knew what to throw out and what to keep, and the same scan generated about a third of the work. The difference wasn’t the tool. The difference was knowing what AppScan is good at, what it isn’t good at, and where the noise lives. This article is the practical version of my experience: how you can configure SAST and DAST scans against a real application; how you can read the output without drowning; and how you can build a remediation cadence that the dev team will actually follow rather than passively resist. What AppScan Is, and What To Use It For IBM AppScan is two distinct products: AppScan Source is the SAST product: it analyzes source code or compiled bytecode and finds taint paths, insecure API calls, hardcoded secrets, and similar static-discoverable patterns. AppScan Standard (and the cloud equivalent, HCL AppScan) is the DAST product: it crawls a running application, generates traffic, and finds vulnerabilities the application exposes at runtime. You want both because they find different things. SAST catches issues that exist in code paths even if they’re not currently reachable. DAST catches issues that depend on runtime configuration, deployed environment, and the actual request the application receives. The Venn diagram has overlap, but neither replaces the other. The version skew matters. AppScan Source 9.0.x is what most enterprises were on through the late 2010s, and a lot of the documentation you find online is for that version. Newer versions (10.x onward — as HCL AppScan, after the IBM-to-HCL transition) cleaned up the false-positive rate on a lot of Java framework patterns but introduced new ones around modern frontend toolchains. If you’re standing this up fresh, ask your tooling team what version is available before you read documentation. Configuring a SAST Scan The thing that took me the longest to get right with AppScan Source was the call graph configuration for our DAO layer. Out of the box, the scanner was reporting SQL injection on every database call because it didn’t recognize our wrapper class as a sanitizer. The taint was flowing from request through service through DAO, and the scanner saw the final executeQuerycall without seeing the parameter binding that happened two methods upstream. The fix was a custom rule that taught the scanner that our DAO’s bindParametermethod was a sink terminator. After that, the false positive count on injection findings dropped by about 70% The general workflow uses the AppScan Source CLI (appscansrcclion Linux/macOS, AppScanSrcCli.exe on Windows). The typical command sequence is to create an application configuration, add the source roots, run the scan, and produce a report — exact flags vary by version, so check appscansrcclihelp for the version you have installed. What the documentation doesn’t always emphasize: the source configuration needs to include all dependencies that contribute to the call graph. If you only point at your application source, the scanner won’t see the framework code, won’t recognize Spring Security filters, won’t trace the authentication chain, and will report a forest of false positives on the assumption that nothing is sanitized. For Maven projects, the right pattern is to copy dependency JARs into a directory and add that directory to the scan configuration: Shell mvn dependency:copy-dependencies -DoutputDirectory=./deps # Then add ./deps to the AppScan Source configuration # (via the CLI's add-jars option, or via the GUI Properties view) The dependency JARs go into the analysis. The scanner doesn’t run rules against them, but it uses them to build the call graph correctly. Configuring a DAST Scan DAST is where the noise really starts. AppScan Standard sends real HTTP traffic to the application. It’s going to find things the SAST scanner can’t (broken access control between roles, session fixation, or certain XSS variants that depend on response headers), and it’s also going to find things that aren’t real because the test environment behaves differently from production. The first thing to configure is authentication. If AppScan is scanning unauthenticated, it’s only seeing a fraction of the surface. There are three patterns: Recorded login. Use the AppScan browser extension to record a login flow. The scanner replays it before each scan iteration. This works for most form-based logins but breaks on SSO with redirects to external identity providers.Token authentication. Configure a custom HTTP header with a static token. Easy and useful for API-only scans. The token will eventually expire, so build that into your pipeline.OAuth flow. Configure the scanner to perform the OAuth handshake and use the resulting access token. AppScan supports this in 10.x natively; in 9.x it requires scripting. The failure that ate three weeks wasn’t a scan misconfiguration; it was the application doing exactly what it was designed to do. For security reasons, the app rotated the session cookie on every state-changing request. AppScan's recorded-login replay held on to the cookie it captured at login time and kept presenting it on every subsequent request. Once the app rotated the cookie out, the scanner got redirected to the login page and treated that redirect as a new, undiscovered part of the application. It re-ran the recorded login, grabbed a fresh cookie, made a handful of requests, hit another rotation, and looped again. Crawl time ballooned, and the report came back full of what looked like broken-access-control findings that were just repeated login-page captures mislabeled as app content. The fix was a custom cookie-refresh script AppScan could invoke mid-scan, rather than relying on the one-time recorded replay. The crawl configuration matters more than people think. By default, the scanner will follow every link, fill every form, and submit every action. If your application has destructive operations (delete user, cancel order), the scanner will exercise them. You should configure the exclusions before the first run. Reading the Output Without Drowning This is the part that most teams get wrong. AppScan SAST reports for a moderately-sized Java application typically generate between 200 and 2,000 findings on the first scan. If you assign all of them to the development team, the program dies before week two. The triage I run has three phases: Phase one: trust filter. Group the findings by rule. Look at the top five rules by count. For each one, sample five findings. Are they real? If the rule has more than fifty findings and they’re all the same false positive pattern, write a custom suppression rule before assigning anything. This is the most useful hour you’ll spend in the entire program.Phase two: severity by data sensitivity, not by CVSS. AppScan assigns severity. The severity is based on the technical category (high for SQL injection, medium for information disclosure, etc.). What it doesn’t know is what data your application handles. A SQL injection in your read-only marketing site is a different problem from a SQL injection in the patient record service. Re-rank findings against your application’s data classification before you assign them. I categorized one endpoint's findings as lower priority because no individual field in the response was sensitive on its own. Name, zip code, and date of birth each looked harmless in isolation, and with AppScan's severity scoring, like most scanners, it rates fields independently rather than in combination. The privacy officer flagged it during review. Together, those three fields formed a re-identifiable record — which under HIPAA counted as PHI — even though nothing in the response was a “sensitive field” by any scanner's definition. The endpoint got re-ranked from informational to a real finding, and it reset how I triaged everything after. Technical severity tells you how easy something is to exploit, not what happens once someone does. The second question is a data classification exercise, not a scanner output. Phase three: assignment with context. Each finding that survives the first two phases gets assigned to a specific developer with the file, line, rule explanation, and a suggested fix. Generic “assigned to the team” tickets get ignored. Specific “assigned to you, line 47, here’s what to change” tickets get fixed. Building the Remediation Cadence Here’s where the program lives or dies. This is the schedule I used: Weekly security triage meeting. Thirty minutes, with one engineer from each team and the security lead. Walk through the new findings from the prior week’s scans. Triage as a group. Anything tagged for assignment gets a ticket created in the meeting.Monthly remediation review. Look at the open findings. What’s been fixed, what’s been suppressed with justification, what’s been pushed past the SLA. The pushed-past-the-SLA findings are the ones that need attention. Either the fix is genuinely hard, the assigned developer is overloaded, or the finding turned out to be invalid, and nobody updated the status.Quarterly trend review. Meet with engineering leadership. Show the burndown, the new findings rate, and the mean time to remediation. Three numbers. Don’t show them ten metrics. They’ll pick the wrong one, and the program will reorient around the wrong incentive. The mistake I’ve seen kill more security programs than any other: trying to enforce a fix-everything-now policy on the existing backlog. This doesn’t work. The team revolts. What works is enforcing zero-new-findings on critical-severity issues going forward, while the existing backlog drains at a sustainable rate. SLA Structure That Works This is the SLA structure I used: Blocker/critical findings: 14 days to resolution or risk acceptanceHigh findings: 30 daysMedium findings: 90 daysLow/informational: best-effort, tracked but not SLA’d The risk acceptance path matters. Some findings genuinely don’t need to be fixed (the affected code path is unreachable, the data is already public, or the threat model excludes the actor). Risk acceptance with sign-off from the engineering manager is the alternative to rushed fixes that introduce new bugs. What doesn’t work: an across-the-board “all findings within 30 days” policy which treats unequal things equally. This policy generates resentment when the team has to fix a low-severity issue while a Blocker sits open. False-Positive Rate as Leading Indicator If your false-positive rate on AppScan SAST is over 40%, your custom rules are insufficient. The fix is investing in custom rule development through the Pattern Rule Library and Custom Rules wizard. It’s an investment with real payoff: every false-positive class you suppress with a custom rule reduces noise on every future scan. If your false-positive rate on AppScan DAST is over 20%, your scan configuration is the issue. Usually, it’s the authentication state going stale mid-scan, or a test environment that behaves differently from production, which the scanner interprets as vulnerabilities. The false-positive class that ate the most cycles was hardcoded credentials in test fixtures and mock objects — code that never shipped to production but sat inside the same source tree AppScan was scanning. The first suppression attempt excluded the entire test directory by path, which worked until a developer added a mock config file one level up, outside the excluded path, and the findings came back. The second attempt tried to match on file naming convention instead (anything with “Mock” or “Fixture” in the name), but that missed a batch of test helpers that didn’t follow the convention and let real findings slip past unflagged in the other direction. A suppression rule that's too loose is worse than no rule, because it hides things silently. The third rule combined both signals: path pattern and a check that the file wasn’t referenced from any non-test source root in the call graph. That’s the version that held. What AppScan Doesn’t Do These are what AppScan SAST and DAST do not catch: Authentication and authorization logic flaws beyond the simple cases. If your authorization is “any authenticated user can access this endpoint” when it should be “only the owning user,” neither tool will find it. This is a code review and threat modeling responsibility.Business logic vulnerabilities. The scanner doesn’t know what your application is supposed to do.Race conditions in security-critical code. Mostly invisible to static analysis, partially visible to DAST if you’re lucky, and the timing happens to land.Vulnerabilities in client-side JavaScript that depends on dynamic configuration loaded at runtime. This is the right way to think about AppScan: it’s the broad coverage layer. It catches the patterns that scanner-detectable rules can describe. Above it, you need code review for logic flaws, threat modeling for design issues, dependency scanning for third-party CVEs, and penetration testing for the things only humans find. Getting Started If you’re trying this for the first time, here's my suggested order: Run an unauthenticated SAST scan against your largest service. Don’t act on the findings yet. Just look at the false positive rate by rule.Write the top three custom suppression rules. Re-run the scan.Configure DAST against a non-production environment. Get authentication working. Run a full crawl.Compare findings between SAST and DAST. The overlap shows you what’s reachable and exploitable. The gaps show you what each tool is finding that the other isn’t.After two cycles, integrate into the CI/CD pipeline. Use SAST on every PR, DAST on every release branch. The pipeline integration is what makes the program sustainable. Manual scans get skipped. Automated scans run regardless. The findings flow into the same triage process either way. What I’d avoid in the first six months: trying to make AppScan the only security tool in the program. It’s part of a stack. The stack works. The single tool doesn’t.
Introduction If you need to scrape a few thousand job postings from a careers page, one way to do it is by using a for loop, one request after another: Python import requests def scrape_all(urls): pages = [] for url in urls: response = requests.get(url) # blocks here until the page comes back pages.append(response.text) return pages (The real scraper uses a headless browser rather than requests, but the shape is identical.) This works, but it's slow. For example, if a page takes two seconds to come back, then 1500 pages will take 3000 seconds (50 minutes). Most of that time is spent not computing anything. The program is sitting around waiting for responses to cross the network. While it waits on page 1, it can't even ask for page 2. Python has more than one answer to "how do I stop wasting that wait?". The first is concurrency, while the second is parallelism. Concurrency vs Parallelism The analogy that explains the difference is when you have two YouTube videos open in two browser tabs, and both are buffering. Concurrency is watching tab 1, having it stall to buffer, switching to tab 2 while tab 1 catches up, then switching back once tab 1 is ready. You're still only watching one video at any given instant, but nothing sits idle for long, and the moment one thing is blocked, your attention moves to whatever isn't.Parallelism is watching both videos at the same time, side by side, with two separate screens and two separate sets of eyes. No switching and no waiting on one for the other. They're happening simultaneously. Concurrency is about overlapping waiting, and it works even on a single CPU core. Most of that "watching" time is actually idle time. Parallelism is about overlapping working, and it requires multiple CPU cores doing computation at the same moment. You can't parallelize your way out of a slow network connection, but you should be able to get better at not wasting the wait. That maps directly onto the two categories of workload: CPU-bound work (image processing, number crunching, data transformation) is limited by how fast the processor can compute. This is where parallelism helps since what you need are more cores, more simultaneous computation. Python's tool for this is the multiprocessing module. It sidesteps the GIL by running separate processes with separate interpreters.I/O-bound work (network requests, waiting on an LLM API, database queries) is limited by how long you sit around waiting for something external to respond. This is where concurrency helps because while one request is "buffering," you can be making progress on another. There are two different tools for working with concurrency. The first is called threading, while the second is called asyncio. Why Async Fits I/O This article is about asyncio. It uses cooperative, single-threaded concurrency. In this case, your code explicitly says "I'm waiting, someone else can go now" via await, instead of the OS pre-emptively switching between threads for you. For a scraper, asyncio is a better fit because you are short on patience while 1,500 HTTP requests are all "buffering" at once. asyncio lets a single thread juggle thousands of these waiting operations concurrently. While one task waits for a response from OpenAI, another can wait for a Playwright page load. Neither is burning CPU time while it waits, since it's just parked, and the event loop wakes up the thread the moment its data arrives. Nothing is happening in parallel because there's still only one thread, but most of the waiting is not wasted. This article explains asyncio's concurrency primitives by building a real scraper. Given a company's careers page, it: Loads the page and collects the URL of every job posting. For each of those URLs, loads the posting and asks OpenAI to pull out structured fields. Step 2 is where all the waiting happens. The reason is that it's the same two slow operations repeated for every URL. These two are the only pieces of the scraper you need to know about: Python async def scrape_webpage(url: str) -> list[str]: """Loads a page in a headless browser (Playwright) and returns its rendered HTML.""" async def extract_job_information(html_document: str, apply_url: str) -> dict: """Sends the page text to OpenAI and returns structured fields.""" A call to the second one returns a dictshaped like this: Python { "job_title": "Senior Data Engineer", "company_name": "Example Corp", "location": "Remote - US", "commitment": "full-time", "seniority_level": "Senior Level", "job_description": "We're looking for ...", "apply_url": "https://example.wd5.myworkdayjobs.com/...", } This article explains how to run 1,500 job URLs effectively. Python async def process(urls: list[str]) -> list[dict]: ... # scrape and extract every URL, in whatever way this strategy chooses The Basics There are three concepts to understand. There are coroutines (async def and await), the event loop, and the difference between await and asyncio.create_task(). The examples below use asyncio.sleep() to stand in for a network request. They run as-is. You can paste them into a file and try them. After each one, we'll connect it to a real scraper. Coroutines: async def and await Python import asyncio async def fetch(name, seconds): print(f"{name}: start") await asyncio.sleep(seconds) # stands in for a network request print(f"{name}: done") return name Three rules cover almost everything you'll run into: 1. async def defines a coroutine function. It looks like a normal function, but it's allowed to pause partway through. 2. Calling it does not run it. You get back a coroutine object. Python print(fetch("a", 1)) # <coroutine object fetch at 0x7f8c358a39f0> # RuntimeWarning: coroutine 'fetch' was never awaited You can see that a: start never printed. The warning "was never awaited" means you called the function and forgot to await it, so nothing ran. 3. await runs a coroutine and gives you its result. It can only be used inside another async def. asyncio.run()starts the whole chain from regular code. Python asyncio.run(fetch("a", 1)) # a: start # a: done await does two jobs at once. First, it runs the coroutine and hands back the return value, like a normal function call. Second, it marks a point where this function is willing to pause: "I'm waiting on something slow, so someone else can run while I wait". That second job is the entire reason asyncio exists. The scraper is built from exactly this. The two awaits are the pause points. The first awaitloads the page while the second await calls the API. Python async def _scrape_and_extract(url: str) -> dict: documents = await scrape_webpage(url) html = remove_html_tags(documents[0]) return await extract_job_information(html_document=html, apply_url=url) The scrape_webpage returns a list because it can also follow pagination, and a single job posting is one page; hence documents[0]. And remove_html_tags is an ordinary, non-async helper that strips the markup so the model sees plain text. It has nothing to do with concurrency, so you can ignore it from here on. The Event Loop: Who Decides What Runs When a function pauses at an await, "someone else can run" needs an event loop. From the browser tabs analogy earlier, the event loop is you. Each coroutine is a tab. An await is the moment a tab starts buffering, and the event loop is what notices and flips to a tab that's ready. The event loop keeps track of which tasks are ready to run and which are waiting on something (a response, a timer). It runs one ready task until that task hits an await on something that isn't finished yet, sets it aside, and picks the next ready one. When whatever it was waiting for completes, the task goes back on the ready list. All of this happens on a single thread. Only one piece of your code is running at any instant. Concurrency comes from the waiting overlapping, not from the code running simultaneously. There are two things to consider: Switching only happens at an await. Nothing interrupts a task midway. So if a coroutine calls something slow without awaiting it (e.g., time.sleep(2) or requests.get(url)), the loop can't switch away, and every other task pauses until that call returns. Inside async code you use await asyncio.sleep(2) and async APIs (Playwright's async API, LangChain's ainvoke) instead of their blocking equivalents. This is why the scraper uses async_playwright rather than a plain HTTP library.You rarely create the loop yourself.asyncio.run() creates one for a script. In a FastAPI app like this one, uvicorn creates it and runs every request handler as a task on it. await vs. asyncio.create_task(): Sequential vs Concurrent It is important to understand that writing await does not make anything concurrent by itself. Python async def sequential(): start = time.perf_counter() a = await fetch("a", 2) b = await fetch("b", 2) c = await fetch("c", 2) print(f"sequential: {time.perf_counter() - start:.1f}s") Python a: start a: done b: start b: done c: start c: done sequential: 6.0s await fetch("b", 2) doesn't begin until a is finished. While a waits, the loop has nothing else to run, because the function hasn't handed it anything else. Three two-second waits end to end is six seconds. This is the same as the for loop from the introduction, but just written with async. Now the same three fetches with create_task(): Python async def concurrent(): start = time.perf_counter() task_a = asyncio.create_task(fetch("a", 2)) task_b = asyncio.create_task(fetch("b", 2)) task_c = asyncio.create_task(fetch("c", 2)) a = await task_a b = await task_b c = await task_c print(f"concurrent: {time.perf_counter() - start:.1f}s") Python a: start b: start c: start a: done b: done c: done concurrent: 2.0s All three fetches start before any of them finishes, and the whole thing takes two seconds — the length of the longest wait, not the sum of all of them. create_task() hands a coroutine to the event loop to run on its own and gives you back a Task immediately without waiting. The three tasks begin running the moment this function reaches its first await, because that's when it hands control back to the event loop. By the time await task_a returns, b and c have been running alongside it the whole time. Based on the browser tab analogy, a coroutine is a link you haven't clicked yet. await fetch(...) is clicking it and staring at the page until it finishes loading. create_task(fetch(...)) is opening a new tab and moving on, with the event loop flipping between tabs as each one needs attention. The Task is the tab itself. You can come back and wait on it, check whether it's finished, or close it with .cancel(). The same two shapes, with the scraper's real building block: Python # Sequential — each URL waits for the previous one to fully finish async def sequential(urls): results = [] for url in urls: results.append(await _scrape_and_extract(url)) return results # Concurrent — every URL is in flight at once async def concurrent(urls): tasks = [asyncio.create_task(_scrape_and_extract(url)) for url in urls] return [await t for t in tasks] The first is the fifty-minute scraper from the introduction with async keywords added, and it's no faster. The keywords alone don't buy you anything. It is the creation of tasks that does. What's Next We can now turn a sequential I/O-bound workflow into concurrent work. Creating multiple tasks is only the beginning; once several tasks are in flight, we need ways to coordinate them and decide when to collect their results. In the next article, we'll compare asyncio.gather(), asyncio.wait(), and asyncio.as_completed() using the same scraper. If you'd like to see the differences yourself, the companion repo async-scraper-tutorial lets you run the same request through all five strategies by changing one field. That's a better way to internalize the trade-offs than reading about them, and the same shapes carry over to whatever I/O-bound project you're building next.
TL;DR: What Your Velocity Chart Cannot Tell the CFO Sooner or later, someone in your organization shows a slide with a number about what AI did for your team: typically, the team’s “velocity” before and after the coding agents arrived, plus a percentage that looks like a return on the token bill. The number may even be “correct”; however, it answers a different question than the one finance is asking: A before-and-after comparison credits every change in that period to the agents, and measuring velocity is controversial for good reason under normal circumstances, which makes measuring AI impact by this means even more challenging. A claim your team can defend starts elsewhere: with an honest grade of the evidence, a break-even test for every delegated AI workflow, and the creep check of the AI Delegation Audit, which catches the workflows that pass the test only because nobody reviews their output anymore. Each workflow then gets a keep, change, or retire decision in the Re-classification Log, and the result fits on one page that states what the team can claim and what it cannot. Bonus: For your own work, a small trial of eight to ten runs gives you a direction you can act on. Thesis: This article explains how agile teams can measure AI impact effectively, why before-and-after velocity charts mislead, the three grades of evidence, a break-even test for delegated workflows, a one-page statement for finance, and a personal trial. Disclaimer: I read Charniak/McDermott’s book on “Artificial Intelligence” decades ago; of course, I use AI for research, translations, proofreading, challenging story arcs and article structures, creating artifacts such as graphics, and summarization. It is a production tool, not a substitute for thinking. The CFO’s Question Is Legitimate Let me guess: The number arrived before the question did. At an all-hands, a stakeholder steering committee, or a quarterly business review, one slide showed the team’s velocity in the months before the AI rollout next to the months after, with a green arrow and a percentage, and nobody in the room asked what else had happened in those months. The percentage then traveled upward into the next board deck. A few weeks later, finance asks the question the slide seemed to answer: What does the AI spend buy, and how would we know? It is a fair question, given that many managers still treat “velocity” as a useful measure of team productivity, even of advancement, despite the controversy surrounding it. The velocity chart looks like the obvious answer to the CFO’s inquiry, yet it cannot carry the weight finance puts on it. Why a Before-and-After Chart Credits Everything to the Agents Teams rarely change one thing at a time. The coding agents arrive in the same quarter as a new Sprint cadence, a departure, a reorganization, a major release, or a new Product Goal or product roadmap objective. Comparing “before” with “after” puts it all on the agents’ account. The “before” may not be a calm baseline, either: If the rollout followed a crunch, or if people had used AI privately long before the official licenses arrived, the comparison measures the crunch and the private use as well. James Shore, who published a series of articles on measuring AI’s impact in September 2026, names the problem in Measuring AI’s Impact on Delivery Speed: “Are your speed increases due to introducing AI? Or the other changes you made at the same time?” His remedy is to “interleave ‘without AI’ tasks and ‘with AI’ tasks” in the same period, which “reduces the influence of other changes.” That is a study design, and a study design needs a decision before the work starts, which is why a chart assembled after the fact cannot stand in for it. So the question to ask of every before-and-after number is simple: What else changed in the same month? Velocity Is a Vague Estimate, and AI Changes the Estimates Story points are the Developers’ estimate of an item, made in refinement or Sprint Planning before anybody builds it, and their value lies in the conversation that shows whether everybody on the team is on the same page, as I argued in Estimates Are Useful, Just Ditch the Numbers; the number was never the point. “Velocity”, the sum of those numbers per Sprint, therefore rises when the team finishes more or when it estimates comparable work higher, and a velocity chart cannot tell the two apart. Shore is blunter about it: “Stories? Velocity? Story points? Completely arbitrary.” (It is one of my favorite exercises in one of my Scrum classes; I call it “Cooking the Agile Books.” The rules are simple: inflate your story point count per Sprint without working more to satisfy your demanding manager. Guess what? Everyone knows how to play the game, which shouldn’t surprise anyone, given Goodhart’s law.) Part of the reason is that every estimate is deeply embedded in the context of the team that made it: who is on the team, whether the item touches a part of the application the team knows well or a brand-new one, whether the team’s composition has changed since it last estimated something similar, which tools it uses, what its morale is like, and how unexpected events have affected individual team members. That is why you can’t compare velocity between teams, and with so many variables influencing both estimates and performance, using estimates as a measure of anything is tricky at best, and, most of the time, useless. An AI rollout changes several of those variables at once, and it can push the estimates in either direction. Shore describes the downward push: “if they think they’re going to use AI, and they think AI makes them faster, their estimates will be smaller,” so smaller numbers may hide a real gain. The upward push is the familiar estimate inflation: once management expects an “AI velocity boost,” a team under pressure may find that comparable work suddenly deserves more points; see my exercise above. Either way, the velocity before the rollout and the velocity after it are no longer measured in the same unit. So count the finished items next to the points. If points per item rise while the number of items the team finishes per Sprint stays flat, velocity goes up while the finished work does not. Then look for the work that never shows up in velocity at all: bugs, reopened items, and the hours spent outside the Sprint Backlog on manual fixes or migrations or support nobody planned. That repair work belongs on the same page as the speed. In its coverage of the 2025 DORA report, which surveyed nearly 5,000 technology professionals, InfoQ reports that “the current positive relationship between AI adoption and delivery throughput marks a change from previous results,” while “software delivery instability continues to rise.” More finished work and more repair work can show up in the same Sprints, and a slide that reports only the first number leaves the second to whoever is on call that weekend. InfoQ’s summary describes AI’s primary role in software development as “that of an amplifier,” which matches a principle that runs through my articles: AI amplifies what you already are. Finally, the claim’s scope matters. Shore’s example: “if you see a 2x improvement in coding speed, but people spend 50% of their week on other work, their overall speed improvement is only 1.33x, not 2x.” A coding agent speeds up coding; it does nothing for the Sprint Review, the stakeholder conversation, or the wait for a decision made three levels above the team. And speed was only ever part of the answer: Shore defines software development productivity as “value produced divided by money spent,” and he adds, “Going faster doesn’t mean you’re going in the right direction.” Three Grades of Evidence Not every number answers the question equally well, and telling the kinds apart is a skill you can apply to every AI claim that crosses your desk: A trial: The same kind of task, done with and without AI in the same weeks, with the estimate written down first and the condition assigned at random afterward. It is the strongest evidence a team can produce on its own.A before-and-after comparison: It shows an association, at best.A survey of how fast people feel: It shows how people feel, which is worth knowing, and it measures their perception rather than their speed. The distance between the first and the third grade is documented. In a randomized study published in July 2025, METR randomly assigned 246 issues from 16 experienced open-source developers to either allow or disallow AI. With AI, the developers took 19% longer; before the study, they expected a 24% speedup, and afterward, they still believed AI had sped them up by 20%. Those results have aged, and METR says so itself. Its follow-up, started in August 2025, points toward a speedup, and METR believes that, as of February 2026, AI tools likely speed developers up more than they did in early 2025; nevertheless, it calls its own data “only very weak evidence for the size of this increase,” mainly because of “developers choosing not to participate in the study because they do not wish to work without AI.” Between 30% and 50% of the developers reported skipping some tasks they did not want to do without AI. And when METR surveyed 349 technical workers in early 2026, the median self-reported speed change was 3x, with the authors’ own warning attached: “survey results are not necessarily grounded in reality.” Two lessons follow for a team when measuring AI impact: A survey of felt speed belongs in an impact statement as a finding about the team’s perception, never as evidence of speed. And METR’s selection problem will show up in your team as well: once people rely on AI, a trial that asks them to work without it feels like a penalty, and the tasks people skip may well be the ones where AI helps most, as METR suspects for its own study. A trial therefore needs the consent of the people running it and an end date everybody knows. Does a Delegation Pay Off? The Break-Even Test Velocity concerns engineering throughput, whereas much of the AI work in an agile product team is delegation: an agent-drafted status report, release notes, a summary of the Sprint Review, or the first draft of a Product Backlog item’s description. For each of these, a much simpler test exists, and it needs only three numbers. McKinsey’s October 2026 article on the AI value curve states the rule and credits it to David Tepper, the CEO of Ascerta: delegating a task to AI makes economic sense when “its probability of success exceeds the ratio of the time required to verify its work” to the time a human needs to do the work directly. Written as a line you can put on a whiteboard: Acceptance rate > checking time ÷ doing time The logic is plain once you write it down: With AI, you always spend the checking time, and when an output fails the check, you do the task by hand anyway, so the share of outputs that pass your check, the acceptance rate, has to be higher than the checking time divided by the doing time, the time the task takes by hand. A hypothetical example with invented numbers: A monthly stakeholder report takes 180 minutes to write by hand and 60 minutes to check the AI output line by line against its sources. So the AI version pays off only if more than one draft in three passes the check. If checking takes 150 minutes, because every claim needs a trip back to the original data, the drafts have to pass more than 83% of the time, and a team that had to rewrite two of its last six drafts has its answer. Four adjustments close the obvious loopholes: First, count everybody’s checking time, not only your own. A hypothetical example: A Product Owner drafts the descriptions of five Product Backlog items with AI in 15 minutes, and in refinement, three Developers each spend 20 minutes untangling statements that sound right but aren’t. The checking time for that delegation is 60 minutes, and it falls on people who never decided to delegate anything (Tobi Lütke calls this “slop grenades”). A delegation that passes the test for the person who delegated but fails it for the team is a cost transfer, which is another reason to measure the approach rather than the individual.Second, add the minutes spent writing and adjusting the prompt to the checking time, because you spend them on every run as well, even if you use Skills as SOPs for this purpose. (Skills also need maintenance and auditing; I call this “ClaudeOps.”)Third, measure the checking time instead of recalling it, since a remembered review time is an estimate in its own right.And fourth, do not decide after the first few runs: early AI runs may well be slower while people are still learning the prompting, improving skills, and adjusting to the checking routine. A verdict taken during that learning dip can reverse a month later. (Remember the “J-curve”?) The token bill is a separate line. For a coding agent, it may be the large number. For a drafted report, I suspect the human minutes outweigh it, so check your own invoice before you argue either way. When the Test Lies: The Creep Check The break-even test has a blind spot, and it sits exactly where delegated workflows fail without anyone noticing. Suppose, hypothetically, that a weekly summary has passed the check every single time for two months, while the time someone spends reviewing it, which is the checking time of the break-even test, has fallen from a quarter of an hour to about a minute. On paper, it is the team’s best delegation: a 100% acceptance rate and almost no checking time. In practice, nobody checks anymore, and an Assist workflow, in the terms of the A3 Framework, has turned into unreviewed Automate without anybody deciding so. This is the situation the AI Delegation Audit exists for. It is a recurring 45- to 60-minute meeting, monthly or every two weeks, that does for the work a team has delegated to AI what the Retrospective does for the team’s way of working. It runs four checks on every delegated workflow: Output drift (does the work still meet the AI Definition of Done?),Sufficiency drift (is the model tier still right, in both directions?),Reversibility (could you stop this automation today, and who would?), andCreep (how long does a human spend per review?). (My earlier article on the audit called the second check model fit and the fourth category creep.) The creep check rates a review time trending down as drift and four-second approvals as a fail, which makes it the counterweight to the break-even test: when the review time collapses, both inputs of the test go wrong at once (the checking time shrinks toward zero, and the acceptance rate climbs toward 100%), and the result stops meaning anything. So run both, and read the results together: Fails the break-even test, passes the creep check: An honest failure. Retire the delegation, or change the task split so that the AI formats and a human writes every claim.Passes both: Keep it, and watch the review time.Passes the break-even test only because review time collapsed: Restore genuine review, or change the workflow’s category deliberately, with a reason. Personally, I send every decision into the audit’s Re-classification Log: the date, the workflow, what changed (category, model tier, standard, stop rule, or retirement), the reason, and who decided. “No change” is a valid decision when every check passes; “monitor it” is not, because it postpones a decision while sounding like one. Retiring a delegation that no longer earns its cost is a success, since the team learned something and the next audit has one fewer workflow to inspect. Over a few quarters, that log becomes evidence for measuring AI impact no slide deck can fake. Measuring AI Impact by the Approach, Never by People Every Jira export names every person on the team, and an AI that you ask why velocity went up will happily tell you who drove it. The moment an impact statement names that person, praises them, or ranks the team, measuring an approach turns into a performance review, and people optimize the metric instead of the work. Shore’s warning about his own metrics in Assessing AI Impact: Notes for Your CFO leaves no room for interpretation: “Whatever you do, don’t use them to measure the performance of teams or individuals.” In Measuring AI’s Unintended Consequences, he adds, “There is no metric that can’t be gamed, and this one is more gameable than most.” (See above, my “Cooking the Agile books” exercise.) One observation about people is legitimate, because it limits the claim without judging anyone. If most of a gain sits in one Developer’s work rather than across the team, the team cannot claim a team-wide effect. Shore’s rule for the whole undertaking fits on a sticky note: “Measure the approach instead, learn from it, and stop measuring.” Teams tend to forget the last part, and he spells it out: “Don’t establish a performance measurement program and leave it running.” That warning does not contradict the recurring AI Delegation Audit. A speed trial ends once it answers its question, whereas the audit keeps inspecting the delegated workflows themselves for drift and for review time that keeps shrinking, and it judges no one’s performance. What Finance Gets Instead of the Velocity Chart Back to the question Finance asked: What does the AI spend buy, and how would we know? If the velocity chart cannot answer it, an agile practitioner can prepare something that supports measuring AI impact, and it fits on one page the team’s CTO or manager can sign: What the team can claim: Each claim with its source and how sure the team is; for example, finished items per Sprint next to bugs and reopened items, or the decision on a delegated workflow and the audit behind it.What the team cannot claim, and why: For example, a productivity percentage caused by the coding agents, because a before-and-after comparison shows an association at best; name the evidence it would take to make that claim.The decision per delegated workflow: Keep, change, or retire, each pointing to its row in the Re-classification Log.At most three measures from now on: Each with an end date. The page names no individual and ranks no one. It also takes some courage to hand over, because “we cannot claim that” is not what the all-hands slide promised. Nevertheless, a page that says “we cannot know anything” fails as surely as a page that repeats the percentage, because the person who signs it needs to know what the team can stand behind. Measuring AI Impact – Conclusion: Run a Trial on One Workflow of Your Own Measuring AI Impact at team-level needs the team’s records; a claim about your own work needs little more than a notebook and a few weeks: Pick a task you already do with AI at least once a week, ideally more often, because a task you do once per Sprint takes months to give you an answer.Write your decision rule before the first run: keep if, change if, stop if. Once the numbers are in, every number looks like a reason for what you already wanted.Agree on the trial with the person who receives the output, so a reply written by hand reads as part of a test rather than as a refusal to use AI.Before each run, write down your estimate, then let chance decide whether you work with or without AI. Shore gives each person “a virtual bag that’s half full of ‘with AI’ assignments and half without”. For one person, five paper slips of each in a mug keep the split even, which a coin does not guarantee over ten runs.After each run, log the total time, including checking and redoing; for the runs with AI, also log the prompting and checking minutes separately. Then note whether the output passed your check and how much energy you have left.After eight to ten runs, divide each run’s total time by its estimate, and compare the median ratio of the runs with AI against the median of the runs without AI. That is how Shore compares a team to itself: a team whose estimates were perfectly consistent and that “went from taking 3x longer than estimated to 1.5x longer” would be twice as fast, he writes.Then take the break-even inputs from the same log, the doing time of your runs without AI and the prompting and checking time of your runs with AI, to see how far the acceptance rate could fall before the delegation stops paying. Apply your rule, write the decision down, and stop measuring. Your estimates carry every context problem described above; however, writing them down before the draw keeps those problems the same for both conditions, which is why the comparison works for one person in the same weeks and fails between teams or between periods. Five or so runs with AI give you a rough acceptance rate at best, in 20% steps, and eight to ten runs will not convince a statistician. But they show a direction, and a direction is enough to decide on one workflow, provided you measure only your own work and keep the end date. Key Questions This Article on Measuring AI Impact Answers How Can an Agile Team Measure the AI Impact on Its Productivity? Compare work done with and without AI in the same period, rather than comparing velocity before and after the rollout, because other changes made at the same time confound the comparison. Grade the evidence: a randomized trial beats a before-and-after chart, which beats a survey of felt speed. Count finished items and repair work next to any speed figure, and never measure individual people. Why Is Velocity a Poor Measure When Measuring AI Impact on a Scrum Team? Velocity sums story points, the Developers’ estimates made before the work starts, and every estimate depends on the team’s context, for example, its members, its familiarity with the area, its tools, and its morale. An AI rollout changes several of these at once and can push estimates up under pressure to show a gain, or down when people expect AI to help, as James Shore notes. Count finished items and repair work instead. How Do You Know Whether Delegating a Task to AI Pays Off? Apply the break-even test that McKinsey credits to David Tepper: delegation pays off when the share of AI outputs that pass your check is higher than checking time divided by the time the task takes by hand. A hypothetical report taking 180 minutes by hand and 60 minutes to check must pass more than one time in three. Count every reviewer’s checking time, including downstream reviewers, not only your own. Why Can a High Acceptance Rate for AI Outputs Be Misleading When Measuring AI Impact? An acceptance rate is only as good as the review behind it. When review time falls toward zero, every output gets accepted, and the break-even test passes trivially, while nobody checks the work anymore. The creep check of the AI Delegation Audit watches review time per output and rates four-second approvals a fail, because they mark an Assist workflow that became unreviewed Automate without a decision. How Can I Test Whether AI Actually Saves Me Time on My Own Work? Run a small randomized trial on one task you do with AI at least weekly. Write your keep, change, and stop rules first, and agree on the trial with whoever receives the output. Record your estimate, then draw ‘with’ or ‘without AI’ at random. After eight to ten runs, compare the median ratio of actual time to estimate in both conditions, check the break-even margin, apply your rule, and stop measuring.
What Is TypeSafe Jev? Jev is a model that answers questions about text with typed values and probabilities instead of generated output. It is TypeSafe’s flagship model and the first of its System One models, a class of models built “to make fast, structured decisions that software can use directly” (Reference 2). A general-purpose LLM such as GPT or Claude also understands natural language, but it answers by generating text. When a program needs a decision, the usual pattern is to prompt for JSON, parse the reply, validate it, and handle the cases where the model wrote something else. Jev removes that step. You send a state (the data to judge) and a set of named questions, and each answer comes back in the exact type the question declared. The differences that matter for a developer: No text generation. Jev does not write replies, produce code, or explain its reasoning. It returns a decision and the probabilities behind it.Typed contract. The question type fixes the shape of the answer, so there is nothing to parse and no output format variation.Calibrated probabilities. The models are trained so that their probabilities “reflect uncertainty” against real outcomes. Code can further set thresholds and route low-confidence cases to humans.Parallel, independent questions. Questions in one request are evaluated separately and in parallel. Adding questions “barely changes the response time” and avoids context-rot (Reference 1). The division of labor is simple. Your code owns the workflow, rules, and calculations. Jev supplies the semantic judgment that ordinary code cannot. Ultimately the code decides. The Three Primitives: Noul, Choice, and Score Every question has a type, instructions (the question itself) and where the type needs it, criteria (the possible answers). The question name is a key for your code only. It is not sent to the model, so the instructions must carry the full meaning (Reference 3). primitiveasksCRITERIAReturnsnoulDoes a condition hold?Optional object with true and false descriptionsnoul: probability of yes, 0 to 1choiceWhich one of a fixed set of options applies?Required map of option name to descriptionchoice, probabilities per option, confidencescoreWhere does the state sit on an ordered scale?Required ordered list of levels (up to 10)score, legend, probabilities per level, confidence Noul (Reference 4) is a yes/no question that returns the probability that the answer is yes. Phrase the question so a high value means yes, ask one condition per noul, and set thresholds in code according to the cost of being wrong. For multi-label problems, ask one noul per label in the same request. Choice (Reference 4) picks exactly one option from the set you define. The full distribution shows how the options compete and confidence summarizes how concentrated it is. Include a catch-all option for when nothing fits. Score (Reference 4) places the state on ordered levels numbered from 0. The score is the probability-weighted average of the level numbers, so it can fall between levels: The model judges each level on its own and does not see its number, so each level should describe a concrete situation rather than a degree like “moderately”. Because different distributions can give the same score, read probabilities and confidence alongside it. Confidence on choice and score describes how peaked the answer is, not whether it is correct (Reference 5). Experimenting in the Playground The fastest way to try Jev is the TypeSafe Playground (Reference 7), which runs real requests from the browser without any code. You need a TypeSafe account and an API key, which you generate in the console. Keep the same key for later API or SDK work, ideally in a TYPESAFE_API_KEY environment variable. A typical session: Open the Playground and log in.Paste the text to evaluate as the state.Add a question: give it a name, pick the type (noul, choice, or score), write the instructions and, where needed, the criteria. The questions editor also accepts JSON, so you can paste a whole questions object directly.Add more questions of any mix. They all run against the same state in one request.Run it and read every answer side by side: the value, the probability distribution, and, for choice and score, the confidence. The Playground is ideal for tuning questions before writing code. Change one word in an instruction or a criterion, rerun, and see how the probabilities move. Once the questions behave, the same JSON goes unchanged into a call as the one below (Reference 6). Plain Text POST https://api.typesafe.ai/v1/systemone From code, the same request is a single HTTP call. The example below sends a request containing only the blocking question: PowerShell curl https://api.typesafe.ai/v1/systemone \ -H "Authorization: Bearer $TYPESAFE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "jev-preview", "state": "This builds the SQL query by concatenating `userId` from the request, which allows SQL injection. Please switch to a PreparedStatement before we merge.", "questions": { "blocking": { "type": "noul", "instructions": "Does this code review comment require a change before the pull request can be merged?" } } }' The response holds one entry per question under answers, for example "blocking": {"type": "noul", "noul": 0.98}. Additionally, GET /v1/models lists the available model names. Concrete Example: Analyzing Code Review Comments Three code review comments go to Jev in three separate requests, each asking the same three questions: Is it blocking? (noul)What is it about? (choice) How constructive is it? (score). A tool built on these answers could hold a merge until blocking comments are resolved, label comments by topic, or flag a hostile tone to the other team members. The States (The Comments) requeststatea“This builds the SQL query by concatenating userId from the request, which allows SQL injection. Please switch to a PreparedStatement before we merge.”b“Nit: I’d rename tmp to pendingOrders so the loop reads better. Not a blocker.”c“Did you even run this? The cache is never invalidated, so users will see stale prices.” The Questions All three requests share this questions object. Only the state changes. JSON { "blocking": { "type": "noul", "instructions": "Does this code review comment require a change before the pull request can be merged?", "criteria": { "true": "Points out a defect or risk that must be fixed, or explicitly asks for a change before merging", "false": "An optional suggestion, nit, question or praise that does not block the merge" } }, "category": { "type": "choice", "instructions": "What is the main concern of this code review comment?", "criteria": { "bug": "Incorrect behavior, a logic error or a missing case", "security": "A vulnerability such as injection, leaked secrets or missing authorization", "performance": "Speed, memory or resource usage", "readability": "Naming, formatting, structure or style", "other": "Anything else, such as tests, documentation or a question" } }, "tone": { "type": "score", "instructions": "How constructive is the tone of this code review comment towards the author?", "criteria": [ "Hostile: insults or mocks the author", "Curt: dismissive or sarcastic, no explanation", "Neutral: states the problem without explaining or suggesting a fix", "Constructive: explains the problem and suggests a fix", "Very constructive: explains the problem, suggests a fix and is encouraging" ] } } The three primitives each do a different job here. Blocking is a yes/no condition, so it is a noul with a threshold set in code. Category is one of five exclusive options, with other as the catch-all. Tone is ordered, so it is a score from 0 (hostile) to 4 (very constructive). Expected Results Requestblocking (noul)category (choice)tone (score, 0–4)aHigh, near 1: a vulnerability and an explicit “before we merge”securityAbout 3, Constructive: explains the risk and names the fixbLow, near 0: labelled a nit and “Not a blocker”readabilityAbout 3, Constructive: suggests a rename and says whycHigh: stale prices are a real defect even without an explicit requestbugLow, about 1, Curt: the opening question is sarcastic, and no fix is offered Comment c is the interesting one. It mixes a valid bug report with a dismissive tone, and Jev should separate the two: blocking and bug on one side, a low tone score on the other. Actual Results Request a, the SQL injection comment: Jev matched all three predictions. blocking is 98% true, category is security at 100%, and tone scores 3.04: 96% Constructive and 4% Very constructive, with 97% confidence. All three runs used the jev-preview model. Request b, the naming nit: blocking is 5% true and category is readability at 100%, as expected. tone scores 3.44, higher than predicted: probability splits 56% Constructive and 44% Very constructive, so confidence drops to 63%. The friendly “Not a blocker” reads to Jev as partly encouraging, and the split is an honest signal that this comment sits between two levels. Request c, the stale cache comment: Jev separated the defect from the tone, as expected. blocking is 87% true and category is bug at 100%, while tone scores 1.3: 72% Curt, 20% Neutral, 6% Constructive, and 2% Hostile, with 72% confidence. The spread went toward Neutral rather than Hostile, so Jev reads the comment as sarcastic but not insulting. The lower blocking value (87% versus 98% for request a) also fits, since this comment reports a defect without explicitly asking for a change. Conclusion Jev turns a semantic judgment into a function call with a typed return value. Three primitives cover most needs: noul for conditions, choice for categories, and score for degrees. Each answer comes with probabilities that code can threshold, combine, or escalate. The code review example shows the pattern in miniature: one request, three independent judgments, no parsing. The Playground is the quickest way to design and tune such questions before moving them into an application. As with any model, validate the answers and thresholds on your own data before relying on them. Resources [1] – TypeSafe Introduction [2] – TypeSafe System One [3] – TypeSafe Primitives (Questions) [4] – TypeSafe Noul, Choice and Score [5] – TypeSafe Confidence [6] – TypeSafe HTTP API [7] – TypeSafe Playground and API keys [8] – The picture was taken in Zakynthos, Greece
Why Local Lift Does Not Mean System Growth A marketplace team tests a new ranking policy. On the home surface, the share of user activity rises from 30% in control to 45% in treatment: a 15-percentage-point lift. Assignment is balanced, tracking is complete, and the confidence interval excludes zero. The result looks ready to ship. Then the team expands the analysis. Search activity falls by almost 15 points, browse is unchanged, and total activity per user remains flat. The treatment did not create more engagement. It changed where that engagement happened. The home surface gained activity, but the product as a whole did not. Nothing about the local calculation is wrong. The A/B test correctly answered, “Did activity increase on home?” The mistake was treating that answer as proof that total activity increased. A precise local estimate can still support the wrong launch decision when users, suppliers, or product surfaces compete for a shared resource. Teams often respond by reaching for a switchback, cluster randomization, or separate budgets. Before changing the design, answer two simpler questions: Did the treatment increase the system total or redistribute an existing outcome?Were treatment and control isolated at the level where the shared resource operated? This article presents a practical workflow for answering both questions. It reconciles local changes against a system total using the randomized-user denominator, then screens for coupling inside the resource pools shared by the experiment arms. Why Shared Constraints Change the Meaning of Lift An ordinary user-level experiment assumes that one user’s assignment does not change another user’s outcome. This condition is part of the Stable Unit Treatment Value Assumption (SUTVA). It becomes questionable when experimental units compete through a shared constraint: The first three examples can create interference between experimental units. The fourth can create cannibalization between product surfaces even when user assignment itself is clean. These mechanisms are related, but they are not the same claim: Interference means that treatment assigned to one unit changes another unit’s outcome.Cannibalization means that a measured gain comes from a corresponding loss elsewhere in the system.Incrementality means that the treatment increases the outcome the system ultimately values, rather than changing its location or attribution. Assignment, sample-ratio, exposure, and telemetry checks still come first. Once they pass, the next review asks whether the success metric covers the system outcome and whether the randomization unit isolates the rollout effect. Use a Local-to-System Reconciliation The local-to-system reconciliation brings those checks into one review. It has five parts: Define the shared constraint and system boundary. Identify the supply, inventory, budget, attention, or capacity through which outcomes can move, and decide what must be counted for the launch decision.Measure each local change. Estimate treatment-control differences for the components inside that boundary.Reconcile the total. Aggregate those components with one denominator tied to the randomization unit.Check isolation inside shared pools. Examine whether the arms move together inside markets, regions, seller clusters, or budget groups.Classify the evidence. Treat the result as incremental, redistributive, isolation-sensitive, or inconclusive before deciding whether to ship or redesign. Figure 1: Decision flow from local lift through system reconciliation and isolation review Start with the boundary. It must correspond to the business decision, and every component inside it must use a compatible unit of analysis. A convenient total that excludes the surface likely to lose value simply moves the blind spot. Reconcile Outcomes per Randomized User Here is what the reconciliation looks like in a deterministic synthetic experiment with three mutually exclusive surfaces: The home result is real. It just does not show incremental engagement: search loses almost exactly what home gains. Calculate the treatment-control change for every affected surface using the randomized-user denominator. The system change is the sum of those component changes. The total absolute movement shows how much behavior shifted across surfaces. When movement is large, but the system change is close to zero, the treatment is primarily redistributive. The implementation preserves the randomized-unit denominator: Python arm_size = df.groupby("variant")["user_id"].nunique() surface_per_user = ( df.groupby(["variant", "surface"])["activity"] .sum() .unstack(fill_value=0) .div(arm_size, axis=0) ) system_per_user = surface_per_user.sum(axis=1) surface_delta = ( surface_per_user.loc["treatment"] - surface_per_user.loc["control"] ) system_delta = surface_delta.sum() local_movement = surface_delta.abs().sum() Counting event rows instead would let an engagement-changing treatment alter its own denominator. Per-user outcomes preserve the connection between the reported effect and the randomization design. Figure 2: Control and treatment have different surface shares while total outcome remains flat. What To Watch For Do not interpret shares without levels. A surface share can fall while its absolute activity rises if the total grows.Make the parts add up. Overlapping or incomplete surfaces do not produce a clean system total. State what is excluded, and avoid double counting.Keep the statistical review. Reconciliation is a diagnostic, not a standalone hypothesis test. Component and system estimates still need confidence intervals that respect the experiment design. Use the system total as part of the Overall Evaluation Criterion (OEC): the metric or combination of metrics used to judge experimental success and connect short-term measurement to longer-term goals (Kohavi, Tang, and Xu, Chapter 7). Home activity explains where behavior moved; it should not decide the launch when the objective is total engagement or marketplace value. Once the metric boundary is clear, the next question is whether the experiment arms were truly isolated. Check for Coupling Inside Shared Resource Pools Reconciliation can show that value moved. It cannot tell you whether treatment and control affected one another. A useful risk screen asks whether both arms remain related inside pools that share supply, inventory, or budget. Do not correlate raw market means. Large markets can have high outcomes in both arms for stable reasons unrelated to the experiment. Remove each market’s pre-period baseline and compare changes: Python market_means = ( df.groupby(["market_id", "period", "variant"])["revenue"] .mean() .unstack(["period", "variant"]) .dropna() ) control_change = ( market_means[("post", "control")] - market_means[("pre", "control")] ) treatment_change = ( market_means[("post", "treatment")] - market_means[("pre", "treatment")] ) coupling = control_change.corr(treatment_change) The synthetic data returns a correlation of 0.873. Treat that as a review signal, not an “interference detected” verdict. Common shocks, seasonality, measurement changes, and omitted market characteristics can produce the same pattern. The shared-pool coupling screen has one job: challenge the randomization unit. Define resource pools before looking at results, report the number and size of those pools, and add uncertainty or randomization inference. Even with those safeguards, the screen can identify risk in the original estimate; it cannot correct that estimate. Convert the Evidence Into a Launch Decision At this point, the team has two different forms of evidence: whether value moved across the system and whether the experiment arms may have shared the same constraint. Together, they lead to different actions: The categories should not be collapsed into a single reliability score. Redistribution and interference answer different questions. A treatment can reallocate activity across surfaces without contaminating control, or it can interfere through shared supply even when the measured system total is positive. Only an isolation problem necessarily requires a new experiment design. Match the Design to the Constraint Shared supply over time and region: Use a switchback to randomize the market state rather than individual transactions. DoorDash uses this pattern for dispatch experiments (DoorDash Engineering).Fixed campaign budgets: Separate the budgets used by treatment and control. LinkedIn describes this budget-split design for its advertising marketplace (LinkedIn Engineering).Marketplace or network spillovers: Randomize clusters rather than individuals, while accounting for the loss of power that comes with fewer independent units (Holtz et al.).Competition between listings or surfaces: Keep local metrics as diagnostics, but base the decision on incremental platform value. Airbnb describes this distinction when accounting for booking cannibalization (Airbnb Engineering). These are responses to a diagnosed constraint, not a checklist to apply to every experiment. Key Takeaways Name the shared supply, inventory, budget, or attention constraint before choosing the randomization unit.Define the system boundary before reviewing local lift.Calculate every component with the randomized-unit denominator.Compare absolute outcomes before interpreting changes in surface share.Treat shared-pool coupling as a design-review signal, not proof of interference.Redesign only when the evidence shows that treatment and control were not isolated at the level where the system operates. A p-value can tell you whether the observed treatment-control difference is compatible with a null hypothesis under a statistical model. It cannot tell you whether the experiment measured the right boundary or isolated the right unit. The final question is not whether the treatment won its local comparison. It is whether launching the treatment would make the system better. Reference Implementation The deterministic example behind the reported values is available in the runnable Python script. A broader open-source implementation of related diagnostics is available in the Expguard repository and its archived release. These implementations are optional; the workflow applies independently of either codebase. References and Further Reading Kohavi, R., Tang, D., and Xu, Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing, Cambridge University Press, 2020.DoorDash Engineering, Switchback Tests and Randomized Experimentation Under Network Effects.Holtz et al., Reducing Interference Bias in Online Marketplace Pricing Experiments.Li et al., Interference, Bias, and Variance in Two-Sided Marketplace Experimentation.LinkedIn Engineering, Budget-Split Testing: A Trustworthy and Powerful Approach to Marketplace A/B Testing.Liu, Mao, and Kang, Trustworthy Online Marketplace Experimentation With Budget-Split Design.Airbnb Engineering, How Airbnb Measures Future Value To Standardize Tradeoffs.
TL; DR: Deciding What to Build Is the New Job, Now that Code Is No Longer a Constraint Agentic coding has removed the cost gate that used to stop product teams from chasing every idea at once, and the constraint has moved to product judgment: the ability to tell what is worth building. AI-Assisted product discovery can prepare that judgment by reading far more customer evidence than any product person could. Such a discovery agent analyzes three families of sources, checks eight patterns, and argues both against and for your current direction. The A3 Framework has a name for this work: Assist, the agent analyzes and prepares, and the humans decide. The framework also helps to define the agent limits with the A3 Handoff Canvas – what the agent does, what the human does, which data we use, etc. – and the AI Definition of Done – what a quality AI output “looks like” – before the first run. Thesis: This article on AI-assisted product discovery explains how product teams can use AI agents to compare customer feedback, usage data, and stakeholder requests with their product vision, product goal, product roadmap, and past decisions, flagging drift, bias, and sunk costs, while humans keep the decision under the A3 Framework’s Assist category. Disclaimer: I read Charniak/McDermott’s book on “Artificial Intelligence” decades ago; of course, I use AI for research, translations, proofreading, challenging story arcs and article structures, creating artifacts such as graphics, and summarization. It is a production tool, not a substitute for thinking. Both AI Product Camps Hand Off the Part That Just Became Scarce Product people seem to be splitting into two camps over agentic coding. The first camp is celebrating: If a coding agent can build a working version of an idea in an afternoon, why argue about which of five ideas to pursue when you can build all five and let the market tell you which one sticks? (Yes, assuming you have the credits to keep feeding tokens into your coding agents.) The second camp has drawn the opposite conclusion. It expects the next agent to take over the choosing as well, preferably with a dashboard and a confidence score attached to each recommendation. Both camps are wrong for the same reason: each hands off the one capability that has just become scarce. Throwing spaghetti at the wall has become affordable in tokens. Yet it remains as unaffordable as ever in focus, maintenance, and the attention of customers who have to make sense of five half-finished features. An agent that chooses for you, on the other hand, has taken over the part of product work that nobody can delegate without also delegating the accountability for the outcome, whatever the org chart says about who owns the product. Coding Used to Be the Gate That Forced Us to Choose For decades, writing software was expensive and slow, and that expense did a job nobody had assigned to it: It acted as a sanity check and a cost gate. When building a feature took a team several weeks, the product people had to decide which idea deserved those weeks, and a weak idea often died in a prioritization discussion before anyone wrote a line of code. The gate was crude, and plenty of bad ideas slipped through anyway (usually the ones with a senior sponsor with budget authority); nevertheless, it forced a choice. Agentic coding has removed much of that gate, and the theory of constraints predicts what happens next. Eliyahu Goldratt’s five focusing steps end with a warning that is easy to skip: Once you elevate a constraint, “the weak link may not remain weakest,” as the Theory of Constraints Institute puts it, and the constraint moves somewhere else in the system. In product development, it moves to judgment: product taste, the ability to read customer evidence, and the discipline to say no to an idea that a coding agent could build by Friday. Andrew Ng made the same observation on the No Priors podcast in August 2025, as Business Insider reported: “The bottleneck is deciding what do we actually want to build.” Photography went through a comparable shift. When every frame of film cost money and darkroom time, photographers composed carefully before they pressed the shutter, so the cost of a frame forced the judgment upfront. Digital cameras removed that cost and moved the work to selecting and editing, where shooting thousands of mediocre frames mostly buries the person who has to pick the few worth printing. Product teams now face that editor’s problem: A coding agent can produce a working version of almost any idea, and someone still has to decide which version deserves a customer’s attention. Not everyone is as gifted as Steve Jobs, even though plenty of people still try to be the product manager in charge. Every Roadmap Is a Snapshot of What You Knew Last Month If judgment is the new constraint, it helps to look at the system product teams use to exercise it. The sketch below comes from my Product Owner classes, where I use it to show the challenges product people face when they manage a product backlog. (This AI-assisted product discovery article covers its left half.) The product vision sets the direction, backed by a product strategy that describes how the organization intends to turn that vision into reality. At the operational level, the strategy becomes something more tangible and nearer-term: a product roadmap or, if your team borrows from Scrum, a Product Goal. (Plenty of product teams use elements of Scrum and would deny practicing it, which is completely fine; we are not paid to practice Scrum but to solve our customers’ problems within the given constraints while contributing to the organization’s sustainability.) Together, these artifacts form the narrow neck of a funnel: Every idea, request, and data point pours into its wide mouth, and only what serves the vision and the goal passes the neck and earns a place in the work. Below the neck, the sketch shows where the surviving ideas go: into a hypotheses backlog for validation through experiments or, when an idea does not serve the goal right now, into an anti-product backlog; both destinations depend on a human decision. Each of these artifacts is a snapshot. A product roadmap, a product goal, or a product backlog represents your understanding of your customers, the market, and your competitors at the moment you wrote it down. I like to put it this way: Based on what we know now, this is our best abstraction of how we can create customer value, and it may change as we learn more. Scrum makes the same point when it calls the Product Backlog “an emergent, ordered list” in the Scrum Guide: Its composition and order change as the team learns something, which also lets the team judge earlier decisions in hindsight and correct course. A snapshot is only useful if someone compares it with what has happened since, which raises two practical questions: Where does the new information come from, and who has the time to read it? What Pours Into the Funnel, and What the Agent Has to Remember Information reaches a product team through two kinds of sources, and both have grown faster than any team can read. Passive sources: Information arrives without the product team asking for it, for example: Messages from the contact form on your websiteTickets in the customer care department’s systemDaily traffic and user behavior data from your analytics platformProduct requirements from internal stakeholders, which arrive unrequested and usually with political weight attached. Active sources: The product team goes out and gets the information, for example: Notes from continuous user interviewsIdeas from the product people themselves, who work with the product every dayObservations of users in their natural habitat, solving the problems they chose your product to help withUser research such as user story mapping sessions with internal and external stakeholders. Nobody reads all of this every week, and that is the opening for an agent. Depending on the size of your organization, the agent runs daily or weekly, reads everything that comes in, and prepares what humans need for product decisions. However, two families of sources are not enough, and in my observation, this is where the typical “AI analyzes your customer feedback” pitch stops. An agent that only reads external evidence can tell you that customers dislike a feature; it cannot tell you that you have kept funding that feature for three quarters because of what you already spent on it. For that, the agent needs a third family. Organizational memory: The record of what the organization committed to and spent, for example: Current and previous product goals and product roadmap versionsNotes from past stakeholder reviews, and release notesThe anti-product backlog, including the reason for each rejected ideaPast stakeholder decisions, and the effort and money already spent on initiatives. The agent’s job, then, is to compare external evidence (what customers, users, and stakeholders say and do) with internal commitments (what the organization decided and spent). In most organizations, this memory lives in people’s heads, Slack threads, and Jira comments rather than in a tidy decision log, so start with what exists, for example, the current and previous product goals or product roadmaps and the raw notes of your last stakeholder reviews. Questions the agent cannot answer because records are missing are a finding in themselves, because they show where your organization doesn’t document knowledge or decisions about why it said no. Another boundary is the first question the A3 Framework asks of any task: Should AI touch it at all? Counting tickets, computing the revenue at risk from billing and CRM data, and drawing the dashboard are deterministic jobs that a BI tool or a spreadsheet already handles reliably. The agent reads those computed figures next to the unstructured text and connects the two, while the tools built for arithmetic stay with the arithmetic. Eight Questions for a Weekly AI-Assisted Product Discovery Check The agent works through eight questions in three groups, and each group needs different inputs. Drift, or has the world moved since we last looked: These questions need all three families, because drift only shows when you hold today’s evidence against yesterday’s commitments: Where does the data point to a change in customer perception or needs?Does our product roadmap or our product goal still align with what real customers say and do?Have we started moving in the wrong direction because we ignored earlier feedback from the market? (The agent can only answer this one if the organizational memory shows what the team saw at the time and decided to set aside.) Gaps and pain, or what customers keep telling us: These questions run on passive and active sources plus the figures your BI tool already computes: Which functional areas do customers bring up again and again that the product does not address?Which critical usability issues do customers complain about?Which customers threaten to cancel their subscriptions or purchases because the product disappoints them, and what is our risk exposure? (The exposure figure comes from billing data; the agent links it to what those customers wrote.) Self-deception, or whether we are fooling ourselves: These questions depend on organizational memory above all: Are the product strategy, the product roadmap, or the product goal biased, built to confirm a belief about the product’s future while the market moves in a different direction?Have we fallen victim to the sunk cost fallacy? In the self-deception group, an agent does better than a tired human reader. People usually struggle to spot bias in their own plans, and what they’ve already spent tends to argue louder than evidence of what customers want. Both patterns are old acquaintances; I described them, together with the persona-driven self-fulfilling prophecy and the habit of ignoring sales and customer support, in Product Discovery Anti-Patterns Leading to Failure. The exciting new part is that an agent can check for them every week, across every source, without getting tired or diplomatic. In AI-Assisted Product Discovery, the Agent Prepares the Decision, and the Product Team Makes It In terms of the A3 Framework, everything so far is Assist, which the original A3 Framework article sums up as “AI expands options. You own the outcome.” The agent reads the sources and prepares the briefs, and the product team decides. The moment the agent moves an idea into the hypotheses backlog, kills a roadmap item, or reorders the product backlog on its own, the work has crossed into Automate, which is the wrong category for a decision that depends on product judgment, which is the capability the shifted constraint now demands from humans. However, the preparation itself has a catch. Language models tend to agree with the person asking. Recent research suggests the problem has not gone away: Seo, Atanasova, and Augenstein tested 14 models on 42K questions and found that “all models are susceptible to user opinions regardless of size,” with models “most influenced by how confidently an opinion is stated, whom it is attributed to” (Claim Framing as a Driver of LLM Sycophancy, October 2026). A product goal handed to an agent is exactly that: a confidently stated position backed by the organization’s authority. So, I suggest running the analysis as two briefs. The first brief collects the evidence for the current direction, while the second brief starts from the assumption that the product goal is wrong and builds the strongest case against it from the same data, citing every source. The humans then read both side by side. (The study documents the agreeable behavior; the two briefs are my countermeasure, and they apply an old rule of mine: Never accept a model’s first answer.) The A3 Handoff Canvas is where the team writes this down before the first run: The inputs name the three families of sources, the outputs name the two briefs, and the stop rules say what the agent must never do, namely rank ideas, recommend a decision, or move anything. The AI Definition of Done then states what each brief must contain before anyone discusses it, and the difference is easiest to see with question 8, applied to a hypothetical custom reporting module that has been on the roadmap for a while. An Automate verdict, which is what you do not want: “The custom reporting module shows sunk cost characteristics. Recommendation: stop development.” What the product team reads instead, assembled from both briefs, which is what the AI Definition of Done asks for: Commitment: “The module has been on the product roadmap since the start of the year and received development time in every release cycle since.” (Source: roadmap versions)Spending: “Most of the recent iterations went into report templates and export filters.” (Source: release notes)Customer evidence: “Requests for the module come from long-standing accounts that want custom CSV formats; recent onboarding interviews do not mention it.” (Sources: support tickets, interview notes)Case for continuing (first brief): “Enterprise accounts up for renewal list custom reporting as an open requirement.” (Source: stakeholder review notes)Case for stopping (second brief): “Customers who canceled during the period cited friction in the core workflow, and observed users export raw data to spreadsheets instead of using the in-app reports.” (Sources: cancellation tickets, observation notes)Open question for the product team: “Can scheduled exports cover the enterprise renewals without funding another cycle of module development?” What happens next is a human call, and the options sit on the left side of the sketch: A finding can become a hypothesis in the hypotheses backlog and go to validation through an experiment; it can land in the anti-product backlog together with the reason why it does not serve the product vision or the product goal right now; it can trigger a change of the product goal itself; or the product team can dismiss it. Each of these destinations is a decision that the people accountable for the product make, preferably together. Five Ways AI-Assisted Product Discovery Goes Wrong A rule I apply to every AI initiative holds here as well: Do not apply AI on top of dysfunctional systems or processes. If a product team has no hypotheses backlog, runs no experiments, and keeps no anti-product backlog, the agent’s briefs land on nothing, and the following failure modes show what that looks like in practice: The loud-customer bias: Passive sources over-represent vocal customers, while customers who quietly cancel rarely fill out a contact form first. An agent reading tickets will give the most weight to whoever writes the most tickets, unless the product team tells it to also look at who stopped writing, for example, in usage data from accounts that stopped logging in.Sanitized records: When the notes of a stakeholder review say “stakeholders loved the demo” because nobody wanted to write down the objections, the organizational memory the agent reads has already been edited for comfort. The opposing brief can only argue from the records it receives, so a sanitized record produces a convincing case for the wrong conclusion. (Anyone who has watched a review turn into a performance knows how often this happens, or, to use a German proverb: Wer schreibt, der bleibt.)Report theater: The briefs look polished, people read the summary, and nobody opens the evidence. Polished AI artifacts quickly fool people into believing that the AI is doing the real job, and a discovery check that nobody questions may be worse than none, because it lends a bad decision the authority of data.The HiPPO override: The agent flags a misalignment, a stakeholder requirement with enough political weight wins anyway, and three weeks later, nobody reads the briefs anymore.The authority mismatch: When an agent holds customer evidence against commitments, drift at the operational level often points to a flawed assumption at the strategic level, in the product vision or the strategy. A product manager who can change the product goal but not the strategy then receives a finding without the authority to act on it, and the brief travels from inbox to inbox until it is out of date. So decide before the first run who receives which kind of finding and who takes a strategic finding to the people who own the product strategy; the task split of the A3 Handoff Canvas is the place to write that down. Amazon’s Fire Phone shows how expensive this gets when the highest-paid person is the CEO: Fast Company’s Austin Carr interviewed more than three dozen current and former employees, and a former engineering head said of the phone’s Dynamic Perspective feature, “We poured surreal amounts of money into it, yet we all thought it had no value for the customer,” adding, “Whenever anyone asked why we were doing this, the answer was, ‘Because Jeff wants it.'” (GeekWire’s summary of the Fast Company report, January 2015). Three months after launch, Amazon CFO Tom Szkutak disclosed a $170 million write-down, “primarily related to Fire Phone inventory valuation and supplier commitment costs” (GeekWire, October 2014). (The price did its share, too; Amazon’s devices chief, David Limp, later told Fortune, “We didn’t get the price right.”) AI-Assisted Product Discovery – Conclusion: Run One Discovery Check Before Your Next Stakeholder Review You do not need an elaborate setup to try this. Take the sources you already have, for example, last month’s support tickets and contact form messages, the notes from your last ten user interviews, and last quarter’s product roadmap, and run questions 2 and 7 as two briefs against your current product goal. Then check the evidence inside the product team first, in your next refinement session or a dedicated discovery check, before anyone outside the team sees it: Open the sources, look for what the agent misread, and decide which findings you are willing to defend. Only once the team owns the argument does it go to the next stakeholder review, as a token for discussion, never as a decision. And when your agent’s second brief makes a convincing case next month that customers have stopped caring about the feature your product roadmap is built around, who in your organization has the authority to act? Questions This Article on AI-Assisted Product Discovery Answers Why Does Product Judgment Become the Bottleneck When AI Agents Write Code? Agentic coding removed the cost gate that once forced product teams to choose between ideas. When building a feature took weeks, weak ideas often died in a prioritization discussion; now a coding agent can build a working version of an idea in an afternoon. As Goldratt’s theory of constraints predicts, the constraint moves elsewhere, to product judgment: deciding which idea deserves customers’ attention. Should an AI Agent Make Product Decisions? No. Under the A3 Framework, product discovery analysis belongs in the Assist category: the agent reads customer feedback, usage data, stakeholder requests, and the organization’s past decisions and prepares the evidence, while the product team decides. The A3 Handoff Canvas records the agent’s stop rules before the first run: no ranking of ideas, no recommendations, and no moving items in the product backlog. What Data Should a Product Discovery Agent Analyze? A product discovery agent needs three families of sources. Passive sources arrive unasked: contact form messages, support tickets, analytics data, and stakeholder requirements. Active sources come from the product team’s own work, such as user interviews, observations, and user story mapping. Organizational memory covers past product goals, roadmap versions, rejected ideas with reasons, and money already spent; without it, the agent cannot detect sunk costs. How Do You Stop an AI Agent From Confirming Your Roadmap? Run the analysis as two briefs. The first brief collects the evidence for the current product goal; the second assumes the goal is wrong and builds the strongest case against it from the same data, citing every source. Language models tend to agree with the person asking: Seo, Atanasova, and Augenstein (2026) found all 14 models they tested susceptible to user opinions, regardless of size. How Does AI-Assisted Product Discovery Fail? They fail in five recurring ways: they overweight vocal customers, read meeting notes sanitized for comfort, produce polished briefs nobody checks, lose to the highest-paid person’s opinion, and deliver strategic findings to people without strategic authority. Amazon’s Fire Phone shows the HiPPO override at the top: engineers kept building a feature they believed had “no value for the customer” because Jeff Bezos wanted it.
Code review is the highest-leverage activity on most engineering teams, yet it is also the most expensive in terms of senior-developer time. What if you could offload a first pass to an LLM that understands Java idioms, common anti-patterns, SOLID principles, and security pitfalls — and get back structured, actionable feedback before a human even opens the PR? In this post, we will build exactly that: a self-contained Java application that accepts a Java source snippet, sends it to an LLM (OpenAI GPT-4o or a locally running Ollama model — your choice), and returns a structured list of code-quality findings with severity levels and suggested fixes. What you will build: A CodeReviewAssistant Java service backed by LangChain4j, which analyses Java code and returns structured improvement suggestions — runnable in under 10 minutes on your laptop. Prerequisites ToolVersionNotesJava JDK17+Records & sealed types usedMaven or GradleAny recentMaven snippets shown hereLangChain4j0.36.xLatest stable at time of writingOpenAI API key or Ollama—We show both No Spring, no frameworks — this is plain Java, so you can drop it into any stack. Step 1: Add LangChain4j to Your Project LangChain4j is the Java-native counterpart of the Python LangChain library. It gives you a clean, type-safe API over multiple LLM providers — OpenAI, Anthropic, Azure, Hugging Face, Ollama, and more — with zero vendor lock-in. Add the BOM and the provider module you want: XML <!-- pom.xml --> <dependencyManagement> <dependencies> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j-bom</artifactId> <version>0.36.2</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- Core --> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j</artifactId> </dependency> <!-- Choose ONE provider below --> <!-- Option A: OpenAI (GPT-4o, GPT-3.5-turbo, …) --> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j-open-ai</artifactId> </dependency> <!-- Option B: Ollama (runs locally, no API key needed) --> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j-ollama</artifactId> </dependency> </dependencies> Tip — local-first development: Start with Ollama + codellama or mistral so you can iterate without burning API credits. Switch to OpenAI GPT-4o for production quality by changing one line. Step 2: Model the Review Output as a Java Record LangChain4j's Structured Output feature can instruct the LLM to respond with JSON that maps directly onto a Java type. We define our domain model first: Java // Finding.java public record Finding( String severity, // "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "INFO" String category, // e.g. "Null Safety", "Performance", "Security" String description, // human-readable explanation String suggestedFix // concrete code-level recommendation ) {} // CodeReviewResult.java import java.util.List; public record CodeReviewResult( String summary, List<Finding> findings ) {} Using Java Records keeps the model immutable and removes boilerplate. LangChain4j will automatically build the JSON schema from these types and include it in the system prompt. Step 3: Define the AI Service Interface LangChain4j's AI Services abstraction is the cleanest part of the library. You declare an interface, annotate it with prompts, and the library generates a proxy at runtime — no boilerplate, no manual HTTP calls. Java import dev.langchain4j.service.SystemMessage; import dev.langchain4j.service.UserMessage; import dev.langchain4j.service.V; public interface CodeReviewService { @SystemMessage(""" You are a senior Java engineer performing a thorough code review. Analyse the provided Java code for: - Correctness and potential bugs - Null safety issues - Performance anti-patterns - Security vulnerabilities (injection, insecure randomness, etc.) - SOLID principle violations - Readability and naming conventions Return ONLY a JSON object matching the CodeReviewResult schema. Be concise but actionable. Severity: CRITICAL, HIGH, MEDIUM, LOW, INFO. """) @UserMessage("Review this Java code:\n\n```java\n{{code}\n```") CodeReviewResult review(@V("code") String javaCode); } How it works: The @SystemMessage sets the LLM's persona and instructions. The @UserMessage is the per-call prompt. @V("code") is a template variable — LangChain4j substitutes it at call time. Zero boilerplate. Step 4: Wire It All Together Now we create the LLM model, register our output type, and build the AI Service proxy. The entire wiring fits in one short class: Java import dev.langchain4j.model.openai.OpenAiChatModel; import dev.langchain4j.model.ollama.OllamaChatModel; import dev.langchain4j.service.AiServices; public class CodeReviewAssistant { public static void main(String[] args) { // ── Choose your provider ────────────────────────────────────────── // Option A: OpenAI (set env var OPENAI_API_KEY) var model = OpenAiChatModel.builder() .apiKey(System.getenv("OPENAI_API_KEY")) // never hardcode keys! .modelName("gpt-4o") .responseFormat("json_object") // enforce JSON mode .temperature(0.2) // low temp = consistent output .build(); // Option B: Ollama running locally on port 11434 // var model = OllamaChatModel.builder() // .baseUrl("http://127.0.0.1:11434") // .modelName("codellama") // .build(); // ───────────────────────────────────────────────────────────────── CodeReviewService reviewer = AiServices.builder(CodeReviewService.class) .chatLanguageModel(model) .build(); // ── Sample code to review ───────────────────────────────────────── String javaCode = """ public class UserService { private static Map<String, String> cache = new HashMap<>(); public String getUser(String id) { if (cache.containsKey(id)) return cache.get(id); String sql = "SELECT * FROM users WHERE id = " + id; // ... execute query return null; } } """; CodeReviewResult result = reviewer.review(javaCode); // ── Print results ───────────────────────────────────────────────── System.out.println("Summary: " + result.summary()); System.out.println(); for (Finding f : result.findings()) { System.out.printf("[%s] %s — %s%n", f.severity(), f.category(), f.description()); System.out.printf(" Fix: %s%n%n", f.suggestedFix()); } } } Step 5: Sample Output Running the above against that deliberately flawed snippet produces output like: Plain Text Summary: The code has a critical SQL injection vulnerability, a thread-safety issue with the shared HashMap cache, and returns null without documentation. [CRITICAL] Security — String concatenation builds a raw SQL query, making the method vulnerable to SQL injection attacks. Fix: Use PreparedStatement with parameterised queries: "SELECT * FROM users WHERE id = ?" with stmt.setString(1, id) [HIGH] Concurrency — HashMap is not thread-safe. Concurrent reads/writes will cause data corruption in multi-threaded environments. Fix: Replace with ConcurrentHashMap<>() or add explicit synchronisation. [MEDIUM] Null Safety — getUser() returns null without documentation. Callers have no contract to guard against NPEs. Fix: Return Optional<String> and document the empty-case semantics. [LOW] Performance — cache.containsKey() + cache.get() performs two lookups. Fix: Use cache.computeIfAbsent(id, k -> fetchFromDb(k)) instead. Going Further: Production Hardening 1. Streaming Responses for Large Files For large classes, swap the return type of your AI Service method to TokenStream and use onNext() / onComplete() to stream findings incrementally rather than waiting for the full response. 2. Memory and Conversation History LangChain4j's MessageWindowChatMemory lets you maintain multi-turn conversations — useful if you want the developer to ask follow-up questions about a specific finding. Java CodeReviewService reviewer = AiServices.builder(CodeReviewService.class) .chatLanguageModel(model) .chatMemory(MessageWindowChatMemory.withMaxMessages(10)) .build(); 3. RAG: Ground Findings in Your Own Style Guide Use EmbeddingStore + ContentRetriever to inject excerpts from your team's coding standards into every review. The LLM will then apply your own rules rather than falling back on generic advice. 4. CI/CD Integration Wrap the service in a small CLI tool (using picocli), wire it into your GitHub Actions or Jenkins pipeline, and post findings as PR comments via the GitHub REST API. This enables a first-pass AI review before any human reviewer opens the PR. Key Takeaways LangChain4j AI Services let you express LLM interactions as plain Java interfaces — no HTTP plumbing, no JSON parsing.Structured Output (records + JSON schema) eliminates fragile string parsing; you get strongly typed results directly.Provider-agnostic design means you swap one builder line to move between OpenAI, Ollama, Anthropic, or Azure with zero business logic changes.Keep API keys in environment variables — never in source code.Start local (Ollama) to iterate fast, then promote to a hosted model for production quality. Further Reading LangChain4j official docsAI Services tutorialOllama — CodeLlama modelOpenAI Structured Outputs guide
Most teams treat a broken web scraper as a chore. Someone notices bad data, opens the page in a browser, patches a selector, and redeploys. That works when you have one scraper and someone who looks at its output every day. It stops working when you have a dozen, and the breakage surfaces a week later as a strange number in a downstream report. In this article, I walk through how I built scrapers that are cataloged, health-checked, traced, and repaired like any other production service, with an LLM proposing fixes and plain Python deciding whether those fixes ship. The project came out of the WeMakeDevs hackathon, where it took first place. The product itself is small: it pulls about twelve days of TV guide data across three streaming providers, ranks the top ten upcoming movies and top ten upcoming shows, and lets you record any of them on Philo with one click. I am going to skip the product and focus on the plumbing: the drift rules, the state model, the verifier, and the code behind each. Those pieces carry over to any team that runs scrapers, or to any team that lets an LLM modify a live system. The architecture follows one split. Diagnosis is probabilistic; acceptance is not. The LLM figures out what broke and proposes a repair. A deterministic diff against a frozen sample decides whether that repair is correct, and nothing gets promoted without passing it. Why Do Scrapers Fail, and Why Old Fixes Are Not Enough The usual way to build a scraper is with structural selectors. Someone opens the page, finds that the airtime lives in div.card > span:nth-child(3), and hard-codes it. This is fragile by nature because it describes where something is, not what it is. Rename a CSS class and it fails. Reorder elements and it fails. Wrap the time in a new tag and it still fails. There is a newer, AI-based approach: you write what the data means, and a model finds it in the webpage DOM. For my project, I tried Bright Data's Scraper Studio, which creates a collector from a natural-language prompt. When you build the channel-schedule scraper, the prompt example reads like the following: Python PROMPT = ( "This page lists a TV channel's upcoming schedule as program cards. Extract every " "program card. For each: the program title as title, the episode title if shown as " "episode_title, the airing date exactly as displayed (like Sat, Aug 22) as date_raw, " "the start time exactly as displayed (like 2:00 PM) as start_raw, the time range text " "if shown (like Sat, Aug 22 2:00 PM - 2:30 PM) as time_range_raw, the category text " "as category. Include every card.") Notice what is not in there: no class names, no element positions, no DOM paths. The prompt describes everything. That matters for two reasons. First, a semantic description survives a redesign far better than a selector does, and second, this is the part that took me a while to appreciate: the prompt is the healing artifact. When the scraper drifts, the repair tool reasons over that same description plus a plain-language symptom report. A prompt that said "the third span inside each grid cell" would give the healer nothing to work with. Also notice date_raw and start_raw. I always capture the raw displayed string alongside any parsed value. If start_raw is "8:00 PM" but start_utc parsed to null, that is not a data quirk. That is a drift signal, and one of the detection rules below keys on exactly that. AI extraction alone does not solve the problem, though. It reduces the breakage rate, but it cannot eliminate it, and it introduces a new risk. When you ask a model to repair a scraper, how do you know the repair is correct? A model will confidently produce output for a broken extraction. Two rows that look plausible are still two rows when there should be thirty. Scrapers as Cataloged Services With Health States The first design decision was to stop treating scrapers as scripts and start treating them as services with an on-call rotation. Each scraper is a cataloged entity in an internal developer portal in Port IO, another vendor in the hackathon, with a health property that moves between healthy, drifting, and broken. Every scrape run is its own entity with a status of success, drift, or error. Every repair attempt is a heal_event with its trigger being the drift description. Once scrapers are entities with state, the rest of the platform falls out. Workflows react to entity changes. A scrape_run landing in success triggers publish. A scrape_run landing in error or drift triggers heal. Scheduled workflows kick off the daily scrape at 08:00 UTC and the catalog refresh at 07:30. A scorecard grades each scraper from Basic through Bronze, Silver, and Gold based on whether it verified today, whether verification is passing, and whether it is currently healthy. An operator dashboard shows all the scrapers by health, the recent health events, and the current ranked output. None of this is new. It is what you would do for any microservice. The point is that scrapers rarely get this treatment, and they need it more than most services because their upstream is a third party that ships changes without telling you. Detecting Drift Deterministically Before you can repair anything, you have to notice what is broken, and you have to notice it without a human staring at the output. I wrote seven deterministic drift rules that run on every scrape in plain Python, with no model involved. The thresholds live in one place: Python REQUIRED_FIELDS = ("channel", "title", "start_utc") NULL_RATE_LIMIT = 0.10 EMPTY_PAGE_LIMIT = 0.20 # >20% of channel pages returning nothing is breakage CHANNEL_COLLAPSE = 0.80 # <80% of the requested channels yielding rows is breakage LINEUP_DELTA_LIMIT = 0.10 # >10% channel-set churn needs two confirming runs The row band sets how many rows a single channel page should yield. A page returning 3 cards for a channel that airs around 40 programs a day is broken, not news; so is one returning thousands. Python PAGE_ROW_BANDS = (15, 800) Alongside the row band, the rules check the null rate of required fields, the case where a raw time is present but the parsed time is null, channel collapse (fewer than 80 percent of requested channels yielding rows), the empty-page rate, a change in the schema hash of returned keys, and lineup disappearance. That last one deserves a note because it exposes the hardest problem in drift detection. A broken scraper and a legitimately changed source look identical in a single sample. If 15 percent of channels vanish from a provider's lineup, that could be a scraper failure, or it could be a real carriage change, which happens regularly with streaming lineups. I handle it two ways. Lineup churn requires two consecutive runs agreeing before it is accepted as real. A single run showing the change is flagged as unconfirmed drift. If the scraper still reproduces the expected output from a frozen HTML page, the scraper is fine, and the source actually changed. Python delta = _lineup_delta(prev["rows"], rows) if delta > LINEUP_DELTA_LIMIT: signature = f"lineup:{_channel_sig(rows)}" seen = state.confirm_change(state_key, signature) if seen < 2: drift.add("lineup_change", f"channel set moved {delta:.0%} (unconfirmed, run {seen}/2)") One problem I encountered: a single collector serves all three providers because every channel page on the guide site has the same structure. But drift state has to be keyed per collector:provider pair because comparing one provider's channel set to another provider's snapshot reads as mass channel loss. When drift is detected, two things happen. The pipeline immediately sets the scraper's health to drifting in the catalog (the fast path, within seconds). It also increments a scraper.drift.detected metric that an alert rule in the observability stack (SigNoz, the third hackathon sponsor) watches, firing a webhook roughly five minutes later (the safety net, and the only path that catches a pipeline that died entirely and never ran the inline detector). Both paths hit the same idempotent /heal endpoint. Whichever fires first does the work; the other finds the scraper already healthy and exits. The Repair Loop and the Gate Here is the heal flow, with the part I care most about in the middle: Plain Text /heal → scraper heal (semantic symptom description) → preview_result | Verifier: diff vs frozen fixture | ┌───────────┴───────────┐ pass fail | | approve reject | | healthy broken | human queue The heal itself is delegated. Bright Data's scraper /heal command takes a collector ID and a plain-language description of what broke, reasons over the original semantic prompt, and returns a proposal in an awaiting_approval state with a preview_result of what the repaired scraper would extract. In my system, a Triage agent in the developer portal authors that symptom description by reading the run and heal history. That is judgment, and I was skeptical of handing it to a model, so I decided to introduce a verifier. The verifier is deliberately not an agent: Python """The Verifier -- deliberately NOT an agent. Judgment goes to the LLM agent; proof stays deterministic. A verification gate you cannot trust deterministically is not a gate, so this is plain code: normalise both sides, diff, return a verdict. It is the only thing allowed to authorise a promotion. """ COMPARE_FIELDS = ("title", "date_raw", "start_raw") def verify(provider: str, rows: list[dict]) -> Verdict: want, got = _normalise(expected(provider)), _normalise(rows) if want == got: return Verdict(True, []) diff = [] missing = [w for w in want if w not in got] extra = [g for g in got if g not in want] if len(want) != len(got): diff.append(f"row count {len(got)}, expected {len(want)}") for item in missing[:3]: diff.append(f"missing {item}") for item in extra[:3]: diff.append(f"unexpected {item}") return Verdict(False, diff) It normalizes both sides (strip, lowercase, round floats), sorts, and compares. If the diff passes, the healer approves the proposal and sets health back to healthy. If it fails, the healer explicitly rejects the proposal, sets health to broken, writes a heal_event with outcome rolled_back, and leaves the scraper in a human's queue. The fixture that backs this is three files: channel.html, a real captured channel page trimmed to 30 program cards; channel.expected.json, the hand-checked correct output for that exact page; and channel.mutated.html, the same 30 programs with every structural hook deliberately broken. Classes are renamed, card order is shuffled, and airtimes sit inside extra wrapper elements. That file lets the tests and the demo trigger drift on demand. A selector-based scraper fails on it; a semantic one should not. I enforce two rules about fixtures, and I wrote them into the repo's agent instructions so the coding agent working on the codebase would respect them too. Fixtures are frozen inputs (hardcoded schema) never regenerated to make a test pass, and a rejected bad repair is a success, not a failure. That second one is counterintuitive until you think about what the alternative is. A repair that gets promoted without proof is exactly how a broken scraper silently poisons everything downstream. Walking Through a Rejected Repair The case this design exists for is a repair that looks fine and is wrong. Here is the state sequence from a real end-to-end run where that happened: A fault-injected run produced a scrape_run entity with status error.The event workflow fired, and the Triage agent wrote a drift description from the run and heal history.The /heal endpoint sent that description to the vendor and got back a proposal in awaiting_approval, with a preview_result.The verifier diffed the preview against channel.expected.json and returned row count 2, expected 30.The healer rejected the proposal, set health to broken, wrote a heal_event with outcome rolled_back, and queued it for a human.The next clean scheduled run passed every drift rule and moved health back to healthy. The proposal in step 3 was well-formed and confidently produced. Without step 4, it would have been promoted as the fix, and the ranking would have been built from 2 programs instead of 30 while the system recorded the repair as a success. Observability To make every heal cycle inspectable after the fact, the whole pipeline runs under OpenTelemetry auto-instrumentation with traces, metrics, and logs shipped to SigNoz (self-hosted locally and exposed over ngrok). The trace for a scrape run has one scrape.fetch span per channel page (tagged with provider, channel ID, row count, and fetch mode) followed by scrape.extract, scrape.validate, and when relevant scrape.heal.reprompt and scrape.verify.fixture. Because the FastAPI service itself is instrumented, even the developer portal's automation calling /heal shows up as a span. The drift description, the heal prompt, and the verifier's diff are all logged inside the relevant span, so trace_id is attached automatically. The developer portal's own action and workflow runs, and the scraping vendor's remaining budget, are not things those systems emit anywhere, so a small background watcher samples both and re-emits them as metrics. Runs are de-duplicated in SQLite so a restart never double-counts. Applying the Same Split to Shipping Code Once the pattern worked for scraper repair, I applied it to the software change loop, too. A feature request submitted through the portal becomes a requirement entity, which triggers a local coding agent (Claude Code, running on my machine with file tools only) to edit a scratch clone. Then deterministic code takes over: branch, commit, push, open a PR with a fixed first-line contract that the deploy workflow parses later. GitHub Actions runs pytest, a TypeScript type check, and the Next.js build. A human reviews and merges. Only then does the deploy workflow ship it and flip the requirement to deployed. The agent is forbidden from touching fixtures, the verifier module, and the drift thresholds, and the run aborts if the resulting diff touches any of them. The model gets to write the feature. Implementation Checklist If you build something similar, these are the details that mattered most in practice: Store start_raw next to start_utc, and follow the same pattern for every parsed field. A raw value that is present alongside a null parsed value was the earliest and most dependable drift signal in this build. If one scraper serves multiple providers, key drift state by collector:provider, not by collector. Otherwise, one provider's channel set gets compared to another's snapshot and reads as mass channel loss. Route the inline detector and the alert webhook to the same /heal endpoint, and make it a no-op when the scraper is already healthy. With two triggers, duplicate calls are a certainty, not an edge case. Require two consecutive runs to agree before accepting a lineup change as real. A single sample cannot tell a broken scraper from a changed source. Write the "fixtures are frozen" rule down where both humans and coding agents will read it. The temptation to regenerate expected output to make a red test green is strong, and an agent will do it without hesitation if you have not told it not to. Draw a hard line between diagnosis and acceptance. Diagnosis can be fuzzy. Acceptance should be code short enough to read on one screen and trust completely. Limitations To be fair about what this is and is not, the factory runs on the operator's machine, reached from the cloud through a tunnel, so the portal operates it but does not host it. The catalog scraper has no fixture because the catalog legitimately changes daily. There is no retry or backoff on vendor calls. And the Triage agent's reasoning over long run histories is shallow. It authors a good symptom description, but it is not yet doing root-cause analysis. But the core loop — detect deterministically, repair with judgment, promote only on proof — has now survived both the happy path and a real rejected repair, and I think it is the right shape for anyone letting an agent touch production data.