claudecode-omc 5.3.0 → 5.5.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 (91) hide show
  1. package/.local/guidelines/CLAUDE.md +31 -0
  2. package/README.md +57 -1
  3. package/bundled/manifest.json +2 -2
  4. package/bundled/upstream/oh-my-claudecode/agents/analyst.md +1 -1
  5. package/bundled/upstream/oh-my-claudecode/agents/architect.md +1 -1
  6. package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +1 -1
  7. package/bundled/upstream/oh-my-claudecode/agents/code-simplifier.md +1 -1
  8. package/bundled/upstream/oh-my-claudecode/agents/critic.md +1 -1
  9. package/bundled/upstream/oh-my-claudecode/agents/debugger.md +1 -1
  10. package/bundled/upstream/oh-my-claudecode/agents/designer.md +1 -1
  11. package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
  12. package/bundled/upstream/oh-my-claudecode/agents/executor.md +1 -1
  13. package/bundled/upstream/oh-my-claudecode/agents/explore.md +1 -1
  14. package/bundled/upstream/oh-my-claudecode/agents/git-master.md +3 -3
  15. package/bundled/upstream/oh-my-claudecode/agents/planner.md +1 -1
  16. package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +1 -1
  17. package/bundled/upstream/oh-my-claudecode/agents/scientist.md +1 -1
  18. package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +1 -1
  19. package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +1 -75
  20. package/bundled/upstream/oh-my-claudecode/agents/tracer.md +1 -1
  21. package/bundled/upstream/oh-my-claudecode/agents/verifier.md +1 -1
  22. package/bundled/upstream/oh-my-claudecode/agents/writer.md +1 -1
  23. package/bundled/upstream/oh-my-claudecode/hooks/hooks.json +21 -1
  24. package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +200 -0
  25. package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +17 -10
  26. package/bundled/upstream/oh-my-claudecode/skills/autoresearch/SKILL.md +90 -0
  27. package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +15 -6
  28. package/bundled/upstream/oh-my-claudecode/skills/configure-notifications/SKILL.md +12 -12
  29. package/bundled/upstream/oh-my-claudecode/skills/debug/SKILL.md +35 -0
  30. package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +4 -0
  31. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +23 -18
  32. package/bundled/upstream/oh-my-claudecode/skills/hud/SKILL.md +23 -101
  33. package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +27 -2
  34. package/bundled/upstream/oh-my-claudecode/skills/mcp-setup/SKILL.md +67 -8
  35. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +32 -47
  36. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/SKILL.md +4 -2
  37. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +15 -4
  38. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +9 -9
  39. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +13 -13
  40. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +3 -3
  41. package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +28 -0
  42. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +1 -0
  43. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/SKILL.md +25 -5
  44. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +2 -15
  45. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
  46. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +2 -2
  47. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +109 -4
  48. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +26 -0
  49. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +46 -5
  50. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/templates/pr-review.md +5 -2
  51. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/templates/projects.json +1 -1
  52. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +336 -0
  53. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +18 -9
  54. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +2 -0
  55. package/bundled/upstream/oh-my-claudecode/skills/release/SKILL.md +167 -57
  56. package/bundled/upstream/oh-my-claudecode/skills/remember/SKILL.md +41 -0
  57. package/bundled/upstream/oh-my-claudecode/skills/self-improve/SKILL.md +391 -0
  58. package/bundled/upstream/oh-my-claudecode/skills/self-improve/data_contracts.md +274 -0
  59. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/plot_progress.py +128 -0
  60. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/resolve-paths.mjs +192 -0
  61. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/validate.sh +404 -0
  62. package/bundled/upstream/oh-my-claudecode/skills/self-improve/si-benchmark-builder.md +79 -0
  63. package/bundled/upstream/oh-my-claudecode/skills/self-improve/si-goal-clarifier.md +94 -0
  64. package/bundled/upstream/oh-my-claudecode/skills/self-improve/si-researcher.md +73 -0
  65. package/bundled/upstream/oh-my-claudecode/skills/self-improve/templates/agent-settings.json +14 -0
  66. package/bundled/upstream/oh-my-claudecode/skills/self-improve/templates/goal.md +22 -0
  67. package/bundled/upstream/oh-my-claudecode/skills/self-improve/templates/harness.md +18 -0
  68. package/bundled/upstream/oh-my-claudecode/skills/self-improve/templates/idea.md +5 -0
  69. package/bundled/upstream/oh-my-claudecode/skills/self-improve/templates/settings.json +23 -0
  70. package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +46 -77
  71. package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +53 -0
  72. package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +83 -11
  73. package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +1 -0
  74. package/bundled/upstream/oh-my-claudecode/skills/ultraqa/SKILL.md +1 -0
  75. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +1 -0
  76. package/bundled/upstream/oh-my-claudecode/skills/verify/SKILL.md +37 -0
  77. package/bundled/upstream/oh-my-claudecode/skills/wiki/SKILL.md +67 -0
  78. package/package.json +3 -1
  79. package/src/cli/artifact.js +63 -2
  80. package/src/cli/guidelines.js +83 -0
  81. package/src/cli/index.js +13 -1
  82. package/src/cli/setup.js +48 -18
  83. package/src/cli/source.js +35 -1
  84. package/src/config/artifact-types.js +12 -2
  85. package/src/config/paths.js +95 -4
  86. package/src/config/sources.js +29 -5
  87. package/src/guidelines/apply.js +152 -0
  88. package/src/guidelines/optimizer.js +325 -0
  89. package/src/merge/claude-md-merger.js +35 -12
  90. package/templates/merge-config.json +12 -1
  91. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/skill-debugger.md +0 -101
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: hud
3
3
  description: Configure HUD display options (layout, presets, display elements)
