SuperAPI AI Directory

rebuild-dossier

Rebuild Dossier is an MCP server for reverse-engineering a trustworthy rebuild specification from an existing app (including a locked CLAUDE.md, .claude/ configuration, and a mutation-tested test suite), so that any coding agent can cleanly rebuild the app from that specification. It does not rebuild the app itself; instead, it generates specifications, contracts, and tests for use by coding agents. The tool addresses the partial-assurance gap by extracting interface contracts, surfacing ambiguities for explicit decisions, and generating mutation-tested checks before a coding agent rebuilds the app.

Open website

About this tool

Rebuild Dossier is an MCP server designed to reverse-engineer a trustworthy rebuild specification from an existing app, including a locked CLAUDE.md, .claude/ configuration, and a mutation-tested test suite, so that any coding agent can cleanly rebuild the app from that specification rather than by guessing. It does not rebuild the app itself; instead, it generates specifications, contracts, and tests for separate use by coding agents.

Key capabilities:

  • Provides six MCP tools that can run in Claude Code or any MCP-compatible session.
  • ingest_repo: static analysis only, no LLM calls, and executes nothing. Parses package.json, route files (currently supporting Express and Next.js App Router), build configuration (Tailwind/Vite/Next, via AST, never executed), existing tests, and scans comment/TODO signals and structural smells. Results are saved in <repo>/.dossier/.
  • crawl_site (optional): uses headless Playwright to crawl reachable routes and requires Chromium (install via npx playwright install chromium).
  • resolve_case: resolves ambiguities in the case queue. Supports interactive mode (via MCP elicitation) or resolving one by one.
  • generate_spec: can only be called when the queue is empty. Generates CLAUDE.md, .claude/ (rules, hooks, spec audit subagent, verification skill), spec/ (contracts, locked decisions, test-dependencies.json, untested-contracts.json), and tests/ into a clean sibling directory some-app-rebuild/. It also runs real mutation checks, deliberately breaking the original code to confirm that each generated test can catch it.

Usage:

  • Requires Node 20.12+. Can be installed via npm, or cloned from source, then npm install and use npm start.
  • In Claude Code, add it as an MCP server from the project to be rebuilt.
  • First call ingest_repo for static analysis to confirm the server is running properly.
  • Optional: call crawl_site crawls live sites (Chromium must be installed first).
  • Optional: flag known broken items before resolving the queue (direct human statements take precedence over inference).
  • Resolve the case queue (interactive or one by one).
  • Generate the spec, then enter the some-app-rebuild/ directory, start a new Claude Code session, and paste the contents of kickoff-prompt.txt.

Use cases:

  • Developers who need to reverse-engineer rebuild specs from an existing app.
  • Teams rebuilding an app with coding agents but wanting reliable specs and test assurance.
  • Scenarios for researching or evaluating behavioral equivalence of the rebuild pipeline.

Limitations:

  • Does not rebuild the app itself; only generates specs and tests.
  • crawl_site requires Chromium, which is not bundled in the server.
  • Route parsing currently supports Express and Next.js App Router.
  • Mutation checks require the target repo to have run npm install; otherwise the generated tests may fail to import dependencies.
  • Shell parsing is heuristic; writes made through scripts previously written by the agent may not be detected.
  • Automatic ambiguity resolution requires consistent signals and an explicit decision signal (comments, a TODO acknowledging an error, or a direct human answer); silent consistency alone will not auto-resolve.
  • For Next.js targets, tests for page routes are captured using Playwright, and the text classifier may make mistakes.
  • Setting GROQ_API_KEY and REBUILD_DOSSIER_ENABLE_VISION_CLASSIFICATION=1 enables page classification using Groq vision models.

The tool has been validated on real apps, and the core loop (ingestion, resolving cases, generating specs) has been tested end to end.