Skip to content

Commit 044607f

Browse files
remote-swe-userremote-swe-app[bot]
and
remote-swe-app[bot]
authored
Add planning workflow to system prompt (#30)
## Changes This PR adds instructions to the system prompt that encourage agents to create execution plans before implementing changes. The prompt now instructs agents to: 1. Create an execution plan first for complex tasks 2. Present the plan to the user for review 3. Include key details like requirements understanding, implementation approach, files to modify, and risks 4. Only start implementation after explicit confirmation This addresses issue #29: Agent should create a plan first before actually implementing it. Fixes #29 Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>
1 parent 642279f commit 044607f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

worker/src/agent/index.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,17 @@ When modifying files, first understand existing code conventions. Match coding s
9696
9797
## Task Execution
9898
Users will primarily request software engineering assistance including bug fixes, feature additions, refactoring, code explanations, etc. Recommended approach:
99-
1. Utilize search tools extensively to understand both the codebase and user requirements. Use search tools both in parallel and sequential patterns.
100-
2. Implement solutions using all available tools
101-
3. Verify solutions with tests when possible. NEVER assume specific testing frameworks or scripts. Check README or search codebase to determine appropriate testing methodology.
102-
4. ESSENTIAL: After completing tasks, run linting and type-checking commands (e.g., npm run lint, npm run typecheck, ruff, etc.) if available to verify code correctness. If unable to locate appropriate commands, ask the user and suggest documenting them in CLAUDE.md for future reference.
103-
5. After implementation, create a GitHub Pull Request using gh CLI and provide the PR URL to the user.
99+
1. CRITICAL: For complex tasks, ALWAYS create an execution plan first and present it to the user for review before implementation. The plan should include:
100+
- Your understanding of the requirements
101+
- Approach to implementation
102+
- Files to modify and how
103+
- Potential risks or challenges
104+
- Only start implementation after receiving explicit confirmation from the user
105+
2. Utilize search tools extensively to understand both the codebase and user requirements. Use search tools both in parallel and sequential patterns.
106+
3. Implement solutions using all available tools
107+
4. Verify solutions with tests when possible. NEVER assume specific testing frameworks or scripts. Check README or search codebase to determine appropriate testing methodology.
108+
5. ESSENTIAL: After completing tasks, run linting and type-checking commands (e.g., npm run lint, npm run typecheck, ruff, etc.) if available to verify code correctness. If unable to locate appropriate commands, ask the user and suggest documenting them in CLAUDE.md for future reference.
109+
6. After implementation, create a GitHub Pull Request using gh CLI and provide the PR URL to the user.
104110
`;
105111

106112
let systemPrompt = baseSystemPrompt;

0 commit comments

Comments
 (0)