4
+ argument-hint: "[setup|minimal|focused|full|status]"
4
5
  role: config-writer # DOCUMENTATION ONLY - This skill writes to ~/.claude/ paths
5
6
  scope: ~/.claude/** # DOCUMENTATION ONLY - Allowed write scope
6
7
  level: 2
@@ -45,112 +46,25 @@ node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR
45
46
  node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{const v=f.readdirSync(b).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));if(v.length===0){console.log('Plugin not installed - run: /plugin install oh-my-claudecode');process.exit()}const l=v[v.length-1],h=p.join(b,l,'dist','hud','index.js');console.log('Version:',l);console.log(f.existsSync(h)?'READY':'NOT_FOUND - try reinstalling: /plugin install oh-my-claudecode')}catch{console.log('Plugin not installed - run: /plugin install oh-my-claudecode')}"
46
47
  ```
47
48
 
48
- **Step 3:** If omc-hud.mjs is MISSING or argument is `setup`, create the HUD directory and script:
49
+ **Step 3:** If omc-hud.mjs is MISSING or argument is `setup`, install the HUD wrapper and its dependency from the canonical template:
49
50
 
50
- First, create the directory:
51
51
  ```bash
52
- node -e "require('fs').mkdirSync(require('path').join(process.env.CLAUDE_CONFIG_DIR||require('path').join(require('os').homedir(),'.claude'),'hud'),{recursive:true})"
52
+ HUD_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud"
53
+ mkdir -p "$HUD_DIR/lib"
54
+ cp "${CLAUDE_PLUGIN_ROOT}/scripts/lib/hud-wrapper-template.txt" "$HUD_DIR/omc-hud.mjs"
55
+ cp "${CLAUDE_PLUGIN_ROOT}/scripts/lib/config-dir.mjs" "$HUD_DIR/lib/config-dir.mjs"
53
56
  ```
54
57
 
55
- Then, use the Write tool to create `~/.claude/hud/omc-hud.mjs` with this exact content:
56
-
57
- ```javascript
58
- #!/usr/bin/env node
59
- /**
60
- * OMC HUD - Statusline Script
61
- * Wrapper that imports from dev paths, plugin cache, or npm package
62
- */
63
-
64
- import { existsSync, readdirSync } from "node:fs";
65
- import { homedir } from "node:os";
66
- import { join } from "node:path";
67
- import { pathToFileURL } from "node:url";
68
-
69
- async function main() {
70
- const home = homedir();
71
- let pluginCacheVersion = null;
72
- let pluginCacheDir = null;
73
-
74
- // 1. Development paths (only when OMC_DEV=1)
75
- if (process.env.OMC_DEV === "1") {
76
- const devPaths = [
77
- join(home, "Workspace/oh-my-claudecode/dist/hud/index.js"),
78
- join(home, "workspace/oh-my-claudecode/dist/hud/index.js"),
79
- join(home, "projects/oh-my-claudecode/dist/hud/index.js"),
80
- ];
81
-
82
- for (const devPath of devPaths) {
83
- if (existsSync(devPath)) {
84
- try {
85
- await import(pathToFileURL(devPath).href);
86
- return;
87
- } catch { /* continue */ }
88
- }
89
- }
90
- }
91
-
92
- // 2. Plugin cache (for production installs)
93
- // Respect CLAUDE_CONFIG_DIR so installs under a custom config dir are found
94
- const configDir = process.env.CLAUDE_CONFIG_DIR || join(home, ".claude");
95
- const pluginCacheBase = join(configDir, "plugins", "cache", "omc", "oh-my-claudecode");
96
- if (existsSync(pluginCacheBase)) {
97
- try {
98
- const versions = readdirSync(pluginCacheBase);
99
- if (versions.length > 0) {
100
- // Filter to only versions with built dist/hud/index.js
101
- // This prevents picking an unbuilt new version after plugin update
102
- const builtVersions = versions.filter(version => {
103
- const pluginPath = join(pluginCacheBase, version, "dist/hud/index.js");
104
- return existsSync(pluginPath);
105
- });
106
-
107
- if (builtVersions.length > 0) {
108
- const latestVersion = builtVersions.sort((a, b) => a.localeCompare(b, undefined, { numeric: true })).reverse()[0];
109
- pluginCacheVersion = latestVersion;
110
- pluginCacheDir = join(pluginCacheBase, latestVersion);
111
- const pluginPath = join(pluginCacheDir, "dist/hud/index.js");
112
- await import(pathToFileURL(pluginPath).href);
113
- return;
114
- }
115
- }
116
- } catch { /* continue */ }
117
- }
118
-
119
- // 3. npm package (global or local install)
120
- try {
121
- await import("oh-my-claudecode/dist/hud/index.js");
122
- return;
123
- } catch { /* continue */ }
124
-
125
- // 4. Fallback: provide detailed error message with fix instructions
126
- if (pluginCacheDir && existsSync(pluginCacheDir)) {
127
- // Plugin exists but dist/ folder is missing - needs build
128
- const distDir = join(pluginCacheDir, "dist");
129
- if (!existsSync(distDir)) {
130
- console.log(`[OMC HUD] Plugin installed but not built. Run: cd "${pluginCacheDir}" && npm install && npm run build`);
131
- } else {
132
- console.log(`[OMC HUD] Plugin dist/ exists but HUD not found. Run: cd "${pluginCacheDir}" && npm run build`);
133
- }
134
- } else if (existsSync(pluginCacheBase)) {
135
- // Plugin cache directory exists but no built versions found
136
- console.log("[OMC HUD] Plugin cache found but no built versions. Run: /oh-my-claudecode:omc-setup");
137
- } else {
138
- // No plugin installation found at all
139
- console.log("[OMC HUD] Plugin not installed. Run: /oh-my-claudecode:omc-setup");
140
- }
141
- }
142
-
143
- main();
144
- ```
58
+ **IMPORTANT:** Always copy from the canonical template at `scripts/lib/hud-wrapper-template.txt`. Do NOT write the wrapper content inline — the template is the single source of truth and is guarded by drift tests (`src/__tests__/hud-wrapper-template-sync.test.ts`, `src/__tests__/paths-consistency.test.ts`).
145
59
 
146
- **Step 3:** Make it executable (Unix only, skip on Windows):
60
+ **Step 4:** Make it executable (Unix only, skip on Windows):
147
61
  ```bash
