Canonical runtime-backed view of the artifact, independent from metadata governance.
{
"frontmatter": {
"description": "Generic self-improvement tool — give it any code file, test command, and metric to optimize autonomously",
"name": "autosolve"
},
"kind": "skill",
"playbook": "# AutoSolve — Generic Self-Improvement Skill\n\n## Overview\n\nAutoSolve is a universal optimization loop that uses Hera IPC to iteratively improve any code, configuration, or text file toward a measurable goal.\n\n## How It Works\n\n```\nREAD target file → ASK LLM for one change → APPLY → TEST → KEEP if better, DISCARD if worse → LOOP\n```\n\n## Usage\n\n```bash\nbash ~/Programs/apps/OS/Autoresearch/scripts/autosolve.sh \\\n --target FILE \\\n --test \"COMMAND\" \\\n --metric METRIC_NAME \\\n --goal \"DESCRIPTION\" \\\n [--direction minimize|maximize] \\\n [--max-iters N] \\\n [--patch-mode auto|text|python_ast] \\\n [--stop-when-goal-met] \\\n [--goal-threshold N]\n```\n\n## Built-in Metric Extractors\n\n| Metric name | What it parses | Example output |\n|-------------|---------------|----------------|\n| `test_pass_count` | Rust/Python test pass count | `15 passed` |\n| `test_fail_count` | Test failure count | `3 failed` |\n| `error_count` | Lines containing \"error\" | lint output |\n| `warning_count` | Lines containing \"warning\" | compiler output |\n| `latency_ms` | Millisecond values | `Avg 12.34ms` |\n| `score` / `accuracy` | Score/accuracy values | `accuracy: 92.5%` |\n| `bundle_size_kb` | File size in KB | `245 kB` |\n\nFor custom metrics, use `--metric-regex` with a Perl-compatible regex.\n\n## Examples\n\n### Fix Rust compilation errors\n```bash\nautosolve --target src/main.rs \\\n --test \"cargo build 2>&1\" \\\n --metric error_count \\\n --direction minimize \\\n --goal \"Fix all compilation errors\"\n```\n\n### Improve prompt accuracy\n```bash\nautosolve --target prompts/system.txt \\\n --test \"python eval_prompt.py\" \\\n --metric accuracy \\\n --goal \"Improve answer accuracy above 90%\"\n```\n\n### Reduce API response time\n```bash\nautosolve --target src/handler.rs \\\n --test \"wrk -t2 -c10 -d5s http://localhost:3000/api\" \\\n --metric latency_ms \\\n --direction minimize \\\n --goal \"Reduce average latency below 50ms\"\n```\n\n## Prerequisites\n\n- `jq` for JSON parsing\n- `python3` for find/replace and comparisons\n- Hera IPC running at `/tmp/hera-core.sock`\n\n## Output\n\n- Real-time progress in terminal\n- `autosolve_results.tsv` with full experiment log\n- `autosolve_run_YYYYMMDD-HHMMSS.log` with per-iteration logs\n- `autosolve_last_proposal.json` and `autosolve_last_test_output.txt` for debugging\n- Git commits for each kept improvement when the target repo worktree is clean\n\n## Benchmark Pack\n\nRun the included benchmark suite:\n\n```bash\ncd ~/Programs/apps/OS/Autoresearch\nbash scripts/run_autosolve_benchmarks.sh\n```\n\nThis resets each fixture to a buggy seed and reports whether AutoSolve reached the goal.\n",
"summary": {
"description": "Generic self-improvement tool — give it any code file, test command, and metric to optimize autonomously",
"id": "autosolve",
"kind": "skill",
"path": "Skills/autosolve/SKILL.md",
"title": "autosolve"
},
"validation_issues": []
}