Thanks for contributing. This document is the source of truth for commits,
pull requests, and issue tracking. Coding conventions live in AGENTS.md —
read that before writing code. Agents must follow the rules below; do not
substitute a personal or skill-only convention when this file conflicts.
- Bun v1.2 or newer (
package.jsonengines)
git clone https://github.com/corbitsdev/corbits-code.git
cd corbits-code
bun installBefore your first commit, point Git at the project hooks and verify the environment:
git config core.hooksPath .githooks
./bin/check-envbun run typecheck
bun run build
bun run testThese match the CI workflow in .github/workflows/ci.yml. Run the full suite
before opening a PR. Do not substitute a bare bun test (it also scans
vendor/ and pollutes pass/fail counts).
- Imperative, present tense, max 72 characters
- Starts with a verb:
Add,Fix,Remove,Harden,Document, … - No trailing punctuation, no abbreviations for their own sake
- No filenames or paths in the subject — the diff already lists them
- Match the voice of recent history:
git log origin/main --format='%s' | head -20Banned subject prefixes (all of them, including habits from other projects):
- Conventional Commits:
feat:,fix:,chore:,docs:,refactor:,test:,ci:,perf:,style:,build: - Scoped forms:
docs(changelog):,net:,frontend: - Ticket IDs:
CL-1234:,INTR-79:,#456: - Status tags:
WIP:,[urgent],(security):
Good:
Add retry logic for failed network requests
Fix race condition in transaction verification
Document the permission queue behavior
Bad:
feat: add retry logic
fix(auth): race in server.ts
CL-5494: flatten model picker
Update code
Conventional Commits are useful when tools generate changelogs, SemVer bumps, or release notes from commit types. This project does not:
- Release notes are hand-written in
CHANGELOG.mdand deliberately strip ticket and PR IDs from public notes. - Reviewers and
git logreaders need a sentence that stands alone years later, not a taxonomy debate (chorevsrefactorvsfix). - An imperative subject already encodes the action:
Fix race in the approval queueis clearer thanfix: race in the approval queue. - Prefixes train agents and humans to smuggle scope, ticket IDs, and file names into the subject — noise we already reject elsewhere.
The Git and Go projects use the same plain-English model. Familiarity with Angular-style prefixes is not a reason to adopt them here.
Most commits need no body. A clear subject plus a coherent diff is enough.
Add a body only when a future reader of git log could not answer why this
change from the subject and the diff alone. When present:
- Blank line between subject and body
- Wrap body lines at 72 characters
- Motivation only: why this change, why now, why not the obvious alternative
- Do not walk the diff file-by-file
- Do not reference PR review threads, chat, or "the next commit"
- Do not put Linear or GitHub issue IDs in the subject or body — linking is a pull-request concern (see Issue tracking)
Write for a stranger reading git log years from now with only the repo in
hand, not for the person reviewing this PR today.
- One logical unit of work per commit
- Separate refactors from feature additions
- Separate formatting/whitespace from behavioral changes
- Commit with the operator's local git identity (never invent author metadata)
- One concern per PR. See scope discipline in
AGENTS.md. - Include or update tests for behavior changes. Bug fixes start with a failing test that reproduces the bug — do not start by patching.
- Do not commit secrets, credentials, or generated noise.
- Draft title and body from the current diff, not from memory of the work:
git diff origin/main...HEAD
git log origin/main..HEAD --format='%s'Same rules as commit titles: imperative present-tense sentence, no prefixes, no ticket IDs, no trailing punctuation. The title describes the whole branch, not a single commit.
Only these sections. Present tense — what the branch does, not the journey of writing it.
## Summary
- <what the code does now>
- <optional second or third bullet>
## Verification
- `bun run typecheck`, `bun run build`, and `bun run test` pass
- <any manual or product check that is true on this branch>
Fixes CL-1234Rules:
## Summaryand## Verificationare required. Do not add## Changes,## Context,## Notes, or review-fleet diaries — the diff is the change list; review discussion belongs on the PR review, not in the description.- Optional short Why paragraph is allowed only when Summary would look arbitrary without motivation. Keep it to a few sentences, present tense, under the Summary section (not a separate heading).
- Scan for past-tense journey verbs (
was,added,fixed,refactored,I changed) and rewrite to present-tense product statements. - When the work tracks an issue, end the body with a magic-word link (see below). When it does not, omit the link line entirely — do not invent IDs.
GitHub auto-fills this shape from .github/PULL_REQUEST_TEMPLATE.md.
Link trackers at the PR boundary, not inside every commit.
-
Branch name — use the issue's Linear
gitBranchName(Copy git branch name /Cmd/Ctrl+Shift+.). Branch names that include the issue ID are Linear's preferred auto-link path. -
PR body — include a closing magic word and the issue ID so merge automation can complete the issue:
Fixes CL-1234Full Linear URLs also work. Prefer the body over stuffing the ID into the PR title so the title stays a plain-English sentence.
-
Do not put
CL-…in commit subjects or bodies.
Closing magic words (issue moves to Done on merge when automation is
configured): close, closes, fix, fixes, resolve, resolves,
complete, completes, implement, implements (and tense variants).
Non-closing (link only; do not auto-complete): ref, refs, related to,
relates to, part of, contributes to, toward, towards.
Use non-closing words for partial work or multi-issue branches. Only issues this PR fully completes get a closing word.
To deliberately not link an issue whose ID appears in the branch name:
skip CL-1234
(or ignore CL-1234).
Same pattern in the PR body:
Fixes #123
Omit magic words. Do not invent issue IDs.
- Confirm the PR is merged and CI is green on the merge commit.
- Comment the PR URL and merge SHA on the Linear issue.
- Tick only description checkboxes that
mainactually completed. - Mark the Linear issue Done only when every outcome is truly done — never on "PR opened" alone.
All contributions require acceptance of the Contributor License Agreement in
CLA.md. The CLA grants ABK Labs, Inc. rights needed to distribute
contributions under the project license and alternative terms.
CLA Assistant enforces this on pull requests (see .github/workflows/cla.yml).
Sign once by posting a PR comment with exactly:
I have read the CLA Document and I hereby sign the CLA
Signatures are stored on the cla-signatures branch and do not touch main.
docs/ARCHITECTURE.md— reactor loop, events, directors, permissionsdocs/IMPLEMENTATION.md— runtime, config, CLI, statedocs/PRODUCT.md— product goalsdocs/TUI.md— terminal UI behaviorAGENTS.md— coding conventions agents and contributors share
Open a GitHub issue for design discussion or bugs that are not
security-sensitive. For security reports, see SECURITY.md.