148
62
  node -e "if(process.platform==='win32'){console.log('Skipped (Windows)')}else{require('fs').chmodSync(require('path').join(process.env.CLAUDE_CONFIG_DIR||require('path').join(require('os').homedir(),'.claude'),'hud','omc-hud.mjs'),0o755);console.log('Done')}"
149
63
  ```
150
64
 
151
- **Step 4:** Update settings.json to use the HUD:
65
+ **Step 5:** Update settings.json to use the HUD:
152
66
 
153
- Read `~/.claude/settings.json`, then update/add the `statusLine` field.
67
+ Read `${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json`, then update/add the `statusLine` field.
154
68
 
155
69
  **IMPORTANT:** Do not use `~` in the command. On Unix, use `$HOME` to keep the path portable across machines. On Windows, use an absolute path because Windows does not expand `~` in shell commands.
156
70
 
@@ -166,7 +80,7 @@ Then set the `statusLine` field. On Unix it should stay portable and look like:
166
80
  {
167
81
  "statusLine": {
168
82
  "type": "command",
169
- "command": "node $HOME/.claude/hud/omc-hud.mjs"
83
+ "command": "node ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud.mjs"
170
84
  }
171
85
  }
172
86
  ```
@@ -183,12 +97,12 @@ On Windows the path uses forward slashes (not backslashes):
183
97
 
184
98
  Use the Edit tool to add/update this field while preserving other settings.
185
99
 
186
- **Step 5:** Clean up old HUD scripts (if any):
100
+ **Step 6:** Clean up old HUD scripts (if any):
187
101
  ```bash
188
- node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),t=p.join(d,'hud','omc-hud.mjs');try{if(f.existsSync(t)){f.unlinkSync(t);console.log('Removed legacy script')}else{console.log('No legacy script found')}}catch{}"
102
+ node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),t=p.join(d,'hud','omc-hud.js');try{if(f.existsSync(t)){f.unlinkSync(t);console.log('Removed legacy omc-hud.js')}else{console.log('No legacy script found')}}catch{}"
189
103
  ```
190
104
 
191
- **Step 6:** Tell the user to restart Claude Code for changes to take effect.
105
+ **Step 7:** Tell the user to restart Claude Code for changes to take effect.
192
106
 
193
107
  ## Display Presets
194
108
 
@@ -277,6 +191,7 @@ You can manually edit the config file. Each option can be set individually - any
277
191
  "sessionHealth": true,
278
192
  "useBars": true,
279
193
  "showCallCounts": true,
194
+ "callCountsFormat": "auto",
280
195
  "safeMode": true,
281
196
  "maxOutputLines": 4
282
197
  },
@@ -294,6 +209,13 @@ You can manually edit the config file. Each option can be set individually - any
294
209
  }
295
210
  ```
296
211
 
212
+ ### callCountsFormat
213
+
214
+ Controls the call-count badge icon style:
215
+ - `"auto"` (default): emoji on macOS/Linux, ASCII on Windows/WSL
216
+ - `"emoji"`: force `🔧 🤖 ⚡`
217
+ - `"ascii"`: force `T: A: S:`
218
+
297
219
  ### safeMode
298
220
 
299
221
  When `safeMode` is `true` (default), the HUD strips ANSI codes and uses ASCII-only output to prevent terminal rendering corruption during concurrent updates. This is especially important on Windows and when using terminal multiplexers.
@@ -320,7 +242,7 @@ If the HUD is not showing:
320
242
  {
321
243
  "statusLine": {
322
244
  "type": "command",
323
- "command": "node $HOME/.claude/hud/omc-hud.mjs"
245
+ "command": "node ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud.mjs"
324
246
  }
325
247
  }
326
248
  ```
