Skip to content

Commit 451ac24

Browse files
committed
Developer Lightspeed - CQA Feb 26
Signed-off-by: A.Arnold <anarnold@redhat.com>
1 parent f7a8ab9 commit 451ac24

19 files changed

+112
-63
lines changed

docs/developer-lightspeed-guide/master.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ include::topics/templates/document-attributes.adoc[]
44
[id="mta-developer-lightspeed"]
55
= Configuring and Using Red Hat Developer Lightspeed for MTA
66

7+
Configure Red Hat Developer Lightspeed for MTA to apply LLM-driven code changes and resolve issues from static analysis of Java applications. The document covers prerequisites, installation, Solution Server, and running analyses in Visual Studio Code.
8+
79
:toc:
810
:toclevels: 4
911
:numbered:

docs/topics/developer-lightspeed/assembly_configuring_llm.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif::[]
1717
[role="_abstract"]
1818
{mta-dl-plugin} provides the large language model (LLM) with the contextual prompt, migration hints, and solved examples to generate suggestions for resolving issues identified in the current code.
1919

20-
{mta-dl-plugin} is designed to be model agnostic. It works with LLMs that are run in different environments (in local containers, as local AI, or as a shared service) to support analyzing Java applications in a wide range of scenarios. You can choose an LLM from well-known providers, local models that you run from Ollama or Podman desktop, and OpenAI API compatible models.
20+
{mta-dl-plugin} is designed to be model agnostic. It works with LLMs that are run in different environments (in local containers, as local AI, or as a shared service) to support analyzing Java applications in a wide range of scenarios. You can choose an LLM from well-known providers, local models that you run from Ollama or Podman Desktop, and OpenAI API compatible models.
2121

2222
The code fix suggestions produced to resolve issues detected through an analysis depend on the LLM's capabilities.
2323

docs/topics/developer-lightspeed/assembly_solution-server-configurations.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ endif::[]
1414
= Solution Server configurations
1515
:context: solution-server-configurations
1616

17-
[role=_abstract]
18-
Solution Server is a component that allows {mta-dl-plugin} to build a collective memory of source code changes from all analysis performed in an organization. When you request code fix for issues in the Visual Studio (VS) Code, the Solution Server augments previous patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from previous solutions. After you accept a suggested code fix, the Solution Server works with the large language model (LLM) to improve the hints about the issue that becomes part of the context. An improved context enables the LLM to generate more reliable code fix suggestions in future cases.
17+
[role="_abstract"]
18+
Solution Server is a component that allows {mta-dl-plugin} to build a collective memory of source code changes from all analysis performed in an organization. When you request code fix for issues in Visual Studio Code, the Solution Server augments previous patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from previous solutions. After you accept a suggested code fix, the Solution Server works with the large language model (LLM) to improve the hints about the issue that becomes part of the context. An improved context enables the LLM to generate more reliable code fix suggestions in future cases.
1919

2020
The Solution Server delivers two primary benefits to users:
2121

22-
* *Contextual Hints*: It surfaces examples of past migration solutionsincluding successful user modifications and accepted fixes offering actionable hints for difficult or previously unsolved migration problems.
23-
* *Migration Success Metrics*: It exposes detailed success metrics for each migration rule, derived from real-world usage data. These metrics can be used by IDEs or automation tools to present users with a “confidence level” or likelihood of {mta-dl-plugin} successfully migrating a given code segment.
22+
* *Contextual Hints*: It surfaces examples of past migration solutions, including successful user modifications and accepted fixes, offering actionable hints for difficult or previously unsolved migration problems.
23+
* *Migration Success Metrics*: It exposes detailed success metrics for each migration rule, derived from real-world usage data. IDEs or automation tools can use these metrics to present users with a “confidence level” or likelihood of {mta-dl-plugin} successfully migrating a given code segment.
2424
2525
Solution Server is an optional component in {mta-dl-plugin}. You must complete the following configurations before you can place a code resolution request.
2626

