Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4.9 KiB
Executable File
Framework Upstream Synchronization
This document explains how to keep your RSpade project synchronized with framework updates.
Overview
When you create a new project from the RSpade framework template, you get your own Git repository for your project-specific code. However, you'll also want to pull in framework updates and improvements over time. This is managed through Git's upstream remote functionality.
Initial Setup
When starting a new project from this template:
- Clone/fork this template to create your project repository
- Change the origin to your project's repository:
git remote set-url origin git@your-server:your-project.git - Setup framework upstream:
bin/framework-upstream setup
This configures ssh://git@192.168.0.3:3322/brianhansonxyz/rspade-publish.git as the framework-upstream remote.
Workflow
Check for Updates
Check if framework updates are available:
bin/framework-upstream status
This shows:
- Whether you're up to date with the framework
- How many commits ahead/behind you are
- If your project has diverged from the framework
Pull Framework Updates
To merge framework updates into your project:
bin/framework-upstream pull
This will:
- Fetch the latest framework changes
- Attempt to merge them into your current branch
- Report any conflicts that need manual resolution
View Framework Changes
See recent framework commits:
bin/framework-upstream logs
View differences between your project and the framework:
bin/framework-upstream diff
Handling Conflicts
When pulling framework updates, you may encounter merge conflicts if you've modified framework files. This is normal and expected.
Common Conflict Areas
CLAUDE.md- If you've customized AI directivesconfig/files - If you've modified framework configuration.gitignore- If you've added project-specific ignores
Resolution Strategy
- Review the conflicts carefully
- Keep your project-specific changes where appropriate
- Accept framework improvements where they don't conflict with your customizations
- Test thoroughly after resolving conflicts
Conflict Commands
During a merge conflict:
# See which files have conflicts
git status
# After resolving conflicts in a file
git add <resolved-file>
# Complete the merge
git commit
# Or abort if needed
git merge --abort
Best Practices
1. Minimize Framework Modifications
- Work primarily in
/rsx/for your application code - Avoid modifying
/app/RSpade/framework files - Use configuration files for customization when possible
2. Regular Updates
- Check for updates weekly:
bin/framework-upstream status - Pull updates regularly to avoid large divergences
- Test thoroughly after each update
3. Document Customizations
If you must modify framework files:
- Document the changes in your project README
- Consider if the change should be contributed back to the framework
- Keep modifications minimal and well-commented
4. Commit Before Updating
Always commit your changes before pulling framework updates:
git add -A
git commit -m "Save work before framework update"
bin/framework-upstream pull
Framework Update Types
Patch Updates
- Bug fixes
- Security patches
- Documentation improvements
- Usually safe to pull immediately
Feature Updates
- New framework capabilities
- New helper functions
- Enhanced commands
- Review changes before pulling
Breaking Changes
- Rare but possible
- Will be documented in framework commits
- May require code changes in your project
Troubleshooting
"Not in a git repository"
Ensure you're in your project root directory
"Upstream not configured"
Run: bin/framework-upstream setup
"You have uncommitted changes"
Commit or stash your changes before pulling:
git add -A && git commit -m "WIP"
# or
git stash
Merge conflicts persist
Consider:
- Understanding what changed in the framework
- Reviewing your local modifications
- Potentially refactoring to reduce conflicts
Manual Git Commands
The bin/framework-upstream script automates these Git commands:
# Add upstream remote manually
git remote add framework-upstream ssh://git@192.168.0.3:3322/brianhansonxyz/rspade-publish.git
# Fetch updates
git fetch framework-upstream
# Merge updates
git merge framework-upstream/master
# Check status
git log HEAD..framework-upstream/master --oneline
Contributing Back
If you make improvements that would benefit all RSpade projects:
- Consider contributing them back to the framework
- Create a clean branch with just the framework improvements
- Submit a pull request to the framework repository
Support
For framework update issues:
- Check the framework repository for announcements
- Review recent commits for breaking changes
- Test in a development environment first