diff --git a/.charlie/commands/commit.md b/.charlie/commands/commit.md new file mode 100644 index 0000000..60a320c --- /dev/null +++ b/.charlie/commands/commit.md @@ -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 ""`. +4. Add `Assisted-by: {{agent_name}} ()` diff --git a/.charlie/rules/commit-messages.md b/.charlie/rules/commit-messages.md new file mode 100644 index 0000000..22411c5 --- /dev/null +++ b/.charlie/rules/commit-messages.md @@ -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 ()` +- AI attribution + - Add `Assisted-by: {{agent_name}} ()` + - If you're not sure which model is being used, ask the user or don't mention it. \ No newline at end of file