CPN Org Commit
Conventional commits in cloud-pi-native/console, honoring the enforced
commitlint config that drives release-please and the PR-title rule (cpn-pr).
Does NOT push, open PRs, or run CI — those live in cpn-pr /
cpn-dev-workflow.
Prerequisites
- Working tree in
cloud-pi-native/console. - Husky
commit-msghook runspnpx commitlint --edit ${1}(.husky/commit-msg), enforcingcommitlint.config.cjs. - That config extends
@commitlint/config-conventionaland adds'body-leading-blank': [2, 'always']— an empty line MUST follow the subject even when there is no body.
Commit shape
| Rule | Value |
|---|---|
| Types | feat, fix, chore, docs, refactor, revert, build (feature also recognized) |
| Scope | optional, type(scope): |
| Breaking | type!: / type(scope)!: (MAJOR bump) |
| Subject | imperative, lowercase start, no trailing period |
| Body | optional, separated from subject by exactly one blank line |
| Footer | optional BREAKING CHANGE: (no Closes #N — close deliberately) |
Reference safety:
#Nin a commit body resolves to a console issue/PR andCloses/Fixes/Resolvesauto-close it on merge. Bare#Nis only safe for a console ticket; cross-repo refs use a full URL orowner/repo#N.
Procedure
- Stage:
jj add <files>. - Commit through
jj commit -mwith-mblocks (the blank line between blocks satisfiesbody-leading-blank):
# short (no body) — keep the trailing blank line in the heredoc
jj commit -m "$(cat <<'EOF'
fix: prevent null group lookup in Keycloak sync
EOF
)"
# with body
jj commit -m "$(cat <<'EOF'
feat(plugins): add vault secret rotation
Supports monthly rotation via the hook post step.
Refs #123
EOF
)"
- Agent attribution ALWAYS (operator instruction), as a second
-mblock:
jj describe -m "fix: prevent null group lookup in Keycloak sync" \
-m "Co-authored-by: Automata <automata@shikanime.studio>"
- Confirm:
jj log -1 --pretty=%B.
Pitfalls
Optional edge cases and gotchas — load references/pitfalls.md on demand.
Verification
jj log -1 --pretty=%B && jj status --short
See also
cpn-pr— open the PR (title matches conventional subject).cpn-dev-workflow— the local dev loop this feeds into.