xonecas.io
556
Bn

bees-nest / files

bees-nest / .opencode / commands / commit.md

917 bytes
1---
2description: Format, lint, and commit all changes with a generated message
3---
4
5Run the following steps to clean and commit the code:
6
71.  **Verify Code Quality**:
8    - Check `package.json` to identify the correct format and lint scripts (e.g., `bun run format`, `bun run lint`).
9    - Run them to ensure the code style is consistent and free of errors.
10    - If any command fails, stop immediately and report the issues.
11
122.  **Stage Changes**:
13    - Run `git add .` to stage all modified and untracked files.
14
153.  **Generate Commit**:
16    - Analyze the staged changes (using `git diff --cached` if necessary to understand the context).
17    - Draft a concise, descriptive commit message following the **Conventional Commits** specification (e.g., `feat: add search`, `fix: handle null url`).
18    - Create the commit using `git commit -m "..."`.
19
204.  **Report**:
21    - Output the result of the commit operation.