Browse Source

Add reflect and worktrees skills

Alvin Unreal 1 month ago
parent
commit
a2b970d84b

+ 3 - 1
.gitignore

@@ -91,8 +91,10 @@ companion/target/
 .slim/clonedeps/repos/
 # END oh-my-opencode-slim clonedeps
 
-# Local git worktrees for parallel feature work
+# BEGIN oh-my-opencode-slim worktrees
 .slim/worktrees/
+.slim/worktrees.json
+# END oh-my-opencode-slim worktrees
 
 # Deepwork session artifacts
 .slim/deepwork/

+ 0 - 47
AGENTS.md

@@ -100,53 +100,6 @@ oh-my-opencode-slim/
 5. Run `bun test` to verify tests pass
 6. Commit changes
 
-## V2 Branch and Worktree Workflow
-
-Keep `master` stable for the npm `latest` release. Use `v2-beta` as the central
-V2 integration branch: merge focused V2 feature branches there, test the combined
-V2 experience there, and publish npm `beta` releases from there. Do not develop
-unrelated features directly on `v2-beta`; keep it as the shared integration point.
-
-Recommended branch flow:
-
-```text
-master              stable latest users
-v2-beta            central V2 integration/test branch; publish @beta here
-v2/<feature-name>  focused V2 feature branches merged into v2-beta
-```
-
-For new V2 work, branch from `v2-beta`:
-
-```bash
-git checkout v2-beta
-git pull --ff-only origin v2-beta
-git checkout -b v2/<feature-name>
-```
-
-For parallel feature work, prefer a worktree so `v2-beta` stays clean:
-
-```bash
-git worktree add ../oh-my-opencode-slim-v2-<feature-name> \
-  -b v2/<feature-name> v2-beta
-```
-
-Create PRs from `v2/<feature-name>` into `v2-beta`. Merge into `master` only
-when V2 is ready to become the stable `latest` release.
-
-To test all V2 work together, use `v2-beta` after feature branches are merged:
-
-```bash
-git checkout v2-beta
-git pull --ff-only origin v2-beta
-bun run check:ci
-bun run typecheck
-bun test
-```
-
-If a merged feature needs more work, continue on its focused branch or create a
-new `v2/<feature-name>` follow-up branch from the latest `v2-beta`, then merge it
-back into `v2-beta` again when ready.
-
 ## Tmux Session Lifecycle Management
 
 When working with tmux integration, understanding the session lifecycle is crucial for preventing orphaned processes and ghost panes.

+ 30 - 1
README.ja-JP.md

