Phase 2: Fetch source code for Java class #4

Merged
mprihoda merged 13 commits from JMC-1-phase-02 into JMC-1 2025-12-29 12:26:12 +00:00
mprihoda commented 2025-12-29 10:57:42 +00:00 (Migrated from github.com)

Phase 2: Fetch source code for Java class

Goals: Add get_source MCP tool to fetch Java source code from Maven Central -sources.jar artifacts

Scenarios: 7 verified
Tests: 8 unit, 3 integration, 3 E2E

Changes

  • New SourceCodeService orchestrating source code retrieval
  • New SourceCode domain entity
  • Extended ArtifactRepository port with fetchSourcesJar()
  • Added toSourcePath() method to ClassName
  • New SourcesNotAvailable error type
  • Renamed DocumentationReaderJarContentReader (more generic)
  • Added get_source tool in ToolDefinitions
  • Wired both services in McpServer and Main

Code Review

  • Review file: review-phase-02-20251229.md
  • Result: PASSED (0 critical, 6 warnings, 11 suggestions)
  • Key feedback: DRY opportunity in path methods (minor)

Full review packet

🤖 Generated with Claude Code

## Phase 2: Fetch source code for Java class **Goals**: Add `get_source` MCP tool to fetch Java source code from Maven Central `-sources.jar` artifacts **Scenarios**: 7 verified **Tests**: 8 unit, 3 integration, 3 E2E ### Changes - New `SourceCodeService` orchestrating source code retrieval - New `SourceCode` domain entity - Extended `ArtifactRepository` port with `fetchSourcesJar()` - Added `toSourcePath()` method to `ClassName` - New `SourcesNotAvailable` error type - Renamed `DocumentationReader` → `JarContentReader` (more generic) - Added `get_source` tool in `ToolDefinitions` - Wired both services in `McpServer` and `Main` ### Code Review - Review file: `review-phase-02-20251229.md` - Result: **PASSED** (0 critical, 6 warnings, 11 suggestions) - Key feedback: DRY opportunity in path methods (minor) [Full review packet](./project-management/issues/JMC-1/review-packet-phase-02.md) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.