Is Genspark Development Full of Bugs? Practical Techniques for Consistency Checking with UML Diagrams
📋 Table of Contents
Introduction: The Pitfalls of Complex Systems
When developing web applications with Genspark, a system that started simple gradually becomes more and more complex as features are added and revised. Before you know it, you might find yourself in a situation where "wait, what's written in the specification is different from the implementation..."
Even in this blog, "Genspark Development Struggles," we were actually facing a big problem. Database columns that existed were not described in the specifications, API specifications were ambiguous, and the overall system consistency was lost.
The Invisible Problem of Discrepancies Between Specifications and Implementation
Reasons Why Direct AI Comparison Fails to Find Issues
AI tools like Genspark are very powerful, but when trying to compare the specifications and implementation code of a complex system simultaneously, the following problems can arise:
- Context Window Limitations: Unable to process large amounts of code and long specifications simultaneously
- Information Complexity: Difficult to prioritize where to focus
- Omissions Occur: Minor differences can be overlooked
- Missed Checks: Unable to cover all items that need to be checked
Examples of Actual Problems
- Database contains a
view_countcolumn, but it's not described in the specification - NULL constraint specification differs from implementation
- Cloudflare Pages Functions API specification is unclear
- React component structure is not documented
What is Consistency Checking Using UML Diagrams?
In such cases, consistency checking using UML diagrams is effective. UML (Unified Modeling Language) is a standard notation for graphically representing software systems.
Basic Approach
The key is not to create UML from specifications, but to have AI create UML from the implementation. This seems to make it easier for AI to check for consistency.
💡 Why "Implementation → UML"?
Implementation code is the fact of what is running. When converting code to UML, you are simply illustrating the structure as is, so there are fewer errors. On the other hand, if created from specifications, there is room for AI interpretation, which can lead to inaccuracies.
Consistency Check Flow
- Create UML diagram from implementation code (AI-assisted)
- Compare UML diagram with specification (AI-assisted)
- Extract differences to clarify issues
- Identify areas to be corrected and address them
Why is UML Effective?
1. Easy to Understand Visually
UML is expressed graphically, making it easy to understand the system's structure and relationships at a glance. It's easier to grasp the overall picture than with a long textual specification.
2. Standardized Representation
UML is an internationally standardized notation, which reduces ambiguity in representation. You can use the optimal diagram for each purpose, such as an ER diagram for database structure or a sequence diagram for process flow.
3. Functions as an Intermediate Representation
Implementation code can be too detailed, making it hard to see the big picture, while specifications can be too abstract, lacking concrete details. UML sits in between, allowing information to be organized with an appropriate level of abstraction.
UML Types and Uses
| UML Diagram Type | Purpose | Verifiable Content |
|---|---|---|
| ER Diagram | Database Structure | Tables, Columns, Relationships, Constraints |
| Class Diagram | Code Structure | Classes, Methods, Dependencies |
| Sequence Diagram | Process Flow | API Call Order, Timing |
| Architecture Diagram | Overall System Configuration | Relationships between Components, Data Flow |
4. Humans Can Also Verify
UML is a blueprint for humans to understand source code, so not only AI but also developers themselves can visually check it. This makes it easier to discover problems that AI might have overlooked.
Practical Case Study: How We Found 7 Bugs
For this blog system, on December 15, 2025, we created UML diagrams from the implementation and thoroughly identified discrepancies with the specifications. As a result, we were able to discover and fix 7 critical bugs.
Discovered Issues (by Priority)
🔴 High Priority (Mandatory Fix)
Although a
view_count column exists in the database to record page views, it was not mentioned at all in the specification. This makes it impossible for new developers to understand the system.
Correction Details
Before Correction:
After Correction:
Although
NOT NULL constraints were set on 6 columns in the implementation, the specification omitted any mention of these constraints. This is critical information related to data integrity.
Although article retrieval APIs and RSS feed APIs existed in the implementation, the specification contained no information whatsoever about endpoints, parameters, response formats, etc.
🟡 Medium Priority (Recommended Fix)
The frontend configuration (pages, components, technologies used) was not documented. Clearly stating this makes it easier to reference during UI modifications.
Only "Article ID range: 103-111" was stated, making it impossible to distinguish between initial and added data. It was refined to "104-112 (Initial: 104-108, Added: 109-112)".
🟢 Low Priority (Optional)
- 6. Missing push trigger in GitHub Actions
- 7. Insufficient database annotation in architecture diagram
✨ Results of Corrections
As a result of fixing all these issues, the following benefits were obtained:
- ✅ Database schema perfectly matches implementation
- ✅ API specifications are clear (endpoints, parameters, responses)
- ✅ Frontend configuration is clear (pages, components, technology stack)
- ✅ New developers can accurately understand the system
- ✅ Maintainability significantly improved
Specific Practical Steps
Now, let's explain step-by-step how to proceed with consistency checking using UML diagrams.
Step 1: Create UML Diagram from Implementation
First, show Genspark your implementation code and have it create a UML diagram. At this time, outputting it in PlantUML format makes it easier to manage as text and simplifies version control.
Example Instructions for Genspark
"Look at this database schema file and create an ER diagram in PlantUML format. Include all tables, columns, constraints, and indexes."
"Look at the source code of this React project and create a class diagram of the component structure."
Step 2: Review and Correct the Created UML
The UML diagrams created by AI can sometimes be used as is, but sometimes require fine-tuning. Display the diagrams using tools like PlantUML Online Server and review their content.
💡 Checking Points
- Are all important elements included?
- Are relationships accurately represented?
- Is it organized and easy to read?
Step 3: Compare UML with Specification
Next, show the completed UML diagram and the specification to Genspark and have it extract the differences.
Example Instructions for Genspark
"Compare this ER diagram with the database specification in the documentation and list the differences from the following perspectives:
- Elements existing in the implementation but not documented in the specification
- Elements with different definitions in the specification and implementation
- Differences in constraints or default values
Please organize the differences by priority (High, Medium, Low)."
Step 4: Correct the Differences
Review the extracted differences and correct them starting with the highest priority. Typically, you will often revise the specification to match the implementation (assuming the implementation is correct).
⚠️ Caution: If the implementation is incorrect
If there is a clear bug on the implementation side, the implementation needs to be corrected. Comparing UML with the specification can also uncover cases where "the implementation itself was wrong to begin with."
Step 5: Save and Manage UML Diagrams
Once corrections are complete, save and manage the created UML diagrams as part of the project. They will be very useful for future maintenance and new feature additions.
Recommended Management Method
- Save in the
docs/uml/folder of your GitHub repository - Manage as text in PlantUML format (.puml)
- Document UML explanation and display method in README.md
- Update UML concurrently with system changes
Keys to Success
1. Start Small
Trying to create a UML for the entire system at once can be overwhelming. Start with the areas where problems are occurring (e.g., database, specific APIs).
2. Adhere to the Implementation → UML Order
Again, it is important to create UML from the implementation. If you create UML from the specification, any ambiguities or errors in the specification will be directly reflected.
3. Verify from Multiple Perspectives
It is effective to check not just one type of UML diagram, but from multiple perspectives:
- Verify data structure with an ER diagram
- Verify process flow with a Sequence diagram
- Verify code structure with a Class diagram
- Verify the entire system with an Architecture diagram
4. Also Verify with Human Eyes
Finally, also review the UML diagrams created by AI with human eyes. If you feel "something is off" when looking at the diagram, it could lead to an important discovery.
5. Maintain Regularly
Systems are constantly changing. When adding major features or making significant revisions, update the UML diagrams as well. By comparing them with the specifications, you can maintain consistency at all times.
Summary
If your system becomes complex during Genspark development, consistency checking using UML diagrams is very effective.
✅ Key Takeaways from this Article
- In complex systems, discrepancies between specifications and implementation become difficult to see.
- Direct comparison by AI alone may overlook important differences.
- It is effective to create UML from the implementation and compare it with the specification.
- UML is visual and standardized, allowing information to be organized with an appropriate level of abstraction.
- In a practical case study, 7 critical bugs were discovered and fixed.
- Since it's a diagram that humans can also verify, problems overlooked by AI are easier to find.
Related Articles
- Uncover Genspark's Lies! 3 Pitfalls of AI-Generated Code and Countermeasures
- Introduction to AI Coding with Genspark: 5 Basics Beginners Should Know
- Genspark Generated Code Review Complete Manual: Practical Methods to Ensure Quality
Reference Links
- PlantUML Official Website - Tool for easily creating UML diagrams
- Unified Modeling Language (UML) Official Website - UML Standard Specification
- PlantUML Japanese Guide - PlantUML Japanese Documentation
- VS Code PlantUML Extension - Preview UML in VS Code
If this article was helpful, please share it on social media!
Let's share Genspark development insights and spread better development experiences.