DEV Community

Sanvi Shukla
Sanvi Shukla

Posted on

My Friend Forgot Where He Left Off, So I Built an AI That Remembers

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built Backtrack (also known as "Where Was I?"). It's a context-recovery tool designed for my friend (and honestly, myself) who constantly struggles with "Monday Morning Context Loss." When you step away from a side-project for a few days, it can take hours to figure out what you were doing, which branch you were on, and what the next steps were.

Backtrack solves this by instantly analyzing your file system and GitHub. It looks at your uncommitted files, .git/logs/HEAD, and leftover TODO comments, and uses an AI agent to summarize exactly where you left off and what your immediate next action should be.

Demo

Our React frontend features a beautiful, dynamic glassmorphism UI that automatically connects to the local Backtrack agent service.

Code

You can find the entire codebase, including the React frontend, the Mastra agent configuration, and the Tinker evaluation scripts here:
https://github.com/sanvishukla/backtrack

How I Built It

Backtrack is composed of three main architectural pieces centered around Open-Source AI:

  1. Mastra (The Agent Harness): The core intelligence of Backtrack runs locally using Mastra, an open-source TypeScript agent harness. I configured a backtrackAgent and gave it system-level tools to securely scan local directories, read git timestamps, and parse source files for lingering TODOs.
  2. GitHub API Integration: To make this completely seamless, the agent doesn't just read local files. I integrated the gh repo list API so the tool can identify recent remote pushes and sort your projects by chronological activity across both local storage and GitHub.
  3. Tinker (Model Fine-Tuning): To make the agent incredibly good at understanding messy code diffs and uncommitted states, we built a pipeline to fine-tune a specialized language model. We programmatically extracted context datasets into .jsonl formats and used the low-level Tinker API (by Thinking Machines) to fine-tune tml-interaction-small directly on our datasets.

Why Does Open Innovation Matter?

Open innovation was critical for this project because developer tools require deep local system access. A closed API or a closed ecosystem would never allow an AI agent to safely parse local .git histories, read uncommitted code, and operate directly on a developer's file system.

By using Mastra as a local agent harness and open-weight models, developers can run this inference directly on their own machines, ensuring their proprietary codebase and uncommitted ideas never leave their laptop. Open innovation ensures privacy and extensible developer tooling.

Prize Categories

I am entering this project into the following sponsor categories:

  • Best Use of Tinker Use Thinking Machines' Tinker to fine-tune a model for a specific task, and show a clear improvement in performance, latency, or cost over a baseline.
  • Best Use of Mastra Orchestrate an agent over open models, add memory and tools to a chat agent, or build a workflow that triages GitHub issues.

Top comments (0)