Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt-assisted pair programming with Rovo Dev CLI

When working with large, legacy codebases, even seemingly straightforward tasks – like moving a template action class to the right domain – can quickly become daunting. In my case, I helped teams claim ownership of a legacy frontend Templ8r action in the Jira backend repository. This wasn’t just about relocating a Java class; it also involved moving associated JSP files, updating configuration, and potentially refactoring dependencies. The complexity was compounded by the sheer size of the codebase and the risk of breaking Maven dependencies or misplacing files.

To tackle this, I leveraged Rovo Dev. Rather than diving in blindly, I used saved prompts to guide the process through a series of well-defined checkpoints. At each stage, Rovo Dev would summarise its findings, propose a plan, and pause for my approval before proceeding. This iterative, collaborative approach not only reduced the risk of errors but also gave me confidence that each step was correct before moving on.


I worked on Rovo Dev saved prompts to claim ownership of a legacy frontend template action (let’s call it Templ8r action) in the Jira backend repository. This includes moving a Java class around, its associated template file(s), and fixing up some configuration. It might also need some refactoring to break Maven dependencies, but it’s hard to tell upfront how we’ll want those things changed.

The way I worked around this is that I asked the LLM to take some checkpoints where it summarises what it found so far, present a plan, and ask me to approve the plan or change something before executing on it.

/prompts
[... selected my task from the saved prompts list ...]

╭─ Response ─────────────────────────────────────────────────────────────────────
│ I'll help you move a Templ8r action class to claim ownership in the appropriate
│ domain. Let me start by understanding the project structure and then ask you
│ for the specific action you want to move.
╰────────────────────────────────────────────────────────────────────────────────

tldr; You can instruct the agent to take stock of what it’s done so far, what its next planned action is, and wait for your go ahead at these key checkpoints.

The saved prompt was built up step-by-step over a few iterations. Before its final state, I would write the steps up to the next checkpoint, run Rovo Dev through it in a new session and check the output, then amend the instructions until I was happy with the quality, reset the branch and run it again. There are clear checkpoints to get the process to stop and wait for user input to decide which way to continue next after a quick review of the plan. I could also chat to the agent about options then incorporate them into the prompt, and I got it to review the document and suggest what it thought could be improved, which was also helpful on occasion.

You can find the cut down version of the prompt file at the end of this article with internal details slightly changed. As instructed, Rovo Dev paused right at the start of the session and asked me which Templ8r action I want it to work on.

╭─ Response ────────────────────────────────────────────────────────────────────
│ Now I understand the project structure better. I can see this is a large Jira
│ codebase with multiple domains and Maven modules. Let me help you move a
│ Templ8r action class to claim ownership in the appropriate domain.


│ Step 1: Which action do you want to move?

│ I need you to provide the Templ8r action class you'd like to move.
│ Please give me:

│ • The fully qualified classname of the Templ8r action (e.g.,
│ com.atlassian.example.action.ViewProject)
│ • Or at least the simple classname if you're not sure of the full package

│ These action classes typically:

│ • Live in the jira/frontend/legacy-templ8r-actions Maven
│ module
│ • Are referenced in the templates-config.xml configuration file

│ What action class would you like me to help you move?
╰────────────────────────────────────────────────────────────────────────────────

> com.atlassian.example.action.ViewSchemes

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Perfect! Let me analyze the ViewSchemes action class to understand its
│ dependencies and recommend the best target domain for moving it.
╰────────────────────────────────────────────────────────────────────────────────

It then did a few rounds of code analysis to check what the Templ8r action is about, look at the classes used in there, find the action and view config from the templates-config.xml etc. It then presented the summary below and asked me if I agree with the domain and module we’re targeting to move files into.

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Perfect! Now I have all the information needed to provide my analysis and
│ recommendations.


│ Step 2: Analysis of main services and components used

│ Based on my analysis of the ViewSchemes action class, here are my findings:

