Implemented comprehensive directives system for agent coordination: - Created directives.md (590 lines) - Core operational rules defining coordinator vs executor roles, agent delegation patterns, and coding standards (NO EMOJIS, ASCII markers only) - Added DIRECTIVES_ENFORCEMENT.md - Documentation of enforcement mechanisms and checklist for validating compliance - Created refresh-directives command - Allows reloading directives after Gitea updates without restarting Claude Code - Updated checkpoint and save commands to verify directives compliance - Updated .claude/claude.md to mandate reading directives.md first Added DOS system management PowerShell utilities: - check-bat-on-nas.ps1 - Verify BAT files on NAS match source - check-latest-errors.ps1 - Scan DOS error logs for recent issues - check-plink-references.ps1 - Find plink.exe usage in scripts - check-scp-errors.ps1 - Analyze SCP transfer errors - check-sync-log.ps1 (modified) - Enhanced sync log analysis - check-sync-status.ps1 - Monitor sync process status - copy-to-nas-now.ps1 - Manual NAS file deployment - find-error-logging.ps1 - Locate error logging patterns - fix-copy-tonas-logging.ps1 - Repair logging in copy scripts - fix-dos-files.ps1 - Batch DOS file corrections - fix-line-break.ps1 - Fix line ending issues - fix-plink-usage.ps1 - Modernize plink.exe to WinRM - push-fixed-bat-files.ps1 - Deploy corrected BAT files - run-sync-direct.ps1 - Direct sync execution - test-error-logging.ps1 - Validate error logging functionality - trigger-sync-push.ps1 - Initiate sync push operations - verify-error-logging.ps1 - Confirm error logging working - scripts/fix-ad2-error-logging.ps1 - Fix AD2 error logging Added Gitea password management scripts: - Reset-GiteaPassword.ps1 - Windows PowerShell password reset - reset-gitea-password.sh - Unix shell password reset Key architectural decisions: - Directives system establishes clear separation between Main Claude (coordinator) and specialized agents (executors) - DOS utilities modernize legacy plink.exe usage to WinRM - Error logging enhancements improve troubleshooting capabilities - All scripts follow PSScriptAnalyzer standards Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ClaudeTools Scripts
Utility scripts for managing the ClaudeTools system.
Core Scripts
Context Recall System
setup-context-recall.sh
- One-time setup for context recall system
- Configures JWT authentication
- Tests API connectivity
test-context-recall.sh
- Verify context recall system functionality
- Test API endpoints
- Check compression
Conversation Import & Archive
import-conversations.py
- Import conversation JSONL files to database
- Extract and compress conversation context
- Tag extraction and categorization
- Optional tombstone creation with
--create-tombstones
archive-imported-conversations.py
- Archive imported conversation files
- Create tombstone markers
- Move files to archived/ subdirectories
- Database verification (optional)
check-tombstones.py
- Verify tombstone integrity
- Validate JSON structure
- Check archived files exist
- Database context verification
TOMBSTONE_QUICK_START.md
- Quick reference for tombstone system
- Common commands
- Troubleshooting tips
Database & Testing
test_db_connection.py
- Test database connectivity
- Verify credentials
- Check table access
test-server.sh
- Start development server
- Run basic API tests
MCP Servers
setup-mcp-servers.sh
- Configure Model Context Protocol servers
- Setup GitHub, Filesystem, Sequential Thinking
Tombstone System (NEW)
Archive imported conversation files with small marker files.
Quick Start
# Archive all imported files
python scripts/archive-imported-conversations.py --skip-verification
# Verify tombstones
python scripts/check-tombstones.py
# Check space savings
du -sh imported-conversations/
Documentation
TOMBSTONE_QUICK_START.md- Quick reference../TOMBSTONE_SYSTEM.md- Complete documentation../TOMBSTONE_IMPLEMENTATION_SUMMARY.md- Implementation details
Expected Results
- 549 tombstone files (~1 MB)
- 549 archived files in subdirectories
- 99%+ space reduction in active directory
Usage Patterns
Initial Setup
# 1. Setup context recall
bash scripts/setup-context-recall.sh
# 2. Setup MCP servers (optional)
bash scripts/setup-mcp-servers.sh
# 3. Test database connection
python scripts/test_db_connection.py
Import Conversations
# Import with automatic tombstones
python scripts/import-conversations.py --create-tombstones
# Or import first, archive later
python scripts/import-conversations.py
python scripts/archive-imported-conversations.py --skip-verification
Verify System
# Test context recall
bash scripts/test-context-recall.sh
# Check tombstones
python scripts/check-tombstones.py
# Test API
bash scripts/test-server.sh
Script Categories
Setup & Configuration
setup-context-recall.shsetup-mcp-servers.sh
Import & Archive
import-conversations.pyarchive-imported-conversations.pycheck-tombstones.py
Testing & Verification
test_db_connection.pytest-context-recall.shtest-server.shtest-tombstone-system.sh
Utilities
- Various helper scripts
Common Commands
# Start API server
uvicorn api.main:app --reload
# Import conversations
python scripts/import-conversations.py
# Archive files
python scripts/archive-imported-conversations.py --skip-verification
# Check system health
python scripts/check-tombstones.py
bash scripts/test-context-recall.sh
# Database connection test
python scripts/test_db_connection.py
Requirements
Most scripts require:
- Python 3.8+
- Virtual environment activated (
api\venv\Scripts\activate) .envfile configured (see.env.example)- Database access (172.16.3.30:3306)
Environment Variables
Scripts use these from .env:
DATABASE_URL=mysql+pymysql://user:pass@172.16.3.30:3306/claudetools
JWT_TOKEN=your-jwt-token-here
API_USER_EMAIL=user@example.com
API_USER_PASSWORD=your-password
Documentation
TOMBSTONE_QUICK_START.md- Tombstone system quick start../TOMBSTONE_SYSTEM.md- Complete tombstone documentation../.claude/CONTEXT_RECALL_QUICK_START.md- Context recall guide../CONTEXT_RECALL_SETUP.md- Full setup instructions
Last Updated: 2026-01-18 Version: 1.0