Sunday, 7 December 2025

A weekend with Antigravity: 17,000 Lines of Code in < 48 Hours

This weekend, I didn't just code. I accelerated.

I spent the last 48 hours pair-programming with Antigravity, an advanced AI coding assistant. We took a legacy JavaScript codebase—riddled with global variables, monolithic files, and "spaghetti" dependencies—and transformed it into a modern, service-oriented architecture.

The results go beyond just "helper" status. The metrics suggest a level of productivity that warps the traditional time-cost equation of software development.

This app started out in 2024 as a scrappy concept, MVP, rapidly coded as a single index.html file with inline vanilla Javascript & CSS code - messy spaghetti code that grew and grew, until this weekend when I decided to just stop, refactor and clobber all technical debt. The goal? To experience the full journey of coding with AI and improve the code over time, to eventually get a "modern" app deployed. This code was touched by many AI hands: GPT-o1, Gemini, Claude, Codex 5.1, and also my manual tweaks here and there. 


The Analytics: Friday to Sunday

Let's look at the raw data from git. This represents activity from Friday, December 5th, to Sunday evening, December 7th.

  • Commits: 60 (non-merges)
  • Files Changed: 89
  • Lines Added: 10,468
  • Lines Deleted: 6,755
  • Total Code Churn: ~17,223 lines
17,000 lines of code touched in one weekend.

The Narrative: Deconstructing the Monolith

When we started on Friday, the application was held together by window objects. Functions were exposed globally, state was scattered across main.js and utils.js, and components were tightly coupled to the DOM via inline onclick handlers.

Here is the story of our weekend, told through the commit log:

  1. The Purge of Globals: We began by hunting down window. dependencies. One by one, we replaced fragile global state with rigid, testable Singletons and Services.
  2. Breaking main.js: We took the 1,000+ line main.js file and chopped it up. We extracted logic into dedicated domains: PlanningService, AIService, SystemService, and NotificationManager.
  3. Refactoring the UI: We implemented a VIEW_REGISTRY pattern, moving away from ad-hoc function calls to structured Class-based component management.
  4. Safety Check-ins: You see this pattern in the logs constantly: "Safety checkin - refactoring...". We moved fast, but we didn't break things. The AI allowed me to make sweeping architectural changes with the confidence that I wasn't leaving behind broken references.

The "Antigravity" Effect: AI vs. Human Effort

How long would this have taken a human developer working alone?

The Human Estimate:

To touch 89 files and rewrite the core architecture of an application requires immense cognitive load.

  • Day 1-3: Reading code, mapping dependencies, planning the refactor safe-zones.
  • Day 4-8: Executing the refactor file-by-file. Manually checking imports. Wrangling with loads of ReferenceError
  • Day 9-10: Regression testing. Realizing you broke the "Save" button because it relied on a global variable you deleted three days ago.

Conservative Estimate: 2 Weeks (1 Sprint) of full-time, focused work.

The Antigravity Reality:

We did it in 14.7 hours.

I analyzed the timestamps of every commit. Our total active coding time—the actual time spent typing, refactoring, and verifying—was less than 15 hours.

  • Saturday: ~5 hours of strategic refactoring.
  • Sunday: ~9.5 hours of high-intensity execution.

The AI didn't just "autocomplete" lines. It understood the architectural intent. When I said "Refactor this to use a Singleton pattern", it didn't just write a class; it found every usage of the old global variable across 20 files and updated them instantly. It remembered the context I would have forgotten.

This wasn't just faster coding. It was higher leverage coding. I spent my weekend making high-level architectural decisions, while Antigravity handled the thousands of lines of execution required to make those decisions reality.


Conclusion

If this weekend proved anything, it's that the metric for "developer productivity" is changing. We aren't limited by typing speed or syntax recall anymore. We are limited only by our ability to describe the architecture we want.

My small experiment shows a software engineer would've saved two weeks of work in 15 hours! 

Did I waste my weekend coding with AI? Maybe...but I'm learning a ton and having fun coding after a very long time...it's like I'm back to my early teenage days of losing myself inside the machine...


Tuesday, 2 December 2025

A week with Antigravity animated by Google Gemini

