Skip to content

Commit bf391cd

Browse files
authored
Add CRITICAL_COMMAND_RESTRICTIONS and MAIN_BRANCH_PROTECTION to generalTask prompt (#221)
- Import CRITICAL_COMMAND_RESTRICTIONS and MAIN_BRANCH_PROTECTION from promptConstants - Update processGeneralTask prompt to include safety restrictions - Align generalTask behavior with fixGitHubIssue implementation - Prevents execution of dangerous long-running or interactive commands - Enforces proper git branching practices Addresses Slack mention request to add restrictions to generalTask prompt.
1 parent 12185d0 commit bf391cd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

apps/roomote/src/lib/jobs/processGeneralTask.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { JobPayload } from '@roo-code-cloud/db';
22

33
import { runTask, type RunTaskCallbacks } from '../runTask';
4+
import {
5+
CRITICAL_COMMAND_RESTRICTIONS,
6+
MAIN_BRANCH_PROTECTION,
7+
} from '../promptConstants';
48

59
export async function processGeneralTask(
610
jobPayload: JobPayload<'general.task'>,
@@ -17,8 +21,12 @@ export async function processGeneralTask(
1721
Repository: ${jobPayload.repo}
1822
Task: ${jobPayload.description}
1923
24+
${CRITICAL_COMMAND_RESTRICTIONS}
25+
26+
${MAIN_BRANCH_PROTECTION}
27+
2028
Please complete this task and create a pull request with your changes when finished.
21-
`;
29+
`.trim();
2230

2331
const result = await runTask({
2432
jobType: 'general.task',

0 commit comments

Comments
 (0)