# Key Resonance Destiny — Recovery Report

## Summary

- **Output directory:** `/opt/cursor/artifacts/recovered_key_resonance_destiny`
- **Zip:** `/opt/cursor/artifacts/RECOVERED_KEY_RESONANCE_DESTINY.zip`
- **Dart files (project `lib/` + `test/` + `tool/`):** 32
- **Dart files (legacy tree):** 401
- **Dart files (all):** 443
- **pubspec.yaml:** synthesized Flutter 3.x (`name: key_resonance_destiny`) — transcript only had a description-line edit on the create template

## Key paths present

| Path | Exists |
|------|--------|
| `lib/main.dart` | True |
| `lib/core/chart_engine.dart` | True |
| `lib/core/key_analyzer.dart` | True |
| `pubspec.yaml` | True |

## Integrity (project dart)

_All project `lib/` / `test/` / `tool/` dart files have balanced `{{}}` and `()`._

## Truncated files

_None detected via truncation markers in final artifact files._

## Partial / reconstructed auxiliaries

- android/app/src/main/AndroidManifest.xml — only label change in transcript; completed from standard Flutter 3 manifest template
- web/manifest.json — diff was partial (icons truncated); rebuilt with edited fields + standard Flutter web icons block

## Source transcript IDs

- `bc-019f92a0-f8b4-71a4-8ac9-196bfcfbdd39` — **PRIMARY** (`/agent/flutter_app/...` → project root). Final app core.
- `bc-019f9509-86fe-7973-93e1-cd1ae7a47a63` — earlier `key_resonance_destiny` UI edits → `_legacy_key_resonance_destiny/`
- `bc-019f9d82-3034-74c0-bca4-c00103354a05` — legacy engine/UI edits
- `bc-019f9d51-ab2f-7211-99c3-7b05da278a3d` — legacy camp-energy edits
- `bc-019f949c-cd88-7408-a572-209992b64b19` — large mature legacy tree (7036+ edit chunks)

## Method

1. Stream-parsed transcript JSON `messages[]` for `editFileResult` unified diffs; applied chronologically (later wins).
2. For `flutter_app` files created via `cat > … << EOF` shell commands, seeded from heredoc bodies then applied subsequent patches with system `patch` (handles off-by-one from `@@ -1 +1,N @@` new-file hunks).
3. Normalized `/agent/flutter_app/...` → project root; `/agent/key_resonance_destiny/...` → `_legacy_key_resonance_destiny/`.
4. Incomplete root `pubspec.yaml` replaced with Flutter 3.x template including requested deps.

## Runnable-core verdict

**Yes — looks like a runnable app core** for analysis/UI: `lib/main.dart`, full `lib/core/` engine (`chart_engine`, `key_analyzer`, solar/time, report), UI screens, tests, and `pubspec.yaml`. Not a full platform scaffold (no complete `android/`/`ios/` project trees beyond a reconstructed manifest label).

## Project path inventory (non-legacy)

- `AGENT_README.md` (2951 bytes)
- `README.md` (286 bytes)
- `analysis_options.yaml` (122 bytes)
- `android/app/src/main/AndroidManifest.xml` (1402 bytes)
- `lib/core/chart_engine.dart` (6679 bytes)
- `lib/core/constants.dart` (10553 bytes)
- `lib/core/cross_chart.dart` (8983 bytes)
- `lib/core/energy_calculator.dart` (4586 bytes)
- `lib/core/key_analyzer.dart` (10036 bytes)
- `lib/core/liuqin.dart` (3648 bytes)
- `lib/core/models.dart` (4377 bytes)
- `lib/core/report_generator.dart` (8491 bytes)
- `lib/core/solar_terms.dart` (6015 bytes)
- `lib/core/time_correction.dart` (3318 bytes)
- `lib/data/cities.dart` (3961 bytes)
- `lib/data/tutorial_cases.dart` (4414 bytes)
- `lib/l10n/l10n.dart` (4037 bytes)
- `lib/main.dart` (1453 bytes)
- `lib/services/stripe_service.dart` (1735 bytes)
- `lib/ui/cases_screen.dart` (3766 bytes)
- `lib/ui/cross_chart_screen.dart` (4960 bytes)
- `lib/ui/home_screen.dart` (6316 bytes)
- `lib/ui/input_screen.dart` (4954 bytes)
- `lib/ui/privacy_screen.dart` (1383 bytes)
- `lib/ui/report_screen.dart` (4442 bytes)
- `lib/ui/theme.dart` (1706 bytes)
- `lib/ui/tutorial_screen.dart` (2220 bytes)
- `lib/ui/web_shell.dart` (1067 bytes)
- `pubspec.yaml` (497 bytes)
- `test/accuracy_test.dart` (8499 bytes)
- `test/cross_chart_test.dart` (3003 bytes)
- `test/engine_test.dart` (4752 bytes)
- `test/widget_test.dart` (289 bytes)
- `tool/accuracy_probe.dart` (1165 bytes)
- `tool/check_chart.dart` (805 bytes)
- `tool/find_birth.dart` (2240 bytes)
- `tool/full_accuracy.dart` (3555 bytes)
- `web/index.html` (1965 bytes)
- `web/manifest.json` (973 bytes)

## Legacy

- `401` dart files under `_legacy_key_resonance_destiny/`