@@ -164,6 +164,8 @@ V2 は oh-my-opencode-slim を、スケジューラー中心のマルチエー
 - **[バックグラウンドエージェント](#バックグラウンドエージェント)** — Orchestrator は専門家をバックグラウンドタスクとしてディスパッチし、タスク/セッション ID を追跡し、完了イベントを待ってから結果を整合します。
 - **[Companion](#companion)** — 任意のフローティングデスクトップウィンドウが、並列実行中のバックグラウンド専門家を含め、現在アクティブなエージェントを表示します。
 - **[Deepwork](#deepwork)** — 大規模、多ファイル、高リスク、または段階的なコーディング作業向けの構造化ワークフローです。永続的な計画ファイルと Oracle レビューゲートを使用します。
+- **[Reflect](#reflect)** — 繰り返される作業パターンを振り返り、再利用可能な skill、エージェント、コマンド、設定ルール、プロンプトルール、プロジェクト playbook を提案します。
+- **[Worktrees](#worktrees)** — 複雑、高リスク、または並列タスク向けに、安全プロトコル付きの隔離されたコーディング lane として Git worktree を管理します。
 - **[oh-my-opencode-slim Skill](#oh-my-opencode-slim-skill)** — モデル、プロンプト、カスタムエージェント、MCP アクセス、プリセット、プラグイン動作を安全に調整するための同梱設定 skill です。
 
 #### バックグラウンドエージェント
@@ -201,6 +203,32 @@ Deepwork は、大規模リファクタリング、多段階機能、高リス
 
 いつ使うべきか、ワークフローがどのように動くかは **[Skills](docs/skills.md#deepwork)** を参照してください。
 
+#### Reflect
+
+Reflect は、Orchestrator が繰り返し発生するワークフロー上の摩擦から学ぶのを助けます。最近の作業と既存の資産を確認し、skill、カスタムエージェント、コマンド、設定ルール、プロンプトルール、MCP 権限変更、プロジェクト playbook の中から、最小で有用な改善を提案します。十分な証拠がない場合は、何も作成しないことを推奨します。
+
+直接実行できます。
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+自然なプロンプトでも利用できます。
+
+```text
+reflect on my recent workflows
+find repeated work worth turning into reusable instructions
+```
+
+完全なワークフローとガードレールは **[Skills](docs/skills.md#reflect)** を参照してください。
+
+#### Worktrees
+
+Worktrees は、Git worktree を `.slim/worktrees/<slug>/` 配下の安全で隔離されたコーディング lane として管理します。Orchestrator が lane のライフサイクルを管理し、`.slim/worktrees.json` に状態を記録し、専門エージェントを lane 内で実行し、Git の状態を変更する前に明示的な確認を求めます。
+
+安全プロトコルは **[Skills](docs/skills.md#worktrees)** を参照してください。
+
 #### oh-my-opencode-slim Skill
 
 同梱の `oh-my-opencode-slim` skill は、Orchestrator がプラグイン自体を設定・改善するのを支援します。モデル調整、カスタムエージェント、プロンプト上書き、skill/MCP 権限、プリセット、任意エージェント、バックグラウンドオーケストレーション、繰り返し発生するワークフロー上の摩擦に利用できます。
@@ -570,6 +598,7 @@ Deepwork は、大規模リファクタリング、多段階機能、高リス
 | **[Multiplexer Integration](docs/multiplexer-integration.md)** | エージェントの動作を Tmux や Zellij のペインでライブ表示します |
 | **[Codemap](docs/codemap.md)** | 階層的なコードマップを生成し、大規模コードベースを迅速に理解します |
 | **[Clonedeps](docs/clonedeps.md)** | 選択した依存関係のソースを ignore 済みのローカルワークスペースにクローンし、調査できるようにします |
+| **[Worktrees](docs/worktrees.md)** | `.slim/worktrees/` lane を使い、隔離された並列または高リスクなコーディング作業を行います |
 | **[Preset Switching](docs/preset-switching.md)** | `/preset` で実行時にエージェントモデルのプリセットを切り替えます |
 | **[Interview](docs/interview.md)** | ブラウザベースの Q&A フローで、ざっくりとしたアイデアを構造化された Markdown 仕様に変換します |
 | **[Companion](docs/companion.md)** | 解析、ヘルプ、型情報のためのフローティングウィンドウ companion |
@@ -582,7 +611,7 @@ Deepwork は、大規模リファクタリング、多段階機能、高リス
 | **[Configuration](docs/configuration.md)** | 設定ファイルの配置場所、JSONC サポート、プロンプトの上書き、全オプションのリファレンス |
 | **[Background Orchestration](docs/background-orchestration.md)** | ネイティブのバックグラウンドサブエージェントを中心にした、スケジューラー優先の Orchestrator モデル |
 | **[Maintainer Guide](docs/maintainers.md)** | Issue のトリアージルール、ラベルの意味、サポートの振り分け、リポジトリ運用ワークフロー |
-| **[Skills](docs/skills.md)** | `simplify`、`codemap`、`clonedeps`、`deepwork`、`oh-my-opencode-slim` などの同梱スキル |
+| **[Skills](docs/skills.md)** | `simplify`、`codemap`、`clonedeps`、`deepwork`、`reflect`、`worktrees`、`oh-my-opencode-slim` などの同梱スキル |
 | **[MCPs](docs/mcps.md)** | `websearch`、`context7`、`gh_grep`、およびエージェントごとの MCP 権限の仕組み |
 | **[Tools](docs/tools.md)** | `webfetch`、LSP ツール、コード検索、フォーマッターなどの組み込みツール機能 |
 

+ 30 - 1
README.ko-KR.md

@@ -162,6 +162,8 @@ V2는 oh-my-opencode-slim을 스케줄러 중심의 멀티 에이전트 워크
 - **[백그라운드 에이전트](#백그라운드-에이전트)** — Orchestrator가 전문가를 백그라운드 작업으로 디스패치하고, 작업/세션 ID를 추적하며, 완료 이벤트를 기다린 뒤 결과를 조정합니다.
 - **[Companion](#companion)** — 선택 사항인 플로팅 데스크톱 창이 병렬 백그라운드 전문가를 포함해 현재 활성 에이전트를 보여줍니다.
 - **[Deepwork](#deepwork)** — 대규모, 다중 파일, 위험도가 높거나 단계적인 코딩 작업을 위한 구조화된 워크플로입니다. 지속적인 계획 파일과 Oracle 리뷰 게이트를 사용합니다.
+- **[Reflect](#reflect)** — 반복되는 작업 패턴을 돌아보고 재사용 가능한 skill, 에이전트, 명령, 설정 규칙, 프롬프트 규칙, 프로젝트 playbook을 제안합니다.
+- **[Worktrees](#worktrees)** — 복잡하거나 위험하거나 병렬로 진행되는 작업을 위해 Git worktree를 안전 프로토콜이 있는 격리된 코딩 lane으로 관리합니다.
 - **[oh-my-opencode-slim Skill](#oh-my-opencode-slim-skill)** — 모델, 프롬프트, 커스텀 에이전트, MCP 접근, 프리셋, 플러그인 동작을 안전하게 조정하는 번들 설정 skill입니다.
 
 #### 백그라운드 에이전트
@@ -199,6 +201,32 @@ Deepwork는 대규모 리팩터링, 다단계 기능, 위험한 아키텍처 변
 
 사용 시점과 워크플로 동작 방식은 **[Skills](docs/skills.md#deepwork)** 를 참고하세요.
 
+#### Reflect
+
+Reflect는 Orchestrator가 반복되는 워크플로 마찰에서 배우도록 돕습니다. 최근 작업과 기존 자산을 검토한 뒤 skill, 커스텀 에이전트, 명령, 설정 규칙, 프롬프트 규칙, MCP 권한 변경, 프로젝트 playbook 중 가장 작고 유용한 개선안을 제안합니다. 근거가 부족하면 아무것도 만들지 않는 것을 권장해야 합니다.
+
+직접 실행할 수 있습니다.
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+자연어 프롬프트로도 사용할 수 있습니다.
+
+```text
+reflect on my recent workflows
+find repeated work worth turning into reusable instructions
+```
+
+전체 워크플로와 가드레일은 **[Skills](docs/skills.md#reflect)** 를 참고하세요.
+
+#### Worktrees
+
+Worktrees는 Git worktree를 `.slim/worktrees/<slug>/` 아래의 안전하고 격리된 코딩 lane으로 관리합니다. Orchestrator가 lane의 생명주기를 관리하고, `.slim/worktrees.json`에 상태를 추적하며, 전문가 에이전트를 lane 안에서 실행하고, Git 상태를 변경하기 전에 명시적인 확인을 요구합니다.
+
+안전 프로토콜은 **[Skills](docs/skills.md#worktrees)** 를 참고하세요.
+
 #### oh-my-opencode-slim Skill
 
 번들된 `oh-my-opencode-slim` skill은 Orchestrator가 플러그인 자체를 설정하고 개선하도록 돕습니다. 모델 튜닝, 커스텀 에이전트, 프롬프트 오버라이드, skill/MCP 권한, 프리셋, 선택적 에이전트, 백그라운드 오케스트레이션, 반복되는 워크플로 마찰에 사용할 수 있습니다.
@@ -568,6 +596,7 @@ Deepwork는 대규모 리팩터링, 다단계 기능, 위험한 아키텍처 변
 | **[Multiplexer Integration](docs/multiplexer-integration.md)** | Tmux 또는 Zellij 페인에서 에이전트 작업을 실시간으로 확인 |
 | **[Codemap](docs/codemap.md)** | 계층형 코드맵을 생성하여 대규모 코드베이스를 빠르게 파악 |
 | **[Clonedeps](docs/clonedeps.md)** | 선택한 의존성 소스를 무시된 로컬 워크스페이스에 복제하여 검사 |
+| **[Worktrees](docs/worktrees.md)** | `.slim/worktrees/` lane을 사용해 격리된 병렬 또는 고위험 코딩 작업 수행 |
 | **[Preset Switching](docs/preset-switching.md)** | `/preset`으로 런타임에 에이전트 모델 프리셋 전환 |
 | **[Interview](docs/interview.md)** | 브라우저 기반 Q&A 흐름을 통해 거친 아이디어를 구조화된 마크다운 명세로 변환 |
 | **[Companion](docs/companion.md)** | 파싱, 도움말, 타입을 위한 플로팅 창 companion |
@@ -580,7 +609,7 @@ Deepwork는 대규모 리팩터링, 다단계 기능, 위험한 아키텍처 변
 | **[Configuration](docs/configuration.md)** | 설정 파일 위치, JSONC 지원, 프롬프트 오버라이드, 전체 옵션 레퍼런스 |
 | **[Background Orchestration](docs/background-orchestration.md)** | 네이티브 백그라운드 서브에이전트를 기반으로 한 스케줄러 우선 Orchestrator 모델 |
 | **[Maintainer Guide](docs/maintainers.md)** | 이슈 트리아지 규칙, 라벨 의미, 지원 라우팅, 저장소 유지보수 워크플로우 |
-| **[Skills](docs/skills.md)** | `simplify`, `codemap`, `clonedeps`, `deepwork`, `oh-my-opencode-slim` 등 번들된 스킬 |
+| **[Skills](docs/skills.md)** | `simplify`, `codemap`, `clonedeps`, `deepwork`, `reflect`, `worktrees`, `oh-my-opencode-slim` 등 번들된 스킬 |
 | **[MCPs](docs/mcps.md)** | `websearch`, `context7`, `gh_grep` 및 에이전트별 MCP 권한 동작 방식 |
 | **[Tools](docs/tools.md)** | `webfetch`, LSP 도구, 코드 검색, 포매터 등 내장 도구 기능 |
 

+ 36 - 1
README.md

@@ -165,6 +165,10 @@ verification while specialists do the work in their own lanes.
   agents are currently active, including parallel background specialists.
 - **[Deepwork](#deepwork)** — a structured workflow for large, multi-file, risky,
   or phased coding work using persistent plan files and Oracle review gates.
+- **[Reflect](#reflect)** — reviews repeated work patterns and suggests reusable skills,
+  agents, commands, config rules, prompt rules, or project playbooks.
+- **[Worktrees](#worktrees)** — manages Git worktrees as isolated coding lanes
+  with safety protocols for complex, risky, or parallel tasks.
 - **[oh-my-opencode-slim skill](#oh-my-opencode-slim-skill)** — a bundled
   configuration skill that helps tune models, prompts, custom agents, MCP access,
   presets, and plugin behavior safely.
@@ -215,6 +219,36 @@ Start it with:
 See **[Skills](docs/skills.md#deepwork)** for when to use it and how the workflow
 runs.
 
+#### Reflect
+
+Reflect helps the Orchestrator learn from repeated workflow friction. It reviews
+recent work and existing assets, then recommends the smallest useful improvement:
+a skill, custom agent, command, config rule, prompt rule, MCP permission change,
+or project playbook. If there is not enough evidence, it should recommend
+creating nothing.
+
+Use it directly with:
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+Or with natural prompts like:
+
+```text
+reflect on my recent workflows
+find repeated work worth turning into reusable instructions
+```
+
+See **[Skills](docs/skills.md#reflect)** for the full workflow and guardrails.
+
+#### Worktrees
+
+Worktrees manages Git worktrees as safe, isolated coding lanes under `.slim/worktrees/<slug>/`. The Orchestrator manages the lifecycle of these lanes, tracks state in `.slim/worktrees.json`, dispatches specialist agents inside them, and requires explicit confirmation before mutating git state.
+
+See **[Skills](docs/skills.md#worktrees)** for the safety protocol.
+
 #### oh-my-opencode-slim Skill
 
 The bundled `oh-my-opencode-slim` skill helps the Orchestrator configure and
@@ -588,6 +622,7 @@ Use this section as a map: start with installation, then jump to features, confi
 | **[Multiplexer Integration](docs/multiplexer-integration.md)** | Watch agents work live in Tmux or Zellij panes |
 | **[Codemap](docs/codemap.md)** | Generate hierarchical codemaps to understand large codebases faster |
 | **[Clonedeps](docs/clonedeps.md)** | Clone selected dependency source into an ignored local workspace for inspection |
+| **[Worktrees](docs/worktrees.md)** | Use `.slim/worktrees/` lanes for isolated parallel or risky coding work |
 | **[Preset Switching](docs/preset-switching.md)** | Switch agent model presets at runtime with `/preset` |
 | **[Interview](docs/interview.md)** | Turn rough ideas into a structured markdown spec through a browser-based Q&A flow |
 | **[Companion](docs/companion.md)** | Floating window companion for parsing, help, and types |
@@ -600,7 +635,7 @@ Use this section as a map: start with installation, then jump to features, confi
 | **[Configuration](docs/configuration.md)** | Config file locations, JSONC support, prompt overrides, and full option reference |
 | **[Background Orchestration](docs/background-orchestration.md)** | Scheduler-first orchestrator model built around native background subagents |
 | **[Maintainer Guide](docs/maintainers.md)** | Issue triage rules, label meanings, support routing, and repo maintenance workflow |
-| **[Skills](docs/skills.md)** | Bundled skills such as `simplify`, `codemap`, `clonedeps`, `deepwork`, and `oh-my-opencode-slim` |
+| **[Skills](docs/skills.md)** | Bundled skills such as `simplify`, `codemap`, `clonedeps`, `deepwork`, `reflect`, `worktrees`, and `oh-my-opencode-slim` |
 | **[MCPs](docs/mcps.md)** | `websearch`, `context7`, `gh_grep`, and how MCP permissions work per agent |
 | **[Tools](docs/tools.md)** | Built-in tool capabilities like `webfetch`, LSP tools, code search, and formatters |
 

+ 30 - 1
README.zh-CN.md

@@ -159,6 +159,8 @@ V2 将 oh-my-opencode-slim 变成了以调度器为核心的多智能体工作
 - **[后台智能体](#后台智能体)** — Orchestrator 现在会把专家作为后台任务派发,跟踪任务/会话 ID,等待完成事件,并在继续之前整合结果。
 - **[Companion](#companion)** — 可选的浮动桌面窗口会显示当前活跃的智能体,包括并行运行的后台专家。
 - **[Deepwork](#deepwork)** — 面向大型、多文件、高风险或分阶段编码工作的结构化工作流,使用持久化计划文件和 Oracle 评审关卡。
+- **[Reflect](#reflect)** — 回顾重复出现的工作模式,并建议可复用的 skill、智能体、命令、配置规则、提示词规则或项目 playbook。
+- **[Worktrees](#worktrees)** — 将 Git worktree 作为隔离编码通道管理,并为复杂、高风险或并行任务提供安全协议。
 - **[oh-my-opencode-slim Skill](#oh-my-opencode-slim-skill)** — 随包提供的配置技能,可安全调优模型、提示词、自定义智能体、MCP 访问、预设和插件行为。
 
 #### 后台智能体
@@ -196,6 +198,32 @@ Deepwork 适用于重型编码会话:大范围重构、多阶段功能、高
 
 何时使用以及工作流如何运行,请参阅 **[Skills](docs/skills.md#deepwork)**。
 
+#### Reflect
+
+Reflect 帮助 Orchestrator 从重复出现的工作流摩擦中学习。它会回顾近期工作和现有资产,然后建议最小且有用的改进:skill、自定义智能体、命令、配置规则、提示词规则、MCP 权限变更或项目 playbook。如果证据不足,它应建议什么都不创建。
+
+直接使用:
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+也可以使用自然语言提示:
+
+```text
+reflect on my recent workflows
+find repeated work worth turning into reusable instructions
+```
+
+完整工作流和安全规则见 **[Skills](docs/skills.md#reflect)**。
+
+#### Worktrees
+
+Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认位于 `.slim/worktrees/<slug>/`。Orchestrator 负责这些通道的生命周期,在 `.slim/worktrees.json` 中跟踪状态,在通道内调度专家智能体,并在修改 Git 状态前要求明确确认。
+
+安全协议见 **[Skills](docs/skills.md#worktrees)**。
+
 #### oh-my-opencode-slim Skill
 
 内置的 `oh-my-opencode-slim` skill 可帮助 Orchestrator 配置和改进插件本身。可用于模型调优、自定义智能体、提示词覆盖、skill/MCP 权限、预设、可选智能体、后台编排以及反复出现的工作流摩擦。
@@ -565,6 +593,7 @@ Deepwork 适用于重型编码会话:大范围重构、多阶段功能、高
 | **[多路复用器集成](docs/multiplexer-integration.md)** | 在 Tmux 或 Zellij 窗格中实时观看智能体工作 |
 | **[Codemap](docs/codemap.md)** | 生成层级代码地图,更快理解大型代码库 |
 | **[Clonedeps](docs/clonedeps.md)** | 将选定的依赖源码克隆到被忽略的本地工作区中以供检查 |
+| **[Worktrees](docs/worktrees.md)** | 使用 `.slim/worktrees/` 通道进行隔离的并行或高风险编码工作 |
 | **[预设切换](docs/preset-switching.md)** | 使用 `/preset` 在运行时切换智能体模型预设 |
 | **[Interview](docs/interview.md)** | 通过基于浏览器的问答流程,将粗略想法转成结构化 markdown 规格 |
 | **[Companion](docs/companion.md)** | 用于解析、帮助和类型信息的浮动窗口 companion |
@@ -577,7 +606,7 @@ Deepwork 适用于重型编码会话:大范围重构、多阶段功能、高
 | **[配置](docs/configuration.md)** | 配置文件位置、JSONC 支持、提示词覆盖和完整选项参考 |
 | **[后台编排](docs/background-orchestration.md)** | 围绕原生后台子智能体构建的调度器优先 Orchestrator 模型 |
 | **[维护者指南](docs/maintainers.md)** | issue 分流规则、标签含义、支持路由和仓库维护工作流 |
-| **[Skills](docs/skills.md)** | `simplify`、`codemap`、`clonedeps`、`deepwork` 和 `oh-my-opencode-slim` 等捆绑技能 |
+| **[Skills](docs/skills.md)** | `simplify`、`codemap`、`clonedeps`、`deepwork`、`reflect`、`worktrees` 和 `oh-my-opencode-slim` 等捆绑技能 |
 | **[MCPs](docs/mcps.md)** | `websearch`、`context7`、`gh_grep` 以及每个智能体的 MCP 权限机制 |
 | **[Tools](docs/tools.md)** | `webfetch`、LSP 工具、代码搜索和格式化工具等内置工具能力 |
 

+ 4 - 0
docs/installation.md

@@ -336,4 +336,8 @@ See the [Multiplexer Integration Guide](multiplexer-integration.md) for more det
    rm -rf ~/.config/opencode/skills/simplify
    rm -rf ~/.config/opencode/skills/codemap
    rm -rf ~/.config/opencode/skills/clonedeps
+   rm -rf ~/.config/opencode/skills/deepwork
+   rm -rf ~/.config/opencode/skills/reflect
+   rm -rf ~/.config/opencode/skills/worktrees
+   rm -rf ~/.config/opencode/skills/oh-my-opencode-slim
    ```

+ 59 - 0
docs/skills.md

@@ -16,6 +16,8 @@ Bundled skills are installed by the `oh-my-opencode-slim` installer.
 | [`codemap`](#codemap) | Repository codemap generation | `orchestrator` |
 | [`clonedeps`](#clonedeps) | Local dependency source cloning | `orchestrator` |
 | [`deepwork`](#deepwork) | Heavy/complex coding sessions workflow | `orchestrator` |
+| [`reflect`](#reflect) | Review repeated work and suggest reusable workflow improvements | `orchestrator` |
+| [`worktrees`](#worktrees) | Safe Git worktree lane management | `orchestrator` |
 | [`oh-my-opencode-slim`](#oh-my-opencode-slim) | Plugin configuration and self-improvement guidance | `orchestrator` |
 
 ---
@@ -116,6 +118,63 @@ Start it directly with:
 
 ---
 
+## reflect
+
+**Learn from repeated work and suggest practical workflow improvements.**
+
+`reflect` is an orchestrator-only workflow skill for reviewing recent work,
+finding repeated workflow friction, and recommending the smallest useful reusable
+asset. It may suggest a skill, custom agent, command, config rule, prompt rule,
+MCP permission change, or project playbook — but only when there is enough
+evidence.
+
+Use it directly with:
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+You can also use natural prompts such as:
+
+```text
+reflect on my recent workflows
+find repeated work worth turning into reusable instructions
+suggest skills or agent config improvements from what I keep doing
+```
+
+Reflect is intentionally conservative. If no repeated workflow is strong enough,
+it should recommend creating nothing instead of manufacturing new assets.
+
+**When to use:** recurring workflow friction, repeated manual processes, repeated
+agent-routing preferences, or prompts/config rules that you keep re-explaining.
+
+**When NOT to use:** one-off implementation tasks, speculative agent creation,
+or broad self-improvement ideas with no usage evidence.
+
+---
+
+## worktrees
+
+**Safe Git worktree lane management for isolated coding.**
+
+`worktrees` is an orchestrator-only skill for managing Git worktrees as safe,
+isolated coding lanes. Instead of polluting your current branch or juggling stash
+state, the Orchestrator can set up lanes under `.slim/worktrees/<slug>/` and
+track them in `.slim/worktrees.json`.
+
+Other agents can be delegated tasks inside the worktree lane, but the Orchestrator coordinates the lifecycle, validation, and final integration.
+
+Safety defaults:
+- Pre-flight check on Git repo status and dirty worktrees.
+- Strict confirmation gates for all git modifications (`worktree add/remove`, `merge`, `rebase`, `cherry-pick`, `reset --hard`, branch operations).
+- Branch names default to `omo/<slug>` but respect custom user patterns.
+- Automated diff validation and compilation/test check before final integration.
+
+See **[Worktrees](worktrees.md)** for the detailed safety protocol.
+
+---
+
 ## oh-my-opencode-slim
 
 **Configure, customize, and safely improve this plugin setup.**

+ 135 - 0
docs/worktrees.md

@@ -0,0 +1,135 @@
+# Worktrees
+
+`worktrees` is a bundled Orchestrator skill that manages Git worktrees as safe,
+isolated coding lanes under `.slim/worktrees/<slug>/`. It lets agents work on
+parallel, complex, or high-risk tasks in separate checkouts without polluting
+your current workspace.
+
+The skill does not exist to explain Git worktrees. It gives OMO an opinionated
+safety protocol for planning lanes, assigning agents, validating diffs,
+integrating changes, and cleaning up without losing user work.
+
+---
+
+## What It Does
+
+When managing worktree coding lanes, the Orchestrator:
+
+1. **Checks workspace state:** confirms the repo, branch, dirty state, and
+   existing `git worktree list` output.
+2. **Registers metadata:** maintains `.slim/worktrees.json` to track active
+   lanes, branches, base refs, purposes, owners, areas, and statuses.
+3. **Applies confirmation gates:** asks before creating/removing worktrees,
+   creating/deleting branches, merging, rebasing, cherry-picking, pruning, or
+   running destructive commands.
+4. **Validates and integrates:** runs relevant checks inside the lane, presents a
+   diff against the base branch, and asks before integrating.
+5. **Gates cleanup:** refuses to remove dirty worktrees or delete unmerged
+   branches without explicit approval.
+
+---
+
+## How To Use It
+
+Ask the Orchestrator directly to isolate a complex or parallel task:
+
+```text
+Create a worktree lane to refactor the auth logic.
+```
+
+Or for risky operations:
+
+```text
+Let's use an isolated worktree to test upgrading the database packages.
+```
+
+The Orchestrator will analyze the work, present a lane plan (with slug, path, base branch, and purpose), and ask for your permission before initializing the worktree.
+
+---
+
+## Files It Creates
+
+### `.slim/worktrees/<slug>/`
+
+Local Git worktrees are placed here, separated from your main checkout while
+sharing the same underlying Git database. Specialists such as `@fixer` or
+`@designer` are directed to write and run tests strictly within this path.
+
+For example, `.slim/worktrees/refactor-auth/` contains a copy of the repository files on the `omo/refactor-auth` branch.
+
+### `.slim/worktrees.json`
+
+A local metadata registry mapping active worktree lanes.
+
+```json
+{
+  "version": "1.0.0",
+  "updatedAt": "2026-06-14T00:00:00.000Z",
+  "lanes": [
+    {
+      "slug": "refactor-auth",
+      "branch": "omo/refactor-auth",
+      "path": ".slim/worktrees/refactor-auth",
+      "base": "main",
+      "purpose": "Refactor token parsing module",
+      "owner": "orchestrator",
+      "status": "active",
+      "areas": ["src/auth"],
+      "createdAt": "2026-06-14T12:00:00.000Z"
+    }
+  ]
+}
+```
+
+---
+
+## Safety Guidelines
+
+- **Orchestrator control:** The orchestrator owns worktree coordination.
+  Specialists can work inside lanes but should not run lane-management Git
+  commands unless explicitly instructed.
+- **Strict Confirmations:** No git mutating commands (e.g. `worktree add`, `worktree remove`, `branch`, `merge`, `rebase`, `cherry-pick`, `prune`) are run without manual prompt agreement.
+- **No force operations:** Destructive git operations such as `reset --hard`,
+  `clean`, force-push, or branch deletion must not be executed automatically.
+- **Git exclusions:** `.slim/worktrees/` is git-ignored. `.ignore` is updated so
+  OpenCode can still read lane contents. `.slim/worktrees.json` is git-ignored
+  by default because it is local workflow metadata.
+
+Managed `.gitignore` block:
+
+```gitignore
+# BEGIN oh-my-opencode-slim worktrees
+.slim/worktrees/
+.slim/worktrees.json
+# END oh-my-opencode-slim worktrees
+```
+
+Managed `.ignore` block:
+
+```ignore
+# BEGIN oh-my-opencode-slim worktrees
+!.slim/
+!.slim/worktrees.json
+!.slim/worktrees/
+!.slim/worktrees/**
+# END oh-my-opencode-slim worktrees
+```
+
+---
+
+## When To Use It
+
+- **Risky implementation tasks:** major package upgrades, core architectural
+  migrations, or database schema changes.
+- **Parallel task coordination:** separate lanes for independent background
+  agents or an urgent hotfix while another feature is unfinished.
+- **Complex agent delegation:** another agent can implement in a clean checkout
+  while the main workspace remains untouched.
+
+## When NOT To Use It
+
+- **Trivial modifications:** single-file tweaks, documentation updates, or tiny
+  fixes.
+- **Non-Git repositories:** projects that do not use Git.
+- **Disk/resource constraints:** large projects in environments with very limited
+  disk space.

+ 2 - 0
scripts/verify-release-artifact.ts

@@ -34,7 +34,9 @@ const packagedRequiredFiles = [
   'src/skills/codemap/SKILL.md',
   'src/skills/clonedeps/SKILL.md',
   'src/skills/deepwork/SKILL.md',
+  'src/skills/reflect/SKILL.md',
   'src/skills/oh-my-opencode-slim/SKILL.md',
+  'src/skills/worktrees/SKILL.md',
 ];
 
 function fail(message: string): never {

+ 14 - 0
src/cli/custom-skills.ts

@@ -53,6 +53,13 @@ export const CUSTOM_SKILLS: CustomSkill[] = [
     allowedAgents: ['orchestrator'],
     sourcePath: 'src/skills/deepwork',
   },
+  {
+    name: 'reflect',
+    description:
+      'Review repeated work and suggest reusable workflow improvements',
+    allowedAgents: ['orchestrator'],
+    sourcePath: 'src/skills/reflect',
+  },
   {
     name: 'oh-my-opencode-slim',
     description:
@@ -60,6 +67,13 @@ export const CUSTOM_SKILLS: CustomSkill[] = [
     allowedAgents: ['orchestrator'],
     sourcePath: 'src/skills/oh-my-opencode-slim',
   },
+  {
+    name: 'worktrees',
+    description:
+      'Manage Git worktrees as OMO safe isolated coding lanes for complex/risky/parallel work',
+    allowedAgents: ['orchestrator'],
+    sourcePath: 'src/skills/worktrees',
+  },
 ];
 
 /**

+ 2 - 0
src/cli/skills.test.ts

@@ -24,6 +24,8 @@ describe('skills permissions', () => {
     const orchestratorPerms = getSkillPermissionsForAgent('orchestrator');
     expect(orchestratorPerms.clonedeps).toBe('allow');
     expect(orchestratorPerms.deepwork).toBe('allow');
+    expect(orchestratorPerms.reflect).toBe('allow');
+    expect(orchestratorPerms.worktrees).toBe('allow');
     expect(orchestratorPerms['oh-my-opencode-slim']).toBe('allow');
   });
 

+ 1 - 0
src/hooks/index.ts

@@ -13,4 +13,5 @@ export { processImageAttachments } from './image-hook';
 export { createJsonErrorRecoveryHook } from './json-error-recovery/hook';
 export { createPhaseReminderHook } from './phase-reminder';
 export { createPostFileToolNudgeHook } from './post-file-tool-nudge';
+export { createReflectCommandHook } from './reflect';
 export { createTaskSessionManagerHook } from './task-session-manager';

+ 96 - 0
src/hooks/reflect/index.test.ts

@@ -0,0 +1,96 @@
+import { describe, expect, test } from 'bun:test';
+import { SLIM_INTERNAL_INITIATOR_MARKER } from '../../utils';
+import { createReflectCommandHook } from './index';
+
+describe('reflect command hook', () => {
+  test('registers /reflect command when absent', () => {
+    const hook = createReflectCommandHook();
+    const config: Record<string, unknown> = {};
+
+    hook.registerCommand(config);
+
+    const command = (config.command as Record<string, unknown>).reflect as {
+      template?: string;
+      description?: string;
+    };
+    expect(command).toBeDefined();
+    expect(command.template).toContain('repeated work');
+    expect(command.description).toContain('repeated workflows');
+  });
+
+  test('does not overwrite existing /reflect command', () => {
+    const hook = createReflectCommandHook();
+    const existing = { template: 'custom', description: 'custom command' };
+    const config: Record<string, unknown> = { command: { reflect: existing } };
+
+    hook.registerCommand(config);
+
+    expect((config.command as Record<string, unknown>).reflect).toBe(existing);
+  });
+
+  test('does not handle an existing custom /reflect command', async () => {
+    const hook = createReflectCommandHook();
+    const existing = { template: 'custom', description: 'custom command' };
+    hook.registerCommand({ command: { reflect: existing } });
+    const output = { parts: [{ type: 'text', text: 'template' }] };
+
+    await hook.handleCommandExecuteBefore(
+      { command: 'reflect', sessionID: 's1', arguments: '  ' },
+      output,
+    );
+
+    expect(output.parts).toEqual([{ type: 'text', text: 'template' }]);
+  });
+
+  test('expands empty arguments into broad reflect activation prompt', async () => {
+    const hook = createReflectCommandHook();
+    hook.registerCommand({});
+    const output = { parts: [{ type: 'text', text: 'template' }] };
+
+    await hook.handleCommandExecuteBefore(
+      { command: 'reflect', sessionID: 's1', arguments: '  ' },
+      output,
+    );
+
+    expect(output.parts).toHaveLength(1);
+    expect(output.parts[0].text).toContain('Use the reflect skill');
+    expect(output.parts[0].text).toContain('Review recent work broadly');
+    expect(output.parts[0].text).toContain('creating nothing');
+    expect(output.parts[0].text).not.toContain(SLIM_INTERNAL_INITIATOR_MARKER);
+  });
+
+  test('expands arguments into focused reflect activation prompt', async () => {
+    const hook = createReflectCommandHook();
+    hook.registerCommand({});
+    const output = { parts: [{ type: 'text', text: 'template' }] };
+
+    await hook.handleCommandExecuteBefore(
+      {
+        command: 'reflect',
+        sessionID: 's1',
+        arguments: 'release workflow and checks',
+      },
+      output,
+    );
+
+    expect(output.parts).toHaveLength(1);
+    expect(output.parts[0].text).toContain('Use the reflect skill');
+    expect(output.parts[0].text).toContain(
+      'Focus:\nrelease workflow and checks',
+    );
+    expect(output.parts[0].text).toContain('MCP/tool permission change');
+  });
+
+  test('ignores other commands', async () => {
+    const hook = createReflectCommandHook();
+    hook.registerCommand({});
+    const output = { parts: [{ type: 'text', text: 'template' }] };
+
+    await hook.handleCommandExecuteBefore(
+      { command: 'deepwork', sessionID: 's1', arguments: 'x' },
+      output,
+    );
+
+    expect(output.parts).toEqual([{ type: 'text', text: 'template' }]);
+  });
+});

+ 64 - 0
src/hooks/reflect/index.ts

@@ -0,0 +1,64 @@
+const COMMAND_NAME = 'reflect';
+
+function activationPrompt(focus: string): string {
+  const focusBlock = focus
+    ? ['Focus:', focus]
+    : [
+        'Focus:',
+        'Review recent work broadly and identify repeated workflow friction worth improving.',
+      ];
+
+  return [
+    'Use the reflect skill for this request.',
+    '',
+    'Reflect requirements:',
+    '- inspect existing skills, commands, agents, prompt overrides, MCP permissions, config, and project playbooks before suggesting anything new;',
+    '- find repeated workflow patterns from the current conversation, project notes, local memories, logs, or session artifacts that are available and safe to inspect;',
+    '- prefer evidence from repeated recent behavior over speculation;',
+    '- recommend the smallest useful improvement: prompt/config rule, skill, command, custom agent, MCP/tool permission change, project playbook, or skip;',
+    '- treat creating nothing as a valid result when evidence is weak;',
+    '- ask before changing prompts, skills, commands, agents, MCP access, or config unless the user explicitly requested the exact edit;',
+    '- return a compact report with findings, recommended changes, skipped candidates, and items needing more evidence.',
+    '',
+    ...focusBlock,
+  ].join('\n');
+}
+
+export function createReflectCommandHook(): {
+  registerCommand: (config: Record<string, unknown>) => void;
+  handleCommandExecuteBefore: (
+    input: { command: string; sessionID: string; arguments: string },
+    output: { parts: Array<{ type: string; text?: string }> },
+  ) => Promise<void>;
+} {
+  let shouldHandleCommand = false;
+
+  return {
+    registerCommand: (opencodeConfig) => {
+      const commandConfig = opencodeConfig.command as
+        | Record<string, unknown>
+        | undefined;
+      if (commandConfig?.[COMMAND_NAME]) {
+        shouldHandleCommand = false;
+        return;
+      }
+      if (!opencodeConfig.command) opencodeConfig.command = {};
+      (opencodeConfig.command as Record<string, unknown>)[COMMAND_NAME] = {
+        template: 'Review repeated work and suggest workflow improvements',
+        description:
+          'Use reflect to learn from repeated workflows and suggest reusable improvements',
+      };
+      shouldHandleCommand = true;
+    },
+
+    handleCommandExecuteBefore: async (input, output) => {
+      if (input.command !== COMMAND_NAME || !shouldHandleCommand) return;
+
+      output.parts.length = 0;
+      output.parts.push({
+        type: 'text',
+        text: activationPrompt(input.arguments.trim()),
+      });
+    },
+  };
+}

+ 13 - 0
src/index.ts

@@ -26,6 +26,7 @@ import {
   createJsonErrorRecoveryHook,
   createPhaseReminderHook,
   createPostFileToolNudgeHook,
+  createReflectCommandHook,
   createTaskSessionManagerHook,
   ForegroundFallbackManager,
 } from './hooks';
@@ -136,6 +137,7 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
   let jsonErrorRecoveryHook: ReturnType<typeof createJsonErrorRecoveryHook>;
   let foregroundFallback: ForegroundFallbackManager;
   let deepworkCommandHook: ReturnType<typeof createDeepworkCommandHook>;
+  let reflectCommandHook: ReturnType<typeof createReflectCommandHook>;
   let taskSessionManagerHook: ReturnType<typeof createTaskSessionManagerHook>;
   let backgroundJobBoard: BackgroundJobBoard;
   let interviewManager: ReturnType<typeof createInterviewManager>;
@@ -282,6 +284,7 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
     );
 
     deepworkCommandHook = createDeepworkCommandHook();
+    reflectCommandHook = createReflectCommandHook();
     taskSessionManagerHook = createTaskSessionManagerHook(ctx, {
       maxSessionsPerAgent: config.backgroundJobs?.maxSessionsPerAgent ?? 2,
       readContextMinLines: config.backgroundJobs?.readContextMinLines ?? 10,
@@ -651,6 +654,7 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
 
       interviewManager.registerCommand(opencodeConfig);
       deepworkCommandHook.registerCommand(opencodeConfig);
+      reflectCommandHook.registerCommand(opencodeConfig);
       presetManager.registerCommand(opencodeConfig);
     },
 
@@ -829,6 +833,15 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
         },
         output as { parts: Array<{ type: string; text?: string }> },
       );
+
+      await reflectCommandHook.handleCommandExecuteBefore(
+        input as {
+          command: string;
+          sessionID: string;
+          arguments: string;
+        },
+        output as { parts: Array<{ type: string; text?: string }> },
+      );
     },
 
     'chat.headers': chatHeadersHook['chat.headers'],

+ 4 - 1
src/skills/codemap.md

@@ -19,6 +19,8 @@
   - `src/skills/clonedeps/` (workflow skill for dependency source mirroring)
   - `src/skills/simplify/` (readability/refactor guidance skill)
   - `src/skills/deepwork/` (orchestrator-only workflow for heavy coding sessions)
+  - `src/skills/reflect/` (orchestrator-only workflow for learning from repeated work and suggesting reusable improvements)
+  - `src/skills/worktrees/` (orchestrator-only workflow for safe Git worktree lanes)
   - `src/skills/oh-my-opencode-slim/` (orchestrator-only plugin configuration and self-improvement guidance)
 - Files are considered static runtime payload. No plugin TS module in `src/` imports these files directly; they
   are loaded by OpenCode via filesystem installation.
@@ -41,6 +43,7 @@
 - `verify-release-artifact.ts` enforces artifact completeness by asserting key
   bundled skill payloads such as `src/skills/simplify/SKILL.md`,
   `src/skills/codemap/SKILL.md`, `src/skills/clonedeps/SKILL.md`, and
-  `src/skills/deepwork/SKILL.md`, plus `src/skills/oh-my-opencode-slim/SKILL.md`,
+  `src/skills/deepwork/SKILL.md`, `src/skills/reflect/SKILL.md`,
+  `src/skills/worktrees/SKILL.md`, plus `src/skills/oh-my-opencode-slim/SKILL.md`,
   are present in the tarball.
 - `package.json` scripts (`verify:release`, `build`) rely on these assets to ensure install-time skill availability.

+ 195 - 0
src/skills/reflect/SKILL.md

@@ -0,0 +1,195 @@
+---
+name: reflect
+description: Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
+---
+
+# Reflect
+
+Reflect is an orchestrator-only workflow for learning from repeated work. It
+looks back over recent sessions, project notes, and existing agent assets, then
+recommends the smallest useful improvement: a skill, custom agent, command,
+configuration change, prompt rule, documentation playbook, or no change.
+
+The goal is not to generate more assets. The goal is to identify real repeated
+friction and suggest practical improvements with evidence.
+
+## When to Use
+
+Use Reflect when the user asks to:
+
+- run `/reflect` or `/reflect <focus>`;
+- learn from recent sessions or repeated workflows;
+- find work they keep doing manually;
+- suggest new skills, custom agents, commands, prompt rules, or config changes;
+- improve their oh-my-opencode-slim setup based on actual usage;
+- review whether a recurring process should become a reusable playbook;
+- turn repeated workflow friction into a safer future default.
+
+Do not use Reflect for ordinary implementation work, one-off debugging, broad
+architecture review, or speculative agent creation without workflow evidence.
+
+## Core Contract
+
+Reflect must be conservative and evidence-driven.
+
+Required behavior:
+
+- inspect existing assets before suggesting new ones;
+- prefer recent, repeated, user-visible friction over isolated incidents;
+- recommend the smallest useful form;
+- treat "create nothing" as a successful result when evidence is weak;
+- ask before changing prompts, skills, commands, agents, MCP access, or config;
+- avoid duplicating existing assets;
+- explain restart requirements for OpenCode config, prompt, agent, skill, MCP, or
+  plugin changes.
+
+## Evidence Sources
+
+Use available evidence in this order:
+
+1. Current conversation and explicit user instructions.
+2. Project-local guidance and memories, such as `AGENTS.md`, `.opencode/`,
+   `.slim/`, notes, checkpoints, task progress files, and codemaps.
+3. Existing skills, commands, agents, prompt overrides, MCP permissions, and
+   oh-my-opencode-slim configuration.
+4. Recent OpenCode logs or session artifacts if they are available and safe to
+   inspect.
+5. External docs only when a proposed workflow depends on a third-party tool or
+   library whose behavior needs confirmation.
+
+Respect privacy and safety boundaries. Do not inspect unrelated personal files,
+credentials, private messages, or external accounts unless the user explicitly
+asks and the workflow requires it.
+
+## Workflow
+
+Reflect can be triggered directly:
+
+```text
+/reflect
+/reflect release workflow and checks
+```
+
+With no arguments, review recent work broadly. With arguments, focus the review
+on that workflow area while still checking whether existing assets already cover
+it.
+
+### 1. Inventory Existing Assets
+
+Before proposing anything, identify what already exists:
+
+- bundled and user-installed skills;
+- custom agents and their `orchestratorPrompt` guidance;
+- custom commands;
+- prompt overrides and append files;
+- active oh-my-opencode-slim preset, model routing, skills, and MCP permissions;
+- project playbooks, docs, codemaps, and local workflow notes.
+
+If an existing asset already covers the candidate, recommend extending or using
+that asset instead of creating a near-duplicate.
+
+### 2. Find Repeated Workflow Patterns
+
+Look for repeated signals such as:
+
+- the same command sequence appears across sessions;
+- the user repeatedly asks for the same review, setup, release, or debugging
+  process;
+- the same manual research or context-gathering steps keep recurring;
+- the same specialist routing decision is repeatedly needed;
+- the same project-specific rule is repeatedly re-explained;
+- repeated failures happen because an agent lacks a stable instruction, tool, or
+  permission boundary.
+
+Strong candidates usually have at least two occurrences, stable inputs, a clear
+output, and a clear stopping condition.
+
+### 3. Score Candidates
+
+For each candidate, decide:
+
+- **Frequency:** How often has it happened?
+- **Cost:** Does it waste meaningful time, context, money, or attention?
+- **Risk:** Does inconsistent execution cause bugs, regressions, bad decisions,
+  or unsafe changes?
+- **Stability:** Are the inputs and desired output predictable?
+- **Coverage:** Is there already an asset that handles it well?
+
+Only recommend creating or changing assets when confidence is high.
+
+### 4. Choose the Smallest Useful Form
+
+Pick the least powerful form that solves the repeated problem:
+
+- **Prompt/config rule:** a small behavior change to an existing agent.
+- **Skill:** reusable workflow guidance for a task shape.
+- **Command:** a repeatable manual trigger with stable inputs.
+- **Custom agent:** a distinct specialist lane with clear delegation rules.
+- **MCP/tool permission change:** a safe access adjustment for an existing agent.
+- **Project playbook/doc:** human-readable process guidance when automation is too
+  heavy.
+- **Skip:** weak, one-off, ambiguous, sensitive, or already-covered work.
+
+Avoid creating custom agents when a prompt rule or skill is enough. Avoid skills
+when a short project playbook is enough. Avoid config changes when the benefit is
+unclear.
+
+### 5. Propose Before Changing
+
+Unless the user explicitly requested a specific edit, present a concise proposal
+before writing files or changing config:
+
+```text
+Found 2 strong repeated workflows and 1 weak candidate.
+
+Recommended:
+- Add a small orchestrator prompt rule for <workflow> because <evidence>.
+- Extend existing <skill> instead of creating a new one because <overlap>.
+
+Skip:
+- <candidate> because it only appeared once.
+
+Proceed with the proposed edits?
+```
+
+When applying changes, preserve existing user settings and prefer narrow,
+append-only edits.
+
+## Output Format
+
+Return a compact report:
+
+```text
+Findings
+- <workflow>: evidence, frequency/confidence, recommended form.
+
+Recommended changes
+- <asset/config/doc>: one-line purpose and why this is the smallest useful form.
+
+Skipped
+- <candidate>: why not worth packaging now.
+
+Needs more evidence
+- <candidate>: what would make it actionable.
+```
+
+If nothing qualifies, say:
+
+```text
+No strong repeated workflow found. I would not add or change any reusable assets
+yet.
+```
+
+## Guardrails
+
+- Do not manufacture assets to justify the workflow.
+- Do not create overlapping skills or agents.
+- Do not silently change global config, prompts, or permissions.
+- Do not add broad instructions that make agents more eager, expensive, or
+  invasive without a clear benefit.
+- Do not overfit to a single session unless the user explicitly asks for that
+  exact reusable workflow.
+- Do not use private or sensitive material as examples in generated assets.
+- When config, prompt, agent, skill, MCP, or plugin files change, tell the user:
+  "This should apply on the next OpenCode run; restart OpenCode if you need it
+  immediately."

+ 17 - 0
src/skills/worktrees/README.md

@@ -0,0 +1,17 @@
+# Worktrees Skill
+
+Manage Git worktrees as OMO safe isolated coding lanes for complex, risky, or parallel work.
+
+## Overview
+
+This bundled skill gives the `orchestrator` an opinionated safe orchestration
+protocol for Git worktrees. It keeps isolated coding lanes under
+`.slim/worktrees/<slug>/` and can track lane metadata in `.slim/worktrees.json`.
+
+The point is not teaching Git commands. The skill standardizes how OMO plans
+parallel work, assigns agents to isolated branches, asks before mutating Git
+state, validates diffs, and cleans up safely.
+
+## Installation
+
+Bundled with `oh-my-opencode-slim` and installed automatically when bundled skills are enabled via the installer.

+ 166 - 0
src/skills/worktrees/SKILL.md

@@ -0,0 +1,166 @@
+---
+name: worktrees
+description: Manage Git worktrees as OMO safe isolated coding lanes for complex, risky, or parallel work.
+---
+
+# Worktrees Orchestration Protocol
+
+The `worktrees` skill provides an opinionated, safe orchestration protocol for
+managing Git worktrees as isolated coding lanes. Its goal is not to teach Git
+commands. Its value is giving the Orchestrator a consistent OMO workflow for
+parallel agents, risky experiments, integration review, and cleanup.
+
+## Core Contract
+
+This is an **orchestrator-only** workflow. Other specialists such as `@fixer`
+or `@designer` can be assigned tasks inside a worktree lane, but the
+Orchestrator owns lane planning, branch/path selection, file ownership,
+delegation, diff validation, integration, and cleanup.
+
+All worktrees reside under the default path:
+
+```text
+.slim/worktrees/<slug>/
+```
+
+Do not create worktrees as sibling directories of the main repository.
+
+### State Tracking (`.slim/worktrees.json`)
+
+Use the optional local metadata manifest `.slim/worktrees.json` to maintain
+structural tracking:
+
+```json
+{
+  "version": "1.0.0",
+  "updatedAt": "2026-06-14T00:00:00.000Z",
+  "lanes": [
+    {
+      "slug": "feature-auth-v2",
+      "branch": "omo/feature-auth-v2",
+      "path": ".slim/worktrees/feature-auth-v2",
+      "base": "main",
+      "purpose": "refactor authentication flow to use OAuth2",
+      "owner": "orchestrator",
+      "status": "active",
+      "areas": ["src/auth", "src/config"],
+      "createdAt": "2026-06-14T12:00:00.000Z"
+    }
+  ]
+}
+```
+
+If `.slim/worktrees.json` does not exist, create it when initializing a lane,
+and keep it updated as lanes are transitioned, integrated, or pruned. Treat it
+as local workflow metadata by default; ask before making it part of a committed
+project convention.
+
+---
+
+## Safety Guidelines
+
+Before executing any Git mutation command, the Orchestrator must observe the
+following guards:
+
+### 1. Pre-Flight Checklist
+- Confirm the current directory is inside a Git repository.
+- Check the current branch, base branch, and dirty/uncommitted state.
+- Inspect the output of `git worktree list` to avoid path or branch conflicts.
+- Ensure the branch name (e.g. `omo/<slug>` or custom project convention) does not already exist locally or on remote.
+- Ensure `.slim/worktrees/` is ignored by Git before creating nested worktrees.
+
+### 2. Mandatory User Confirmation
+You must seek explicit user confirmation before executing:
+- `git worktree add` or `git worktree remove`
+- Branch creation, deletion, or renaming
+- Merges, rebases, or cherry-picks
+- `git prune` or `git worktree prune`
+- Destructive commands (e.g., `git reset --hard`, `git clean`, `git push --force`, or removing a dirty worktree directory).
+
+Never execute destructive commands, delete branches, remove dirty worktrees, or
+clean uncommitted changes without explicit user confirmation for that exact
+operation.
+
+### 3. Ignore File Setup
+
+Before creating lanes, add or update managed marker blocks only.
+
+`.gitignore`:
+
+```gitignore
+# BEGIN oh-my-opencode-slim worktrees
+.slim/worktrees/
+.slim/worktrees.json
+# END oh-my-opencode-slim worktrees
+```
+
+`.ignore`:
+
+```ignore
+# BEGIN oh-my-opencode-slim worktrees
+!.slim/
+!.slim/worktrees.json
+!.slim/worktrees/
+!.slim/worktrees/**
+# END oh-my-opencode-slim worktrees
+```
+
+---
+
+## Workflow Guide
+
+### Phase 1: Planning & Setup
+1. Identify the task scope and determine a short `<slug>` for the worktree.
+2. Formulate a branch name. Default to `omo/<slug>` unless project/user conventions dictate otherwise.
+3. Validate repository safety. Ask the user for confirmation to initialize the lane.
+4. Ensure the managed ignore blocks are present.
+5. Run:
+   ```bash
+   git worktree add -b <branch-name> .slim/worktrees/<slug> <base-commit/branch>
+   ```
+6. Register the metadata in `.slim/worktrees.json`.
+
+### Phase 2: Execution & Delegation
+1. Run all sub-agents with their working directory set strictly to the worktree
+   path, such as `.slim/worktrees/<slug>`.
+2. Do not modify the main checkout for lane work. Keep build, test, and edit
+   operations isolated inside the lane.
+3. Track file or folder ownership per lane to avoid merge conflicts between
+   parallel agents.
+4. Commit progress within the worktree only when the user asked for commits or
+   approved local checkpoint commits.
+
+### Phase 3: Integration & Validation
+Before merging or integrating the worktree branch:
+1. Run lint, build, formatting, and unit tests inside the worktree directory.
+2. Generate and display a clear diff comparing the worktree branch to the
+   integration base branch.
+3. Ask the user for confirmation to integrate.
+4. Perform the approved integration, such as merge or cherry-pick, from the main
+   checkout or the user-approved integration checkout.
+
+### Phase 4: Cleanup & Pruning
+1. Ensure all changes are safely merged or archived.
+2. Confirm the worktree has no uncommitted changes.
+3. Request user approval to remove the worktree.
+4. Safely remove the worktree using:
+   ```bash
+   git worktree remove .slim/worktrees/<slug>
+   ```
+5. Update `.slim/worktrees.json` to mark the lane as `archived` or remove it.
+
+---
+
+## When to Use vs. Not Use
+
+### Use When:
+- Performing risky or destructive refactoring that could break the active working environment.
+- Working on parallel tasks/bugfixes that require switching contexts without committing half-finished work.
+- Running independent background agents on separate branches.
+- Conducting exploratory spikes or prototyping that may be discarded.
+- Isolating third-party packages or complex upgrades.
+
+### Do NOT Use When:
+- Making simple single-file changes, documentation updates, or minor bug fixes.
+- Working in a git repository that is not fully initialized or has complex multi-submodule states not supported easily by worktrees.
+- The user wants the work done directly in the current checkout.