<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amir Abeti</title>
    <description>The latest articles on DEV Community by Amir Abeti (@asgerami).</description>
    <link>https://dev.to/asgerami</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4281410%2F8e78c5a0-9791-477f-aaaf-733e84a108b6.png</url>
      <title>DEV Community: Amir Abeti</title>
      <link>https://dev.to/asgerami</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asgerami"/>
    <language>en</language>
    <item>
      <title>How I built Revenant with Kiro: finding the dead npm dependencies your scanner misses</title>
      <dc:creator>Amir Abeti</dc:creator>
      <pubDate>Thu, 03 Dec 2026 21:34:15 +0000</pubDate>
      <link>https://dev.to/asgerami/how-i-built-revenant-with-kiro-finding-the-dead-npm-dependencies-your-scanner-misses-17ek</link>
      <guid>https://dev.to/asgerami/how-i-built-revenant-with-kiro-finding-the-dead-npm-dependencies-your-scanner-misses-17ek</guid>
      <description>&lt;p&gt;&lt;em&gt;I wrote this post as part of the Kiroween 2026 hackathon, where I built Revenant with Kiro between November 1 and December 4, 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;request&lt;/code&gt; is one of the most famous packages on npm. It was deprecated years ago, and it still gets about 13 million downloads a week. Most dead packages like it have no CVE, so &lt;code&gt;npm audit&lt;/code&gt; has nothing to say about them. Nobody tells you your dependencies are dying.&lt;/p&gt;

&lt;p&gt;Revenant finds them, shows the evidence, and then has Kiro migrate your code off them, with your tests run before and after. You can watch the &lt;a href="https://www.youtube.com/watch?v=wM1Z0cH5H0A" rel="noopener noreferrer"&gt;demo video&lt;/a&gt; (under three minutes), try it at &lt;a href="https://revenant-jet.vercel.app" rel="noopener noreferrer"&gt;revenant-jet.vercel.app&lt;/a&gt;, read the &lt;a href="https://github.com/asgerami/revenant" rel="noopener noreferrer"&gt;code on GitHub&lt;/a&gt;, or install the MCP server from &lt;a href="https://www.npmjs.com/package/revenant-mcp" rel="noopener noreferrer"&gt;npm&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Revenant does
&lt;/h2&gt;

&lt;p&gt;Revenant sorts every direct npm dependency into one of five lifecycle states. A package is ALIVE when it is maintained. It is DORMANT when it is old but stable, with no sign of death and no known vulnerabilities, which is not a problem. It is DYING when it is stale and carrying a known vulnerability, or a vulnerability with no fixed version. It is DEAD when it is deprecated on npm, archived on GitHub, or its repository is gone. And it is a ZOMBIE when it is dead but still heavily downloaded, which is where the real risk sits.&lt;/p&gt;

&lt;p&gt;Point it at a public GitHub repo and it checks each dependency against npm, npm download counts, GitHub, OSV and the e18e replacement data. Scanning &lt;code&gt;request/request&lt;/code&gt; itself gives a health score of 74/100 across 40 dependencies: 7 ZOMBIE, 19 DORMANT and 14 ALIVE. Every verdict opens an evidence drawer with the raw signals and a link to each source, so you never have to take the score on trust.&lt;/p&gt;

&lt;p&gt;Detection is the easy half, though. The same engine also ships as an MCP server, &lt;code&gt;revenant-mcp&lt;/code&gt;, and as a Kiro power that runs what I call a "resurrection": a test-verified migration off one dead package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specs for the engine, vibe coding for the cemetery
&lt;/h2&gt;

&lt;p&gt;I used both styles on purpose, for different parts of the project.&lt;/p&gt;

&lt;p&gt;The engine, meaning the classifier, the prescriber that recommends replacements, and the scanner, is spec-driven, because a wrong verdict is worse than no verdict. Revenant has four specs in &lt;code&gt;.kiro/specs&lt;/code&gt; with 283 acceptance criteria and 45 correctness properties between them. The prescriber and scanner requirements both open with a "Decisions for review" list, where each decision names the requirement that implements it. That turned out to be the most useful habit of the whole build, because it let me change one decision without hunting through 155 criteria to find what it touched.&lt;/p&gt;

&lt;p&gt;The best moment came while Kiro was writing the prescriber spec. It read the OSV documentation and noticed that &lt;code&gt;POST /v1/querybatch&lt;/code&gt; returns only vulnerability IDs and timestamps. That meant every vulnerability in every scan already looked unfixable, so no "upgrade to X.Y.Z" advice could ever work, and the classifier was marking packages DYING on bad data. The spec added a decision to fetch each full record from &lt;code&gt;GET /v1/vulns/{id}&lt;/code&gt; instead. The same review found a second silent bug: one OSV record can cover several packages, and we were calling &lt;code&gt;lodash.template&lt;/code&gt; fixable just because the advisory fixed &lt;code&gt;lodash&lt;/code&gt;. Both were caught while writing the spec, before any prescriber code existed, and no unit test of the code as it stood would have found them.&lt;/p&gt;