│ Primary Dependencies:

│ • ExampleFieldManager - This is the main service used by the action
│ • Interface location:
│ jira/platform/fields/fields-api
│ • Implementation location:
│ jira/platform/fields/fields-impl
│ • This service handles all field related operations

│ Secondary Dependencies:

│ • RolloutService - Feature flag service (from
│ jira/infra/feature-flag)
│ • Project and related classes - Standard project models
│ • Various field related classes from the fields domain

│ Action Configuration:

│ • Action name: example.ViewSchemes
│ • JSP file: /views/example/viewfieldschemes.jsp
│ • Current location:
│ jira/webapp/src/main/views/example/viewfieldschemes.jsp

│ My Recommendation:

│ Target Domain: jira/platform/fields
| Target Module: jira/platform/fields/fields-impl

│ Reasoning:

│ 1 The action primarily operates on field layout schemes through
│ ExampleFieldManager
│ 2 The fields domain already owns all the core business logic this action uses
│ 3 The -impl module is the appropriate place for web actions as it can depend on
│ both API and implementation classes
│ 4 This creates clear ownership boundaries - the fields domain will own both the
│ service layer and the web layer for field layout schemes

│ Proposed File Locations:

│ • Java class:
│ jira/platform/fields/fields-impl/src/main/java/com/atlassian/example/action
│ /ViewSchemes.java
│ • JSP file:
│ jira/platform/fields/fields-impl/src/main/views/example/viewfieldschemes.jsp

│ The JSP file will need to be registered in the
│ jira/webapp/pom.xml Maven configuration.

│ What would you like me to proceed with? Should I:

│ 1 Continue with the fields domain as the target?
│ 2 Choose a different domain/module?
│ 3 Get more details about dependencies before proceeding?
╰────────────────────────────────────────────────────────────────────────────────

> Yes, that sounds good

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Great! Now let me analyze the other classes used by the ViewSchemes action to
│ identify any potential dependency issues and prepare a complete migration plan.
╰────────────────────────────────────────────────────────────────────────────────

At this point it continued as per the instructions and checked some other classes used in our Templ8r action class to check what might present a problem after we move the class. It checks what modules they are coming from, whether those are OK as dependencies or do we need to refactor any classes. In this case, we didn’t need to change any, thankfully.

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Perfect! Now I have all the information needed to create a comprehensive
│ migration plan. Let me summarize my findings and present the detailed plan.


│ Step 4: Analysis of other classes used by the action

│ Dependency Analysis:

│ ✅ Dependencies that are OK to use:

│ • ExampleFieldManager - Already in fields-api ✅
│ • RolloutService - From infra/feature-flag (API module) ✅
• Templ8rSupport - From legacy-templ8r-api ✅
• Project, FieldLayoutScheme - Standard API classes ✅
│ • Feature flag classes - From infrastructure modules ✅

│ ⚠️ Dependencies that need attention: The fields-impl module does NOT
│ currently have a dependency on legacy-templ8r-api, so we'll need to add it.


│ Step 5: Detailed Migration Plan

│ Target Locations:

│ • Java class:
│ jira/platform/fields/fields-impl/src/main/java/com/atlassian/example/action
│ /ViewSchemes.java
│ • JSP file:
│ jira/platform/fields/fields-impl/src/main/views/example/viewfieldschemes.jsp

│ Changes Required:

│ 1 Move Java class - Keep same package structure
│ 2 Move JSP file - Keep same relative path under views
│ 3 Add missing dependency - Add legacy-templ8r-api to fields-impl/pom.xml
│ 4 Update webapp resources configuration - Add fields-impl view directory to the
│ jira/webapp/pom.xml
│ 5 Keep templates-config.xml unchanged - No changes needed to action
│ configuration

│ Dependencies to Add:


│ <dependency>
│ <groupId>com.atlassian.example</groupId>
│ <artifactId>legacy-templ8r-api</artifactId>
│ </dependency>


