ViewMapper is developed and maintained exclusively with Claude Code, Anthropic's official CLI for Claude. All code contributions must be made through Claude Code sessions to maintain consistency with the architecture-first development model and keep context files synchronized.
If you haven't used Claude Code yet, these resources are super helpful:
- https://code.claude.com/docs
- https://www.anthropic.com/engineering/claude-code-best-practices
- https://www.siddharthbharath.com/claude-code-the-complete-guide/
Important: Changes to this project should follow an architecture-first workflow:
-
Think First, Code Second
- Review
ARCHITECTURE.mdto understand design decisions - Propose architectural changes in
ARCHITECTURE.mdbefore implementing - Discuss trade-offs and alternatives in the architecture document
- Get alignment on approach before writing code
- Review
-
Update Documentation as You Go
- Keep module
CLAUDE.mdfiles synchronized with code changes - Update line number references when refactoring
- Document new components in the appropriate CLAUDE.md
- Maintain "Current Status" and "Completed Features" sections
- Keep module
-
Maintain Context Files
ARCHITECTURE.md- Strategic decisions, overall design, technology choicesviewmapper-agent/CLAUDE.md- Java agent implementation detailsviewmapper-mcp-server/CLAUDE.md- Python MCP server implementation details
viewmapper/
├── ARCHITECTURE.md # Start here - strategic decisions
├── CONTRIBUTING.md # This file - development workflow
├── README.md # User-facing documentation
├── build.sh # Build local development version
├── clean.sh # Remove all build artifacts
├── release.sh # Release to DockerHub
├── viewmapper-agent/ # Java CLI with LLM agent
│ ├── CLAUDE.md # Java module context
│ ├── CONTRIBUTING.md # Java-specific conventions
│ └── src/...
└── viewmapper-mcp-server/ # Python MCP wrapper
├── CLAUDE.md # Python module context
└── src/...
Prerequisites:
- Claude Code (required - install from https://claude.ai/code)
- JDK 25
- Maven 3.8+
- Python 3.14+
- Docker
Initial Setup:
# Clone repository
git clone https://github.com/robfromboulder/viewmapper.git
cd viewmapper
# Build everything
./build.sh
# Run tests
cd viewmapper-agent && mvn test
cd ../viewmapper-mcp-server && pytest -vFor New Features (must use Claude Code):
- Start a Claude Code session
- Ask Claude to read
ARCHITECTURE.md - Describe the feature and discuss design approach with Claude
- Have Claude update
ARCHITECTURE.mdwith design decisions - Have Claude implement changes in code
- Have Claude update relevant
CLAUDE.mdfile(s) with implementation details - Have Claude add tests
- Review all changes in IntelliJ IDEA:
- Open changed files in IntelliJ
- Use Code → Reformat Code to apply consistent formatting
- Use Code → Optimize Imports to remove unused imports
- Run Code → Inspect Code to identify issues
- Apply IntelliJ suggestions for language-level improvements
- Review logic and verify correctness
- Verify builds and tests pass (can run manually or via Claude)
For Bug Fixes (must use Claude Code):
- Start a Claude Code session
- Ask Claude to read relevant
CLAUDE.mdfile - Describe the bug to Claude
- Have Claude add failing test that reproduces the bug
- Have Claude fix the code
- Have Claude update
CLAUDE.mdif implementation details changed - Review all changes in IntelliJ IDEA:
- Reformat code and optimize imports
- Run code inspections
- Verify the fix addresses the root cause
- Verify all tests pass
For Documentation (must use Claude Code):
- Start a Claude Code session
- Have Claude update
README.mdfor user-facing changes - Have Claude update
CLAUDE.mdfor implementation changes - Have Claude update
ARCHITECTURE.mdfor design changes - Review and verify all documentation changes
- Approve Claude's changes after review
Tests can be run either by Claude Code or manually. Both approaches are supported.
Via Claude Code (recommended):
Ask Claude: "Please run all tests"
Ask Claude: "Please run the parser tests only"
Ask Claude: "Please run pytest with coverage"
Manual testing (if needed):
Java Agent:
cd viewmapper-agent
mvn clean test # All tests
mvn test -Dtest="TrinoSqlParser*" # Parser tests only
mvn test -Dtest="DependencyAnalyzer*" # Analyzer tests onlyPython MCP Server:
cd viewmapper-mcp-server
pytest -v # All tests
pytest -v -k "test_name" # Specific test
pytest --cov=viewmapper_mcp_server # With coverageEnd-to-End:
# Test with embedded dataset
java -jar viewmapper-agent/target/viewmapper-479.jar run \
--connection "test://simple_ecommerce" \
"Show me the full dependency diagram"
# Test with Claude Desktop (requires configuration)
# See README.md for setup instructionsBuilds and releases can be run via Claude Code or manually.
Via Claude Code (recommended):
Ask Claude: "Please run ./build.sh"
Ask Claude: "Please run ./clean.sh then rebuild"
Ask Claude: "Please release version 479b to DockerHub"
Manual execution (if needed):
Local Build:
./build.sh # Builds JAR and Docker imageClean Build:
./clean.sh # Remove all artifacts
./build.sh # Fresh buildRelease to DockerHub:
./release.sh 479a # Replace 'a' with next letterThe release script will:
- Verify git working directory is clean
- Run clean + build
- Build multi-platform Docker image
- Push to
robfromboulder/viewmapper-mcp-server:479a - Create and push git tag
v479a
Policy: Documentation files (ARCHITECTURE.md, CLAUDE.md, README.md, CONTRIBUTING.md, TESTING.md) must NOT reference specific line numbers in source files.
Rationale: Line numbers change frequently as code evolves, causing documentation to drift out of sync and creating maintenance burden.
Instead of line numbers, use:
- Class names:
RunCommand - Method names with C++ style notation:
RunCommand.java::loadFromJdbc() - Field names:
DependencyAnalyzer.graph - Section descriptions: "in the schema loading logic"
- Function signatures:
build_prompt_with_history(history, current_query)
Examples:
❌ Bad:
See RunCommand.java:125-172 for implementation
The timeout is set in mcp_server.py:182
Update the schema in list_tools() (mcp_server.py:104-127)
✅ Good:
See RunCommand.java::loadFromJdbc() for implementation
The timeout is set in the call_tool() method via subprocess.run(timeout=60)
Update the schema in list_tools()
When Line References Are Acceptable:
- Error messages when reporting bugs/issues
- Commit messages (temporary references that don't live in docs)
- Code comments within source files
- Test failure messages
Style:
- Follow IntelliJ IDEA defaults
- Max line length: 130 characters
- 4-space indentation
- No wildcard imports (except Trino AST classes)
- Always run IntelliJ's "Reformat Code" on all changed files
- Always run IntelliJ's "Optimize Imports" to remove unused imports
- Run IntelliJ's "Inspect Code" and address warnings
Copyright Header:
// © 2024-2026 Rob Dickinson (robfromboulder)Documentation:
- Class-level Javadoc for all public classes
- Method-level Javadoc for all public methods
- Include examples where helpful
Testing:
- Descriptive test names:
testDiamondPatternHasOneLeaf() - Comprehensive edge case coverage
- Use AssertJ for fluent assertions
IntelliJ Inspections: After Claude generates code, use IntelliJ to:
- Remove unused variables, methods, imports
- Apply language-level suggestions (Java 25 features)
- Fix nullability warnings
- Optimize string operations
- Simplify boolean expressions
Style:
- PEP 8 compliance
- Line length: 88 characters (Black formatter)
- 4-space indentation
- Type hints on all functions
Copyright Header:
# © 2024-2026 Rob Dickinson (robfromboulder)Documentation:
- Docstrings for all public functions
- Type hints for parameters and returns
- Clear error messages
Testing:
- Descriptive test names:
test_successful_query_updates_history() - Mock external dependencies (subprocess)
- Test both success and error paths
Scanning for Vulnerabilities:
# Java dependencies
cd viewmapper-agent
mvn versions:display-dependency-updates
trivy filesystem .
# Python dependencies
cd viewmapper-mcp-server
pip list --outdatedAPI Keys:
- Never commit API keys to git
- Use environment variables:
ANTHROPIC_API_KEY_FOR_VIEWMAPPER - Document required keys in README.md
Architecture-First Development Model:
This project was built from scratch using Claude Code, starting with ARCHITECTURE.md and generating all implementation files from that foundation. Maintaining this approach requires:
- Synchronized Context Files - Changes must update ARCHITECTURE.md and CLAUDE.md files with correct line numbers and implementation details
- Design Consistency - New features must align with architectural decisions documented in ARCHITECTURE.md
- Documentation Quality - Implementation details must be captured in CLAUDE.md for future sessions
Manual coding would break this model because:
- Developers would need to manually update line numbers in CLAUDE.md files
- Design decisions might not be captured in ARCHITECTURE.md
- Context files would drift out of sync with implementation
- Future Claude Code sessions would have incorrect context
Build/test tools are NOT required to use Claude Code - you can run Maven, pytest, and shell scripts manually or have Claude run them for you. The requirement is that code changes and documentation updates must flow through Claude Code.
Human-in-the-Loop Development:
This project uses Claude Code to generate code, but requires human review and validation of all changes. Claude generates the implementation, and you verify correctness and apply tooling.
Typical Session Flow:
-
Load Context Efficiently
- Start by asking Claude to read
ARCHITECTURE.md - For module work, have Claude read the relevant
CLAUDE.md .claudeignoreprevents Claude from reading build artifacts
- Start by asking Claude to read
-
Design and Generate
- Describe what you want to accomplish
- Let Claude propose the approach and update ARCHITECTURE.md if needed
- Have Claude implement changes
- Have Claude update CLAUDE.md with new line numbers and details
-
Review in IntelliJ IDEA (Required)
- Open all changed files in IntelliJ
- Code → Reformat Code - Apply consistent formatting
- Code → Optimize Imports - Remove unused imports
- Code → Inspect Code - Run IntelliJ inspections
- Apply IntelliJ suggestions - Language-level improvements, type safety
- Review logic - Verify correctness, edge cases, error handling
- Check tests - Ensure test coverage is adequate
-
Verify Functionality
- Ask Claude to run tests, or run them manually
- Review test results
- Fix any issues found during review or testing
-
Iterate
- Make small, focused changes
- Review each change in IntelliJ
- Test after each change
- Keep documentation synchronized
Why IntelliJ Review is Required:
- Code quality - IntelliJ inspections catch issues Claude might miss
- Consistency - IntelliJ formatting ensures uniform style
- Correctness - Human review validates logic and edge cases
- Learning - You understand what Claude generated and why
- Optimization - IntelliJ suggests language-level improvements
Using Permissions:
.claude/settings.local.jsonpre-approves common commands- Review permissions before approving destructive operations
- You maintain control while reducing approval friction
Issues and Bugs:
- Open an issue: https://github.com/robfromboulder/viewmapper/issues
- Include: OS, Java version, Python version, error messages
- Attach: logs from
Developer | Open MCP Log File(if Claude Desktop issue)
Questions:
- Check
ARCHITECTURE.mdfor design rationale - Check module
CLAUDE.mdfiles for implementation details - Check
README.mdfor user-facing documentation
Pull Requests:
- Fork the repository
- Create a feature branch
- Use Claude Code to make all code and documentation changes
- Verify ARCHITECTURE.md and CLAUDE.md files are updated
- Include transcript or summary of Claude Code session in PR description
- Submit PR with clear description of changes
This project is licensed under the Apache License 2.0 - see LICENSE file for details.
Thank you for contributing to ViewMapper!
Remember: All contributions must be made through Claude Code to maintain the architecture-first development model. This keeps ARCHITECTURE.md and CLAUDE.md files synchronized with implementation and ensures future Claude Code sessions have accurate context.
Your role as co-developer: Claude generates code and documentation, you review in IntelliJ, apply tooling (reformat, optimize imports, inspections), verify correctness, and approve changes. This human-in-the-loop approach combines AI efficiency with human judgment and tooling quality.
If you're new to this approach, it may feel unusual at first, but you'll quickly discover that Claude Code handles the tedious work of implementation and documentation while you focus on design decisions, code quality review, and verification.