oh-my-opencode-slim 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +31 -1
- package/README.ko-KR.md +31 -1
- package/README.md +41 -2
- package/README.zh-CN.md +31 -1
- package/dist/agents/orchestrator.d.ts +0 -2
- package/dist/cli/companion.d.ts +2 -2
- package/dist/cli/index.js +326 -89
- package/dist/companion/manager.d.ts +1 -0
- package/dist/companion/updater.d.ts +36 -0
- package/dist/config/agent-mcps.d.ts +0 -4
- package/dist/config/constants.d.ts +1 -7
- package/dist/config/council-schema.d.ts +0 -15
- package/dist/config/index.d.ts +1 -1
- package/dist/config/runtime-preset.d.ts +0 -1
- package/dist/config/schema.d.ts +78 -68
- package/dist/config/utils.d.ts +1 -0
- package/dist/hooks/auto-update-checker/skill-sync.d.ts +9 -0
- package/dist/hooks/auto-update-checker/types.d.ts +2 -0
- package/dist/hooks/filter-available-skills/index.d.ts +1 -13
- package/dist/hooks/foreground-fallback/index.d.ts +1 -1
- package/dist/hooks/image-hook.d.ts +1 -13
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/phase-reminder/index.d.ts +10 -16
- package/dist/hooks/reflect/index.d.ts +13 -0
- package/dist/hooks/task-session-manager/index.d.ts +2 -16
- package/dist/hooks/types.d.ts +23 -0
- package/dist/index.js +1610 -585
- package/dist/tools/acp-run.d.ts +3 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/smartfetch/secondary-model.d.ts +7 -0
- package/dist/tui.js +114 -76
- package/dist/utils/agent-variant.d.ts +0 -40
- package/dist/utils/compat.d.ts +0 -1
- package/dist/utils/guards.d.ts +4 -0
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/task.d.ts +0 -2
- package/oh-my-opencode-slim.schema.json +103 -249
- package/package.json +2 -1
- package/src/companion/companion-manifest.json +12 -0
- package/src/skills/codemap.md +4 -1
- package/src/skills/reflect/SKILL.md +193 -0
- package/src/skills/worktrees/SKILL.md +164 -0
- package/dist/config/fallback-chains.d.ts +0 -1
- package/dist/hooks/apply-patch/patch.d.ts +0 -2
- package/dist/hooks/delegate-task-retry/guidance.d.ts +0 -2
- package/dist/hooks/delegate-task-retry/index.d.ts +0 -4
- package/dist/hooks/json-error-recovery/index.d.ts +0 -1
- package/dist/utils/env.d.ts +0 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worktrees
|
|
3
|
+
description: Manage Git worktrees as OMO safe isolated coding lanes for complex, risky, or parallel work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Worktrees Orchestration Protocol
|
|
7
|
+
|
|
8
|
+
The `worktrees` skill provides an opinionated, safe orchestration protocol for
|
|
9
|
+
managing Git worktrees as isolated coding lanes. Its value is giving the Orchestrator a consistent OMO workflow for parallel agents, risky experiments, integration review, and cleanup.
|
|
10
|
+
|
|
11
|
+
## Core Contract
|
|
12
|
+
|
|
13
|
+
This is an **orchestrator-only** workflow. Other specialists such as `@fixer`
|
|
14
|
+
or `@designer` can be assigned tasks inside a worktree lane, but the
|
|
15
|
+
Orchestrator owns lane planning, branch/path selection, file ownership,
|
|
16
|
+
delegation, diff validation, integration, and cleanup.
|
|
17
|
+
|
|
18
|
+
All worktrees reside under the default path:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
.slim/worktrees/<slug>/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Do not create worktrees as sibling directories of the main repository.
|
|
25
|
+
|
|
26
|
+
### State Tracking (`.slim/worktrees.json`)
|
|
27
|
+
|
|
28
|
+
Use the optional local metadata manifest `.slim/worktrees.json` to maintain
|
|
29
|
+
structural tracking:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"version": "1.0.0",
|
|
34
|
+
"updatedAt": "2026-06-14T00:00:00.000Z",
|
|
35
|
+
"lanes": [
|
|
36
|
+
{
|
|
37
|
+
"slug": "feature-auth-v2",
|
|
38
|
+
"branch": "omos/feature-auth-v2",
|
|
39
|
+
"path": ".slim/worktrees/feature-auth-v2",
|
|
40
|
+
"base": "main",
|
|
41
|
+
"purpose": "refactor authentication flow to use OAuth2",
|
|
42
|
+
"owner": "orchestrator",
|
|
43
|
+
"status": "active",
|
|
44
|
+
"areas": ["src/auth", "src/config"],
|
|
45
|
+
"createdAt": "2026-06-14T12:00:00.000Z"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If `.slim/worktrees.json` does not exist, create it when initializing a lane,
|
|
52
|
+
and keep it updated as lanes are transitioned, integrated, or pruned. Treat it
|
|
53
|
+
as local workflow metadata by default; ask before making it part of a committed
|
|
54
|
+
project convention.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Safety Guidelines
|
|
59
|
+
|
|
60
|
+
Before executing any Git mutation command, the Orchestrator must observe the
|
|
61
|
+
following guards:
|
|
62
|
+
|
|
63
|
+
### 1. Pre-Flight Checklist
|
|
64
|
+
- Confirm the current directory is inside a Git repository.
|
|
65
|
+
- Check the current branch, base branch, and dirty/uncommitted state.
|
|
66
|
+
- Inspect the output of `git worktree list` to avoid path or branch conflicts.
|
|
67
|
+
- Ensure the branch name (e.g. `omos/<slug>` or custom project convention) does not already exist locally or on remote.
|
|
68
|
+
- Ensure `.slim/worktrees/` is ignored by Git before creating nested worktrees.
|
|
69
|
+
|
|
70
|
+
### 2. Mandatory User Confirmation
|
|
71
|
+
You must seek explicit user confirmation before executing:
|
|
72
|
+
- `git worktree add` or `git worktree remove`
|
|
73
|
+
- Branch creation, deletion, or renaming
|
|
74
|
+
- Merges, rebases, or cherry-picks
|
|
75
|
+
- `git prune` or `git worktree prune`
|
|
76
|
+
- Destructive commands (e.g., `git reset --hard`, `git clean`, `git push --force`, or removing a dirty worktree directory).
|
|
77
|
+
|
|
78
|
+
Never execute destructive commands, delete branches, remove dirty worktrees, or
|
|
79
|
+
clean uncommitted changes without explicit user confirmation for that exact
|
|
80
|
+
operation.
|
|
81
|
+
|
|
82
|
+
### 3. Ignore File Setup
|
|
83
|
+
|
|
84
|
+
Before creating lanes, add or update managed marker blocks only.
|
|
85
|
+
|
|
86
|
+
`.gitignore`:
|
|
87
|
+
|
|
88
|
+
```gitignore
|
|
89
|
+
# BEGIN oh-my-opencode-slim worktrees
|
|
90
|
+
.slim/worktrees/
|
|
91
|
+
.slim/worktrees.json
|
|
92
|
+
# END oh-my-opencode-slim worktrees
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`.ignore`:
|
|
96
|
+
|
|
97
|
+
```ignore
|
|
98
|
+
# BEGIN oh-my-opencode-slim worktrees
|
|
99
|
+
!.slim/
|
|
100
|
+
!.slim/worktrees.json
|
|
101
|
+
!.slim/worktrees/
|
|
102
|
+
!.slim/worktrees/**
|
|
103
|
+
# END oh-my-opencode-slim worktrees
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Workflow Guide
|
|
109
|
+
|
|
110
|
+
### Phase 1: Planning & Setup
|
|
111
|
+
1. Identify the task scope and determine a short `<slug>` for the worktree.
|
|
112
|
+
2. Formulate a branch name. Default to `omos/<slug>` unless project/user conventions dictate otherwise.
|
|
113
|
+
3. Validate repository safety. Ask the user for confirmation to initialize the lane.
|
|
114
|
+
4. Ensure the managed ignore blocks are present.
|
|
115
|
+
5. Run:
|
|
116
|
+
```bash
|
|
117
|
+
git worktree add -b <branch-name> .slim/worktrees/<slug> <base-commit/branch>
|
|
118
|
+
```
|
|
119
|
+
6. Register the metadata in `.slim/worktrees.json`.
|
|
120
|
+
|
|
121
|
+
### Phase 2: Execution & Delegation
|
|
122
|
+
1. Run all sub-agents with their working directory set strictly to the worktree
|
|
123
|
+
path, such as `.slim/worktrees/<slug>`.
|
|
124
|
+
2. Do not modify the main checkout for lane work. Keep build, test, and edit
|
|
125
|
+
operations isolated inside the lane.
|
|
126
|
+
3. Track file or folder ownership per lane to avoid merge conflicts between
|
|
127
|
+
parallel agents.
|
|
128
|
+
4. Commit progress within the worktree only when the user asked for commits or
|
|
129
|
+
approved local checkpoint commits.
|
|
130
|
+
|
|
131
|
+
### Phase 3: Integration & Validation
|
|
132
|
+
Before merging or integrating the worktree branch:
|
|
133
|
+
1. Run lint, build, formatting, and unit tests inside the worktree directory.
|
|
134
|
+
2. Generate and display a clear diff comparing the worktree branch to the
|
|
135
|
+
integration base branch.
|
|
136
|
+
3. Ask the user for confirmation to integrate.
|
|
137
|
+
4. Perform the approved integration, such as merge or cherry-pick, from the main
|
|
138
|
+
checkout or the user-approved integration checkout.
|
|
139
|
+
|
|
140
|
+
### Phase 4: Cleanup & Pruning
|
|
141
|
+
1. Ensure all changes are safely merged or archived.
|
|
142
|
+
2. Confirm the worktree has no uncommitted changes.
|
|
143
|
+
3. Request user approval to remove the worktree.
|
|
144
|
+
4. Safely remove the worktree using:
|
|
145
|
+
```bash
|
|
146
|
+
git worktree remove .slim/worktrees/<slug>
|
|
147
|
+
```
|
|
148
|
+
5. Update `.slim/worktrees.json` to mark the lane as `archived` or remove it.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## When to Use vs. Not Use
|
|
153
|
+
|
|
154
|
+
### Use When:
|
|
155
|
+
- Performing risky or destructive refactoring that could break the active working environment.
|
|
156
|
+
- Working on parallel tasks/bugfixes that require switching contexts without committing half-finished work.
|
|
157
|
+
- Running independent background agents on separate branches.
|
|
158
|
+
- Conducting exploratory spikes or prototyping that may be discarded.
|
|
159
|
+
- Isolating third-party packages or complex upgrades.
|
|
160
|
+
- Explicitly asked to use worktrees for a specific task.
|
|
161
|
+
|
|
162
|
+
### Do NOT Use When:
|
|
163
|
+
- Making simple single-file changes, documentation updates, or minor bug fixes.
|
|
164
|
+
- Working in a git repository that is not fully initialized or has complex multi-submodule states not supported easily by worktrees.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function normalizeFallbackChainsForPreset(chains: Record<string, string[] | undefined>, presetName: string | null | undefined): Record<string, string[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createJsonErrorRecoveryHook, JSON_ERROR_PATTERNS, JSON_ERROR_REMINDER, JSON_ERROR_TOOL_EXCLUDE_LIST, } from './hook';
|
package/dist/utils/env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getEnv(name: string): string | undefined;
|