&lt;p&gt;The web UI, the Halloween art and the motion went the other way. They were vibe-coded in chat over many quick rounds of "the zombie is too big" and "the leaves overlap". For visual work I only knew what I wanted once I saw it, and a spec would have slowed that down for nothing. Specs were slower to start, but they made the engine reviewable before any code existed. That trade was worth it for the engine and not for the art.&lt;/p&gt;

&lt;h2&gt;
  
  
  Property-based tests caught bugs unit tests would not
&lt;/h2&gt;

&lt;p&gt;Every correctness property in the designs names the requirements it validates, and 29 fast-check test files implement them. They earned their keep.&lt;/p&gt;

&lt;p&gt;The first real catch was a package that had vanished. The spec says a missing publish date counts as infinitely old, but the staleness check returned false for it, so a package whose repository was gone and had no publish date slipped straight past the DEAD rule. Another property, which says every verdict needs a one-line, non-empty epitaph, found that a deprecation message made only of whitespace produced a blank epitaph, and that a message with a line break produced two lines. The fix collapses whitespace and falls back to "Deprecated".&lt;/p&gt;

&lt;p&gt;My favourite failure was one where the code was right. A property about finding package names inside deprecation messages kept failing on names that end in a full stop and names that start with &lt;code&gt;www.&lt;/code&gt;. The parser was doing exactly what the spec said: it treats a trailing full stop as punctuation and &lt;code&gt;www.&lt;/code&gt; text as a URL. The property was wrong, and narrowing it taught me that a failing property is a question, not a verdict.&lt;/p&gt;

&lt;p&gt;I also learned to pin the seed when a property's coverage depends on randomness, after one property passed or failed depending on the run, and to give slow properties their own time budget when the full suite is under load. The project finished with 747 passing tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hooks that kept the agent safe
&lt;/h2&gt;

&lt;p&gt;There are six agent hooks in &lt;code&gt;.kiro/hooks&lt;/code&gt;, and two of them did most of the work. The first, Guard Dangerous Commands, makes Kiro ask me before it runs &lt;code&gt;git push --force&lt;/code&gt;, &lt;code&gt;git reset --hard&lt;/code&gt;, &lt;code&gt;npm publish&lt;/code&gt;, &lt;code&gt;DROP&lt;/code&gt; or &lt;code&gt;TRUNCATE&lt;/code&gt;, &lt;code&gt;prisma migrate reset&lt;/code&gt;, or &lt;code&gt;rm -rf&lt;/code&gt; outside the build folders. That meant Kiro could never publish &lt;code&gt;revenant-mcp&lt;/code&gt; or wipe the database without my explicit yes, which made it much easier to let it run on its own. The second, Typecheck on Stop, runs the typecheck after every agent turn, so broken types showed up straight away instead of three changes later.&lt;/p&gt;

&lt;p&gt;The others run the classifier tests whenever I save a classifier file and pull out the shrunk counterexample if a property fails, check that each new data source comes with a fetcher, a parser and a fixture-based test, and review web files against my design rules.&lt;/p&gt;

&lt;p&gt;Not every hook worked. One was meant to log each completed spec task, and it wrote 53 entries that all say &lt;code&gt;spec: unknown | task: unknown&lt;/code&gt;, because the event it read had no task name in it. The real log ended up being the git history, where most commits name the spec task they finish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steering: one line that stopped invented versions
&lt;/h2&gt;

&lt;p&gt;On the first day, Kiro added a dependency version that does not exist, and &lt;code&gt;pnpm install&lt;/code&gt; broke. I added a single rule to the &lt;code&gt;tech.md&lt;/code&gt; steering file: before adding or changing any dependency, check the real current version with &lt;code&gt;npm view &amp;lt;package&amp;gt; version&lt;/code&gt;. After that, every version was checked. It mattered most for Prisma, where &lt;code&gt;latest&lt;/code&gt; was a release candidate that needed a newer Node, so we pinned the stable release instead.&lt;/p&gt;

&lt;p&gt;Another steering line shaped the whole product. It reads "DORMANT: finished and stable. Not a problem. We say so honestly." Without it, a staleness check flags every old package and the tool becomes noise. With it, the &lt;code&gt;request/request&lt;/code&gt; scan shows 19 DORMANT packages that Revenant does not ask you to migrate, and the migration skill never touches them.&lt;/p&gt;

