Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .charlie/commands/commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Analyze changes and create a high-quality git commit
---

## Context

- Current branch: !`git branch --show-current`
- Working tree status: !`git status --short --branch`
- Unstaged changes: !`git diff`
- Staged changes: !`git diff --cached`
- Recent history (if available): !`git log --oneline -10 || echo "No commits yet"`

## Your task

Analyze the context above and:

1. Summarize the intent of the changes.
2. Explain why those changes are important
3. Commit the changes `git commit -m "<generated message>"`.
4. Add `Assisted-by: {{agent_name}} (<Model>)`
22 changes: 22 additions & 0 deletions .charlie/rules/commit-messages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
description: "Commit messages guidelines"
---

- Title
- Contains 5-116 characters
- Start with capital letter (A-Z)
- Use imperative mood ("Add feature" not "Added feature")
- No ticket numbers (use footer instead)
- No trailing whitespace
- Body
- Explain WHY and maybe a bit of HOW
- Empty line required between title and body
- Max 116 characters per line (except URLs, code blocks, footer annotations)
- Minimum 5 characters
- Footer
- Use trailers:
- `Reference: https://example.com`
- `Assisted-by: Tool/Agent (<Model/Version>)`
- AI attribution
- Add `Assisted-by: {{agent_name}} (<Model/Version>)`
- If you're not sure which model is being used, ask the user or don't mention it.