{"id":29674252,"url":"https://github.com/ravescovi/bait","last_synced_at":"2026-05-18T00:08:45.931Z","repository":{"id":305913954,"uuid":"1024372173","full_name":"ravescovi/bAIt","owner":"ravescovi","description":"bAIt (Bluesky AI Tools) - AI-powered analysis and intelligence system for Bluesky-based data acquisition instruments at the Advanced Photon Source (APS)","archived":false,"fork":false,"pushed_at":"2025-07-22T15:59:13.000Z","size":254,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T17:36:26.434Z","etag":null,"topics":["ai","analysis","aps","beamline","bluesky","epics","submodules","synchrotron"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravescovi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-22T15:39:40.000Z","updated_at":"2025-07-22T15:59:16.000Z","dependencies_parsed_at":"2025-07-22T17:36:28.456Z","dependency_job_id":"15a5ca11-477a-4048-94f2-b9a81c939c00","html_url":"https://github.com/ravescovi/bAIt","commit_stats":null,"previous_names":["ravescovi/bait"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ravescovi/bAIt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravescovi%2FbAIt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravescovi%2FbAIt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravescovi%2FbAIt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravescovi%2FbAIt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravescovi","download_url":"https://codeload.github.com/ravescovi/bAIt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravescovi%2FbAIt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586839,"owners_count":23952195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","analysis","aps","beamline","bluesky","epics","submodules","synchrotron"],"created_at":"2025-07-22T23:00:39.254Z","updated_at":"2026-05-18T00:08:45.879Z","avatar_url":"https://github.com/ravescovi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bAIt (Bluesky AI Tools)\n\nAn AI-powered analysis and intelligence system for Bluesky-based data acquisition instruments at the Advanced Photon Source (APS) at Argonne National Laboratory.\n\n**Key Scope**: bAIt is a **separate analysis package** that analyzes existing deployments and answers questions about them. It does **NOT control** any hardware or systems.\n\n## 🏗️ Repository Structure (Submodules)\n\nThis repository uses **git submodules** to manage multiple related repositories. Each component is maintained in its own repository with proper access controls.\n\n### 📁 Core Framework (`bait_base/`)\n- **analyzers/** - Analysis engines for different components\n- **agents/** - AI agents for specialized analysis tasks  \n- **MCP/** - Model Context Protocol servers for Claude Code integration\n- **knowledge/** - RAG knowledge system for intelligent querying\n- **visualization/** - Tools for generating system diagrams and visualizations\n- **docs/** - bAIt framework documentation\n\n### 📦 Foundation Packages (`bits_base/` - Submodules)\n- **[BITS](https://github.com/BCDA-APS/BITS)** - Main apsbits package with instrument templates and framework\n- **[apstools](https://github.com/BCDA-APS/apstools)** - Library of Python tools for Bluesky Framework at APS\n- **[guarneri](https://github.com/BCDA-APS/guarneri)** - Instrument configuration management\n- **[BITS-Starter](https://github.com/BCDA-APS/BITS-Starter)** - Template for creating new instruments\n- **[ophyd-registry](https://github.com/BCDA-APS/ophyd-registry)** - Device registry and management\n\n### 🔬 Beamline Deployments (`bits_deployments/` - Submodules)\n- **[12id-bits](https://github.com/BCDA-APS/12id-bits)** - 12-ID beamline deployment\n- **[16bm-bits](https://github.com/BCDA-APS/16bm-bits)** - 16-BM beamline deployment\n- **[28id-bits](https://github.com/BCDA-APS/28id-bits)** - 28-ID beamline deployment\n- **[8id-bits](https://github.com/BCDA-APS/8id-bits)** - 8-ID beamline deployment\n- **[9id_bits](https://github.com/BCDA-APS/9id_bits)** - 9-ID beamline deployment\n- **[bluesky-mic](https://github.com/BCDA-APS/bluesky-mic)** - Microscopy beamline deployment\n- **[haven](https://github.com/spc-group/haven)** - Haven beamline framework\n- **[polar-bits](https://github.com/BCDA-APS/polar-bits)** - Polar beamline deployment\n- **[tomo-bits](https://github.com/BCDA-APS/tomo-bits)** - Tomography beamline deployment\n- **[usaxs-bits](https://github.com/BCDA-APS/usaxs-bits)** - USAXS beamline deployment\n\n### 📚 Resources (`resources/` - Submodules)\n- **[bluesky_training](https://github.com/BCDA-APS/bluesky_training)** - Training materials and examples\n- **[eureka_beamline](https://github.com/ravescovi/eureka_beamline)** - Eureka beamline utilities\n\n### 🐳 Containers (`containers/` - Submodules)\n- **[epics-podman](https://git.aps.anl.gov/xsd-det/epics-podman)** - EPICS container configurations\n\n### 🗂️ Deployment Configs (`bait_deployments/`)\n- Analysis configurations for each beamline\n- Points to IOCs, BITS deployments, MEDM screens\n- Contains metadata and analysis cache\n\n## 🚀 Quick Start\n\n### Option 1: Full Installation (Requires access to all repositories)\n```bash\ngit clone --recursive https://github.com/your-org/bAIt.git\ncd bAIt\npython scripts/check-submodule-access.py\npip install -e ./bait_base/\n```\n\n### Option 2: Selective Installation (Recommended for most users)\n```bash\ngit clone https://github.com/your-org/bAIt.git\ncd bAIt\npython scripts/init-accessible-submodules.py\npip install -e ./bait_base/\n```\n\n### Option 3: Core Framework Only\n```bash\ngit clone https://github.com/your-org/bAIt.git\ncd bAIt\npip install -e ./bait_base/\n# Use bAIt with external repository references only\n```\n\n## 📚 Documentation\n\n- **[Submodule Management Guide](docs/submodules/SUBMODULES.md)** - Comprehensive guide to working with submodules\n- **[Access Requirements](docs/submodules/ACCESS-REQUIREMENTS.md)** - Repository access requirements and troubleshooting\n- **[Migration Notes](docs/submodules/MIGRATION-REMOTES.md)** - Information about the submodule migration\n\n## 🔧 Submodule Management\n\n### Check Repository Access\n```bash\n# Check access to all submodules\npython scripts/check-submodule-access.py\n\n# Get detailed troubleshooting help\npython scripts/check-submodule-access.py --fix-permissions\n\n# Check only specific category\npython scripts/check-submodule-access.py --category bits_base\n```\n\n### Initialize Accessible Submodules\n```bash\n# Initialize only repositories you have access to\npython scripts/init-accessible-submodules.py\n\n# Dry run to see what would be initialized\npython scripts/init-accessible-submodules.py --dry-run\n\n# Force initialization (ignore access checks)\npython scripts/init-accessible-submodules.py --force\n```\n\n### Diagnose Issues\n```bash\n# Run comprehensive diagnostics\npython scripts/diagnose-submodule-issues.py\n\n# Diagnose specific submodule\npython scripts/diagnose-submodule-issues.py --submodule bits_base/BITS\n\n# Get detailed fix suggestions\npython scripts/diagnose-submodule-issues.py --fix-suggestions\n```\n\n### Manual Submodule Operations\n```bash\n# Update all initialized submodules\ngit submodule update --recursive\n\n# Initialize specific submodule\ngit submodule update --init bits_base/BITS\n\n# Update to latest commits\ngit submodule update --remote\n\n# Pull changes in submodule and commit reference\ncd bits_base/BITS\ngit pull origin main\ncd ../..\ngit add bits_base/BITS\ngit commit -m \"Update BITS submodule\"\n```\n\n## 🔐 Access Requirements\n\n### Public Repositories (Always Accessible)\n- Most BCDA-APS repositories on GitHub\n- No special access required\n\n### Organization Repositories (Require Membership)\n- **BCDA-APS organization**: Request membership from APS team\n- **spc-group organization**: Request access for Haven repository\n\n### Private/Restricted Repositories (Require Special Access)\n- **APS GitLab** (`git.aps.anl.gov`): APS network access + repository permissions\n- Contact repository owners for access\n\n## 🎯 Development Commands\n\n### bAIt Analysis\n```bash\n# Analyze deployment\nbait-analyze [deployment-name]\n\n# Interactive query\nbait-query [deployment-name]\n\n# Generate visualization\nbait-visualize [deployment-name] --type network\n```\n\n### Working with Submodules (Claude Code)\n```bash\n# Work in specific submodule\ncd bits_base/BITS\n# Make changes, commit normally\ngit add .\ngit commit -m \"Add new feature\"\ngit push origin main\n\n# Update main repository with new submodule commit\ncd ../..\ngit add bits_base/BITS\ngit commit -m \"Update BITS submodule to include new feature\"\n```\n\n## 🚨 Troubleshooting\n\n### Common Issues\n\n**\"fatal: repository not found\"**\n- Repository may be private - request access\n- Check repository URL spelling\n- Verify GitHub organization membership\n\n**\"Permission denied (publickey)\"**\n- SSH key not configured or not added to GitHub\n- Run: `ssh -T git@github.com` to test\n- Generate key: `ssh-keygen -t ed25519 -C \"your_email@example.com\"`\n\n**\"Submodule directory is empty\"**\n- Run: `git submodule update --init [path]`\n- Or use: `python scripts/init-accessible-submodules.py`\n\n**\"APS GitLab repositories not accessible\"**\n- Must be on APS network or VPN\n- Contact APS IT for repository access\n- Some repositories require special permissions\n\n### Getting Help\n1. **Run diagnostics**: `python scripts/diagnose-submodule-issues.py --fix-suggestions`\n2. **Check access**: `python scripts/check-submodule-access.py --fix-permissions`\n3. **Contact repository owners** for access to specific repositories\n4. **Join GitHub organizations** (BCDA-APS, spc-group) as needed\n\n## 🤝 Contributing\n\n### To Main bAIt Framework\n1. Fork this repository\n2. Make changes to `bait_base/` core framework\n3. Test with available submodules\n4. Submit pull request\n\n### To Individual Components\n1. Navigate to specific submodule: `cd bits_base/BITS`\n2. Make changes and commit in submodule\n3. Push to submodule repository\n4. Update main repository submodule reference if needed\n\n### Adding New Beamlines\n```bash\n# Add new beamline as submodule\ngit submodule add https://github.com/org/new-beamline.git bits_deployments/new-beamline\n\n# Commit the submodule addition\ngit add .gitmodules bits_deployments/new-beamline\ngit commit -m \"Add new beamline deployment\"\n```\n\n## 📄 License\n\nSee individual submodule repositories for their respective licenses.\n\n## 📞 Support\n\n- **bAIt Framework**: Contact bAIt development team\n- **BITS/apstools**: Contact BCDA-APS team\n- **Individual Beamlines**: Contact respective beamline teams\n- **Access Issues**: Contact repository owners or APS IT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravescovi%2Fbait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravescovi%2Fbait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravescovi%2Fbait/lists"}