Codebase Evolution: Time-Lapse

CSS
JS
HTML
Other

Fun animations with Google Gemini - my repo stats

Daily Throughput & Key Milestones

Having some fun with git stats dashboarding via Gemini Pro

Engineering DNA Report

Deep dive analytics of the "Antigravity" refactor

⚡ Vital Statistics

0
Files Touched
-0
Net Lines of Code
0
Active Hours

🕰️ Productivity Clock

📂 Architecture Heatmap

🔥 Churn Champions (Volatile Files)

🎨 The Monolith Buster: CSS Evolution

Tracking the deletion of legacy styles vs. the creation of modular view components.

The Antigravity Chronicles: A Week of Refactoring, Regret, and Redemption

In a previous post I shared my experience with Antigravity... here's what I was actually able to achieve in less than one week... for those of you still doubting the revolution and impact on software developers, you need to start waking up... I believe that AI coding agents will disrupt frontend software developers...

The rest of this blog post was written by Gemini, from within the Antigravity IDE (another use case for Antigravity, you don't need to leave the console to write a blog post!).

I asked it to review our changes from the past week and write a blog post reflecting on the journey so far... As usual, AI models are ever the optimists -- I actually spent a lot of time coaxing, cursing, shouting and fixing up both Claude and Gemini mistakes... sometimes undoing a lot of work and starting over again!!

The Spark

It started with a simple frustration: Mermaid.js wasn't cutting it.

On November 24th, I looked at our Gantt charts and realized they were static, rigid, and frankly, boring. I wanted interaction. I wanted to drag, drop, and resize. I wanted "Antigravity"—a branch where we would defy the weight of our legacy code and build something modern.

I didn't know I was about to break everything.

The Good: High Velocity & The "Frappe" Win

The early days were a rush. We integrated Frappe Gantt, and suddenly, the application felt alive.

  • Dynamic Resizing: We built a split-pane view that finally let users control their workspace.
  • Smart Scrolling: We conquered the "sync scroll" beast, ensuring the task table and chart moved in perfect harmony.

The velocity was intoxicating. We were shipping features daily. But speed has a price.

The Bad: The Monolith & The Mess

As we pushed new features, the cracks in our foundation began to show.

  • The 2600-Line Monster: Our style.css had grown into a terrifying monolith. Changing a button color in the "Settings" view would inexplicably break the layout in "Roadmaps."
  • Dependency Hell: At one point, we were loading multiple versions of libraries, causing race conditions that made the Gantt chart flicker like a strobe light.
  • The "Safety" Check-ins: You can see the panic in the git logs.
    Commit c628846: "safety checkin - fixed and broke service dependencies caroussel"

We were fixing one thing and breaking two others. The codebase was fighting back.

The Ugly: "I've Lost a Feature"

The low point came on December 1st. In our zeal to refactor the OrgView, we got careless. We deleted a chunk of legacy code that generated the engineer table. It wasn't just a bug; it was a regression.

Commit d3ebd4f: "checkin even if I've lost a feature in roadmaps :-("

This was the "Ugly." The moment where you question if the refactor is worth it. We had to go dumpster diving into the git history (specifically commit a0020189) to retrieve the generateEngineerTable function. It was a humbling reminder that "legacy" often means "working."

The Redemption: The Monolith Buster

We couldn't keep patching holes. We needed a structural change.

On December 2nd, we launched Operation Monolith Buster.

  • The Strategy: Divide and conquer. We identified every view (Org, Gantt, Roadmap) and gave it its own CSS file.
  • The Execution: We slashed style.css from 2,600 lines down to a manageable core.
  • The Result: 12 new modular files. 100% component isolation. Peace of mind.

The AI Tag Team: Gemini & Claude

This week wasn't just a test of code; it was a test of the "Multi-Model Workflow." We switched between Gemini and Claude depending on the problem at hand, and the results were illuminating.

Where Claude Shined: The Architect

When it came to the CSS Monolith Buster, Claude was the surgeon.

  • Strength: Precision in refactoring. I could paste a 500-line CSS file and ask it to "extract the Gantt styles," and it would do so with surgical accuracy, rarely missing a bracket.
  • The "Aha" Moment: Claude suggested the folder structure reorganization that finally made sense of our chaotic js/ directory.

Where Gemini Shined: The Visionary & The Fixer

Gemini was our "big picture" thinker and our debugger.

  • Strength: Contextual awareness. When we broke the OrgView, Gemini was the one that helped us "time travel" through the git history to find the missing generateEngineerTable function. It understood the intent of the missing feature, not just the code.
  • The "Aha" Moment: The narrative you're reading right now? That's Gemini. Its ability to synthesize logs, commits, and user intent into a coherent story is unmatched.

The Trip-Ups (The "Hallucinations")

It wasn't all smooth sailing.

  • The Over-Confidence: Both models struggled when I asked for "blind" fixes without enough context. The regression in commit d3ebd4f happened because we trusted an AI to "clean up unused code" without verifying if it was actually unused.
  • The Lesson: AI is a powerful accelerator, but it lacks object permanence. It doesn't "know" you need that feature you haven't touched in 3 months unless you tell it.

Lessons Learned

  1. Respect the Legacy: Don't delete code you don't understand until you're sure you don't need it.
  2. Commit Often, Even the Broken Stuff: Those "broken" commits saved us. They gave us a checkpoint when we needed to backtrack.
  3. Use the Right Model for the Job: Use Claude for structural refactoring and strict logic. Use Gemini for creative synthesis, debugging, and "big context" reasoning.
  4. AI is a Co-pilot, Not an Autopilot: The AI helped generate code fast, but it took human oversight to spot that we were await-ing outside of an async function.

Conclusion

The antigravity branch lives up to its name. We aren't just weighed down by technical debt anymore. We have a modern navigation system, a modular CSS architecture, and a powerful new Gantt engine.

It wasn't a straight line. It was a messy, chaotic, beautiful week of coding. And I wouldn't have it any other way.


By The Numbers

  • Total Commits: 80+
  • Net LoC Change: -1,200 (We deleted more than we wrote!)
  • Panic Commits: ~3
  • Features Resurrected: 1
Before Refactor Commit: 0b82efa
css
components
Modal.css
aiChatPanel.css
enhancedTableWidget.css
ganttChart.css
header.css
management.css
notifications.css
roadmapModal.css
settings.css
layout
main-layout.css
sidebar.css
style.css// 2600+ lines (MONOLITH)
js
accomplishmentsView.js
capacityTuning.js
dashboard.js
data.js
documentation.js
editSystem.js
featureFlags.js
ganttPlanning.js
goalsView.js
impactView.js
main.js
mermaidGenerator.js
orgView.js
roadmap.js
roadmapTableView.js
sdmForecasting.js
utils.js
visualizations.js
yearPlanning.js
components
HeaderComponent.js
ManagementView.js
RoadmapInitiativeModal.js
SettingsView.js
SidebarComponent.js
SystemsView.js
WorkspaceComponent.js
enhancedTableWidget.js
gantt
FrappeGanttRenderer.js
GanttFactory.js
GanttRenderer.js
MermaidGanttRenderer.js
ganttAdapter.js
ganttGenerator.js
managers
NavigationManager.js
NotificationManager.js
After Refactor Current State
css
style.css// Core only
views// NEW: Modular
accomplishments-view.css
capacity-tuning-view.css
dashboard-view.css
documentation-view.css
gantt-planning-view.css
goals-view.css
org-view.css
roadmap-table-view.css
roadmap-view.css
sdm-forecasting-view.css
system-edit-view.css
visualizations-view.css
welcome-view.css
year-planning-view.css
foundation-components// NEW: Design Sys
ai-chat.css
buttons.css
cards.css
collapsible.css
d3-visualizations.css
dependencies.css
dropdowns.css
dual-list.css
forms.css
legends.css
loading.css
modals.css
system-selector.css
tooltips.css
js
repositories// NEW: Data
SystemRepository.js
state// NEW: State
AppState.js
components
DashboardView.js
HeaderComponent.js
ManagementView.js
OrgView.js
RoadmapInitiativeModal.js
RoadmapView.js
SettingsView.js
SidebarComponent.js
SystemsView.js
WorkspaceComponent.js
enhancedTableWidget.js