Package org.egothor.methodatlas.ai


package org.egothor.methodatlas.ai
AI integration layer for MethodAtlas providing automated security classification of JUnit test methods.

This package contains the infrastructure required to obtain AI-assisted suggestions for security tagging of JUnit 5 tests. The subsystem analyzes complete test classes, submits classification prompts to an AI provider, and converts the returned results into structured suggestions that can be consumed by the main application.

Architecture Overview

The AI subsystem follows a layered design:

Security Considerations

Source code analyzed by the AI subsystem may contain sensitive information. For environments where external transmission of code is undesirable, the subsystem supports local inference through OllamaClient.

Deterministic Output

The subsystem is designed to obtain deterministic, machine-readable output from AI models. Prompts enforce strict JSON responses and classification decisions are constrained by a controlled taxonomy.

Extensibility

Additional AI providers can be integrated by implementing AiProviderClient and registering the implementation in AiProviderFactory.

Since:
1.0.1
  • Class
    Description
    Immutable AI-generated classification result for a single parsed test class.
    Immutable AI-generated security classification result for a single test method.
    Immutable configuration describing how AI-based enrichment should be performed during a MethodAtlasApp execution.
    Mutable builder used to construct validated AiOptions instances.
    Built-in taxonomy modes used for security classification.
    Enumeration of supported AI provider implementations used by the AiSuggestionEngine.
    Provider-specific client abstraction used to communicate with external AI inference services.
    Factory responsible for creating provider-specific AI client implementations.
    High-level AI orchestration contract for security classification of parsed test classes.
    Default implementation of AiSuggestionEngine that coordinates provider selection and taxonomy loading for AI-based security classification.
    Checked exception indicating failure during AI-based suggestion generation or related AI subsystem operations.
    AiProviderClient implementation for the Anthropic API.
    Provides the default built-in taxonomy used to guide AI-based security classification of JUnit test methods.
    Small HTTP utility component used by AI provider clients for outbound network communication and JSON processing support.
    Utility methods for extracting JSON fragments from free-form text produced by AI model responses.
    Handles the consume phase of the manual AI workflow.
    Handles the prepare phase of the manual AI workflow.
    AiProviderClient implementation for a locally running Ollama inference service.
    AiProviderClient implementation for AI providers that expose an OpenAI-compatible chat completion API.
    Provides the optimized built-in taxonomy used to guide AI-based security classification when prompt compactness and model reliability are prioritized.
    Utility responsible for constructing the prompt supplied to AI providers for security classification of JUnit test classes.
    Deterministically extracted test method descriptor supplied to the prompt.
    Immutable lookup structure providing efficient access to AI-generated method suggestions by method name.