@@ -109,12 +109,37 @@ This classification ensures expertise can be updated independently without desta
109
109
 
110
110
  ### Step 4: Save Location
111
111
 
112
- - **User-level**: ~/.claude/skills/omc-learned/ - Rare. Only for truly portable insights.
113
- - **Project-level**: .omc/skills/ - Default. Version-controlled with repo.
112
+ - **User-level**: `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/<skill-name>.md` - Rare. Only for truly portable insights.
113
+ - **Project-level**: `.omc/skills/<skill-name>.md` - Default. Version-controlled with repo.
114
+
115
+ ### Required File Format
116
+
117
+ Every learned skill file MUST start with YAML frontmatter so learned-skill flat-file discovery can load it.
118
+ Do **not** write plain markdown without frontmatter.
119
+
120
+ Minimum required frontmatter:
121
+
122
+ ```yaml
123
+ ---
124
+ name: <skill-name>
125
+ description: <one-line description>
126
+ triggers:
127
+ - <trigger-1>
128
+ - <trigger-2>
129
+ ---
130
+ ```
114
131
 
115
132
  ### Skill Body Template
116
133
 
117
134
  ```markdown
135
+ ---
136
+ name: <skill-name>
137
+ description: <one-line description>
138
+ triggers:
139
+ - <trigger-1>
140
+ - <trigger-2>
141
+ ---
142
+
118
143
  # [Skill Name]
119
144
 
120
145
  ## The Insight
@@ -12,19 +12,55 @@ Configure Model Context Protocol (MCP) servers to extend Claude Code's capabilit
12
12
 
13
13
  MCP servers provide additional tools that Claude Code agents can use. This skill helps you configure popular MCP servers using the `claude mcp add` command-line interface.
14
14
 
15
- ## Step 1: Show Available MCP Servers
15
+ ## Step 1: Choose a Setup Path
16
16
 
17
- Present the user with available MCP server options using AskUserQuestion:
17
+ Use **AskUserQuestion** with **one question at a time** and **no more than 3 options per question**. Recent Claude Code builds reject larger option payloads as invalid tool parameters, so keep the MCP selection flow staged.
18
18
 
19
- **Question:** "Which MCP server would you like to configure?"
19
+ ### Step 1.1: First menu
20
+
21
+ **Question:** "What kind of MCP setup would you like?"
22
+
23
+ **Options:**
24
+ 1. **Recommended starter setup** - Fast path for the most common OMC MCP additions
25
+ 2. **Individual popular server** - Pick one built-in server from a short follow-up menu
26
+ 3. **Custom server** - Add your own stdio or HTTP MCP server
27
+
28
+ ### Step 1.2: If the user chooses "Recommended starter setup"
29
+
30
+ Ask a follow-up **AskUserQuestion**:
31
+
32
+ **Question:** "Which recommended MCP bundle should I configure?"
33
+
34
+ **Options:**
35
+ 1. **Context7 only (Recommended)** - Zero-config docs/context server
36
+ 2. **Context7 + Exa** - Docs/context plus enhanced web search
37
+ 3. **Full recommended bundle** - Context7, Exa, Filesystem, and GitHub
38
+
39
+ Map that choice to the server list you will configure.
40
+
41
+ ### Step 1.3: If the user chooses "Individual popular server"
42
+
43
+ Ask a follow-up **AskUserQuestion**:
44
+
45
+ **Question:** "Which server should I configure first?"
20
46
 
21
47
  **Options:**
22
- 1. **Context7** - Documentation and code context from popular libraries
48
+ 1. **Context7 (Recommended)** - Documentation and code context from popular libraries
23
49
  2. **Exa Web Search** - Enhanced web search (replaces built-in websearch)
24
- 3. **Filesystem** - Extended file system access with additional capabilities
25
- 4. **GitHub** - GitHub API integration for issues, PRs, and repository management
26
- 5. **All of the above** - Configure all recommended MCP servers
27
- 6. **Custom** - Add a custom MCP server
50
+ 3. **More server choices** - Filesystem, GitHub, or the full recommended bundle
51
+
52
+ If the user chooses **More server choices**, ask one more **AskUserQuestion**:
53
+
54
+ **Question:** "Which additional MCP option do you want?"
55
+
56
+ **Options:**
57
+ 1. **Filesystem (Recommended)** - Extended file system access with additional capabilities
58
+ 2. **GitHub** - GitHub API integration for issues, PRs, and repository management
59
+ 3. **Full recommended bundle** - Configure Context7, Exa, Filesystem, and GitHub together
60
+
61
+ ### Step 1.4: If the user chooses "Custom server"
62
+
63
+ Skip directly to the **Custom MCP Server** section below.
28
64
 
29
65
  ## Step 2: Gather Required Information
30
66
 
@@ -163,6 +199,29 @@ claude mcp add --transport http <server-name> <url>
163
199
  claude mcp add --transport http --header "Authorization: Bearer <token>" <server-name> <url>
164
200
  ```
