Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 2.96 KB

File metadata and controls

78 lines (54 loc) · 2.96 KB
description Generate a high-level module map documenting all business modules of the current Java project
allowed-tools Read, Glob, Grep, Write

Task: Generate Java Project Module Documentation

Objective

Create a high-level module map documenting all business modules of current project.

Process

1. Module Discovery

  • Parse the main README.md file to identify all system modules
  • Look for sections like "Modules", "Components", "Services", or similar headings
  • Extract module names and any brief descriptions provided

2. Package Mapping

For each identified module:

  • Locate the corresponding Java package(s) by searching for:
    • Package names matching the module name (case-insensitive)
    • Main classes or interfaces with module-related naming patterns
    • Directory structures under src/main/java/ that correspond to modules
  • Record the primary package path (e.g., com.example.module.name)

3. Documentation Discovery

  • Scan the entire project for .md files related to each module
  • Search in common documentation locations:
    • Module root directories
    • /docs or /documentation folders
    • Within module-specific subdirectories
  • Match documentation files to modules based on:
    • File naming (e.g., module-name.md, ModuleName.md)
    • File location (within module directory)
    • Content headers mentioning the module

4. Output Generation

Create modules.md in .claude/documentation/ (relative to the project root) with the following structure:

# System Modules Overview

| Module Name | Description                                         | Java Package          | Documentation                     |
| ----------- | --------------------------------------------------- | --------------------- | --------------------------------- |
| [Module 1]  | Brief description from README or inferred from code | `com.example.module1` | [Link to .md file] or "Not found" |
| [Module 2]  | Brief description (max 2 sentences)                 | `com.example.module2` | [Link to .md file] or "Not found" |

Add also mermaid diagram if possible to visualize module relationships (you can infer relationships based on events generated by Module X that are handled by Module Y).

## Notes

- Total modules identified: [X]
- Modules with documentation: [Y]
- Modules without documentation: [List]

Constraints

  • Keep descriptions brief (1-2 sentences max)
  • Use relative paths for all links
  • If multiple packages exist for one module, list the primary/root package
  • If multiple documentation files exist, link the most comprehensive one
  • Mark missing elements as "Not found" rather than leaving blank
  • Do not analyze implementation details - focus only on structure and organization

Important

  • Do not assume any information about the project that you haven't explicitly discovered in the service.

Expected Deliverable

A single modules.md file that serves as a navigation index for deeper module-specific analysis in subsequent tasks.