xonecas.io
56101
Df

dotfiles / commit 4f6622b

fix: review command should use the debug agent

- Edits the commit-all prompt for efficiency since I use it a lot.

Sean2026-01-30 4f6622b97187bc27064e5d1b407a31c048c55113 parent 005d9b0

2 files changed

opencode/commands/commit-all.md+28−14
@@ -1,26 +1,40 @@
11 ---
2-name: commit-all
32 description: Stage and commit all changes with a generated message
3+subtask: true
4+model: opencode/claude-haiku-4-5
45 ---
56
6-Run the following steps to stage and commit the code. If you want formatting and linting, run `/format-then-lint` first.
7+Use the context below, then follow the steps.
8+
9+Working tree:
10+!`git status --short`
11+
12+Change summary:
13+!`git diff --stat`
14+
15+Recent commits:
16+!`git log --oneline -10`
717
818 **IMPORTANT**: This command stages and commits ALL changes in the working directory. Do not cherry-pick or selectively stage files unless there are sensitive files (credentials, secrets) that should not be committed. Stage everything with `git add .` as instructed.
919
10-1. **Stage Changes**:
20+1. **Safety Preflight**:
21+ - Review the **Working tree** section above and ensure no sensitive files are present (e.g., `.env`, credentials, keys).
22+ - If anything looks sensitive or uncertain, STOP and ask the user how to proceed before staging.
23+
24+2. **Stage Changes**:
25+ - If the **Working tree** section above shows no changes, report and stop (do not create an empty commit).
1126 - Run `git add .` to stage all modified and untracked files.
12- - Do not selectively stage only some files - stage everything unless there are security concerns.
1327
14-2. **Generate Commit**:
15- - Analyze the staged changes (using `git diff --cached` if necessary to understand the context).
16- - Draft a concise, descriptive commit message following the **Conventional Commits** specification (e.g., `feat: add search`, `fix: handle null url`).
28+3. **Generate Commit**:
29+ - Analyze the staged changes (use `git diff --cached` if needed, the context at the start of the document should be enough).
30+ - Draft a concise, descriptive commit message following **Conventional Commits** (e.g., `feat: add search`, `fix: handle null url`).
1731 - Create the commit using `git commit -m "..."`.
1832
19-3. **Handle Pre-commit Hook Failures**:
20- - If the commit fails due to pre-commit hooks (e.g., lint checks, formatting checks, tests):
21- - Report the error output clearly to the user
22- - Ask the user how they would like to proceed (e.g., fix the issues automatically, skip hooks, or abort)
23- - Report all other errors or unexpected output to the user and ask for next steps.
33+4. **Handle Pre-commit Hook Failures**:
34+ - If hooks fail, report the error output clearly and ask how to proceed.
35+ - If hooks modify files and the commit fails, re-stage and retry once; otherwise ask for next steps.
36+ - Report all other errors or unexpected output and ask for next steps.
2437
25-4. **Report**:
26- - Output the result of the commit operation.
38+5. **Report**:
39+ - Output the result of the commit operation and final `git status --short`.
40+ - Don't enumerate steps from this document, avoid saying "Used Conventional Commits" for exmaple.
opencode/commands/review.md+1−1
@@ -1,6 +1,6 @@
11 ---
22 description: Code review with programming principles
3-agent: build
3+agent: debug
44 ---
55
66 You are a code reviewer. Your job is to review code changes and provide actionable feedback, with special attention to good programming principles.