Description
Simone needs to support workflows where teams work on feature branches for extended periods (e.g., during sprints) rather than always branching from and merging to master/main. Currently, the system assumes work is always done against the default branch, which doesn't align with many real-world branching strategies like GitFlow or feature branch workflows.
Context
- Project area: MCP Server - Configuration, Constitution, and Prompts
- Complexity: 7/10 - Architectural enhancement affecting multiple components
- Related: Branching strategies, sprint-based development, GitFlow support
Many projects require developers to:
- Work on a sprint branch for the duration of a sprint
- Create feature branches from the sprint branch (not master)
- Create pull requests targeting the sprint branch (not master)
- Only merge the sprint branch to master at sprint completion
Technical Details
Current Limitations
- Prompts assume default branch:
work_issue.yaml, create_pr.yaml, and refine_pr.yaml all assume working against master/main
- No branch configuration: Project configuration doesn't support specifying a working branch
- Constitution lacks branch awareness: Generated constitution doesn't include branch strategy information
- No sprint/temporary branch support: No way to temporarily override the target branch for a period
Affected Files
/mcp-server/src/config/types.ts - Add branch configuration types
/mcp-server/src/templates/prompts/work_issue.yaml - Add branch awareness
/mcp-server/src/templates/prompts/create_pr.yaml - Support custom target branch
/mcp-server/src/templates/prompts/refine_pr.yaml - Handle non-default branch PRs
/mcp-server/src/templates/prompts/init_simone.yaml - Include branch info in constitution
/mcp-server/src/templates/prompts/partials/github.hbs - Add branch context
- Project configuration schema documentation
Requirements
Configuration Support
-
Add branch configuration to project settings:
defaultBranch: The main branch (master/main)
workingBranch: Current working branch (can be temporary)
branchStrategy: Type of branching strategy (gitflow, github-flow, custom)
sprintBranch: Optional sprint-specific branch
-
Support temporary branch overrides:
- Allow setting a working branch for a sprint duration
- Automatically detect and suggest branch based on current context
- Provide prompts to switch working branch context
Prompt Updates
-
Update issue/PR prompts to:
- Check configuration for target branch
- Create branches from the working branch (not always master)
- Target PRs to the working branch
- Include branch context in PR descriptions
-
Add branch awareness prompts:
set_working_branch: Set temporary working branch
show_branch_context: Display current branch configuration
sync_branch: Sync working branch with upstream
Constitution Integration
- Include in project constitution:
- Current branch strategy
- Default and working branches
- Sprint branch if applicable
- Branch naming conventions
Implementation Steps
Phase 1: Configuration Foundation
Phase 2: Prompt Updates
Phase 3: Constitution Integration
Phase 4: Documentation
Acceptance Criteria
Additional Considerations
- Should support common branching strategies out of the box (GitFlow, GitHub Flow)
- Consider integration with GitHub Projects for sprint management
- May need to detect branch from current git context
- Should provide clear feedback about which branch is being used
- Consider adding branch validation to prevent mistakes
Research Links
Description
Simone needs to support workflows where teams work on feature branches for extended periods (e.g., during sprints) rather than always branching from and merging to master/main. Currently, the system assumes work is always done against the default branch, which doesn't align with many real-world branching strategies like GitFlow or feature branch workflows.
Context
Many projects require developers to:
Technical Details
Current Limitations
work_issue.yaml,create_pr.yaml, andrefine_pr.yamlall assume working against master/mainAffected Files
/mcp-server/src/config/types.ts- Add branch configuration types/mcp-server/src/templates/prompts/work_issue.yaml- Add branch awareness/mcp-server/src/templates/prompts/create_pr.yaml- Support custom target branch/mcp-server/src/templates/prompts/refine_pr.yaml- Handle non-default branch PRs/mcp-server/src/templates/prompts/init_simone.yaml- Include branch info in constitution/mcp-server/src/templates/prompts/partials/github.hbs- Add branch contextRequirements
Configuration Support
Add branch configuration to project settings:
defaultBranch: The main branch (master/main)workingBranch: Current working branch (can be temporary)branchStrategy: Type of branching strategy (gitflow, github-flow, custom)sprintBranch: Optional sprint-specific branchSupport temporary branch overrides:
Prompt Updates
Update issue/PR prompts to:
Add branch awareness prompts:
set_working_branch: Set temporary working branchshow_branch_context: Display current branch configurationsync_branch: Sync working branch with upstreamConstitution Integration
Implementation Steps
Phase 1: Configuration Foundation
types.tsPhase 2: Prompt Updates
work_issue.yamlto branch from working branchcreate_pr.yamlto target working branchrefine_pr.yamlfor non-default branch awarenessPhase 3: Constitution Integration
init_simone.yamlto include branch informationPhase 4: Documentation
Acceptance Criteria
Additional Considerations
Research Links