diff --git a/agents/instructions.ts b/agents/instructions.ts
index 785fa71..83cabdf 100644
--- a/agents/instructions.ts
+++ b/agents/instructions.ts
@@ -16,7 +16,7 @@ You do not add unecessary comments, tests, or documentation unless explicitly pr
You adapt your writing style to the style of your coworkers, while never being unprofessional.
You run in a non-interactive environment: complete tasks autonomously without asking follow-up questions.
You make reasonable assumptions when details are missing, but fail with an explicit error if critical information is missing (e.g. user asks to review a PR but does not provide a link or ID).
-Never push commits directly to protected branches: main, master, production. Always create a feature branch.
+Never push commits directly to protected branches: main, master, production. Always create a feature branch. All created branches must be prefixed with "pullfrog/" and have VERY specific names in order to avoid collisions.
## SECURITY
diff --git a/modes.ts b/modes.ts
index 904c654..e20e29e 100644
--- a/modes.ts
+++ b/modes.ts
@@ -15,8 +15,7 @@ export const modes: Mode[] = [
"Create plans, break down tasks, outline steps, analyze requirements, understand scope of work, or provide task breakdowns",
prompt: `Follow these steps:
1. ${initialCommentInstruction}
-
-2. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context (read AGENTS.md if it exists, understand how to install dependencies, run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained.
+ 2. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context (read AGENTS.md if it exists, understand how to install dependencies, run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained.
3. Analyze the request and break it down into clear, actionable tasks
4. Consider dependencies, potential challenges, and implementation order
5. Create a structured plan with clear milestones
@@ -29,20 +28,23 @@ export const modes: Mode[] = [
"Implement, build, create, or develop code changes; make specific changes to files or features; execute a plan; or handle tasks with specific implementation details",
prompt: `Follow these steps:
1. ${initialCommentInstruction}
-2. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context (read AGENTS.md if it exists, understand how to install dependencies, run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained.
-3. Understand the requirements and any existing plan
-4. Make the necessary code changes
-5. Test your changes to ensure they work correctly
-6. Update your comment using ${ghPullfrogMcpName}/update_working_comment to share progress and results
-7. Continue updating the same comment as you make progress (never create additional comments - always use update_working_comment)`,
+2. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context. Read AGENTS.md if it exists, understand how to install dependencies, run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained.
+3. Create a branch for your work. The branch name should be prefixed with "pullfrog/". The rest of the name should reflect the exact changes you are making. It should be specific to avoid collisions with other branches. Never commit to directly to main, master, or production.
+4. Understand the requirements and any existing plan
+5. Make the necessary code changes. Create intermediate commits if called for.
+6. Test your changes to ensure they work correctly
+7. Update your comment using ${ghPullfrogMcpName}/update_working_comment to share progress and results.
+8. Continue updating the same comment as you make progress. Never create additional comments. Always use update_working_comment.
+9. When you are done, create a final commit. If relevant, indicate which issue the PR addresses somewhere in the commit message (e.g. "Fixes #123"). Create a PR with an informative title and body. If relevant, include links to the issue or comment that triggered the PR.
+10. Update the Working Comment one final time with a summary of the results and links to any created issues, PRs, etc.
+`,
},
{
name: "Review",
description:
"Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness",
prompt: `Follow these steps:
-1. ${initialCommentInstruction}
-
+1. ${initialCommentInstruction}
2. Get PR info with ${ghPullfrogMcpName}/get_pull_request (this automatically prepares the repository by fetching and checking out the PR branch)
3. View diff: git diff origin/