165
201
 
202
+ ### Company-context convention
203
+
204
+ If the custom server is meant to provide organization-specific reference material to OMC workflows, prefer a single tool named `get_company_context` that returns markdown via `{ context: string }`.
205
+
206
+ Example local registration:
207
+
208
+ ```bash
209
+ claude mcp add company-context -- node examples/vendor-mcp-server/server.mjs
210
+ ```
211
+
212
+ Then point OMC at the full tool name in `.claude/omc.jsonc` or `~/.config/claude-omc/config.jsonc`:
213
+
214
+ ```jsonc
215
+ {
216
+ "companyContext": {
217
+ "tool": "mcp__company-context__get_company_context",
218
+ "onError": "warn"
219
+ }
220
+ }
221
+ ```
222
+
223
+ This remains advisory prompt context, not runtime enforcement.
224
+
166
225
  ## Common Issues
167
226
 
168
227
  ### MCP Server Not Loading
@@ -27,10 +27,10 @@ npm view oh-my-claudecode version 2>/dev/null || echo "Latest: (unavailable)"
27
27
 
28
28
  ### Step 2: Check for Legacy Hooks in settings.json
29
29
 
30
- Read both `~/.claude/settings.json` (profile-level) and `./.claude/settings.json` (project-level) and check if there's a `"hooks"` key with entries like:
31
- - `bash $HOME/.claude/hooks/keyword-detector.sh`
32
- - `bash $HOME/.claude/hooks/persistent-mode.sh`
33
- - `bash $HOME/.claude/hooks/session-start.sh`
30
+ Read both `${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json` (profile-level) and `./.claude/settings.json` (project-level) and check if there's a `"hooks"` key with entries like:
31
+ - `bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/keyword-detector.sh`
32
+ - `bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/persistent-mode.sh`
33
+ - `bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/session-start.sh`
34
34
 
35
35
  **Diagnosis**:
36
36
  - If found: CRITICAL - legacy hooks causing duplicates
@@ -38,7 +38,7 @@ Read both `~/.claude/settings.json` (profile-level) and `./.claude/settings.json
38
38
  ### Step 3: Check for Legacy Bash Hook Scripts
39
39
 
40
40
  ```bash
