<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anitesh Shaw on Medium]]></title>
        <description><![CDATA[Stories by Anitesh Shaw on Medium]]></description>
        <link>https://medium.com/@emailanitesh?source=rss-9b26daf9ebb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GQKTAMg4ABLRw1K8</url>
            <title>Stories by Anitesh Shaw on Medium</title>
            <link>https://medium.com/@emailanitesh?source=rss-9b26daf9ebb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:33:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@emailanitesh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Self-Healing Playwright Tests — With No AI Anywhere In Sight]]></title>
            <link>https://medium.com/@emailanitesh/self-healing-playwright-tests-with-no-ai-anywhere-in-sight-9151f306d522?source=rss-9b26daf9ebb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9151f306d522</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[sdet]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[test-automation-framework]]></category>
            <category><![CDATA[self-heal]]></category>
            <dc:creator><![CDATA[Anitesh Shaw]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 13:10:56 GMT</pubDate>
            <atom:updated>2026-08-21T13:10:56.042Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A deterministic self-healing test pipeline built out of a Judge, a Mechanic, and a handful of hard guardrails. No model calls. No prompts. No tokens. Just a system that fixes locator drift on its own and refuses — structurally — to ever hide a real bug.</em></p><blockquote><em>After a long time, here’s an engineering write-up about a solution with </em><strong><em>no AI embedded in it at all</em></strong><em>.</em></blockquote><blockquote><em>That feels almost contrarian in 2026. Everything ships with a copilot bolted on. So this one sits a little outside the trend — but I think it’s worth your time if you have a few minutes, because the </em>reason<em> it has no AI is the most interesting part of the design, not an afterthought.</em></blockquote><p>If you run UI tests at any real scale, you already know the enemy. Let me show you how we beat it with a few hundred lines of boring, auditable Node.</p><h3>The problem: your tests aren’t flaky, they’re stale</h3><p>Picture a normal Tuesday. A frontend build ships. Somewhere in that diff, a developer renames a data-testid from services-grid to services-grid-v2 — a completely reasonable refactor. Nobody did anything wrong. The app renders perfectly.</p><p>By the next morning, a third of your Playwright suite is red.</p><p>Nothing is broken. Your tests are simply looking for an element by a name that no longer exists. This is <strong>locator drift</strong>, and in most pipelines it is the single largest source of what teams <em>call</em> “flakiness” — even though it isn’t flaky at all. It’s deterministic. It’s a rename that your test code never heard about.</p><p>The industry’s default 2026 answer is to point a language model at the failure: <em>“this test failed, make it pass.”</em> And it works — right up until the afternoon the model makes a <strong>value assertion</strong> pass by quietly editing the expected number. Your build goes green. Your product is wrong. And the one signal you actually trusted — a failing test — has been overwritten by a machine optimizing for “green,” not “correct.”</p><p>That single failure mode is why we went the other way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*laRtBERaZ254_PudC4QFLw.png" /></figure><p><em>Figure 1 — A locator rename turns a healthy app into a red suite. The app works; the test just can’t find the element.</em></p><h3>The core idea: heal mechanics, never meaning</h3><p>Every test failure falls into exactly one of two buckets. The entire framework is an honest, mechanical enforcement of this table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3voSjloaBQpvzNWOrUb28A.png" /></figure><p>A “self-healing” system that can’t tell these two apart isn’t healing anything — it’s laundering failures into false confidence. So the guiding rule became a single sentence:</p><blockquote><strong><em>Fix how a test finds things. Never touch what a test believes.</em></strong></blockquote><p>The “fix” is never a guess. It is a <strong>rename discovered from the running DOM</strong>. If the app now serves exactly one variant of the old id, that’s the answer. If it’s ambiguous, we escalate rather than gamble. That one decision is what makes the whole thing safe enough to run unattended in CI.</p><h3>Why we designed it this way (and not with a model)</h3><p>We deliberately optimized for four properties that a prompt-driven approach struggles to guarantee:</p><ul><li><strong>Auditability.</strong> Every decision is a regex and a set-membership check. You can read the logic top to bottom and know <em>exactly</em> why it acted. There is no temperature, no non-determinism in the tool itself.</li><li><strong>Reproducibility.</strong> The same failure always yields the same heal. A CI re-run never produces a different diff.</li><li><strong>A hard trust boundary.</strong> The scariest thing an automated fixer can do to a test suite is make a <em>wrong</em> test pass. Our design makes that <strong>structurally impossible</strong> — the healer literally cannot edit a line that contains an assertion.</li><li><strong>Cost and speed.</strong> It’s zero-dependency Node. No API keys, no network, no rate limits, no per-run token bill.</li></ul><p>Determinism here isn’t a limitation we settled for. It’s the feature we were selling.</p><h3>Architecture at a glance</h3><p>The system is intentionally small: a demo app, a Playwright suite backed by page objects, and two tiny Node scripts — the <strong>Judge</strong> and the <strong>Mechanic</strong> — coordinated by CI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYTs8cW81xXQl56NbosUEQ.png" /></figure><p>The important boundary is that the Mechanic <strong>reads</strong> the app DOM (never writes it) and <strong>writes</strong> only to page objects on an allowlist (never to app source or assertions).</p><h3>The demo app: drift that looks exactly like production</h3><p>To make this reproducible without any backend, the demo is a single static HTML dashboard. The one detail that makes it <em>realistic</em> is here:</p><pre>&lt;!-- SELF-HEAL DRIFT TARGET<br>     data-testid=&quot;services-grid&quot;  -&gt;  data-testid=&quot;services-grid-v2&quot;<br>     The page object still looks for the OLD id, so the test fails until healed. --&gt;<br>&lt;div class=&quot;services-grid&quot; id=&quot;servicesGrid&quot; data-testid=&quot;services-grid&quot;&gt;&lt;/div&gt;</pre><pre>&lt;script&gt;<br>  function render() {<br>    // The app finds its own grid with a PREFIX match, so it keeps working<br>    // even after the id is renamed. Playwright&#39;s getByTestId is EXACT, so it breaks.<br>    const grid = document.querySelector(&#39;[data-testid^=&quot;services-grid&quot;]&#39;)<br>              || document.getElementById(&#39;servicesGrid&#39;);<br>    // ...renders 6 service cards...<br>  }<br>  render();<br>&lt;/script&gt;</pre><p>This mirrors a real shipped build perfectly: the <em>application</em> uses a tolerant prefix selector and keeps rendering, while the <em>test</em> uses Playwright’s getByTestId, which is an <strong>exact</strong> match. Rename the id and the app is fine — the test is not. That asymmetry is the entire reason locator drift exists in the wild.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7J20tPKI-BiPlsNq9qBqug.png" /></figure><p><em>Figure 2 — The demo dashboard. Zero backend, deterministic data, fully test-id instrumented.</em></p><h3>The page object: the only thing allowed to change</h3><p>Tests never touch raw selectors. They go through a page object, and the drift-prone locator lives on exactly one line:</p><pre>export class DashboardPage {<br>  // ...<br>  constructor(page: Page) {<br>    this.appTitle     = page.getByTestId(&#39;app-title&#39;);<br>    this.refreshButton = page.getByTestId(&#39;refresh-button&#39;);<br>    // --- Drift target: the id below is what drifts in the app. ---<br>    this.servicesGrid = page.getByTestId(&#39;services-grid&#39;);<br>  }<br>}</pre><p>When services-grid drifts to services-grid-v2, <strong>this line</strong> is the single, surgical thing the Mechanic is permitted to rewrite. Nothing else.</p><h3>The two roles: a Judge and a Mechanic</h3><p>Here’s the whole flow, laned by responsibility — the machine does everything except the final human call:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*WdOfG8VPYwFNOTt18z0YBw.png" /></figure><p>Everything inside the CI lane runs with no human in the loop. A person only appears at the end — to approve a one-line diff, or to fix a real bug the framework deliberately refused to paper over. Green is the heal path; red is escalation.</p><h3>The Judge — run and classify</h3><p>The Judge runs the test slice with Playwright’s JSON reporter and reads the failures. For each one it decides: locator-not-found / timeout (<strong>healable</strong>) or value mismatch (<strong>non-healable</strong>). Crucially, a timeout is healable <em>even when it’s wrapped in an assertion</em> — because await expect(locator).toBeVisible() that times out is a mechanics failure, not a business one.</p><pre>function classifyMessage(msg) {<br>  const notFoundOrTimeout =<br>    /(element\(s\) not found|waiting for\s+(?:locator|getByTestId)|TimeoutError|Timeout\s+\d+ms\s+exceeded)/i.test(msg);<br>  const valueMismatch =<br>    /(toBe\(|toEqual\(|toContain\(|Expected:\s*\d)/i.test(msg);<br>  if (notFoundOrTimeout) return &#39;healable-mechanics-failure&#39;;<br>  if (valueMismatch)      return &#39;non-healable-business-or-assertion-failure&#39;;<br>  return &#39;non-healable-business-or-assertion-failure&#39;; // default: assume it&#39;s real<br>}</pre><p>Note the default: <strong>when in doubt, treat it as a real bug.</strong> The framework would rather escalate a healable failure than heal a real one. The verdict is written to self-heal/last-run.json for the Mechanic to consume.</p><h3>The Mechanic — discover, patch, prove</h3><p>The Mechanic reads the verdict and acts <em>only</em> on healable failures. It scans the live DOM (read-only) for all data-testid values, then discovers the drift target with a deliberately conservative rule:</p><pre>function discoverDriftTarget(failingSelector, domIds) {<br>  if (!failingSelector) return null;<br>  if (domIds.has(failingSelector)) return null;              // still present -&gt; not drift<br>  const variants = [...domIds].filter(<br>    (id) =&gt; id !== failingSelector &amp;&amp;<br>      (id.startsWith(`${failingSelector}-`) || failingSelector.startsWith(`${id}-`))<br>  );<br>  return variants.length === 1 ? variants[0] : null;         // ambiguous -&gt; escalate, don&#39;t guess<br>}</pre><p>One variant → heal it. Zero or many → hands off. And the patch itself has a guardrail baked in — it refuses any line that carries an assertion:</p><pre>const before = src.split(&#39;\n&#39;).find((l) =&gt; l.includes(needle))?.trim();<br>// Guardrail: never touch a line that also carries an assertion.<br>if (before &amp;&amp; /expect\(|toBe\(|toEqual\(|toContain\(/.test(before)) {<br>  return { ok: false, reason: &#39;refused: target line contains an assertion (not a mechanics-only fix)&#39; };<br>}</pre><p>After patching, it <strong>re-runs the exact slice</strong> to prove the fix — up to maxAttempts. A heal isn&#39;t &quot;done&quot; until the re-run is green.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*VejxD_AC9-OabGw-NOTMfQ.png" /></figure><p><em>Figure 3 — </em><em>npm run heal: the Judge classifies the failure as healable, the Mechanic discovers </em><em>services-grid → services-grid-v2, patches the page object, and the re-run goes green.</em></p><h3>The guardrails are the product</h3><p>Anyone can write a script that edits files until a test goes green. The value here is everything it <strong>refuses</strong> to do:</p><ul><li><strong>Scope lock.</strong> It only edits files under a configured allowlist (pages, fixtures). Application source and test specs are off-limits.</li><li><strong>Assertion guard.</strong> If a locator shares a line with expect(, toBe(, toEqual(, or toContain(, the Mechanic refuses. That&#39;s not a mechanics-only change.</li><li><strong>No ambiguity.</strong> More than one candidate id means no heal.</li><li><strong>Proof, not hope.</strong> A heal isn’t accepted until the re-run passes.</li><li><strong>Everything is a reviewable diff.</strong> No silent mutations — every heal is a page-object diff plus a written report in self-heal/.</li></ul><p>Because it can never edit an assertion or an expected value, it <strong>cannot</strong> turn a real bug green. That property is exactly what lets a team trust it running on every push.</p><h3>The workflow: edit, push, get a PR</h3><p>There’s no synthetic “drift injector” in the real loop. Drift happens the way it happens in production — someone changes the app:</p><ol><li>A build renames a data-testid. A developer pushes.</li><li><strong>CI runs the tests.</strong> The drifted test fails.</li><li><strong>The Judge classifies</strong> it as healable.</li><li><strong>The Mechanic heals</strong> the page object and re-runs to green.</li><li>CI <strong>opens a pull request</strong> with the fix — it never pushes to your branch directly.</li><li>A bot <strong>posts the PR link and a summary to Slack.</strong></li></ol><p>A human still clicks merge. The framework did the boring 95% — finding the rename and writing the one-line patch — and handed back a diff to approve. And if the failure was a <em>real</em> bug, step 4 sends a “needs a human” Slack message instead of a PR. The signal survives.</p><pre># Judge: run the suite and classify failures (locator drift vs real bug).<br>- name: Judge — run tests and classify<br>  env: { SELF_HEAL_SOFT_EXIT: &quot;1&quot; }<br>  run: node scripts/self-heal-orchestrate.mjs --grep all</pre><pre># Mechanic: heal drifted page-object locators and rerun to prove the fix.<br>- name: Mechanic — heal locator drift and rerun<br>  env: { SELF_HEAL_SOFT_EXIT: &quot;1&quot; }<br>  run: node scripts/self-heal-apply.mjs</pre><pre># Open a PR with the healed page object (no direct pushes to your branch).<br>- name: Open self-heal pull request<br>  id: cpr<br>  uses: peter-evans/create-pull-request@v6<br>  with:<br>    add-paths: pages<br>    branch: self-heal/${{ github.ref_name }}<br>    title: &quot;🔧 Self-heal: locator drift on ${{ github.ref_name }}&quot;<br>    body-path: self-heal/heal-summary.md</pre><pre>- name: Notify Slack<br>  if: always()<br>  env:<br>    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}<br>    RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>  run: node scripts/notify-slack.mjs --pr-url &quot;${{ steps.cpr.outputs.pull-request-url }}&quot;</pre><p>One subtle but important detail: in a self-heal pipeline a failing test is <em>expected input</em>, not a build error. So the Judge and Mechanic honor a SELF_HEAL_SOFT_EXIT flag that keeps the job green while the real verdict lives in last-run.json. The pipeline&#39;s health reflects <em>&quot;did the loop run correctly,&quot;</em> not <em>&quot;did every test pass on the first try.&quot;</em></p><p>The Slack message is assembled from the Mechanic’s next-action.json, so the headline adapts to the outcome — a green &quot;fixed N drifts&quot; with the PR link, or a red &quot;real bug, needs a human&quot;:</p><pre>let headline;<br>if (next.action === &#39;rerun&#39; &amp;&amp; next.healed) {<br>  headline = `:white_check_mark: *Self-heal fixed ${healed.length} locator drift(s)*`;<br>} else if (next.action === &#39;create-bug&#39;) {<br>  headline = `:lady_beetle: *Real bug detected (non-healable)* — needs a human`;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*WpfxDd6pKojX2fqDWu7kkA.png" /></figure><p><em>Figure 4 — The pull request the pipeline opens: a single-line locator change, plus a generated summary of what was healed and why.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*K4xlwqvDANu294TtKn51NA.png" /></figure><p><em>Figure 5 — The Slack notification: healed selectors, escalations, and the PR link — so the team sees the outcome without opening the pipeline.</em></p><h3>Why this approach matters</h3><p>Zoom out from the code and the point is bigger than locators. Test suites are a <strong>trust instrument</strong>. Their entire value is that a red result means “stop, something is wrong.” The moment an automated system can flip red to green without a human understanding <em>why</em>, that instrument is compromised — and every green build afterward is worth a little less.</p><p>This design draws a bright line through that risk:</p><ul><li>It <strong>automates the tedium</strong> (renames, drift, noise) that erodes trust in a suite because people stop believing the reds.</li><li>It <strong>preserves the signal</strong> (real assertions, real bugs) that is the whole reason the suite exists.</li><li>It <strong>keeps a human at the merge</strong>, so authority over “is the product correct?” never leaves people.</li></ul><p>That’s not anti-automation. It’s automation that knows its lane.</p><h3>Future exploration: so where would AI fit?</h3><p>Here’s the honest counterpoint — and the section I promised myself I’d write. Going AI-free was the right call for the <em>decision that ships code</em>. It is <strong>not</strong> an argument that AI has no place anywhere near this system. It’s an argument about <strong>where</strong> a wrong answer is cheap and reviewable versus where it’s catastrophic.</p><p>There’s a clean, safe design for adding AI <em>around</em> the deterministic core without ever letting it hold the merge pen:</p><ul><li><strong>Fuzzy drift discovery.</strong> Today the Mechanic only heals a clean suffix rename (services-grid → services-grid-v2). When a build does something messier — services-grid → service-cards-container — a model could <em>propose</em> the mapping from DOM structure and surrounding text. Still gated behind the same &quot;exactly one candidate, human-approved PR&quot; guardrail. AI suggests; the guardrail decides.</li><li><strong>Richer classification.</strong> For a novel stack trace the regex Judge can’t parse, an LLM could summarize and <em>recommend</em> a bucket — while being structurally forbidden from <em>acting</em> on it. The default stays “assume it’s a real bug.”</li><li><strong>Human-friendly PR narration.</strong> Turn the deterministic diff and heal-summary.md into a crisp, reviewer-ready explanation in the PR body. Zero risk: it&#39;s describing a change that already happened, not making one.</li><li><strong>Selector-health foresight.</strong> Feed historical drift into a model to flag brittle test-ids <em>before</em> they break — a linter for locator risk, not an autofixer.</li><li><strong>Triage assistant for escalations.</strong> When a real bug is detected, draft the bug report, cluster it with similar failures, and suggest an owner — leaving the fix to an engineer.</li></ul><p>The architectural principle that makes all of this safe is one ordering, applied everywhere:</p><blockquote><strong><em>AI proposes. Deterministic guardrails decide. Humans approve anything that changes meaning.</em></strong></blockquote><p>Keep the model on the <em>suggestion</em> side of that line and you get the best of both worlds — the creativity of a model where it’s cheap to be wrong, and the ironclad trust boundary where it isn’t.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9151f306d522" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecting AgentOps Telemetry: How I Built Observability for AI Coding Agents with Lifecycle…]]></title>
            <link>https://medium.com/@emailanitesh/architecting-agentops-telemetry-how-i-built-observability-for-ai-coding-agents-with-lifecycle-d4ed71e38237?source=rss-9b26daf9ebb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4ed71e38237</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentops]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Anitesh Shaw]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 21:53:22 GMT</pubDate>
            <atom:updated>2026-04-29T21:53:22.941Z</atom:updated>
            <content:encoded><![CDATA[<h3>Architecting AgentOps Telemetry: How I Built Observability for AI Coding Agents with Lifecycle Hooks</h3><p><em>A technical deep dive into AI agent observability, lifecycle hooks, telemetry pipelines, privacy-safe analytics, and the engineering leadership decisions behind an enterprise AgentOps platform.</em></p><p>AI coding agents are quickly becoming part of modern software delivery. They can read code, inspect repositories, call tools, generate tests, review pull requests, and delegate work to specialized subagents. That makes them powerful, but it also creates a new engineering problem: how do you observe a system where the execution path is not deterministic?</p><p>As an architect and technical lead, I recently led the design of an enterprise AgentOps telemetry layer for a portfolio of AI engineering assistants. The platform brought together multiple domain-focused AI capabilities across quality engineering, code review, test design, automation, performance analysis, accessibility checks, and release readiness. My role was to shape the architecture, define the telemetry model, guide implementation patterns, and make sure the solution could be adopted consistently across teams. The exact assistant names do not matter here. The interesting part is the architecture: using lifecycle hooks to turn AI agent sessions into structured, privacy-safe telemetry.</p><p>Building the AI assistants was only the first milestone. The bigger challenge came when teams started using them in daily engineering work. I needed to answer questions that every engineering leader eventually asks about AI adoption:</p><ul><li>Which AI capabilities are actually being used?</li><li>Which teams and repositories are seeing value?</li><li>How long do agent sessions take?</li><li>Which tools are slow or unreliable?</li><li>Where are users getting blocked?</li><li>Are we improving developer productivity, or just adding another shiny tool?</li></ul><p>Traditional application monitoring was not enough. These were not REST APIs with middleware, request IDs, and predictable call stacks. They were AI agent sessions running inside a developer workflow, where a single prompt could trigger dozens of tool calls, file reads, searches, terminal commands, delegated agents, retries, and context-compaction events.</p><p>So I designed a lightweight observability layer around hook-based lifecycle events. The result was a small but effective AgentOps telemetry system: seven scripts, one structured event log, a privacy-first schema, and a dashboard that converted raw agent activity into adoption, reliability, and performance insights.</p><p>All sample metrics and names in this article are illustrative. They are not production data.</p><h3>Why AI Agent Observability Is Different</h3><p>Most observability platforms assume a request-response model. A request enters a service, flows through known dependencies, emits traces, and returns a result. That model works well for APIs and microservices.</p><p>AI agent workflows behave differently. A user starts a conversation, the model reasons through the task, and the agent chooses tools dynamically. It may search the workspace, read files, invoke a shell command, ask a subagent to investigate something, retry after a failed call, or compact context halfway through the session. Two users can ask similar questions and get very different execution paths.</p><p>From an observability perspective, the agent session is closer to an event stream than a transaction. The platform needs to capture the shape of the work without capturing sensitive user content.</p><p>The telemetry layer needed to measure:</p><ul><li><strong>Session boundaries</strong> — when an agent session starts and stops</li><li><strong>Prompt metadata</strong> — prompt length and command pattern, not the raw prompt text</li><li><strong>Tool-call telemetry</strong> — tool name, duration, success/failure, and payload size indicators</li><li><strong>AI capability activation</strong> — which capability modules were selected during the session</li><li><strong>Subagent lifecycle</strong> — when delegated agents started and completed</li><li><strong>Error classification</strong> — actionable buckets such as timeout, permission, authentication, and network failures</li><li><strong>Adoption signals</strong> — active users, active repositories, repeat usage, and trends over time</li></ul><p>The leadership goal was not just instrumentation. It was governance. If teams are going to depend on AI-assisted engineering workflows, technical leaders need a way to measure reliability, adoption, and operational risk.</p><h3>Architecture: Hook-Based AgentOps Telemetry</h3><p>The core architecture is intentionally simple. Lifecycle hooks fire during key moments in an agent session. Each hook runs a short script, enriches the event with safe metadata, and appends one row to a structured event log. A client-side dashboard reads that event log and turns it into usage analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-7ZF8RN9DqDnIJ3QYrVjg.png" /></figure><p>The design decision was deliberate: keep telemetry close to the developer workflow, avoid heavyweight infrastructure at the first stage, and optimize for explainability. The initial version did not need a database, message broker, or cloud service. It needed reliable event capture, a clear schema, and a dashboard that engineering leaders could use to understand adoption and reliability.</p><p>This is the architectural pattern I wanted:</p><ul><li>Hooks capture lifecycle events.</li><li>Short scripts enrich and normalize the event.</li><li>A structured append-only log becomes the source of truth.</li><li>Analytics are computed outside the agent loop.</li><li>Sensitive user content never enters the telemetry stream.</li></ul><h3>Lifecycle Hook Registration</h3><p>The lifecycle hooks are registered through a JSON configuration that maps events to scripts. The example below is intentionally representative. Paths and names should be adapted to your own environment and governance model.</p><p>The most important design element is the timeout budget. Hooks run inline with the agent workflow, so every script must be fast and predictable.</p><pre>{<br>  &quot;hooks&quot;: {<br>    &quot;SessionStart&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/session-start.ps1&quot;,<br>        &quot;timeout&quot;: 10<br>      }<br>    ],<br>    &quot;UserPromptSubmit&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/prompt-submit.ps1&quot;,<br>        &quot;timeout&quot;: 5<br>      }<br>    ],<br>    &quot;PreToolUse&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/pre-tool-use.ps1&quot;,<br>        &quot;timeout&quot;: 5<br>      }<br>    ],<br>    &quot;PostToolUse&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/post-tool-use.ps1&quot;,<br>        &quot;timeout&quot;: 10<br>      }<br>    ],<br>    &quot;SubagentStop&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/subagent-stop.ps1&quot;,<br>        &quot;timeout&quot;: 5<br>      }<br>    ],<br>    &quot;Notification&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/error-classifier.ps1&quot;,<br>        &quot;timeout&quot;: 5<br>      }<br>    ],<br>    &quot;Stop&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;command&quot;: &quot;powershell -NoProfile -ExecutionPolicy Bypass -File hooks/scripts/session-stop.ps1&quot;,<br>        &quot;timeout&quot;: 10<br>      }<br>    ]<br>  }<br>}</pre><p>Session start and stop get a slightly larger budget because they may enrich events with repository, branch, or workspace metadata. Hot-path hooks such as prompt submission and pre-tool execution should finish quickly. In my implementation, most hot-path hooks completed in well under a second.</p><h3>Privacy-First Event Schema</h3><p>Every hook writes to the same 13-column event schema. I chose CSV for the first version because it is append-only, easy to audit, readable by non-engineers, and simple to load into a browser-based dashboard.</p><pre>Timestamp,Capability,UserHash,MachineHash,Workspace,Status,SessionId,RepoAlias,BranchAlias,ToolName,DurationMs,Success,EventDetail</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*Iw56L4Fuc6rLHsM4HpJ8cw.png" /></figure><p>This schema is designed for public-safe analytics. It avoids raw prompt text, direct personal identifiers, sensitive repository names, and full file paths. If you are building something similar in an enterprise setting, that anonymization should not be a later cleanup task. It should be part of the first design review.</p><h3>Implementation Deep Dive</h3><h3>1. Measuring Tool Duration with Pre/Post Pairing</h3><p>Tool timing was one of the most important reliability metrics. If an AI assistant feels slow, users stop trusting it. The challenge is that pre-tool and post-tool hooks run as separate stateless processes. There is no in-memory request context shared between them.</p><p>The solution was a temporary pairing store keyed by tool_use_id. When an explicit tool ID is unavailable, the script derives a stable SHA1 key from the tool name and normalized input.</p><p><strong>PreToolUse hook — record the start timestamp:</strong></p><pre># Generate a stable pairing key from tool_use_id or a hash of tool_name + input<br>$toolUseId = $hookInput.tool_use_id<br>if (-not $toolUseId) {<br>    $payload = &quot;$toolName|&quot; + ($hookInput.tool_input | ConvertTo-Json -Compress -Depth 4)<br>    $sha = [System.Security.Cryptography.SHA1]::Create()<br>    $bytes = [Text.Encoding]::UTF8.GetBytes($payload)<br>    $toolUseId = ($sha.ComputeHash($bytes) | ForEach-Object { $_.ToString(&#39;x2&#39;) }) -join &#39;&#39;<br>    $sha.Dispose()<br>}</pre><pre># Stage the start time keyed by tool_use_id<br>$tracker[$toolUseId] = @{<br>    toolName  = $toolName<br>    startedAt = (Get-Date).ToString(&#39;o&#39;)<br>}</pre><pre>$tracker | ConvertTo-Json -Compress -Depth 4 |<br>    Set-Content $trackerFile -Encoding UTF8</pre><p><strong>PostToolUse hook — compute elapsed time:</strong></p><pre>function Get-ToolDurationMs {<br>    param([string]$SessionId, [string]$ToolName, $HookInput)<br><br># Same key derivation as PreToolUse<br>    $toolUseId = $HookInput.tool_use_id<br>    if (-not $toolUseId) {<br>        $payload = &quot;$ToolName|&quot; + ($HookInput.tool_input | ConvertTo-Json -Compress -Depth 4)<br>        $sha = [System.Security.Cryptography.SHA1]::Create()<br>        $bytes = [Text.Encoding]::UTF8.GetBytes($payload)<br>        $toolUseId = ($sha.ComputeHash($bytes) | ForEach-Object { $_.ToString(&#39;x2&#39;) }) -join &#39;&#39;<br>        $sha.Dispose()<br>    }<br><br>$trackerFile = Join-Path $env:TEMP &quot;agentops-hook-cache\$SessionId-tools.json&quot;<br>    if (-not (Test-Path $trackerFile)) { return $null }<br>    $obj = Get-Content $trackerFile -Raw | ConvertFrom-Json<br>    $entry = $obj.$toolUseId<br>    if (-not $entry -or -not $entry.startedAt) { return $null }<br>    $elapsed = [int]((Get-Date) - [datetime]$entry.startedAt).TotalMilliseconds<br>    # Clean up the entry to prevent file growth<br>    $obj.PSObject.Properties.Remove($toolUseId)<br>    $obj | ConvertTo-Json -Compress -Depth 4 |<br>        Set-Content $trackerFile -Encoding UTF8<br>    return $elapsed<br>}</pre><p>The tracker file is scoped to a session and pruned during long-running conversations. That keeps the design simple without letting temporary state grow indefinitely.</p><pre>Event LogPostToolUse HookTool ExecutionPreToolUse HookAI AgentEvent LogPostToolUse HookTool ExecutionPreToolUse HookAI Agenttool_use_id + tool_name + inputGenerate pairing keyWrite {key: startedAt} to temp JSONExecute toolTool responsetool_use_id + tool_name + responseDerive same pairing keyRead startedAt from temp JSONelapsed = now - startedAtRemove entry from temp JSONWrite row with DurationMs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*sbnlpbDsR8LdBAjDMRgljg.png" /></figure><h3>2. Detecting Capability Activation Without Double Counting</h3><p>AI agents often re-read instruction files during long conversations, especially when context compaction occurs. Without deduplication, the dashboard can overcount capability usage and make adoption look stronger than it really is.</p><p>The fix was a cooldown window per capability per session. If the same capability is detected again within 60 seconds, it is treated as a duplicate read rather than a new activation.</p><pre># Detect capability load from a generic capability manifest path<br>$capabilityMatch = [regex]::Match($filePath, &#39;capabilities[/\\]([^/\\]+)[/\\]manifest\.md$&#39;)<br>if (-not $capabilityMatch.Success) { exit 0 }</pre><pre>$capabilityName = $capabilityMatch.Groups[1].Value</pre><pre># Time-based dedup: skip if same capability logged &lt; 60s ago<br>$dedupFile = Join-Path $env:TEMP &quot;agentops-hook-cache\$sessionId.json&quot;<br>$cooldownSeconds = 60</pre><pre>$dedupData = @{}<br>if (Test-Path $dedupFile) {<br>    $dedupData = Get-Content $dedupFile -Raw | ConvertFrom-Json<br>    $ht = @{}<br>    $dedupData.PSObject.Properties | ForEach-Object { $ht[$_.Name] = [datetime]$_.Value }<br>    $dedupData = $ht<br>}</pre><pre>if ($dedupData.ContainsKey($capabilityName)) {<br>    $elapsed = ((Get-Date) - $dedupData[$capabilityName]).TotalSeconds<br>    if ($elapsed -lt $cooldownSeconds) {<br>        exit 0<br>    }<br>}</pre><pre>$dedupData[$capabilityName] = (Get-Date).ToString(&#39;o&#39;)<br>$dedupData | ConvertTo-Json -Compress |<br>    Set-Content $dedupFile -Encoding UTF8</pre><p>This is a small example of why AI agent telemetry needs its own patterns. The event that looks like usage may actually be runtime behavior. As the technical lead, I had to design the analytics layer to distinguish user intent from agent mechanics.</p><h3>3. Classifying Runtime Errors</h3><p>Raw error messages are difficult to trend. For the dashboard, I classified errors into a small set of operational categories.</p><pre>$errorCode = &#39;UNKNOWN&#39;<br>if ($message -match &#39;TOOL_DENIED|denied|permission|unauthorized&#39;) {<br>    $errorCode = &#39;TOOL_DENIED&#39;<br>}<br>elseif ($message -match &#39;RATE_LIMIT|quota|throttle|too many|rate limit&#39;) {<br>    $errorCode = &#39;RATE_LIMIT&#39;<br>}<br>elseif ($message -match &#39;not found|unknown tool|no such&#39;) {<br>    $errorCode = &#39;TOOL_NOT_FOUND&#39;<br>}<br>elseif ($message -match &#39;authentication|auth|401|403|credential&#39;) {<br>    $errorCode = &#39;AUTH_ERROR&#39;<br>}<br>elseif ($message -match &#39;timeout|timed out|deadline|took too long&#39;) {<br>    $errorCode = &#39;TIMEOUT&#39;<br>}<br>elseif ($message -match &#39;connection|network|unreachable|offline&#39;) {<br>    $errorCode = &#39;NETWORK&#39;<br>}</pre><p>This gave the team a practical reliability view. Instead of reading one-off failures, we could see patterns: permission friction, tool timeouts, authentication issues, network problems, and rate limits.</p><h3>4. Capturing Prompt Signals Without Capturing Prompt Content</h3><p>Prompt telemetry is sensitive. It may contain customer names, code snippets, incident details, or business context. The safest design is to avoid storing it at all.</p><p>The prompt hook captures only length and command-style entry points.</p><pre>$promptLen = $prompt.Length</pre><pre># Only extract the slash command, if the prompt starts with one<br>$slash = &#39;&#39;<br>if ($prompt -match &#39;^\s*(/[A-Za-z0-9_\-]+)&#39;) {<br>    $slash = $Matches[1]<br>}</pre><pre># Example detail: /generate-tests|len=342<br>$detail = if ($slash) { &quot;$slash|len=$promptLen&quot; } else { &quot;len=$promptLen&quot; }</pre><p>This creates useful analytics without storing the user’s actual request. Prompt length helps identify whether users are providing enough context. Command frequency helps show which entry points are popular. The content itself stays out of the telemetry system.</p><h3>Sample AgentOps Metrics</h3><p>The dashboard converts raw events into product, reliability, and adoption signals. The numbers below are synthetic examples designed for public sharing.</p><h3>Adoption KPIs: Sample 90-Day Window</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*DjQXbjCWMDDy1qbKxIzRDA.png" /></figure><h3>AI Capability Usage Distribution: Synthetic Example</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*YZbZUQFp9zUayr0Y-7WsUQ.png" /></figure><h3>Tool Performance: Synthetic P50 / P95 / P99</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*Qhz-uUFJ-ZQhLLplewvWpg.png" /></figure><h3>Reliability Signals: Synthetic Example</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*NMbNrLgxVYi55iGkXyNvdw.png" /></figure><p>This type of dashboard changes the conversation with leadership. Instead of saying “people seem to like the agents,” we can discuss adoption curves, reliability hotspots, latency outliers, repeat usage, repository coverage, and workflow maturity.</p><h3>Session Lifecycle: End-to-End Flow</h3><p>The following state diagram shows how a single agent session becomes structured telemetry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*zzTmiwb8TNrDCcWEl8toQA.png" /></figure><h3>Dashboard Architecture</h3><p>The first dashboard version was a single-page application that loaded the event log client-side. That was an intentional architecture choice. For an early-stage enterprise platform, I wanted something portable, inspectable, and easy to run from a local machine or shared document location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GcHiRrbk0mBE8zRiW440A.png" /></figure><p>The parser handles practical CSV problems that appear quickly in the real world: BOM characters, quoted fields with embedded commas, mixed line endings, and schema evolution. Session duration is calculated by pairing session-start and session-stop events by SessionId, with long-idle sessions filtered out so overnight editor windows do not distort the metrics.</p><h3>Engineering Leadership Lessons</h3><h3>1. Treat hook timeout as a product experience constraint</h3><p>Hooks are part of the user path. If a hook is slow, the AI assistant feels slow. I treated every hook script like production-path code: small scope, bounded execution, defensive parsing, and fast failure.</p><h3>2. Design for privacy before dashboards exist</h3><p>It is tempting to log everything during the prototype phase and clean it up later. That is the wrong model for AI telemetry. Prompt content, file paths, branch names, and user identifiers can all carry sensitive information. The event schema should be privacy-aware from day one.</p><h3>3. Separate agent mechanics from user intent</h3><p>Context compaction, instruction reloads, retries, and delegated agents can all create extra events. Without careful deduplication, the telemetry tells the wrong story. Accurate adoption analytics require understanding how the agent runtime behaves internally.</p><h3>4. Start simple, but keep the migration path clear</h3><p>An append-only event log was the right first architecture because it reduced operational friction. The design still leaves room to move later to a message broker, time-series database, or enterprise telemetry platform. Good architecture is not always about starting with the biggest system. It is about knowing which decisions are easy to change later.</p><h3>5. Use telemetry to lead adoption, not just debug failures</h3><p>Once teams could see usage patterns, the AI platform became easier to govern. We could identify underused capabilities, discover where users were blocked, prioritize reliability work, and show leadership where adoption was growing. Observability became part of the rollout strategy.</p><h3>Zero-Config Rollout Pattern</h3><p>The telemetry layer can be packaged with an AI assistant installer or developer bootstrap script. The installer copies the hook definitions and scripts into the approved local configuration location for the agent runtime.</p><pre># Example installer pattern<br>$HooksSource = Join-Path $PSScriptRoot &quot;hooks&quot;<br>$HooksTarget = Join-Path $HOME &quot;.agentops\hooks&quot;<br><br>if (Test-Path $HooksSource) {<br>    Copy-Item -Path $HooksSource -Destination $HooksTarget -Recurse -Force<br>}</pre><p>From the user’s perspective, telemetry starts after installation and editor restart. No API key is required for the first version. No database needs to be provisioned. Each hook reads its event payload, writes one structured row, and exits.</p><p>That simplicity mattered for adoption. As a technical lead, I wanted the rollout path to be boring, repeatable, and supportable by multiple teams.</p><h3>Where I Would Take This Next</h3><p>The file-based approach works well for a focused rollout. At larger scale, I would evolve the platform in four directions:</p><ul><li><strong>Stream events to a broker</strong> for real-time dashboarding and higher write concurrency</li><li><strong>Add model attribution</strong> to compare model/provider behavior across agent workflows</li><li><strong>Correlate telemetry with delivery artifacts</strong> such as work items, pull requests, test cases, and release notes</li><li><strong>Add anomaly detection</strong> for sudden failure spikes, latency regressions, or unusual adoption changes</li></ul><p>The long-term vision is an AgentOps control plane for software engineering teams: adoption analytics, reliability signals, productivity insights, privacy controls, and governance patterns for AI-assisted delivery.</p><h3>Key Takeaways</h3><p>AI agent observability is becoming a core engineering discipline. As AI assistants move from experiments to daily development workflows, teams need more than demos and anecdotal feedback. They need telemetry that explains usage, reliability, latency, failure modes, and adoption trends.</p><p>Lifecycle hooks are a practical foundation for that telemetry. They let architects instrument the agent runtime without changing the assistant’s core logic. With a small set of scripts and a privacy-first schema, it is possible to build meaningful AgentOps analytics quickly.</p><p>The bigger lesson is architectural: AI agent systems need observability patterns designed for non-deterministic execution. The hard part is not writing rows to a log. The hard part is designing correlation, deduplication, privacy boundaries, and leadership-level metrics that turn raw events into decisions.</p><p>That is where architects and technical leads can make AI adoption real: by moving beyond capability demos and building the operational layer that makes AI engineering systems measurable, trustworthy, and scalable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4ed71e38237" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[QA Intelligence System (QIS): Turning Senior QA Skills Into Repeatable Playbooks]]></title>
            <link>https://medium.com/@emailanitesh/qa-intelligence-system-qis-turning-senior-qa-skills-into-repeatable-playbooks-7282680d1e6d?source=rss-9b26daf9ebb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7282680d1e6d</guid>
            <dc:creator><![CDATA[Anitesh Shaw]]></dc:creator>
            <pubDate>Wed, 19 Nov 2025 22:51:52 GMT</pubDate>
            <atom:updated>2025-11-19T22:51:52.310Z</atom:updated>
            <content:encoded><![CDATA[<p>Most teams don’t suffer from a lack of “smart people”.<br>They suffer from a lack of <strong>repeatable, senior-quality behavior</strong>.</p><ul><li>One QA digs deep into edge cases. Another only checks the happy path.</li><li>One architect thinks in risk and observability. Another focuses only on features.</li><li>One PR review is razor sharp. The next is “LGTM”.</li></ul><p>I wanted to fix this for my own work.</p><p>So I built a <strong>QA Intelligence System (QIS)</strong> — a set of role-based QA profiles that make senior-level QA <strong>repeatable</strong>, <strong>shareable</strong>, and <strong>automation-aware</strong>.</p><p>In this article I’ll share:</p><ul><li>What the QA Intelligence System is.</li><li>The three expert profiles I use:</li></ul><p><strong>— Manual Quality Analyst</strong></p><p><strong>— Quality Automation Architect</strong></p><p><strong>— Architectural PR Reviewer</strong></p><ul><li>How they connect to tools like Azure DevOps and Playwright (without exposing any company data).</li><li>How you can adapt this pattern for your own team.</li></ul><h3>What Is the QA Intelligence System (QIS)?</h3><p>The <strong>QA Intelligence System (QIS)</strong> is a lightweight framework that captures <em>how a senior QA thinks and works</em> in different situations.</p><p>Each QIS profile is defined in a Markdown playbook and answers three questions:</p><ol><li><strong>When should I use this profile?</strong></li><li><strong>What inputs do I start with?</strong></li><li><strong>What outputs should I always produce?</strong></li></ol><p>Instead of “do some testing” or “review this PR”, QIS gives you:</p><ul><li>Clear <strong>inputs</strong> (e.g., work item IDs, PR links, design docs).</li><li>A structured <strong>workflow</strong>.</li><li>Clear, consistent <strong>outputs</strong> (test suites, strategies, review summaries).</li></ul><p>I currently use three profiles:</p><ol><li><strong>Manual Quality Analyst</strong> — <em>Work item → Complete manual test suite</em></li><li><strong>Quality Automation Architect</strong> — <em>Epic/feature → Test strategy + Playwright plan</em></li><li><strong>Architectural PR Reviewer</strong> — <em>Diff → Structured review + decision + test guidance</em></li></ol><p>Each can be followed by a human or used as a “contract” for an AI assistant.</p><h3>Profile 1 — Manual Quality Analyst</h3><p><strong>From Work Item to Complete Manual Test Suite</strong></p><p>This profile defines how a <strong>Manual Quality Analyst</strong> operates when turning a single requirement or PR into a complete, traceable manual test suite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WcfTJ5U0txkpU6xla5MNaw.png" /></figure><h3>When to use this</h3><ul><li>You have a single story/bug/incident.</li><li>You want more than a few ad-hoc checks.</li><li>You need test cases that can live in Azure DevOps (or any test tool) with full traceability.</li></ul><h3>Inputs</h3><ul><li>Work item ID from your tracker (e.g., Azure DevOps, Jira).</li><li>Linked pull request(s).</li><li>Any supporting docs (spec, RFC, design notes).</li></ul><h3>Outputs</h3><ul><li>Positive, negative, edge, and regression test cases.</li><li>Prioritized list (Critical / High / Medium / Low).</li><li>Test cases structured for import into a test management tool (with steps, expected results, metadata).</li><li>Traceability from <strong>requirement → PR → test case</strong>.</li></ul><h3>How the profile behaves</h3><p>The Manual Quality Analyst profile guides you (or an AI assistant) to:</p><ul><li>Parse the work item’s title, description, and acceptance criteria.</li><li>Analyze the linked PR to understand <em>what actually changed</em>.</li><li>Identify impacted components, integration points, and risk areas.</li><li>Generate detailed test cases with:</li></ul><p>— Preconditions and test data.</p><p>— Numbered, reproducible steps.</p><p>— Clear expected results and validation points.</p><p>I also designed the playbook to work well with <strong>Azure DevOps</strong>:</p><ul><li>It defines how to structure fields so test cases can be exported as ADO Test Case work items.</li><li>It explains how to link test cases back to the original work item for traceability.</li><li>The export can be automated by scripts, but the pattern itself is tool-agnostic.</li></ul><h3>Example: Password Reset</h3><p>For a simple “Password Reset” story, the profile produces tests like:</p><ul><li>“Password Reset — Happy Path — Valid Link &amp; Strong New Password”</li><li>“Password Reset — Expired Link — User Sees Expiration Message”</li><li>“Password Reset — Invalid Token — Attempt is Rejected and Logged”</li><li>“Password Reset — Rate Limiting — Multiple Requests in Short Time”</li></ul><p>The key is consistency: <strong>every</strong> story goes through the same high bar.</p><h3>Profile 2 — Quality Automation Architect</h3><p><strong>From Epic to Strategy + Playwright Automation Plan</strong></p><p>This profile defines how a <strong>Quality Automation Architect</strong> designs end‑to‑end quality for a feature, epic, or system: from requirements and code analysis through test strategy, risk mapping, and automation planning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SKK9dToF7v5g-Gg6iHJk9Q.png" /></figure><h3>When to use this</h3><ul><li>There’s a larger initiative (epic/feature/system).</li><li>You need a clear, documented <strong>test strategy</strong>, not just individual tests.</li><li>You care about where <strong>automation</strong> (especially Playwright) fits in.</li></ul><h3>Inputs</h3><ul><li>Epics, stories, or design/RFC documents.</li><li>Relevant parts of the codebase (services, UI, APIs, integrations).</li><li>Non-functional expectations (performance, reliability, security, SLAs).</li></ul><h3>Outputs</h3><p>— A written <strong>test strategy</strong>: scope, levels, environments, constraints.</p><p>— A <strong>risk and coverage matrix</strong> (features × risks × test types).</p><p>— An <strong>automation plan</strong> that explicitly calls out:</p><ul><li>What to cover at unit and API levels.</li><li>What to cover with <strong>Playwright UI and API/E2E tests</strong>.</li></ul><p>— Practical <strong>quality gates</strong> and a “definition of done” for release.</p><h3>Key behaviors</h3><p>The Quality Automation Architect profile pushes you to:</p><h4>1. Do serious requirements &amp; risk analysis</h4><ul><li>Challenge ambiguous or conflicting requirements.</li><li>Identify high-risk flows (payments, authentication, data integrity, integrations).</li><li>Think across functional, regression, security, performance, and reliability.</li></ul><h4>2. Design based on the actual implementation</h4><p>— Scan the code to find <strong>real</strong>:</p><ul><li>Validation rules.</li><li>Error messages.</li><li>Configuration values and feature flags.</li><li>Integration points (APIs, queues, DB, external services).</li></ul><p>— Use those details to design test scenarios that match how the system <em>actually</em> behaves.</p><h4>3. Plan automation intelligently</h4><p>— Decide <strong>where automation adds the most value</strong>:</p><ul><li>Critical journeys → Playwright UI tests.</li><li>API contracts and workflows → API-level tests.</li><li>Heavily visual or complex edge cases → keep manual/exploratory.</li></ul><p>— Avoid the trap of “automate everything” by tying automation decisions back to risk and the test pyramid.</p><h3>Example: “Card Payments v2”</h3><p>For an imaginary “Card Payments v2” epic, this profile might produce:</p><p>— A risk/coverage matrix mapping flows like <em>authorize, capture, refund</em> to:</p><ul><li>Unit, integration, E2E, performance, and security tests.</li></ul><p>— A strategy that covers:</p><ul><li>Environments and data setup (test cards, decline codes, edge amounts).</li><li>Failure simulations (network issues, timeouts, external provider failures).</li><li>Observability expectations (metrics, logs, alerts).</li></ul><p>— A Playwright plan:</p><ul><li>Which UI journeys to automate end-to-end.</li><li>Which API flows to validate directly via API tests.</li><li>How each automated scenario traces back to work items.</li></ul><p>This turns “Let’s make sure it works” into <strong>“Here’s exactly how we’ll prove it works, and where automation fits.”</strong></p><h3>Profile 3 — Architectural PR Reviewer</h3><p><strong>From Diff to Decision</strong></p><p>This profile defines how an <strong>Architectural PR Reviewer</strong> (Senior Dev Architect perspective) reviews pull requests with a strong focus on architecture, quality, and test impact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8nYqiPRoORuk2N8WPl9Sw.png" /></figure><h3>When to use this</h3><ul><li>A PR is non-trivial (logic, architecture, behavior, infrastructure).</li><li>You want more than “LGTM” or style comments.</li><li>You care about <strong>risks, architecture, and tests</strong>, not just syntax.</li></ul><h3>Inputs</h3><ul><li>PR identifier or URL.</li><li>Linked work item(s) and a problem statement.</li><li>Any relevant design/RFC links.</li></ul><h3>Outputs</h3><p>— A clear <strong>decision</strong>:</p><ul><li>Approve.</li><li>Approve with comments.</li><li>Request changes.</li></ul><p>— A <strong>structured review summary</strong>:</p><ul><li>Intent of the change (in your own words).</li><li>Strengths and good patterns.</li><li>Risks and concerns (functional + non-functional).</li><li>Concrete test coverage notes and recommendations.</li></ul><h3>What the checklist enforces</h3><p>This profile leads the reviewer through:</p><ul><li><strong>Intent &amp; scope</strong> — What problem is this PR solving? Is the implementation aligned?</li><li><strong>Code quality &amp; architecture</strong> — Boundaries, duplication, patterns, readability.</li><li><strong>Correctness &amp; edge cases</strong> — Nulls, empty states, large inputs, time zones, error paths.</li><li><strong>Tests</strong> — What was updated? What’s missing? What needs unit/integration/E2E?</li><li><strong>Non-functional aspects</strong> — Security, performance, observability, configuration &amp; rollout.</li><li><strong>APIs, DB, dependencies</strong> — Backward compatibility, migrations, and safety where relevant.</li></ul><h3>Example: Search API PR</h3><p>For a fictional PR that adds advanced filters to a Search API, the output might be:</p><ul><li>Decision: <strong>Approve with comments</strong></li></ul><p><strong>— Strengths</strong></p><ul><li>Clear separation of query-building logic.</li><li>Good unit tests for filter combinations.</li></ul><p><strong>— Risks</strong></p><ul><li>No tests for invalid filters.</li><li>Potential N+1 query pattern in the search service.</li><li>No end-to-end coverage for the new filter UI.</li></ul><p><strong>— Recommendations</strong></p><ul><li>Add negative tests for invalid/edge-case filters.</li><li>Address or document the N+1 risk.</li><li>Add a Playwright test for the new filter flow.</li></ul><p>That’s the kind of review that <strong>teams can trust and learn from</strong>.</p><h3>How You Can Implement Your Own QA Intelligence System</h3><p>You don’t need my exact setup to benefit from this approach. You can start small:</p><ol><li><strong>Pick one profile</strong><br>For example: “Regression Guardian”, “Data Pipeline QA”, or “Security Review Analyst”.</li><li><strong>Create a Markdown playbook</strong> that defines:</li></ol><ul><li>What this profile is.</li><li>When it should be used.</li><li>Inputs and outputs.</li><li>A step-by-step workflow.</li><li>One anonymized example.</li></ul><p><strong>3. Connect it to your tools</strong></p><ul><li>How test cases should be structured for your test management tool.</li><li>How automation frameworks (Playwright, Cypress, REST clients, etc.) should be used.</li><li>How to link results back to work items.</li></ul><p><strong>4. Use it with humans and AI</strong></p><ul><li>Share it with your team as a “this is how we do X”.</li><li>Use it as a prompt/contract for AI assistants so their behavior matches your standards.</li></ul><p>Over time, you’ll build your own <strong>QA Intelligence System</strong>: a library of profiles that capture how your best people think and work — and make that behavior reusable.</p><h3>Final Thoughts</h3><p>The QA Intelligence System (QIS) is my way of turning <strong>experience into a system</strong>:</p><ul><li>It captures senior-level QA thinking as concrete profiles.</li><li>It standardizes how we design tests, automation, and reviews.</li><li>It’s compatible with both humans and AI assistants.</li><li>It avoids sharing any enterprise data — only patterns and structure.</li></ul><p>If your team struggles with inconsistent test depth, unclear strategies, or uneven PR reviews, try defining just one QIS profile and see what happens. Even a simple Markdown playbook can make quality <strong>more predictable, more scalable, and a lot easier to talk about</strong>.</p><p>#qualityengineering #qa #testautomation #playwright #devops #softwaretesting #softwarequality</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7282680d1e6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Simple QA Mindset Shift Slashed Our Bug Rejection Rate by 70% (And Boosted Team Morale)]]></title>
            <link>https://medium.com/@emailanitesh/how-a-simple-qa-mindset-shift-slashed-our-bug-rejection-rate-by-70-and-boosted-team-morale-f83a6098627c?source=rss-9b26daf9ebb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f83a6098627c</guid>
            <dc:creator><![CDATA[Anitesh Shaw]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 06:23:46 GMT</pubDate>
            <atom:updated>2025-07-28T06:23:46.919Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why focusing on business impact — not just “expected results” — turns QA into a strategic partner and speeds up delivery.</em></p><blockquote><em>“The goal is not just to find defects, but to elevate the product.”</em></blockquote><p>When I first stepped into QA, I dutifully logged defects against every deviation from the acceptance criteria (AC). Steps, expected results, actual results — check, check, check. Yet, every sprint inevitably dissolved into heated debates: “This isn’t really in scope,” “It doesn’t break the AC,” “Why should we fix this now?”</p><p>We’d summon Product Owners, QA leads, Dev managers… and circle around the same bug for hours. The cost was immense: wasted engineering cycles, mounting team frustration, and a slow erosion of user trust. We weren’t just fixing bugs; we were stuck in a cycle of diminishing returns.</p><p>It was time for a new approach.</p><h3>The Pivot: From “What” to “Why It Matters”</h3><p>Instead of reporting defects as isolated mismatches, we began categorizing them by:</p><ul><li><strong>Business Impact</strong><br>Example: <em>“Users drop off 28% of the time during onboarding if the tooltip is misleading.”</em></li><li><strong>User Trust Risk</strong><br>Example: <em>“Inconsistent error messaging erodes confidence when a payment fails.”</em></li><li><strong>Revenue Leakage Potential</strong><br>Example: <em>“Incorrect tax calculation could cost the business thousands per month.”</em></li><li><strong>Legal/Compliance Concerns</strong><br>Example: <em>“Missing alt‑text violates accessibility guidelines (WCAG 2.1).”</em></li></ul><h4><strong>Every bug became a narrative:</strong></h4><p><strong>Title</strong>: <em>[Feature] — Tooltip copy is misleading during onboarding</em><br><strong>Impact</strong>: <em>High</em><br><strong>The Story (Why it Matters):</strong> <em>This tooltip appears in Step 3 of our onboarding, a critical step where we see a 28% user drop-off. Confusing language here likely contributes to that abandonment. Clarifying this message is a low-effort, high-impact opportunity to potentially reduce drop-off and improve our activation rate.</em></p><h3>Real Results in 3 Months</h3><blockquote><em>The transition wasn’t instantaneous, but after a concerted effort over one quarter, the data spoke for itself:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*oFF8UmCItZ8MNA6zUNgN6A.jpeg" /></figure><blockquote><em>These numbers weren’t just metrics on a dashboard; they represented a fundamental shift in our daily work. Arguments were replaced with problem-solving sessions. ‘Not my problem’ became ‘How can we solve this together?’</em></blockquote><ul><li><strong>Faster turnaround:</strong> Developers now fix high‑impact bugs within a day or two.</li><li><strong>Fewer arguments:</strong> Bug rejection rates plummeted because every defect came with clear context.</li><li><strong>Higher quality:</strong> Post‑release issues dropped by over 60%.</li></ul><h3>A Story of Collaboration</h3><h3>Developers Gained Empathy</h3><blockquote><em>“When I saw the user‑drop data attached to that tooltip issue, I immediately understood why it mattered.”<br> — Senior Developer</em></blockquote><p>Contextual stories replaced vague “minor UI glitches.” Devs began asking QA, “Do you have data on how often this happens?”</p><h3>QA Became Proactive Partners</h3><p>In refinement sessions, we now ask:</p><ul><li>“What happens if a returning user encounters this edge case?”</li><li>“How do we recover if the API times out here?”</li></ul><blockquote>We became true quality advocates, not just defect finders. Our role shifted left, from finding problems in completed code to preventing them in the design phase. We started bringing user journey maps to refinement sessions, asking questions that sparked crucial conversations about resilience, edge cases, and the ‘unhappy path’ before a single line of code was written.</blockquote><h3>Product Owners and Support Love Us</h3><blockquote><em>“We’ve seen fewer surprises in demos and complaints from customers.”<br> — Support Lead</em></blockquote><p>With clear impact statements, POs prioritize smarter, and support tickets drop.</p><h3>The Role of AI in Modern QA</h3><p>AI tools can scan for broken links, detect regressions, and even generate test cases. But they can’t replace <strong>human empathy</strong>:</p><ol><li><strong>Contextual Judgment:</strong> Knowing that a 1‑pixel misalignment in a checkout button can cost millions.</li><li><strong>Business Acumen:</strong> Understanding that a missing currency symbol in one region ruins trust globally.</li><li><strong>End‑User Empathy:</strong> Anticipating confusion, frustration, or delight in real user scenarios.</li></ol><p>Our mantra: <em>Validate what’s valuable.</em></p><h3>How to Start Your Own Shift</h3><ol><li><strong>Tag Every Bug with Impact Labels:</strong> Business, Revenue, Trust, Compliance.</li><li><strong>Attach a Two‑Line “Why It Matters”:</strong> Always answer “so what?”</li><li><strong>Measure and Share Metrics:</strong> Track time‑to‑close, rejection rates, and leakage.</li><li><strong>Foster Open Discussion:</strong> Invite developers and POs to review the story behind each bug.</li><li><strong>Celebrate Wins:</strong> Highlight metrics improvements and stakeholder appreciation in retrospectives.</li></ol><h3>In Closing</h3><p>One small change — reporting <strong>why</strong> a defect matters — sparked deeper collaboration, faster fixes, and a stronger sense of shared ownership.</p><p>Next time you log a bug, add a line:</p><blockquote>“This could impact [user behavior/business trust/performance] because…”</blockquote><p>You might just spark the kind of teamwork that turns good products into great ones.</p><h3>Tags</h3><p>#QualityAssurance #Testing #Agile #DevOps #ProductManagement</p><p><strong>Loved this article?</strong> Let’s connect and keep elevating QA — one bug story at a time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f83a6098627c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>