This document describes how we create commits. The /commit command automates this workflow.
Before committing:
- All tests pass (
./test.sh) - Code review is complete (
/code-review) - No blocking issues remain
We use Jujutsu (jj), not git. Key differences:
- Working copy is always a commit (no staging area)
- Use
jj committo finalize and start a new change - Use
jj statusandjj diffto see current state
<summary line>
<optional body>
<optional footer>
- Use imperative mood ("Add feature" not "Added feature")
- Keep to 50 characters or less (hard limit: 72)
- Capitalize first letter
- No period at the end
Good: Add modulo operator
Bad: Added the modulo operator.
- Separate from summary with blank line
- Wrap at 72 characters
- Explain what and why, not how (code shows how)
- Provide context for future readers
- Reference Linear issues:
Fixes RUE-42orRelated to RUE-42 - Multiple issues on separate lines
Simple change:
Fix off-by-one error in bounds checking
With context:
Add modulo operator (%)
Implements the modulo operator for integer types. The operator
follows Rust semantics: the result has the same sign as the
dividend (truncated division).
Fixes RUE-42
Multi-issue:
Refactor type checking for binary operators
Consolidates duplicate type-checking logic for arithmetic,
comparison, and bitwise operators into a shared helper function.
This prepares for adding new operators without code duplication.
Related to RUE-45
Related to RUE-46
jj commit -m "<message>"For multi-line messages, use your editor:
jj commitIf this commit completes a Linear issue, mark it Done after committing: use the Linear MCP save_issue tool with state "Done". Linear state isn't stored in the repo, so the commit message reference (Fixes RUE-NN) is what links the two.
After committing, the working copy becomes a new empty change. You can verify with:
jj log -r @- # See the commit you just made
jj status # Should show clean working copy- File lists: The VCS shows what changed
- Obvious descriptions: "Update foo.rs" adds no value
- WIP markers: Don't commit work-in-progress
- Temporary changes: Debug prints, commented code
Each commit should:
- Be complete: Tests pass, feature works (or is properly gated)
- Be focused: One logical change per commit
- Be reviewable: Someone can understand it in isolation
If you have multiple unrelated changes, make multiple commits.
When committing partial work on a large feature:
- Tests may be added with
preview = "..."flag - Stable tests must still pass
- Commit message should note the phase: "Add parsing for inout parameters (phase 1)"
When removing a preview gate:
Stabilize modulo operator
Remove preview gate and mark feature as stable. All tests pass
without the preview flag.
Closes RUE-42 (epic)
When updating documentation without code:
Document array indexing semantics
Add specification paragraphs for array bounds checking behavior
and update spec tests with traceability references.