&lt;p&gt;Steering does not always win, and I think that is fine. My design steering said the graves should be SVG components. After seeing the SVG version I asked for illustrated art instead, and that rule lost to taste.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP: current docs and a real browser
&lt;/h2&gt;

&lt;p&gt;I configured two MCP servers for Kiro. Context7 gives it current library documentation instead of whatever it remembers from training. Playwright let it check the UI in a real browser instead of trusting the code. It took screenshots at desktop and mobile widths, timed the score count-up, and measured frame rates. That last one paid off: the first version of the glowing art used &lt;code&gt;mix-blend-mode: screen&lt;/code&gt; and dropped the page to about 35 fps, and removing it brought it back to 58. I would not have noticed that by reading the CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Kiro power that turns detection into a migration
&lt;/h2&gt;

&lt;p&gt;The Revenant power, in the &lt;code&gt;power/&lt;/code&gt; folder of the repo, bundles &lt;code&gt;revenant-mcp&lt;/code&gt; with three skills called &lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;resurrect&lt;/code&gt; and &lt;code&gt;badge&lt;/code&gt;. The &lt;code&gt;resurrect&lt;/code&gt; skill is written as a procedure rather than a prompt. Kiro first runs the project's tests to get a baseline, and stops if they fail. It then asks the MCP server for the replacement the community has already moved to, finds every call site, and migrates them on a separate branch, one package at a time. After that it runs the tests again, and if they still fail after three attempts to fix them, it reverts. Finally it writes a &lt;code&gt;RESURRECTION.md&lt;/code&gt; with the evidence, the files it touched and the test results, and it asks before pushing anything.&lt;/p&gt;

&lt;p&gt;The demo video shows a real run of this in the Kiro IDE, on a small API client built on &lt;code&gt;request@2.88.2&lt;/code&gt;. Kiro ran the baseline, which passed with 9 tests and no failures. It confirmed that &lt;code&gt;request&lt;/code&gt; is a ZOMBIE: deprecated, with an unfixed advisory, and still downloaded about 13 million times a week. It chose the platform's own &lt;code&gt;fetch&lt;/code&gt; over &lt;code&gt;ofetch&lt;/code&gt; and &lt;code&gt;ky&lt;/code&gt;, found the two call sites, and migrated them on the branch &lt;code&gt;revenant/request-to-fetch&lt;/code&gt;. The second test run passed with the same 9 tests and no failures, and the tests themselves were never changed. Then it wrote &lt;code&gt;RESURRECTION.md&lt;/code&gt; and asked me whether to push.&lt;/p&gt;

&lt;p&gt;A rehearsal of that run also found a real bug in my own tool. &lt;code&gt;verify_migration&lt;/code&gt; could not read test counts from Node's built-in &lt;code&gt;node --test&lt;/code&gt; runner, so version 0.1.1 of &lt;code&gt;revenant-mcp&lt;/code&gt; fixes it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Revenant on Revenant
&lt;/h2&gt;

&lt;p&gt;When I pointed &lt;code&gt;revenant-mcp&lt;/code&gt; at Revenant's own packages, all three flagged the same dependency: &lt;code&gt;eslint@8.56.0&lt;/code&gt; is a ZOMBIE. Everything else was ALIVE. It was a nice moment to find that the tool takes its own medicine.&lt;/p&gt;

&lt;p&gt;The same test exposed a limitation, too. The first version scans only the root &lt;code&gt;package.json&lt;/code&gt;, and in a monorepo that file has no dependencies, so the badge for my own repo says "0 dead". Following workspaces is the first thing on my list after the hackathon.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell someone starting with Kiro
&lt;/h2&gt;

&lt;p&gt;Use specs where a wrong answer is expensive, and vibe coding where you need to see something to know whether it is right. They work well side by side in the same project. When you write a spec, write the "Decisions for review" list first, because it is the fastest way to review something long. Treat a failing property as a question rather than a verdict, since sometimes the property is the thing that is wrong. Keep steering rules short and precise; one exact rule did more for me than a page of general advice. And before you let an agent run freely, put guard hooks in front of anything you cannot undo.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Next is Night Patrol, a weekly patrol that watches repositories for dependency deaths and opens test-verified resurrection pull requests on its own. It is designed but not built yet. After that come workspace support, more package managers and scan history.&lt;/p&gt;

&lt;p&gt;Revenant was built for Kiroween 2026. If your codebase has a graveyard, you can find it at &lt;a href="https://revenant-jet.vercel.app" rel="noopener noreferrer"&gt;revenant-jet.vercel.app&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>npm</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
