$npx -y skills add jmstar85/oh-my-githubcopilot --skill self-improveAutonomous evolutionary code improvement engine with tournament selection. Activate when user says: self-improve, self improve, evolve code, improve iteratively, tournament, benchmark loop, optimize code.
| 1 | # Self-Improvement Orchestrator |
| 2 | |
| 3 | Autonomous loop controller for evolutionary code improvement. Manages the full lifecycle: setup, research, planning, execution, tournament selection, history recording, and stop-condition evaluation. |
| 4 | |
| 5 | ## When to Use |
| 6 | - You want to iteratively improve a codebase toward a measurable benchmark goal |
| 7 | - Optimization tasks: performance, bundle size, test coverage, accuracy |
| 8 | - Code quality improvement with measurable metrics |
| 9 | |
| 10 | ## When NOT to Use |
| 11 | - No measurable benchmark available |
| 12 | - One-shot fix or feature request → use `/omg-autopilot` |
| 13 | - Manual, interactive coding → use `/ralph` |
| 14 | |
| 15 | ## Autonomous Execution Policy |
| 16 | |
| 17 | **NEVER stop or pause to ask the user during the improvement loop.** Once the gate check passes and the loop begins, run fully autonomously until a stop condition is met. |
| 18 | |
| 19 | - Do not ask for confirmation between iterations |
| 20 | - On agent failure: retry once, then skip and continue |
| 21 | - On all plans rejected: log it, continue to next iteration |
| 22 | - The only things that stop the loop are the stop conditions in Step 11 |
| 23 | |
| 24 | ## State Tracking |
| 25 | |
| 26 | All state lives under `.omg/self-improve/`: |
| 27 | |
| 28 | ``` |
| 29 | .omg/self-improve/ |
| 30 | ├── config/ |
| 31 | │ ├── settings.json # agents, benchmark, thresholds, sealed_files |
| 32 | │ ├── goal.md # Improvement objective + target metric |
| 33 | │ ├── harness.md # Guardrail rules (H001/H002/H003) |
| 34 | │ └── idea.md # User experiment ideas |
| 35 | ├── state/ |
| 36 | │ ├── agent-settings.json # iterations, best_score, status, counters |
| 37 | │ ├── iteration_state.json # Within-iteration progress (resumability) |
| 38 | │ ├── research_briefs/ # Research output per round |
| 39 | │ ├── iteration_history/ # Full history per round |
| 40 | │ ├── merge_reports/ # Tournament results |
| 41 | │ └── plan_archive/ # Archived plans (permanent) |
| 42 | ├── plans/ # Active plans (current round) |
| 43 | └── tracking/ |
| 44 | ├── raw_data.json # All candidate scores |
| 45 | ├── baseline.json # Initial benchmark score |
| 46 | └── events.json # Config changes |
| 47 | ``` |
| 48 | |
| 49 | ## Agent Mapping |
| 50 | |
| 51 | | Step | Role | Agent | Purpose | |
| 52 | |------|------|-------|---------| |
| 53 | | Research | Codebase analysis | @explore + @architect | Hypothesis generation | |
| 54 | | Planning | Hypothesis → plan | @planner | Structured plan per agent | |
| 55 | | Architecture Review | 6-point review | @architect | Advisory review | |
| 56 | | Critic Review | Harness enforcement | @critic | Approve/reject plans | |
| 57 | | Execution | Implement + benchmark | @executor | Implement plan faithfully | |
| 58 | | Git Operations | Merge/tag/PR | @git-master | Atomic merge operations | |
| 59 | |
| 60 | ## Setup Phase |
| 61 | |
| 62 | ### Interactive Hook Protocol (Setup Only) |
| 63 | |
| 64 | **MANDATORY**: Use `vscode_askQuestions` for all user decisions during setup (when available). |
| 65 | If `vscode_askQuestions` is NOT available (e.g., Copilot CLI), present numbered options in markdown and ask the user to respond with a number or freeform text. |
| 66 | Once the improvement loop begins (after gate passes), run fully autonomously — no hooks. |
| 67 | |
| 68 | ### When to Fire Hooks |
| 69 | | Trigger Point | Question Type | |
| 70 | |---------------|---------------| |
| 71 | | Step 1: Repo path | Confirm or select target repo | |
| 72 | | Step 4: Trust confirmation | Confirm benchmark execution consent | |
| 73 | | Step 5: Goal interview | Socratic goal-setting questions (Objective, Metric, Target, Scope) | |
| 74 | | Step 7: Harness rules | Confirm/customize harness rules | |
| 75 | |
| 76 | 1. Check if target repo path exists. If not configured: |
| 77 | **HOOK**: Ask user for target repo path via `vscode_askQuestions`: |
| 78 | ``` |
| 79 | header: "self-improve-target" |
| 80 | question: "Which repository should be improved?" |
| 81 | options: [ |
| 82 | { label: "[current workspace path]", recommended: true }, |
| 83 | { label: "Other — I'll specify the path" } |
| 84 | ] |
| 85 | allowFreeformInput: true |
| 86 | ``` |
| 87 | 2. Create `.omg/self-improve/` directory structure. |
| 88 | 3. Read `agent-settings.json`. Check setup flags. |
| 89 | 4. **HOOK: Trust confirmation** (mandatory) via `vscode_askQuestions`: |
| 90 | ``` |
| 91 | header: "self-improve-trust" |
| 92 | question: "Self-improve will run benchmarks and modify code in [repo path]. This includes running tests, builds, and git operations. Confirm?" |
| 93 | options: [ |
| 94 | { label: "Yes, I trust this — proceed", recommended: true }, |
| 95 | { label: "No, abort" } |
| 96 | ] |
| 97 | allowFreeformInput: false |
| 98 | ``` |
| 99 | - If declined: abort immediately. |
| 100 | - Record consent: `trust_confirmed: true` |
| 101 | 5. If goal not set → **HOOK: Socratic goal interview** via sequential `vscode_askQuestions`: |
| 102 | - Q1: Objective ("What do you want to improve?") with options: performance, test coverage, bundle size, code quality, accuracy, other |
| 103 | - Q2: Metric ("How should we measure it?") with context-derived options |
| 104 | - Q3: Target ("What's the target value?") with freeform |
| 105 | - Q4: Sco |