# Capture changes into my fork

You're integrating one or more commits from a sibling GitHub fork into
the CURRENT WORKING DIRECTORY. The CWD should already be a clean git
working tree on a branch you're willing to commit to.

## Source thread: dropthejase rips out Supabase for Aurora

The biggest single piece of fork divergence yet: a top-to-bottom database replatform onto AWS.

| # | SHA | Subject | Fork | Authored |
|---|-----|---------|------|----------|
| 1 | [`4592c835`](https://github.com/dropthejase/louis/commit/4592c835e7700833483a8424c5315b2decdd6fe1) | Remove dead API key, credits, and model preference code | `dropthejase/louis` | 2026-05-08 |
| 2 | [`ffc6152e`](https://github.com/dropthejase/louis/commit/ffc6152e3e000dd643f7b29d93212097012ad8d9) | docs: mark dead code cleanup items done in ORIGINAL-FUNCTIONALITY.md | `dropthejase/louis` | 2026-05-08 |
| 3 | [`89eded60`](https://github.com/dropthejase/louis/commit/89eded60ebbe5f4a464d0b32112042f6ad153dc2) | docs: update outstanding gaps - mark env vars, userSettings, UserProfileContext, | `dropthejase/louis` | 2026-05-08 |
| 4 | [`ae54357d`](https://github.com/dropthejase/louis/commit/ae54357deb3ef61f4a437a647fb0d5a6855939c3) | docs: update README for Aurora migration, Finch prerequisite, remove Supabase se | `dropthejase/louis` | 2026-05-08 |
| 5 | [`44b12882`](https://github.com/dropthejase/louis/commit/44b1288274d5535b483e30d0cc089cf9556d1568) | fix(scripts): enforce Finch, block if not installed | `dropthejase/louis` | 2026-05-08 |
| 6 | [`8de3aea2`](https://github.com/dropthejase/louis/commit/8de3aea29ab5564508635a0af8bc6449b4b40bf5) | feat(infra): add DatabaseStack with Aurora Serverless v2 | `dropthejase/louis` | 2026-05-08 |
| 7 | [`7588c924`](https://github.com/dropthejase/louis/commit/7588c924a208d61d971a139200ced149023f394e) | feat(infra): wire DatabaseStack, remove Supabase from ApiStack | `dropthejase/louis` | 2026-05-08 |
| 8 | [`068cbca6`](https://github.com/dropthejase/louis/commit/068cbca6742b1551356d86a0d2a344f4431211cd) | fix(infra): add VPC to DatabaseStack, remove stage conditionals and dead Supabas | `dropthejase/louis` | 2026-05-08 |
| 9 | [`f365807b`](https://github.com/dropthejase/louis/commit/f365807b35b1046ac27a255096cdc48dbaacfebd) | feat(infra): migrate trigger Lambdas from Supabase to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 10 | [`a3bef4d9`](https://github.com/dropthejase/louis/commit/a3bef4d96ae4dbf4ad16f130560ef50bfeb4ed98) | feat(scripts): add init-db.sh for Aurora schema initialisation | `dropthejase/louis` | 2026-05-08 |
| 11 | [`d90454be`](https://github.com/dropthejase/louis/commit/d90454be47c95fa6a85c3dc296bd1c0c6a91f968) | feat(backend): add RDS Data API db.ts wrapper | `dropthejase/louis` | 2026-05-08 |
| 12 | [`7c3cde2d`](https://github.com/dropthejase/louis/commit/7c3cde2d769ace9de509f67948590a04fb786c3b) | feat(backend): delete Supabase client and HMAC download tokens, simplify secrets | `dropthejase/louis` | 2026-05-08 |
| 13 | [`c11febdd`](https://github.com/dropthejase/louis/commit/c11febdd4009775aa336e5011793b655f382460f) | feat(backend): migrate access.ts to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 14 | [`f5a68e5d`](https://github.com/dropthejase/louis/commit/f5a68e5d467281ba0bdc64861fa940e54436f255) | feat(backend): migrate userSettings and documentVersions to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 15 | [`7093f284`](https://github.com/dropthejase/louis/commit/7093f2843bdb5d8546f7b4c04548f0c0a2975d37) | feat(backend): migrate user routes to RDS Data API, add GET/PUT /user/profile | `dropthejase/louis` | 2026-05-08 |
| 16 | [`c298a7a3`](https://github.com/dropthejase/louis/commit/c298a7a3fd247bab68300257dad4d532e9011c89) | feat(backend): migrate downloads route, drop HMAC tokens, use S3 presigned URLs | `dropthejase/louis` | 2026-05-08 |
| 17 | [`6464a453`](https://github.com/dropthejase/louis/commit/6464a4537d78368fd64fe2e5bd2fab02a12b192e) | feat(backend): migrate projects routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 18 | [`9b878c91`](https://github.com/dropthejase/louis/commit/9b878c916841fafc1ca8376e2e280fe0a86c726e) | fix(backend): set owner email from JWT when requester is the owner in /people en | `dropthejase/louis` | 2026-05-08 |
| 19 | [`be0685b9`](https://github.com/dropthejase/louis/commit/be0685b9fcfc837ccc6324f9cc15559c2ab27a36) | feat(backend): migrate chat routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 20 | [`ad50674c`](https://github.com/dropthejase/louis/commit/ad50674c70d103df6c5e06c57960800fc757c391) | feat(backend): migrate projectChat routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 21 | [`9eade3e7`](https://github.com/dropthejase/louis/commit/9eade3e7aa507901392ae0421775d582b3086c48) | feat(backend): migrate documents routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 22 | [`bdcf4e98`](https://github.com/dropthejase/louis/commit/bdcf4e982e8e0bf7b8c6877f2543b5549d2f6957) | feat(backend): migrate workflows routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 23 | [`0927ef0d`](https://github.com/dropthejase/louis/commit/0927ef0dd6322a6ff1015dedddfaa0488ada8f1f) | feat(backend): migrate tabular routes to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 24 | [`7c6cb941`](https://github.com/dropthejase/louis/commit/7c6cb94124ec4c6472d09c91c399450997fa5c8c) | feat(db): add email column, structure_tree default, tabular_cells unique constra | `dropthejase/louis` | 2026-05-08 |
| 25 | [`d7eb146a`](https://github.com/dropthejase/louis/commit/d7eb146a5d0e964533dda256df12b5fe5732f43f) | fix(backend): set userEmail to undefined not empty string when email claim absen | `dropthejase/louis` | 2026-05-08 |
| 26 | [`f0c8d8c9`](https://github.com/dropthejase/louis/commit/f0c8d8c9264c541c5c549051ff7b1fd6eb7446f7) | fix(backend): store email in user_profiles, fix /people owner display, normalise | `dropthejase/louis` | 2026-05-08 |
| 27 | [`9919c64d`](https://github.com/dropthejase/louis/commit/9919c64db3e7ce72044b934ce5de51390ce643a4) | fix(backend): use ON CONFLICT upserts for tabular_cells, remove select-then-inse | `dropthejase/louis` | 2026-05-08 |
| 28 | [`7cbd1fa5`](https://github.com/dropthejase/louis/commit/7cbd1fa520f1375885b74db1cd188d802d4c3a4c) | fix(backend): add shared_by_name email fallback in workflows | `dropthejase/louis` | 2026-05-08 |
| 29 | [`062b9405`](https://github.com/dropthejase/louis/commit/062b94058186ac50ef2d37a58e7b66bfd56995c3) | feat(frontend): remove Supabase, rewrite UserProfileContext to use REST API | `dropthejase/louis` | 2026-05-08 |
| 30 | [`31b740d6`](https://github.com/dropthejase/louis/commit/31b740d6b935abe228a0f0bd07556d31736d7588) | feat(backend): migrate chatTools.ts to RDS Data API | `dropthejase/louis` | 2026-05-08 |
| 31 | [`dca58634`](https://github.com/dropthejase/louis/commit/dca5863416afa06dd0d5ef52d9ff2e7067abb322) | docs: update README and migration notes to reflect Aurora migration complete | `dropthejase/louis` | 2026-05-08 |
| 32 | [`b035d679`](https://github.com/dropthejase/louis/commit/b035d679a6121f44ffb2edfcd43b0054d53c91d8) | Remove dead code: projectChat.ts and streaming route replaced by AgentCore | `dropthejase/louis` | 2026-05-08 |
| 33 | [`2daea687`](https://github.com/dropthejase/louis/commit/2daea6871d3b2227fc476271bfc2dc1c9dac7ae0) | fix(db): auto-apply typeHint UUID for id/*Id/*_id params in Aurora Data API wrap | `dropthejase/louis` | 2026-05-11 |
| 34 | [`1b2f80df`](https://github.com/dropthejase/louis/commit/1b2f80df4eb38acf57ed2dbc87545201d31b1013) | feat: migrate backend Lambda to ZIP, bump Aurora to Postgres 17.9 | `dropthejase/louis` | 2026-05-11 |
| 35 | [`c26a0b89`](https://github.com/dropthejase/louis/commit/c26a0b8993d66e750668d515bef1232d19976d80) | fix(schema): restore Aurora-compatible migration lost in backend→infra move | `dropthejase/louis` | 2026-05-11 |
| 36 | [`16fca3db`](https://github.com/dropthejase/louis/commit/16fca3db9520ed8ba6f0cffb1831323c344ef08a) | fix(api): add ::uuid cast to all numbered SQL params to fix uuid = text errors | `dropthejase/louis` | 2026-05-12 |
| 37 | [`ab615de3`](https://github.com/dropthejase/louis/commit/ab615de35b32a94ee41a2f38ddacd00372158f64) | fix(api): add ::uuid cast to numbered params in documentVersions.ts | `dropthejase/louis` | 2026-05-12 |
| 38 | [`f49ac202`](https://github.com/dropthejase/louis/commit/f49ac2027a39ecee56a4ed71fa234ede3afeb387) | fix(agents): add Aurora auto-pause retry with backoff to agent db.ts | `dropthejase/louis` | 2026-05-13 |
| 39 | [`6c104ea9`](https://github.com/dropthejase/louis/commit/6c104ea94c1c3d1bed28ef3c4771cbe15a2f67af) | fix(api,agents): ::uuid cast on project INSERT VALUES, fix replicate_document pr | `dropthejase/louis` | 2026-05-13 |
| 40 | [`e594c7ec`](https://github.com/dropthejase/louis/commit/e594c7ec84d34f55952f132c687a56f6c013c617) | fix(api): add ::jsonb cast to tabular chat user message INSERT | `dropthejase/louis` | 2026-05-14 |
| 41 | [`c195e91c`](https://github.com/dropthejase/louis/commit/c195e91c98bca5479aaeabdbb8845c4be8593d69) | chore(db): drop dead tables, remove chat_messages query | `dropthejase/louis` | 2026-05-15 |

### Commit URLs (for your tooling)

1. https://github.com/dropthejase/louis/commit/4592c835e7700833483a8424c5315b2decdd6fe1
2. https://github.com/dropthejase/louis/commit/ffc6152e3e000dd643f7b29d93212097012ad8d9
3. https://github.com/dropthejase/louis/commit/89eded60ebbe5f4a464d0b32112042f6ad153dc2
4. https://github.com/dropthejase/louis/commit/ae54357deb3ef61f4a437a647fb0d5a6855939c3
5. https://github.com/dropthejase/louis/commit/44b1288274d5535b483e30d0cc089cf9556d1568
6. https://github.com/dropthejase/louis/commit/8de3aea29ab5564508635a0af8bc6449b4b40bf5
7. https://github.com/dropthejase/louis/commit/7588c924a208d61d971a139200ced149023f394e
8. https://github.com/dropthejase/louis/commit/068cbca6742b1551356d86a0d2a344f4431211cd
9. https://github.com/dropthejase/louis/commit/f365807b35b1046ac27a255096cdc48dbaacfebd
10. https://github.com/dropthejase/louis/commit/a3bef4d96ae4dbf4ad16f130560ef50bfeb4ed98
11. https://github.com/dropthejase/louis/commit/d90454be47c95fa6a85c3dc296bd1c0c6a91f968
12. https://github.com/dropthejase/louis/commit/7c3cde2d769ace9de509f67948590a04fb786c3b
13. https://github.com/dropthejase/louis/commit/c11febdd4009775aa336e5011793b655f382460f
14. https://github.com/dropthejase/louis/commit/f5a68e5d467281ba0bdc64861fa940e54436f255
15. https://github.com/dropthejase/louis/commit/7093f2843bdb5d8546f7b4c04548f0c0a2975d37
16. https://github.com/dropthejase/louis/commit/c298a7a3fd247bab68300257dad4d532e9011c89
17. https://github.com/dropthejase/louis/commit/6464a4537d78368fd64fe2e5bd2fab02a12b192e
18. https://github.com/dropthejase/louis/commit/9b878c916841fafc1ca8376e2e280fe0a86c726e
19. https://github.com/dropthejase/louis/commit/be0685b9fcfc837ccc6324f9cc15559c2ab27a36
20. https://github.com/dropthejase/louis/commit/ad50674c70d103df6c5e06c57960800fc757c391
21. https://github.com/dropthejase/louis/commit/9eade3e7aa507901392ae0421775d582b3086c48
22. https://github.com/dropthejase/louis/commit/bdcf4e982e8e0bf7b8c6877f2543b5549d2f6957
23. https://github.com/dropthejase/louis/commit/0927ef0dd6322a6ff1015dedddfaa0488ada8f1f
24. https://github.com/dropthejase/louis/commit/7c6cb94124ec4c6472d09c91c399450997fa5c8c
25. https://github.com/dropthejase/louis/commit/d7eb146a5d0e964533dda256df12b5fe5732f43f
26. https://github.com/dropthejase/louis/commit/f0c8d8c9264c541c5c549051ff7b1fd6eb7446f7
27. https://github.com/dropthejase/louis/commit/9919c64db3e7ce72044b934ce5de51390ce643a4
28. https://github.com/dropthejase/louis/commit/7cbd1fa520f1375885b74db1cd188d802d4c3a4c
29. https://github.com/dropthejase/louis/commit/062b94058186ac50ef2d37a58e7b66bfd56995c3
30. https://github.com/dropthejase/louis/commit/31b740d6b935abe228a0f0bd07556d31736d7588
31. https://github.com/dropthejase/louis/commit/dca5863416afa06dd0d5ef52d9ff2e7067abb322
32. https://github.com/dropthejase/louis/commit/b035d679a6121f44ffb2edfcd43b0054d53c91d8
33. https://github.com/dropthejase/louis/commit/2daea6871d3b2227fc476271bfc2dc1c9dac7ae0
34. https://github.com/dropthejase/louis/commit/1b2f80df4eb38acf57ed2dbc87545201d31b1013
35. https://github.com/dropthejase/louis/commit/c26a0b8993d66e750668d515bef1232d19976d80
36. https://github.com/dropthejase/louis/commit/16fca3db9520ed8ba6f0cffb1831323c344ef08a
37. https://github.com/dropthejase/louis/commit/ab615de35b32a94ee41a2f38ddacd00372158f64
38. https://github.com/dropthejase/louis/commit/f49ac2027a39ecee56a4ed71fa234ede3afeb387
39. https://github.com/dropthejase/louis/commit/6c104ea94c1c3d1bed28ef3c4771cbe15a2f67af
40. https://github.com/dropthejase/louis/commit/e594c7ec84d34f55952f132c687a56f6c013c617
41. https://github.com/dropthejase/louis/commit/c195e91c98bca5479aaeabdbb8845c4be8593d69

## What I want you to do

1.  **Sanity check first.**

    - Run `git status`. If the working tree is dirty (uncommitted
      changes you don't recognise, untracked stuff you don't expect),
      STOP and tell me — don't try to be helpful by stashing. I'll
      resolve it.
    - Run `git branch --show-current`. If the branch is `main` or
      `master`, confirm with me before proceeding.

2.  **For each commit URL above, in the order listed:**

    a.  Fetch the diff. Pick whichever works:
        - `gh api repos/<owner>/<repo>/commits/<sha>` returns the full
          patch in JSON.
        - WebFetch the URL with `.patch` appended, e.g.
          `https://github.com/<owner>/<repo>/commit/<sha>.patch`.

    b.  Read the original commit message. That's the AUTHOR's intent —
        respect it.

    c.  Read the diff and understand the change. **Don't blindly
        cherry-pick.** This is a sibling fork — paths, naming, and
        structure can differ. You're porting, not pasting.

    d.  Compare against THIS repo's layout:
        - File at the same path → apply the change.
        - File exists under a different name (renamed / restructured) →
          apply the equivalent change at the right location.
        - File doesn't exist here at all → decide: new file we want, or
          is the source adding something this repo already has by
          another name? Use judgement. Lean towards creating the file
          when in doubt — easier for me to delete than to recreate.

    e.  Apply the change. Run `git diff` after, eyeball it, fix
        obvious issues (lint errors, broken imports, typos in the diff
        itself).

    f.  Commit with a message that:
        - Preserves the source commit's subject line.
        - Adds a short body explaining what you adapted, if anything.
        - Includes trailers:

              Source: <commit-url>
              Source-author: <original author name>

        so the attribution stays clear.

3.  **After all commits are applied:**

    - Run `git log --oneline -<count>` showing what you produced.
    - Show `git status` final state.
    - List any files you skipped, conflicts you resolved, and any
      assumptions you made.

## Rules

- **Do not push.** Local commits only. I'll review and push.
- **Do not rebase or force.** Only fresh commits. If you'd otherwise
  need a force push, stop and explain why.
- **Don't touch `.git/config` or run `git remote add`.** Leave my
  repo's remote setup alone.
- **No package installs, build steps, or migrations** unless the
  change manifestly requires it AND you explicitly tell me what
  you're about to run first.
- **One commit per source commit.** Don't squash. Don't split. If
  porting genuinely requires either, explain.
- **Read existing code before changing it.** This isn't the source
  fork. Match the local style.

## If you get stuck

Stop and tell me. Show what you've already done (commits made, files
changed), what blocked you (conflict, missing file, ambiguous intent),
and your recommended next move. I'd rather ship 3 of 5 commits cleanly
than have you guess on the 4th and break things.
