# Necromancer: Bringing Dead Python Repos Back to Life with Kiro's Method

Written for the Kiroween 2026 hackathon (category: Resurrection).

Kiro's idea is simple. Before you write code, you write down what it must do (requirements), how it will work (design) and the order you'll build it in (tasks). I applied that to a project that revives abandoned Python repositories, then flipped it around: the tool writes a Kiro-style spec for every repo it resurrects. This post covers how it went, what each part of the .kiro/ folder did, and where I fell short of the full Kiro workflow.

The project in brief

Necromancer takes the GitHub URL of a dead Python repo and runs four stages:

  1. Autopsy: produces a Death Certificate listing Python 2 markers, dead dependencies, known CVEs from OSV and a decay score.
  2. Ritual: writes a resurrection spec.
  3. Resurrection: applies 2to3, pyupgrade, a removed-API table and dependency bumps, then runs the tests in a sealed Docker sandbox with the network off.
  4. Rise: opens a pull request.

The demo repo, pyfin, had 13 known CVEs and numpy pins that can't build today. Necromancer took it from "won't install" to 8/8 tests passing on Python 3.12, with no LLM involved.

Specs: requirements, design, tasks

There are seven feature specs under .kiro/specs/: autopsy, sandbox, ritual, resurrection, rise, graveyard-ui and mcp-osv. Each has all three files.

Requirements use EARS, which forces a precise shape: WHEN something happens THE system SHALL respond. One line from the resurrection spec reads, "WHEN any module is parsed with Python 3.12 THEN it SHALL NOT raise SyntaxError". It's directly testable, and it became a test.

Design is where I made decisions while they were still cheap to change. Cloned code is never imported on the host, setup.py is read with ast and never executed, and the sandbox has no network during tests.

Tasks is an ordered checklist, and I built in that order. The most useful part was the notes I added when reality disagreed with the plan. The demo repos taught me that "parses on Python 3" is not "works on Python 3", and the resurrection spec gained three tasks. PyClojure's tests compared map(...) to a list, and pyfin compared dict.keys() to a list. Both are valid Python 3 syntax, and both are wrong. The fix was to treat the whole codebase as Python 2 once any file fails to parse, and apply full 2to3 semantics everywhere. With the tasks written down, this was a small edit instead of a rethink.

Steering: rules that load only when they matter

Steering documents hold the decisions I didn't want to repeat in every prompt:

  • sandbox-security.md treats cloned code like malware and lists what may and may not run on the host. It applies to backend files.
  • theme-and-tone.md fixes the UI vocabulary (Summon, Death Certificate, Ritual, Rise), the palette and accessibility rules, such as honouring prefers-reduced-motion and never showing a score by colour alone. It applies to frontend files.
  • product.md, tech.md and code-style.md cover the basics.

Choosing between inclusion: always and fileMatch mattered more than I expected. Security rules appear only when backend code is in play, so they stay short and sharp.

Hooks: boring, useful automation

Four hooks live in .kiro/hooks/:

  1. Run the backend tests when a Python file is saved.
  2. Typecheck the frontend on save.
  3. Review every new React component against the accessibility rules.
  4. Re-query OSV whenever a requirements*.txt, setup.py, setup.cfg or pyproject.toml changes, so a dependency bump never quietly reintroduces a known CVE.

The fourth is my favourite, because it uses the next piece.

MCP: a custom server for vulnerability lookups

mcp-osv is a small MCP server (Python SDK v2) with two tools: query_vulns(package, version) and get_vuln(id). It's registered in .kiro/settings/mcp.json, so the IDE can ask about vulnerabilities directly and the rescan hook can use it. It shares its OSV logic with the app, so the two always agree on what counts as vulnerable.

Property-based testing

A tool that rewrites other people's code needs more than example tests. Hypothesis properties cover the risky parts:

  • The URL parser never crashes on arbitrary input and never yields a path-traversal name.
  • The decay score stays between 0 and 100 and always equals its visible breakdown.
  • Rewritten Python 2 code (iteritems, xrange and so on) returns results matching the Python 2 meaning on generated dictionaries.

Necromancer also generates Hypothesis tests for the repos it resurrects, comparing each rewritten pure function with a frozen copy of the original.

Honest limits

  • I did not use Kiro Crew, custom agents or Kiro powers.
  • The specs, steering and implementation were written with an AI coding assistant (Claude Code), working in Kiro's spec, design, tasks order. I did not run the whole build inside the Kiro IDE, so this project follows Kiro's method and file formats. It is not a recording of a Kiro session.

Advice if you're starting

Write requirements as sentences you can turn into tests. Keep the tasks file honest: when the plan is wrong, change the plan, not just the code. And let steering carry your non-negotiables so you can stop retyping them.

Try it

git clone https://github.com/Yashika2211/kiroween.git && cd kiroween make setup && make api # terminal 1 make web # terminal 2, then open http://localhost:3000 

Let dead code rest… or don't.