Inspiration

When an AI agent writes and runs tests for your app, you get a chat message that says "all tests passed." If you are not a testing expert, you can't check it. You can't tell whether the form was really filled, whether the page loaded or showed a blank screen, or whether the layout broke on a phone. You are asked to trust the agent.

We wanted to make that testing visible. A person who has never written a test should be able to watch what the agent did, see where it failed, and understand why. The hackathon's Halloween theme gave us the idea of a shadow that follows your app around, so the tool became KiroShadow, an invisible QA that records every test.

What it does

KiroShadow is an MCP server plus a Kiro extension. When you ask Kiro to test a feature, KiroShadow runs the test in a headless Chrome browser and records everything.

Six tools the agent can call:

  • test_form finds a form on its own and fills it with valid, invalid and edge-case data (emoji, very long text, boundary numbers). It can also try blank input and script-injection input.
  • test_page runs any scripted flow the agent writes: open, click, type, press, select, wait, and expect text, visibility or URL. This covers features like a leaderboard, a cart or a search box. It takes a screenshot at each key step and at the moment of failure.
  • load_check captures frames while a page loads, measures load time and first paint, detects a splash screen, and flags blank pages, console errors and failed requests.
  • visual_check saves a baseline screenshot and later shows Before, After and a highlighted pixel diff at desktop, tablet and mobile sizes. It also flags sideways scrolling and broken images.
  • compare_runs compares two runs and reports which cases were fixed and which broke.
  • list_runs lists saved runs.

What you get for every run, saved in .kiro/test-assets/<run>/:

  • a WebM video of the whole test
  • screenshots after each key step, plus pixel diffs
  • a visual report.html where you click any step to jump to that moment in the video
  • a plain-language reason for each pass or fail, such as "Expected acceptance, but the form rejected it: Uncaught error: Cannot read property of undefined"
  • report.md and results.json

In the IDE, a KiroShadow icon in the Activity Bar has two sections, Test Screenshots and Test Videos. Each shows one folder per run, with thumbnails and pass/fail marks. Clicking a screenshot opens it, and clicking a video plays it. A Live View opens by itself when a test starts and streams the headless browser while it works.

How we built it

  • MCP server in TypeScript using the MCP SDK. Tool inputs are validated with Zod.
  • Playwright driving Google Chrome, with Playwright's bundled Chromium as a fallback.
  • Our own screen recorder. It captures Chrome DevTools Protocol screencast frames and encodes them to WebM with ffmpeg-static. The same frames feed the live view.
  • Test-data generation and judging. KiroShadow discovers fields (type, label, required, min and max). It builds valid, invalid and edge data for each field and checks each result against what should have happened: accepted, rejected or safe.
  • Evidence collection. For each case it records native browser validation messages, error and success text, console and page errors, failed requests, HTTP statuses, dialogs, and whether injected script ran.
  • Pixel diffs with pixelmatch and pngjs.
  • A VS Code-style extension in plain JavaScript for the Activity Bar views, the report and video viewers, and the live view. The server writes the latest frame and a status file into .kiro/test-assets/.live/, and the extension polls them.
  • Kiro features:
    • MCP is the core of the project.
    • Steering maps each kind of request to the right tool and tells the agent to explain results to non-testers.
    • A hook on file save re-runs the checks when a UI file changes.
    • A spec holds requirements in EARS form, a design with decisions, and tasks.
    • Property-based tests (fast-check) cover the data generators.
    • An end-to-end test drives all the tools through the real MCP protocol against a demo app with planted bugs.

Challenges we ran into

  • Playwright's installer doesn't support macOS 13. Neither Chromium nor the ffmpeg needed for Playwright's own video recording would install. We switched to the installed Google Chrome and wrote our own recorder from screencast frames. That also gave us the live view for free.
  • Working from any project folder. Our first setup only worked inside this repository, because the MCP config pointed to a relative path. We registered the server globally and added a projectDir argument to every tool, so recordings go to the user's open project instead of the server's working directory. A test now proves nothing is written next to the server.
  • Deciding whether a form accepted or rejected input. There is no single signal. We combine native validation, new error text, ARIA alerts, success wording and URL changes, and we judge them against what the test expected.
  • False alarms. The browser's automatic favicon.ico request caused console errors that turned passing runs into warnings. We filtered them out. Our first edge-case email also used non-ASCII letters that Chrome itself rejects, which looked like an app bug until we fixed the data.
  • Outdated hook format. Our first hook file used an old format. We caught it by reading Kiro's current documentation and rewrote it to the .kiro/hooks/<id>.json schema.
  • A video that people can follow. Tests run in milliseconds, so we added short pauses between fields and recorded step timestamps relative to the first video frame, so the report's step buttons jump to the right moment.

Accomplishments that we're proud of

  • A test you can watch, replay and click through, not just read about.
  • Property-based tests found a real bug in our own code on their first run. A "valid" number could fall below a field's minimum when the minimum was above 30. Our hand-made demo never hit it.
  • The leaderboard check shows the point of the project. In a separate project, KiroShadow caught a planted ranking bug, where scores sorted as text so 9 ranked above 150. The report showed the failing step and the screenshot.
  • Seven end-to-end checks pass over the real MCP protocol, including the planted form bug, a splash screen, a mobile layout overflow, and recordings landing in the right project folder.
  • Everything is local. Nothing is uploaded, and passwords are masked in reports.
  • It goes beyond forms: page loads, splash screens, before/after visuals on three screen sizes, and run-to-run comparison.

What we learned

  • Steering matters as much as the tool. The agent only used the tools reliably once a steering file told it which tool fits which request and to always pass the project folder.
  • Visible evidence changes how much you trust a test. A failing screenshot with a one-sentence reason is easier to act on than a stack trace.
  • Check the platform before depending on a library. Playwright's video feature wasn't available on our machine, and building our own recorder turned out better.
  • Property-based testing finds the cases you didn't think of, especially in generated data.
  • Read the current docs before writing config. Kiro's hook format had changed, and our first version was outdated.
  • MCP lets an agent do things it can't do alone, such as driving a real browser and returning screenshots into the chat.

What's next for KiroShadow: Your invisible QA that records every test

  • Publish to npm so installation is one line in the MCP config, with no cloning or building.
  • Smarter forms: multi-step wizards, forms inside iframes, and several forms on one page.
  • Accessibility and contrast checks alongside the visual checks.
  • A saved test library, so the agent can re-run the same scenarios on every change, with the hook running them automatically.
  • Export to real test code, so a recorded scenario becomes a Playwright test the team can keep in its repository.
  • More browsers and devices, such as Firefox, Safari-like WebKit and real phone emulation.
  • Auto-start the dev server and detect its URL, so the user never has to provide it.
  • A trend view in the panel that shows pass rate and load time across runs.
  • Team sharing, such as a single HTML bundle of a run that can be attached to a pull request.
  • A spookier panel design that fits the Halloween theme.

Built With

  • hooks
  • kiro
  • mcp
  • playwrright
  • steerring
Share this project:

Updates

Submission history