Thank you for contributing to Foundation! This document explains how to contribute improvements and maintain the shared processes.
- Keep it generic - Remove project-specific content
- Make it configurable - Use
foundation-config.yamlfor customization - Maintain backward compatibility - Don't break existing consumers
- Document everything - All changes need documentation
- Test thoroughly - Verify changes work across different repos
# Clone foundation repository
git clone <foundation-repo>
cd foundation
# Test changes in a consuming repository
cd ../test-project
git submodule add ../foundation foundation- Edit files in the foundation repository
- Test changes in a consuming repository
- Ensure configuration is flexible
# In a test repository
./foundation/scripts/validate-setup.sh
# Test specific components
./foundation/security/pre-commit-audit.sh
./foundation/development/worktree-setup.sh test-branch# In foundation repository
git add .
git commit -m "Add: description of changes"
git push origin main- Create new files in appropriate directory
- Add configuration options to
foundation-config.yaml - Update README.md with new component
- Add integration scripts if needed
Example: Adding a new security check
# Create new security check
vim foundation/security/new-check.sh
chmod +x foundation/security/new-check.sh
# Add configuration
vim foundation/config/foundation-config.yaml
# security:
# new_check:
# enabled: false
# Document
vim foundation/security/README.md
# Test
./foundation/security/new-check.sh- Identify improvement area
- Make changes
- Test in consuming repositories
- Update documentation
- Create issue describing bug
- Fix bug in foundation
- Test fix in consuming repositories
- Reference issue in commit message
- Use
#!/bin/bashshebang - Use
set -efor error handling - Add help text with
-hflag - Use colors for output (see existing scripts)
- Make scripts executable:
chmod +x
- Follow documentation standards in
conventions/documentation-standards.md - Use clear, directive language
- Include examples
- Update README.md when adding new components
- Add new options to
foundation-config.yaml - Provide sensible defaults
- Document all options with comments
- Test with options enabled/disabled
Before submitting changes:
- Changes work in at least 2 different repositories
- Configuration is flexible and documented
- No project-specific content included
- Scripts are executable and have help text
- Documentation is updated
- Backward compatibility maintained
-
validate-setup.shpasses - Security checks still work
- Self-review - Check your own changes thoroughly
- Test in multiple repos - Verify works across different projects
- Update docs - Ensure documentation is current
- Get feedback - Share with team/community if applicable
If you need to make breaking changes:
- Document the breaking change
- Provide migration guide
- Update MIGRATION.md
- Increment major version
- Notify consuming repositories
To add support for a new language:
- Add language section to
conventions/code-conventions.md - Add naming patterns to
conventions/naming-patterns.yaml - Add configuration to
foundation-config.yaml - Add examples
When changing configuration:
- Update
foundation-config.yamltemplate - Update all repo adapters
- Document new options
- Provide backward-compatible defaults
- Test before committing - Always test in consuming repos
- Keep changes focused - One improvement per commit
- Write clear commit messages - Explain why, not just what
- Update documentation - Keep docs in sync with code
- Consider backward compatibility - Don't break existing users
If you have questions about contributing:
- Check existing documentation
- Review similar components in foundation
- Ask in foundation repository issues/discussions
By contributing to Foundation, you agree that your contributions will be licensed under the same license as the project.