How Mole keeps 110k lines of AI-generated Swift from rotting: 6 engineering rules
dotey · x · 2026-08-31
Product engineer HiTw93 shared lessons after shipping Mole v13: 110k lines of Swift product code, 73k lines of tests and 3,347 XTests — the core thesis being "code written by AI should be tested by AI." Key points (summarized by dotey):
- Architecture and layering still matter: even with AI speedup, engineers must own the architecture, agree on it early with AI, and document it
- Unit tests are the foundation: tests grew from 56 to 3,347; focus on cases where results look fine but are actually wrong; add regression tests with every bug fix
- Avoid feature accumulation — remove code when features are removed
- CI/CD via GitHub Actions, running the full suite on a clean cloud machine before release
- Let AI run verification and self-correction automatically, with humans checking only at necessary stages
- Turn repeated work into skills so you never re-explain to AI from scratch
More from coding & agent
- Agent skills ecosystem fragmented: VoltAgent curation vs. scattered vendor repos — Critical-Gene-1422 · 2026-08-31
- GitHits: MCP Server Giving AI Agents Deep Insight into Dependencies — skvark · 2026-08-31
- Flare IDE: Open-Source Environment with MCP Task Management and Agent Auditing — AlgoWithNoRhythm · 2026-08-31
- Developer savings run dry: should he let AI write the code after all? — TeacherAggressive444 · 2026-08-31
- MCP standardized tools, but who governs agents? An open-source runtime enforcer — Trout_dev · 2026-08-31
- MCPSEAL: an open-source CLI that blocks MCP tools that change after you trust them — StageAccomplished806 · 2026-08-31