Update Prethink context
Recipe ID
io.moderne.prethink.UpdatePrethinkContextStarterArtifact
io.moderne.recipe:rewrite-prethinkGenerate Moderne Prethink context files with architectural discovery, test coverage mapping, dependency inventory, and FINOS CALM architecture diagrams.
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe io.moderne.prethink.UpdatePrethinkContextStarterIf the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-prethink:0.11.1Options
| Name | Type | Description |
|---|---|---|
targetConfigFiles | List | Which agent config files to update, creating any that do not exist yet. If not specified, updates all found files, creating CLAUDE.md when none exist.e.g. CLAUDE.md |
Definition
This recipe runs the following recipes in order.
- Find project metadata
io.moderne.prethink.calm.FindProjectMetadata - Find Node.js project metadata
io.moderne.prethink.calm.FindNodeProjectMetadata - Find Python project metadata
io.moderne.prethink.calm.FindPythonProjectMetadata - Find Go project metadata
io.moderne.prethink.calm.FindGoProjectMetadata - Find .NET project metadata
io.moderne.prethink.calm.FindDotnetProjectMetadata - Find service endpoints
io.moderne.prethink.calm.FindServiceEndpoints - Find endpoint contracts
io.moderne.prethink.calm.FindEndpointContracts - Find NestJS endpoints
io.moderne.prethink.calm.FindNestJSEndpoints - Find Express endpoints
io.moderne.prethink.calm.FindExpressEndpoints - Find Django endpoints
io.moderne.prethink.calm.FindDjangoEndpoints - Find FastAPI endpoints
io.moderne.prethink.calm.FindFastAPIEndpoints - Find Flask endpoints
io.moderne.prethink.calm.FindFlaskEndpoints - Find Go service endpoints
io.moderne.prethink.calm.FindGoServiceEndpoints - Find ASP.NET Core endpoints
io.moderne.prethink.calm.FindAspNetCoreEndpoints - Find ASP.NET Framework endpoints (Web API 2 and MVC 5)
io.moderne.prethink.calm.FindAspNetFrameworkEndpoints - Find WCF service endpoints
io.moderne.prethink.calm.FindWcfEndpoints - Find ASP.NET Web Forms endpoints
io.moderne.prethink.calm.FindWebFormsEndpoints - Find GraphQL endpoints
io.moderne.prethink.calm.FindGraphQLEndpoints - Find .NET GraphQL endpoints
io.moderne.prethink.calm.FindDotnetGraphQLEndpoints - Find gRPC services
io.moderne.prethink.calm.FindGrpcServices - Find Go gRPC services
io.moderne.prethink.calm.FindGoGrpcServices - Find .NET gRPC services
io.moderne.prethink.calm.FindDotnetGrpcServices - Find Python gRPC services
io.moderne.prethink.calm.FindPythonGrpcServices - Find WebSocket endpoints
io.moderne.prethink.calm.FindWebSocketEndpoints - Find ASP.NET Core SignalR hubs
io.moderne.prethink.calm.FindSignalRHubs - Find database connections
io.moderne.prethink.calm.FindDatabaseConnections - Find TypeORM entities
io.moderne.prethink.calm.FindTypeORMEntities - Find Mongoose schemas
io.moderne.prethink.calm.FindMongooseSchemas - Find Prisma usage
io.moderne.prethink.calm.FindPrismaUsage - Find SQLAlchemy and Django ORM models
io.moderne.prethink.calm.FindSQLAlchemyModels - Find Go database connections
io.moderne.prethink.calm.FindGoDatabaseConnections - Find Entity Framework / Dapper / ADO.NET database access
io.moderne.prethink.calm.FindEntityFrameworkConnections - Find external service calls
io.moderne.prethink.calm.FindExternalServiceCalls - Find Node.js HTTP clients
io.moderne.prethink.calm.FindNodeHttpClients - Find Go HTTP clients
io.moderne.prethink.calm.FindGoHttpClients - Find .NET HTTP clients
io.moderne.prethink.calm.FindDotnetHttpClients - Find messaging connections
io.moderne.prethink.calm.FindMessagingConnections - Find Node.js messaging
io.moderne.prethink.calm.FindNodeMessaging - Find Go messaging connections
io.moderne.prethink.calm.FindGoMessagingConnections - Find .NET messaging connections
io.moderne.prethink.calm.FindDotnetMessagingConnections - Find server configuration
io.moderne.prethink.calm.FindServerConfiguration - Find data assets
io.moderne.prethink.calm.FindDataAssets - Find .NET data assets
io.moderne.prethink.calm.FindDotnetDataAssets - Find DTO field schemas
io.moderne.prethink.calm.FindDtoFieldSchemas - Find field examples from JSON fixtures
io.moderne.prethink.calm.FindFieldExamplesFromFixtures - Find deployment artifacts
io.moderne.prethink.calm.FindDeploymentArtifacts - Find security configuration
io.moderne.prethink.calm.FindSecurityConfiguration - Find Node.js security configuration
io.moderne.prethink.calm.FindNodeSecurityConfig - Find service components
io.moderne.prethink.calm.FindServiceComponents - Find scheduled tasks
io.moderne.prethink.calm.FindScheduledTasks - Find .NET scheduled tasks
io.moderne.prethink.calm.FindDotnetScheduledTasks - Find .NET server configuration
io.moderne.prethink.calm.FindDotnetServerConfiguration - Find .NET security configuration
io.moderne.prethink.calm.FindDotnetSecurityConfiguration - Find .NET service components
io.moderne.prethink.calm.FindDotnetServiceComponents - Extract coding conventions
io.moderne.prethink.ExtractCodingConventions - Extract error handling patterns
io.moderne.prethink.ExtractErrorPatterns - Find exception handlers
io.moderne.prethink.calm.FindExceptionHandlers - Find endpoint security
io.moderne.prethink.calm.FindEndpointSecurity - Find .NET endpoint security
io.moderne.prethink.calm.FindDotnetEndpointSecurity - Find .NET endpoint contracts
io.moderne.prethink.calm.FindDotnetEndpointContracts - Find .NET DTO field schemas
io.moderne.prethink.calm.FindDotnetDtoFieldSchemas - Find .NET exception handlers
io.moderne.prethink.calm.FindDotnetExceptionHandlers - Find Node.js error patterns
io.moderne.prethink.calm.FindNodeErrorPatterns - Find Go error handling patterns
io.moderne.prethink.FindGoErrorPatterns - Find .NET error patterns
io.moderne.prethink.quality.FindDotnetErrorPatterns - Find Go coding conventions
io.moderne.prethink.FindGoCodingConventions - Extract dependency usage patterns
io.moderne.prethink.ExtractDependencyUsage - Extract Go dependencies and usage
io.moderne.prethink.ExtractGoDependencies - Export context files
org.openrewrite.prethink.ExportContext - Export context files
org.openrewrite.prethink.ExportContext - Export context files
org.openrewrite.prethink.ExportContext - Export context files
org.openrewrite.prethink.ExportContext - Export context files
org.openrewrite.prethink.ExportContext - Export context files
org.openrewrite.prethink.ExportContext - Find CALM relationships
io.moderne.prethink.calm.FindCalmRelationships - Find method complexity
io.moderne.prethink.quality.FindMethodComplexity - Export context files
org.openrewrite.prethink.ExportContext - Find class quality metrics
io.moderne.prethink.quality.FindClassMetrics - Find Go type quality metrics
io.moderne.prethink.quality.FindGoTypeMetrics - Export context files
org.openrewrite.prethink.ExportContext - Find package quality metrics
io.moderne.prethink.quality.FindPackageMetrics - Find Go package quality metrics
io.moderne.prethink.quality.FindGoPackageMetrics - Export context files
org.openrewrite.prethink.ExportContext - Find code smells
io.moderne.prethink.quality.FindCodeSmells - Find Go code smells
io.moderne.prethink.quality.FindGoCodeSmells - Export context files
org.openrewrite.prethink.ExportContext - Find Node.js test coverage
io.moderne.prethink.calm.FindNodeTestCoverage - Find Python test coverage
io.moderne.prethink.calm.FindPythonTestCoverage - Find Go test coverage
io.moderne.prethink.calm.FindGoTestCoverage - Find .NET test coverage
io.moderne.prethink.calm.FindDotnetTestCoverage - Find test coverage mapping
io.moderne.prethink.testing.coverage.FindTestCoverage - Export context files
org.openrewrite.prethink.ExportContext - Find test coverage gaps
io.moderne.prethink.testing.coverage.FindTestGaps - Export context files
org.openrewrite.prethink.ExportContext - Find flaky test patterns
io.moderne.prethink.testing.quality.FindFlakyTestPatterns - Find Node.js flaky test patterns
io.moderne.prethink.testing.quality.FindNodeFlakyTestPatterns - Find Go flaky test patterns
io.moderne.prethink.testing.quality.FindGoFlakyTestPatterns - Find .NET flaky test patterns
io.moderne.prethink.testing.quality.FindDotnetFlakyTestPatterns - Find unmocked external calls in tests
io.moderne.prethink.testing.quality.FindUnmockedExternalCalls - Find unmocked external calls in Node.js tests
io.moderne.prethink.testing.quality.FindNodeUnmockedExternalCalls - Find Go unmocked external calls
io.moderne.prethink.testing.quality.FindGoUnmockedExternalCalls - Find unmocked external calls in .NET tests
io.moderne.prethink.testing.quality.FindDotnetUnmockedExternalCalls - Find silent test failures
io.moderne.prethink.testing.quality.FindSilentTestFailures - Find Go silent test failures
io.moderne.prethink.testing.quality.FindGoSilentTestFailures - Find .NET silent test failures
io.moderne.prethink.testing.quality.FindDotnetSilentTestFailures - Find fragile test data
io.moderne.prethink.testing.quality.FindFragileTestData - Find Node.js fragile test data
io.moderne.prethink.testing.quality.FindNodeFragileTestData - Find Go fragile test data
io.moderne.prethink.testing.quality.FindGoFragileTestData - Find .NET fragile test data
io.moderne.prethink.testing.quality.FindDotnetFragileTestData - Find ghost tests
io.moderne.prethink.testing.quality.FindGhostTests - Find Node.js ghost tests
io.moderne.prethink.testing.quality.FindNodeGhostTests - Find Go ghost tests
io.moderne.prethink.testing.quality.FindGoGhostTests - Find .NET ghost tests
io.moderne.prethink.testing.quality.FindDotnetGhostTests - Find overly broad mocks
io.moderne.prethink.testing.quality.FindOverlyBroadMocks - Find Go overly broad mocks
io.moderne.prethink.testing.quality.FindGoOverlyBroadMocks - Find overly broad mocks in .NET tests
io.moderne.prethink.testing.quality.FindDotnetOverlyBroadMocks - Find test code smells
io.moderne.prethink.testing.quality.FindTestCodeSmells - Find Node.js test code smells
io.moderne.prethink.testing.quality.FindNodeTestCodeSmells - Find Go test code smells
io.moderne.prethink.testing.quality.FindGoTestCodeSmells - Find .NET test code smells
io.moderne.prethink.testing.quality.FindDotnetTestCodeSmells - Export context files
org.openrewrite.prethink.ExportContext - Dependency report
org.openrewrite.java.dependencies.DependencyList - Python dependency report
io.moderne.prethink.PythonDependencyReport - Export context files
org.openrewrite.prethink.ExportContext - Node.js dependency insight
org.openrewrite.javascript.search.DependencyInsight - Export context files
org.openrewrite.prethink.ExportContext - Update Prethink context
org.openrewrite.prethink.UpdatePrethinkContext - Generate architecture mermaid diagram
io.moderne.prethink.calm.GenerateCalmMermaidDiagram - Delete files
org.openrewrite.DeleteSourceFiles - Delete files
org.openrewrite.DeleteSourceFiles - Delete files
org.openrewrite.DeleteSourceFiles - Delete files
org.openrewrite.DeleteSourceFiles - Delete files
org.openrewrite.DeleteSourceFiles - Delete files
org.openrewrite.DeleteSourceFiles
Data tables
Structured output this recipe can produce.
- Project metadataProject-level identity and structure for each build module. Includes Maven GAV coordinates, display name, description, parent project lineage, and submodule count. Use this to understand what the project is, how it relates to parent projects, and whether it is a multi-module aggregator.
org.openrewrite.prethink.table.ProjectMetadata - Service endpointsREST/HTTP endpoints exposed by the application.
org.openrewrite.prethink.table.ServiceEndpoints - Endpoint request/response schemasPer-endpoint request body and response body bindings, one row per (endpoint, status code) pair. Supports OpenAPI 3.0.3 generation by giving the LLM a full mapping from handler to body DTO FQNs.
io.moderne.prethink.table.EndpointSchemas - Endpoint parametersPer-parameter detail for REST endpoint handlers - path, query, header, form. Join to service-endpoints.csv via endpointId.
io.moderne.prethink.table.EndpointParameters - Database connectionsDatabase connections and data access patterns in the application.
org.openrewrite.prethink.table.DatabaseConnections - External service callsOutbound HTTP/REST calls to external services.
org.openrewrite.prethink.table.ExternalServiceCalls - Messaging connectionsMessage queue producers and consumers in the application.
org.openrewrite.prethink.table.MessagingConnections - Server configurationServer configuration properties extracted from application.properties/yml.
org.openrewrite.prethink.table.ServerConfiguration - Data assetsData entities, DTOs, and records that represent the application's data model.
org.openrewrite.prethink.table.DataAssets - DTO field schemasPer-field schema detail for request/response DTOs: wire name, type, required flag, OpenAPI format, validation constraints, and any @Schema(example=) example values.
io.moderne.prethink.table.DtoFieldSchemas - Field example valuesRaw (fixturePath, jsonPath, value, valueType) rows mined from JSON fixture files. Supply realistic example payloads for contract test generation. LLM correlates jsonPath to DTO fields at spec/contract generation time.
io.moderne.prethink.table.FieldExamples - Deployment artifactsDeployment configuration files (Dockerfile, Kubernetes manifests, docker-compose).
org.openrewrite.prethink.table.DeploymentArtifacts - Security configurationSecurity configuration including authentication methods, CORS settings, and OAuth2 configuration.
org.openrewrite.prethink.table.SecurityConfiguration - Service componentsService layer components (@Service, @Component, @Named) in the application.
org.openrewrite.prethink.table.ServiceComponents - Scheduled tasksScheduled tasks, cron jobs, and background processing detected in the application.
io.moderne.prethink.table.ScheduledTasks - Coding conventionsCoding conventions and patterns detected in the codebase.
org.openrewrite.prethink.table.CodingConventions - Error handling patternsError and exception handling patterns detected in the codebase.
org.openrewrite.prethink.table.ErrorHandlingPatterns - Exception handlersSpring @ExceptionHandler/@ControllerAdvice and JAX-RS ExceptionMapper bindings: exception type -> HTTP status -> response body FQN. Used to complete the 'responses' section of an OpenAPI spec with non-2xx branches.
io.moderne.prethink.table.ExceptionHandlers - Endpoint securityPer-endpoint security requirements: roles, scopes, and the raw SpEL/permission expressions from @PreAuthorize/@Secured/@RolesAllowed at method or class level.
io.moderne.prethink.table.EndpointSecurity - Dependency usageExternal library dependencies and how they are used in the codebase.
org.openrewrite.prethink.table.DependencyUsage - CALM relationshipsMethod call graph for discovering relationships between architectural entities. Records all method calls within the repository with entity markers for graph traversal.
org.openrewrite.prethink.table.CalmRelationships - Method quality metricsPer-method code quality metrics including cyclomatic complexity, cognitive complexity, nesting depth, Halstead measures, and ABC metric.
io.moderne.prethink.table.MethodQualityMetrics - Class quality metricsPer-class code quality metrics including WMC, LCOM4, TCC, CBO, and maintainability index.
io.moderne.prethink.table.ClassQualityMetrics - Package quality metricsPer-package architectural metrics including afferent/efferent coupling, instability, abstractness, distance from main sequence, and dependency cycle membership.
io.moderne.prethink.table.PackageQualityMetrics - Code smellsDetected code smells including God Class, Feature Envy, and Data Class with severity ratings and the metric evidence that triggered detection.
io.moderne.prethink.table.CodeSmells - Test mappingMaps test methods to the implementation methods they exercise.
io.moderne.prethink.table.TestMapping - Test gapsPublic non-trivial methods that have no test coverage, ranked by risk score.
io.moderne.prethink.table.TestGaps - Test quality issuesIssues found in test code that may cause flakiness, silent failures, or maintenance burden. Each row includes a rich evidence message with what was found, why it matters, and how to fix it.
io.moderne.prethink.table.TestQualityIssues - Dependency reportLists all Gradle and Maven dependencies
org.openrewrite.java.dependencies.table.DependencyListReport - Maven metadata failuresAttempts to resolve maven metadata that failed.
org.openrewrite.maven.table.MavenMetadataFailures - Node.js dependencies in useDirect and transitive dependencies in use in Node.js projects.
org.openrewrite.javascript.table.NodeDependenciesInUse - Context registryRegistry of available context files for coding agents.
org.openrewrite.prethink.table.ContextRegistry - Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats