You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/src/tool/bash.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -35,16 +35,17 @@ Usage notes:
35
35
36
36
# Committing changes with git
37
37
38
+
IMPORTANT: ONLY COMMIT IF THE USER ASKS YOU TO.
39
+
38
40
If and only if the user asks you to create a new git commit, follow these steps carefully:
39
41
40
42
1. You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance. ALWAYS run the following bash commands in parallel, each using the Bash tool:
41
43
- Run a git status command to see all untracked files.
42
44
- Run a git diff command to see both staged and unstaged changes that will be committed.
43
45
- Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.
44
46
45
-
2. Analyze all staged changes (both previously staged and newly added) and draft a commit message. Wrap your analysis process in <commit_analysis> tags:
47
+
2. Analyze all staged changes (both previously staged and newly added) and draft a commit message. When analyzing:
46
48
47
-
<commit_analysis>
48
49
- List the files that have been changed or added
49
50
- Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.)
50
51
- Brainstorm the purpose or motivation behind these changes
@@ -55,7 +56,6 @@ If and only if the user asks you to create a new git commit, follow these steps
55
56
- Ensure the message accurately reflects the changes and their purpose (i.e. "add" means a wholly new feature, "update" means an enhancement to an existing feature, "fix" means a bug fix, etc.)
56
57
- Ensure the message is not generic (avoid words like "Update" or "Fix" without context)
57
58
- Review the draft message to ensure it accurately reflects the changes and their purpose
58
-
</commit_analysis>
59
59
60
60
3. You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance. ALWAYS run the following commands in parallel:
61
61
- Add relevant untracked files to the staging area.
0 commit comments