41
- ls -la ~/.claude/hooks/*.sh 2>/dev/null
41
+ ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/*.sh 2>/dev/null
42
42
  ```
43
43
 
44
44
  **Diagnosis**:
@@ -48,19 +48,22 @@ ls -la ~/.claude/hooks/*.sh 2>/dev/null
48
48
 
49
49
  ```bash
50
50
  # Check if CLAUDE.md exists
51
- ls -la ~/.claude/CLAUDE.md 2>/dev/null
51
+ ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/CLAUDE.md 2>/dev/null
52
52
 
53
53
  # Check for OMC markers (<!-- OMC:START --> is the canonical marker)
54
- grep -q "<!-- OMC:START -->" ~/.claude/CLAUDE.md 2>/dev/null && echo "Has OMC config" || echo "Missing OMC config in CLAUDE.md"
54
+ grep -q "<!-- OMC:START -->" "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/CLAUDE.md" 2>/dev/null && echo "Has OMC config" || echo "Missing OMC config in CLAUDE.md"
55
+
56
+ # Check CLAUDE.md (or deterministic companion) version marker and compare with latest installed plugin cache version
57
+ node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const base=p.join(d,'CLAUDE.md');let baseContent='';try{baseContent=f.readFileSync(base,'utf8')}catch{};let candidates=[base];let referenced='';const importMatch=baseContent.match(/CLAUDE-[^ )]*\\.md/);if(importMatch){referenced=p.join(d,importMatch[0]);candidates.push(referenced)}else{const defaultCompanion=p.join(d,'CLAUDE-omc.md');if(f.existsSync(defaultCompanion))candidates.push(defaultCompanion);try{const others=f.readdirSync(d).filter(n=>/^CLAUDE-.*\\.md$/i.test(n)).sort().map(n=>p.join(d,n));for(const o of others){if(candidates.includes(o)===false)candidates.push(o)}}catch{}};let claudeV='(missing)';let claudeSource='(none)';for(const file of candidates){try{const c=f.readFileSync(file,'utf8');const m=c.match(/<!--\\s*OMC:VERSION:([^\\s]+)\\s*-->/i);if(m){claudeV=m[1];claudeSource=file;break}}catch{}};if(claudeV==='(missing)'&&candidates.length>0){claudeV='(missing marker)';claudeSource='scanned deterministic CLAUDE sources';};let pluginV='(none)';try{const b=p.join(d,'plugins','cache','omc','oh-my-claudecode');const v=f.readdirSync(b).filter(x=>/^\\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));pluginV=v.length?v[v.length-1]:'(none)';}catch{};console.log('CLAUDE.md OMC version:',claudeV);console.log('OMC version source:',claudeSource);console.log('Latest cached plugin version:',pluginV);if(claudeV==='(missing)'||claudeV==='(missing marker)'||pluginV==='(none)'){console.log('VERSION CHECK SKIPPED: missing CLAUDE marker or plugin cache')}else if(claudeV===pluginV){console.log('VERSION MATCH: CLAUDE and plugin cache are aligned')}else{console.log('VERSION DRIFT: CLAUDE.md and plugin versions differ')}"
55
58
 
56
59
  # Check companion files for file-split pattern (e.g. CLAUDE-omc.md)
57
- find "$HOME/.claude" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null
60
+ find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null
58
61
  while IFS= read -r f; do
59
62
  grep -q "<!-- OMC:START -->" "$f" 2>/dev/null && echo "Has OMC config in companion: $f"
60
- done < <(find "$HOME/.claude" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null)
63
+ done < <(find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null)
61
64
 
62
65
  # Check if CLAUDE.md references a companion file
63
- grep -o "CLAUDE-[^ )]*\.md" ~/.claude/CLAUDE.md 2>/dev/null
66
+ grep -o "CLAUDE-[^ )]*\.md" "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/CLAUDE.md" 2>/dev/null
64
67
  ```
65
68
 
66
69
  **Diagnosis**:
@@ -68,6 +71,8 @@ grep -o "CLAUDE-[^ )]*\.md" ~/.claude/CLAUDE.md 2>/dev/null
68
71
  - If `<!-- OMC:START -->` found in CLAUDE.md: OK
69
72
  - If `<!-- OMC:START -->` found in a companion file (e.g. `CLAUDE-omc.md`): OK - file-split pattern detected
70
73
  - If no OMC markers in CLAUDE.md or any companion file: WARN - outdated CLAUDE.md
74
+ - If `OMC:VERSION` marker is missing from deterministic CLAUDE source scan (base + referenced companion): WARN - cannot verify CLAUDE.md freshness
75
+ - If `CLAUDE.md OMC version` != `Latest cached plugin version`: WARN - version drift detected (run `omc update` or `omc setup`)
71
76
 
72
77
  ### Step 5: Check for Stale Plugin Cache
73
78
 
@@ -86,13 +91,13 @@ Check for legacy agents, commands, and skills installed via curl (before plugin
86
91
 
87
92
  ```bash
88
93
  # Check for legacy agents directory
89
- ls -la ~/.claude/agents/ 2>/dev/null
94
+ ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents/ 2>/dev/null
90
95
 
91
96
  # Check for legacy commands directory
92
- ls -la ~/.claude/commands/ 2>/dev/null
97
+ ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands/ 2>/dev/null
93
98
 
94
99
  # Check for legacy skills directory
95
- ls -la ~/.claude/skills/ 2>/dev/null
100
+ ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills/ 2>/dev/null
96
101
  ```
97
102
 
98
103
  **Diagnosis**:
@@ -152,14 +157,14 @@ If issues found, ask user: "Would you like me to fix these issues automatically?
152
157
  If yes, apply fixes:
153
158
 
154
159
  ### Fix: Legacy Hooks in settings.json
155
- Remove the `"hooks"` section from `~/.claude/settings.json` (keep other settings intact)
160
+ Remove the `"hooks"` section from `${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json` (keep other settings intact)
156
161
 
157
162
  ### Fix: Legacy Bash Scripts
158
163
  ```bash
159
- rm -f ~/.claude/hooks/keyword-detector.sh
160
- rm -f ~/.claude/hooks/persistent-mode.sh
161
- rm -f ~/.claude/hooks/session-start.sh
162
- rm -f ~/.claude/hooks/stop-continuation.sh
164
+ rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/keyword-detector.sh
165
+ rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/persistent-mode.sh
166
+ rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/session-start.sh
167
+ rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/stop-continuation.sh
163
168
  ```
164
169
 
165
170
  ### Fix: Outdated Plugin
@@ -175,29 +180,9 @@ node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=pro
175
180
  ```
176
181
 
177
182
  ### Fix: Missing/Outdated CLAUDE.md
178
- Fetch latest from configured GitHub source and write to `~/.claude/CLAUDE.md`:
179
- ```bash
180
- OMC_REPO="${OMC_REPO:-}"
181
- OMC_BRANCH="${OMC_BRANCH:-}"
182
- CONFIG_FILE="$HOME/.claude/.omc-config.json"
183
-
184
- if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
185
- OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
186
- fi
187
- if [ -z "$OMC_BRANCH" ] && [ -f "$CONFIG_FILE" ]; then
188
- OMC_BRANCH=$(jq -r '.updateBranch // empty' "$CONFIG_FILE" 2>/dev/null)
189
- fi
190
- if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
191
- ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
192
- if [ -n "$ORIGIN_URL" ]; then
193
- OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
194
- fi
195
- fi
196
-
197
- OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
198
- OMC_BRANCH="${OMC_BRANCH:-main}"
199
- curl -fsSL "https://raw.githubusercontent.com/${OMC_REPO}/${OMC_BRANCH}/docs/CLAUDE.md" -o "$HOME/.claude/CLAUDE.md"
200
- echo "Updated ~/.claude/CLAUDE.md from ${OMC_REPO}@${OMC_BRANCH}"
183
+ Fetch latest from GitHub and write to `${CLAUDE_CONFIG_DIR:-~/.claude}/CLAUDE.md`:
184
+ ```
185
+ WebFetch(url: "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.md", prompt: "Return the complete raw markdown content exactly as-is")
201
186
  ```
202
187
 
203
188
  ### Fix: Legacy Curl-Installed Content
@@ -206,14 +191,14 @@ Remove legacy agents, commands, and skills directories (now provided by plugin):
206
191
 
207
192
  ```bash
208
193
  # Backup first (optional - ask user)
209
- # mv ~/.claude/agents ~/.claude/agents.bak
210
- # mv ~/.claude/commands ~/.claude/commands.bak
211
- # mv ~/.claude/skills ~/.claude/skills.bak
194
+ # mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents.bak
195
+ # mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands.bak
196
+ # mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills.bak
212
197
 
213
198
  # Or remove directly
214
- rm -rf ~/.claude/agents
215
- rm -rf ~/.claude/commands
216
- rm -rf ~/.claude/skills
199
+ rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents
200
+ rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands
201
+ rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills
217
202
  ```
218
203
 
219
204
  **Note**: Only remove if these contain oh-my-claudecode-related files. If user has custom agents/commands/skills, warn them and ask before removing.
@@ -62,6 +62,8 @@ MODES:
62
62
  Global Configuration (--global)
63
63
  - Downloads fresh CLAUDE.md to ~/.claude/
64
64
  - Backs up existing CLAUDE.md to ~/.claude/CLAUDE.md.backup.YYYY-MM-DD
65
+ - Default: explicitly overwrites ~/.claude/CLAUDE.md so plain `claude` also uses OMC
66
+ - Optional preserve mode keeps the user's base `CLAUDE.md` and installs OMC into `CLAUDE-omc.md` for `omc` launches
65
67
  - Applies to all Claude Code sessions
66
68
  - Cleans up legacy hooks
67
69
  - Use this to update global config after OMC upgrades
@@ -77,7 +79,7 @@ EXAMPLES:
77
79
  /oh-my-claudecode:omc-setup --global # Update all projects
78
80
  /oh-my-claudecode:omc-setup --force # Re-run full setup wizard
79
81
 
80
- For more info: https://github.com/${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}
82
+ For more info: https://github.com/Yeachan-Heo/oh-my-claudecode
81
83
  ```
82
84
 
83
85
  ## Pre-Setup Check: Already Configured?
@@ -86,7 +88,7 @@ For more info: https://github.com/${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}
86
88
 
87
89
  ```bash
88
90
  # Check if setup was already completed
89
- CONFIG_FILE="$HOME/.claude/.omc-config.json"
91
+ CONFIG_FILE="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.omc-config.json"
90
92
 
91
93
  if [ -f "$CONFIG_FILE" ]; then
92
94
  SETUP_COMPLETED=$(jq -r '.setupCompleted // empty' "$CONFIG_FILE" 2>/dev/null)
@@ -15,15 +15,25 @@ Otherwise (initial setup wizard), use AskUserQuestion to prompt:
15
15
 
16
16
  Set `CONFIG_TARGET` to `local` or `global` based on user's choice.
17
17
 
18
+ If `CONFIG_TARGET=global` and `~/.claude/CLAUDE.md` already exists without OMC markers, ask a second explicit question before running setup:
19
+
20
+ **Question:** "Global setup will change your base Claude config. Which behavior do you want?"
21
+
22
+ **Options (default first):**
23
+ 1. **Overwrite base CLAUDE.md (Recommended)** - plain `claude` and `omc` both use OMC globally.
24
+ 2. **Keep base CLAUDE.md; use OMC only through `omc`** - preserve the user's base file, install OMC into `CLAUDE-omc.md`, and let `omc` force-load that companion config at launch.
25
+
26
+ Set `GLOBAL_INSTALL_STYLE=overwrite` or `preserve` based on the user's choice. If you did not ask this question, default `GLOBAL_INSTALL_STYLE=overwrite`.
27
+
18
28
  ## Download and Install CLAUDE.md
19
29
 
20
30
  **MANDATORY**: Always run this command. Do NOT skip. Do NOT use the Write tool. Let the setup script choose the safest canonical source (bundled `docs/CLAUDE.md` first, GitHub fallback only if needed).
21
31
 
22
32
  ```bash
23
- bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-claude-md.sh" <CONFIG_TARGET>
33
+ bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-claude-md.sh" <CONFIG_TARGET> [GLOBAL_INSTALL_STYLE]
24
34
  ```
25
35
 
26
- Replace `<CONFIG_TARGET>` with `local` or `global`.
36
+ Replace `<CONFIG_TARGET>` with `local` or `global`. For local installs, omit the optional style argument. For global installs, pass `overwrite` or `preserve` when you know the user's choice; otherwise let the script default to `overwrite`.
27
37
 
28
38
  The script must install the canonical `docs/CLAUDE.md` content and preserve the required
29
39
  `<!-- OMC:START -->` / `<!-- OMC:END -->` markers. Do **not** hand-write, summarize, or
@@ -40,7 +50,7 @@ https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.
40
50
 
41
51
  **Note**: The downloaded CLAUDE.md includes Context Persistence instructions with `<remember>` tags for surviving conversation compaction.
42
52
 
43
- **Note**: If an existing CLAUDE.md is found, it will be backed up before downloading the new version.
53
+ **Note**: Preserve mode installs OMC into a companion `CLAUDE-omc.md` with a small managed import block, and `omc` launch force-loads that companion config without changing plain `claude`.
44
54
 
45
55
  ## Report Success
46
56
 
@@ -61,7 +71,8 @@ Note: This configuration is project-specific and won't affect other projects or
61
71
  If `CONFIG_TARGET` is `global`:
62
72
  ```
63
73
  OMC Global Configuration Complete
64
- - CLAUDE.md: Updated with latest configuration from GitHub at ~/.claude/CLAUDE.md
74
+ - CLAUDE.md: Updated at ~/.claude/CLAUDE.md, or preserved with explicit preserve mode
75
+ - Companion: May install ~/.claude/CLAUDE-omc.md when preserve mode is chosen
65
76
  - Backup: Previous CLAUDE.md backed up (if existed)
66
77
  - Scope: GLOBAL - applies to all Claude Code sessions
67
78
  - Hooks: Provided by plugin (no manual installation needed)
@@ -50,7 +50,7 @@ console.log('Installed:',v||'(not found)');
50
50
  "
51
51
 
52
52
  # Check npm for latest version
53
- LATEST_VERSION=$(npm view claudecode-omc version 2>/dev/null)
53
+ LATEST_VERSION=$(npm view oh-my-claude-sisyphus version 2>/dev/null)
54
54
 
55
55
  if [ -n "$INSTALLED_VERSION" ] && [ -n "$LATEST_VERSION" ]; then
56
56
  if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then
@@ -80,7 +80,7 @@ Use the AskUserQuestion tool to prompt the user:
80
80
  Store the preference in `~/.claude/.omc-config.json`:
81
81
 
82
82
  ```bash
83
- CONFIG_FILE="$HOME/.claude/.omc-config.json"
83
+ CONFIG_FILE="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.omc-config.json"
84
84
  mkdir -p "$(dirname "$CONFIG_FILE")"
85
85
 
86
86
  if [ -f "$CONFIG_FILE" ]; then
@@ -119,17 +119,17 @@ If `OMC_CLI_INSTALLED` is `"false"`, use AskUserQuestion:
119
119
  **Question:** "Would you like to install the OMC CLI globally for standalone helper commands? (`omc`, `omc hud`, `omc teleport`)"
120
120
 
121
121
  **Options:**
122
- 1. **Yes (Recommended)** - Install `claudecode-omc` via `npm install -g`
123
- 2. **No - Skip** - Skip installation (can install manually later with `npm install -g claudecode-omc`)
122
+ 1. **Yes (Recommended)** - Install `oh-my-claude-sisyphus` via `npm install -g`
123
+ 2. **No - Skip** - Skip installation (can install manually later with `npm install -g oh-my-claude-sisyphus`)
124
124
 
125
125
  If user chooses **Yes**:
126
126
 
127
127
  ```bash
128
128
  if ! command -v npm &>/dev/null; then
129
129
  echo "WARNING: npm not found. Cannot install OMC CLI automatically."
130
- echo "Install Node.js/npm first, then run: npm install -g claudecode-omc"
130
+ echo "Install Node.js/npm first, then run: npm install -g oh-my-claude-sisyphus"
131
131
  else
132
- if npm install -g claudecode-omc 2>&1; then
132
+ if npm install -g oh-my-claude-sisyphus 2>&1; then
133
133
  echo "OMC CLI installed successfully."
134
134
  if command -v omc &>/dev/null; then
135
135
  OMC_CLI_VERSION=$(omc --version 2>/dev/null | head -1 || echo "installed")
@@ -139,8 +139,8 @@ else
139
139
  fi
140
140
  else
141
141
  echo "WARNING: Failed to install OMC CLI (permission issue or network error)."
142
- echo "You can install manually later: npm install -g claudecode-omc"
143
- echo "Or with sudo: sudo npm install -g claudecode-omc"
142
+ echo "You can install manually later: npm install -g oh-my-claude-sisyphus"
143
+ echo "Or with sudo: sudo npm install -g oh-my-claude-sisyphus"
144
144
  fi
145
145
  fi
146
146
  ```
@@ -189,7 +189,7 @@ If beads or beads-rust is detected, use AskUserQuestion:
189
189
  Store the preference:
190
190
 
191
191
  ```bash
192
- CONFIG_FILE="$HOME/.claude/.omc-config.json"
192
+ CONFIG_FILE="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.omc-config.json"
193
193
  mkdir -p "$(dirname "$CONFIG_FILE")"
194
194
 
195
195
  if [ -f "$CONFIG_FILE" ]; then