commit
/octopus:commit reads the staged diff, drafts a Conventional
Commits message (type(scope): description + body explaining
why), shows it for confirmation, and runs git commit once
approved. It handles the moves around the commit that are easy
to forget: detecting the language to write in, picking the right
type, appending AI co-authored trailers, and refusing
--no-verify.
Why this exists
Section titled “Why this exists”Conventional Commits is a small format with outsized impact — the release flow reads commit types to suggest semver bumps, the PR title is derived from the dominant type on the branch, and the CHANGELOG groups entries by type emoji. A free-form message breaks all of that.
The cost of remembering the format manually is non-trivial in practice (especially mid-debug). Delegating to a command that reads the diff and proposes a message removes that friction without giving up the structure.
Language resolution
Section titled “Language resolution”The commit message language is not the same as the conversation language. The command resolves it in this order:
.octopus/rules/common/language.local.mdif present.octopus.ymllanguage.code:value- Detection from
git log --oneline -20— match the dominant language already in the project’s history - Default: English
This matters because the project may have a Portuguese-speaking team that documents in pt-BR but commits in English (a common pattern for open-source-leaning projects). The command separates the two channels deliberately.
AI co-authored trailers
Section titled “AI co-authored trailers”When the assistant generated or substantially modified the code, the command appends the corresponding trailer to the commit body:
Co-authored-by: claude <claude@anthropic.com>The human author stays the commit author; the assistant is the co-author. Trailers are not added for suggestion-only assistance.
Nothing is added for Octopus itself. Earlier versions appended an
octopus[bot] trailer to every message the command formatted,
which said nothing about who wrote the code — a hand-typed change
carried it just as a generated one did — while adding a phantom
contributor to git shortlog, the contributor graph and every
Co-authored-by query. Attribution is for authorship, not tooling.
What it refuses
Section titled “What it refuses”- Empty staging area without a clear instruction to stage
--no-verify— pre-commit hooks exist for a reason- Committing files that look like secrets (.env, credentials.json)
- Mixing multiple logical changes in one commit when the diff spans unrelated areas (proposes splitting instead)

