MQL5-Google-Onedrive/docs/KNOWLEDGE_BASE_INTEGRATION.md
google-labs-jules[bot] 09177609cf Implement Google Drive Setup and Streaming Mode
- Created RUN-GOOGLE-DRIVE-SETUP.bat for Windows users
- Created scripts/google_drive_setup.sh for Linux/WSL users
- Updated scripts/knowledge_base_helper.py to include Google Drive resources
- Documented Google Drive streaming mode in docs/KNOWLEDGE_BASE_INTEGRATION.md
- Verified repository stability with validation and integration tests
2026-02-24 14:11:36 +00:00

7.5 KiB

Knowledge Base Integration Guide

This guide explains how to access and integrate with the project's knowledge bases: NotebookLM notebooks and OneDrive Blueprint notes.

📓 NotebookLM Notebooks

The project uses multiple NotebookLM notebooks for different purposes:

Primary Context Notebook

Blueprint & Strategy Notebook

Legacy Context Notebook (Archive)

📁 OneDrive Blueprint Notes

Quick Notes - Blueprint

  • URL: View Blueprint
  • Purpose: Quick reference notes, trading blueprints, and strategy sketches
  • Format: OneNote document
  • Access: View and Edit (with OneDrive authentication)
  • Content: Trading setups, visual diagrams, and quick reference materials

🔄 Automatic Synchronization

OneDrive Sync (GitHub Actions)

The repository includes automatic OneDrive synchronization via GitHub Actions:

Workflow: .github/workflows/onedrive-sync.yml

Features:

  • Syncs mt5/MQL5 directory to OneDrive on every push to main
  • Uses rclone for reliable file synchronization
  • Configurable remote and path via GitHub Secrets

Required Secrets:

  • RCLONE_CONFIG_B64: Base64-encoded rclone configuration file

Optional Secrets:

  • ONEDRIVE_REMOTE: Remote name in rclone.conf (default: onedrive)
  • ONEDRIVE_PATH: Destination path (default: Apps/MT5/MQL5)

Setup:

  1. Configure rclone locally with OneDrive:
    rclone config
    
  2. Encode your rclone config:
    base64 -w0 ~/.config/rclone/rclone.conf
    
  3. Add the encoded config to GitHub Secrets as RCLONE_CONFIG_B64

🤖 AI Agent Integration

For AI Agents (Gemini, Jules, Claude, etc.)

When working with this repository, AI agents should:

  1. Read the Primary Context Notebook first to understand:

    • Repository structure
    • Key files and directories
    • Development guidelines
    • Testing procedures
  2. Read the Blueprint & Strategy Notebook for:

    • Trading strategy details
    • Smart Money Concepts (SMC) implementation
    • Risk management parameters
    • Entry/exit logic
  3. Reference OneDrive Blueprint Notes for:

    • Visual diagrams and charts
    • Quick reference materials
    • Strategy sketches

Integration Workflow

graph TD
    A[Start Task] --> B[Read Primary NotebookLM]
    B --> C[Read Blueprint NotebookLM]
    C --> D[Reference OneDrive Notes]
    D --> E[Make Code Changes]
    E --> F[Update Documentation]
    F --> G[Sync to OneDrive]

Context Files

The repository includes helper files for AI agents:

  • AGENTS.md: Quick reference for agents
  • docs/NOTEBOOK_LM_CONTEXT.txt: Context file with all URLs and instructions
  • docs/USER_NOTES.md: User-specific notes and external links

🔐 Access Control

NotebookLM

  • Requires Google account authentication
  • Shared access can be configured per notebook
  • Read/Write permissions managed by notebook owner

OneDrive

  • Requires Microsoft account authentication
  • Access controlled via OneDrive sharing settings
  • View/Edit permissions managed by file owner

GitHub Secrets

  • Managed via repository settings
  • Required for automated synchronization
  • Only accessible to authorized GitHub Actions

📝 Best Practices

  1. Always Read Before Writing: Agents should read all relevant notebooks before making changes
  2. Keep Context Updated: Update notebooks when making significant changes to the repository
  3. Document External Links: Add new external resources to docs/USER_NOTES.md
  4. Sync Regularly: Ensure OneDrive sync is working by checking workflow logs
  5. Version Control: Document major strategy changes in both NotebookLM and repository

🔧 Troubleshooting

OneDrive Sync Issues

  • Check GitHub Actions logs: .github/workflows/onedrive-sync.yml
  • Verify RCLONE_CONFIG_B64 secret is set correctly
  • Test rclone configuration locally before encoding

NotebookLM Access Issues

  • Ensure proper Google account authentication
  • Verify notebook sharing permissions
  • Check if notebook URLs are still valid

Integration Failures

  • Review AI agent logs for specific errors
  • Verify all URLs are accessible
  • Check network connectivity and firewall rules

🆘 Support

For issues or questions:

  • Create an issue in the GitHub repository
  • Check the WhatsApp Agent community: Join here
  • Email: Lengkundee01.org@domain.com

📂 Google Drive Streaming Mode

The project supports Google Drive integration via rclone for streaming and synchronization.

Google Drive Folders

Setup & Usage

To set up Google Drive streaming mode, use the provided scripts:

Windows

Run the setup batch file in the root directory: ```batch RUN-GOOGLE-DRIVE-SETUP.bat ``` This script allows you to:

  • Configure the rclone remote
  • Start streaming mode (mount Google Drive to `G:`)
  • Sync files to Google Drive
  • Open folders in the browser

Linux/WSL

Run the shell script: ```bash ./scripts/google_drive_setup.sh ``` This provides similar functionality for Linux environments, mounting Google Drive to `~/google-drive`.

Streaming Mode Features

  • Real-time Access: Access Google Drive files as if they were on your local disk.
  • Cache Optimization: Uses VFS cache mode for improved performance.
  • Background Operation: Mounts run in the background for seamless integration.

Prerequisites

  • rclone: Required for both Windows and Linux setup.
  • WinFsp: Required on Windows for mounting (`rclone mount`).
  • FUSE: Required on Linux for mounting.