// TL;DR
Commit at milestones and at session end — never per file. Send a Telegram message to the owner when a phase is done, the build passes after major changes, a bug is fixed, or the session ends with uncommitted changes. Maximum one message per logical milestone.
When to commit
- When a bounded task is complete (a feature, a bug fix, a refactor).
- Before starting a new larger task (clean slate).
- Always at session end if there are uncommitted changes.
Never commit per file or per line. A commit should be a logical unit that can be reverted meaningfully.
Commit format
# Type prefix: feat / fix / chore / docs / refactor / test git add -A git commit -m "<type>: <description max 72 chars> – Claude"
Examples:
feat: Add anti-sniping to auctions – Claudefix: Correct tenant-id in JWT payload – Claudechore: Bump Pomelo to 8.0.2 – Claude
Skip if not a repo
Always check whether the directory is a git repo before trying to commit — otherwise the command fails unnecessarily.
# Skip if no repo git rev-parse --git-dir 2>/dev/null || exit 0 git add -A git commit -m "chore: ..."
Telegram notifications
Send a Telegram message to the owner when one of these is true:
- A bounded feature or phase is done.
- The build passes after major changes.
- A bug has been fixed and verified.
- The session ends with uncommitted changes (so the owner knows to look).
Use the internal CLI:
"E:\DRIFT\Custom_CLI\codewire-telegram.exe" send \ --chat-id <chat-id> \ --body "[$(basename $PWD)] <short milestone description>"
// Chat ID is kept out of the wiki
The actual chat ID isn't public info and belongs in the local CLAUDE.md or a private config. The wiki documents only the pattern — the key itself is owner-specific.
The rules for notifications
- Maximum one message per logical milestone — not per file, not per commit.
- Don't send for routine checks like "running tests", "reading documentation", "checking config".
- Don't send for intermediate steps in a longer task.
- Always include project folder and concrete status — make the message worth reading on a phone.
Examples of good notifications
# Good "[CODEWIRE-CLI] Phase 2 done — build green, all tests passing" "[restparti] Anti-sniping bug fixed after MySQL migration" "[foreningsliv] Stripe LIVE prices created, deploy ready" # Too much noise — DO NOT send "Fixed typo in README" "Checking Hangfire configuration" "Reading DOCS/FEATURES.md"
What you never do
- Don't skip pre-commit hooks (
--no-verify) without explicit request. - Never force-push to main/master.
- Never change git config.
- Don't use
git rebase -ior other interactive commands that open an editor.