oh-my-opencode-serverlocal 0.1.0

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.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja-JP.md +775 -0
  3. package/README.ko-KR.md +796 -0
  4. package/README.md +792 -0
  5. package/README.zh-CN.md +765 -0
  6. package/dist/agents/council.d.ts +27 -0
  7. package/dist/agents/councillor.d.ts +2 -0
  8. package/dist/agents/designer.d.ts +2 -0
  9. package/dist/agents/explorer.d.ts +2 -0
  10. package/dist/agents/fixer.d.ts +2 -0
  11. package/dist/agents/index.d.ts +31 -0
  12. package/dist/agents/librarian.d.ts +2 -0
  13. package/dist/agents/observer.d.ts +2 -0
  14. package/dist/agents/oracle.d.ts +2 -0
  15. package/dist/agents/orchestrator.d.ts +28 -0
  16. package/dist/agents/permissions.d.ts +10 -0
  17. package/dist/cli/background-subagents.d.ts +13 -0
  18. package/dist/cli/companion.d.ts +4 -0
  19. package/dist/cli/config-io.d.ts +25 -0
  20. package/dist/cli/config-manager.d.ts +4 -0
  21. package/dist/cli/custom-skills-registry.d.ts +18 -0
  22. package/dist/cli/custom-skills.d.ts +13 -0
  23. package/dist/cli/doctor.d.ts +38 -0
  24. package/dist/cli/index.d.ts +3 -0
  25. package/dist/cli/index.js +3565 -0
  26. package/dist/cli/install.d.ts +7 -0
  27. package/dist/cli/model-key-normalization.d.ts +1 -0
  28. package/dist/cli/paths.d.ts +35 -0
  29. package/dist/cli/providers.d.ts +145 -0
  30. package/dist/cli/skills.d.ts +24 -0
  31. package/dist/cli/system.d.ts +6 -0
  32. package/dist/cli/types.d.ts +47 -0
  33. package/dist/companion/manager.d.ts +50 -0
  34. package/dist/companion/updater.d.ts +36 -0
  35. package/dist/config/agent-mcps.d.ts +11 -0
  36. package/dist/config/constants.d.ts +38 -0
  37. package/dist/config/council-schema.d.ts +137 -0
  38. package/dist/config/index.d.ts +5 -0
  39. package/dist/config/loader.d.ts +88 -0
  40. package/dist/config/runtime-preset.d.ts +11 -0
  41. package/dist/config/schema.d.ts +1107 -0
  42. package/dist/config/strip-orchestrator-model.d.ts +9 -0
  43. package/dist/config/utils.d.ts +18 -0
  44. package/dist/council/council-manager.d.ts +53 -0
  45. package/dist/council/index.d.ts +1 -0
  46. package/dist/hooks/apply-patch/codec.d.ts +7 -0
  47. package/dist/hooks/apply-patch/errors.d.ts +25 -0
  48. package/dist/hooks/apply-patch/execution-context.d.ts +27 -0
  49. package/dist/hooks/apply-patch/index.d.ts +15 -0
  50. package/dist/hooks/apply-patch/matching.d.ts +26 -0
  51. package/dist/hooks/apply-patch/operations.d.ts +3 -0
  52. package/dist/hooks/apply-patch/prepared-changes.d.ts +17 -0
  53. package/dist/hooks/apply-patch/resolution.d.ts +19 -0
  54. package/dist/hooks/apply-patch/rewrite.d.ts +7 -0
  55. package/dist/hooks/apply-patch/test-helpers.d.ts +6 -0
  56. package/dist/hooks/apply-patch/types.d.ts +80 -0
  57. package/dist/hooks/auto-update-checker/cache.d.ts +11 -0
  58. package/dist/hooks/auto-update-checker/checker.d.ts +38 -0
  59. package/dist/hooks/auto-update-checker/constants.d.ts +12 -0
  60. package/dist/hooks/auto-update-checker/index.d.ts +18 -0
  61. package/dist/hooks/auto-update-checker/skill-sync.d.ts +67 -0
  62. package/dist/hooks/auto-update-checker/types.d.ts +34 -0
  63. package/dist/hooks/chat-headers.d.ts +16 -0
  64. package/dist/hooks/command-hook-utils.d.ts +5 -0
  65. package/dist/hooks/deepwork/index.d.ts +13 -0
  66. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
  67. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  68. package/dist/hooks/filter-available-skills/index.d.ts +19 -0
  69. package/dist/hooks/foreground-fallback/index.d.ts +122 -0
  70. package/dist/hooks/image-hook.d.ts +8 -0
  71. package/dist/hooks/index.d.ts +16 -0
  72. package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
  73. package/dist/hooks/loop-command/index.d.ts +13 -0
  74. package/dist/hooks/phase-reminder/index.d.ts +25 -0
  75. package/dist/hooks/post-file-tool-nudge/index.d.ts +23 -0
  76. package/dist/hooks/reflect/index.d.ts +13 -0
  77. package/dist/hooks/session-lifecycle.d.ts +10 -0
  78. package/dist/hooks/task-session-manager/index.d.ts +58 -0
  79. package/dist/hooks/task-session-manager/pending-call-tracker.d.ts +13 -0
  80. package/dist/hooks/task-session-manager/task-context-tracker.d.ts +14 -0
  81. package/dist/hooks/types.d.ts +26 -0
  82. package/dist/index.d.ts +5 -0
  83. package/dist/index.js +39519 -0
  84. package/dist/interview/dashboard-manager.d.ts +21 -0
  85. package/dist/interview/dashboard.d.ts +67 -0
  86. package/dist/interview/document.d.ts +29 -0
  87. package/dist/interview/helpers.d.ts +10 -0
  88. package/dist/interview/index.d.ts +1 -0
  89. package/dist/interview/manager.d.ts +21 -0
  90. package/dist/interview/parser.d.ts +11 -0
  91. package/dist/interview/prompts.d.ts +7 -0
  92. package/dist/interview/server.d.ts +15 -0
  93. package/dist/interview/service.d.ts +45 -0
  94. package/dist/interview/session-server.d.ts +21 -0
  95. package/dist/interview/types.d.ts +111 -0
  96. package/dist/interview/ui.d.ts +11 -0
  97. package/dist/loop/loop-session.d.ts +64 -0
  98. package/dist/mcp/context7.d.ts +6 -0
  99. package/dist/mcp/grep-app.d.ts +6 -0
  100. package/dist/mcp/index.d.ts +8 -0
  101. package/dist/mcp/types.d.ts +12 -0
  102. package/dist/mcp/websearch.d.ts +9 -0
  103. package/dist/multiplexer/cmux/close-policy.d.ts +20 -0
  104. package/dist/multiplexer/cmux/index.d.ts +102 -0
  105. package/dist/multiplexer/cmux/session-lifecycle.d.ts +92 -0
  106. package/dist/multiplexer/cmux/session-state.d.ts +45 -0
  107. package/dist/multiplexer/factory.d.ts +17 -0
  108. package/dist/multiplexer/herdr/index.d.ts +35 -0
  109. package/dist/multiplexer/index.d.ts +12 -0
  110. package/dist/multiplexer/session-manager.d.ts +69 -0
  111. package/dist/multiplexer/shared.d.ts +31 -0
  112. package/dist/multiplexer/tmux/index.d.ts +26 -0
  113. package/dist/multiplexer/types.d.ts +57 -0
  114. package/dist/multiplexer/zellij/index.d.ts +47 -0
  115. package/dist/tools/acp-run.d.ts +3 -0
  116. package/dist/tools/ast-grep/cli.d.ts +15 -0
  117. package/dist/tools/ast-grep/constants.d.ts +25 -0
  118. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  119. package/dist/tools/ast-grep/index.d.ts +10 -0
  120. package/dist/tools/ast-grep/tools.d.ts +3 -0
  121. package/dist/tools/ast-grep/types.d.ts +30 -0
  122. package/dist/tools/ast-grep/utils.d.ts +4 -0
  123. package/dist/tools/cancel-task.d.ts +16 -0
  124. package/dist/tools/council.d.ts +10 -0
  125. package/dist/tools/index.d.ts +7 -0
  126. package/dist/tools/preset-manager.d.ts +26 -0
  127. package/dist/tools/smartfetch/binary.d.ts +3 -0
  128. package/dist/tools/smartfetch/cache.d.ts +6 -0
  129. package/dist/tools/smartfetch/constants.d.ts +12 -0
  130. package/dist/tools/smartfetch/index.d.ts +3 -0
  131. package/dist/tools/smartfetch/network.d.ts +38 -0
  132. package/dist/tools/smartfetch/secondary-model.d.ts +35 -0
  133. package/dist/tools/smartfetch/tool.d.ts +3 -0
  134. package/dist/tools/smartfetch/types.d.ts +122 -0
  135. package/dist/tools/smartfetch/utils.d.ts +20 -0
  136. package/dist/tui-state.d.ts +18 -0
  137. package/dist/tui.d.ts +13 -0
  138. package/dist/tui.js +1112 -0
  139. package/dist/utils/agent-variant.d.ts +23 -0
  140. package/dist/utils/background-job-board.d.ts +113 -0
  141. package/dist/utils/background-job-coordinator.d.ts +72 -0
  142. package/dist/utils/background-job-store.d.ts +46 -0
  143. package/dist/utils/compat.d.ts +29 -0
  144. package/dist/utils/councillor-models.d.ts +20 -0
  145. package/dist/utils/env.d.ts +3 -0
  146. package/dist/utils/escape-html.d.ts +1 -0
  147. package/dist/utils/frontmatter.d.ts +6 -0
  148. package/dist/utils/guards.d.ts +4 -0
  149. package/dist/utils/index.d.ts +10 -0
  150. package/dist/utils/internal-initiator.d.ts +11 -0
  151. package/dist/utils/logger.d.ts +6 -0
  152. package/dist/utils/polling.d.ts +21 -0
  153. package/dist/utils/session.d.ts +75 -0
  154. package/dist/utils/subagent-depth.d.ts +35 -0
  155. package/dist/utils/system-collapse.d.ts +6 -0
  156. package/dist/utils/task.d.ts +20 -0
  157. package/dist/utils/zip-extractor.d.ts +1 -0
  158. package/package.json +108 -0
  159. package/src/companion/companion-manifest.json +12 -0
  160. package/src/skills/clonedeps/README.md +23 -0
  161. package/src/skills/clonedeps/SKILL.md +240 -0
  162. package/src/skills/clonedeps/codemap.md +32 -0
  163. package/src/skills/codemap/README.md +59 -0
  164. package/src/skills/codemap/SKILL.md +163 -0
  165. package/src/skills/codemap/codemap.md +36 -0
  166. package/src/skills/codemap/scripts/codemap.mjs +483 -0
  167. package/src/skills/codemap/scripts/codemap.test.ts +129 -0
  168. package/src/skills/codemap.md +78 -0
  169. package/src/skills/deepwork/SKILL.md +122 -0
  170. package/src/skills/loop-engineering/SKILL.md +30 -0
  171. package/src/skills/oh-my-opencode-slim/SKILL.md +326 -0
  172. package/src/skills/reflect/SKILL.md +326 -0
  173. package/src/skills/simplify/README.md +19 -0
  174. package/src/skills/simplify/SKILL.md +138 -0
  175. package/src/skills/simplify/codemap.md +36 -0
  176. package/src/skills/verification-planning/SKILL.md +102 -0
  177. package/src/skills/worktrees/SKILL.md +171 -0