@@ -54,4 +54,4 @@ include::proc_tackle-enable-dev-lightspeed.adoc[leveloffset=+1]
5454
ifdef::parent-context-of-solution-server-configurations[:context: {parent-context-of-solution-server-configurations}]
5555
ifndef::parent-context-of-solution-server-configurations[:!context:]
5656

57-
:!solution-server-configurations:
57+
:!solution-server-configurations:

docs/topics/developer-lightspeed/con_developer-lightspeed-logs.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
[role="_abstract"]
1010
{mta-dl-full} generates logs to debug issues specific to the extension host and the {ProductShortName} analysis and RPC server. You can also configure the log level for the {mta-dl-plugin} in the extension settings. The default log level is *debug*.
1111

12-
Extension logs are stored as `extension.log` with automatic rotation. The maximum size of the log file is 10 MB and three files are retained. Analyzer RPC logs are stored as `analyzer.log` without rotation.
12+
The extension stores logs as `extension.log` with automatic rotation. The log file is limited to 10 MB and the system retains three files. The analyzer stores RPC logs as `analyzer.log` without rotation.
1313

1414
[id="dev-lightspeed-archive-logs_{context}"]
1515

1616
== Archiving the logs
1717

18-
To archive the logs as a zip file, type `{ProductShortName}: Generate Debug Archive` in the VS Code Command Palette and select the information type that must be archived as a log file.
18+
To archive the logs as a zip file, type `{ProductShortName}: Generate Debug Archive` in the Visual Studio Code Command Palette and select the information type that must be archived as a log file.
1919

2020
The archive command allows capturing all relevant log files in a zip archive at the specified location in your project. By default, you can access the archived logs in the .vscode directory of your project.
2121

@@ -35,4 +35,4 @@ You can access the logs in the following ways:
3535

3636
* *Output panel*: Select `{mta-dl-plugin}` from the drop-down menu.
3737

38-
* *Webview logs*: You can also inspect webview content by using the webview logs. To access the webview logs, type `Open Webview Developer Tools` in the VS Code Command Palette.
38+
* *Webview logs*: You can also inspect webview content by using the webview logs. To access the webview logs, type `Open Webview Developer Tools` in the Visual Studio Code Command Palette.

docs/topics/developer-lightspeed/con_installation.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
= Installation
88

99
[role="_abstract"]
10-
You can install the {ProductFullName} 8.0.0 Visual Studio (VS) Code plug-in from the link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[VS Code marketplace].
10+
You can install the {ProductFullName} 8.0.0 Visual Studio Code plugin from the link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[Visual Studio Code marketplace].
1111

12-
You can use the {ProductShortName} VS Code plug-in to perform analysis and optionally enable {mta-dl-full} to use generative AI capabilities. You can fix code issues before migrating the application to target technologies by using the generative AI capabilities.
12+
You can use the {ProductShortName} Visual Studio Code plugin to perform analysis and optionally enable {mta-dl-full} to use generative AI capabilities. You can fix code issues before migrating the application to target technologies by using the generative AI capabilities.

docs/topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
= Introduction to the {mta-dl-plugin}
88

99
[role="_abstract"]
10-
Starting from 8.0.0, {ProductFullName} integrates with large language models (LLM) through the {mta-dl-full} component in the Visual Studio (VS) Code extension. You can use {mta-dl-plugin} to apply LLM-driven code changes to resolve issues found through static code analysis of Java applications.
10+
Starting from 8.0.0, {ProductFullName} integrates with large language models (LLM) through the {mta-dl-full} component in the Visual Studio Code extension. You can use {mta-dl-plugin} to apply LLM-driven code changes to resolve issues found through static code analysis of Java applications.
1111

1212
[id="use-case-ai-code-fix_{context}"]
1313
== Use case for AI-driven code fixes
1414

15-
{ProductFirstRef} performs the static code analysis for a specified target technology to which you want to migrate your applications. Red Hat provides 2400+ analysis rules in {ProductShortName} for various Java technologies and you can extend the ruleset for custom frameworks or new technologies by creating custom rules.
15+
{ProductFirstRef} performs the static code analysis for a specified target technology to which you want to migrate your applications. Red Hat provides 2400+ analysis rules in {ProductShortName} for many Java technologies and you can extend the ruleset for custom frameworks or new technologies by creating custom rules.
1616

