Renames this repo's markdown onto README.md / CLAUDE*.md / DOCS*.md / TODO*.md so a future session can tell a live task from a finished record without reading the file to find out. TODO files carry the literal "REMOVE ME AFTER FINISH" and are deleted when the work lands. Enforced by the md-naming pre-commit hook and CI workflow, both delegating to the shared gate in kuhyx/utils so this repo's idea of a valid name cannot drift from every other repo's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A47aX5DJwmA3QFn3pkEWi7
3.2 KiB
Restore priority, backup policy and documentation requirements
Restore priority order
When the phone is freshly formatted or in a degraded state, restore in this priority order:
- connection and root verification
- security scripts and boot persistence
- canonical hosts and DNS protections
- launcher enforcement and companion app
- APK reinstall support
- selected app data
- media and user files
Backup and restore policy classification
Each manifest entry should specify how it may be restored.
Suggested fields:
namekind(apk,app_data,media,security_state)backup_pathsrestore_policy(safe_restore,manual_only,backup_only)requires_rootrequires_version_matchintegrity_checkcontains_secrets
The implementation must never silently restore unsupported or risky payloads. When restore safety is uncertain, it should back up the data and report it as manual-only.
Conservative v1 restore policy
For the initial implementation, app-data restore should default to the most conservative stance:
- no app-data entries should ship as
safe_restoreby default - app-data items should default to
manual_onlyunless a later design change explicitly promotes a named package after validation - APK restore, security-state restore, and configured media/file restore may proceed according to their own manifest policies without implying that private app-data restore is equally safe
This keeps v1 focused on reliable security recovery and host-side backups while avoiding premature promises about rooted Android app-data portability.
Canonical manifest examples
The manifest should include entries with a concrete shell-native shape. For example:
APK_ITEMS=(
"com.qqlabs.minimalistlauncher|safe_restore|yes|yes"
)
APP_DATA_ITEMS=(
"com.beemdevelopment.aegis|/data/data/com.beemdevelopment.aegis|manual_only|yes|yes"
)
MEDIA_ITEMS=(
"photos|/sdcard/DCIM|safe_restore|no|no"
)
Where each pipe-delimited record maps to:
- name or package
- source path
- restore policy
- requires root
- requires integrity check
The implementation may wrap these records with helper functions, but should keep the manifest format simple enough to read and edit without custom tools.
This ordering ensures the phone becomes safe again before broader recovery work continues.
Documentation and discoverability requirements
The final implementation must make the workflow obvious in at least two places.
README requirements
phone_focus_mode/README.md should document:
- the visible wrapper location
- the three core user flows:
- normal day
- after format
- if something feels wrong
- examples for
auto,fresh-phone,doctor,backup, andmonitor - backup scope and monitoring expectations
Script help-text requirements
Both scripts/run_all/run_phone.sh and phone_focus_mode/run_phone.sh
should expose help text that includes the memorable usage guidance:
- run the wrapper with no arguments for everyday backup and minor repair
- run
fresh-phoneafter a format - run
doctorwhen the phone seems unhealthy or protections drifted
This is not just documentation; it is part of the usability contract.