
How I Use AST Diffing and LLMs to Keep Docs in Sync with Code
Oh Here We Go Again: Documentation Since I started coding, creating projects, and contributing to projects, what I've realized so far is that outdated docs waste more time than missing docs. For that reason, I decided to build a CLI tool called mark-guard which detects Go code changes and updates your markdown docs using AST diffing and LLMs. I'm planning to add support for other languages. Which One Is More Painful: Creating from Scratch or Modifying the Docs From my point of view, modifying is harder than creating from scratch, and that's what my tool tries to solve. Its purpose isn't creating docs from scratch but rather modifying them while we modify the project. Currently, I'm using my tool along with my friends. I think it'll really shine once people try it on bigger codebases with lots of legacy docs. Core Architecture When I started building this project, my first thought was a full AST tree approach. I had worked on something similar with my friend in wtf-script , but for this
Continue reading on Dev.to
Opens in a new tab



