Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ out/
gradle.properties

repos.csv

# Moderne CLI
.moderne/*
!.moderne/context/
26 changes: 26 additions & 0 deletions .moderne/context/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependencies

## Project dependencies including transitive dependencies

Complete dependency tree including transitive dependencies. Use this to understand what libraries the project uses and avoid suggesting dependencies that conflict with existing ones.

## Data Tables

### Dependency report

**File:** [`dependency-list-report.csv`](dependency-list-report.csv)

Lists all Gradle and Maven dependencies

| Column | Description |
|--------|-------------|
| Build tool | The build tool used to manage dependencies (Gradle or Maven). |
| Group id | The Group ID of the Gradle project or Maven module requesting the dependency. |
| Artifact id | The Artifact ID of the Gradle project or Maven module requesting the dependency. |
| Version | The version of Gradle project or Maven module requesting the dependency. |
| Dependency group id | The Group ID of the dependency. |
| Dependency artifact id | The Artifact ID of the dependency. |
| Dependency version | The version of the dependency. |
| Direct Dependency | When `true` the project directly depends on the dependency. When `false` the project depends on the dependency transitively through at least one direct dependency. |
| Resolution failure | The reason why the dependency could not be resolved. Blank when resolution was not attempted. |

8 changes: 8 additions & 0 deletions .moderne/context/dependency-list-report.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Build tool,Group id,Artifact id,Version,Dependency group id,Dependency artifact id,Dependency version,Direct Dependency,Resolution failure
Gradle,,github-list-repos,unspecified,org.kohsuke,github-api,1.313,true,
Gradle,,github-list-repos,unspecified,org.apache.commons,commons-lang3,3.9,false,
Gradle,,github-list-repos,unspecified,com.fasterxml.jackson.core,jackson-databind,2.13.3,false,
Gradle,,github-list-repos,unspecified,com.fasterxml.jackson.core,jackson-annotations,2.13.3,false,
Gradle,,github-list-repos,unspecified,com.fasterxml.jackson,jackson-bom,2.13.3,false,
Gradle,,github-list-repos,unspecified,com.fasterxml.jackson.core,jackson-core,2.13.3,false,
Gradle,,github-list-repos,unspecified,commons-io,commons-io,2.8.0,false,
2 changes: 2 additions & 0 deletions .moderne/context/dependency-usage.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Library,Top-level package,Usage pattern,Common classes,Import count,Example usage
org.kohsuke:github-api:1.313,org.kohsuke,,"GitHubBuilder, PagedIterator, GHRepository, GitHub, GHOrganization",1,
3 changes: 3 additions & 0 deletions .moderne/context/error-handling-patterns.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source path,Class name,Method name,Pattern type,Exception types,Handling strategy,Logging framework,Log level
src/main/java/io/moderne/github/Main.java,io.moderne.github.Main,main,throws-declaration,IOException,propagate,,
src/main/java/io/moderne/github/Main.java,io.moderne.github.Main,main,try-catch,Throwable,ignore,,
25 changes: 25 additions & 0 deletions .moderne/context/error-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Error Handling

## Exception handling strategies and logging patterns

Error handling patterns detected in the codebase including try-catch usage, exception types, handling strategies (log, rethrow, wrap, recover), and logging frameworks. Use this to handle errors consistently with existing patterns.

## Data Tables

### Error handling patterns

**File:** [`error-handling-patterns.csv`](error-handling-patterns.csv)

Error and exception handling patterns detected in the codebase.

| Column | Description |
|--------|-------------|
| Source path | The path to the source file. |
| Class name | The class containing the error handling. |
| Method name | The method containing the error handling. |
| Pattern type | The type of error handling pattern (try-catch, throws, global-handler, exception-handler-method). |
| Exception types | The exception types being handled or thrown. |
| Handling strategy | How the error is handled (log, rethrow, wrap, suppress, propagate, handle, ignore). |
| Logging framework | The logging framework used, if detected. |
| Log level | The log level used for error logging. |

23 changes: 23 additions & 0 deletions .moderne/context/library-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Library Usage

## How external libraries and frameworks are used

Patterns of how external libraries are used throughout the codebase. Shows which classes are commonly imported from each library and typical usage patterns. Use this to use libraries consistently with existing code.

## Data Tables

### Dependency usage

**File:** [`dependency-usage.csv`](dependency-usage.csv)

External library dependencies and how they are used in the codebase.

| Column | Description |
|--------|-------------|
| Library | The GAV coordinates of the library. |
| Top-level package | The top-level package of the library. |
| Usage pattern | How the library is typically used. |
| Common classes | Commonly used classes from this library. |
| Import count | Number of files that use this library. |
| Example usage | An example of how this library is used. |

2 changes: 2 additions & 0 deletions .moderne/context/method-descriptions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Source path,Class name,Signature,Checksum,Description,Return value description,Technique 1,Technique 2,Technique 3,Inference time (ms),Input tokens,Output tokens
src/main/java/io/moderne/github/Main.java,io.moderne.github.Main,"io.moderne.github.Main{name=main,return=void,parameters=[java.lang.String[]]}",9c2b04d2192ea4be379ce604689b6e0a165ef40b8034f6729b97ab62bae24bf8,,,,,,0,519,0
29 changes: 29 additions & 0 deletions .moderne/context/token-estimates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Token Estimates

## Estimated input tokens for method comprehension

Estimated input token counts that would be sent to an LLM for method comprehension. Use this to estimate AI costs before enabling code comprehension. Descriptions and techniques are left blank.

## Data Tables

### Method descriptions

**File:** [`method-descriptions.csv`](method-descriptions.csv)

AI-generated descriptions of methods in the codebase with inference time and token usage metrics.

| Column | Description |
|--------|-------------|
| Source path | The path to the source file containing the method. |
| Class name | The fully qualified name of the class containing the method. |
| Signature | The method signature including parameter types. |
| Checksum | SHA-256 checksum of the method source code for cache validation. |
| Description | AI-generated description of what the method does. |
| Return value description | AI-generated description of what the method returns. |
| Technique 1 | First programming technique or pattern used in the method. |
| Technique 2 | Second programming technique or pattern used in the method. |
| Technique 3 | Third programming technique or pattern used in the method. |
| Inference time (ms) | Time taken for the LLM to generate the description, in milliseconds. |
| Input tokens | Number of tokens in the input prompt sent to the LLM. |
| Output tokens | Number of tokens in the response generated by the LLM. |

27 changes: 27 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- prethink-context -->
## Moderne Prethink Context

This repository contains pre-analyzed context generated by [Moderne Prethink](https://docs.moderne.io/prethink).
Prethink extracts structured knowledge from codebases to help you work more effectively.

### How to Use This Context

The context files in `.moderne/context/` contain analyzed information about this codebase:

| Context | Description | Details |
|---------|-------------|--------|
| Error Handling | Exception handling strategies and logging patterns | [`error-handling.md`](.moderne/context/error-handling.md) |
| Library Usage | How external libraries and frameworks are used | [`library-usage.md`](.moderne/context/library-usage.md) |
| Token Estimates | Estimated input tokens for method comprehension | [`token-estimates.md`](.moderne/context/token-estimates.md) |
| Dependencies | Project dependencies including transitive dependencies | [`dependencies.md`](.moderne/context/dependencies.md) |

**Reading the context files:**
- Each `.md` file describes what information is available and the schema of its data
- The `.csv` files contain the actual data in a structured format
- Start with the `.md` file to understand what's available, then query the `.csv` as needed

**When you use information from Prethink context:**
- Mention that the information comes from Moderne Prethink context when it's relevant to your response
- Example: "Based on the test coverage mapping from Prethink, this method is tested by..."
- This helps the user understand the source of your knowledge and builds trust in the analysis
<!-- /prethink-context -->