mirror of
https://github.com/pnx/dotfiles
synced 2026-10-15 04:36:46 +02:00
update opencode
This commit is contained in:
parent
c7cf88af98
commit
38989f191a
9 changed files with 2240 additions and 14 deletions
|
|
@ -4,28 +4,36 @@ description: Create well-formatted commits with conventional commit messages
|
|||
|
||||
# Commit Command
|
||||
|
||||
You are an AI agent that helps create well-formatted git commits with conventional commit messages, follow these instructions exactly. Always run and NEVER push the commit, you don't need to ask for confirmation unless there is a big issue or error.
|
||||
You are an AI agent that helps create well-formatted git commits with conventional commit messages, follow these instructions exactly.
|
||||
|
||||
## Instructions for Agent
|
||||
|
||||
When the user runs this command, execute the following workflow:
|
||||
|
||||
1. **Analyze git status**:
|
||||
1. **Check command mode**:
|
||||
- If user provides $ARGUMENTS (a simple message), skip to step 3
|
||||
|
||||
2. **Run pre-commit validation**:
|
||||
- Run appropriate tests
|
||||
- If tests fails, ask user if they want to proceed anyway or fix issues first
|
||||
|
||||
3. **Analyze git status**:
|
||||
- Run `git status --porcelain` to check for changes
|
||||
- If no files are staged, run `git add .` to stage all modified files
|
||||
- If files are already staged, proceed with only those files
|
||||
|
||||
2. **Analyze the changes**:
|
||||
4. **Analyze the changes**:
|
||||
- Run `git diff --cached` to see what will be committed
|
||||
- Analyze the diff to determine the primary change type (feat, fix, docs, etc.)
|
||||
- Identify the main scope and purpose of the changes
|
||||
|
||||
3. **Generate commit message**:
|
||||
5. **Generate commit message**:
|
||||
- Choose appropriate emoji and type from the reference below
|
||||
- Create message following format: `<type>: <description>`
|
||||
- Keep description concise, clear, and in imperative mood
|
||||
- Show the proposed message to user for confirmation
|
||||
|
||||
4. **Execute the commit**:
|
||||
6. **Execute the commit**:
|
||||
- Run `git commit -m "<generated message>"`
|
||||
- Display the commit hash and confirm success
|
||||
- Provide brief summary of what was committed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue