1.9 First Exploration Exercises
This section provides hands-on exercises to build your fluency with Claude Code. You'll practice the exploration patterns you'll use throughout the program.
Exercise 1: Basic File Operations
Start in the Emerald Grove Pet Clinic directory:
cd ~/projects/emerald-grove-pet-clinic-<first>-<last>
claude
Replace <first>-<last> with your actual first and last name (e.g., emerald-grove-pet-clinic-jane-doe).
1.1 Find a Specific File
Ask Claude to locate the main application class:
Find the main Spring Boot application class in this project
What to observe: Claude uses the Glob tool to search for patterns like *Application.java and the Read tool to examine contents.
1.2 Read and Understand
Ask Claude to explain what it found:
Read that file and explain what annotations are used and why
What to observe: Claude reads the file and provides contextual explanation based on its knowledge of Spring Boot.
1.3 Find Related Files
Ask Claude to find related components:
Find all controller classes in this project
What to observe: Claude searches for files matching controller patterns and may use Grep to search for @Controller or @RestController annotations.
Exercise 2: Code Search Patterns
2.1 Search by Content
Find where a specific feature is implemented:
Where is the logic for listing all pets for an owner?
What to observe: Claude uses Grep to search for relevant terms, then reads promising files to understand the implementation.
2.2 Search by Pattern
Find all database queries:
Find all repository interfaces and show me what queries they define
What to observe: Claude combines Glob (to find repository files) with Read (to examine their contents).
2.3 Trace a Request
Follow a request through the system:
Trace what happens when a user visits /owners/1 in this application. What controller handles it? What service does it call? What repository fetches the data?
What to observe: Claude follows the code path, reading multiple files to build a complete picture.
Exercise 3: Using the Task Agent
For complex explorations, Claude can spawn specialized sub-agents.
3.1 Comprehensive Codebase Analysis
Use an exploration agent to create a comprehensive summary of the domain model in this application. Include all entities, their relationships, and key fields.
What to observe: Claude launches a Task agent with subagent_type: Explore that performs thorough analysis without cluttering your main conversation.
3.2 Find Integration Points
Use an exploration agent to find all external integration points in this application - APIs it calls, databases it connects to, external services it uses.
3.3 Security Review
Use an exploration agent to identify potential security considerations in this codebase. Look for authentication, authorization, input validation, and data handling patterns.
Exercise 4: Working with Tests
4.1 Understand Test Coverage
What is the test coverage strategy for this project? What types of tests exist and what do they cover?
4.2 Find Tests for a Feature
Find all tests related to the Owner entity - unit tests, integration tests, and E2E tests
4.3 Run Tests
Run the unit tests for the Owner-related functionality and show me the results
What to observe: Claude uses Bash to execute test commands and captures the output.
Exercise 5: Documentation and Context
5.1 Synthesize Documentation
Based on all the documentation in this project, what are the most important things a developer should know before making changes?
5.2 Find Undocumented Patterns
What patterns or conventions does this codebase follow that aren't explicitly documented in CLAUDE.md?
5.3 Update Context
If you were to add one section to the CLAUDE.md file to make it more helpful, what would it be and why?
Exercise 6: MCP and Skills in Action
If you configured MCP servers and skills, try these:
6.1 Context7 Documentation Lookup
Use Context7 to get the current documentation for Spring Data JPA repository query methods
6.2 Browser Automation (if app is running)
Start the application first:
./mvnw spring-boot:run
Then in a new Claude session:
Use the agent-browser skill to navigate to http://localhost:8080, explore the navigation, and describe what pages are available
6.3 Database Exploration (if you configured a database MCP)
If you've set up DBHub or another database MCP server:
Explore the database schema. What tables exist and how are they related?
Exercise 7: Putting It All Together
The Integration Challenge
Combine everything you've learned:
I want to understand how adding a new Visit works in this application.
1. Find the UI where users add visits
2. Trace the form submission to the controller
3. Follow the logic through the service layer
4. Show me how it's persisted to the database
5. Find the tests that verify this workflow
Give me a complete picture of this feature.
What to observe: Claude orchestrates multiple tools and potentially sub-agents to build a comprehensive answer.
Reflection
After completing these exercises, you should be comfortable with:
| Skill | Tools Used |
|---|---|
| Finding files by name or pattern | Glob |
| Searching file contents | Grep |
| Reading and understanding code | Read |
| Executing commands | Bash |
| Complex multi-file exploration | Task (Explore agent) |
| External documentation lookup | Context7 MCP |
| Browser interaction | agent-browser skill |
| Database exploration | Database MCP (optional) |
Common Patterns to Remember
- Start broad, then narrow — Begin with pattern searches, then read specific files
- Use sub-agents for complex tasks — Keep your main context clean
- Verify with tests — Run relevant tests to confirm understanding
- Check documentation first — CLAUDE.md and docs/ often have answers
Next Steps
Congratulations! You've completed the Introduction section. You now have:
- Claude Code installed and configured
- SDD workflow prompts available as slash commands
- MCP servers and skills extending Claude's capabilities
- The example repository forked and explored
- Hands-on experience with Claude Code's exploration tools
You're ready to begin the Foundations Module, where you'll use these skills to build your first AI-generated feature from specification to completion.