Ship Changes
Safely commit and push changes with proper validation and documentation updates.
Pre-flight Checks
- •
Run Tests
bashnpm test
- •If tests fail, STOP and report the failure
- •Do not proceed unless all tests pass
- •
Check Git Status
bashgit status
- •Review staged and unstaged changes
- •Identify which files need to be committed
Update Documentation
Update CHANGELOG.md
- •Read current CHANGELOG.md
- •Ask user to describe the changes made
- •Categorize changes:
- •Added: New features
- •Changed: Changes to existing functionality
- •Deprecated: Soon-to-be removed features
- •Removed: Removed features
- •Fixed: Bug fixes
- •Security: Security improvements
- •Add entries under
[Unreleased]section - •Format:
- Brief description of change
Update docs/TODO.md
- •Read current docs/TODO.md
- •Ask user which tasks were completed
- •Move completed tasks from their current section to the
## Donesection - •Add completion date:
- [x] Task description - YYYY-MM-DD
Stage Changes
IMPORTANT: Stage files by name, NEVER use git add . or git add -A
- •Review files to commit (from git status)
- •Exclude any sensitive files:
- •
*.pem - •
.env - •
*.key - •Credentials or secrets
- •
- •Stage each file explicitly:
bash
git add file1.ts file2.ts CHANGELOG.md docs/TODO.md
Generate Commit Message
Use Conventional Commits format:
code
<type>: <short description> <optional body> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Types:
- •
feat: New feature - •
fix: Bug fix - •
docs: Documentation - •
refactor: Code refactoring - •
test: Tests - •
chore: Build, dependencies
Example:
code
feat: add user authentication Implemented JWT-based authentication with login and registration endpoints. Updated API to require auth tokens for protected routes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- •Analyze the staged changes
- •Review recent commits:
git log --oneline -5 - •Draft appropriate commit message
- •Show message to user for approval
Commit and Push
- •
Commit:
bashgit commit -m "$(cat <<'EOF' feat: your commit message here Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> EOF )"
- •
Push:
bashgit push
- •If push fails, report the error
- •Common issues: need to pull first, no upstream branch
- •
Verify:
bashgit status
- •Confirm push succeeded
Summary
After successful ship:
- •Tests passed ✓
- •CHANGELOG.md updated ✓
- •docs/TODO.md updated ✓
- •Changes committed ✓
- •Changes pushed ✓
Report to user: commit SHA and files changed.
Error Handling
- •Tests fail: Report failures, do not commit
- •Sensitive files detected: Warn user, exclude from staging
- •Push fails: Provide git output and suggest fixes
- •Pre-commit hook fails: Fix issues, create NEW commit (do not amend)