This commit is contained in:
2026-11-09 07:49:38 -05:00
commit 8acc9bad57

37
PLAN.md Normal file
View File

@@ -0,0 +1,37 @@
# Final Wishes: encrypted, printable "in case of death or incapacity" file
## Context
`abi-wishes.pdf` (8 pp, last updated 2022-04-14) is a hand-written estate/affairs guide: narrative instructions plus structured records (bank accounts, cards, investments, physical locations, advisors, funeral plans, wind-down steps for Polymorph Corp., TBDs and a "Things to ADD" list). It also contains plaintext secrets (device PIN, LastPass master password, ATM PIN, bank logins). Goal: a maintainable master copy that lives on a thumbdrive, is encrypted at rest, can be opened by a non-technical executor on any PC/Mac, and prints as a clean, human-friendly document.
Decisions made: non-technical reader, single passphrase encrypts everything, single self-contained HTML file, migrate content with xxxx masks preserved (no real secrets pass through Claude).
## Recommended approach
One file, `final-wishes.html`, that contains the app (editor + print layout) and the encrypted data blob. No install, no network, works offline from the thumbdrive.
- **Encryption**: WebCrypto, PBKDF2 (high iteration count) or scrypt-like via WebCrypto-only primitives -> AES-256-GCM. Passphrase prompt on open; wrong passphrase fails cleanly. Data stored as base64 blob inside the HTML.
- **Saving**: browsers can't overwrite the file silently, so "Save" re-downloads an updated `final-wishes.html` (File System Access API where available to save in place, download fallback otherwise). Keeps a dated backup copy name (`final-wishes-YYYYMMDD.html`).
- **Data model** (JSON, schema-light): ordered sections, each with typed records. Section types derived from the PDF: Access & Devices, Documents & Safe (location/key/contents), Identity, Bank Accounts (+ access info), Credit Cards, Investments, Precious Metals/Cash, Vehicles & Insurance, Property/Antiques, Advisors, Medical, Residences, Will/Directive/Funeral, Business Wind-down (ordered steps), Appendices, and a "To add" checklist. Each field can be flagged `secret` and each record has `status` (done/TBD) and `last updated`.
- **Print**: `@media print` stylesheet: cover page (title, owner, last-updated, "how to use this"), table of contents, one section per page break, checkboxes on wind-down steps, TBD items highlighted, page footers "In the event of my death or incapacity - Last update: <date>". Print-options toggle: **include secrets / mask secrets** so you can produce a safe overview vs. the full sealed-envelope copy.
- **Executor experience**: opens to a plain "Start here" page (what this is, who to call, first 5 things to do), then sections. Read-only by default; edit mode behind a button.
- **Thumbdrive layout**: `final-wishes.html`, `README.txt` (3 lines: double-click, enter passphrase, print), `backups/`. Build is a tiny script that bundles app + encrypted data into the single HTML; the app source stays in this repo.
## Implementation steps
1. Scaffold repo: `src/` (app: vanilla JS + CSS, no framework, no external CDN so it works offline), `build.js` (inline everything into one HTML), `data/` (gitignored plaintext working copy, never committed), `.gitignore`.
2. Crypto module + tests (round-trip, wrong passphrase, tamper detection).
3. Data model + migration file `data/seed.json` built from the PDF with masked values as written; TBDs preserved as `status: tbd`; "Things to ADD" items become checklist records.
4. Viewer/editor UI (section nav, record forms, add/remove/reorder, secret fields masked with reveal toggle).
5. Print stylesheet and cover/TOC/Start-here pages; include/mask-secrets toggle.
6. Build script producing the encrypted single HTML from seed + passphrase prompt.
7. README for the executor and a short maintenance note for you (how to update, where to store the passphrase, e.g. sealed envelope in the fire safe or with an attorney).
## Notes / risks to surface
- The existing PDF has live secrets in plaintext: once the encrypted copy exists, destroy the old PDF copies and rotate the LastPass master password and PINs that appear in it.
- Passphrase handover is the real single point of failure; plan documents it but can't solve it.
- Stale data: PDF dates from 2022 (cards expired 11/22 and 06/25, 2020 metal values); the app shows per-record last-updated and a "review by" nudge.
- Thumbdrives fail: keep a second copy elsewhere (second drive / the file is safe to put in cloud storage since it is encrypted).
## Verification
- Run crypto unit tests (round trip, bad passphrase, corrupted blob).
- Build the HTML, open it in Chrome and Firefox from a file:// path with no network, unlock, edit a record, save, reopen.
- Print-preview to PDF both with secrets masked and included; check pagination, TOC, footers.
- Confirm no plaintext secrets exist in the built file (grep for a known test string).