│ Webapp Resources Configuration:

│ Based on the existing pattern, we need to add this resource to
│ the copy-templ8r-resources execution in jira/webapp/pom.xml:


│ <resource>
<!-- JSP files from the fields domain -->
<directory>
${projectRoot}/jira/platform/fields/fields-impl/src/main/views
</directory>
│ </resource>


│ No interface extraction needed:

│ All dependencies are already using proper API interfaces or are from
│ appropriate modules.

│ ───────────────────────────────────────────────────────────────────────────────

│ Ready to Execute?

│ This plan will:

│ 1 ✅ Move the ViewSchemes action to the fields domain
2 ✅ Move the associated JSP file
3 ✅ Add the necessary templ8r dependency
4 ✅ Update webapp resource configuration
5 ✅ Maintain all existing functionality

│ Do you approve this plan for execution? The migration should be straightforward
│ with no major refactoring needed.
╰────────────────────────────────────────────────────────────────────────────────

> Yes, that sounds good

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Perfect! Let me execute the migration plan step by step.


│ Step 6: Executing the Migration
╰────────────────────────────────────────────────────────────────────────────────

Once I approved this plan, Rovo Dev started actually moving things around and fixed the necessary configuration quickly.

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Excellent! The migration has been completed successfully. Let me provide a
│ summary
│ of what was accomplished.


│ Step 7: Migration Summary

│ ✅ Migration Completed Successfully!

│ Files Moved:

│ 1 Java Action Class:
│ • From:
│ jira/frontend/legacy-templ8r-actions/src/main/java/com/atlassian/example/actio
│ n/ViewSchemes.java
│ • To:
│ jira/platform/fields/fields-impl/src/main/java/com/atlassian/example/action/Vi
│ ewSchemes.java
│ 2 JSP View File:
│ • From:
│ jira/webapp/src/main/views/example/viewfieldschemes.jsp
│ • To:
│ jira/platform/fields/fields-impl/src/main/views/example/viewfieldschemes.jsp

│ Configuration Updates: 3. Added Dependencies: Added legacy-templ8r-api
│ dependency to fields-impl/pom.xml 4. Updated Webapp Resources: Added
│ fields-impl webapp directory to jira/webapp/pom.xml 5. Templ8r Configuration:
│ Left templates-config.xml unchanged (as required)

│ Ownership Successfully Claimed 🎉

│ The ViewSchemes Templ8r action and its associated JSP file are now owned by the
│ fields domain, which makes perfect sense since:

│ • The action primarily uses ExampleFieldManager from this domain
│ • All fields business logic is already in this domain
│ • Clear ownership boundaries are now established

│ ───────────────────────────────────────────────────────────────────────────────
│ Next Steps - Verification & Testing

│ I recommend you run the following commands to verify everything is working
│ correctly:

│ 1 Build verification:

│ ./jira-build :fields-impl

│ 2 Full project build (if needed):

│ ./jira-build

│ 3 Action configuration test:

│ ./jira-test run --tests TestTempl8rIntegrity


│ Additional Notes

│ • No functional changes were made to the action logic - it should behave
│ exactly as before
│ • The action is now properly co-located with the services it depends on

│ Would you like me to help with any verification steps, or do you have any
│ questions about the migration?
╰────────────────────────────────────────────────────────────────────────────────

Everything worked mostly as expected, except that we left the corresponding test class behind.

> I think the com.atlassian.example.action.TestViewSchemes test class
does actually belong to it

╭─ Response ─────────────────────────────────────────────────────────────────────
│ You're absolutely right! Let me search for that test class and move it as well:
╰────────────────────────────────────────────────────────────────────────────────

Seeing that we’re in absolute agreement, Rovo Dev quickly moved the test class as well, then gave me an updated summary.

╭─ Response ─────────────────────────────────────────────────────────────────────
│ Perfect! The fields-impl module already has all the necessary
│ dependencies for the test class:

