Unwind
Skills library for reverse engineering codebases. Produces complete, machine-readable documentation and phased rebuild plans to reliably re-build the service or application in a new technology or modernised framework.
Purpose
Generate documentation that enables an AI agent to rebuild your system in a different language or framework while maintaining:
- External API contract compatibility
- Business logic accuracy
- Data model integrity
Unwind is hybrid: a deterministic scanner (@unwind/core, built on
tree-sitter) produces the verifiable ground truth — file inventory, structural
symbols, import graph, and a first-pass layer assignment — and LLM specialists add
the semantic rebuild documentation. Completeness is then verified by set
arithmetic (scan − docs), not asserted. Symbol extraction supports
TypeScript/JavaScript, Python, Rust, Java, and C#; other languages get file-level
coverage, and if Node/pnpm is unavailable Unwind falls back to a pure-LLM flow.
Coverage, though, only proves every item is documented — never that its behaviour
deserves to be reproduced. So Unwind can also grill the codebase: uw-grill
hunts for business rules a rebuild would faithfully copy but shouldn't (obsolete
workarounds, unexplained constants, contradictions, dead rules), and for [MUST]
items specified too thinly to rebuild from at all. Because the person running
Unwind usually can't answer "is an 8-hour working day still right?", the questions
only a domain expert can settle are written into docs/unwind/questions/ as plain
English questionnaires to route and answer.
It can also execute the rebuild: uw-build interviews you about scope and
order, dispatches technology-agnostic builder agents that reproduce each layer's
[MUST] contracts in the target stack, then re-scans the rebuilt repo and diffs
it against the source to measure completeness — a before/after picture, again by
set arithmetic rather than assertion.
Quick Start
Install
/plugin marketplace add nearform/unwind
/plugin install unwind@nearform
Restart Claude Code after installation.
Use
New here? Just run the entry point:
Use unwind:uw-start # orients you, checks prereqs, drives the whole pipeline
Or run the phases manually:
1. Use unwind:uw-scan # deterministic scan → architecture.md (+ scan-manifest.json)
2. Use unwind:uw-dashboard # visualize it — works straight after the scan
3. Review docs/unwind/architecture.md
4. Use unwind:uw-analyze # seed → analyze → verify coverage → complete
5. Use unwind:uw-grill # optional: attack the business logic → questions/ for domain experts
6. Use unwind:uw-plan # → REBUILD-PLAN.md
7. Use unwind:uw-dashboard # re-open to explore coverage, priorities & contracts
8. Use unwind:uw-build # execute the rebuild in the target stack (+ verification graph)
You can run unwind:uw-dashboard any time after step 1 — right after the
scan it shows the structural graph (everything scanned); after analysis it fills
in coverage and the MUST/SHOULD/DON'T priorities.
The first run builds the scanner automatically (pnpm install && pnpm build via
ensure_unwind_core). It needs Node + pnpm; without them, Unwind falls back to a
pure-LLM flow.
Output:
docs/unwind/questions/*.md - Questionnaires for domain experts (after uw-grill)
docs/unwind/REBUILD-PLAN.md - Strategic rebuild approach
docs/unwind/layers/*/ - Detailed layer analysis (folder per layer)
docs/unwind/rebuild-graph.json - Knowledge graph for the dashboard
docs/unwind/rebuild-verification-graph.json - Source→target completeness (after uw-build)
docs/unwind/.cache/ - Deterministic artifacts: scan-manifest.json (ground truth), seeds/ (per-layer checklists), coverage/ (per-layer coverage reports), grill-findings.json (grill verdicts), rebuild-state.json (rebuild ledger)
Updating
/plugin marketplace update nearform
/plugin uninstall unwind
/plugin install unwind@nearform
How it works
Unwind interleaves deterministic scripts (which own the verifiable facts) with
LLM sub-agents (which add semantic judgment). The deterministic layer is what
makes "did we document everything?" a checkable question instead of a hopeful one.

Step by step