# Rebuild Dossier [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/Parker-Fawcett/rebuild-dossier  
**GitHub Stars:** 3  
**npm Downloads (last month):** 378  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/rebuild-dossier

## Description
MCP server that reverse-engineers a locked rebuild spec from an existing app.

## Tools
Capabilities this server exposes over MCP:

- **ingest_repo** — Parse package.json, tailwind/vite config, route files, and existing tests via static analysis. No LLM call.
- **crawl_site** — Playwright headless crawl of reachable routes. Emits periodic progress notifications.
- **flag_known_bug** — Record a known bug. Always overrides auto-resolve for any case it matches, regardless of other evidence.
- **get_case_queue** — Return unresolved ambiguity cases from reconciliation.
- **resolve_case** — Resolve one open case with a human decision. Always available, no elicitation capability required.
- **generate_spec** — Write CLAUDE.md, .claude/, spec/, tests/, and kickoff-prompt.txt to <repo>-rebuild/. Only callable once the case queue is empty. Optional: if the target is a Next.js app with page routes, set GROQ_API_KEY and REBUILD_DOSSIER_ENABLE_VISION_CLASSIFICATION=1 before calling this tool to enable vision-assisted page-content classification (sends each captured page's screenshot and source code to Groq to judge static vs. dynamic content more accurately than plain regex matching) — ask the user for a Groq API key if they want more reliable generated page tests and this isn't already configured. Off by default; nothing changes if unset. Optional: pass authStorageStatePath to reach auth-gated pages during capture — see that field's own description for how to produce it.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "rebuild-dossier": {
    "command": "npx",
    "args": ["-y","rebuild-dossier@latest"]
  }
}
```

## Documentation

## What Rebuild Dossier does

Rebuild Dossier turns an existing application into a structured handoff for a coding agent. Its output includes a `CLAUDE.md` brief, Claude configuration, contract documents, visible and held-out tests, and a kickoff prompt. The generated material records interface behavior and unresolved decisions so a fresh agent can implement against an agreed specification instead of inferring requirements from scattered evidence.

The server is deliberately limited to preparing the rebuild. It does not implement the application itself, and it writes the result to a clean `<repo>-rebuild/` sibling directory rather than the source repository.

## How it works

The workflow starts with static inspection of the target repository. Source files are parsed without executing the app, and the analysis covers package metadata, build configuration, route files, existing tests, and structural patterns that may indicate a behavioral ambiguity.

A browser phase can then use Playwright to visit reachable routes. The crawl reports periodic progress notifications, which helps clients distinguish a long-running crawl from an unresponsive operation. Authentication-gated pages can be reached by supplying an authentication storage-state path when capturing the site.

Evidence is reconciled into cases that require a decision. Known bugs can be recorded as authoritative overrides, while other questions remain in the case queue until resolved. Automatic resolution requires both agreeing signals and evidence that someone intentionally chose the behavior; silent agreement alone becomes a question. Once all cases are closed, generation can proceed. Before finalizing the test suite, the workflow performs a mutation check by deliberately breaking the original code and checking whether the generated tests detect the changes.

## Setup and configuration

Install the npm package with `npx rebuild-dossier@latest --help` or install it globally with `npm install -g rebuild-dossier`. Running from source requires cloning the repository, installing dependencies, and starting it with `npm start`. Node.js 20.12 or newer is required.

For Claude Code, register the server with:

```bash
claude mcp add rebuild-dossier -- npx -y rebuild-dossier@latest
```

The initial `ingest_repo` call needs no browser, Chromium, or language-model configuration. Site crawling requires Chromium, which can be installed with `npx playwright install chromium`.

For optional vision-assisted classification of pages in a Next.js application with page routes, set `GROQ_API_KEY` and `REBUILD_DOSSIER_ENABLE_VISION_CLASSIFICATION=1` before calling `generate_spec`. This sends captured screenshots and source code to Groq to help distinguish static from dynamic content. The feature is disabled unless enabled and configured.

## Tools and capabilities

- `ingest_repo` extracts repository structure, routes, configuration, tests, and structural ambiguity signals through static analysis.
- `crawl_site` uses a headless Playwright browser to capture reachable routes and emit progress notifications.
- `flag_known_bug` stores a bug description and gives matching cases precedence over automatic resolution.
- `get_case_queue` lists unresolved ambiguity cases; clients with MCP elicitation can use that interaction mode.
- `resolve_case` records a human decision for an individual open case and remains available without elicitation support.
- `generate_spec` creates the rebuild dossier only after the ambiguity queue is empty. Generated guard hooks lock specification files and prevent work on contracts that lack tests.

## Limitations and notes

The original application is not rebuilt by this server. A coding agent must consume the generated files and perform that implementation separately. Browser crawling also depends on Chromium being installed locally.

Generated enforcement covers common direct tools and write-shaped shell commands, but shell parsing is heuristic. A write performed through a script that the agent created earlier can bypass those parsing rules. Vision classification is optional, requires Groq credentials, and is intended for the specified Next.js page-route scenario rather than being a default part of every run.

_Full upstream README: https://allmcps.com/mcp/rebuild-dossier/readme_

