Two Weeks of AI-Driven Foundation Work
[Your intro here.]
The headline
[Your framing here.]
What we shipped, by initiative
Each of these is a coherent, workspace-wide effort, grouped into two streams: refactoring & tooling (paying down interest, mostly net-negative) and reliability & infrastructure (the pg-boss upgrade, net-positive because it added real capability). The net column is additions − deletions; a negative number means the initiative shrank the codebase.
| Initiative | PRs | Files | Added | Removed | Net |
|---|---|---|---|---|---|
| Refactoring & tooling stream | |||||
| Vitest migration & test tooling | 5 | 4,332 | +23,654 |
-28,371 |
−4,717 |
| Nx module boundaries | 2 | 2,105 | +16,014 |
-14,219 |
+1,795 |
| Nx task graph, caching & sandboxing | 4 | 1,910 | +3,145 |
-6,714 |
−3,569 |
| Apollo Angular + client upgrade | 1 | 810 | +8,582 |
-7,370 |
+1,212 |
| ESM & build tooling | 1 | 164 | +483 |
-529 |
−46 |
| Refactoring subtotal | 13 | 9,321 | +51,878 |
-57,203 |
−5,325 |
| Reliability & infrastructure stream | |||||
| pg-boss v10→v11→v12 upgrade & queue optimization | 15 | 714 | +19,564 |
-6,820 |
+12,744 |
| Grand total | 28 | 10,035 | +71,442 |
-64,023 |
+7,419 |
[Your commentary here.]
Initiative 1: The Vitest migration
+23,654 / −28,371 across 4,332 filesThe full move off Jest and onto Analog Vitest: the codemod that drove it, the runner and Vite upgrades underneath, and native per-project typechecking.
The migration started with a codemod, packaged as its own reusable tool, that
automated moving test suites off Jest. Running it across every remaining library
moved the workspace onto Analog Vitest's browser mode. From there, Vitest 4's
built-in per-project typechecking replaced a bespoke tsc stitcher, and the
upgrade to Vitest 4.1 and Vite 8 dropped unplugin-swc along with 410
now-redundant .swcrc files.
[Your narrative on the Vitest migration.]
Initiative 2: Enforcing Nx module boundaries
+16,014 / −14,219 across 2,105 filesTurning our architectural layering from aspiration into compiler-enforced rules.
All Nx module-boundary rules are now enforced as errors instead of warnings, not just a single layer restriction. Getting there meant clearing every cycle in the project graph. This initiative adds code overall: untangling a cycle means duplicating or relocating shared code so the graph stays acyclic.
[Your narrative on module boundaries.]
Initiative 3: Nx task graph, caching & sandboxing
+3,145 / −6,714 across 1,910 filesThe invisible work that makes CI fast and correct: every task now declares exactly what it reads and writes.
targetDefaults were de-duplicated using Nx's flexible target defaults,
collapsing config that had been repeated across roughly a thousand
project.json files into a single definition in nx.json. Every task was then
audited for missing declared inputs and outputs, which fixed both false cache
hits and always-missing cache entries, including a persistently broken compile
cache.
[Your narrative on the task graph work.]
Initiative 4: The Apollo upgrade
+8,582 / −7,370 across 810 filesApollo Angular and the Apollo client were upgraded across the whole app surface, migrating every call site to the library's object-param call signatures.
[Your narrative on the Apollo upgrade.]
Initiative 5: ESM & build tooling
+483 / −529 across 164 filesRepo source was converted to ESM throughout, vitest-reporters was rebuilt with
rolldown and now ships types, and db-query moved onto tsx.
[Your narrative on ESM, or fold this into the closing.]
Initiative 6: pg-boss v10 → v11 → v12 upgrade & queue optimization
This is the reliability stream: net-positive, adding capability rather than removing it.
+13,227 / −3,112 across 439 files (buckets A–D)+19,564 / −6,820 across 714 files (buckets A–E)[Your narrative on the pg-boss upgrade and hardening work.]
The work breaks into five buckets: three for getting safely onto v12, one for seeing what the queues are doing, and one for taking load off the database the queues hammer.
| Bucket | PRs | Files | Added | Removed | Net |
|---|---|---|---|---|---|
| A. Hardening (still on v10) | 3 | 52 | +888 |
-117 |
+771 |
| B. v10 → v11 migration | 1 | 89 | +1,870 |
-399 |
+1,471 |
| C. v11 → v12 upgrade & cutover | 4 | 282 | +9,951 |
-2,498 |
+7,453 |
| D. Observability & job monitor | 4 | 16 | +518 |
-98 |
+420 |
| Core upgrade subtotal (A–D) | 12 | 439 | +13,227 |
-3,112 |
+10,115 |
| E. Queue-driven DB load (read replica + cache) | 3 | 275 | +6,337 |
-3,708 |
+2,629 |
| Total (A–E) | 15 | 714 | +19,564 |
-6,820 |
+12,744 |
Bucket A: Hardening on v10, before touching the version
While still on v10, the database and worker configuration pg-boss depended on were hardened, and the last available v10 patch release was applied ahead of the cutover.
Bucket B: v10 → v11
The v10 to v11 upgrade shipped as a single migration with a transactional blue-green cutover.
Bucket C: v11 → v12 & cutover
The big one: the v11 to v12 hop landed as a stack of seven PRs collapsed into a
single merge into develop (those children are already inside this bucket's
numbers, not on top of them), plus a couple of small follow-ups granting default
database privileges on the runtime-created queue tables and renaming stale
associations after the cutover.
Inside the hop, the team replaced the custom dedup logic with native pg-boss singleton policies, passed explicit schedule keys to prevent silent overwrites, instrumented every queue in Sentry, adopted native concurrency settlement, and pointed the apps at the new database ahead of the cutover.
[Your narrative on the v12-native adoption.]
Bucket D: Observability & the job monitor
This bucket built the in-app pg-boss job monitor: a more responsive layout, a queue-filter sidenav, an auto-refresh toggle, and better handling of empty filters and table width.
Bucket E: Taking load off the database (queue optimization)
This bucket routes the heavy Blackbaud CRM-sync read path to a read replica with a model cache, plus a small cleanup removing nested barrel files from the data-access library.
[Your narrative on the read-replica / cache work.]
The point: none of this touched the roadmap
[Your narrative: what shipped on the product side in the same window, and the argument that AI made the foundation work additive rather than a trade-off.]
A note on the numbers
Every figure above is pulled straight from the PRs' Git diffs. Two honest caveats so no one over-reads them:
- Net vs. summed. The per-initiative and grand totals are the sum of each
PR's
additions − deletionsagainst its own base branch: not a single reconciled diff. Several initiatives touch overlapping files (the Vitest, task-graph, and ESM work all edit shared test/config), so a truly merged diff would net slightly less negative than −5,325. The direction and magnitude hold; treat the exact figure as ±. - Churn isn't change. Large diffs overstate real change: file moves, renames, sort-key reordering, and the Apollo object-param migration inflate the +/− without meaningfully altering behavior. Where an initiative is "mostly mechanical," we've said so.
- Stacked PRs are counted once. The pg-boss v11 → v12 hop landed as a stack:
five PRs merged into a parent branch, which then merged to
developas a single PR. Those five children reachdevelopinside that PR's diff, so we count it once (+6,984) rather than summing the stack, which would have double-counted ~11,000 lines of internal churn.
[Your closing.]
