diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..23b2f03 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug Report +about: Report a bug or issue +title: '[BUG] ' +labels: bug +assignees: '' +--- + +## πŸ› Bug Description +A clear and concise description of what the bug is. + +## πŸ“‹ Steps to Reproduce +1. Go to '...' +2. Click on '...' +3. See error + +## βœ… Expected Behavior +What you expected to happen. + +## ❌ Actual Behavior +What actually happened. + +## πŸ–ΌοΈ Screenshots +If applicable, add screenshots to help explain your problem. + +## 🌍 Environment +- OS: [e.g. Windows, macOS, Linux] +- Version: [e.g. 1.0.0] +- Other relevant details + +## πŸ“ Additional Context +Add any other context about the problem here. + +## βœ”οΈ Before Submitting +- [ ] I've searched existing issues to avoid duplicates +- [ ] I've provided clear steps to reproduce +- [ ] I've included relevant environment details diff --git a/.github/ISSUE_TEMPLATE/cleanup_request.md b/.github/ISSUE_TEMPLATE/cleanup_request.md new file mode 100644 index 0000000..a4e3871 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/cleanup_request.md @@ -0,0 +1,39 @@ +--- +name: Cleanup Request +about: Report clutter, unused code, or organization issues +title: '[CLEANUP] ' +labels: cleanup, maintenance +assignees: '' +--- + +## 🧹 Cleanup Description +What needs to be cleaned up or reorganized? + +## πŸ“ Location +Where in the repository is the issue? +- Path: +- Files/directories affected: + +## πŸ” Issue Type +- [ ] Backup files (*.bak, *.old, etc.) +- [ ] Temporary files +- [ ] Unused/dead code +- [ ] Disorganized structure +- [ ] Outdated documentation +- [ ] Other (describe below) + +## πŸ’‘ Suggested Action +How should this be addressed? + +## πŸ“Š Impact +- [ ] Low - Minor cleanup +- [ ] Medium - Affects repository organization +- [ ] High - Significant clutter or disorganization + +## πŸ“ Additional Details +Any other information about the cleanup needed. + +## βœ”οΈ Before Submitting +- [ ] I've verified this is actually clutter/needs cleanup +- [ ] I've provided specific location information +- [ ] I've suggested how to address it diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..e785cb9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,30 @@ +--- +name: Feature Request +about: Suggest a new feature or enhancement +title: '[FEATURE] ' +labels: enhancement +assignees: '' +--- + +## πŸš€ Feature Description +A clear and concise description of the feature you'd like to see. + +## 🎯 Problem/Motivation +What problem does this feature solve? Why is it needed? + +## πŸ’‘ Proposed Solution +How would you like this feature to work? + +## πŸ”„ Alternatives Considered +Have you considered any alternative solutions or features? + +## πŸ“Š Impact +Who will benefit from this feature? How will it improve the project? + +## πŸ“ Additional Context +Add any other context, mockups, or examples about the feature request. + +## βœ”οΈ Before Submitting +- [ ] I've searched existing issues to avoid duplicates +- [ ] This feature aligns with the project's goals +- [ ] I've clearly described the problem and solution diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..448438a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,95 @@ +## πŸ“‹ Pull Request Description + +### What does this PR do? + + +### Why is this change needed? + + +### Related Issues + + +## πŸ§ͺ Testing + +### How has this been tested? + +- [ ] Unit tests added/updated +- [ ] Integration tests added/updated +- [ ] Manual testing completed +- [ ] All tests pass + +### Test Coverage + + +## 🧹 Cleanliness Checklist + +**CRITICAL**: Ensure your PR maintains repository cleanliness standards + +- [ ] **No backup files** (*.bak, *.old, *.backup, etc.) +- [ ] **No temporary files** (*.tmp, temp/, tmp/) +- [ ] **No commented-out code** (delete, don't comment) +- [ ] **No debug statements** (console.log, print, etc.) +- [ ] **No unused imports** or variables +- [ ] **No personal IDE configs** (.vscode/, .idea/, etc.) +- [ ] **No build artifacts** (dist/, build/, compiled files) +- [ ] **No sensitive data** (keys, tokens, passwords) +- [ ] **All files in correct directories** (src/, tests/, docs/, etc.) + +## πŸ“ Code Quality Checklist + +- [ ] Code follows project style guidelines +- [ ] Functions/methods are documented +- [ ] Complex logic has explanatory comments +- [ ] Error handling is appropriate +- [ ] Code is DRY (Don't Repeat Yourself) + +## πŸ“š Documentation + +- [ ] README updated (if needed) +- [ ] Documentation added/updated for new features +- [ ] Examples added/updated (if applicable) +- [ ] CHANGELOG updated (if applicable) + +## πŸ” Review Checklist + +Before requesting review, ensure: + +- [ ] Self-reviewed all changes +- [ ] Commit messages are clear and descriptive +- [ ] Branch is up to date with main +- [ ] No merge conflicts +- [ ] CI/CD checks pass (if applicable) + +## πŸ“Š Impact Assessment + +### Breaking Changes +- [ ] This PR includes breaking changes +- [ ] Migration guide provided (if breaking changes) + +### Performance Impact + + +### Security Considerations + + +## πŸ“Έ Screenshots/Recordings + + +## πŸ’¬ Additional Notes + + +--- + +## βœ… Final Confirmation + +By submitting this PR, I confirm that: + +- [ ] I have read and followed the [CONTRIBUTING.md](../CONTRIBUTING.md) guidelines +- [ ] I have read and accept the [CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) +- [ ] My code is clean, tested, and ready for review +- [ ] I have removed all clutter, backup, and temporary files +- [ ] This PR maintains the high standards of the ProSe repository + +--- + +**Ready for review!** πŸš€ diff --git a/.github/workflows/cleanliness-check.yml b/.github/workflows/cleanliness-check.yml new file mode 100644 index 0000000..22bef28 --- /dev/null +++ b/.github/workflows/cleanliness-check.yml @@ -0,0 +1,125 @@ +name: Repository Cleanliness Check + +on: + pull_request: + branches: [ main ] + push: + branches: [ main ] + workflow_dispatch: + +jobs: + cleanliness-check: + runs-on: ubuntu-latest + name: Check for Clutter and Repository Health + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check for backup files + run: | + echo "πŸ” Checking for backup files..." + BACKUP_FILES=$(find . -type f \( -name "*.bak" -o -name "*.old" -o -name "*.backup" -o -name "*~" \) ! -path "./.git/*" || true) + if [ -n "$BACKUP_FILES" ]; then + echo "❌ Found backup files:" + echo "$BACKUP_FILES" + exit 1 + else + echo "βœ… No backup files found" + fi + + - name: Check for temporary files + run: | + echo "πŸ” Checking for temporary files..." + TEMP_FILES=$(find . -type f \( -name "*.tmp" -o -name "*.temp" \) ! -path "./.git/*" || true) + if [ -n "$TEMP_FILES" ]; then + echo "❌ Found temporary files:" + echo "$TEMP_FILES" + exit 1 + else + echo "βœ… No temporary files found" + fi + + - name: Check for OS-generated files + run: | + echo "πŸ” Checking for OS-generated files..." + OS_FILES=$(find . -type f \( -name ".DS_Store" -o -name "Thumbs.db" -o -name "desktop.ini" \) ! -path "./.git/*" || true) + if [ -n "$OS_FILES" ]; then + echo "❌ Found OS-generated files:" + echo "$OS_FILES" + exit 1 + else + echo "βœ… No OS-generated files found" + fi + + - name: Check for IDE configuration files + run: | + echo "πŸ” Checking for IDE configuration directories..." + IDE_CONFIGS=$(find . -type d \( -name ".vscode" -o -name ".idea" \) ! -path "./.git/*" || true) + if [ -n "$IDE_CONFIGS" ]; then + echo "⚠️ Warning: Found IDE configuration directories:" + echo "$IDE_CONFIGS" + echo "These should typically be in .gitignore" + # Not failing on this, just warning + else + echo "βœ… No IDE configuration directories found" + fi + + - name: Check for backup directories + run: | + echo "πŸ” Checking for backup directories..." + BACKUP_DIRS=$(find . -type d \( -name "backup" -o -name "backups" -o -name "old" -o -name "_old" \) ! -path "./.git/*" || true) + if [ -n "$BACKUP_DIRS" ]; then + echo "❌ Found backup directories:" + echo "$BACKUP_DIRS" + exit 1 + else + echo "βœ… No backup directories found" + fi + + - name: Run repository health audit + run: | + echo "πŸ₯ Running repository health audit..." + chmod +x scripts/audit.sh + bash scripts/audit.sh || true + + - name: Check repository structure + run: | + echo "πŸ“ Checking repository structure..." + + # Check essential directories exist + for dir in "src" "tests" "docs" "examples" "scripts"; do + if [ -d "$dir" ]; then + echo "βœ… $dir/ exists" + else + echo "⚠️ Warning: $dir/ directory missing" + fi + done + + # Check essential files exist + for file in "README.md" ".gitignore" "CONTRIBUTING.md" "CODE_OF_CONDUCT.md"; do + if [ -f "$file" ]; then + echo "βœ… $file exists" + else + echo "❌ $file missing" + exit 1 + fi + done + + - name: Summary + run: | + echo "" + echo "=================================" + echo "βœ… Repository cleanliness check passed!" + echo "=================================" + echo "" + echo "This repository maintains high standards:" + echo " βœ“ No backup files" + echo " βœ“ No temporary files" + echo " βœ“ No OS-generated clutter" + echo " βœ“ Proper directory structure" + echo " βœ“ All essential files present" + echo "" + echo "Keep up the great work! πŸŽ‰" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..971ceb4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,167 @@ +# ProSe - Comprehensive .gitignore for clean repository management + +# ===== Backup Files ===== +# Prevent backup files from cluttering the repository +*.bak +*.backup +*.old +*.orig +*~ +.*.swp +.*.swo +*.backup.* +backup/ +backups/ +old/ +_old/ +.old/ + +# ===== OS Generated Files ===== +# macOS +.DS_Store +.AppleDouble +.LSOverride +._* +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ +*.lnk + +# Linux +.directory +.Trash-* + +# ===== Editor/IDE Files ===== +# VSCode +.vscode/ +*.code-workspace + +# JetBrains IDEs +.idea/ +*.iml +*.iws +*.ipr + +# Sublime Text +*.sublime-project +*.sublime-workspace + +# Vim +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Emacs +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc + +# ===== Build Artifacts ===== +# Compiled files +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc +*.pyo +__pycache__/ +*.py[cod] +*$py.class + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# ===== Dependencies ===== +# Node +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +package-lock.json +yarn.lock + +# Python +venv/ +env/ +ENV/ +.venv + +# ===== Logs ===== +*.log +logs/ +*.log.* + +# ===== Temporary Files ===== +tmp/ +temp/ +.tmp/ +.temp/ +*.tmp +*.temp + +# ===== Test Coverage ===== +.coverage +.coverage.* +htmlcov/ +.pytest_cache/ +.tox/ +coverage/ +*.cover + +# ===== Security ===== +# Never commit sensitive data +*.key +*.pem +*.p12 +*.cer +*.crt +*.der +.env +.env.* +!.env.example +secrets/ +credentials/ + +# ===== Documentation Build ===== +docs/_build/ +site/ +_site/ + +# ===== Misc ===== +.cache/ +*.pid +*.seed +*.pid.lock +.sass-cache/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..adfb470 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,106 @@ +# Code of Conduct - ProSe Repository Standards + +## Our Pledge + +We are committed to maintaining a professional, clean, and well-organized repository that serves as an example of best practices in software development. + +## Repository Standards + +### Cleanliness Standards + +1. **No Clutter**: The repository must remain free of: + - Backup files (*.bak, *.old, *.backup) + - Temporary files (*.tmp, temp/, tmp/) + - Unused code or commented-out blocks + - Old versions of files + - Experimental code that isn't production-ready + +2. **Organization**: All files must be in their proper locations: + - Source code in `src/` + - Tests in `tests/` + - Documentation in `docs/` + - Scripts in `scripts/` + - Examples in `examples/` + +3. **Quality Over Quantity**: + - Every line of code should have a purpose + - Remove dead code immediately + - Don't keep "just in case" files + - Use git history for old versions + +### Contribution Standards + +1. **Clean Commits**: + - Clear, descriptive commit messages + - Atomic commits (one logical change per commit) + - No commits containing backup or temp files + +2. **Code Quality**: + - Follow existing code style + - Include tests for new features + - Document public APIs + - Remove debug statements before committing + +3. **Pull Request Quality**: + - Self-review your code before submitting + - Ensure all tests pass + - Update documentation + - Clean commit history + +## Enforcement + +### Review Process + +All contributions will be reviewed for: +- βœ… Code quality and functionality +- βœ… Adherence to cleanliness standards +- βœ… Proper documentation +- βœ… Test coverage +- βœ… Absence of clutter files + +### Violations + +Contributions that violate these standards will be: +1. **First offense**: Requested to clean up and resubmit +2. **Repeated offenses**: May result in rejected PRs +3. **Severe violations**: Immediate rejection (e.g., committing sensitive data) + +## Maintenance Responsibilities + +### For Contributors +- Clean up your workspace before committing +- Use `.gitignore` appropriately +- Remove files you don't intend to commit +- Ask if unsure about including a file + +### For Maintainers +- Conduct thorough reviews +- Maintain .gitignore +- Keep documentation updated +- Perform periodic cleanup audits +- Lead by example + +## Periodic Cleanup + +The repository undergoes regular maintenance: +- **Weekly**: Review for stray files +- **Monthly**: Documentation updates +- **Quarterly**: Dependency updates +- **Annually**: Major refactoring if needed + +## Reporting Issues + +If you notice clutter or organization issues: +1. Create an issue with the `cleanup` label +2. Describe what needs attention +3. Suggest improvements if applicable + +## Attribution + +These standards exist to ensure ProSe remains a professional, maintainable repository that serves as a reliable foundation for integration with other projects. + +--- + +**Version**: 1.0 +**Last Updated**: November 2025 +**Maintainer**: ProSe Team diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f1b9f99 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,146 @@ +# Contributing to ProSe + +Thank you for contributing to ProSe! This document provides guidelines to keep our repository clean, organized, and maintainable. + +## 🎯 Repository Philosophy + +ProSe is designed to be a clean, well-organized main repository that receives contributions from other projects. We maintain strict standards to prevent clutter and ensure long-term maintainability. + +## πŸ“‹ Before You Contribute + +### What NOT to include in contributions: + +- ❌ **Backup files** (*.bak, *.old, *.backup, etc.) +- ❌ **Temporary files** (*.tmp, tmp/, temp/) +- ❌ **Unused/dead code** - Remove it completely rather than commenting it out +- ❌ **Old versions** - Use git history instead of keeping old files +- ❌ **Build artifacts** (dist/, build/, compiled files) +- ❌ **Dependencies** (node_modules/, venv/, etc.) +- ❌ **IDE configuration files** (.vscode/, .idea/, etc.) +- ❌ **Personal notes or TODO files** - Use issues/PR descriptions instead +- ❌ **Experimental code** - Create a branch for experiments, don't merge unfinished work + +### What TO include: + +- βœ… **Clean, production-ready code** +- βœ… **Relevant tests** for new functionality +- βœ… **Documentation** for new features +- βœ… **Updated README** if adding major features +- βœ… **Clear commit messages** describing what and why + +## πŸ”„ Contribution Workflow + +1. **Fork and Clone** the repository +2. **Create a feature branch** from `main` + ```bash + git checkout -b feature/your-feature-name + ``` +3. **Make your changes** following our guidelines +4. **Test your changes** thoroughly +5. **Clean up before committing**: + ```bash + # Remove any temporary or backup files + find . -name "*.bak" -delete + find . -name "*.tmp" -delete + find . -name "*~" -delete + ``` +6. **Commit with clear messages**: + ```bash + git add . + git commit -m "feat: add specific feature description" + ``` +7. **Push and create a Pull Request** + +## πŸ“ Pull Request Guidelines + +### PR Title Format +Use conventional commits format: +- `feat:` - New feature +- `fix:` - Bug fix +- `docs:` - Documentation changes +- `refactor:` - Code refactoring +- `test:` - Adding tests +- `chore:` - Maintenance tasks + +### PR Description Should Include: +- **What** changes were made +- **Why** these changes were necessary +- **How** to test the changes +- **Related issues** (if any) + +### Before Submitting PR: +- [ ] Code is clean and follows project style +- [ ] No backup, temporary, or unused files included +- [ ] All tests pass +- [ ] Documentation is updated +- [ ] Commit history is clean (squash if needed) +- [ ] No sensitive data (keys, passwords, tokens) + +## 🧹 Code Cleanup Checklist + +Before committing, ensure: + +1. **No commented-out code** - Delete it; git history preserves everything +2. **No debug print statements** - Remove console.logs, print()s used for debugging +3. **No unused imports** - Clean up import statements +4. **No duplicate code** - Refactor repeated logic +5. **No TODO comments** - Create issues instead +6. **Consistent formatting** - Use project's linter/formatter + +## πŸ—οΈ Project Structure + +Please maintain the following structure: + +``` +ProSe/ +β”œβ”€β”€ src/ # Source code +β”œβ”€β”€ tests/ # Test files +β”œβ”€β”€ docs/ # Documentation +β”œβ”€β”€ examples/ # Usage examples +β”œβ”€β”€ scripts/ # Utility scripts +└── README.md # Project overview +``` + +## πŸ” Code Review Process + +All contributions go through code review. Reviewers will check for: + +- Code quality and adherence to guidelines +- Absence of clutter (backups, temp files, etc.) +- Proper testing +- Clear documentation +- Clean commit history + +## 🚫 What Will Be Rejected + +PRs will be rejected if they: + +- Contain backup or temporary files +- Include large binary files without justification +- Have unclear/missing documentation +- Break existing functionality +- Don't follow contribution guidelines +- Contain sensitive data or credentials + +## πŸ’‘ Best Practices + +1. **Keep it simple** - Simple code is maintainable code +2. **Write tests** - Tests prevent future breakage +3. **Document as you go** - Don't leave documentation for later +4. **Commit often** - Small, focused commits are better +5. **Clean before pushing** - Review your changes before submitting +6. **Ask questions** - If unsure, create an issue to discuss + +## πŸ“ž Getting Help + +- Create an issue for questions +- Tag maintainers for urgent matters +- Check existing issues/PRs for similar topics + +## πŸ™ Thank You + +Your contributions help make ProSe better! By following these guidelines, you help maintain a clean, professional, and maintainable codebase. + +--- + +**Remember**: A clean repository is a happy repository! πŸŽ‰ diff --git a/QUICKSTART.md b/QUICKSTART.md new file mode 100644 index 0000000..efc2b01 --- /dev/null +++ b/QUICKSTART.md @@ -0,0 +1,231 @@ +# Quick Start Guide for Integrating Donor Repositories + +## 🎯 Overview + +This guide provides quick steps for when you're ready to integrate code from the 2 donor repositories into ProSe. + +## πŸ“‹ Pre-Integration Checklist + +Before starting integration: + +- [ ] Identify the URLs of both donor repositories +- [ ] Review what code/features need to be integrated +- [ ] Ensure you have access to both donor repositories +- [ ] Read [docs/INTEGRATION.md](docs/INTEGRATION.md) thoroughly +- [ ] Run `bash scripts/audit.sh` to ensure ProSe is clean + +## πŸš€ Quick Integration Steps + +### Option 1: Using Git Subtree (Recommended for ongoing sync) + +```bash +# For Donor Repository 1 +git remote add donor1 +git fetch donor1 +git subtree add --prefix=src/donor1 donor1 main --squash + +# For Donor Repository 2 +git remote add donor2 +git fetch donor2 +git subtree add --prefix=src/donor2 donor2 main --squash + +# Clean up immediately +bash scripts/cleanup.sh + +# Audit +bash scripts/audit.sh + +# Commit clean changes +git add . +git commit -m "feat: integrate code from donor repositories" +``` + +### Option 2: Manual Copy with Maximum Control (Recommended for messy repos) + +```bash +# Clone donor repos to temp location +git clone /tmp/donor1 +git clone /tmp/donor2 + +# Create integration branch +git checkout -b integrate/donor-repos + +# Copy source code +mkdir -p src/donor1 src/donor2 +cp -r /tmp/donor1/[source-dir]/* src/donor1/ +cp -r /tmp/donor2/[source-dir]/* src/donor2/ + +# Copy tests +mkdir -p tests/donor1 tests/donor2 +cp -r /tmp/donor1/[test-dir]/* tests/donor1/ +cp -r /tmp/donor2/[test-dir]/* tests/donor2/ + +# Copy documentation +cp -r /tmp/donor1/docs/* docs/donor1/ 2>/dev/null || true +cp -r /tmp/donor2/docs/* docs/donor2/ 2>/dev/null || true + +# Clean up immediately +bash scripts/cleanup.sh + +# Fix imports and paths (project-specific) +# Update configuration files +# Run tests + +# Audit +bash scripts/audit.sh + +# Document integration +# Create docs/integrations/donor1-YYYY-MM-DD.md +# Create docs/integrations/donor2-YYYY-MM-DD.md + +# Commit +git add . +git commit -m "feat: integrate code from donor repositories + +- Integrated donor1: [describe what was integrated] +- Integrated donor2: [describe what was integrated] +- Cleaned: removed backups, temp files, unused code +- Reorganized: placed code in proper directories +- Tested: [describe testing done] + +Source repositories: +- donor1: +- donor2: " + +# Push and create PR +git push origin integrate/donor-repos +``` + +## 🧹 Post-Integration Cleanup + +After integration, immediately: + +```bash +# 1. Find and remove any backup files +find . -name "*.bak" -delete +find . -name "*.old" -delete +find . -name "*~" -delete + +# 2. Find and remove temp files +find . -name "*.tmp" -delete +find . -name "*.temp" -delete + +# 3. Remove OS files +find . -name ".DS_Store" -delete +find . -name "Thumbs.db" -delete + +# 4. Remove empty directories +find . -type d -empty -delete + +# 5. Run comprehensive cleanup +bash scripts/cleanup.sh + +# 6. Verify health +bash scripts/audit.sh +``` + +## πŸ“ Documentation Checklist + +For each donor repository integrated, create a file in `docs/integrations/`: + +```bash +# Template filename +docs/integrations/donor-repo-name-2025-11-21.md +``` + +Include: +- What was integrated +- What was excluded (and why) +- Changes made during integration +- Source repository URL and commit/tag +- Testing performed +- Dependencies added + +See template in [docs/INTEGRATION.md](docs/INTEGRATION.md). + +## βœ… Verification Steps + +After integration: + +1. **Run Audit** + ```bash + bash scripts/audit.sh + ``` + +2. **Check Git Status** + ```bash + git status + ``` + +3. **Verify No Clutter** + ```bash + # Should return nothing + find . -name "*.bak" -o -name "*.old" -o -name "*.tmp" + ``` + +4. **Test Everything** + - Run all tests + - Build if applicable + - Manual testing of integrated features + +5. **Review Changes** + ```bash + git diff main + ``` + +6. **Create Clean PR** + - Use PR template + - Complete all checklists + - Request thorough review + +## πŸ†˜ Troubleshooting + +### Problem: Too many merge conflicts +**Solution**: Use manual copy method instead of git subtree + +### Problem: Donor repos are very messy +**Solution**: Use manual copy, then aggressive cleanup before committing + +### Problem: Not sure what to integrate +**Solution**: Start with core functionality only, add more later incrementally + +### Problem: Integration breaks tests +**Solution**: Fix imports, update paths, add missing dependencies + +### Problem: Large files being imported +**Solution**: Review if they're needed, add to .gitignore if appropriate + +## πŸ“ž Need Help? + +1. Review [docs/INTEGRATION.md](docs/INTEGRATION.md) for detailed guidance +2. Review [docs/MAINTENANCE.md](docs/MAINTENANCE.md) for maintenance procedures +3. Create an issue with the `integration` label +4. Ask maintainers for guidance + +## πŸŽ“ Best Practices + +- βœ… **Integrate incrementally** - Don't try to integrate everything at once +- βœ… **Clean as you go** - Don't leave cleanup for later +- βœ… **Test frequently** - Catch issues early +- βœ… **Document thoroughly** - Future you will thank you +- βœ… **Review carefully** - Manual review before committing +- ❌ **Don't rush** - Take time to do it right +- ❌ **Don't bulk copy** - Be selective about what to integrate +- ❌ **Don't skip testing** - Ensure everything works + +## 🎯 Success Criteria + +Integration is successful when: + +- [x] All desired functionality is integrated +- [x] No backup or temporary files present +- [x] All files in proper directories +- [x] Tests pass +- [x] Documentation updated +- [x] `bash scripts/audit.sh` returns EXCELLENT +- [x] Code review completed +- [x] PR merged + +--- + +**Remember**: Clean integration = Maintainable repository! πŸŽ‰ diff --git a/README.md b/README.md index eed3129..be041f8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,210 @@ # ProSe -the main module for Prose' litagints + +**The Main Module for ProSe Litigants** + +[![Code Quality](https://img.shields.io/badge/code%20quality-clean-brightgreen)]() +[![Maintenance](https://img.shields.io/badge/maintained-yes-green)]() +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)]() + +ProSe is a clean, well-organized main repository designed to receive and integrate contributions from multiple source repositories while maintaining the highest standards of code quality and organization. + +## 🎯 Project Goals + +- **Maintain Cleanliness**: Zero tolerance for backup files, temporary files, and clutter +- **Organized Structure**: Everything in its proper place +- **Quality Code**: No unused code, no commented-out blocks, no debug statements +- **Easy Integration**: Seamless integration from donor repositories +- **Long-term Maintainability**: Built to last without accumulating technical debt + +## πŸ“ Repository Structure + +``` +ProSe/ +β”œβ”€β”€ .github/ # GitHub templates and workflows +β”‚ β”œβ”€β”€ ISSUE_TEMPLATE/ # Issue templates (bug, feature, cleanup) +β”‚ └── PULL_REQUEST_TEMPLATE/ # PR template with cleanliness checklist +β”œβ”€β”€ docs/ # Documentation +β”‚ β”œβ”€β”€ INTEGRATION.md # Guide for integrating from donor repos +β”‚ └── MAINTENANCE.md # Repository maintenance guide +β”œβ”€β”€ examples/ # Usage examples (when available) +β”œβ”€β”€ scripts/ # Maintenance and utility scripts +β”‚ β”œβ”€β”€ cleanup.sh # Automated cleanup script +β”‚ └── audit.sh # Repository health audit +β”œβ”€β”€ src/ # Source code +β”œβ”€β”€ tests/ # Test files +β”œβ”€β”€ .gitignore # Comprehensive ignore patterns +β”œβ”€β”€ CODE_OF_CONDUCT.md # Repository standards +β”œβ”€β”€ CONTRIBUTING.md # Contribution guidelines +└── README.md # This file +``` + +## πŸš€ Getting Started + +### For Contributors + +1. **Read the Guidelines** + - [CONTRIBUTING.md](CONTRIBUTING.md) - How to contribute cleanly + - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - Repository standards + +2. **Fork and Clone** + ```bash + git clone https://github.com/cyserman/ProSe.git + cd ProSe + ``` + +3. **Make Your Changes** + - Follow the contribution guidelines + - Keep it clean (no backup files, no temp files) + - Test thoroughly + +4. **Submit a Pull Request** + - Use the PR template + - Ensure all checklist items are complete + +### For Maintainers + +1. **Regular Maintenance** + ```bash + # Run health audit + bash scripts/audit.sh + + # Run cleanup (interactive) + bash scripts/cleanup.sh + ``` + +2. **Integrating from Donor Repositories** + - See [docs/INTEGRATION.md](docs/INTEGRATION.md) for detailed guide + - Use git subtree, cherry-pick, or manual copy + - Always clean during integration + +## 🧹 Keeping It Clean + +### What's NOT Allowed + +- ❌ Backup files (*.bak, *.old, *.backup, *~) +- ❌ Temporary files (*.tmp, temp/, tmp/) +- ❌ Commented-out code +- ❌ Unused imports or functions +- ❌ Debug print statements +- ❌ IDE configuration files +- ❌ Build artifacts +- ❌ Personal notes or TODO files + +### Automated Checks + +Run these scripts before committing: + +```bash +# Check repository health +bash scripts/audit.sh + +# Clean up clutter (interactive) +bash scripts/cleanup.sh +``` + +### Manual Checks + +```bash +# Find backup files +find . -name "*.bak" -o -name "*.old" -o -name "*~" + +# Find temporary files +find . -name "*.tmp" -o -name "*.temp" + +# Check for uncommitted files +git status +``` + +## πŸ“š Documentation + +- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines with focus on cleanliness +- **[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)** - Repository standards and enforcement +- **[docs/MAINTENANCE.md](docs/MAINTENANCE.md)** - Maintenance schedule and procedures +- **[docs/INTEGRATION.md](docs/INTEGRATION.md)** - Integrating code from donor repositories + +## πŸ”§ Maintenance Scripts + +### audit.sh +Performs comprehensive health checks on the repository: +- Checks for clutter (backup, temp, OS files) +- Validates file organization +- Checks for large files +- Verifies essential files exist +- Reports overall repository health + +```bash +bash scripts/audit.sh +``` + +### cleanup.sh +Interactive cleanup script that helps identify and remove: +- Backup files +- Temporary files +- OS-generated files +- Empty directories +- IDE configuration files + +```bash +bash scripts/cleanup.sh +``` + +## 🀝 Contributing + +We welcome contributions! Please ensure your contributions: + +1. **Are Clean** - No backup, temp, or unnecessary files +2. **Are Tested** - Include tests for new features +3. **Are Documented** - Update docs as needed +4. **Follow Guidelines** - Read CONTRIBUTING.md first + +### Quick Contribution Checklist + +Before submitting a PR: + +- [ ] No backup files (*.bak, *.old, etc.) +- [ ] No temporary files (*.tmp, temp/) +- [ ] No commented-out code +- [ ] No debug statements +- [ ] All files in proper directories +- [ ] Tests pass +- [ ] Documentation updated +- [ ] Ran `bash scripts/audit.sh` successfully + +## πŸ“ž Support + +- **Issues**: Use GitHub Issues with appropriate labels +- **Questions**: Create an issue with the `question` label +- **Cleanup Requests**: Use the cleanup issue template + +## πŸ”„ Integrating from Donor Repositories + +This repository is designed to receive contributions from other repositories. See [docs/INTEGRATION.md](docs/INTEGRATION.md) for: + +- Integration methods (git subtree, cherry-pick, manual copy) +- Pre-integration cleanup checklist +- Step-by-step integration workflow +- Directory mapping guidelines +- Documentation requirements + +## πŸ“Š Repository Health + +Run `bash scripts/audit.sh` to check repository health at any time. + +Current standards: +- βœ… Zero backup files +- βœ… Zero temporary files +- βœ… Organized directory structure +- βœ… Comprehensive .gitignore +- βœ… Complete documentation + +## πŸ“œ License + +[Specify your license here] + +## πŸ™ Acknowledgments + +This repository integrates code from multiple sources while maintaining high standards of quality and organization. + +--- + +**Remember**: A clean repository is a maintainable repository! πŸŽ‰ diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md new file mode 100644 index 0000000..e0e2da3 --- /dev/null +++ b/docs/INTEGRATION.md @@ -0,0 +1,313 @@ +# Integrating Code from Donor Repositories + +## πŸ“š Overview + +This guide explains how to integrate code from other repositories (donor repos) into ProSe while maintaining cleanliness and organization. + +## 🎯 Integration Philosophy + +When receiving code from other repositories: +- βœ… **Extract value, not clutter** - Only bring over what's needed +- βœ… **Reorganize during integration** - Don't preserve poor organization +- βœ… **Clean as you integrate** - Fix issues during the move +- βœ… **Document the source** - Track where code came from +- ❌ **Don't bulk copy** - Avoid copying entire repos blindly + +## πŸ”„ Integration Methods + +### Method 1: Git Subtree (Recommended for ongoing sync) + +Best when you want to maintain connection to donor repos and receive updates. + +```bash +# Add donor repo as a remote +git remote add donor1 https://github.com/username/donor-repo-1.git +git fetch donor1 + +# Add as subtree to a specific directory +git subtree add --prefix=src/donor1 donor1 main --squash + +# Later, pull updates +git subtree pull --prefix=src/donor1 donor1 main --squash +``` + +### Method 2: Selective Cherry-Pick (Recommended for one-time imports) + +Best when you want specific commits or features without the history. + +```bash +# Add donor repo as remote +git remote add donor1 https://github.com/username/donor-repo-1.git +git fetch donor1 + +# Cherry-pick specific commits +git cherry-pick + +# Or cherry-pick a range +git cherry-pick .. +``` + +### Method 3: Manual Copy with Cleanup (Recommended for maximum control) + +Best when donor repos are messy and need significant reorganization. + +```bash +# Clone donor repo separately +git clone https://github.com/username/donor-repo-1.git /tmp/donor1 + +# Copy only what you need +cp -r /tmp/donor1/src/* ./src/donor1/ +cp -r /tmp/donor1/tests/* ./tests/donor1/ + +# Clean up immediately +bash scripts/cleanup.sh + +# Review and commit +git add . +git commit -m "feat: integrate functionality from donor-repo-1" +``` + +## 🧹 Pre-Integration Cleanup Checklist + +Before integrating code from donor repos, prepare it: + +### 1. **Assess What to Import** +- [ ] Identify valuable code/features +- [ ] List files/directories to skip +- [ ] Document purpose of each component +- [ ] Check for dependencies + +### 2. **Clean the Import** +- [ ] Remove backup files (*.bak, *.old) +- [ ] Remove temporary files (*.tmp, temp/) +- [ ] Remove commented-out code +- [ ] Remove debug statements +- [ ] Remove unused imports +- [ ] Remove personal configs + +### 3. **Reorganize for ProSe** +- [ ] Place source code in `src/` +- [ ] Place tests in `tests/` +- [ ] Place docs in `docs/` +- [ ] Update paths and imports +- [ ] Ensure naming consistency + +### 4. **Update Documentation** +- [ ] Document what was integrated +- [ ] Update README.md +- [ ] Add examples if needed +- [ ] Note any breaking changes + +## πŸ“‹ Integration Workflow + +### Step-by-Step Process + +1. **Create Integration Branch** + ```bash + git checkout -b integrate/donor-repo-name + ``` + +2. **Add Donor as Remote** (if using git methods) + ```bash + git remote add donor-name + git fetch donor-name + ``` + +3. **Import Code** (choose method above) + - Use subtree, cherry-pick, or manual copy + +4. **Clean Immediately** + ```bash + # Run cleanup script + bash scripts/cleanup.sh + + # Manual review + find . -name "*.bak" -delete + find . -name "*.tmp" -delete + find . -name "*~" -delete + ``` + +5. **Reorganize Files** + ```bash + # Move to proper locations + mv imported-src/* src/donor-name/ + mv imported-tests/* tests/donor-name/ + mv imported-docs/* docs/donor-name/ + ``` + +6. **Fix Imports and Paths** + - Update all import statements + - Fix file paths + - Update configuration files + +7. **Test Thoroughly** + ```bash + # Run all tests + # Build if applicable + # Manual testing + ``` + +8. **Document Integration** + - Create integration notes in `docs/integrations/` + - Update main README + - Document any changes needed + +9. **Run Quality Checks** + ```bash + bash scripts/audit.sh + ``` + +10. **Commit Clean Changes** + ```bash + git add . + git commit -m "feat: integrate from + + - Imported: + - Cleaned: + - Reorganized: + + Source: + Original commit: " + ``` + +11. **Create Pull Request** + - Use PR template + - Document integration thoroughly + - Request thorough review + +## πŸ—ΊοΈ Directory Mapping + +Map donor repo structure to ProSe structure: + +### Example Mapping + +``` +Donor Repo β†’ ProSe +───────────────────────────────────────────── +donor1/lib/ β†’ src/donor1/ +donor1/test/ β†’ tests/donor1/ +donor1/documentation/ β†’ docs/donor1/ +donor1/examples/ β†’ examples/donor1/ +donor1/scripts/utils/ β†’ scripts/donor1/ +``` + +### Consolidation Rules + +- **Similar functionality** β†’ Merge into existing directories +- **New modules** β†’ Create new organized structure +- **Utilities** β†’ Evaluate if needed, consolidate if possible +- **Tests** β†’ Keep separate by source initially + +## πŸ“ Documentation Requirements + +For each integration, create a file in `docs/integrations/`: + +```markdown +# Integration: [Donor Repo Name] + +**Date**: YYYY-MM-DD +**Integrated by**: @username +**Source**: [repo-url] +**Commit/Tag**: [commit-hash or tag] + +## What Was Integrated + +- Feature/module 1 +- Feature/module 2 +- ... + +## What Was NOT Integrated + +- Old backup files +- Experimental code +- Personal configurations +- ... + +## Changes Made + +- Reorganized [files] to [new location] +- Removed [deprecated code] +- Updated [imports/paths] +- ... + +## Migration Notes + +Any special notes for using the integrated code. + +## Dependencies Added + +List any new dependencies and why they're needed. + +## Testing + +How the integration was tested. +``` + +## 🚫 What NOT to Import + +Never import from donor repos: + +- ❌ Backup files (*.bak, *.old, etc.) +- ❌ Temporary files (*.tmp, temp/) +- ❌ IDE configurations (.vscode/, .idea/) +- ❌ Build artifacts (dist/, build/) +- ❌ Dependencies (node_modules/, venv/) +- ❌ Personal notes or TODO files +- ❌ Commented-out code +- ❌ Experimental/unfinished code +- ❌ Duplicate functionality +- ❌ Unused utilities + +## πŸ”§ Post-Integration Tasks + +After integration: + +1. **Update .gitignore** if needed +2. **Update dependencies** if new ones added +3. **Update CI/CD** if needed +4. **Update documentation** +5. **Announce integration** to team +6. **Archive donor repo** if no longer needed + +## πŸŽ“ Best Practices + +### DO: +βœ… Review all code before importing +βœ… Clean as you integrate +βœ… Test thoroughly after integration +βœ… Document what and why +βœ… Keep integration commits focused +βœ… Maintain git history (when relevant) + +### DON'T: +❌ Bulk import without review +❌ Preserve bad organization +❌ Skip testing +❌ Leave cleanup for later +❌ Import everything blindly +❌ Lose track of source + +## πŸ†˜ Troubleshooting + +### Issue: Too many conflicts during merge +**Solution**: Use manual copy method instead + +### Issue: Donor repo is too messy +**Solution**: Manual copy with aggressive cleanup + +### Issue: Don't want donor repo history +**Solution**: Use `--squash` with subtree or manual copy + +### Issue: Need to track multiple donor repos +**Solution**: Use git subtree with separate prefixes + +## πŸ“ž Questions? + +If you're unsure about how to integrate: +1. Create an issue with the `integration` label +2. Describe what you want to integrate +3. Ask for guidance from maintainers + +--- + +**Remember**: It's better to integrate slowly and cleanly than quickly and messily! diff --git a/docs/MAINTENANCE.md b/docs/MAINTENANCE.md new file mode 100644 index 0000000..b52b898 --- /dev/null +++ b/docs/MAINTENANCE.md @@ -0,0 +1,232 @@ +# ProSe Repository Maintenance Guide + +## 🎯 Purpose + +This guide helps maintainers keep the ProSe repository clean, organized, and free from clutter. + +## πŸ“… Maintenance Schedule + +### Daily +- Review new PRs for cleanliness standards +- Check for any accidentally committed backup/temp files + +### Weekly +- Run cleanup audit script +- Review open issues +- Update documentation if needed + +### Monthly +- Dependency updates (if applicable) +- Documentation review and updates +- Archive old branches + +### Quarterly +- Comprehensive repository audit +- Review and update .gitignore +- Update contributing guidelines if needed + +## 🧹 Cleanup Procedures + +### Finding Clutter Files + +Use these commands to find potential clutter: + +```bash +# Find backup files +find . -type f \( -name "*.bak" -o -name "*.old" -o -name "*.backup" -o -name "*~" \) + +# Find temporary files +find . -type f \( -name "*.tmp" -o -name "*.temp" \) + +# Find backup directories +find . -type d \( -name "backup" -o -name "backups" -o -name "old" -o -name "_old" \) + +# Find large files that might be artifacts +find . -type f -size +1M ! -path "./.git/*" + +# Find common IDE config files that shouldn't be committed +find . -type d \( -name ".vscode" -o -name ".idea" \) +``` + +### Removing Clutter + +```bash +# Remove backup files (BE CAREFUL - VERIFY FIRST!) +find . -name "*.bak" -delete +find . -name "*.old" -delete +find . -name "*~" -delete + +# Remove temporary files +find . -name "*.tmp" -delete + +# Remove empty directories +find . -type d -empty -delete +``` + +### Safe Cleanup Workflow + +1. **Identify**: Run find commands to locate clutter +2. **Review**: Manually check each file/directory +3. **Verify**: Ensure files are truly unnecessary +4. **Remove**: Delete confirmed clutter +5. **Test**: Ensure nothing breaks +6. **Commit**: Commit cleanup with clear message + +## πŸ“Š Repository Health Checks + +### Regular Checks + +```bash +# Check repository size +du -sh . + +# Check .git size (shouldn't grow too large) +du -sh .git + +# List largest files +find . -type f -exec du -h {} + | sort -rh | head -20 + +# Check for uncommitted files +git status + +# Check for untracked files that should be ignored +git status --ignored +``` + +### Quality Checks + +- Are all files in appropriate directories? +- Is documentation up to date? +- Are there any TODO comments that should be issues? +- Are test files properly organized? +- Is .gitignore comprehensive? + +## 🚫 What to Remove + +### Always Remove +- Backup files (*.bak, *.old, *.backup) +- Temporary files (*.tmp, temp/) +- IDE configuration (.vscode/, .idea/) +- Build artifacts (dist/, build/) +- Dependency directories (node_modules/, venv/) +- Log files (*.log) +- OS-generated files (.DS_Store, Thumbs.db) + +### Consider Removing +- Commented-out code blocks +- Unused functions/classes +- Outdated documentation +- Debug print statements +- Duplicate code + +### Never Remove +- Active source code +- Current tests +- Current documentation +- Configuration files in use +- Git history + +## πŸ”„ Handling Contributions + +### Review Checklist for PRs + +1. **File Check** + - [ ] No backup files + - [ ] No temporary files + - [ ] No IDE configs + - [ ] All files in proper locations + +2. **Code Check** + - [ ] No commented-out code + - [ ] No debug statements + - [ ] No unused imports + - [ ] Clean commit history + +3. **Documentation Check** + - [ ] README updated if needed + - [ ] New features documented + - [ ] Examples provided if applicable + +4. **Test Check** + - [ ] Tests included for new features + - [ ] All tests pass + - [ ] Test files properly organized + +### Rejecting PRs + +Reject PRs that: +- Contain backup/temporary files +- Have unclear purpose +- Lack documentation +- Don't follow contribution guidelines +- Break existing functionality + +Provide clear feedback on what needs to be fixed. + +## πŸ“ Directory Structure + +Maintain this structure: + +``` +ProSe/ +β”œβ”€β”€ .github/ # GitHub templates and workflows +β”‚ β”œβ”€β”€ ISSUE_TEMPLATE/ +β”‚ └── PULL_REQUEST_TEMPLATE/ +β”œβ”€β”€ docs/ # Documentation +β”œβ”€β”€ examples/ # Usage examples +β”œβ”€β”€ scripts/ # Maintenance and utility scripts +β”œβ”€β”€ src/ # Source code +β”œβ”€β”€ tests/ # Test files +β”œβ”€β”€ .gitignore # Ignore patterns +β”œβ”€β”€ CODE_OF_CONDUCT.md # Repository standards +β”œβ”€β”€ CONTRIBUTING.md # Contribution guidelines +└── README.md # Project overview +``` + +## πŸ› οΈ Maintenance Scripts + +### Cleanup Script (scripts/cleanup.sh) + +See `scripts/cleanup.sh` for automated cleanup procedures. + +### Audit Script (scripts/audit.sh) + +See `scripts/audit.sh` for repository health checks. + +## πŸ“ž Emergency Procedures + +### If Sensitive Data is Committed + +1. **Don't panic** +2. **Revoke the exposed credentials immediately** +3. **Remove from git history** (requires force push) +4. **Notify affected parties** +5. **Update security practices** + +### If Repository Becomes Cluttered + +1. **Create cleanup branch** +2. **Run audit scripts** +3. **Systematically remove clutter** +4. **Test thoroughly** +5. **Create cleanup PR** +6. **Document what was removed** + +## πŸ“š Resources + +- [GitHub Best Practices](https://docs.github.com/en/repositories/creating-and-managing-repositories/best-practices-for-repositories) +- [Git Ignore Patterns](https://git-scm.com/docs/gitignore) +- [Clean Code Principles](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882) + +## πŸŽ“ Training + +New maintainers should: +1. Read this guide thoroughly +2. Review CONTRIBUTING.md and CODE_OF_CONDUCT.md +3. Practice with the audit scripts +4. Shadow experienced maintainers +5. Start with small cleanup tasks + +--- + +**Remember**: Prevention is better than cure. Maintain cleanliness from the start! diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..d395996 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,38 @@ +# Documentation + +This directory contains all ProSe documentation. + +## Current Documentation + +- **[INTEGRATION.md](INTEGRATION.md)** - Guide for integrating code from donor repositories +- **[MAINTENANCE.md](MAINTENANCE.md)** - Repository maintenance procedures and schedules + +## Organization + +Additional documentation should be organized by topic: + +``` +docs/ +β”œβ”€β”€ integrations/ # Integration notes for each donor repo +β”œβ”€β”€ api/ # API documentation +β”œβ”€β”€ guides/ # User guides +└── development/ # Development documentation +``` + +## Creating Integration Notes + +When integrating from a donor repository, create a file in `integrations/`: + +``` +docs/integrations/donor-repo-name-YYYY-MM-DD.md +``` + +See [INTEGRATION.md](INTEGRATION.md) for the template. + +## Guidelines + +- Keep documentation up to date +- Use clear, concise language +- Include examples where helpful +- No outdated documentation +- Remove deprecated docs when features are removed diff --git a/docs/integrations/README.md b/docs/integrations/README.md new file mode 100644 index 0000000..f733926 --- /dev/null +++ b/docs/integrations/README.md @@ -0,0 +1,35 @@ +# Integration Notes + +This directory contains notes about code integrated from donor repositories. + +## Purpose + +Each integration should be documented with: +- What was integrated +- When it was integrated +- Where it came from +- What changes were made +- What was NOT integrated (and why) + +## Naming Convention + +Files should be named: +``` +[donor-repo-name]-[YYYY-MM-DD].md +``` + +For example: +- `donor-repo-1-2025-11-21.md` +- `legacy-system-2025-12-01.md` + +## Template + +See [../INTEGRATION.md](../INTEGRATION.md) for the integration documentation template. + +## Benefits + +Documenting integrations helps: +- Track where code came from +- Understand what was cleaned during integration +- Reference for future updates +- Audit trail for maintainability diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..a5e77ba --- /dev/null +++ b/examples/README.md @@ -0,0 +1,33 @@ +# Examples + +This directory contains usage examples for ProSe. + +## Organization + +Examples should be organized by feature or use case: + +``` +examples/ +β”œβ”€β”€ basic/ # Basic usage examples +β”œβ”€β”€ advanced/ # Advanced usage examples +β”œβ”€β”€ donor1/ # Examples for donor1 functionality +└── donor2/ # Examples for donor2 functionality +``` + +## Guidelines + +- Keep examples simple and focused +- Include comments explaining what's happening +- Ensure examples actually work +- No backup or temporary files +- Clean up any generated files in examples + +## Adding Examples + +When adding examples: + +1. Create a descriptive directory name +2. Add a README explaining the example +3. Keep code clean and well-commented +4. Test that the example works +5. Document any dependencies or setup required diff --git a/scripts/audit.sh b/scripts/audit.sh new file mode 100755 index 0000000..b71c7dd --- /dev/null +++ b/scripts/audit.sh @@ -0,0 +1,160 @@ +#!/bin/bash + +# ProSe Repository Health Audit Script +# Performs comprehensive health checks on the repository + +set -e + +echo "πŸ” ProSe Repository Health Audit" +echo "=================================" +echo "" + +# Colors +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +print_header() { + echo -e "${BLUE}>>> $1${NC}" +} + +print_pass() { + echo -e "${GREEN}βœ“${NC} $1" +} + +print_warn() { + echo -e "${YELLOW}⚠${NC} $1" +} + +print_fail() { + echo -e "${RED}βœ—${NC} $1" +} + +ISSUES=0 + +# 1. Repository Size Check +print_header "Repository Size" +REPO_SIZE=$(du -sh . | cut -f1) +GIT_SIZE=$(du -sh .git 2>/dev/null | cut -f1 || echo "N/A") +echo " Total size: $REPO_SIZE" +echo " .git size: $GIT_SIZE" +echo "" + +# 2. File Organization Check +print_header "File Organization" + +# Check if directories exist +if [ -d "src" ]; then + print_pass "src/ directory exists" +else + print_warn "src/ directory missing" + ((ISSUES++)) +fi + +if [ -d "tests" ]; then + print_pass "tests/ directory exists" +else + print_warn "tests/ directory missing" + ((ISSUES++)) +fi + +if [ -d "docs" ]; then + print_pass "docs/ directory exists" +else + print_warn "docs/ directory missing" + ((ISSUES++)) +fi + +echo "" + +# 3. Check for clutter +print_header "Clutter Detection" + +BACKUP_COUNT=$(find . -type f \( -name "*.bak" -o -name "*.old" -o -name "*.backup" -o -name "*~" \) ! -path "./.git/*" 2>/dev/null | wc -l) +if [ "$BACKUP_COUNT" -eq 0 ]; then + print_pass "No backup files found" +else + print_fail "Found $BACKUP_COUNT backup files" + ((ISSUES++)) +fi + +TEMP_COUNT=$(find . -type f \( -name "*.tmp" -o -name "*.temp" \) ! -path "./.git/*" 2>/dev/null | wc -l) +if [ "$TEMP_COUNT" -eq 0 ]; then + print_pass "No temporary files found" +else + print_fail "Found $TEMP_COUNT temporary files" + ((ISSUES++)) +fi + +OS_COUNT=$(find . -type f \( -name ".DS_Store" -o -name "Thumbs.db" \) ! -path "./.git/*" 2>/dev/null | wc -l) +if [ "$OS_COUNT" -eq 0 ]; then + print_pass "No OS-generated files found" +else + print_fail "Found $OS_COUNT OS-generated files" + ((ISSUES++)) +fi + +echo "" + +# 4. Essential Files Check +print_header "Essential Files" + +for file in "README.md" ".gitignore" "CONTRIBUTING.md" "CODE_OF_CONDUCT.md"; do + if [ -f "$file" ]; then + print_pass "$file exists" + else + print_warn "$file missing" + ((ISSUES++)) + fi +done + +echo "" + +# 5. Git Status +print_header "Git Status" +if git diff --quiet && git diff --cached --quiet; then + print_pass "Working directory clean" +else + print_warn "Uncommitted changes present" +fi + +UNTRACKED=$(git ls-files --others --exclude-standard | wc -l) +if [ "$UNTRACKED" -eq 0 ]; then + print_pass "No untracked files" +else + print_warn "$UNTRACKED untracked files" +fi + +echo "" + +# 6. Large Files +print_header "Large Files Check" +LARGE_COUNT=$(find . -type f -size +1M ! -path "./.git/*" 2>/dev/null | wc -l) +if [ "$LARGE_COUNT" -eq 0 ]; then + print_pass "No large files (>1MB) found" +else + print_warn "Found $LARGE_COUNT large files" + echo " Largest files:" + find . -type f -size +1M ! -path "./.git/*" -exec du -h {} \; 2>/dev/null | sort -rh | head -5 | sed 's/^/ /' +fi + +echo "" + +# Summary +echo "=================================" +if [ $ISSUES -eq 0 ]; then + echo -e "${GREEN}βœ… Repository Health: EXCELLENT${NC}" + echo "No issues found!" +else + echo -e "${YELLOW}⚠️ Repository Health: NEEDS ATTENTION${NC}" + echo "Found $ISSUES potential issues" + echo "" + echo "Run 'bash scripts/cleanup.sh' to address some issues automatically" +fi + +echo "" +echo "See docs/MAINTENANCE.md for more information" + +exit $ISSUES diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh new file mode 100755 index 0000000..9df9e90 --- /dev/null +++ b/scripts/cleanup.sh @@ -0,0 +1,169 @@ +#!/bin/bash + +# ProSe Repository Cleanup Script +# This script helps identify and remove clutter from the repository + +set -e + +echo "🧹 ProSe Repository Cleanup Script" +echo "===================================" +echo "" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Function to print colored output +print_info() { + echo -e "${GREEN}[INFO]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Check if we're in a git repository +if [ ! -d ".git" ]; then + print_error "Not in a git repository root!" + exit 1 +fi + +echo "Starting cleanup audit..." +echo "" + +# 1. Find backup files +print_info "Checking for backup files..." +BACKUP_FILES=$(find . -type f \( -name "*.bak" -o -name "*.old" -o -name "*.backup" -o -name "*~" \) ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$BACKUP_FILES" ]; then + print_warning "Found backup files:" + echo "$BACKUP_FILES" + echo "" + read -p "Remove these backup files? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + find . -type f \( -name "*.bak" -o -name "*.old" -o -name "*.backup" -o -name "*~" \) ! -path "./.git/*" -delete + print_info "Backup files removed!" + fi +else + print_info "No backup files found βœ“" +fi +echo "" + +# 2. Find temporary files +print_info "Checking for temporary files..." +TEMP_FILES=$(find . -type f \( -name "*.tmp" -o -name "*.temp" \) ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$TEMP_FILES" ]; then + print_warning "Found temporary files:" + echo "$TEMP_FILES" + echo "" + read -p "Remove these temporary files? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + find . -type f \( -name "*.tmp" -o -name "*.temp" \) ! -path "./.git/*" -delete + print_info "Temporary files removed!" + fi +else + print_info "No temporary files found βœ“" +fi +echo "" + +# 3. Find backup directories +print_info "Checking for backup directories..." +BACKUP_DIRS=$(find . -type d \( -name "backup" -o -name "backups" -o -name "old" -o -name "_old" \) ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$BACKUP_DIRS" ]; then + print_warning "Found backup directories:" + echo "$BACKUP_DIRS" + echo "" + print_warning "Review these directories manually before removing!" +else + print_info "No backup directories found βœ“" +fi +echo "" + +# 4. Find IDE configuration files +print_info "Checking for IDE configuration files..." +IDE_CONFIGS=$(find . -type d \( -name ".vscode" -o -name ".idea" \) ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$IDE_CONFIGS" ]; then + print_warning "Found IDE configuration directories:" + echo "$IDE_CONFIGS" + echo "" + print_warning "These should be in .gitignore and not committed!" +else + print_info "No IDE configuration files found βœ“" +fi +echo "" + +# 5. Find empty directories +print_info "Checking for empty directories..." +EMPTY_DIRS=$(find . -type d -empty ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$EMPTY_DIRS" ]; then + print_warning "Found empty directories:" + echo "$EMPTY_DIRS" + echo "" + read -p "Remove empty directories? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + find . -type d -empty ! -path "./.git/*" -delete 2>/dev/null || true + print_info "Empty directories removed!" + fi +else + print_info "No empty directories found βœ“" +fi +echo "" + +# 6. Check for large files +print_info "Checking for large files (>1MB)..." +LARGE_FILES=$(find . -type f -size +1M ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$LARGE_FILES" ]; then + print_warning "Found large files:" + find . -type f -size +1M ! -path "./.git/*" -exec du -h {} \; 2>/dev/null | sort -rh + echo "" + print_warning "Review these files - they might be build artifacts or should be in .gitignore" +else + print_info "No large files found βœ“" +fi +echo "" + +# 7. Check for common clutter patterns +print_info "Checking for OS-generated files..." +OS_FILES=$(find . -type f \( -name ".DS_Store" -o -name "Thumbs.db" -o -name "desktop.ini" \) ! -path "./.git/*" 2>/dev/null || true) + +if [ -n "$OS_FILES" ]; then + print_warning "Found OS-generated files:" + echo "$OS_FILES" + echo "" + read -p "Remove these OS files? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + find . -type f \( -name ".DS_Store" -o -name "Thumbs.db" -o -name "desktop.ini" \) ! -path "./.git/*" -delete + print_info "OS-generated files removed!" + fi +else + print_info "No OS-generated files found βœ“" +fi +echo "" + +# Summary +echo "===================================" +echo "βœ… Cleanup audit complete!" +echo "" +print_info "Next steps:" +echo " 1. Review any warnings above" +echo " 2. Manually check flagged items" +echo " 3. Update .gitignore if needed" +echo " 4. Run 'git status' to see changes" +echo " 5. Commit cleanup if appropriate" +echo "" +print_info "For more information, see docs/MAINTENANCE.md" diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..a653108 --- /dev/null +++ b/src/README.md @@ -0,0 +1,35 @@ +# Source Code + +This directory contains the main source code for ProSe. + +## Organization + +Code from donor repositories should be organized in subdirectories: + +``` +src/ +β”œβ”€β”€ donor1/ # Code from first donor repository +β”œβ”€β”€ donor2/ # Code from second donor repository +└── core/ # Core ProSe functionality +``` + +## Guidelines + +- Keep code organized by feature or source +- No backup files (*.bak, *.old) +- No temporary files (*.tmp) +- Remove commented-out code +- Document all public APIs +- Follow existing code style + +## Adding Code + +When adding code from donor repositories: + +1. Create a subdirectory for the source +2. Clean the code before committing +3. Update imports and paths +4. Add tests in `tests/` +5. Update documentation + +See [../docs/INTEGRATION.md](../docs/INTEGRATION.md) for detailed integration guidelines. diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..a1c3094 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,44 @@ +# Tests + +This directory contains all test files for ProSe. + +## Organization + +Tests should be organized to mirror the source code structure: + +``` +tests/ +β”œβ”€β”€ donor1/ # Tests for code from donor1 +β”œβ”€β”€ donor2/ # Tests for code from donor2 +β”œβ”€β”€ core/ # Tests for core functionality +└── integration/ # Integration tests +``` + +## Guidelines + +- Test file names should match source files (e.g., `test_module.py` for `module.py`) +- Include both unit tests and integration tests +- Aim for high test coverage +- Keep tests clean and well-documented +- No debug print statements in committed tests + +## Running Tests + +[Add instructions for running tests once test framework is set up] + +```bash +# Example (adjust based on your test framework) +# python -m pytest tests/ +# npm test +# go test ./... +``` + +## Adding Tests + +When integrating code from donor repositories: + +1. Bring over relevant tests +2. Update import paths +3. Ensure tests pass +4. Add additional tests if coverage is lacking +5. Remove any test fixtures or temp files after tests run