GEOSPATIAL × AI
Inherited a complex brownfield: massive legacy Superset codebase, 8 repos with mismatched dependencies, AWS sprawl. Made AI coding work in challenging conditions. Built custom 3D Earth visualizations for government and scientific clients.
ROLE
Lead Engineer
YEAR
2024-2025
STACK
Apache Superset · Django · Neo4j · WebGL
STATUS
In Production
Climate scientists at government agencies and international organizations analyze atmospheric and ocean datasets to inform policy decisions. Territorial waters negotiations. Fishing rights. Antarctic research. High-stakes work requiring robust geospatial analytics.
I inherited an 8-repo analytics platform (Apache Superset fork + Django backend) with substantial technical debt. POC-stage architectural decisions had accumulated.The microservices setup meant you couldn't even run the full stack locally.
INHERITED TECHNICAL DEBT
Challenging conditions for AI-assisted development. Had to adapt.
Challenge: Make this production-ready for high-profile clients while using AI coding on a 2M+ line brownfield (per RepoPrompt) where context loading is limited and pattern-matching can amplify existing issues.
AI coding excels on greenfield projects. Brownfield with accumulated technical debt is harder. AI can pattern-match existing code and propagate issues. Superset's 2M+ LOC meant limited context loading for understanding internal APIs. Cross-cutting features required coordinated changes across 8 repos. Features often uncovered refactoring work that had to happen first.
Eight repos, each running different Node/Python versions. Flask here, Django there. The microservices architecture meant you couldn't run the full platform locally. Development required nginx containers stitching local services with cloud deployments. Constant context switching between repos, dependency management across different environments.
Apache Superset enforces one dataset per chart. Multi-dataset visualizations weren't supported. Custom WebGL renderers had limited integration options. Running an older version (upgrade risks), so newer features unavailable. Building the Earth chart required working around these core assumptions.
This project became the proving ground for AI-assisted brownfield development. What eventually became Agent Focus was prototyped here out of necessity.
Simple feature requests ("add legends to heatmaps") routinely expanded into 20-30 session efforts. Implementing the feature required first refactoring foundations, updating dependencies where safe, removing unnecessary AWS infrastructure. Knowledge handoffs across sessions became essential - this is where Agent Focus patterns were developed.
With limited ability to load Superset internals into context, I developed techniques for incremental understanding. Small, targeted exploration. Document discoveries immediately. Build mental models across sessions. These brownfield techniques now inform my greenfield work.
Extended Superset with multi-dataset visualization support (working within architectural constraints). Embedded NullSchool Earth engine for 3D globe rendering. Photoshop-style layer system with drag/drop ordering, dynamic legends. Scientists can overlay wind data, sea ice measurements, shipping routes, and policy boundaries on a single interactive globe.
Scientists aren't data analysts. They don't know Superset terminology. Built an AI agent that translates "show me Antarctic sea ice trends" into the correct dataset queries, layer configurations, and Superset formData. The agent understands climate data domain conventions.
Early architecture used extensive AWS services, many unnecessary for the actual requirements. Simplified infrastructure, removed unused components, automated deployments. Improved the path toward modern CI/CD practices while maintaining production stability.
8
REPOSITORIES
Coordinated microservices
30+
SESSION SCOPES
Per major feature
GOVT
CLIENTS
Scientific organizations
Platform is now in production serving government and scientific clients. Researchers use the Earth chart to analyze climate data that informs policy decisions. The platform went from challenging to maintain to actively developed.
This project is the opposite of the others. Not greenfield innovation or frontier AI techniques. This was brownfield problem-solving: making AI coding work in challenging conditions with 2M+ line legacy codebases, version sprawl, and substantial technical debt.
The techniques developed here (careful context management, incremental refactoring, multi-session scopes) became the foundation for Agent Focus. This was the cauldron. Learning by necessity.
AI coding in brownfield conditions with technical debt is an uncommon skill. Most AI coding success happens on greenfield projects where the AI has clean patterns to follow. This requires different techniques.