Please automatically create checkpoints:
- Before major refactoring or risky changes
- After achieving stable progress
- When trying experimental approaches
- Create checkpoints with descriptions
- List all checkpoints
- Restore previous states
- Track development history
Note: Checkpoints are separate from git commits - use checkpoints for experiments, git for permanent history.
We use GitHub issues to track work and PRs to review code. Tag Alex-created issues/PRs with by-alex. Use the gh bash command to interact with GitHub.
Pre-check: Git Initialization
- First, verify if Git is initialized:
git status - If not a Git repository (error message appears):
- Initialize Git:
git init - Add remote if known:
git remote add origin <repository-url> - Configure Git user if needed:
git config user.name "Your Name" git config user.email "your.email@example.com"
- Initialize Git:
- If Git is already initialized, proceed to next steps
Main Setup Steps
- Read the relevant GitHub issue (or create one)
- Checkout
mainand pull latest changes:git checkout main && git pull origin main - Create a new branch:
alex/feature-name - CRITICAL: Never commit or push directly to
main - If working on
main, always create a feature branch first
- Alex should commit early and often with clear messages
- Alex should create commits when:
- A feature is functionally complete
- A bug fix is implemented
- Significant progress is made
- Before switching to a different task
- Commit messages should be descriptive (e.g., "Add reverb parameter controls to audio engine")
- After committing to feature branches, push to origin:
git push origin branch-name - Branch Protection:
- If on
mainbranch: Create a feature branch before any commits - Never commit directly to
main - If accidentally on
mainwith uncommitted changes: Stop and ask for guidance
- If on
- Ask me to test in the app as needed
- Before any commit, Alex must check current branch:
git branch --show-current - If on main branch:
- DO NOT commit
- Create a feature branch:
git checkout -b alex/feature-description - Then proceed with commits
- If on feature branch: Commit and push freely
- If unsure: Ask user before proceeding
- Run
git diff mainto review changes - Push the branch to GitHub
- Open a PR with:
- A short title (no issue number)
- A body starting with the issue number and a description of the changes
- A test plan covering:
- New functionality
- Any existing behavior that might have changed
- Alex will:
- Generate a test plan based on the issue and changes (if not already provided)
- Execute available tests (when running locally or with CLI access)
- Report test results as a comment or PR review, including:
- Which tests were run
- Any failures or regressions detected
- Confirmation of success where appropriate
When asked to look at old commits:
- NEVER use
git checkout <commit-hash>- this detaches HEAD - Instead use:
git show <commit>:path/to/file- to read a file from that commitgit diff <commit> -- path/to/file- to compare with current versiongit log -p <commit> -1- to see what changed in that commit
If accidentally in detached HEAD state:
- Check with
git status - Discard changes:
git checkout -- . - Return to branch:
git checkout <branch-name>
- Use
rebaseorcherry-pickto reconcile branches—never merge tomain
- Your job is to write code in response to feature requests or bug reports
- After fixing a bug or completing a feature, generate and execute a test plan, then summarize the results
- If I paste a GitHub issue or pull request URL, fetch and read the content first
- You may:
- Propose a new branch (e.g.,
alex/fix-xyz) - Summarize the issue or propose a plan
- Provide code suggestions directly in PR comments
- Suggest or generate additional tests if coverage seems incomplete
- Propose a new branch (e.g.,
- Include test coverage information in your PR summary (e.g., passed tests, edge cases handled, known limitations)
- You do not have full context—ask before making assumptions
- If tests cannot be run (e.g., GUI dependency), clearly explain what was attempted and which tests were skipped