Gitkkal Branch
Create and checkout a branch name that reflects the change intent.
Agent-Agnostic Rules
- •Do not assume client-specific UI features (forms, plan mode, special slash-command runtime).
- •Treat trigger command examples as optional; plain-language requests are equally valid.
- •Use a hint-first input model: accept one optional free-form description/hint string.
- •Do not require strict named parameters for normal usage.
- •If user input is needed, ask in plain chat.
- •Ask one clear follow-up at a time for unresolved decisions.
- •If presenting a multiple-choice question, use options as standalone lines (
1),2),3), ...).- •Do not use Markdown ordered-list syntax (
1.,2., ...), and do not prefix question text with list numbers. - •Restart numbering at
1)for every question.
- •Do not use Markdown ordered-list syntax (
Workflow
- •Resolve repo root and load
{repo_root}/.gitkkal/config.json.
- •If missing, use defaults:
language=en,branchPattern=type/description.
- •Handle user argument.
- •If a branch description argument is provided, use it directly and skip diff analysis.
- •If no argument, inspect current changes.
- •Run
git status --short,git diff, andgit diff --cached. - •If there are no changes, ask the user for a short branch description.
- •Infer semantic intent from actual diff content.
- •Focus on why the change exists, not file counts.
- •If intent is unclear, ask for clarification instead of guessing.
- •Select branch type.
- •Use one of these numbered options:
- •
feat - •
fix - •
refactor - •
docs - •
test - •
style - •
chore - •
perf - •
ci
- •
- •Build branch slug.
- •Require English lowercase kebab-case only.
- •Allow only
[a-z0-9-]. - •Limit length to 50 chars.
- •If the user gives non-English text, ask for an English description.
- •Apply naming format.
- •
type/description:{type}/{slug} - •
description-only:{slug}
- •Confirm branch name with user and allow custom override.
- •Create the branch with
git checkout -b <branch_name>.
Guardrails
- •Never include spaces, uppercase, or special characters except
-. - •Never exceed 50 characters in the slug.
- •If the branch already exists, propose a safe alternative (for example suffix number).
- •If not a Git repo, stop and report clearly.