From 70a5b324bc71083aa47b8b9d209cd6f41f4c092c Mon Sep 17 00:00:00 2001 From: Roomote Date: Sun, 6 Jul 2025 07:26:49 -0800 Subject: [PATCH] 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 --- .../src/lib/jobs/processSlackMention.ts | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/roomote/src/lib/jobs/processSlackMention.ts b/apps/roomote/src/lib/jobs/processSlackMention.ts index a6d984fdd9..7ead811c61 100644 --- a/apps/roomote/src/lib/jobs/processSlackMention.ts +++ b/apps/roomote/src/lib/jobs/processSlackMention.ts @@ -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.