/6 Robustness & Diagram Validation – Polishing the Final Version (Solidsight v11)

Search for a command to run...

No comments yet. Be the first to comment.
In this series, I will venture the down a path of development using various languages, mainly Python, and utilise AI for the majority if not all of the code generation.
Is this what a dev does? In this series of articles, I'm going to take you through a little journey that I've decided to label as 'NotADev'. Why, you may ask? Well, I've dabbled in Python scripts for some years whilst doing web2 ethical hacking and r...
Rationale for Session Management As Solidsight's capabilities expanded, managing historical analysis data became increasingly important. The next logical step was introducing structured session management, allowing users to revisit previous analyses ...

Expanding the Tool's Capabilities Smart contract analyses can vary greatly in complexity and purpose. Realising this, I added support for multiple LLM models, allowing users to tailor analyses according to specific needs. This flexibility transformed...

Overview Versions 4 and 5 saw significant strides in workflow optimisation, making the SFA more practical and user-friendly. Efficiency and redundancy elimination became central to these iterations. Duplicates A key feature introduced was a robust du...

Motivation for Change Although Solidsight was becoming powerful, its plain text outputs lacked readability. To address this, I integrated the Rich library, significantly enhancing the visual appeal and clarity of the command-line interface. Implemen...

As Solidsight matured, accuracy became paramount. One key improvement was ensuring generated Mermaid diagrams were accurate and meaningful, addressing the occasional production of invalid placeholder diagrams by the LLM.
I developed a function to validate generated diagrams:
def is_valid_mermaid(diagram):
return (diagram.strip().startswith(("flowchart TD", "sequenceDiagram"))
and "Default Diagram" not in diagram)
When invalid diagrams were detected, the tool would prompt users to regenerate them using the original contract code.
Previously, invalid diagrams went unnoticed, causing confusion for users. With this validation step, such diagrams were caught and addressed immediately, ensuring consistently high-quality outputs.
Implementing robust validation and regeneration was perhaps one of the most impactful improvements. It highlighted the critical importance of quality assurance processes, ultimately turning Solidsight into a dependable, polished tool suitable for serious contract analysis.
I took the to Github as a fellow SR on X showed some interest in using it, and the app made is now available for all to use and adapt to their liking. The overall code isn’t complex, I used AI and made adjustments where needed (it speeds up the process) - Manually creating is fun, but, my time is spent in codebases looking for bugs, I try not to spend too much time building unless its completely necessary.
I also changed the name to DeepCurrent, I like Solidsight, but, as a final version 1, this was the choice.
Have fun & happy hunting: App: DeepCurrent