@@ -0,0 +1,171 @@
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 or cleaning lanes, inspect existing `.gitignore` and `.ignore`.
85
+ Update the managed block in place when present; otherwise append it. Add only
86
+ the missing exact lines below, never duplicate entries or modify unrelated
87
+ rules. These blocks keep lane artifacts git-local while the `.ignore` allowlist
88
+ keeps them readable to OpenCode.
89
+
90
+ `.gitignore`:
91
+
92
+ ```gitignore
93
+ # BEGIN oh-my-opencode-slim worktrees
94
+ .slim/worktrees/
95
+ .slim/worktrees.json
96
+ # END oh-my-opencode-slim worktrees
97
+ ```
98
+
99
+ `.ignore`:
100
+
101
+ ```ignore
102
+ # BEGIN oh-my-opencode-slim worktrees
103
+ !.slim/
104
+ !.slim/worktrees.json
105
+ !.slim/worktrees/
106
+ !.slim/worktrees/**
107
+ # END oh-my-opencode-slim worktrees
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Workflow Guide
113
+
114
+ ### Phase 1: Planning & Setup
115
+ 1. Identify the task scope and determine a short `<slug>` for the worktree.
116
+ 2. Formulate a branch name. Default to `omos/<slug>` unless project/user conventions dictate otherwise.
117
+ 3. Validate repository safety. Ask the user for confirmation to initialize the lane.
118
+ 4. Before creating the lane, ensure the managed ignore blocks are present using
119
+ the Ignore File Setup rules above.
120
+ 5. Run:
121
+ ```bash
122
+ git worktree add -b <branch-name> .slim/worktrees/<slug> <base-commit/branch>
123
+ ```
124
+ 6. Register the metadata in `.slim/worktrees.json`.
125
+
126
+ ### Phase 2: Execution & Delegation
127
+ 1. Run all sub-agents with their working directory set strictly to the worktree
128
+ path, such as `.slim/worktrees/<slug>`.
129
+ 2. Do not modify the main checkout for lane work. Keep build, test, and edit
130
+ operations isolated inside the lane.
131
+ 3. Track file or folder ownership per lane to avoid merge conflicts between
132
+ parallel agents.
133
+ 4. Commit progress within the worktree only when the user asked for commits or
134
+ approved local checkpoint commits.
135
+
136
+ ### Phase 3: Integration & Validation
137
+ Before merging or integrating the worktree branch:
138
+ 1. Run lint, build, formatting, and unit tests inside the worktree directory.
139
+ 2. Generate and display a clear diff comparing the worktree branch to the
140
+ integration base branch.
141
+ 3. Ask the user for confirmation to integrate.
142
+ 4. Perform the approved integration, such as merge or cherry-pick, from the main
143
+ checkout or the user-approved integration checkout.
144
+
145
+ ### Phase 4: Cleanup & Pruning
146
+ 1. Before cleaning the lane, ensure the managed ignore blocks follow the Ignore
147
+ File Setup rules above.
148
+ 2. Ensure all changes are safely merged or archived.
149
+ 3. Confirm the worktree has no uncommitted changes.
150
+ 4. Request user approval to remove the worktree.
151
+ 5. Safely remove the worktree using:
152
+ ```bash
153
+ git worktree remove .slim/worktrees/<slug>
154
+ ```
155
+ 6. Update `.slim/worktrees.json` to mark the lane as `archived` or remove it.
156
+
157
+ ---
158
+
159
+ ## When to Use vs. Not Use
160
+
161
+ ### Use When:
162
+ - Performing risky or destructive refactoring that could break the active working environment.
163
+ - Working on parallel tasks/bugfixes that require switching contexts without committing half-finished work.
164
+ - Running independent background agents on separate branches.
165
+ - Conducting exploratory spikes or prototyping that may be discarded.
166
+ - Isolating third-party packages or complex upgrades.
167
+ - Explicitly asked to use worktrees for a specific task.
168
+
169
+ ### Do NOT Use When:
170
+ - Making simple single-file changes, documentation updates, or minor bug fixes.
171
+ - Working in a git repository that is not fully initialized or has complex multi-submodule states not supported easily by worktrees.