Dustfiles are targeted, automated repair scripts that embody the principles of self-diagnostic, self-healing, fault-tolerant systems. They are inspired by Microsoft’s automated repair tools but designed for the hyperpolymath ecosystem.
Dustfiles MUST:
-
Detect Specific Problems - Identify exact issues, not just symptoms
-
Provide Targeted Fixes - Offer precise, automated repairs
-
Offer Clear Explanations - Explain what’s wrong and what’s being fixed
-
Integrate with Feedback - Report usage and outcomes for continuous improvement
-
Support Exhausted Users - Provide escalation paths when automated repair fails
Dustfiles MUST be named according to the pattern:
<app-name>-dustfile.shWhere <app-name> matches the application’s main executable or identifier.
Dustfiles MUST implement these core functions:
--diagnose, -d # Run diagnostics only (read-only, safe)
--repair, -r # Attempt automated repair (may make changes)
--full-repair, -f # Comprehensive repair (stops services, cleans up)
--help, -h # Show help and usageDustfiles MUST check for these common issues:
-
Process State - Is the server/application running?
-
Port Conflicts - Is the required port available?
-
Dependencies - Are all required tools/libraries installed?
-
Log Errors - Are there errors in the application logs?
-
Configuration - Are configuration files valid?
Dustfiles MUST provide automated fixes for detectable issues:
-
Port Conflict Resolution - Identify and optionally kill conflicting processes
-
Dependency Installation - Automatically install missing system dependencies
-
Server Restart - Attempt to restart failed services with verbose logging
-
Log Rotation - Clean up or archive excessive log files
-
Configuration Repair - Fix common configuration errors
Dustfiles MUST provide:
-
Clear Status Messages - Color-coded output (✓ success, ✗ failure, ? unknown)
-
Actionable Guidance - Specific commands users can run
-
Documentation Links - References to relevant Dustfiles and documentation
-
Escalation Paths - Next steps when automated repair fails
Dustfiles MUST integrate with:
-
Feedback-o-tron - Report usage and outcomes for telemetry
-
Hypatia - Provide LLM-assisted troubleshooting
-
Exhausted Support - Escalation when users have tried everything
Dustfiles MUST report events to feedback-o-tron (if available):
# Report dustfile usage
feedback-o-tron --event "dustfile:used" \
--app "$APP_NAME" \
--mode "$MODE" \
--success "$SUCCESS" \
2>/dev/null || true
# Report specific repairs
feedback-o-tron --event "dustfile:repair_attempted" \
--app "$APP_NAME" \
--issue "port_conflict" \
--success "$SUCCESS" \
2>/dev/null || trueDustfiles MUST provide Hypatia integration points:
-
Diagnostic Assistance: [source,bash] ---- hypatia diagnose --app $APP_NAME --log $LOG_FILE ----
-
Exhausted Support: [source,bash] ---- hypatia exhausted --app $APP_NAME --log $LOG_FILE --dustfile $0 ----
Dustfiles SHOULD collect anonymous telemetry for pattern analysis:
-
Usage Patterns - Which repair modes are most used
-
Success Rates - Which repairs succeed/fail
-
Error Patterns - Common issues across users
-
Environment Data - OS, dependencies, configurations
Telemetry MUST: - Be opt-out (respect user privacy) - Not include sensitive data - Help identify common issues for script improvement - Feed into continuous improvement loops
See dustfile-template.sh for a complete reference implementation.
Applications in the hyperpolymath ecosystem:
-
MUST provide a Dustfile for user-facing components
-
MUST document Dustfile usage in README/ERROR messages
-
SHOULD integrate Dustfile checks into launcher scripts
-
SHOULD update Dustfiles when new issues are discovered
Dustfiles complement other standards:
-
E-Grade Launchers: Dustfiles handle repair when launchers fail
-
Feedback-o-tron: Dustfiles provide targeted telemetry
-
Hypatia Rules: Dustfiles integrate LLM assistance
-
Consent-Aware HTTP: Dustfiles respect privacy in telemetry
Dustfiles may evolve to include:
-
AI-Generated Repairs: Hypatia suggesting new repair strategies
-
Pattern Learning: Automatically updating from telemetry
-
Cross-Application: Sharing repair patterns between apps
-
Predictive: Anticipating issues before they occur