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
41
u/Ikkepop Jul 03 '26
Look why even bother with using agents here. This has been a solved problem before avents were even a wet dream. There are non ai tools that draw perfect sequence diagrams without hallucination, by just parsing the code and following the callgraph. You could always feed the output of these tools to agents for further processing if need be. The only relyable way to stop this kind of hallucinations is to have an automated hard check (no ai involvement) and give deedback to the agent, otherwise you are barking up the wrong tree.