Inspiration

Every researcher has met this wall. You find the perfect repository — a paper's reference implementation, the scraper that does exactly what you need, the library your old project depended on — and the last commit was years ago. pip install -r requirements.txt pulls in today's packages, and the code dies on import. robobrowser (≈3.7k stars, last commit June 2015) is a good example: line 8 does from werkzeug import cached_property, which Werkzeug removed in 1.0 (February 2020).

The code isn't broken. It's from a different time. The fix is always the same tedious detective work — what did PyPI look like on the day this repo was last touched? — so we built a machine that does it.

What it does

Paste a GitHub URL. Lazarus runs a five-stage ritual, entirely in your browser:

  1. Time of death — the last commit date of the branch, tag or commit you pick (or a date you choose).
  2. Relics — it reads requirements.txt, setup.py, setup.cfg, pyproject.toml (PEP 621 and Poetry), Pipfile and environment.yml, including -e .[extras] self-references and install_requires passed through variables. If a repo has no dependency files, it scans the imports and maps them to PyPI names (yaml → PyYAML, bs4 → beautifulsoup4), ignoring the standard library.
  3. Time travel — for each package, the newest release uploaded on or before the time of death that satisfies the repo's own constraints and the Python of that era (requires_python is checked per release). Exact pins are kept and yanked releases are skipped.
  4. Resurrection kit — for Python ≥ 3.8, a two-stage Dockerfile that compiles a full transitive lock with uv pip compile --exclude-newer <date>; for older Python, a clearly labelled pip fallback. Plus requirements.lock.txt, a RESURRECTION.md and a one-line alternative. Copy each file or download a zip.
  5. Death certificate — an honest report: packages that didn't exist yet, were yanked, aren't on PyPI or conflict with the era's Python, as blockers or warnings, with an overall confidence.

Example: robobrowser comes back as Python 3.4 with Werkzeug==0.10.4, requests==2.7.0, beautifulsoup4==4.3.2, six==1.9.0. Ask for kennethreitz/records as of 2019 and Lazarus refuses to guess: today's setup.py wants SQLAlchemy>=2.0, which did not exist in 2019, so it's a blocker.

The same pipeline is an MCP server (resurrect_repo), so an AI coding agent can build a working environment before it edits an old repo, and a CLI (npm run demo -- <url>).

How we built it

Spec-first in Kiro (details in How Kiro was used below): steering files → requirements → a design with five correctness properties → 12 tasks, with Kiro executing the core pipeline.

All pipeline logic is framework-free TypeScript in src/lib, and every module takes an injectable fetch. That one rule lets the same tested code run in the React web app, the CLI and the MCP server — and lets the integration tests run the whole pipeline offline against fixture repos. GitHub's and PyPI's public APIs both allow cross-origin requests, so there is no backend: the app is a static site on GitHub Pages.

Stack: TypeScript, React, Vite, Vitest, fast-check, JSZip, the MCP TypeScript SDK, uv (in the generated Dockerfiles).

Challenges we ran into

  • requires_python lives on each release, not the package. Our first resolver used the newest release's value for every version, so 2019 pytest looked incompatible with Python 3.7. Reading it per release file fixed a whole class of false blockers.
  • "Did not exist yet" vs "wrong Python". Both used to look the same in the certificate; we now separate them so the report tells you why.
  • uv can't target Python older than 3.8. Rather than pretend, Lazarus switches to a single-stage pip Dockerfile and says, in the certificate, that transitive dependencies are not date-locked.
  • Rate limits. GitHub allows 60 anonymous requests an hour, so Lazarus fetches one tree and only the files it needs (about 3 + one per dependency file), and a token can be added for the current tab only.
  • Setup files are code. We parse setup.py without executing it — including lists and dicts referenced by variable name.

Accomplishments that we're proud of

  • An old, famous, broken repo comes back with the exact package versions of its era in a few seconds, with no install, account or server.
  • Honesty is a feature: blockers are reported instead of guessed around.
  • One pipeline, three front doors — web app, CLI and MCP tool — all covered by the same 131 tests.

What we learned

Writing correctness properties before the code changes what you build: "nothing resolved may be newer than the time of death" and "exact pins are preserved" were decided in the design, so the resolver was written to satisfy them and fast-check now guards them on every change. The bugs that did slip through came from real-world data (per-release requires_python, setup.py written as code), which is why we added offline fixture repos. And steering files were the cheapest way to keep an agent consistent: because shared, framework-free src/lib was a rule from day one, the MCP server needed no changes to the core.

What's next for Lazarus

  • Travel back in time for the repo's own files too (read dependency files at the commit nearest the chosen date).
  • A one-click docker build check in CI, and Binder/devcontainer output.
  • Conda and system-library hints (CUDA, libxml2) in the certificate.
  • Wayback Machine fallback for dead dataset download links.
  • More languages: npm and RubyGems have the same "what existed that day" problem.

How Kiro was used

Kiro app. Everything was done in the Kiro IDE (desktop), using the Spec workflow to generate the spec and agent chat to execute it task by task. We did not use the CLI, Web, Crew or custom agents.

Spec-driven development. We wrote the idea once, and Kiro produced requirements.md (EARS, 65 SHALL statements across 9 requirement groups), design.md (module boundaries for src/lib, data types, error kinds, and five correctness properties) and tasks.md (12 tasks, each linked to the requirements it satisfies). We then asked Kiro to execute Tasks 1–6 in order and stop: it scaffolded the project, built the GitHub client, the relic collector and six parsers, the PyPI client, the resolver, the kit generators and the CLI, running the tests after every task and ticking them off. Compared with vibe coding, the difference was that every bug report could point at a requirement: when the first real demo produced a lockfile with only pytest, pointing at Requirement 2 (dependency-file parsing) and the -e .[pg] line it was dropping told Kiro exactly what to fix, and it fixed it with tests instead of patching the demo.

Steering. product.md, tech.md and structure.md were written before any code. The rule with the biggest effect was in tech.md/structure.md: all pipeline logic lives in framework-free src/lib, shared by the web app and the MCP server. Kiro followed it in every session, so adding the MCP server later required no change to the core. product.md's "honesty over magic" principle is why the death certificate reports blockers instead of guessing.

Agent hooks. Two hooks in .kiro/hooks/, created by Kiro: Test on save — a command hook runs vitest --changed whenever a src/lib/**/*.ts file is saved, and a paired agent hook explains any failing assertion and proposes the smallest fix; Spec sync — an agent hook that, on every save in src/lib/ or mcp/, rereads requirements.md and tasks.md and names any requirement the change contradicts.

Property-based testing. The design's five correctness properties became fast-check tests (100 runs each): nothing resolved is newer than the time of death; exact pins survive; lockfile render→parse round-trips; render→parse round-trips for all six dependency-file formats; never more than 6 concurrent PyPI requests. Honestly, the PBTs passed on the first run — the bugs we hit came from real-world data (per-release requires_python, setup.py passing lists through variables), which is why we also added offline fixture repos for integration tests. The PBTs now guard the core guarantees on every change.

MCP. We built an MCP server (mcp/server.ts, tool resurrect_repo) so Kiro — or any agent — can resurrect an old repo before editing it. It reuses src/lib unchanged.

Kiro powers. Not used.

Other tools, for transparency. UI (Tasks 8–9), the MCP server, integration tests and docs (Tasks 10–12) were finished with an AI coding assistant (Claude) following the same Kiro spec and task list; all task check-offs are in tasks.md.

Built With

Share this project:

Updates

Submission history