Enhance Slack roomote command prompt with git workflow instructions (#209)

* Enhance Slack roomote command prompt with git workflow instructions

- Add instructions to create and push to remote branch
- Include guidance for opening PR using gh CLI
- Ensure all changes are tracked and reviewable before merging

* Align Slack roomote trigger with other trigger patterns

- Restructured processSlackMention to follow the same pattern as processIssueComment and processPullRequestComment
- Created structured prompt with clear context and instructions instead of just appending to original prompt
- Maintains git workflow instructions while improving consistency across roomote triggers
- Addresses feedback from @mrubens in PR comment #3041965262
This commit is contained in:
Roomote 2025-07-06 07:26:49 -08:00 committed by GitHub
parent 799cca9fcd
commit 70a5b324bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,32 @@ export async function processSlackMention(
user: string;
result: unknown;
}> {
const { text: prompt, channel, user } = jobPayload;
const { text: originalPrompt, channel, user } = jobPayload;
// Create a structured prompt following the same pattern as other roomote triggers
const prompt = `
Process the following Slack mention request:
Channel: ${channel}
User: @${user}
Original Request:
${originalPrompt}
Please analyze the request and implement the necessary changes. The user mentioned @roomote, which means they want you to engage with their request.
Instructions:
1. Read and understand the context of the request
2. Implement the requested changes or provide the requested assistance
3. Follow proper git workflow practices for any code changes
4. Provide clear feedback on what was accomplished
IMPORTANT: After completing your changes, please follow this git workflow:
1. Create and push your changes to a new remote branch using: git push origin HEAD:feature/your-branch-name
2. Open a pull request using the GitHub CLI: gh pr create --title "Your PR Title" --body "Description of changes"
3. Include the PR link in your completion message
This ensures all changes are properly tracked and can be reviewed before merging.
`.trim();
// Add your workspace root to .env.local to override the default
// workspace root that our containers use.