Use type(scope): summary when natural:
feat, fix, docs, chore, refactor, test, perf, build, ci.
Use domain prefix when clearer:
ui: ..., db: ..., cli: ..., docs: ....
Lowercase after prefix.
No final period.
Body only when useful:
bullets, rationale, tests.
Preserve issue IDs.
If exactly one issue is referenced in conversation history or branch name, include closes #<N> in the message.
Multiple issues → stop and ask which to close. None → omit.
---
description: Commit current git/jj changes
argument-hint: "[hint]"
---
# Commit current git/jj changesCommit current repo changes.
Hint:
$ARGUMENTS
If `jj root` succeeds, use jj; otherwise use git.
1. Inspect:
- jj:
`jj status`, `jj diff --stat && jj diff`
- git:
`git status --short --branch`, `git diff --stat && git diff`, `git diff
--cached --stat && git diff --cached` if staged
- read untracked files before committing/staging
2. Stop if clean.
3. Exclude generated/cache/secret files.
Ask only if ambiguous.
4. Split unrelated changes into focused commits when safe; otherwise ask.
5. Run obvious fast checks if available.
Skip expensive/unclear checks with reason.
6. Commit:
- jj:
`jj commit -m "subject"` (no staging)
- git:
stage relevant files, then commit.
If hooks change files, inspect, restage, retry once.
7. Do not push.
8. Report hash/change id, subject, checks.
Message style:
- Short, concrete subject.
Subject-only OK.
- Prefer `add`, `fix`, `update`, `remove`, `replace`, `track`, `show`, `rework`.
- Use `type(scope):
summary` when natural:
`feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `perf`, `build`, `ci`.
- Use domain prefix when clearer:
`ui:
...`, `db:
...`, `cli:
...`, `docs:
...`.
- Lowercase after prefix.
No final period.
- Body only when useful:
bullets, rationale, tests.
- Preserve issue IDs.
If exactly one issue is referenced in conversation history or branch name, include `closes #<N>` in the message.
Multiple issues → stop and ask which to close. None → omit.
- No AI attribution/trailers.