What You’ll Learn
- Explore unfamiliar codebases using the Explorer subagent
- Ask questions about code structure and implementation
- Get detailed explanations of functions, classes, and modules
- Generate documentation from existing code
- Understand project architecture and data flow
- Onboard new team members efficiently
Prerequisites
Before using Verdent to understand code:- Visual Studio Code with Verdent extension installed
- A codebase or project workspace open in VS Code
- Active Verdent subscription with available credits
Exploring Unfamiliar Codebases
When you ask questions about codebase structure or request file searches, Verdent automatically delegates to the Explorer subagent (@Explorer), a token-efficient specialist optimized for fast codebase exploration.
The Explorer subagent quickly:
- Finds files matching patterns or names
- Searches code for specific keywords or functions
- Answers architectural questions about the codebase
- Identifies where functionality is implemented
Asking Questions About Your Code
Verdent answers virtually any question about your codebase using natural language. The AI understands context and provides detailed explanations, analysis, and insights.- Code Understanding
- Architecture & Structure
- Implementation
- Discovery
- Learning
Ask about how specific functionality works:Verdent analyzes the relevant code, traces execution flows, and explains the implementation with references to specific files and line numbers.
Explaining Functions and Classes
Verdent provides detailed explanations of specific functions or classes by analyzing their implementation, parameters, return values, and usage throughout the codebase. Examples:- Purpose: What the function or class accomplishes
- Parameters: Input types, expected values, and constraints
- Return Types: Output types and possible return values
- Internal Logic: How the implementation works step-by-step
- Dependencies: External modules, functions, or services used
- Usage Examples: How the function/class is used elsewhere in your code
Generating Documentation
Verdent generates documentation in multiple formats including inline code comments (JSDoc, Python docstrings, etc.), README files, API documentation, and architecture guides.Using Plan Mode for Documentation
In Plan Mode, Verdent can:- Analyze your existing documentation to match its style and density
- Ask clarifying questions about formatting preferences (comment style, detail level, examples inclusion)
- Analyze the codebase to understand current documentation patterns
- Present a documentation plan showing what will be documented and in what style
- Inline Comments: JSDoc, Python docstrings, Javadoc, XML documentation comments
- README Files: Project overviews, setup instructions, usage guides
- API Documentation: Endpoint descriptions, request/response formats, authentication details
- Architecture Guides: System design explanations, component relationships, data flow diagrams
Summarizing Files and Modules
Verdent analyzes and summarizes files or modules by reading the code, understanding its structure, and explaining its purpose in plain language. Examples:- Main Purpose: What the file/module accomplishes in the system
- Key Functions: Primary functions or methods and their roles
- Dependencies: External modules and services used
- Exports: Public API and what other parts of the system can access
- Patterns: Design patterns or architectural approaches used
- Integration Points: How it connects with other parts of the project
Understanding Architecture
Verdent explains architecture through detailed text descriptions, component relationships, and data flow explanations. While it doesn’t generate graphical diagrams directly, it can create ASCII art diagrams or Mermaid diagram code that you can render. Example:- Component Interactions: How different parts of the system communicate
- Data Flow: How information moves through the application
- Architectural Patterns: MVC, microservices, layered architecture, etc.
- Technology Stack: Frontend, backend, database, external services
- Integration Points: APIs, message queues, webhooks, third-party services
- Scalability Patterns: Load balancing, caching, database sharding
Onboarding New Team Members
Verdent helps onboard new team members by answering questions about the codebase, explaining architectural decisions, identifying key files and patterns, and generating documentation tailored to help newcomers understand the project structure and conventions. In Plan Mode, Verdent can ask clarifying questions to understand what aspects of the codebase are most relevant to the new team member’s role before creating a personalized onboarding guide. Example Onboarding Questions:- Onboarding Guides: Step-by-step walkthroughs of the codebase architecture
- Component Maps: Visual or text-based guides showing how components relate
- Common Patterns: Documentation of frequently used patterns and conventions
- Setup Instructions: How to configure development environment and run the project
- First Tasks: Suggestions for simple first contributions to gain familiarity
Verdent’s Explorer subagent makes codebase discovery efficient for newcomers. They can ask broad questions like “Show me all React components” or specific queries like “Where is error logging implemented?” and get immediate, accurate answers.
Best Practices
Start with broad questions, then drill down
Start with broad questions, then drill down
Begin with high-level questions like “What is the architecture?” before diving into specific implementations. This builds context progressively.
Use the Explorer subagent explicitly for comprehensive searches
Use the Explorer subagent explicitly for comprehensive searches
For thorough searches across the codebase, explicitly mention the Explorer agent to ensure no instances are missed: “Use Explorer to find all authentication checks.”
Ask 'why' questions, not just 'what'
Ask 'why' questions, not just 'what'
Understanding the rationale behind decisions is often more valuable than understanding the implementation. Ask “Why was this pattern chosen?” alongside “What does this code do?”
Leverage Plan Mode for documentation generation
Leverage Plan Mode for documentation generation
When generating docs, use Plan Mode to review Verdent’s approach, ensure it matches your style, and refine the plan before execution.
Use @-mentions for focused explanations
Use @-mentions for focused explanations
Reference specific files when you want detailed explanations: “@components/UserProfile.tsx explain this component” ensures Verdent focuses on the right code.
Build context before requesting changes
Build context before requesting changes
Before making modifications, ask Verdent to explain the current implementation. This helps Verdent make better suggestions that align with existing patterns.
Ask follow-up questions freely
Ask follow-up questions freely
Verdent maintains conversation context, so you can ask clarifying questions, request deeper explanations, or explore related topics without repeating context.