│ ✅ feature-flag-test-support (line 144)
│ ✅ assertj (line 148)
│ ✅ mockito-core (line 152)
│ ✅ junit-jupiter-api (line 156)


│ Updated Summary of Changes Completed

│ ✅ Successfully moved the ViewSchemes action AND its test class to the
│ fields domain!

│ Files Moved:

│ 1 Java Class:
│ • From:
│ jira/frontend/legacy-templ8r-actions/src/main/java/com/atlassian/example/actio
│ n/ViewSchemes.java
│ • To:
│ jira/platform/fields/fields-impl/src/main/java/com/atlassian/example/action/Vi
│ ewSchemes.java
│ 2 Test Class:
│ • From:
│ jira/frontend/legacy-templ8r-actions/src/test/java/com/atlassian/example/actio
│ n/TestViewSchemes.java
│ • To:
│ jira/platform/fields/fields-impl/src/test/java/com/atlassian/example/action/Te
│ stViewSchemes.java
│ 3 JSP File:
│ • From:
│ jira/webapp/src/main/views/example/viewfieldschemes.jsp
│ • To:
│ jira/platform/fields/fields-impl/src/main/views/example/viewfieldschemes.jsp

│ Dependencies Added:

│ 1 Added legacy-templ8r-api dependency to
│ jira/platform/fields/fields-impl/pom.xml
│ 2 Updated webapp resources configuration in
│ jira/webapp/pom.xml to include the new JSP location

│ All Dependencies Satisfied:

│ • ✅ All test dependencies already present in target module
│ • ✅ All runtime dependencies already present in target module
│ • ✅ No additional dependencies needed

│ ───────────────────────────────────────────────────────────────────────────────

│ Final Verification Steps:

│ To verify everything is working correctly, you can run:

│ 1 Build the specific module:

│ ./jira-build :fields-impl

│ 2 Run the moved test:

│ ./jira-test run --tests TestViewSchemes

│ 3 Test action configuration integrity:

│ ./jira-test run --tests TestTempl8rIntegrity


│ The migration is now complete! The ViewSchemes action has been successfully
│ moved from the frontend domain to the fields domain where it belongs with its
│ related services and functionality.

│ Would you like me to help you with anything else, or would you like to proceed
│ with running these verification commands?
╰────────────────────────────────────────────────────────────────────────────────

And there it is, after 2-3 back and forth prompts we’ve completed a change, and we only used about 64k tokens so far.

By breaking down the code refactoring into clear, manageable steps and leveraging Rovo Dev’s prompt-assisted workflow, I was able to confidently update legacy code without unnecessary risk. This approach not only streamlined the process but also provided valuable transparency and control, making complex migrations in large codebases far more approachable, and enabling our teams to get things done faster and more efficiently.


References

This is the saved prompt document I used to drive the agent to work with me on executing these steps. This was available in the repository .

# Claim ownership of a Templ8r action

This instruction helps move a Templ8r action class and its view JSP files into the same domain that the services or components it operates on live as well. This helps assert ownership better and enables easier future maintenance.

## Steps

Follow these steps below.

### 1. Ask the user which action they are looking to move

- Do NOT try to find an action class to start with, there are too many
- Prompt the user to give a Templ8r action classname, preferably with fully qualified classname
- These usually live in the `jira/frontend/legacy-templ8r-actions` Maven module

### 2. Analyze main services or components used

- Looking at the injected components or references in fields, which one(s) does this action class use primarily - these may be good targets to move the action class closer to
- Once you found the main services/components, find which Maven module or Jira domain they live in
- Prepare a prompt for the user summarizing your findings, including a recommendation for which Jira domain should we target moving the action class into
- Prefer existing Maven modules in domains, typically the one ending in `-impl` should be the right target
- To understand the Templ8r action setup better, search for the action in the `jira/frontend/legacy-templ8r-actions/src/main/resources/templates-config.xml` configuration file
- This will have the class mentioned in the `<action name="{classname-suffix}" ...>` element
- Under this `<action>` element you can find the action views in the `<view>` elements, which will have references to the JSP files this action uses, we will move these files with the action as well
- These JSP files typically live in the `jira/webapp/src/main/views` directory before we move them

