claude-simone icon indicating copy to clipboard operation
claude-simone copied to clipboard

Improve work_issue prompt: Add branch switching after PR and optional manual testing

Open Helmi opened this issue 1 year ago • 0 comments

Description

The work_issue prompt needs two improvements to enhance the development workflow:

  1. Branch switching after PR creation: Currently, after creating a pull request, the assistant remains on the feature/fix branch. This can lead to subsequent work being done on the wrong branch.

  2. Optional manual testing before commit/PR: The prompt currently auto-commits and creates a PR immediately after implementation. We need an option to allow manual testing and confirmation before these steps.

Context

  • Project area: MCP Server prompt templates
  • Related files: /mcp-server/src/templates/prompts/work_issue.yaml
  • Complexity: 4/10 - Moderate changes to existing prompt logic

Technical Details

Affected files:

  • /mcp-server/src/templates/prompts/work_issue.yaml - Main prompt that needs modification

Requirements

1. Branch Switching After PR

  • After successfully creating a pull request in step 6, add logic to switch back to the main/master branch
  • Should detect the default branch name (master or main) from the repository
  • Ensure clean working directory before switching

2. Optional Manual Testing Configuration

  • Add a configuration option (e.g., project.autoCommit or similar) that controls whether to automatically commit and create PR
  • When auto-commit is disabled:
    • After implementation (step 5), pause and inform the user that implementation is complete
    • Prompt user to test the changes manually
    • Wait for user confirmation before proceeding to commit and PR creation
  • Default behavior should remain as current (auto-commit enabled) for backward compatibility

Implementation Steps

  • [ ] Review current work_issue.yaml prompt structure
  • [ ] Add branch detection logic to identify main/master branch
  • [ ] Insert branch switching command after PR creation in step 6
  • [ ] Design configuration option for auto-commit behavior
  • [ ] Add conditional logic based on configuration in steps 5-6
  • [ ] Update prompt documentation if needed
  • [ ] Test both scenarios (auto-commit on/off)

Acceptance Criteria

  • [ ] After creating a PR, the assistant automatically switches back to the main/master branch
  • [ ] When auto-commit is disabled, the assistant pauses after implementation for manual testing
  • [ ] User can explicitly confirm when ready to commit and create PR
  • [ ] Default behavior remains unchanged (backward compatible)
  • [ ] No breaking changes to existing workflows

Helmi avatar Aug 08 '25 19:08 Helmi