Utility Scripts

Utility Scripts

General-purpose tools that support the lab’s operations. These are the workhorses — reliable, well-tested scripts that handle the day-to-day tasks of managing a complex technical environment.


Overview

While Aurora Tools and LLM Infrastructure get most of the attention, the utility scripts are what keep everything running smoothly. These are the unsung heroes of the codebase:


Available Tools

Scripts Directory

The /opt/aurora/scripts/ directory contains general-purpose utility scripts:

ScriptPurpose
fetch_context_memory.pyMemory context management for LLM calls

Bin Directory

The /opt/aurora/bin/ directory contains automation scripts:

ScriptPurpose
planner.shTask creation (symlink to mistral-vibe-cli)
worker.shTask execution (symlink to mistral-vibe-cli)
beads-auto-sync.shAutomatic beads synchronization
setup-gitea-repo.shGitea repository setup
start-dolt-server.shDolt database server management
cleanup-dolt-locks.shClean up stuck Dolt locks
agent-create-content.shContent creation automation
agent-worker-content.shWorker content processing

fetch_context_memory.py

Memory Context Management for LLM Calls

This script manages the context that’s provided to LLM calls, ensuring relevant information is available while keeping prompts focused and efficient.

Features

Usage

# Load context for a new conversation
python3 fetch_context_memory.py --load --session new_session

# Save context after conversation
python3 fetch_context_memory.py --save --session new_session

# Get relevant context for a query
python3 fetch_context_memory.py --query "Tell me about Aurora" --limit 1000

Integration

Used by:


Automation Scripts

beads-auto-sync.sh

Automatic Beads Synchronization

Keeps beads issues synchronized across different systems.

Features:

Schedule: Runs periodically via cron

setup-gitea-repo.sh

Gitea Repository Setup

Automates the creation and configuration of Gitea repositories.

Features:

Dolt Server Scripts

Database Management

These ensure the database infrastructure is reliable and available.


Design Philosophy

Keep It Simple

Utility scripts should:

Fail Gracefully

Good utility scripts:

Be Maintainable

We prioritize:


Contributing

If you’re adding a new utility script:

  1. Place it in the right directory

    • General scripts → /opt/aurora/scripts/
    • Automation scripts → /opt/aurora/bin/
  2. Document it

    • Add a header comment explaining purpose
    • Include usage examples
    • List dependencies
  3. Make it robust

    • Add error handling
    • Validate inputs
    • Include logging
  4. Test it

    • Test with various inputs
    • Test error cases
    • Test edge cases

Source Code

All utility scripts are available for download and study:



The best tools are the ones you don’t notice until they’re not there.