### 3. Ask the user for the target domain and/or Maven module

- Once you presented your findings to the user in the previous step, ask them which domain do they want to move the action class into
- If the target module inside the domain can be ambiguous, make sure the ask the user for the target Maven module name, unless they already indicated it in their response
- The action's Java class should move into the same package in the target module where it already lives (so no package name change)
- If the action has a test class, make sure that is also moved to the target domain module
- The JSP files should move into the `src/main/views` directory in the target Maven module, keeping the same relative path
- Note, that the `template-config.xml` configuration must not change, it will stay exactly as it is during these changes
- The target `src/main/views` resource folder does need to be registered in the `jira/webapp/pom.xml` Maven configuration [... with some description of the change ...]
- In your summary, include the recommendations for the target module and the new file locations, including the Java class and the JSP files

### 4. Find other classes used by action class that may need moving

- Looking at all the classes used by the action class, prepare a report of which modules those live in, because the receiving target domain may not have the Maven dependencies for those
- If the classes are in the `legacy-templ8r-api` module, that is OK, the receiving module can get that dependency if it doesn't already have it
- If the classes are in the `legacy-templ8r-actions` module, we might want to move them into `legacy-templ8r-api` if they make sense as shared classes (utility code or used by many other actions from different domains perhaps)
- If the classes are from other `-api` modules, that's OK, the receiving module can add those dependencies if it doesn't already have them
- If the classes are from other non-api modules that are different from the receiving module, then we will need to change the access to use an API interface instead
- Prepare some recommendations for the user to review and choose from for implementation
- Do NOT continue automatically until the user has agreed to the plan

### 5. Summarize the plan and let the user review

- Present a detailed plan to the user
- Ask the user if they want anything changed, and if yes, consider those changes and present the updated plan again
- Once the user is happy with the plan they should explicity approve it for you before executing any refactoring or file moves

### 6. Execute the plan

- After the user approved the execution plan, start working on it
- Move the Templ8r action class into the target module
- Prefer the `move_file` tool over `create_file`
- Move the test(s) for the Templ8r action class into the target module as well
- Move the JSP files into the target module
- Prefer the `move_file` tool over `create_file`
- Leave the `templates-config.xml` file unchanged
- Execute any refactoring steps the user has agreed to
- Add missing dependencies to the target Maven module, but only if it doesn't already have them
- Edit/review the `jira/webapp/pom.xml` configuration to make sure it includes the target module's `src/main/views` resource directory

### 7. Summary

- Summarize what's been done so far
- Suggest to the user to run a Maven build to verify that compilation still works, but do NOT execute this automatically as the user may not want it
- Suggest to the user that they could run the `TestTempl8rIntegrity` test to validate the action changes, but do NOT execute this automatically as the user may not want it

3 comments

Jin Cho
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2025

This was a great read—thanks for sharing your experience

Like # people like this
jerlyn.brital
Contributor
November 23, 2025

I'll take note on this. Thanks a lot for sharing! Great help.

 

Like # people like this
Alex Dane
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 23, 2025

This is a great breakdown of how you used Rovo Dev to safely refactor and move a legacy Templ8r action. Legacy Jira code can be pretty intimidating, so having those checkpoints and summaries really makes the whole process feel controlled instead of chaotic. Also nice to see how the saved prompt evolved over time and became a reliable workflow. The step-by-step migration and the ability to pause, review, and adjust is super helpful for big repo changes like this. Thanks for sharing the full process — it’s really useful for anyone dealing with similar legacy actions.

Like # people like this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events