self-improve
Skill40k starsChanged 2 months agoMITView on GitHub
Autonomous evolutionary code improvement engine with tournament selection
- Commits and pushes
15 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- forefy/.contexttheir own version, first seen Sep 29, 2026
- eai-org/agent-toolkittheir own version, first seen Sep 13, 2026
- randomittin/heimdalltheir own version, first seen Sep 3, 2026
- strikersam/autonomous-ai-agencytheir own version, first seen Aug 30, 2026
- aaronjmars/miroshark-aeontheir own version, first seen Aug 20, 2026
- aeonfun/aeontheir own version, first seen Aug 20, 2026
Who's talking about Yeachan-Heo/oh-my-claudecode
- @camilleroux.com“oh-my-claudecode : orchestration multi-agents pour Claude Code, pensée pour des équipes de workers (Codex, …”Bluesky · Apr 6, 2026 · 8 likes
- TechNickAI/ai-coding-config“Upgrade skill frontmatter for declarative composition (pipelines, handoffs, model hints)”GitHub · May 4, 2026 · 2 reactions
- TechNickAI/ai-coding-config“Add verify-deliverables SubagentStop hook to harden subagent completion claims”GitHub · May 4, 2026 · 2 reactions
- @github-trending-js.bsky.social“💎 Hidden Gem! 💎 (1000+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 17,120 (+1,785) 🗒 TypeScript …”Bluesky · Mar 31, 2026 · 2 likes
- @github-trending.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 11,966 (+576) 🗒 TypeScript …”Bluesky · Mar 27, 2026 · 2 likes
The biggest 5 of 60 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 60
Talked about on GitHub and Bluesky (60 times).
On GitHub · 50
- May 4, 2026Upgrade skill frontmatter for declarative composition (pipelines, handoffs, model hints) — TechNickAI/ai-coding-config2 reactions · 2 comments
- May 4, 2026Add verify-deliverables SubagentStop hook to harden subagent completion claims — TechNickAI/ai-coding-config2 reactions · 2 comments
- May 5, 2026[redesign-research] oh-my-claudecode first-pass survey (cycle 75 dispatch — companion to oh-my-codex per #2774) — EvaLok/schema-org-json-ld1 reaction · 3 comments
- Mar 8, 2026feat: Add OMC (oh-my-claudecode) and OMX (oh-my-codex) agent runners — junhoyeo/contrabass1 reaction · 1 comment
- Feb 6, 2026fix(ai-dev): use Claude Code plugin system for oh-my-claudecode — danstis/coder-templates1 reaction
45 more on GitHub
- Nov 23, 2026🤖 [auto] 죽은 링크 3개 제거 (2026-11-23) — J-nowcow/awesome-korean-agent-skills0 reactions
- Nov 20, 2026Find quick wins from other multi-agent setups that cut friction — roykollensvendsen/claude-voice0 reactions
- Nov 20, 2026Start workers on demand and let them exit when their task is done — roykollensvendsen/claude-voice0 reactions
- Nov 19, 2026🤖 [auto] 죽은 링크 2개 제거 (2026-11-19) — J-nowcow/awesome-korean-agent-skills0 reactions
- Nov 11, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.8.5 → 5.8.6 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.8.4 → 5.8.6 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.8.4 → 5.8.6 — sudosubin/agents.nix0 reactions
- Nov 11, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.8.4 → 5.8.5 — sudosubin/agents.nix0 reactions
- Nov 10, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.8.3 → 5.8.4 — sudosubin/agents.nix0 reactions
- Nov 10, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.8.3 → 5.8.4 — sudosubin/agents.nix0 reactions
- Nov 10, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.8.3 → 5.8.4 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.8.2 → 5.8.3 — sudosubin/agents.nix0 reactions
- Nov 9, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.8.1 → 5.8.3 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.8.1 → 5.8.3 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.8.1 → 5.8.2 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.8.0 → 5.8.1 — sudosubin/agents.nix0 reactions
- Nov 9, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.8.0 → 5.8.1 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.8.0 → 5.8.1 — sudosubin/agents.nix0 reactions
- Nov 8, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.31 → 5.8.0 — sudosubin/agents.nix0 reactions
- Nov 8, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.31 → 5.8.0 — sudosubin/agents.nix0 reactions
- Nov 8, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.31 → 5.8.0 — sudosubin/agents.nix0 reactions
- Nov 4, 2026Review and adopt oh-my-claudecode patterns — cbartens/bkit0 reactions · 1 comment
- Nov 3, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.30 → 5.7.31 — sudosubin/agents.nix0 reactions
- Nov 3, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.30 → 5.7.31 — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.30 → 5.7.31 — sudosubin/agents.nix0 reactions
- Nov 2, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.29 → 5.7.30 — sudosubin/agents.nix0 reactions
- Nov 2, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.29 → 5.7.30 — sudosubin/agents.nix0 reactions
- Nov 2, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.29 → 5.7.30 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.26 → 5.7.29 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.27 → 5.7.29 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.26 → 5.7.27 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.25 → 5.7.29 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.25 → 5.7.26 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.25 → 5.7.26 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.24 → 5.7.25 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.24 → 5.7.25 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.24 → 5.7.25 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.yeachan-heo.oh-my-claudecode: 5.7.23 → 5.7.24 — sudosubin/agents.nix0 reactions
- Oct 31, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.23 → 5.7.24 — sudosubin/agents.nix0 reactions
- Oct 31, 2026claude-code-plugins.github.yeachan-heo.oh-my-claudecode: 5.7.23 → 5.7.24 — sudosubin/agents.nix0 reactions
- Oct 31, 2026claude-code-marketplaces.github.yeachan-heo.oh-my-claudecode: 5.7.22 → 5.7.23 — sudosubin/agents.nix0 reactions
- Oct 16, 2026Telemetry for Claude Code marketplace plugin installs via plugin hooks — aws-solutions/konductor0 reactions
- Oct 4, 2026copycat: deletion-first cleanup stage in /etp — lucasmccomb/ccgm0 reactions
- Oct 4, 2026copycat: off/shadow/active rollout for autoheal and dreaming decisions — lucasmccomb/ccgm0 reactions
- Oct 4, 2026copycat: read-budget hook - deny unranged Read of large files — lucasmccomb/ccgm0 reactions
On Bluesky · 10
- Apr 6, 2026oh-my-claudecode : orchestration multi-agents pour Claude Code, pensée pour des équipes de workers (Codex, Gemini, Claude) qui tournent en… — @camilleroux.com8 likes and reposts · 1 reply
- Mar 31, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 17,120 (+1,785) 🗒 TypeScript Teams-first Multi-agent orchestration… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Mar 27, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 11,966 (+576) 🗒 TypeScript Teams-first Multi-agent orchestration… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Oct 10, 2026📦 Yeachan-Heo / oh-my-claudecode ⭐ 39,757 (+44) 🗒 TypeScript Teams-first Multi-agent orchestration for Claude Code — @github-trending-js.bsky.social1 likes and repost
- Apr 1, 2026Claude Code使いなら「oh-my-claudecode」は絶対に入れるべき。 複数エージェントをスタックしてタスク実行できる仕組みが神すぎる。特に`/team`コマンドで「プラン→実行→検証→修正」のパイプラインを自動化できるのは、手動作業の次元が違う。… — @woody-ai-tools.bsky.social1 likes and repost
5 more on Bluesky
- Mar 29, 2026今日のGitHubトレンド Yeachan-Heo/oh-my-claudecode Claude Code向けのマルチエージェントオーケストレーションツールです。 Claude Code自体の学習は不要で、簡単に利用できます。… — @dailygithubtrends.bsky.social1 likes and repost
- Mar 28, 2026github.com/Yeachan-Heo/oh-... GitHub - Yeachan-Heo/oh-my-claudecode: Teams-first Multi-agent orchestration for Claude Code — @technews4869.bsky.social1 likes and repost
- Mar 27, 2026oh-my-claudecodeはClaude Code向けのチーム重視型マルチエージェントオーケストレーションツールらしい 複雑なコーディング作業を自動化したい開発者には便利そうかな yug1224 starred Yeachan-Heo/oh-my-claudecode… — @yug1224.com1 likes and repost
- Mar 30, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 16,968 (+1,785) 🗒 TypeScript Teams-first Multi-agent orchestration… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Mar 26, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 Yeachan-Heo / oh-my-claudecode ⭐ 11,966 (+576) 🗒 TypeScript Teams-first Multi-agent orchestration… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- aeonfun/aeon★ 766same name
- forefy/.context★ 151same name
- eai-org/agent-toolkit★ 55same name
- neuron-one/GODMODE★ 33same name
- aaronjmars/miroshark-aeon★ 18same name
- shahshrey/unclaw★ 16same name
- allemaar/open-skills★ 14same name
- naman10parikh/agentgrid★ 9same name
- strikersam/autonomous-ai-agency★ 9same name
- randomittin/heimdall★ 5same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- commandsSkill
- agent-doc-disciplineSkill
- ai-slop-cleanerSkill
- architecture-surveySkill
- ask-navigatorSkill
- askSkill
- autopilotSkill
- autoresearchSkill
- cancelSkill
- configure-notificationsSkill
- debugSkill
- deepinitSkill
- deep-interviewSkill
- diagramSkill
- drydockSkill
- executeSkill
- external-contextSkill
- graphSkill
- harborSkill
- hudSkill
- intentSkill
- launchSkill
- loftSkill
- mapSkill
- minimal-code-disciplineSkill
- minimal-prose-disciplineSkill
- omc-doctorSkill
- omc-setupSkill
- omc-planSkill
- project-session-managerSkill
- prSkill
- ralphSkill
- ralplanSkill
- refitSkill
- releaseSkill
- rememberSkill
- researchSkill
- omc-reviewSkill
- skillifySkill
- skillSkill
- tddSkill
- teamSkill
- traceSkill
- ultragoalSkill
- verifySkill
- visual-verdictSkill
- wikiSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
48 rules. 0 are common, 14 are distinctive, and 34 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
34
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
When the user provides a topic or slug, use .omc/self-improve/topics/{topic_slug}/.
- Very specific: line 37
Treat <self-improve-root>/ below as that resolved root:
- Distinctive: line 67
All augmentations delivered via Task description context at spawn time.
- Very specific: line 80
Research prompt: Read si-researcher.md from this skill directory and pass its content as the agent prompt.
- Very specific: line 82
Benchmark builder: Read si-benchmark-builder.md from this skill directory and pass its content as the agent prompt.
- Very specific: line 84
Goal clarifier: Read si-goal-clarifier.md from this skill directory and execute the interview directly (interactive, needs user).
- Distinctive: line 90
Read these files at startup and at the beginning of each iteration:
- Distinctive: line 104
Check if target repo path exists.
- Very specific: line 106
Create the <self-improve-root>/ directory structure by copying from templates/ in this skill directory into the resolved config/ root.
- Very specific: line 107
Read <self-improve-root>/state/agent-settings.json.
- Very specific: line 115
If goal not set → read si-goal-clarifier.md from this skill directory and run the 4-dimension Socratic interview directly in this context …
- Very specific: line 116
If benchmark not set → read si-benchmark-builder.md from this skill directory, spawn a custom Agent(model=opus) with its content as prompt.
- Very specific: line 117
After benchmark is set, confirm the benchmark command with user: "Benchmark command: {benchmark_command}.
- Distinctive: line 119
If user declines: abort setup and exit.
- Very specific: line 120
If harness not set → confirm default harness rules (H001/H002/H003) with user or customize.
- Very specific: line 121
Gate: All of si_setting_goal, si_setting_benchmark, si_setting_harness, trust_confirmed must be true.
- Very specific: line 128
Mode exclusivity: Call state_list_active. If autopilot or ralph is active, refuse to start.
- Very specific: line 129
Write initial state: state_write(mode='self-improve', active=true, iteration=0, started_at=<now>)
- Distinctive: line 135
All git operations happen inside the target repo, NOT in the OMC project root.
- Distinctive: line 156
Gate: All settings must be true.
- Very specific: line 166
Run git -C {repo_path} worktree prune to clean up stale references
- Very specific: line 175
Read state via state_read(mode='self-improve').
- Very specific: line 177
If state is cleared (cancel was invoked) OR status is user_stopped: a.
- Very specific: line 186
Read <self-improve-root>/config/idea.md.
- Distinctive: line 202
If researcher fails, proceed with history only.
- Distinctive: line 242
If ALL plans rejected, log and skip to Step 9.
- Distinctive: line 268
Collect: all executor results
- Very specific: line 278
If a winner was accepted AND auto_push is true in settings: Push improvement branch: git -C {repo_path} push origin improve/{goal_slug} …
- Very specific: line 279
If auto_push is false (default): skip push.
- Distinctive: line 280
Archive: all non-winner branches via git-master: tag + delete
- Distinctive: line 281
If no candidate survived the loop: no merge this round.
- Very specific: line 286
Write iteration history to <self-improve-root>/state/iteration_history/round_{n}.json
- Very specific: line 289
If winner AND improvement exceeds plateau_threshold (abs(new_score - best_score) >= plateau_threshold): update best_score, reset …
- Very specific: line 290
If winner AND improvement below threshold (abs(new_score - best_score) < plateau_threshold): update best_score if better, increment …
- Very specific: line 291
If no winner (all rejected, all failed, or all regressed): increment circuit_breaker_count += 1 (do NOT increment plateau_consecutive_count …
- Very specific: line 293
Run python3 {skill_dir}/scripts/plot_progress.py --tracking-dir <self-improve-root>/tracking for visualization
- Very specific: line 304
Update iteration_state.json status to completed.
- Distinctive: line 318
If NO stop condition: immediately go back to Step 1.
- Very specific: line 330
If status: "user_stopped": ask user "Previous run was stopped at iteration {N}.
- Very specific: line 331
If status: "running": session crashed — resume automatically (no user prompt)
- Very specific: line 332
If status: "idle": fresh start
- Distinctive: line 344
When the loop exits:
- Very specific: line 346
Update agent-settings.json with final status
- Very specific: line 347
If target_reached AND auto_pr is true in settings: spawn git-master to create PR from improve/{goal_slug} to upstream.
- Very specific: line 348
If auto_pr is false (default): skip PR creation.
- Very specific: line 349
Run plot_progress.py one final time
- Very specific: line 358
Run /oh-my-claudecode:cancel for clean state cleanup
- Distinctive: line 387
Every plan must be tagged with exactly one:
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Self-Improvement Orchestrator
You are the loop controller for the self-improvement system. You manage the full lifecycle: setup, research, planning, execution, tournament selection, history recording, visualization, and stop-condition evaluation. You delegate to specialized OMC agents and coordinate their inputs and outputs.
Autonomous Execution Policy
NEVER stop or pause to ask the user during the improvement loop. Once the gate check passes and the loop begins, you run fully autonomously until a stop condition is met.
- Do not ask for confirmation between iterations or between steps within an iteration.
- Do not summarize and wait — execute the next step immediately.
- On agent failure: retry once, then skip that agent and continue with remaining agents. Log the failure in iteration history.
- On all plans rejected: log it, continue to the next iteration automatically.
- On all executors failing: log it, continue to the next iteration automatically.
- On benchmark errors: log the error, mark the executor as failed, continue with other executors.
- The only things that stop the loop are the stop conditions in Step 11.
- Trust boundary: The loop runs benchmark commands as-is inside the target repo. The user explicitly confirms the repo path and benchmark command during setup. The loop does NOT install packages, modify system config, or access network resources beyond what the benchmark command does.
- Sealed files: validate.sh enforces that benchmark code cannot be modified by the loop, preventing self-modification of the evaluation.
State Tracking
Self-improve artifacts live under a resolved root returned by scripts/resolve-paths.mjs.
- New runs default to
.omc/self-improve/topics/default/. - When the user provides a topic or slug, use
.omc/self-improve/topics/{topic_slug}/. - Legacy single-track state at
.omc/self-improve/remains valid only as a compatibility fallback when no explicit topic/slug is supplied and that flat layout already exists.
Treat <self-improve-root>/ below as that resolved root:
<self-improve-root>/
├── config/ # User configuration
│ ├── settings.json # agents, benchmark, thresholds, sealed_files
│ ├── goal.md # Improvement objective + target metric
│ ├── harness.md # Guardrail rules (H001/H002/H003)
│ └── idea.md # User experiment ideas
├── state/ # Runtime state
│ ├── agent-settings.json # iterations, best_score, status, counters
│ ├── iteration_state.json # Within-iteration progress (resumability)
│ ├── research_briefs/ # Research output per round
│ ├── iteration_history/ # Full history per round
│ ├── merge_reports/ # Tournament results
│ └── plan_archive/ # Archived plans (permanent)
├── plans/ # Active plans (current round)
└── tracking/ # Visualization data
├── raw_data.json # All candidate scores
├── baseline.json # Initial benchmark score
├── events.json # Config changes
└── progress.png # Generated chartOMC mode lifecycle: .omc/state/sessions/{sessionId}/self-improve-state.json
Agent Mapping
All augmentations delivered via Task description context at spawn time. No modifications to existing agent .md files.
| Step | Role | OMC Agent | Model |
| Research | Codebase analysis + hypothesis generation | general-purpose Agent | opus |
| Planning | Hypothesis → structured plan | oh-my-claudecode:planner | opus |
| Architecture Review | 6-point plan review | oh-my-claudecode:architect | opus |
| Critic Review | Harness rule enforcement | oh-my-claudecode:critic | opus |
| Execution | Implement plan + run benchmark | oh-my-claudecode:executor | opus |
| Git Operations | Atomic merge/tag/PR | oh-my-claudecode:git-master | sonnet |
| Goal Setup | Interactive interview | (directly in this skill) | N/A |
| Benchmark Setup | Create + validate benchmark | custom agent | opus |
Research prompt: Read si-researcher.md from this skill directory and pass its content as the agent prompt.
Benchmark builder: Read si-benchmark-builder.md from this skill directory and pass its content as the agent prompt.
Goal clarifier: Read si-goal-clarifier.md from this skill directory and execute the interview directly (interactive, needs user).
Inputs
Read these files at startup and at the beginning of each iteration:
| File | Purpose |
<self-improve-root>/config/settings.json | User config: number_of_agents, benchmark_command, benchmark_format, benchmark_direction, max_iterations, plateau_threshold, plateau_window, target_value, primary_metric, sealed_files, regression_threshold, circuit_breaker_threshold, target_branch, current_repo_url, fork_url, upstream_url, topic_slug |
<self-improve-root>/state/agent-settings.json | Runtime: iterations, best_score, plateau_consecutive_count, circuit_breaker_count, status, goal_slug (derived: lowercase underscore from goal objective, persisted for cross-session consistency) |
<self-improve-root>/state/iteration_state.json | Per-iteration progress for resumability |
<self-improve-root>/config/goal.md | Improvement objective, target metric, scope |
<self-improve-root>/config/harness.md | Guardrail rules (H001, H002, H003) |
Setup Phase
- Check if target repo path exists. If not configured, ask user for the path to the repository to improve.
- Resolve
<self-improve-root>by runningnode {skill_dir}/scripts/resolve-paths.mjs --project-root {repo_path} [--topic "..."] [--slug "..."] --ensure-dirs. - Create the
<self-improve-root>/directory structure by copying fromtemplates/in this skill directory into the resolvedconfig/root. - Read
<self-improve-root>/state/agent-settings.json. Checksi_setting_goal,si_setting_benchmark,si_setting_harness. - Trust confirmation (mandatory, cannot be skipped):
a. If
trust_confirmedis alreadytruein agent-settings.json, skip to step 5 (resume path). b. Display the target repo path and ask user to confirm:"Self-improve will run benchmark commands inside {repo_path}. This executes arbitrary code in that repository. Confirm? [yes/no]"c. If user declines: abort setup and exit. Do NOT proceed. d. Record consent: settrust_confirmed: truein agent-settings.json. - Persist
topic_slugintoconfig/settings.jsonwhen the resolved root is topic-scoped so future resumes stay on the same track. - If goal not set → read
si-goal-clarifier.mdfrom this skill directory and run the 4-dimension Socratic interview directly in this context (Objective, Metric, Target, Scope). Write result to<self-improve-root>/config/goal.md. - If benchmark not set → read
si-benchmark-builder.mdfrom this skill directory, spawn a custom Agent(model=opus) with its content as prompt. The agent surveys the repo, creates or wraps a benchmark, validates 3x, and records baseline. After benchmark is set, confirm the benchmark command with user:"Benchmark command: {benchmark_command}. This will be run repeatedly during the loop. Confirm? [yes/no]"If user declines: abort setup and exit. - If harness not set → confirm default harness rules (H001/H002/H003) with user or customize.
- Gate: All of
si_setting_goal,si_setting_benchmark,si_setting_harness,trust_confirmedmust be true. - Create improvement branch (if it does not exist):
Wheregit -C {repo_path} checkout -b improve/{goal_slug} {target_branch} git -C {repo_path} checkout {target_branch}{goal_slug}is derived from the goal objective (lowercase, underscored). If the branch already exists, skip creation. Persistgoal_slugin agent-settings.json. - Mode exclusivity: Call
state_list_active. If autopilot or ralph is active, refuse to start. - Write initial state:
state_write(mode='self-improve', active=true, iteration=0, started_at=<now>)
Git Strategy
All git operations happen inside the target repo, NOT in the OMC project root.
- Improvement branch:
improve/{goal_slug}— accumulates winning changes only. - Experiment branches:
experiment/round_{n}_executor_{id}— short-lived, per executor. - Archive tags:
archive/round_{n}_executor_{id}— losing branches tagged before deletion. - Worktree setup (SKILL.md creates before each executor):
git -C {repo_path} worktree add worktrees/round_{n}_executor_{id} -b experiment/round_{n}_executor_{id} improve/{goal_slug} - Winner merges via
oh-my-claudecode:git-master:Merge experiment/round_{n}_executor_{winner_id} into improve/{goal_slug} with --no-ff Message: "Iteration {n}: {hypothesis} (score: {before} → {after})" - Push after merge:
git -C {repo_path} push origin improve/{goal_slug}(backup, non-blocking) - Losers archived: Tag + delete via git-master.
Improvement Loop
Gate: All settings must be true. Once the gate passes, execute continuously without stopping.
Update state_write(mode='self-improve', active=true, status="running").
Step 0 — Stale Worktree Cleanup (mandatory, runs every iteration)
PREREQUISITE: This step MUST run to completion before any other step, including resume logic. It is idempotent and safe to run multiple times.
- List all worktrees in the target repo:
git -C {repo_path} worktree list - For any worktree matching
worktrees/round_*that does NOT belong to the current iteration: remove it withgit -C {repo_path} worktree remove {path} --force - Run
git -C {repo_path} worktree pruneto clean up stale references - This handles crash recovery — orphaned worktrees from interrupted iterations are cleaned before the new iteration starts
Step 1 — Refresh State
state_write(mode='self-improve', active=true, iteration=N) to reset 30min TTL.
Step 2 — Check Stop Request
Read state via state_read(mode='self-improve').
If state is cleared (cancel was invoked) OR status is user_stopped:
a. Set status: "user_stopped" in <self-improve-root>/state/agent-settings.json
b. Update iteration_state.json: set status: "interrupted", record current_step
c. Clean up any active worktrees for the current round (Step 0 logic)
d. Log: "Self-improve stopped by user at iteration {N}, step {current_step}"
e. Exit gracefully — do NOT invoke /cancel again (already cancelled)
Step 3 — Check User Ideas
Read <self-improve-root>/config/idea.md. If non-empty, snapshot contents for planners. Clear after planners consume.
Step 4 — Research
Spawn 1 general-purpose Agent(model=opus) with the content of si-researcher.md as prompt.
Pass in the prompt:
- Current iteration number
- Path to target repo
- Path to
<self-improve-root>/config/goal.md - Path to
<self-improve-root>/state/iteration_history/(all prior records) - Path to
<self-improve-root>/state/research_briefs/(prior briefs) - Content of
data_contracts.mdSection 3 (Research Brief schema)
Expected output: research brief JSON → <self-improve-root>/state/research_briefs/round_{n}.json
If researcher fails, proceed with history only.
Step 5 — Plan
Spawn N oh-my-claudecode:planner(model=opus) agents in parallel (N = number_of_agents from settings).
Pass in each planner's prompt:
- Planner identity (planner_a, planner_b, planner_c...)
- Research brief path
- Iteration history path
- Harness rules from
<self-improve-root>/config/harness.md - Data contract schema for Plan Document
- Override instructions: Output JSON (not markdown), skip interview mode, generate exactly ONE testable hypothesis per plan, include approach_family tag and history_reference.
- User ideas (if any, planner_a gets priority)
Expected output: Plan Document JSON → <self-improve-root>/plans/round_{n}/plan_planner_{id}.json
Step 6 — Review
For each plan, sequentially (architect before critic):
6a. Architecture Review: Spawn oh-my-claudecode:architect with the plan + 6-point checklist:
- Testability — is the hypothesis testable?
- Novelty — different from prior attempts?
- Scope — right-sized?
- Target files — exist, not sealed?
- Implementation clarity — executor can implement without guessing?
- Expected outcome — realistic given evidence?
Architect verdict is advisory only.
6b. Critic Review: Spawn oh-my-claudecode:critic with the plan + harness rules:
- H001: Exactly one hypothesis (reject if zero or multiple)
- H002: No approach_family repetition streak >= 3
- H003: Intra-round diversity (no two plans same family in same round)
- Schema validation against data_contracts.md
- History awareness check
Critic sets critic_approved: true or false. Plans with false are excluded from execution.
If ALL plans rejected, log and skip to Step 9.
Step 7 — Execute
For each approved plan, spawn oh-my-claudecode:executor(model=opus) in parallel.
Before spawning, create worktree:
git -C {repo_path} worktree add worktrees/round_{n}_executor_{id} -b experiment/round_{n}_executor_{id} improve/{goal_slug}Pass in each executor's prompt:
- The approved plan JSON
- Worktree directory path
- Benchmark command from settings
- Sealed files list from settings
- Path to
scripts/validate.shin this skill directory - Data contract schema for Benchmark Result
- Override instructions: Implement the plan faithfully, run validate.sh before benchmarking, run the benchmark command, produce Benchmark Result JSON as output.
Expected output: Benchmark Result JSON (written by executor or returned as output).
Step 8 — Tournament Selection
SKILL.md does this directly (not delegated):
- Collect all executor results
- Filter to
status: "success"only. If zero candidates, skip to Step 9 (Record & Visualize). - Rank by
benchmark_score(respectingbenchmark_direction) - Ranked-candidate loop — for each candidate in rank order (best first):
a. No-regression check: candidate score must improve or hold even vs
best_score, respectingbenchmark_direction(higher_is_better: score >= best_score;lower_is_better: score <= best_score) b. Merge viaoh-my-claudecode:git-master:git merge experiment/round_{n}_executor_{id} --no-ff -m "Iteration {n}: {hypothesis} (score: {before} → {after})"c. Re-benchmark on merged state to confirm improvement d. If re-benchmark confirms improvement: accept winner, break loop e. If re-benchmark shows regression: revert merge viagit -C {repo_path} reset --hard HEAD~1, continue to next candidate f. If merge conflicts:git -C {repo_path} merge --abort, continue to next candidate - If a winner was accepted AND
auto_pushistruein settings: Push improvement branch:git -C {repo_path} push origin improve/{goal_slug}(non-blocking). Ifauto_pushisfalse(default): skip push. Log:"Push skipped (auto_push: false). Run manually: git -C {repo_path} push origin improve/{goal_slug}" - Archive all non-winner branches via git-master: tag + delete
- If no candidate survived the loop: no merge this round. Improvement branch stays at prior state.
- Write Merge Report JSON to
<self-improve-root>/state/merge_reports/round_{n}.json(schema: data_contracts.md Section 9).
Step 9 — Record & Visualize
- Write iteration history to
<self-improve-root>/state/iteration_history/round_{n}.json - Update
<self-improve-root>/state/agent-settings.json:- Increment
iterationsby 1 - If winner AND improvement exceeds
plateau_threshold(abs(new_score - best_score) >= plateau_threshold): updatebest_score, resetplateau_consecutive_count = 0, resetcircuit_breaker_count = 0 - If winner AND improvement below threshold (
abs(new_score - best_score) < plateau_threshold): updatebest_scoreif better, incrementplateau_consecutive_count += 1, resetcircuit_breaker_count = 0 - If no winner (all rejected, all failed, or all regressed): increment
circuit_breaker_count += 1(do NOT incrementplateau_consecutive_count— plateau tracks stagnating wins, not failures)
- Increment
- Append to
<self-improve-root>/tracking/raw_data.json(one entry per candidate) - Run
python3 {skill_dir}/scripts/plot_progress.py --tracking-dir <self-improve-root>/trackingfor visualization - Archive plans: copy current round plans to
state/plan_archive/round_{n}/
Step 10 — Cleanup
Remove worktrees:
git -C {repo_path} worktree remove worktrees/round_{n}_executor_{id} --force
git -C {repo_path} worktree pruneUpdate iteration_state.json status to completed.
Step 11 — Stop Condition Check
Evaluate ALL conditions. If ANY is true, exit:
| Condition | Check |
| User stop | status == "user_stopped" in agent-settings or state cleared |
| Target reached | best_score meets/exceeds target_value (respecting direction) |
| Plateau | plateau_consecutive_count >= plateau_window |
| Max iterations | iterations >= max_iterations |
| Circuit breaker | circuit_breaker_count >= circuit_breaker_threshold |
If NO stop condition: immediately go back to Step 1.
Resumability
PREREQUISITE: Step 0 (stale worktree cleanup) MUST run to completion before any resume logic executes, regardless of prior state.
On invocation, before entering the loop:
- Always run Step 0 (stale worktree cleanup) — even on fresh start
- Read
<self-improve-root>/state/agent-settings.json:- If
status: "user_stopped": ask user"Previous run was stopped at iteration {N}. Resume? [yes/no]". If no, exit. If yes, continue. - If
status: "running": session crashed — resume automatically (no user prompt) - If
status: "idle": fresh start
- If
- Re-confirm trust gate only if
trust_confirmedisfalsein agent-settings.json - Read
<self-improve-root>/state/iteration_state.json:status: "in_progress"→ resume fromcurrent_step, skip completed sub-stepsstatus: "completed"→ start next iterationstatus: "failed"→ complete recording step if needed, start next iteration- File missing → start from iteration 1
Completion
When the loop exits:
- Update agent-settings.json with final status
- If
target_reachedANDauto_pristruein settings: spawn git-master to create PR fromimprove/{goal_slug}to upstream. Ifauto_prisfalse(default): skip PR creation. Log:"PR creation skipped (auto_pr: false). Run manually: gh pr create --head improve/{goal_slug} --base {target_branch}" - Run plot_progress.py one final time
- Print summary report:
=== Self-Improvement Loop Complete === Status: {status} Iterations: {iterations} Best Score: {best_score} (baseline: {baseline}) Improvement: {delta} ({delta_pct}%) - Run
/oh-my-claudecode:cancelfor clean state cleanup
Error Handling
| Situation | Action |
| Agent fails to produce output | Retry once. If still no output, log and continue. |
| Researcher produces empty brief | Proceed — planners work from history alone. |
| All plans rejected by critic | Skip execution. Log. Continue to next iteration. |
| All executors fail | Skip tournament. Record failures. Continue. |
| Merge conflict | Reject candidate, try next. |
| Re-benchmark regression | Reject candidate, revert merge, try next. |
| Push failure | Log warning. Continue — push is backup. |
| Worktree already exists | Remove and recreate. |
| Settings corrupted | Report and stop. |
Parallel session caveats
- Multi-repo workspace anchor: drop a
.omc-workspacemarker at the parent directory so multiple sessions across sub-repos share one.omc/. Resolution order:OMC_STATE_DIR > .omc-workspace > git > cwd. Seedocs/REFERENCE.md. - Session id source: OMC_SESSION_ID env var wins in CLI contexts; hook payload data.session_id wins in hook contexts.
- Plan id (when applicable): Self-improve artifact dirs are topic-slug-scoped; for parallel runs with the same topic in the same workspace, expect Wave B2's session-id suffix to land.
- Parallel verdict: supported-with-caveats (topic-slug collision possible; see Wave B2)
Approach Family Taxonomy
Every plan must be tagged with exactly one:
| Tag | Description |
architecture | Model/component structure changes |
training_config | Optimizer, LR, scheduler, batch size |
data | Data loading, augmentation, preprocessing |
infrastructure | Mixed precision, distributed training, compiled kernels |
optimization | Algorithmic/numerical optimizations |
testing | Evaluation methodology changes |
documentation | Documentation-only changes |
other | Does not fit above — explain in evidence |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