17-
The static code analysis describes the issues in your code that must be resolved. As you perform analysis for a large portfolio of applications, the issue description and the rule definition that may contain additional information form a large corpus of data that contains repetitive patterns of problem definitions and solutions.
17+
The static code analysis describes the issues in your code that you must resolve. As you perform analysis for a large portfolio of applications, the issue description and the rule definition that might contain extra information form a large corpus of data that contains repetitive patterns of problem definitions and solutions.
1818

19-
Migrators do duplicate work by resolving issues that are repeated across applications in different migration waves.
19+
Migrators do duplicate work by resolving issues that repeat across applications in different migration waves.
2020

2121
[id="how-developerlightspped-works_{context}"]
2222
== How does {mta-dl-plugin} work
@@ -29,41 +29,41 @@ The context is a combination of the source code, the issue description, and solv
2929

3030
* Description of issues detected by {ProductShortName} when you run a static code analysis for a given set of target technologies.
3131

32-
* (Optional) The default and custom rules may contain additional information that you include which can help {mta-dl-plugin} to define the context.
32+
* (Optional) The default and custom rules might contain extra information that you include which can help {mta-dl-plugin} to define the context.
3333
+
34-
* Solved examples constitute code changes from other migrations and a pattern of resolution for an issue that can be used in future. A solved example is created when a Migrator accepts a resolution in a previous analysis that results in updated code or an unfamiliar issue in a legacy application that the Migrator manually fixed. Solved examples are stored in the Solution Server.
34+
* Solved examples constitute code changes from other migrations and a pattern of resolution for an issue that can be used in future. The system creates a solved example when a Migrator accepts a resolution in a previous analysis that results in updated code or an unfamiliar issue in a legacy application that the Migrator manually fixed. The Solution Server stores solved examples.
3535
+
3636
More instances of solved examples for an issue enhances the context and improve the success metrics of rules that trigger the issue. A higher success metrics of an issue refers to the higher confidence level associated with the accepted resolutions for that issue in previous analyses.
3737

3838
* (Optional) If you enable the Solution Server, it extracts a pattern of resolution, called the migration hint, that can be used by the LLM to generate a more accurate fix suggestion in a future analysis.
3939
+
40-
The improvement in the quality of migration hints results in more accurate code resolutions. Accurate code resolutions from the LLM result in the user accepting an update to the code. The updated code is stored in the Solution Server to generate a better migration hint in future.
40+
The improvement in the quality of migration hints results in more accurate code resolutions. Accurate code resolutions from the LLM result in the user accepting an update to the code. The Solution Server stores the updated code to generate a better migration hint in future.
4141
+
4242
This cyclical improvement of resolution pattern from the Solution Server and improved migration hints lead to more reliable code changes as you migrate applications in different migration waves.
4343

4444
[id="modes-developer-lightspeed_{context}"]
4545
== Requesting code fixes in {mta-dl-plugin}
4646

47-
You can request AI-assisted code resolutions that obtain additional context from several potential sources, such as analysis issues, IDE diagnostic information, and past migration data via the Solution Server.
47+
You can request AI-assisted code resolutions that get context from multiple potential sources, such as analysis issues, IDE diagnostic information, and past migration data via the Solution Server.
4848

49-
The Solution Server acts as an institutional memory that stores changes to source codes after analyzing applications in your organization. This helps you to leverage the recurring patterns of solutions for issues that are repeated in many applications.
49+
The Solution Server acts as an institutional memory that stores changes to source codes after analyzing applications in your organization. This helps you use the recurring patterns of solutions for issues that repeat in many applications.
5050

51-
When you use the Solution Server, {mta-dl-plugin} suggests a code resolution that is based on solved examples or code changes in past analysis. You can view a diff of the updated portions of the code and the original source code to do a manual review.
51+
When you use the Solution Server, {mta-dl-plugin} suggests a code resolution based on solved examples or code changes in past analysis. You can view a diff of the updated portions of the code and the original source code to do a manual review.
5252

