Inspiration

During my tenure at a global tech leader managing large-scale business automation, I witnessed a recurring efficiency leak: massive code redundancy. Across different departments, teams were independently writing nearly identical logic for SAP automation, Excel processing, and API integrations in VBA, VBS, and Python.

This fragmentation turned our codebase into a "liability" rather than an "asset." I realized that traditional repositories are passive—they store code but don't govern it. This inspired me to build Code Asset Agent, an active "Asset Guardian" that leverages the reasoning power of Anthropic's models to identify, extract, and recycle high-value logic, transforming technical debt into a structured, reusable enterprise library.

What it does

Detect Duplicates - Identifies redundant code blocks across files ✅ Recommend Optimizations - Suggests improvements with clear benefits ✅ Refactor Automatically - Creates optimized versions and merge requests ✅ Build Libraries - Maintains searchable, reusable code assets ✅ Support Multiple Languages - Works with Python, VBScript, and VBA

** Real Results **

  • 85% → 0% code duplication reduction
  • 75% fewer lines of code through reuse
  • 80% reduction in maintenance costs
  • 400+ lines of new utilities added

How we built it

We built Code Asset Agent as a deep integration within GitLab Duo, focusing on an automated governance loop: Platform Integration: We extended the capabilities of GitLab Duo by building a custom Agent The Intelligence Layer: Powered by Anthropic. Its superior reasoning enables Semantic Logic Matching—identifying functional redundancies even when code structures differ. The Action Loop: When redundancy is detected, the Agent automatically: Creates a new Git branch. Refactors the code to use existing assets. Initiates a Merge Request (MR) and updates the documentation.

Challenges we ran into

The Integration Trade-off (GCS vs. MVP): One of my biggest technical struggles was implementing a seamless, real-time connection with Google Cloud Storage (GCS) for cross-cloud asset hosting. While it's a key part of the long-term vision, I realized that for this hackathon, speed and a working core loop were more critical.

The Decision: I made the strategic choice to prioritize the End-to-End Governance Loop—from logic detection to automatic Merge Requests—using the GitLab repository as the primary vault for the MVP. This allowed me to deliver a fully functional, high-value prototype while keeping GCS integration as a prioritized milestone on our roadmap.

Accomplishments that we're proud of

From Conversation to Action: We are incredibly proud of moving beyond a simple "Chatbot." Our Agent doesn't just give advice; it takes action by automatically refactoring code, creating branches, and initiating Merge Requests via the GitLab API.

Cracking the "Spaghetti" Code: We successfully demonstrated that Anthropic Claude 3.5 Sonnet can navigate the messy, non-standard world of legacy VBA and VBS scripts. Seeing the AI accurately identify and extract business logic from decades-old automation patterns was a major "Aha!" moment.

Seamless GitLab Duo Integration: We proved that GitLab Duo can be more than a coding assistant—it can be the foundation for an enterprise-wide Code Governance strategy.

What we learned

From Zero to Mastery with GitLab: This was my first time ever using GitLab. Coming from zero experience, I underwent a steep but rewarding learning curve to fully master the GitLab Duo platform and its APIs. This project forced me to move beyond basic Git commands to architecting complex, automated Merge Request (MR) workflows in just a matter of days. The Power of Reasoning over Keywords: I discovered that Anthropic is exceptionally capable of "semantic understanding." It doesn't just look for matching text; it understands the intent behind messy VBA and VBS code. GitLab Duo as an Extensible Platform: I realized that GitLab Duo is far more than a coding assistant. I could transform it into a proactive governance engine that sits right in the developer's natural workflow. Strategic MVP Prioritization: While I faced technical hurdles with GCS (Google Cloud Storage) integration, I learned that delivering a functional End-to-End Action Loop—from detection to Merge Request—provided more immediate value than a perfect cross-cloud setup for this prototype.

What's next for Code Asset Agent: AI-Powered Agent for Code Asset Governance

The MVP successfully proved the core "Governance Loop." Moving forward, we aim to evolve Code Asset Agent into a true enterprise-grade asset hub: Full Google Cloud Storage (GCS) Integration: We will finalize the cross-cloud bridge to host the "Golden Library" on GCS. This will enable high-availability asset sharing across different GitLab instances and corporate environments. Multi-Language Expansion: We plan to extend our Semantic Logic Matching beyond VBA/VBS/Python to include Java, JavaScript, and SQL, covering a broader spectrum of enterprise back-end and data automation. Collaborative Approval Workflows: We will introduce a "Human-in-the-loop" review system where senior architects can approve, tag, and rate newly extracted assets before they are finalized in the library. Intelligent Lifecycle Management: Beyond just adding assets, the Agent will monitor asset usage and suggest decommissioning obsolete code or upgrading library modules based on performance and security metrics. Deep GitLab Duo Customization: We aim to build a dedicated GitLab Dashboard for Code Assets, providing leadership with a real-time view of "Technical Wealth" created and "Redundancy Costs" saved.

Built With

Share this project:

Updates