Practical Guide to Selecting AI Coding Assistants and Generating Architecture Diagrams
This article explores the selection criteria for AI coding assistants across three main forms: CLI agents, IDE plugins, and conversational IDEs. It provides a practical workflow for extending text-based models with visual capabilities using the Model Context Protocol (MCP) and demonstrates how to generate system functional module diagrams and architecture diagrams through structured planning and style extraction.
Practical Guide to Selecting AI Coding Assistants and Generating Architecture Diagrams
With the rapid iteration of large language model (LLM) technology, AI coding tools have evolved from simple code completion plugins into autonomous “Agents” capable of understanding requirements, planning tasks, and executing multi-step operations. Faced with various product routes such as CLI agents, IDE-integrated plugins, and conversational IDEs, many developers share the same question: which type of tool best fits their workflow? This article does not review any single product. Instead, from a general technical perspective, it discusses the selection dimensions of AI coding tools and provides a reusable practical methodology, using “automatically generating system design diagrams” as a typical use case.
I. Three Mainstream Forms of AI Coding Tools
AI coding assistants in the industry can generally be categorized into three types. Understanding their differences is the prerequisite for selection.
1. CLI Agents. These tools run in the terminal and operate in a “plan-execute-verify” manner. They can directly read and write local files, execute commands, and run tests, making them suitable for cross-file refactoring, batch generation, and scripted tasks. Their advantage lies in high automation and the ability to be embedded into CI pipelines. The downside is that they require a certain level of CLI proficiency and offer less intuitive visual feedback than GUIs.
2. IDE Integrated Plugins. Existing as editor plugins, these tools deeply integrate code indexing capabilities and excel at code completion, inline chat, and rewriting selected snippets. They have strong context awareness and are suitable for “ask-as-you-code” scenarios during daily development, but are usually weaker at long-chain, multi-step tasks compared to Agents.
3. Conversational IDEs (All-in-one Editors). These redesign the entire development environment around AI, supporting project-level context, multi-turn conversational generation, and previewing. They are beginner-friendly and suitable for rapid prototyping, but often lack the fine-grained control over large legacy projects that the previous two types offer.
Selection advice can be summarized in one sentence: look at the task form, not the product hype. For frequent local code completion, choose plugins; for long-chain automated tasks, choose CLI Agents; for rapid prototyping, choose conversational IDEs. These three are not mutually exclusive, and many teams use them in combination.
II. Shortcomings of Text-Only Models and Visual Capability Extension
Many teams encounter the same issue when implementing AI coding tools: the integrated LLM is a text-only model and cannot directly understand screenshots. However, in actual development, “giving AI a reference image to replicate its style” is a very frequent requirement, such as UI inspection, architecture diagram replication, and error popup localization.
A widely adopted solution in the industry is the Model Context Protocol (MCP). MCP is an open protocol that enables standardized interaction between LLMs and external tools or data sources. Developers can encapsulate a “vision understanding service” as an MCP Server and attach it to the coding assistant, thereby supplementing its image understanding capabilities.
A typical vision-understanding MCP configuration conceptually includes the following elements (the structure below is illustrative; refer to your tool’s documentation for specific fields):
{"type": "stdio","command": "npx","args": ["-y", "your-vision-mcp-package"],"env": {"API_KEY": "your-api-key","MODE": "VISION"}}
There are three configuration essentials: First, the communication method is usually stdio, meaning the tool communicates with the local MCP Server via standard input/output, which is the easiest to deploy. Second, the API key is injected via environment variables to avoid hardcoding and leaking it in the repository. Third, after configuration, always verify inside the assistant whether the MCP is successfully registered before starting the actual task. It should be emphasized that MCP is a universal protocol; vision understanding services from different vendors can be integrated this way. When selecting, focus on the model’s image recognition accuracy and calling costs, rather than binding to a specific ecosystem.
III. Practice Case: AI Replicating System Functional Module Diagrams
Below is a complete workflow using “automatically generating a system functional module diagram based on existing documentation” as an example.
Step 1: Style Extraction Instead of Direct Generation. Directly asking the model to “draw a module diagram” often yields generic and mediocre results. The correct approach is to first upload a reference image from a historical project and have the model extract style elements: color schemes, module layering layout logic, style details like rounded corners and shadows, and the expression methods of legends and connecting lines. This step essentially transforms “implicit aesthetics” into “explicit specifications.” In a Windows environment, most tools support pasting clipboard screenshots directly into the conversation via keyboard shortcuts.
Step 2: Provide Structured Input Documents. Prepare a “Functional Module Document” that uses clear hierarchical headings to describe which subsystems the system contains and what functional points exist under each subsystem. Models understand structured Markdown far better than scattered, verbal requirements.
Step 3: Plan First, Execute Later. It is recommended to let the tool enter “Plan Mode” first, having it output: which sections of the document it will parse, what technology the generated diagram will use (e.g., Mermaid, SVG, or a frontend charting library), and how the modules will be grouped and laid out. After manually confirming the plan is correct, allow execution. This mechanism significantly reduces rework.
Step 4: Result Comparison and Acceptance. Compare the generated diagram side-by-side with the reference image and check three dimensions: information completeness (are any functional points missing), style consistency (do colors and layout match the reference), and readability (are connecting lines crossed and messy). In practice, as long as the style extraction and plan confirmation steps are solid, the first generation can reach a usable level without repeated corrections.
IV. Advanced: Reference-Free Generation of System Architecture Diagrams
Functional module diagrams focus on “what the system does,” while system architecture diagrams focus on “how the system runs”—the former is for business stakeholders, while the latter is for engineering teams, including the access layer, application layer, middleware layer, data layer, and the calling relationships between layers. A mature assistant should be able to proactively distinguish the differences between the two, rather than conflating them.
Good results can still be achieved without a reference image, provided that the architecture layering conventions are explicitly declared in the prompt, for example:
Please generate a system architecture diagram for this system, with the following requirements:1. Divide it top-down into Access Layer, Gateway Layer, Service Layer, and Data Layer;2. Annotate the calling directions and protocol types between layers;3. Display middlewares such as caches and message queues as separate groups.
After generation, it is recommended to manually review two points: whether the layering conforms to the team’s established architecture standards, and whether the component names are consistent with the real modules in the code repository. AI-generated architecture diagrams are suitable as drafts for design reviews, not as final deliverables.
V. Methodology Summary and Trend Outlook
Reviewing the entire practice, three transferable experiences can be distilled:
- Fill Capability Gaps with Protocols. The visual, networking, and database access shortcomings of text-only models can all be resolved by attaching external tools via standard protocols like MCP. This is more pragmatic than waiting for native model upgrades.
- Specs First, Then Generation. Whether extracting reference image styles or confirming execution plans, “letting AI restate its understanding before acting” is a universal technique to reduce rework.
- Tools Serve Workflows. When selecting, do not obsess over “which is the most powerful,” but rather evaluate whether the tool can be embedded into the team’s existing documentation, review, and CI processes.
Looking ahead, with the popularization of multimodal capabilities and the improved stability of Agents for long tasks, “screenshot in, design out” and “requirements document in, runnable prototype out” will become the norm. Cloud providers are also opening up general AI capabilities such as code generation, intelligent Q&A, and visual understanding in the form of APIs and platform services. For instance, Baidu AI Cloud provides large model platforms and AI coding capabilities, upon which developers can assemble workflows fitting their business needs using standard protocols like MCP. The true factor that widens the efficiency gap will no longer be the tools themselves, but whether the team has established a standardized “human-AI collaboration” workflow.
