# Phase overview Use this document as the top-level index for the current release-oriented recovery pipeline. ## Repository model - repo root is the canonical editable deobfuscated tree - `runs/` keeps local current and previous upstream snapshot artifacts - `stable/` keeps long-lived metadata reused across snapshots - `releases/` stores machine-readable manifests for published deobfuscated versions - upstream bundles are stored as release assets, not committed into git ## Release model - an upstream “release” is any snapshot you decide to ingest - your published versions use your own versioning, e.g. `0.y.z` - `y` changes when the upstream snapshot changes - `z` changes when only maintained transforms or packaging change - publish with both Git tags/Gitea Releases and the package registry ## Cross-phase invariants - do not rewrite semantics during relabeling - do not depend on LLM output for splitting or diffing - only send changed or new segments to the LLM on upgrade - keep maintained changes replayable as transforms, preferably `jscodeshift` codemods - keep normal git commits as the human audit log for maintained changes - emit compact upstream summary manifests instead of line-by-line historical ledgers - surface low-confidence transform replays as conflicts instead of auto-applying them ## Phases 1. [Phase 1 — deterministic ingest](file:///home/user/git/amp-decompiled/docs/phases/phase-1-deterministic-ingest.md) 2. [Phase 2 — dependency identification and externalization](file:///home/user/git/amp-decompiled/docs/phases/phase-2-overview.md) 3. [Phase 3 — context extraction](file:///home/user/git/amp-decompiled/docs/phases/phase-3-context-extraction.md) 4. [Phase 4 — run-to-run diffing and upstream summary](file:///home/user/git/amp-decompiled/docs/phases/phase-4-run-to-run-diffing.md) 5. [Phase 5 — iterative relabel queue planning and batching](file:///home/user/git/amp-decompiled/docs/phases/phase-5-iterative-relabel-queue-export.md) 6. [Phase 6 — relabel API execution and wave scheduling](file:///home/user/git/amp-decompiled/docs/phases/phase-6-relabel-api-execution-and-wave-scheduling.md) 7. [Phase 7 — iterative relabel evaluation, application, and queue feedback](file:///home/user/git/amp-decompiled/docs/phases/phase-7-iterative-relabel-evaluation-application-and-queue-feedback.md) 8. [Phase 8 — deterministic codebase regularization](file:///home/user/git/amp-decompiled/docs/phases/phase-8-deterministic-codebase-regularization.md) 9. [Phase 9 — derive and replay maintained transforms](file:///home/user/git/amp-decompiled/docs/phases/phase-9-patch-capture-and-replay.md) 10. [Phase 10 — build and publish release artifacts](file:///home/user/git/amp-decompiled/docs/phases/phase-10-build-recovered-source-tree.md)