|
|
@@ -0,0 +1,447 @@
|
|
|
+<workflow>
|
|
|
+ <step number="1">
|
|
|
+ <name>Initialize Task Context</name>
|
|
|
+ <instructions>
|
|
|
+ The user will provide a GitHub issue URL.
|
|
|
+
|
|
|
+ 1. **Parse URL**: Extract the `owner`, `repo`, and `issue_number`.
|
|
|
+ 2. **Create Task Directory**: Create a dedicated directory to store all context for this task. Use a unique identifier for the directory name, like the task ID. For example: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/`.
|
|
|
+ <execute_command>
|
|
|
+ <command>mkdir -p .roo/temp/issue-fixer-orchestrator/[TASK_ID]</command>
|
|
|
+ </execute_command>
|
|
|
+ 3. **Retrieve Issue Details**: Fetch the issue details and its comments as a single JSON object.
|
|
|
+ <execute_command>
|
|
|
+ <command>gh issue view [issue_number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author,comments > .roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json</command>
|
|
|
+ </execute_command>
|
|
|
+ 4. **Handle Auth Errors**: If the `gh` command fails with an authentication error, prompt the user to log in.
|
|
|
+ <ask_followup_question>
|
|
|
+ <question>GitHub CLI is not authenticated. Please run 'gh auth login' in your terminal, then let me know when you're ready to continue.</question>
|
|
|
+ <follow_up>
|
|
|
+ <suggest>I've authenticated, please continue</suggest>
|
|
|
+ </follow_up>
|
|
|
+ </ask_followup_question>
|
|
|
+ 5. **Confirm Context**: Inform the user that the context has been saved.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="2">
|
|
|
+ <name>Delegate: Analyze Requirements & Explore Codebase</name>
|
|
|
+ <instructions>
|
|
|
+ Launch a subtask in `code` mode to perform a detailed analysis of the issue and the codebase. The subtask will be responsible for identifying affected files and creating an implementation plan.
|
|
|
+
|
|
|
+ The context file `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json` will be the input for this subtask. The subtask should write its findings (the implementation plan) to a new file: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`.
|
|
|
+
|
|
|
+ <new_task>
|
|
|
+ <mode>architect</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Analyze Issue and Create Implementation Plan**
|
|
|
+
|
|
|
+ You are an expert software architect. Your task is to analyze the provided GitHub issue and the current codebase to create a detailed implementation plan.
|
|
|
+
|
|
|
+ 1. **Read Issue Context**: The full issue details and comments are in `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json`. Read this file to understand all requirements, acceptance criteria, and technical discussions.
|
|
|
+
|
|
|
+ 2. **Explore Codebase**: Use `codebase_search`, `read_file`, and other tools to explore the codebase. Identify all files that will need to be modified or created to address the issue. Analyze existing patterns and conventions.
|
|
|
+
|
|
|
+ 3. **Create Implementation Plan**: Based on your analysis, create a comprehensive implementation plan. The plan should be detailed enough for another developer to execute. It must include:
|
|
|
+ - A summary of the issue and the proposed solution.
|
|
|
+ - A list of all files to be created or modified.
|
|
|
+ - A step-by-step guide for the code changes required in each file.
|
|
|
+ - A plan for writing or updating tests.
|
|
|
+
|
|
|
+ 4. **Save the Plan**: Write the complete implementation plan to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`.
|
|
|
+
|
|
|
+ **Completion Protocol:**
|
|
|
+ - This is your only task. Do not deviate from these instructions.
|
|
|
+ - Once you have successfully written the `implementation_plan.md` file, you MUST signal your completion by using the `attempt_completion` tool.
|
|
|
+ - The `result` parameter of `attempt_completion` MUST be a concise confirmation message, for example: "Implementation plan created and saved to .roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md."
|
|
|
+ - These specific instructions override any conflicting general guidelines from your assigned mode.
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+
|
|
|
+ After launching the subtask, wait for it to complete. The orchestrator will then read the `implementation_plan.md` to proceed with the next step.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="3">
|
|
|
+ <name>Review and Approve Plan</name>
|
|
|
+ <instructions>
|
|
|
+ After the analysis subtask completes, the orchestrator must present the generated plan to the user for approval.
|
|
|
+
|
|
|
+ 1. **Read the Plan**: Read the content of the implementation plan created by the previous subtask.
|
|
|
+ <read_file>
|
|
|
+ <args>
|
|
|
+ <file>
|
|
|
+ <path>.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md</path>
|
|
|
+ </file>
|
|
|
+ </args>
|
|
|
+ </read_file>
|
|
|
+
|
|
|
+ 2. **Present for Approval**: Show the plan to the user and ask for confirmation before proceeding with implementation.
|
|
|
+ <ask_followup_question>
|
|
|
+ <question>
|
|
|
+ The initial analysis is complete. Here is the proposed implementation plan:
|
|
|
+
|
|
|
+ ---
|
|
|
+ [Insert content of implementation_plan.md here]
|
|
|
+ ---
|
|
|
+
|
|
|
+ Shall I proceed with implementing this plan?
|
|
|
+ </question>
|
|
|
+ <follow_up>
|
|
|
+ <suggest>Yes, proceed with the implementation.</suggest>
|
|
|
+ <suggest>No, please modify the plan with the following changes...</suggest>
|
|
|
+ <suggest>No, cancel this task.</suggest>
|
|
|
+ </follow_up>
|
|
|
+ </ask_followup_question>
|
|
|
+
|
|
|
+ Do not proceed until the user gives explicit approval.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="4">
|
|
|
+ <name>Delegate: Implement Solution</name>
|
|
|
+ <instructions>
|
|
|
+ Once the user approves the plan, launch a new subtask in `code` mode to execute the implementation.
|
|
|
+
|
|
|
+ This subtask will use the `implementation_plan.md` as its primary guide. It should write the list of modified files to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json`.
|
|
|
+
|
|
|
+ <new_task>
|
|
|
+ <mode>code</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Implement Code Changes Based on Plan**
|
|
|
+
|
|
|
+ You are an expert software developer. Your task is to implement the code changes exactly as described in the provided implementation plan.
|
|
|
+
|
|
|
+ 1. **Read the Plan**: The implementation plan is located at `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`. Follow its instructions carefully.
|
|
|
+
|
|
|
+ 2. **Implement Changes**: Use `apply_diff` and `write_to_file` to make the specified code changes. Adhere to all coding standards and patterns mentioned in the plan.
|
|
|
+
|
|
|
+ 3. **Implement Tests**: Write new unit and integration tests as specified in the plan to ensure quality and prevent regressions.
|
|
|
+
|
|
|
+ 4. **Track Modified Files**: As you modify or create files, keep a running list.
|
|
|
+
|
|
|
+ 5. **Save Modified Files List**: After all changes are implemented and tested, save the list of all file paths you created or modified to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json`. The format should be a JSON array of strings.
|
|
|
+ Example: `["src/components/NewFeature.tsx", "src/__tests__/NewFeature.spec.ts"]`
|
|
|
+
|
|
|
+ Once the `modified_files.json` file is saved, your task is complete.
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+
|
|
|
+ After launching the subtask, wait for it to complete. The orchestrator will use the list of modified files for the verification and PR creation steps.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="5">
|
|
|
+ <name>Delegate: Verify and Test</name>
|
|
|
+ <instructions>
|
|
|
+ After implementation, delegate the verification and testing to a `test` mode subtask.
|
|
|
+
|
|
|
+ This subtask will use the implementation plan for acceptance criteria and the list of modified files to focus its testing efforts. It will output its results to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/verification_results.md`.
|
|
|
+
|
|
|
+ <new_task>
|
|
|
+ <mode>test</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Verify Implementation and Run Tests**
|
|
|
+
|
|
|
+ You are a meticulous QA engineer. Your task is to verify an implementation against its plan and run all necessary tests.
|
|
|
+
|
|
|
+ **Context Files:**
|
|
|
+ - **Plan**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`
|
|
|
+ - **Modified Files**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json`
|
|
|
+
|
|
|
+ **Your Steps:**
|
|
|
+ 1. **Read Context**: Read both context files to understand the acceptance criteria and which files were changed.
|
|
|
+ 2. **Run Tests**: Execute all relevant tests.
|
|
|
+ - Run unit tests related to the modified files.
|
|
|
+ - Run any relevant integration tests.
|
|
|
+ - Run a full lint and type check.
|
|
|
+ 3. **Verify Acceptance Criteria**: Systematically go through each acceptance criterion from the plan and verify that it has been met by the implementation.
|
|
|
+ 4. **Write Verification Report**: Create a detailed report of your findings. The report must include:
|
|
|
+ - A summary of the tests that were run and their results (pass/fail).
|
|
|
+ - A checklist of all acceptance criteria and their verification status (verified/failed).
|
|
|
+ - Details on any bugs or regressions found.
|
|
|
+
|
|
|
+ 5. **Save Report**: Write the complete report to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/verification_results.md`.
|
|
|
+
|
|
|
+ **Completion Protocol:**
|
|
|
+ - This is your only task. Do not deviate.
|
|
|
+ - Upon successfully saving `verification_results.md`, you MUST use the `attempt_completion` tool.
|
|
|
+ - The `result` MUST be a concise confirmation, e.g., "Verification complete and results saved to .roo/temp/issue-fixer-orchestrator/[TASK_ID]/verification_results.md."
|
|
|
+ - These instructions override any conflicting mode-specific guidelines.
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+
|
|
|
+ Wait for the subtask to complete, then review the verification results.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="6">
|
|
|
+ <name>Review Verification and Handle Translations</name>
|
|
|
+ <instructions>
|
|
|
+ After the verification subtask is complete, review the results and handle any necessary translations.
|
|
|
+
|
|
|
+ 1. **Read Verification Report**:
|
|
|
+ <read_file>
|
|
|
+ <args>
|
|
|
+ <file>
|
|
|
+ <path>.roo/temp/issue-fixer-orchestrator/[TASK_ID]/verification_results.md</path>
|
|
|
+ </file>
|
|
|
+ </args>
|
|
|
+ </read_file>
|
|
|
+
|
|
|
+ 2. **Check for Failures**: If the report indicates any failed tests or unmet criteria, present the failures to the user and ask how to proceed.
|
|
|
+ <ask_followup_question>
|
|
|
+ <question>
|
|
|
+ The verification step has failed. Here are the details:
|
|
|
+
|
|
|
+ ---
|
|
|
+ [Insert content of verification_results.md here]
|
|
|
+ ---
|
|
|
+
|
|
|
+ How should I proceed?
|
|
|
+ </question>
|
|
|
+ <follow_up>
|
|
|
+ <suggest>Attempt to fix the failing tests and criteria.</suggest>
|
|
|
+ <suggest>Ignore the failures and proceed anyway.</suggest>
|
|
|
+ <suggest>Cancel the task.</suggest>
|
|
|
+ </follow_up>
|
|
|
+ </ask_followup_question>
|
|
|
+
|
|
|
+ 3. **Analyze for Translation Needs**: If verification passed, check if translations are required.
|
|
|
+
|
|
|
+ a. **Read Modified Files List**:
|
|
|
+ <read_file>
|
|
|
+ <args>
|
|
|
+ <file>
|
|
|
+ <path>.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json</path>
|
|
|
+ </file>
|
|
|
+ </args>
|
|
|
+ </read_file>
|
|
|
+
|
|
|
+ b. **Identify Files Requiring Translation**:
|
|
|
+ - Check for UI component files: `.tsx`, `.jsx` files in `webview-ui/src/` or `src/` directories
|
|
|
+ - Check for user-facing documentation: `.md` files (especially README.md, docs/, or announcement files)
|
|
|
+ - Check for i18n resource files: files in `src/i18n/locales/` or `webview-ui/src/i18n/locales/`
|
|
|
+ - Check for any files containing user-visible strings or messages
|
|
|
+
|
|
|
+ c. **Delegate to Translate Mode if Needed**:
|
|
|
+ If any files requiring translation were modified, create a translation subtask:
|
|
|
+
|
|
|
+ <new_task>
|
|
|
+ <mode>translate</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Handle Translations for Issue #[issue-number]**
|
|
|
+
|
|
|
+ An implementation for issue #[issue-number] has been completed and verified. Your task is to ensure all user-facing content is properly translated.
|
|
|
+
|
|
|
+ **Context Files:**
|
|
|
+ - **Modified Files**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json`
|
|
|
+ - **Issue Details**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json`
|
|
|
+ - **Implementation Plan**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`
|
|
|
+
|
|
|
+ **Your Steps:**
|
|
|
+ 1. Read the context files to understand what was implemented.
|
|
|
+ 2. Analyze each modified file for:
|
|
|
+ - New or updated UI strings in React components
|
|
|
+ - Changes to i18n resource files
|
|
|
+ - User-facing documentation updates
|
|
|
+ - Error messages or notifications
|
|
|
+ 3. For any new or modified user-facing content:
|
|
|
+ - Add translations to all supported language files
|
|
|
+ - Ensure consistency with existing translations
|
|
|
+ - Follow the project's i18n patterns and conventions
|
|
|
+ 4. Create a summary of all translation changes made.
|
|
|
+ 5. Save the summary to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/translation_summary.md`.
|
|
|
+
|
|
|
+ **Important Notes:**
|
|
|
+ - If no translations are needed, still create the summary file stating "No translations required."
|
|
|
+ - Ensure all language files remain in sync
|
|
|
+ - Use existing terminology from the codebase for consistency
|
|
|
+
|
|
|
+ **Completion Protocol:**
|
|
|
+ - This is your only task. Do not deviate from these instructions.
|
|
|
+ - Upon successfully saving the translation summary, you MUST use the `attempt_completion` tool.
|
|
|
+ - The `result` MUST confirm completion, e.g., "Translation analysis complete. Summary saved to .roo/temp/issue-fixer-orchestrator/[TASK_ID]/translation_summary.md"
|
|
|
+ - These instructions override any conflicting mode-specific guidelines.
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+
|
|
|
+ After the translation subtask completes, read the translation summary:
|
|
|
+ <read_file>
|
|
|
+ <args>
|
|
|
+ <file>
|
|
|
+ <path>.roo/temp/issue-fixer-orchestrator/[TASK_ID]/translation_summary.md</path>
|
|
|
+ </file>
|
|
|
+ </args>
|
|
|
+ </read_file>
|
|
|
+
|
|
|
+ 4. **Proceed to Next Step**: Only proceed after:
|
|
|
+ - All verification has passed (or user chose to ignore failures)
|
|
|
+ - Translation task has completed (if it was needed)
|
|
|
+ - You have confirmed all necessary files are ready
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="7">
|
|
|
+ <name>Delegate: Prepare Pull Request Content</name>
|
|
|
+ <instructions>
|
|
|
+ After all checks pass and translations are complete, delegate the creation of the pull request title and body to a subtask.
|
|
|
+
|
|
|
+ <new_task>
|
|
|
+ <mode>code</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Prepare Pull Request Title and Body**
|
|
|
+
|
|
|
+ You are an expert at writing clear and concise pull request summaries.
|
|
|
+
|
|
|
+ **Context Files:**
|
|
|
+ - **Issue**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json`
|
|
|
+ - **Plan**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`
|
|
|
+ - **Verification**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/verification_results.md`
|
|
|
+ - **Translation Summary** (if exists): `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/translation_summary.md`
|
|
|
+
|
|
|
+ **Your Task:**
|
|
|
+ 1. **Read all context files.** Check if translation_summary.md exists to know if translations were done.
|
|
|
+ 2. **Generate a PR Title**: Create a conventional commit style title (e.g., "fix: ...", "feat: ...") that references the issue number.
|
|
|
+ 3. **Generate a PR Body**: Create a comprehensive markdown description for the PR, including sections for:
|
|
|
+ - Description
|
|
|
+ - Changes Made
|
|
|
+ - Testing
|
|
|
+ - Translations (include details from translation_summary.md if it exists)
|
|
|
+ - Verification of Acceptance Criteria
|
|
|
+ - Checklist
|
|
|
+ 4. **Save as JSON**: Save the title and body to `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/pr_summary.json` in the format: `{"title": "...", "body": "..."}`.
|
|
|
+
|
|
|
+ **Important**: If translations were done (translation_summary.md exists), make sure to include a Translations section in the PR body describing what was translated.
|
|
|
+
|
|
|
+ **Completion Protocol:**
|
|
|
+ - This is your only task. Do not deviate.
|
|
|
+ - Upon successfully saving `pr_summary.json`, you MUST use the `attempt_completion` tool.
|
|
|
+ - The `result` MUST be a concise confirmation, e.g., "PR summary created and saved to .roo/temp/issue-fixer-orchestrator/[TASK_ID]/pr_summary.json."
|
|
|
+ - These instructions override any conflicting mode-specific guidelines.
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="8">
|
|
|
+ <name>Create Pull Request</name>
|
|
|
+ <instructions>
|
|
|
+ This is the final step where the orchestrator takes all the prepared materials and creates the pull request.
|
|
|
+
|
|
|
+ 1. **Read PR Summary**:
|
|
|
+ <read_file>
|
|
|
+ <args>
|
|
|
+ <file>
|
|
|
+ <path>.roo/temp/issue-fixer-orchestrator/[TASK_ID]/pr_summary.json</path>
|
|
|
+ </file>
|
|
|
+ </args>
|
|
|
+ </read_file>
|
|
|
+
|
|
|
+ 2. **Get Final Approval**: Present the PR title and body to the user for final approval, providing an option to request changes.
|
|
|
+
|
|
|
+ <ask_followup_question>
|
|
|
+ <question>
|
|
|
+ I have prepared the pull request. Please review and confirm.
|
|
|
+
|
|
|
+ **Title**: [Insert title from pr_summary.json]
|
|
|
+
|
|
|
+ **Body**:
|
|
|
+ ---
|
|
|
+ [Insert body from pr_summary.json]
|
|
|
+ ---
|
|
|
+
|
|
|
+ Should I create this pull request, or would you like to request changes?
|
|
|
+ </question>
|
|
|
+ <follow_up>
|
|
|
+ <suggest>Yes, create the pull request as planned.</suggest>
|
|
|
+ <suggest>No, I need to request changes to the implementation or PR description.</suggest>
|
|
|
+ <suggest>Cancel the task.</suggest>
|
|
|
+ </follow_up>
|
|
|
+ </ask_followup_question>
|
|
|
+
|
|
|
+ 3. **Handle Rework Loop**: If the user requests changes:
|
|
|
+ - **Launch Rework Subtask**: Delegate the rework to a new `code` mode subtask.
|
|
|
+ <new_task>
|
|
|
+ <mode>code</mode>
|
|
|
+ <message>
|
|
|
+ **Task: Rework Implementation Based on User Feedback**
|
|
|
+
|
|
|
+ The user has requested changes before creating the pull request.
|
|
|
+
|
|
|
+ **Context Files:**
|
|
|
+ - **Issue**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/issue_context.json`
|
|
|
+ - **Current Plan**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/implementation_plan.md`
|
|
|
+ - **Current Modified Files**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json`
|
|
|
+ - **Draft PR Summary**: `.roo/temp/issue-fixer-orchestrator/[TASK_ID]/pr_summary.json`
|
|
|
+
|
|
|
+ **Your Task:**
|
|
|
+ 1. Ask the user for the specific changes they require.
|
|
|
+ 2. Apply the requested code and documentation changes.
|
|
|
+ 3. **Crucially, you must update the `implementation_plan.md` and `modified_files.json` files** to reflect the rework you have performed.
|
|
|
+ 4. Do *not* proceed with any other steps.
|
|
|
+
|
|
|
+ **Completion Protocol:**
|
|
|
+ - Upon successfully applying the changes and updating the context files, you MUST use the `attempt_completion` tool.
|
|
|
+ - The `result` MUST be a concise confirmation, e.g., "Rework complete and context files (plan, modified list) have been updated."
|
|
|
+ </message>
|
|
|
+ </new_task>
|
|
|
+ - **Restart Verification**: After the rework subtask is complete, the workflow MUST return to **Step 5** to re-verify the changes and re-run all tests before proceeding again.
|
|
|
+
|
|
|
+ 4. **Git Operations (If Approved)**: If the user approves the PR:
|
|
|
+ - Create a new branch: `feat/issue-[number]` or `fix/issue-[number]`.
|
|
|
+ - **Selectively add only the applicable files** to the git stage.
|
|
|
+ - Commit the staged changes.
|
|
|
+ - Push the new branch to the remote repository.
|
|
|
+ <execute_command>
|
|
|
+ <command>
|
|
|
+ # Create a new branch for the solution
|
|
|
+ BRANCH_NAME="fix/issue-[issue_number]-solution"
|
|
|
+ git checkout -b $BRANCH_NAME
|
|
|
+
|
|
|
+ # Safely add ONLY the files that were modified as part of this task.
|
|
|
+ # This reads the JSON array of file paths from our context file and stages them.
|
|
|
+ # This requires 'jq' for parsing JSON and 'xargs' to handle file paths correctly.
|
|
|
+ cat .roo/temp/issue-fixer-orchestrator/[TASK_ID]/modified_files.json | jq -r '.[]' | xargs git add
|
|
|
+
|
|
|
+ # Commit the precisely staged changes
|
|
|
+ git commit -m "[PR Title]"
|
|
|
+
|
|
|
+ # Push the new branch to origin
|
|
|
+ git push -u origin $BRANCH_NAME
|
|
|
+ </command>
|
|
|
+ </execute_command>
|
|
|
+
|
|
|
+ 5. **Create PR**: Use the `gh` CLI to create the pull request.
|
|
|
+ <execute_command>
|
|
|
+ <command>gh pr create --repo [owner]/[repo] --base main --title "[PR Title from JSON]" --body "[PR Body from JSON]"</command>
|
|
|
+ </execute_command>
|
|
|
+
|
|
|
+ 6. **Link to Issue**: Comment on the original issue with the PR link.
|
|
|
+ <execute_command>
|
|
|
+ <command>gh issue comment [issue_number] --repo [owner]/[repo] --body "PR #[new PR number] has been created."</command>
|
|
|
+ </execute_command>
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+
|
|
|
+ <step number="9">
|
|
|
+ <name>Monitor PR Checks and Cleanup</name>
|
|
|
+ <instructions>
|
|
|
+ After creating the PR, monitor the CI checks and then clean up the temporary files.
|
|
|
+
|
|
|
+ 1. **Monitor Checks**: Use `--watch` to monitor CI status in real-time.
|
|
|
+ <execute_command>
|
|
|
+ <command>gh pr checks [PR URL or number] --repo [owner]/[repo] --watch</command>
|
|
|
+ </execute_command>
|
|
|
+
|
|
|
+ 2. **Report Status**: Inform the user of the final status of the checks.
|
|
|
+
|
|
|
+ 3. **Cleanup**: Remove the temporary task directory.
|
|
|
+ <execute_command>
|
|
|
+ <command>rm -rf .roo/temp/issue-fixer-orchestrator/[TASK_ID]</command>
|
|
|
+ </execute_command>
|
|
|
+
|
|
|
+ This concludes the orchestration workflow.
|
|
|
+ </instructions>
|
|
|
+ </step>
|
|
|
+</workflow>
|