Personal project - Disciplined prompt engineering and agentic dev tooling, built and run entirely on a decade-old MacBook Pro.
Device: MacBook Pro (Retina, 15-inch, Mid 2015) | OS: macOS 12.7.6 Monterey
CtxRtr is two things that turned out to depend on each other. The headline is a Contextual Prompt Router: a versioned, validated, and audited prompt library, treated with the same discipline you'd expect from a codebase rather than a folder of text files. The reason it exists at all is the second thing: everything here runs on a 2015 MacBook Pro, with no cloud compute and no assumption of headroom. Most agentic-dev tooling quietly assumes an unlimited-resource machine. This is what it looks like to build that tooling somewhere resource actually matters, and to monitor the machine closely enough to trust the result.
[*] Leverage what works well, share how you implement it, and please contribute if you would like to.
Prompts as a versioned, governed system, not just a folder of
.mdfiles
- Natural-Language Routing -
./ops/run-prompt.sh "diagnose ci"instead of remembering exact filenames - Version Management - Semantic versioning with automatic latest-version selection and outdated-version archiving
- Validation & Auditing -
validate-prompts.sh,audit-prompts.sh,analyze-prompts.shcheck template compliance, metadata, and usage before a prompt ships - Prompt Chaining - Run multiple prompts in sequence (
--chain) for multi-step workflows
Why it matters here: this tooling has to earn its keep on genuinely limited hardware, so the system has to stay observable
- System Health Monitoring - Catches slowdowns and data loss before they happen on aging storage
- System Cleanup - Frees up disk space and memory that a newer machine could afford to waste
- Docker Optimization - Keeps containerized services from starving everything else running
- Performance Tracking - Before/after metrics for every optimization, not just a claim that it worked
- PDF Management, Release Sanitization, Todo Management - Housekeeping that keeps the above two systems maintainable
git clone https://github.com/simien/CtxRtr.git
cd CtxRtr
chmod +x ops/monitoring/swap-ssd-health.sh
./ops/monitoring/swap-ssd-health.sh
# Note: You may be prompted for your password to see detailed SSD health statsThe main event: contextual, validated, versioned prompt routing
# Natural-language prompt routing
./ops/run-prompt.sh "diagnose ci"
./ops/run-prompt.sh "find bugs"
./ops/run-prompt.sh "create todo"
# Chain multiple prompts in sequence
./ops/run-prompt.sh --chain diagnose-ci generate-report
# Version management, analytics, and validation
./scripts/audit-prompts.sh --dry-run
./scripts/analyze-prompts.sh
./scripts/validate-prompts.shSupporting infrastructure: keeps the machine trustworthy enough to build on
# System Health Check (Prevents slowdowns & data loss)
./ops/monitoring/swap-ssd-health.sh
# System Cleanup (Frees up disk space)
./ops/cleanup/brew-cleanup.sh
./ops/cleanup/docker-cleanup.sh
# Docker Optimization (Prevents resource hogging)
./ops/docker/docker-optimize.sh
# Cursor IDE Optimization (Faster performance)
./scripts/sync-cursor-settings.sh
# Performance Tracking (Shows improvements)
./metrics/system-metrics-tracker.sh baseline
./metrics/system-metrics-tracker.sh current
./metrics/system-metrics-tracker.sh compare
# Real-time System Dashboard
./metrics/comprehensive-dashboard.sh dashboardHousekeeping - For managing the development environment
# PDF Management
./ops/backup/pdf-to-markdown-converter.sh all
./ops/backup/pdf-watcher.sh watch
# Security & Release Management
./scripts/pre-release-sanitizer.sh --dry-run
./scripts/create-release.sh
# Todo Management & Quality Control
./scripts/enforce-organization-standards.sh
./scripts/migrate-todo-items.sh
# Comprehensive Testing
./tests/quick-test.sh
./tests/quick-test.sh --non-interactivePrompts treated like code: versioned, validated, audited, and measured, not just written down
- Natural Language Support - Type
"diagnose ci"instead of remembering exact filenames - Fuzzy Matching - Contextual prompt discovery with semantic suggestions
- Context Injection - Dynamic file inclusion with
{{include:path/to/file}} - Version Management - Automatic latest version selection with semantic versioning
- Quality Control - Comprehensive validation and analytics
- Automated Version Management - Outdated version detection and archiving
Illustrative snapshot: captured 2025-07-28, kept here to show what
analyze-prompts.shreports. Run it yourself for current numbers
■ Prompt Structure Analysis
==========================
Total prompts: 24 (active)
Archived prompts: 1 (properly managed)
Total categories: 5
Prompts by category:
code-analysis 5 (20%)
documentation-generation 5 (20%)
meta-prompts 3 (12%)
system-optimization 5 (20%)
workflow-management 6 (25%)
↗ Quality Metrics
=================
Template Compliance: 100% ✓
Metadata Completeness: 100% ✓
Version Consistency: 100% ✓
File Naming Standards: 100% ✓
Validation Success Rate: 100% ✓
Outdated Version Management: 100% ✓
■ Version Management
====================
Active prompts: 24 (clean, current versions only)
Archived prompts: 1 (outdated version)
Outdated versions: 0 (all handled)
Archive system: 100% operational
[#] See prompts/README.md for detailed prompt system documentation
[#] See docs/guides/prompt-system-overview.md for comprehensive system architecture and advanced features
System Health Dashboard - Real-time performance metrics
■ System Health Dashboard
==========================
Memory Usage: 40% ✓ (Target: < 80%)
██████████░░░░░░░░░░░░░░░░░░░░
✓ Memory Status: Excellent
CPU Usage: 22% ✓ (Target: < 70%)
████████░░░░░░░░░░░░░░░░░░░░░░
✓ CPU Status: Optimal
Disk Usage: 21% ✓ (Target: < 85%)
██████░░░░░░░░░░░░░░░░░░░░░░░░
✓ Disk Status: Healthy
↗ Performance Summary
=====================
✓ All systems operating within optimal ranges
✓ No performance bottlenecks detected
✓ System optimization targets achieved
[#] See docs/guides/computer-optimization-quick-reference.md for detailed environment optimization guide
Comprehensive tooling - Sophisticated scripts for environment optimization and management
The main system: routing, versioning, validation, analytics
./ops/run-prompt.sh- Natural-language prompt router with chaining support./scripts/validate-prompts.sh- Template compliance and metadata validation./scripts/analyze-prompts.sh- Usage pattern and complexity analytics./scripts/audit-prompts.sh- Outdated-version detection and archiving
Performance refinement - Tools that directly improve your Mac's performance
./ops/monitoring/swap-ssd-health.sh- System health check (prevents slowdowns & data loss)./ops/monitoring/top-hogs.sh- Resource monitoring (identifies performance bottlenecks)
./ops/cleanup/brew-cleanup.sh- Homebrew cleanup (frees up disk space)./ops/cleanup/docker-cleanup.sh- Docker cleanup (reduces memory & disk usage)
./ops/docker/docker-optimize.sh- Docker resource management (prevents resource hogging)
./scripts/sync-cursor-settings.sh- Cursor IDE optimization (faster performance, reduced memory usage)
./metrics/system-metrics-tracker.sh- Performance tracking (shows before/after improvements)./metrics/comprehensive-dashboard.sh- Visual dashboards (real-time system status)
Housekeeping - Tools that help manage the development environment
./ops/backup/pdf-to-markdown-converter.sh- PDF to markdown conversion (extracts real text via poppler)./ops/backup/pdf-watcher.sh- Automatic file watching./ops/backup/create-ctxrtr-backup.sh- Project backup
./scripts/pre-release-sanitizer.sh- Security sanitization./scripts/create-release.sh- Release management
./scripts/migrate-todo-items.sh- Automated todo migration with comprehensive reporting./scripts/enforce-organization-standards.sh- Organization standards enforcement
[#] See ops/README.md for detailed operations documentation
Sophisticated orchestration - A refined workflow for comprehensive optimization
# 1. Capture baseline metrics
./metrics/system-metrics-tracker.sh baseline
# 2. Run optimizations
./ops/monitoring/swap-ssd-health.sh
./ops/cleanup/brew-cleanup.sh
./ops/cleanup/docker-cleanup.sh
./ops/docker/docker-optimize.sh
./scripts/sync-cursor-settings.sh
# 3. Capture current metrics
./metrics/system-metrics-tracker.sh current
# 4. Generate comparison report
./metrics/system-metrics-tracker.sh compare
# 5. View comprehensive dashboard
./metrics/comprehensive-dashboard.sh dashboard[#] See docs/guides/computer-optimization-quick-reference.md for detailed environment optimization guide
Comprehensive knowledge base - Documentation for all aspects of this project
Start here: prompt management and workflow automation
- Prompts System - Structured AI prompts for system optimization
- Prompt System Overview - Full architecture and advanced features
- System Optimization Prompts - Performance tuning and resource management
- Meta-Prompts - Conversation management and utilities
Performance refinement - Complete guides for system optimization and performance tuning
- Environment Optimization Quick Reference - Complete optimization guide with cards and workflows
- Cursor IDE Optimization - IDE performance tuning guide
Performance insights - Monitoring and analytics systems
- Metrics & Monitoring - Performance tracking and dashboards
- Operations Documentation - Environment optimization tools
- Scripts Documentation - Environment management tools
- Test Suite - Validation and testing with interactive and automated modes
- Contributing Guidelines - Development standards
- Security Policies - Security and audit information
[*] Leverage what works well, share how you implement it, and please contribute if you would like to.
This is an experimental personal project, but I welcome contributions! Please see our Contributing Guidelines for details.
If you discover a security vulnerability, please report it privately. See our Security Policy for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Maintainer: simien Issues and questions: GitHub Issues Security reports: see SECURITY.md
CHANGELOG.md- Project version history and release notesCONTRIBUTING.md- Development standards and contribution guidelinesSECURITY.md- Security policies and vulnerability reporting
prompts/- Versioned, validated, audited prompt library (the Contextual Prompt Router)ops/- Environment optimization tools (monitoring, cleanup, Docker) plusrun-prompt.shmetrics/- Performance tracking and analytics dashboardsscripts/- Environment management, prompt validation/analytics, and automation toolsdocs/- Comprehensive documentation and guidestests/- Validation and testing suiteconfig/- Project configuration and settingssecurity/- Security policies and audit reports
logs/- Application and system logsexamples/- Usage examples and demonstrations.github/- GitHub workflows and templates