Revamping a legacy Github repo in the agentic era

How I brought my tiny trading library back to life

Content

Technical analysis

Technical analysis (TA) signals are a common approach to implement trading bots, generating market-based signals that drive buy/sell/hold decisions on algorithmic trading.

Github-revamp
ADX, an example of a signaling algorithm

Although TS was heavily documented 9 years ago, I couldn’t find anything that linked financial algorithms to particular algorithms code in a simple way. I needed something light to power my NodeJs bots so existing Java frameworks and Javascript libraries were not at option. I decided to quickly build mine.

I called it Trendyways, a tiny JS framework to run technical analysis on market data.

Back in 2016

Back in the days, I would spend a good deal of time doing the following (you may identify the test-driven approach, TDD was already a thing):

  1. Research a certain trading algorithm, often through Wikipedia.
  2. Write unit tests.
  3. Write JS code until tests passed.

I didn’t have time to write decent docs, nor showcase the library capabilities. I kept updating the README as best as I could.

Thankfully, I had already been exposed to TDD and this saved me a lot of development time compared to the more traditional waterfall approach.

Adding a new algorithm would take me around 2 hours of work, from design to implementating and testing

Then life happened and I moved on. I would merge occasional Github security fixes. Github itself improved along the years. At some point they started to analyze dependencies and creating automatic PRs through Github bots.

Revisiting the repo in 2026

Fast forward, year is 2026, and we are fully into the agentic era.

This old, unmaintained repo is the perfect occasion to try how agents operate on existing codebases, and particularly on the productivity improvements they claim to bring. I can easily repeat what I was doing years ago and compare.

I decide to spin up Cursor with my favourite model so far, Claude Haiku 4.5, which is a great tradeoff between speed, cost and reasoning balance.

My approach is the following:

  1. Stick with TDD — as a first step, increase test code coverage by adding missing tests. Outcome: 10% increase in test coverage.
Github-revamp-test
Cursor added few new tests, aligned with the existing ones.
  1. Then improve the existing code — the AI agent adds extra checks, simplifies some of the code. Tests keep passing.
  2. Create a demo page — big gap covered, document everything. Someone actually had opened an issue asking for screenshots last year. I didn’t have time back then but now it´s straightforward. I can simply ask Cursor to build one and it comes up with a website. It also becomes the repo´s default landing page thanks to Github Pages integration.
Github-revamp-page
Cursor generated charts and sample data for the TA indicators that looks just right.

Conclusion and takeaways

My interaction with the agent lasted approximately 1h.

The agent help me with all the stuff I was too lazy to do in the last years, closed an open issue and built the entire live demo leveraging the minimised bundle library.

Years ago, it would have taken me easily 6h of work so I can estimate my productivity gain in 80% time saved (!). That plus a revived GitHub repo that now can be improved.

In terms of concrete takeaways:

  1. Good old practices give you an edge — TDD is a great approach to drive agent-supported development. It can be seen as a guardrail mechanism to limit the agent activity.

TDD is now more valuable than ever. It acts as developer guardrails, reducing scope creep.

  1. The productivity ceiling is your own expertise — You maximize benefits when you have the right know-how to guide the agent effectively.

  2. Human in the loop — Although I was very cautions and tried to prevent automatic merges, Cursor still managed to sneak in and push one commit to the repo.

  3. Legacy code isn’t dead, it’s inactive — AI agents bring a whole new set of possibilities to reuse existing code. Refactor it to meet new standards at a very low cost. This effect gets multiplied if you have tests in place.