mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-01 02:43:13 +00:00
feat: Add prompting around how to deal with gh workflow files (#654)
This commit is contained in:
parent
50a55f4bff
commit
d8b65cf6f5
3 changed files with 12 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { GITHUB_WORKFLOWS_PERMISSIONS_PROMPT } from "../../../shared/prompts.js";
|
||||
|
||||
export const SCRATCHPAD_PROMPT = `Here is a collection of technical notes you wrote to a scratchpad while gathering context for the plan. Ensure you take these into account when writing your plan.
|
||||
|
||||
<scratchpad>
|
||||
|
|
@ -51,6 +53,8 @@ Create your plan following these guidelines:
|
|||
6. **Combine simple, related steps:**
|
||||
- If you have multiple simple steps that are related, and should be executed one after the other, combine them into a single step.
|
||||
- For example, if you have multiple steps to run a linter, formatter, etc., combine them into a single step. The same goes for passing arguments, or editing files.
|
||||
|
||||
${GITHUB_WORKFLOWS_PERMISSIONS_PROMPT}
|
||||
</instructions>
|
||||
|
||||
<output_format>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { createMarkTaskCompletedToolFields } from "@open-swe/shared/open-swe/tools";
|
||||
import { GITHUB_WORKFLOWS_PERMISSIONS_PROMPT } from "../../../shared/prompts.js";
|
||||
|
||||
const IDENTITY_PROMPT = `<identity>
|
||||
You are a terminal-based agentic coding assistant built by LangChain. You wrap LLM models to enable natural language interaction with local codebases. You are precise, safe, and helpful.
|
||||
|
|
@ -66,6 +67,7 @@ const CODING_STANDARDS_PROMPT = `<coding_standards>
|
|||
- Ensure package manager files are updated to include the new dependency.
|
||||
- If a command you run fails (e.g. a test, build, lint, etc.), and you make changes to fix the issue, ensure you always re-run the command after making the changes to ensure the fix was successful.
|
||||
- IMPORTANT: You are NEVER allowed to create backup files. All changes in the codebase are tracked by git, so never create file copies, or backups.
|
||||
- ${GITHUB_WORKFLOWS_PERMISSIONS_PROMPT}
|
||||
</coding_standards>`;
|
||||
|
||||
const COMMUNICATION_GUIDELINES_PROMPT = `<communication_guidelines>
|
||||
|
|
|
|||
6
apps/open-swe/src/graphs/shared/prompts.ts
Normal file
6
apps/open-swe/src/graphs/shared/prompts.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export const GITHUB_WORKFLOWS_PERMISSIONS_PROMPT = `
|
||||
IMPORTANT: You do not have permissions to EDIT or DELETE files inside the GitHub workflows directory (commonly found at .github/workflows/).
|
||||
- If you need to modify or create a workflow, ensure you always do so inside a 'tmp-workflows' directory.
|
||||
- Any attempt to create or modify a workflow file in the .github/workflows/ directory will result in a fatal error that will end the session.
|
||||
- Notify the user that they will need to manually move the workflow file from the 'tmp-workflows' directory to the .github/workflows/ directory since you do not have permissions to do so.
|
||||
`;
|
||||
Loading…
Add table
Reference in a new issue