r/ChatGPTCoding • u/mgkDante • 2h ago
Resources And Tips What actually kept an AI-assisted 4-app monorepo maintainable past 1,430 merged PRs (Codex + Claude Code + Antigravity)
I'm a SQL developer and data analyst by day, not a full-time frontend or infra engineer. Over the past few months I've been building an open-source (MIT) live transit map and schedule-reliability platform for Montréal (STM), Ottawa (OC Transpo), and Gatineau (STO) using a mix of Codex, Claude Code, and Antigravity.
As of today (Dec 5, 2026) the repo is at 1,435 merged PRs (2,430 commits on main), archives ~376M stop and vehicle rows across 807 daily Parquet files on Cloudflare R2, and runs for roughly US$10/mo with no PostgreSQL database.
Most AI coding threads talk about day-one speed. The hard part is month three, when agents start drifting on naming, silently masking missing data as zero, or breaking a boundary you fixed two weeks ago. Here are the six workflow habits that actually held up, plus a few traps that still bite.
Full repo (MIT, runs locally with bun run dev and no local DB or API keys): https://github.com/yesid-dev/transit
1. Keep AGENTS.md tiny and move plans out of the repo
My root AGENTS.md is ~5.7 KB. It only holds local commands, hard boundaries, and how to recover scope. Roadmaps, slices, architecture records, and session handoffs live in Notion and get fetched on demand over MCP. When I tried keeping months of markdown specs inside git, agents burned context reading stale docs and contradicted older decisions.
2. Put a GLOSSARY.md at the repo root
Agents love inventing synonyms. Without a glossary, one session calls a non-reporting bus "ghost", another calls it "stale", and another treats it as "on time". Locking exact terms in GLOSSARY.md (Live age, Estimated position, Silent trip, Record) cut down prompt repetition across models and kept English and French UI copy aligned.
3. Turn "don't do that" rules into automated tests, not longer prompts
Every time a model slipped on an invariant twice, I deleted the reminder from prompts and wrote a test or schema check instead. Examples:
- Keeping transport status tokens separate from general UI signal colors (
apps/web/src/lib/styles/statusTokenOwnership.test.ts). - Strict boundary enforcement:
apps/webonly calls/v2/*onapps/data-proxy(a Cloudflare Worker) and never reads R2 directly. - Honest missing-data handling: when a feed drops or a bus stops reporting, unmeasured stops stay excluded or flagged (
capture_gap/NULLdelay), never defaulted to0. Models really want to writeCOALESCE(delay, 0)unless tests yell at them.
4. Split roles across models instead of forcing one session to do everything
I run tasks in small, bounded packets (one concrete outcome, validation gate, and stop condition per PR) and split work across providers:
- Claude Code for architecture planning, larger refactors, Svelte 5 reactivity, and keeping code clean across packages.
- Codex for tight scoped implementation slices, backend Python/DuckDB work, debugging edge cases, and stubborn test fixes.
- Antigravity (Gemini) for fast UI/frontend iteration, MapLibre exploration, and reviewing diffs with a fresh pair of eyes.
Having a different model review a PR than the one that wrote it caught subtle bugs (especially timezone/service-date rollovers and silent fallback behavior) way faster than asking the same session "are you sure?".
5. Keep the architecture boring enough to reason about one box at a time
The monorepo has four separate apps with explicit contracts between them:
apps/db(Python, DuckDB,uv): polls GTFS / GTFS-RT on an Oracle Cloud Always Free VM into raw R2 buckets and builds dailyv13Parquet editions + live snapshots.apps/engine(Python, DuckDB, Uvicorn + Cloudflare Container fallback): read-only DuckDB query engine for arbitrary date-range Record queries.apps/data-proxy(Cloudflare Workers, R2, KV): public/v2/*API with edge caching, Range-cached Parquet, and self-hosted Protomaps.pmtilesbasemaps (zero tile API keys).apps/web(SvelteKit, Svelte 5, Tailwind CSS 4, MapLibre GL, DuckDB-WASM): bilingual frontend deployed on Cloudflare Workers.
Using daily append-only Parquet on R2 instead of a mutable Postgres database didn't just hold hosting cost around ~US$10/mo. It made AI debugging much easier because every day's output is an immutable versioned file you can inspect directly in DuckDB instead of reproducing mutable DB state.
6. What still trips AI agents up
- Silent fallbacks: models default to swallowing errors or returning empty arrays just to get green tests. "Unknown is not zero; missing, stale, and unsupported are separate states" became a permanent review check.
- Worktree/branch assumptions: in parallel sessions, agents assume
origin/mainis current unless step one forces checkinggit statusand the actualHEAD. - Oversized PRs: any packet spanning both the data pipeline and UI degrades fast. Keeping PRs small (hence 1,435 merged ones) kept every diff readable enough for me to understand and maintain myself.
Open-source code + queryable dataset
If you want to inspect the AGENTS.md, GLOSSARY.md, provider YAML configs, or test setup:
- GitHub (MIT): https://github.com/yesid-dev/transit
- Public read-only Frozen DuckLake catalog (~6.3 MB metadata, 376M rows across 8 tables:
stop_events,trip_days,scheduled_stop_times,vehicle_positions,feed_polls,alerts,prediction_samples,segment_runs, DuckDB 1.3+):
INSTALL ducklake; LOAD ducklake;
ATTACH 'ducklake:https://data.yesid.dev/v2/open-data/catalog.ducklake' AS transit (READ_ONLY);
USE transit;
SHOW TABLES;
- Live map (free, no ads or login): https://transit.yesid.dev/?ref=r_chatgptcoding
Curious how others here handle multi-month context drift once a repo grows past a few hundred PRs. Are you keeping specs in git, pulling them from Notion/Linear via MCP, or regenerating context files as you go?
