r/cpp • u/csthbso_-862b • Jul 03 '26
Anyone using Claude to reverse-engineer legacy C/C++ systems? My sequence-diagram agents are missing or inventing call paths
I I inherited a legacy C/C++ software that lacks comprehensive documentation.
To address this, I’ve developed agents that generate sequence diagrams for specified features.
However, these agents have been implemented for numerous features, but they either don’t document every sequence or they document incorrect sequences and features for sequence diagrams.
Here’s what I’m doing to resolve this issue, but it’s not working.
- I’ll create a top-level breakdown structure of the software stack and the current code.
- I’ll identify the features that are part of the software stack and determine which specific API initiates those features.
Any input or help would be greatly appreciated.
0
Upvotes
View all comments
Show parent comment
3
u/Ikkepop Jul 03 '26 edited Jul 03 '26
I remember there was tooling for that in visual studio. And there was aloso some other commercial tool that cppcast kept advertising , but i forgot what the fuck it was called. Im sure you could find some, heck you can ask claude to give you some options for tools, that it does well.
But I'll reiterate, you need hard tooling to tame hallucinations. Thats the only way, no ammount of prompting will get you a 100% relyable result as ai is probabilistic and fuzzy.
You can try playing around with hooks, like have a script inject a question like "are you sure foo calls bar?" after ends or edits, or spawn subagents to check parts of the ouput
but its still not 100% accurate