53-
It also enables you to control the analysis through manual reviews of the suggested AI resolutions: you can accept, reject or edit the suggested code changes while reducing the overall time and effort required to prepare your application for migration.
53+
It also enables you to control the analysis through manual reviews of the suggested AI resolutions: you can accept, reject or edit the suggested code changes while reducing the time and effort required to prepare your application for migration.
5454

55-
In the agentic AI mode, {mta-dl-plugin} streams an automated analysis of the code in a loop until all issues are resolved and changes the code with the updates. In the initial run, the AI agent:
55+
In the agentic AI mode, {mta-dl-plugin} streams an automated analysis of the code in a loop until it resolves all issues and changes the code with the updates. In the initial run, the AI agent:
5656

5757
* Plans the context to define the issues.
5858
* Chooses a suitable sub agent for the analysis task.
59-
Works with the LLM to generate fix suggestions. The reasoning transcript and files to be changed are displayed to the user.
59+
Works with the LLM to generate fix suggestions. The tool displays the reasoning transcript and files to be changed to the user.
6060
* Applies the changes to the code once the user approves the updates.
6161

62-
If you accept that the agentic AI must continue to make changes, it compiles the code and runs a partial analysis. In this iteration, the agentic AI attempts to fix diagnostic issues (if any) generated by tools that you installed in the VS Code IDE. You can review the changes and accept the agentic AI's suggestion to address these diagnostic issues.
62+
If you accept that the agentic AI must continue to make changes, it compiles the code and runs a partial analysis. In this iteration, the agentic AI attempts to fix diagnostic issues (if any) generated by tools that you installed in the Visual Studio Code IDE. You can review the changes and accept the agentic AI's suggestion to address these diagnostic issues.
6363

64-
After each iteration of applying changes to the code, the agentic AI asks if you want the agent to continue fixing more issue. When you accept, it runs another iteration of automated analysis until it has resolved all issues or it has made a maximum of two attempts to fix an issue.
64+
After each iteration of applying changes to the code, the agentic AI asks if you want the agent to continue fixing more issue. When you accept, it runs another iteration of automated analysis until it has resolved all issues or it has made up to two attempts to fix an issue.
6565

66-
Agentic AI generates a new preview in each iteration when it updates the code with the suggested resolutions. The time taken by the agentic AI to complete all iterations depends on the number of new diagnostic issues that are detected in the code.
66+
Agentic AI generates a new preview in each iteration when it updates the code with the suggested resolutions. The time taken by the agentic AI to complete all iterations depends on the number of new diagnostic issues that the tool detects in the code.
6767

6868
//You can consider using the demo mode for running {mta-dl-plugin} when you need to perform analysis but have a limited network connection for {mta-dl-plugin} to sync with the LLM. The demo mode stores the input data as a hash and past LLM calls in a cache. The cache is stored in a chosen location in the your file system for later use. The hash of the inputs is used to determine which LLM call must be used in the demo mode. After you enable the demo mode and configure the path to your cached LLM calls in the {mta-dl-plugin} settings, you can rerun an analysis for the same set of files using the responses to a previous LLM call.
6969

@@ -85,5 +85,5 @@ For more information about the support scope of Red Hat Technology Preview featu
8585
* *Iterative refinement* - {mta-dl-plugin} can include an agent that iterates through the source code to run a series of automated analyses that resolves both the code base and diagnostic issues.
8686
* *Contextual code generation* - By leveraging AI for static code analysis, {mta-dl-plugin} breaks down complex problems into more manageable ones, providing the LLM with focused context to generate meaningful results. This helps overcome the limited context size of LLMs when dealing with large codebases.
8787
* *No fine tuning* - You also do not need to fine tune your model with a suitable data set for analysis which leaves you free to use and switch LLM models to respond to your requirements.
88-
* *Learning and Improvement* - As more parts of a codebase are migrated with {mta-dl-plugin}, it can use RAG to learn from the available data and provide better recommendations in subsequent application analysis.
88+
* *Learning and Improvement* - As you migrate more parts of a codebase with {mta-dl-plugin}, it can use RAG to learn from the available data and provide better recommendations in an application analysis.
8989

0 commit comments

Comments
 (0)