claudecode-omc 4.8.2 → 4.8.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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +3 -3
- package/README.de.md +60 -0
- package/README.es.md +60 -0
- package/README.fr.md +60 -0
- package/README.it.md +60 -0
- package/README.ja.md +60 -0
- package/README.ko.md +60 -0
- package/README.md +101 -16
- package/README.pt.md +60 -0
- package/README.ru.md +60 -0
- package/README.tr.md +60 -0
- package/README.vi.md +60 -0
- package/README.zh.md +60 -0
- package/agents/code-reviewer.md +107 -6
- package/agents/critic.md +212 -42
- package/agents/debugger.md +52 -4
- package/agents/document-specialist.md +39 -60
- package/agents/executor.md +29 -9
- package/agents/explore.md +3 -1
- package/agents/security-reviewer.md +57 -0
- package/agents/test-engineer.md +21 -0
- package/agents/verifier.md +2 -0
- package/agents/writer.md +2 -0
- package/bridge/cli.cjs +7402 -3580
- package/bridge/mcp-server.cjs +558 -43
- package/bridge/runtime-cli.cjs +3034 -1801
- package/bridge/team-bridge.cjs +25 -1
- package/bridge/team-mcp.cjs +257 -88
- package/bridge/team.js +5226 -413
- package/dist/__tests__/agent-boundary-guidance.test.d.ts +2 -0
- package/dist/__tests__/agent-boundary-guidance.test.d.ts.map +1 -0
- package/dist/__tests__/agent-boundary-guidance.test.js +48 -0
- package/dist/__tests__/agent-boundary-guidance.test.js.map +1 -0
- package/dist/__tests__/agent-registry.test.js +48 -11
- package/dist/__tests__/agent-registry.test.js.map +1 -1
- package/dist/__tests__/auto-slash-aliases.test.js +25 -0
- package/dist/__tests__/auto-slash-aliases.test.js.map +1 -1
- package/dist/__tests__/bedrock-model-routing.test.d.ts +21 -0
- package/dist/__tests__/bedrock-model-routing.test.d.ts.map +1 -0
- package/dist/__tests__/bedrock-model-routing.test.js +397 -0
- package/dist/__tests__/bedrock-model-routing.test.js.map +1 -0
- package/dist/__tests__/cleanup-validation.test.js +7 -3
- package/dist/__tests__/cleanup-validation.test.js.map +1 -1
- package/dist/__tests__/cli-win32-warning.test.js +15 -2
- package/dist/__tests__/cli-win32-warning.test.js.map +1 -1
- package/dist/__tests__/consolidation-contracts.test.js +28 -3
- package/dist/__tests__/consolidation-contracts.test.js.map +1 -1
- package/dist/__tests__/context-guard-stop.test.d.ts +2 -0
- package/dist/__tests__/context-guard-stop.test.d.ts.map +1 -0
- package/dist/__tests__/context-guard-stop.test.js +58 -0
- package/dist/__tests__/context-guard-stop.test.js.map +1 -0
- package/dist/__tests__/delegation-enforcer.test.js +76 -11
- package/dist/__tests__/delegation-enforcer.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +62 -1
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hooks.test.js +165 -4
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/hud/defaults.test.js +4 -0
- package/dist/__tests__/hud/defaults.test.js.map +1 -1
- package/dist/__tests__/hud/limits-error.test.js +2 -4
- package/dist/__tests__/hud/limits-error.test.js.map +1 -1
- package/dist/__tests__/hud/mission-board-state.test.d.ts +2 -0
- package/dist/__tests__/hud/mission-board-state.test.d.ts.map +1 -0
- package/dist/__tests__/hud/mission-board-state.test.js +170 -0
- package/dist/__tests__/hud/mission-board-state.test.js.map +1 -0
- package/dist/__tests__/hud/mission-board.test.d.ts +2 -0
- package/dist/__tests__/hud/mission-board.test.d.ts.map +1 -0
- package/dist/__tests__/hud/mission-board.test.js +143 -0
- package/dist/__tests__/hud/mission-board.test.js.map +1 -0
- package/dist/__tests__/hud/rate-limits-error.test.js +13 -0
- package/dist/__tests__/hud/rate-limits-error.test.js.map +1 -1
- package/dist/__tests__/hud/render-rate-limits-priority.test.d.ts +8 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.d.ts.map +1 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js +145 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js.map +1 -0
- package/dist/__tests__/hud/render.test.js +22 -0
- package/dist/__tests__/hud/render.test.js.map +1 -1
- package/dist/__tests__/hud/stale-indicator.test.d.ts +9 -0
- package/dist/__tests__/hud/stale-indicator.test.d.ts.map +1 -0
- package/dist/__tests__/hud/stale-indicator.test.js +81 -0
- package/dist/__tests__/hud/stale-indicator.test.js.map +1 -0
- package/dist/__tests__/hud/state.test.js +30 -0
- package/dist/__tests__/hud/state.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api-lock.test.d.ts +2 -0
- package/dist/__tests__/hud/usage-api-lock.test.d.ts.map +1 -0
- package/dist/__tests__/hud/usage-api-lock.test.js +245 -0
- package/dist/__tests__/hud/usage-api-lock.test.js.map +1 -0
- package/dist/__tests__/hud/usage-api-stale.test.d.ts +9 -0
- package/dist/__tests__/hud/usage-api-stale.test.d.ts.map +1 -0
- package/dist/__tests__/hud/usage-api-stale.test.js +297 -0
- package/dist/__tests__/hud/usage-api-stale.test.js.map +1 -0
- package/dist/__tests__/hud/usage-api.test.js +223 -0
- package/dist/__tests__/hud/usage-api.test.js.map +1 -1
- package/dist/__tests__/hud/watch-mode-init.test.d.ts +2 -0
- package/dist/__tests__/hud/watch-mode-init.test.d.ts.map +1 -0
- package/dist/__tests__/hud/watch-mode-init.test.js +133 -0
- package/dist/__tests__/hud/watch-mode-init.test.js.map +1 -0
- package/dist/__tests__/hud-agents.test.js +12 -10
- package/dist/__tests__/hud-agents.test.js.map +1 -1
- package/dist/__tests__/hud-build-guidance.test.js +6 -2
- package/dist/__tests__/hud-build-guidance.test.js.map +1 -1
- package/dist/__tests__/hud-marketplace-resolution.test.d.ts +2 -0
- package/dist/__tests__/hud-marketplace-resolution.test.d.ts.map +1 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js +53 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -0
- package/dist/__tests__/installer-hud-skip.test.js +12 -0
- package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
- package/dist/__tests__/installer-plugin-agents.test.d.ts +2 -0
- package/dist/__tests__/installer-plugin-agents.test.d.ts.map +1 -0
- package/dist/__tests__/installer-plugin-agents.test.js +111 -0
- package/dist/__tests__/installer-plugin-agents.test.js.map +1 -0
- package/dist/__tests__/installer-version-guard.test.d.ts +2 -0
- package/dist/__tests__/installer-version-guard.test.d.ts.map +1 -0
- package/dist/__tests__/installer-version-guard.test.js +75 -0
- package/dist/__tests__/installer-version-guard.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +58 -4
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/omc-tools-server.test.js +8 -5
- package/dist/__tests__/omc-tools-server.test.js.map +1 -1
- package/dist/__tests__/pre-tool-enforcer.test.js +38 -0
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
- package/dist/__tests__/prompt-injection.test.js +3 -3
- package/dist/__tests__/prompt-injection.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +53 -2
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +42 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +1 -1
- package/dist/__tests__/session-history-search.test.d.ts +2 -0
- package/dist/__tests__/session-history-search.test.d.ts.map +1 -0
- package/dist/__tests__/session-history-search.test.js +115 -0
- package/dist/__tests__/session-history-search.test.js.map +1 -0
- package/dist/__tests__/session-start-script-context.test.d.ts +2 -0
- package/dist/__tests__/session-start-script-context.test.d.ts.map +1 -0
- package/dist/__tests__/session-start-script-context.test.js +49 -0
- package/dist/__tests__/session-start-script-context.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +71 -24
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/standalone-server.test.js +8 -4
- package/dist/__tests__/standalone-server.test.js.map +1 -1
- package/dist/__tests__/tier0-docs-consistency.test.js +10 -2
- package/dist/__tests__/tier0-docs-consistency.test.js.map +1 -1
- package/dist/agents/definitions.d.ts +5 -15
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +48 -49
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/document-specialist.d.ts +1 -1
- package/dist/agents/document-specialist.d.ts.map +1 -1
- package/dist/agents/document-specialist.js +46 -21
- package/dist/agents/document-specialist.js.map +1 -1
- package/dist/agents/explore.d.ts.map +1 -1
- package/dist/agents/explore.js +3 -2
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/index.d.ts +2 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +3 -6
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/types.d.ts +2 -2
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/cli/__tests__/ask.test.js +255 -8
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/session-search-help.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search-help.test.js +13 -0
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -0
- package/dist/cli/__tests__/session-search.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search.test.js +72 -0
- package/dist/cli/__tests__/session-search.test.js.map +1 -0
- package/dist/cli/__tests__/team-help.test.js +1 -1
- package/dist/cli/__tests__/team-help.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +256 -4
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/commands/__tests__/team.test.js +52 -2
- package/dist/cli/commands/__tests__/team.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +15 -1
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/session-search.d.ts +18 -0
- package/dist/cli/commands/session-search.d.ts.map +1 -0
- package/dist/cli/commands/session-search.js +47 -0
- package/dist/cli/commands/session-search.js.map +1 -0
- package/dist/cli/commands/team.d.ts +11 -0
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +94 -24
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +12 -1
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/index.js +70 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/team.d.ts +1 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +100 -214
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/win32-warning.d.ts +2 -1
- package/dist/cli/win32-warning.d.ts.map +1 -1
- package/dist/cli/win32-warning.js +20 -6
- package/dist/cli/win32-warning.js.map +1 -1
- package/dist/config/__tests__/loader.test.d.ts +2 -0
- package/dist/config/__tests__/loader.test.d.ts.map +1 -0
- package/dist/config/__tests__/loader.test.js +145 -0
- package/dist/config/__tests__/loader.test.js.map +1 -0
- package/dist/config/__tests__/models.test.d.ts +2 -0
- package/dist/config/__tests__/models.test.d.ts.map +1 -0
- package/dist/config/__tests__/models.test.js +147 -0
- package/dist/config/__tests__/models.test.js.map +1 -0
- package/dist/config/__tests__/test-helpers.d.ts +3 -0
- package/dist/config/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/config/__tests__/test-helpers.js +19 -0
- package/dist/config/__tests__/test-helpers.js.map +1 -0
- package/dist/config/loader.d.ts +3 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +140 -126
- package/dist/config/loader.js.map +1 -1
- package/dist/config/models.d.ts +29 -10
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +96 -10
- package/dist/config/models.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +8 -1
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/builtin-skills/types.d.ts +3 -0
- package/dist/features/builtin-skills/types.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.d.ts +5 -12
- package/dist/features/delegation-enforcer.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.js +48 -54
- package/dist/features/delegation-enforcer.js.map +1 -1
- package/dist/features/delegation-routing/__tests__/resolver.test.js +4 -3
- package/dist/features/delegation-routing/__tests__/resolver.test.js.map +1 -1
- package/dist/features/delegation-routing/types.d.ts.map +1 -1
- package/dist/features/delegation-routing/types.js +7 -4
- package/dist/features/delegation-routing/types.js.map +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +2 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +8 -5
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/rate-limit-wait/index.d.ts +1 -1
- package/dist/features/rate-limit-wait/index.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/index.js +1 -1
- package/dist/features/rate-limit-wait/index.js.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts +9 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.js +38 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +2 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.js +8 -9
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/features/rate-limit-wait/types.d.ts +11 -0
- package/dist/features/rate-limit-wait/types.d.ts.map +1 -1
- package/dist/features/session-history-search/index.d.ts +6 -0
- package/dist/features/session-history-search/index.d.ts.map +1 -0
- package/dist/features/session-history-search/index.js +480 -0
- package/dist/features/session-history-search/index.js.map +1 -0
- package/dist/features/session-history-search/types.d.ts +36 -0
- package/dist/features/session-history-search/types.d.ts.map +1 -0
- package/dist/features/session-history-search/types.js +2 -0
- package/dist/features/session-history-search/types.js.map +1 -0
- package/dist/hooks/__tests__/background-process-guard.test.js +101 -5
- package/dist/hooks/__tests__/background-process-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-openclaw.test.js +16 -5
- package/dist/hooks/__tests__/bridge-openclaw.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +48 -1
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +9 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/auto-slash-command/types.d.ts +2 -0
- package/dist/hooks/auto-slash-command/types.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/types.js +0 -7
- package/dist/hooks/auto-slash-command/types.js.map +1 -1
- package/dist/hooks/autopilot/adapters/execution-adapter.js +3 -3
- package/dist/hooks/autopilot/prompts.js +1 -1
- package/dist/hooks/bridge-normalize.d.ts.map +1 -1
- package/dist/hooks/bridge-normalize.js +2 -0
- package/dist/hooks/bridge-normalize.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +248 -39
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js +41 -0
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +3 -1
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/permission-handler/index.d.ts +8 -0
- package/dist/hooks/permission-handler/index.d.ts.map +1 -1
- package/dist/hooks/permission-handler/index.js +76 -0
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js +90 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js +535 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js.map +1 -0
- package/dist/hooks/persistent-mode/index.d.ts +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +296 -21
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +156 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +27 -2
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/storage.test.js +37 -0
- package/dist/hooks/project-memory/__tests__/storage.test.js.map +1 -1
- package/dist/hooks/project-memory/storage.d.ts +1 -1
- package/dist/hooks/project-memory/storage.d.ts.map +1 -1
- package/dist/hooks/project-memory/storage.js +5 -4
- package/dist/hooks/project-memory/storage.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +18 -0
- package/dist/hooks/ralph/loop.d.ts.map +1 -1
- package/dist/hooks/ralph/loop.js +31 -0
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +4 -1
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +56 -21
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/recovery/__tests__/storage.test.d.ts +2 -0
- package/dist/hooks/recovery/__tests__/storage.test.d.ts.map +1 -0
- package/dist/hooks/recovery/__tests__/storage.test.js +65 -0
- package/dist/hooks/recovery/__tests__/storage.test.js.map +1 -0
- package/dist/hooks/recovery/storage.d.ts +5 -1
- package/dist/hooks/recovery/storage.d.ts.map +1 -1
- package/dist/hooks/recovery/storage.js +7 -29
- package/dist/hooks/recovery/storage.js.map +1 -1
- package/dist/hooks/recovery/types.d.ts +1 -1
- package/dist/hooks/recovery/types.d.ts.map +1 -1
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.d.ts +2 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.d.ts.map +1 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.js +140 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.js.map +1 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.d.ts +2 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.d.ts.map +1 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js +122 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js.map +1 -0
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js +38 -12
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js.map +1 -1
- package/dist/hooks/session-end/callbacks.d.ts +4 -1
- package/dist/hooks/session-end/callbacks.d.ts.map +1 -1
- package/dist/hooks/session-end/callbacks.js +5 -4
- package/dist/hooks/session-end/callbacks.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +162 -36
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/skill-state/__tests__/skill-state.test.js +35 -33
- package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -1
- package/dist/hooks/skill-state/index.d.ts +3 -3
- package/dist/hooks/skill-state/index.d.ts.map +1 -1
- package/dist/hooks/skill-state/index.js +7 -11
- package/dist/hooks/skill-state/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +22 -0
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hooks/think-mode/__tests__/index.test.js +20 -20
- package/dist/hooks/think-mode/__tests__/index.test.js.map +1 -1
- package/dist/hooks/think-mode/switcher.d.ts.map +1 -1
- package/dist/hooks/think-mode/switcher.js +13 -10
- package/dist/hooks/think-mode/switcher.js.map +1 -1
- package/dist/hooks/thinking-block-validator/__tests__/index.test.d.ts +2 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.d.ts.map +1 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.js +56 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.js.map +1 -0
- package/dist/hooks/thinking-block-validator/index.d.ts.map +1 -1
- package/dist/hooks/thinking-block-validator/index.js +7 -6
- package/dist/hooks/thinking-block-validator/index.js.map +1 -1
- package/dist/hooks/todo-continuation/index.d.ts +6 -0
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +14 -5
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hud/elements/agents.d.ts.map +1 -1
- package/dist/hud/elements/agents.js +8 -14
- package/dist/hud/elements/agents.js.map +1 -1
- package/dist/hud/elements/index.d.ts +1 -0
- package/dist/hud/elements/index.d.ts.map +1 -1
- package/dist/hud/elements/index.js +1 -0
- package/dist/hud/elements/index.js.map +1 -1
- package/dist/hud/elements/limits.d.ts +3 -3
- package/dist/hud/elements/limits.d.ts.map +1 -1
- package/dist/hud/elements/limits.js +26 -18
- package/dist/hud/elements/limits.js.map +1 -1
- package/dist/hud/elements/mission-board.d.ts +2 -0
- package/dist/hud/elements/mission-board.d.ts.map +1 -0
- package/dist/hud/elements/mission-board.js +2 -0
- package/dist/hud/elements/mission-board.js.map +1 -0
- package/dist/hud/index.d.ts +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +10 -2
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/mission-board.d.ts +75 -0
- package/dist/hud/mission-board.d.ts.map +1 -0
- package/dist/hud/mission-board.js +420 -0
- package/dist/hud/mission-board.js.map +1 -0
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +16 -8
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +13 -0
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +11 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +10 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/hud/usage-api.d.ts +1 -1
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +207 -106
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/installer/__tests__/claude-md-merge.test.js +53 -9
- package/dist/installer/__tests__/claude-md-merge.test.js.map +1 -1
- package/dist/installer/__tests__/hook-templates.test.d.ts +2 -0
- package/dist/installer/__tests__/hook-templates.test.d.ts.map +1 -0
- package/dist/installer/__tests__/hook-templates.test.js +76 -0
- package/dist/installer/__tests__/hook-templates.test.js.map +1 -0
- package/dist/installer/hooks.d.ts +15 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +51 -0
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +25 -0
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +273 -64
- package/dist/installer/index.js.map +1 -1
- package/dist/lib/mode-names.d.ts.map +1 -1
- package/dist/lib/mode-names.js +2 -0
- package/dist/lib/mode-names.js.map +1 -1
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js +30 -3
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js.map +1 -1
- package/dist/mcp/__tests__/team-server-deprecation.test.js +2 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.js.map +1 -1
- package/dist/mcp/team-job-convergence.d.ts.map +1 -1
- package/dist/mcp/team-job-convergence.js +12 -3
- package/dist/mcp/team-job-convergence.js.map +1 -1
- package/dist/mcp/team-server.d.ts.map +1 -1
- package/dist/mcp/team-server.js +18 -4
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/__tests__/config-merge.test.js +36 -1
- package/dist/notifications/__tests__/config-merge.test.js.map +1 -1
- package/dist/notifications/__tests__/formatter.test.js +13 -5
- package/dist/notifications/__tests__/formatter.test.js.map +1 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.js +27 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.js.map +1 -1
- package/dist/notifications/__tests__/verbosity.test.js +33 -1
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
- package/dist/notifications/config.d.ts +7 -0
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +18 -0
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/formatter.d.ts +2 -2
- package/dist/notifications/formatter.d.ts.map +1 -1
- package/dist/notifications/formatter.js +7 -6
- package/dist/notifications/formatter.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +5 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/template-engine.js +1 -1
- package/dist/notifications/template-engine.js.map +1 -1
- package/dist/notifications/types.d.ts +4 -0
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/dispatcher.test.js +26 -0
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/__tests__/index.test.js +42 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -1
- package/dist/openclaw/__tests__/signal.test.d.ts +2 -0
- package/dist/openclaw/__tests__/signal.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/signal.test.js +69 -0
- package/dist/openclaw/__tests__/signal.test.js.map +1 -0
- package/dist/openclaw/dispatcher.d.ts +5 -1
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +13 -2
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/openclaw/index.d.ts +2 -1
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +29 -15
- package/dist/openclaw/index.js.map +1 -1
- package/dist/openclaw/signal.d.ts +3 -0
- package/dist/openclaw/signal.d.ts.map +1 -0
- package/dist/openclaw/signal.js +215 -0
- package/dist/openclaw/signal.js.map +1 -0
- package/dist/openclaw/types.d.ts +35 -0
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/shared/types.d.ts +2 -12
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/skills/__tests__/mingw-escape.test.js +41 -11
- package/dist/skills/__tests__/mingw-escape.test.js.map +1 -1
- package/dist/team/__tests__/api-interop.cwd-resolution.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.js +78 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.js.map +1 -0
- package/dist/team/__tests__/api-interop.dispatch.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.dispatch.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.dispatch.test.js +125 -0
- package/dist/team/__tests__/api-interop.dispatch.test.js.map +1 -0
- package/dist/team/__tests__/cli-detection.test.d.ts +2 -0
- package/dist/team/__tests__/cli-detection.test.d.ts.map +1 -0
- package/dist/team/__tests__/cli-detection.test.js +36 -0
- package/dist/team/__tests__/cli-detection.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +79 -2
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/runtime-done-recovery.test.js +1 -0
- package/dist/team/__tests__/runtime-done-recovery.test.js.map +1 -1
- package/dist/team/__tests__/runtime-prompt-mode.test.js +84 -8
- package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.js +237 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.js +103 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.js.map +1 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.js +49 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.js.map +1 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js +3 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.create-team.test.js +29 -12
- package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js +6 -0
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +9 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +32 -3
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +153 -2
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/cli-detection.d.ts.map +1 -1
- package/dist/team/cli-detection.js +6 -2
- package/dist/team/cli-detection.js.map +1 -1
- package/dist/team/idle-nudge.js +1 -1
- package/dist/team/idle-nudge.js.map +1 -1
- package/dist/team/mcp-team-bridge.d.ts.map +1 -1
- package/dist/team/mcp-team-bridge.js +2 -1
- package/dist/team/mcp-team-bridge.js.map +1 -1
- package/dist/team/model-contract.d.ts +1 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +35 -4
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +10 -7
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime-v2.d.ts +4 -0
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +231 -59
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/runtime.d.ts +6 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +39 -14
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/tmux-session.d.ts +20 -11
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +108 -51
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +1 -0
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/types.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +2 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +46 -12
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/tools/__tests__/memory-tools.test.js +29 -1
- package/dist/tools/__tests__/memory-tools.test.js.map +1 -1
- package/dist/tools/lsp/client.d.ts +11 -0
- package/dist/tools/lsp/client.d.ts.map +1 -1
- package/dist/tools/lsp/client.js +46 -0
- package/dist/tools/lsp/client.js.map +1 -1
- package/dist/tools/session-history-tools.d.ts +23 -0
- package/dist/tools/session-history-tools.d.ts.map +1 -0
- package/dist/tools/session-history-tools.js +41 -0
- package/dist/tools/session-history-tools.js.map +1 -0
- package/dist/tools/trace-tools.d.ts +9 -0
- package/dist/tools/trace-tools.d.ts.map +1 -1
- package/dist/tools/trace-tools.js +2 -1
- package/dist/tools/trace-tools.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +5 -0
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +22 -0
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/skill-pipeline.d.ts +9 -0
- package/dist/utils/skill-pipeline.d.ts.map +1 -0
- package/dist/utils/skill-pipeline.js +97 -0
- package/dist/utils/skill-pipeline.js.map +1 -0
- package/docs/AGENTS.md +1 -1
- package/docs/ANALYTICS-SYSTEM.md +23 -132
- package/docs/CLAUDE.md +40 -139
- package/docs/MIGRATION.md +4 -4
- package/docs/OPENCLAW-ROUTING.md +102 -0
- package/docs/PERFORMANCE-MONITORING.md +30 -55
- package/docs/REFERENCE.md +62 -35
- package/docs/TIERED_AGENTS_V2.md +3 -2
- package/docs/design/SKILL_AUDIT_1445.md +75 -0
- package/docs/ko/MIGRATION.md +2 -2
- package/docs/ko/REFERENCE.md +14 -22
- package/docs/partials/agent-tiers.md +11 -15
- package/docs/partials/features.md +2 -2
- package/docs/partials/mode-selection-guide.md +2 -2
- package/docs/shared/agent-tiers.md +11 -15
- package/docs/shared/features.md +2 -2
- package/docs/shared/mode-selection-guide.md +2 -2
- package/package.json +4 -1
- package/scripts/code-simplifier.mjs +1 -1
- package/scripts/context-guard-stop.mjs +26 -10
- package/scripts/keyword-detector.mjs +99 -39
- package/scripts/persistent-mode.cjs +295 -34
- package/scripts/persistent-mode.mjs +79 -21
- package/scripts/plugin-setup.mjs +10 -1
- package/scripts/post-tool-verifier.mjs +57 -3
- package/scripts/pre-tool-enforcer.mjs +207 -2
- package/scripts/run-provider-advisor.js +30 -3
- package/scripts/session-start.mjs +3 -3
- package/scripts/setup-claude-md.sh +159 -0
- package/scripts/setup-progress.sh +123 -0
- package/scripts/sync-metadata.ts +11 -1
- package/skills/AGENTS.md +13 -17
- package/skills/ai-slop-cleaner/SKILL.md +130 -0
- package/skills/ask/SKILL.md +51 -0
- package/skills/ccg/SKILL.md +6 -6
- package/skills/deep-interview/SKILL.md +4 -0
- package/skills/omc-doctor/SKILL.md +2 -2
- package/skills/omc-setup/SKILL.md +75 -1206
- package/skills/omc-setup/phases/01-install-claude-md.md +76 -0
- package/skills/omc-setup/phases/02-configure.md +211 -0
- package/skills/omc-setup/phases/03-integrations.md +192 -0
- package/skills/omc-setup/phases/04-welcome.md +192 -0
- package/skills/omc-teams/SKILL.md +35 -2
- package/skills/plan/SKILL.md +3 -0
- package/skills/ralph/SKILL.md +16 -10
- package/skills/release/SKILL.md +4 -0
- package/skills/setup/SKILL.md +40 -0
- package/skills/team/SKILL.md +6 -6
- package/templates/hooks/code-simplifier.mjs +1 -1
- package/templates/hooks/keyword-detector.mjs +100 -32
- package/templates/hooks/persistent-mode.mjs +43 -4
- package/templates/hooks/pre-tool-use.mjs +115 -1
- package/templates/hooks/session-start.mjs +1 -1
- package/agents/build-fixer.md +0 -90
- package/agents/deep-executor.md +0 -112
- package/agents/harsh-critic.md +0 -254
- package/agents/quality-reviewer.md +0 -151
- package/skills/analyze/SKILL.md +0 -87
- package/skills/ask-codex/SKILL.md +0 -47
- package/skills/ask-gemini/SKILL.md +0 -47
- package/skills/build-fix/SKILL.md +0 -123
- package/skills/code-review/SKILL.md +0 -573
- package/skills/configure-openclaw/SKILL.md +0 -383
- package/skills/learn-about-omc/SKILL.md +0 -37
- package/skills/note/SKILL.md +0 -62
- package/skills/omc-help/SKILL.md +0 -192
- package/skills/ralph-init/SKILL.md +0 -40
- package/skills/security-review/SKILL.md +0 -282
- package/skills/tdd/SKILL.md +0 -104
- package/skills/trace/SKILL.md +0 -33
|
@@ -7,40 +7,68 @@ description: Setup and configure oh-my-claudecode (the ONLY command you need to
|
|
|
7
7
|
|
|
8
8
|
This is the **only command you need to learn**. After running this, everything else is automatic.
|
|
9
9
|
|
|
10
|
+
**When this skill is invoked, immediately execute the workflow below. Do not only restate or summarize these instructions back to the user.**
|
|
11
|
+
|
|
10
12
|
Note: All `~/.claude/...` paths in this guide respect `CLAUDE_CONFIG_DIR` when that environment variable is set.
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## Flag Parsing
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
Check for flags in the user's invocation:
|
|
17
|
+
- `--help` → Show Help Text (below) and stop
|
|
18
|
+
- `--local` → Phase 1 only (target=local), then stop
|
|
19
|
+
- `--global` → Phase 1 only (target=global), then stop
|
|
20
|
+
- `--force` → Skip Pre-Setup Check, run full setup (Phase 1 → 2 → 3 → 4)
|
|
21
|
+
- No flags → Run Pre-Setup Check, then full setup if needed
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
## Help Text
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
24
|
-
OMC_BRANCH="${OMC_BRANCH:-}"
|
|
25
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
25
|
+
When user runs with `--help`, display this and stop:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fi
|
|
30
|
-
if [ -z "$OMC_BRANCH" ] && [ -f "$CONFIG_FILE" ]; then
|
|
31
|
-
OMC_BRANCH=$(jq -r '.updateBranch // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
32
|
-
fi
|
|
33
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
34
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
35
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
36
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
37
|
-
fi
|
|
38
|
-
fi
|
|
27
|
+
```
|
|
28
|
+
OMC Setup - Configure oh-my-claudecode
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
USAGE:
|
|
31
|
+
/oh-my-claudecode:omc-setup Run initial setup wizard (or update if already configured)
|
|
32
|
+
/oh-my-claudecode:omc-setup --local Configure local project (.claude/CLAUDE.md)
|
|
33
|
+
/oh-my-claudecode:omc-setup --global Configure global settings (~/.claude/CLAUDE.md)
|
|
34
|
+
/oh-my-claudecode:omc-setup --force Force full setup wizard even if already configured
|
|
35
|
+
/oh-my-claudecode:omc-setup --help Show this help
|
|
36
|
+
|
|
37
|
+
MODES:
|
|
38
|
+
Initial Setup (no flags)
|
|
39
|
+
- Interactive wizard for first-time setup
|
|
40
|
+
- Configures CLAUDE.md (local or global)
|
|
41
|
+
- Sets up HUD statusline
|
|
42
|
+
- Checks for updates
|
|
43
|
+
- Offers MCP server configuration
|
|
44
|
+
- Configures team mode defaults (agent count, type, model)
|
|
45
|
+
- If already configured, offers quick update option
|
|
46
|
+
|
|
47
|
+
Local Configuration (--local)
|
|
48
|
+
- Downloads fresh CLAUDE.md to ./.claude/
|
|
49
|
+
- Backs up existing CLAUDE.md to .claude/CLAUDE.md.backup.YYYY-MM-DD
|
|
50
|
+
- Project-specific settings
|
|
51
|
+
- Use this to update project config after OMC upgrades
|
|
52
|
+
|
|
53
|
+
Global Configuration (--global)
|
|
54
|
+
- Downloads fresh CLAUDE.md to ~/.claude/
|
|
55
|
+
- Backs up existing CLAUDE.md to ~/.claude/CLAUDE.md.backup.YYYY-MM-DD
|
|
56
|
+
- Applies to all Claude Code sessions
|
|
57
|
+
- Cleans up legacy hooks
|
|
58
|
+
- Use this to update global config after OMC upgrades
|
|
59
|
+
|
|
60
|
+
Force Full Setup (--force)
|
|
61
|
+
- Bypasses the "already configured" check
|
|
62
|
+
- Runs the complete setup wizard from scratch
|
|
63
|
+
- Use when you want to reconfigure preferences
|
|
64
|
+
|
|
65
|
+
EXAMPLES:
|
|
66
|
+
/oh-my-claudecode:omc-setup # First time setup (or update CLAUDE.md if configured)
|
|
67
|
+
/oh-my-claudecode:omc-setup --local # Update this project
|
|
68
|
+
/oh-my-claudecode:omc-setup --global # Update all projects
|
|
69
|
+
/oh-my-claudecode:omc-setup --force # Re-run full setup wizard
|
|
70
|
+
|
|
71
|
+
For more info: https://github.com/${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}
|
|
44
72
|
```
|
|
45
73
|
|
|
46
74
|
## Pre-Setup Check: Already Configured?
|
|
@@ -78,13 +106,13 @@ Use AskUserQuestion to prompt:
|
|
|
78
106
|
|
|
79
107
|
**If user chooses "Update CLAUDE.md only":**
|
|
80
108
|
- Detect if local (.claude/CLAUDE.md) or global (~/.claude/CLAUDE.md) config exists
|
|
81
|
-
- If local exists, run
|
|
82
|
-
- If only global exists, run
|
|
109
|
+
- If local exists, run: `bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-claude-md.sh" local`
|
|
110
|
+
- If only global exists, run: `bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-claude-md.sh" global`
|
|
83
111
|
- Skip all other steps
|
|
84
112
|
- Report success and exit
|
|
85
113
|
|
|
86
114
|
**If user chooses "Run full setup again":**
|
|
87
|
-
- Continue with
|
|
115
|
+
- Continue with Resume Detection below
|
|
88
116
|
|
|
89
117
|
**If user chooses "Cancel":**
|
|
90
118
|
- Exit without any changes
|
|
@@ -93,63 +121,15 @@ Use AskUserQuestion to prompt:
|
|
|
93
121
|
|
|
94
122
|
If user passes `--force` flag, skip this check and proceed directly to setup.
|
|
95
123
|
|
|
96
|
-
##
|
|
124
|
+
## Resume Detection
|
|
97
125
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### State File Location
|
|
101
|
-
- `.omc/state/setup-state.json` - Tracks completed steps
|
|
102
|
-
|
|
103
|
-
### Resume Detection (Step 0)
|
|
104
|
-
|
|
105
|
-
Before starting any step, check for existing state:
|
|
126
|
+
Before starting any phase, check for existing state:
|
|
106
127
|
|
|
107
128
|
```bash
|
|
108
|
-
|
|
109
|
-
STATE_FILE=".omc/state/setup-state.json"
|
|
110
|
-
|
|
111
|
-
# Cross-platform ISO date to epoch conversion
|
|
112
|
-
iso_to_epoch() {
|
|
113
|
-
local iso_date="$1"
|
|
114
|
-
local epoch=""
|
|
115
|
-
# Try GNU date first (Linux)
|
|
116
|
-
epoch=$(date -d "$iso_date" +%s 2>/dev/null)
|
|
117
|
-
if [ $? -eq 0 ] && [ -n "$epoch" ]; then
|
|
118
|
-
echo "$epoch"
|
|
119
|
-
return 0
|
|
120
|
-
fi
|
|
121
|
-
# Try BSD/macOS date
|
|
122
|
-
local clean_date=$(echo "$iso_date" | sed 's/[+-][0-9][0-9]:[0-9][0-9]$//' | sed 's/Z$//' | sed 's/T/ /')
|
|
123
|
-
epoch=$(date -j -f "%Y-%m-%d %H:%M:%S" "$clean_date" +%s 2>/dev/null)
|
|
124
|
-
if [ $? -eq 0 ] && [ -n "$epoch" ]; then
|
|
125
|
-
echo "$epoch"
|
|
126
|
-
return 0
|
|
127
|
-
fi
|
|
128
|
-
echo "0"
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if [ -f "$STATE_FILE" ]; then
|
|
132
|
-
# Check if state is stale (older than 24 hours)
|
|
133
|
-
TIMESTAMP_RAW=$(jq -r '.timestamp // empty' "$STATE_FILE" 2>/dev/null)
|
|
134
|
-
if [ -n "$TIMESTAMP_RAW" ]; then
|
|
135
|
-
TIMESTAMP_EPOCH=$(iso_to_epoch "$TIMESTAMP_RAW")
|
|
136
|
-
NOW_EPOCH=$(date +%s)
|
|
137
|
-
STATE_AGE=$((NOW_EPOCH - TIMESTAMP_EPOCH))
|
|
138
|
-
else
|
|
139
|
-
STATE_AGE=999999 # Force fresh start if no timestamp
|
|
140
|
-
fi
|
|
141
|
-
if [ "$STATE_AGE" -gt 86400 ]; then
|
|
142
|
-
echo "Previous setup state is more than 24 hours old. Starting fresh."
|
|
143
|
-
rm -f "$STATE_FILE"
|
|
144
|
-
else
|
|
145
|
-
LAST_STEP=$(jq -r ".lastCompletedStep // 0" "$STATE_FILE" 2>/dev/null || echo "0")
|
|
146
|
-
TIMESTAMP=$(jq -r .timestamp "$STATE_FILE" 2>/dev/null || echo "unknown")
|
|
147
|
-
echo "Found previous setup session (Step $LAST_STEP completed at $TIMESTAMP)"
|
|
148
|
-
fi
|
|
149
|
-
fi
|
|
129
|
+
bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-progress.sh" resume
|
|
150
130
|
```
|
|
151
131
|
|
|
152
|
-
If state exists, use AskUserQuestion to prompt:
|
|
132
|
+
If state exists (output is not "fresh"), use AskUserQuestion to prompt:
|
|
153
133
|
|
|
154
134
|
**Question:** "Found a previous setup session. Would you like to resume or start fresh?"
|
|
155
135
|
|
|
@@ -159,1068 +139,29 @@ If state exists, use AskUserQuestion to prompt:
|
|
|
159
139
|
|
|
160
140
|
If user chooses "Start fresh":
|
|
161
141
|
```bash
|
|
162
|
-
|
|
163
|
-
echo "Previous state cleared. Starting fresh setup."
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Save Progress Helper
|
|
167
|
-
|
|
168
|
-
After completing each major step, save progress:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Save setup progress (call after each step)
|
|
172
|
-
# Usage: save_setup_progress STEP_NUMBER
|
|
173
|
-
save_setup_progress() {
|
|
174
|
-
mkdir -p .omc/state
|
|
175
|
-
cat > ".omc/state/setup-state.json" << EOF
|
|
176
|
-
{
|
|
177
|
-
"lastCompletedStep": $1,
|
|
178
|
-
"timestamp": "$(date -Iseconds)",
|
|
179
|
-
"configType": "${CONFIG_TYPE:-unknown}"
|
|
180
|
-
}
|
|
181
|
-
EOF
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Clear State on Completion
|
|
186
|
-
|
|
187
|
-
After successful setup completion (Step 7/8), remove the state file:
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
rm -f ".omc/state/setup-state.json"
|
|
191
|
-
echo "Setup completed successfully. State cleared."
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Usage Modes
|
|
195
|
-
|
|
196
|
-
This skill handles three scenarios:
|
|
197
|
-
|
|
198
|
-
1. **Initial Setup (no flags)**: First-time installation wizard
|
|
199
|
-
2. **Local Configuration (`--local`)**: Configure project-specific settings (.claude/CLAUDE.md)
|
|
200
|
-
3. **Global Configuration (`--global`)**: Configure global settings (~/.claude/CLAUDE.md)
|
|
201
|
-
|
|
202
|
-
## Mode Detection
|
|
203
|
-
|
|
204
|
-
Check for flags in the user's invocation:
|
|
205
|
-
- If `--local` flag present → Skip Pre-Setup Check, go to Local Configuration (Step 2A)
|
|
206
|
-
- If `--global` flag present → Skip Pre-Setup Check, go to Global Configuration (Step 2B)
|
|
207
|
-
- If `--force` flag present → Skip Pre-Setup Check, run Initial Setup wizard (Step 1)
|
|
208
|
-
- If no flags → Run Pre-Setup Check first, then Initial Setup wizard (Step 1) if needed
|
|
209
|
-
|
|
210
|
-
## Step 1: Initial Setup Wizard (Default Behavior)
|
|
211
|
-
|
|
212
|
-
**Note**: If resuming and lastCompletedStep >= 1, skip to the appropriate step based on configType.
|
|
213
|
-
|
|
214
|
-
Use the AskUserQuestion tool to prompt the user:
|
|
215
|
-
|
|
216
|
-
**Question:** "Where should I configure oh-my-claudecode?"
|
|
217
|
-
|
|
218
|
-
**Options:**
|
|
219
|
-
1. **Local (this project)** - Creates `.claude/CLAUDE.md` in current project directory. Best for project-specific configurations.
|
|
220
|
-
2. **Global (all projects)** - Creates `~/.claude/CLAUDE.md` for all Claude Code sessions. Best for consistent behavior everywhere.
|
|
221
|
-
|
|
222
|
-
## Step 2A: Local Configuration (--local flag or user chose LOCAL)
|
|
223
|
-
|
|
224
|
-
**CRITICAL**: This ALWAYS downloads fresh CLAUDE.md from GitHub to the local project. DO NOT use the Write tool - use bash curl exclusively.
|
|
225
|
-
|
|
226
|
-
### Create Local .claude Directory
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
# Create .claude directory in current project
|
|
230
|
-
mkdir -p .claude && echo ".claude directory ready"
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Download Fresh CLAUDE.md
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
# Define target path
|
|
237
|
-
TARGET_PATH=".claude/CLAUDE.md"
|
|
238
|
-
|
|
239
|
-
# Extract old version before download
|
|
240
|
-
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "none")
|
|
241
|
-
|
|
242
|
-
# Backup existing
|
|
243
|
-
if [ -f "$TARGET_PATH" ]; then
|
|
244
|
-
BACKUP_DATE=$(date +%Y-%m-%d_%H%M%S)
|
|
245
|
-
BACKUP_PATH="${TARGET_PATH}.backup.${BACKUP_DATE}"
|
|
246
|
-
cp "$TARGET_PATH" "$BACKUP_PATH"
|
|
247
|
-
echo "Backed up existing CLAUDE.md to $BACKUP_PATH"
|
|
248
|
-
fi
|
|
249
|
-
|
|
250
|
-
# Download fresh OMC content to temp file
|
|
251
|
-
TEMP_OMC=$(mktemp /tmp/omc-claude-XXXXXX.md)
|
|
252
|
-
trap 'rm -f "$TEMP_OMC"' EXIT
|
|
253
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
254
|
-
OMC_BRANCH="${OMC_BRANCH:-}"
|
|
255
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
256
|
-
if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
|
|
257
|
-
OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
258
|
-
fi
|
|
259
|
-
if [ -z "$OMC_BRANCH" ] && [ -f "$CONFIG_FILE" ]; then
|
|
260
|
-
OMC_BRANCH=$(jq -r '.updateBranch // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
261
|
-
fi
|
|
262
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
263
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
264
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
265
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
266
|
-
fi
|
|
267
|
-
fi
|
|
268
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
269
|
-
OMC_BRANCH="${OMC_BRANCH:-main}"
|
|
270
|
-
curl -fsSL "https://raw.githubusercontent.com/${OMC_REPO}/${OMC_BRANCH}/docs/CLAUDE.md" -o "$TEMP_OMC"
|
|
271
|
-
|
|
272
|
-
if [ ! -s "$TEMP_OMC" ]; then
|
|
273
|
-
echo "ERROR: Failed to download CLAUDE.md. Aborting."
|
|
274
|
-
rm -f "$TEMP_OMC"
|
|
275
|
-
return 1
|
|
276
|
-
fi
|
|
277
|
-
|
|
278
|
-
# Strip existing markers from downloaded content (idempotency)
|
|
279
|
-
if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
|
|
280
|
-
# Extract content between markers (awk is portable across GNU/BSD)
|
|
281
|
-
awk '/<!-- OMC:END -->/{p=0} p; /<!-- OMC:START -->/{p=1}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
|
|
282
|
-
mv "${TEMP_OMC}.clean" "$TEMP_OMC"
|
|
283
|
-
fi
|
|
284
|
-
|
|
285
|
-
if [ ! -f "$TARGET_PATH" ]; then
|
|
286
|
-
# Fresh install: wrap in markers
|
|
287
|
-
{
|
|
288
|
-
echo '<!-- OMC:START -->'
|
|
289
|
-
cat "$TEMP_OMC"
|
|
290
|
-
echo '<!-- OMC:END -->'
|
|
291
|
-
} > "$TARGET_PATH"
|
|
292
|
-
rm -f "$TEMP_OMC"
|
|
293
|
-
echo "Installed CLAUDE.md (fresh)"
|
|
294
|
-
else
|
|
295
|
-
# Merge: preserve user content outside OMC markers
|
|
296
|
-
if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
|
|
297
|
-
# Has markers: replace OMC section, keep user content
|
|
298
|
-
# Use awk instead of sed for cross-platform compatibility (GNU/BSD)
|
|
299
|
-
BEFORE_OMC=$(awk '/<!-- OMC:START -->/{exit} {print}' "$TARGET_PATH")
|
|
300
|
-
AFTER_OMC=$(awk 'p; /<!-- OMC:END -->/{p=1}' "$TARGET_PATH")
|
|
301
|
-
{
|
|
302
|
-
[ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
|
|
303
|
-
echo '<!-- OMC:START -->'
|
|
304
|
-
cat "$TEMP_OMC"
|
|
305
|
-
echo '<!-- OMC:END -->'
|
|
306
|
-
[ -n "$AFTER_OMC" ] && printf '%s\n' "$AFTER_OMC"
|
|
307
|
-
} > "${TARGET_PATH}.tmp"
|
|
308
|
-
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
309
|
-
echo "Updated OMC section (user customizations preserved)"
|
|
310
|
-
else
|
|
311
|
-
# No markers: wrap new content in markers, append old content as user section
|
|
312
|
-
OLD_CONTENT=$(cat "$TARGET_PATH")
|
|
313
|
-
{
|
|
314
|
-
echo '<!-- OMC:START -->'
|
|
315
|
-
cat "$TEMP_OMC"
|
|
316
|
-
echo '<!-- OMC:END -->'
|
|
317
|
-
echo ""
|
|
318
|
-
echo "<!-- User customizations (migrated from previous CLAUDE.md) -->"
|
|
319
|
-
printf '%s\n' "$OLD_CONTENT"
|
|
320
|
-
} > "${TARGET_PATH}.tmp"
|
|
321
|
-
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
322
|
-
echo "Migrated existing CLAUDE.md (added OMC markers, preserved old content)"
|
|
323
|
-
fi
|
|
324
|
-
rm -f "$TEMP_OMC"
|
|
325
|
-
fi
|
|
326
|
-
|
|
327
|
-
# Extract new version and report
|
|
328
|
-
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
329
|
-
if [ "$OLD_VERSION" = "none" ]; then
|
|
330
|
-
echo "Installed CLAUDE.md: $NEW_VERSION"
|
|
331
|
-
elif [ "$OLD_VERSION" = "$NEW_VERSION" ]; then
|
|
332
|
-
echo "CLAUDE.md unchanged: $NEW_VERSION"
|
|
333
|
-
else
|
|
334
|
-
echo "Updated CLAUDE.md: $OLD_VERSION -> $NEW_VERSION"
|
|
335
|
-
fi
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
**Note**: The downloaded CLAUDE.md includes Context Persistence instructions with `<remember>` tags for surviving conversation compaction.
|
|
339
|
-
|
|
340
|
-
**Note**: If an existing CLAUDE.md is found, it will be backed up to `.claude/CLAUDE.md.backup.YYYY-MM-DD` before downloading the new version.
|
|
341
|
-
|
|
342
|
-
**MANDATORY**: Always run this command. Do NOT skip. Do NOT use Write tool.
|
|
343
|
-
|
|
344
|
-
**FALLBACK** if curl fails:
|
|
345
|
-
Tell user to manually download from:
|
|
346
|
-
https://raw.githubusercontent.com/${OMC_REPO}/${OMC_BRANCH}/docs/CLAUDE.md
|
|
347
|
-
|
|
348
|
-
### Verify Plugin Installation
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
grep -q "oh-my-claudecode" ~/.claude/settings.json && echo "Plugin verified" || echo "Plugin NOT found - run: claude /install-plugin oh-my-claudecode"
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
### Confirm Local Configuration Success
|
|
355
|
-
|
|
356
|
-
After completing local configuration, save progress and report:
|
|
357
|
-
|
|
358
|
-
```bash
|
|
359
|
-
# Save progress - Step 2 complete (Local config)
|
|
360
|
-
mkdir -p .omc/state
|
|
361
|
-
cat > ".omc/state/setup-state.json" << EOF
|
|
362
|
-
{
|
|
363
|
-
"lastCompletedStep": 2,
|
|
364
|
-
"timestamp": "$(date -Iseconds)",
|
|
365
|
-
"configType": "local"
|
|
366
|
-
}
|
|
367
|
-
EOF
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
**OMC Project Configuration Complete**
|
|
371
|
-
- CLAUDE.md: Updated with latest configuration from GitHub at ./.claude/CLAUDE.md
|
|
372
|
-
- Backup: Previous CLAUDE.md backed up to `.claude/CLAUDE.md.backup.YYYY-MM-DD` (if existed)
|
|
373
|
-
- Scope: **PROJECT** - applies only to this project
|
|
374
|
-
- Hooks: Provided by plugin (no manual installation needed)
|
|
375
|
-
- Agents: 28+ available (base + tiered variants)
|
|
376
|
-
- Model routing: Haiku/Sonnet/Opus based on task complexity
|
|
377
|
-
|
|
378
|
-
**Note**: This configuration is project-specific and won't affect other projects or global settings.
|
|
379
|
-
|
|
380
|
-
If `--local` flag was used, clear state and **STOP HERE**:
|
|
381
|
-
```bash
|
|
382
|
-
rm -f ".omc/state/setup-state.json"
|
|
383
|
-
```
|
|
384
|
-
Do not continue to HUD setup or other steps.
|
|
385
|
-
|
|
386
|
-
## Step 2B: Global Configuration (--global flag or user chose GLOBAL)
|
|
387
|
-
|
|
388
|
-
**CRITICAL**: This ALWAYS downloads fresh CLAUDE.md from GitHub to global config. DO NOT use the Write tool - use bash curl exclusively.
|
|
389
|
-
|
|
390
|
-
### Download Fresh CLAUDE.md
|
|
391
|
-
|
|
392
|
-
```bash
|
|
393
|
-
# Define target path
|
|
394
|
-
TARGET_PATH="$HOME/.claude/CLAUDE.md"
|
|
395
|
-
|
|
396
|
-
# Extract old version before download
|
|
397
|
-
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "none")
|
|
398
|
-
|
|
399
|
-
# Backup existing
|
|
400
|
-
if [ -f "$TARGET_PATH" ]; then
|
|
401
|
-
BACKUP_DATE=$(date +%Y-%m-%d_%H%M%S)
|
|
402
|
-
BACKUP_PATH="${TARGET_PATH}.backup.${BACKUP_DATE}"
|
|
403
|
-
cp "$TARGET_PATH" "$BACKUP_PATH"
|
|
404
|
-
echo "Backed up existing CLAUDE.md to $BACKUP_PATH"
|
|
405
|
-
fi
|
|
406
|
-
|
|
407
|
-
# Download fresh OMC content to temp file
|
|
408
|
-
TEMP_OMC=$(mktemp /tmp/omc-claude-XXXXXX.md)
|
|
409
|
-
trap 'rm -f "$TEMP_OMC"' EXIT
|
|
410
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
411
|
-
OMC_BRANCH="${OMC_BRANCH:-}"
|
|
412
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
413
|
-
if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
|
|
414
|
-
OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
415
|
-
fi
|
|
416
|
-
if [ -z "$OMC_BRANCH" ] && [ -f "$CONFIG_FILE" ]; then
|
|
417
|
-
OMC_BRANCH=$(jq -r '.updateBranch // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
418
|
-
fi
|
|
419
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
420
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
421
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
422
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
423
|
-
fi
|
|
424
|
-
fi
|
|
425
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
426
|
-
OMC_BRANCH="${OMC_BRANCH:-main}"
|
|
427
|
-
curl -fsSL "https://raw.githubusercontent.com/${OMC_REPO}/${OMC_BRANCH}/docs/CLAUDE.md" -o "$TEMP_OMC"
|
|
428
|
-
|
|
429
|
-
if [ ! -s "$TEMP_OMC" ]; then
|
|
430
|
-
echo "ERROR: Failed to download CLAUDE.md. Aborting."
|
|
431
|
-
rm -f "$TEMP_OMC"
|
|
432
|
-
return 1
|
|
433
|
-
fi
|
|
434
|
-
|
|
435
|
-
# Strip existing markers from downloaded content (idempotency)
|
|
436
|
-
if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
|
|
437
|
-
# Extract content between markers (awk is portable across GNU/BSD)
|
|
438
|
-
awk '/<!-- OMC:END -->/{p=0} p; /<!-- OMC:START -->/{p=1}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
|
|
439
|
-
mv "${TEMP_OMC}.clean" "$TEMP_OMC"
|
|
440
|
-
fi
|
|
441
|
-
|
|
442
|
-
if [ ! -f "$TARGET_PATH" ]; then
|
|
443
|
-
# Fresh install: wrap in markers
|
|
444
|
-
{
|
|
445
|
-
echo '<!-- OMC:START -->'
|
|
446
|
-
cat "$TEMP_OMC"
|
|
447
|
-
echo '<!-- OMC:END -->'
|
|
448
|
-
} > "$TARGET_PATH"
|
|
449
|
-
rm -f "$TEMP_OMC"
|
|
450
|
-
echo "Installed CLAUDE.md (fresh)"
|
|
451
|
-
else
|
|
452
|
-
# Merge: preserve user content outside OMC markers
|
|
453
|
-
if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
|
|
454
|
-
# Has markers: replace OMC section, keep user content
|
|
455
|
-
# Use awk instead of sed for cross-platform compatibility (GNU/BSD)
|
|
456
|
-
BEFORE_OMC=$(awk '/<!-- OMC:START -->/{exit} {print}' "$TARGET_PATH")
|
|
457
|
-
AFTER_OMC=$(awk 'p; /<!-- OMC:END -->/{p=1}' "$TARGET_PATH")
|
|
458
|
-
{
|
|
459
|
-
[ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
|
|
460
|
-
echo '<!-- OMC:START -->'
|
|
461
|
-
cat "$TEMP_OMC"
|
|
462
|
-
echo '<!-- OMC:END -->'
|
|
463
|
-
[ -n "$AFTER_OMC" ] && printf '%s\n' "$AFTER_OMC"
|
|
464
|
-
} > "${TARGET_PATH}.tmp"
|
|
465
|
-
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
466
|
-
echo "Updated OMC section (user customizations preserved)"
|
|
467
|
-
else
|
|
468
|
-
# No markers: wrap new content in markers, append old content as user section
|
|
469
|
-
OLD_CONTENT=$(cat "$TARGET_PATH")
|
|
470
|
-
{
|
|
471
|
-
echo '<!-- OMC:START -->'
|
|
472
|
-
cat "$TEMP_OMC"
|
|
473
|
-
echo '<!-- OMC:END -->'
|
|
474
|
-
echo ""
|
|
475
|
-
echo "<!-- User customizations (migrated from previous CLAUDE.md) -->"
|
|
476
|
-
printf '%s\n' "$OLD_CONTENT"
|
|
477
|
-
} > "${TARGET_PATH}.tmp"
|
|
478
|
-
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
479
|
-
echo "Migrated existing CLAUDE.md (added OMC markers, preserved old content)"
|
|
480
|
-
fi
|
|
481
|
-
rm -f "$TEMP_OMC"
|
|
482
|
-
fi
|
|
483
|
-
|
|
484
|
-
# Extract new version and report
|
|
485
|
-
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
486
|
-
if [ "$OLD_VERSION" = "none" ]; then
|
|
487
|
-
echo "Installed CLAUDE.md: $NEW_VERSION"
|
|
488
|
-
elif [ "$OLD_VERSION" = "$NEW_VERSION" ]; then
|
|
489
|
-
echo "CLAUDE.md unchanged: $NEW_VERSION"
|
|
490
|
-
else
|
|
491
|
-
echo "Updated CLAUDE.md: $OLD_VERSION -> $NEW_VERSION"
|
|
492
|
-
fi
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
**Note**: If an existing CLAUDE.md is found, it will be backed up to `~/.claude/CLAUDE.md.backup.YYYY-MM-DD` before downloading the new version.
|
|
496
|
-
|
|
497
|
-
### Clean Up Legacy Hooks (if present)
|
|
498
|
-
|
|
499
|
-
Check if old manual hooks exist and remove them to prevent duplicates:
|
|
500
|
-
|
|
501
|
-
```bash
|
|
502
|
-
# Remove legacy bash hook scripts (now handled by plugin system)
|
|
503
|
-
rm -f ~/.claude/hooks/keyword-detector.sh
|
|
504
|
-
rm -f ~/.claude/hooks/stop-continuation.sh
|
|
505
|
-
rm -f ~/.claude/hooks/persistent-mode.sh
|
|
506
|
-
rm -f ~/.claude/hooks/session-start.sh
|
|
507
|
-
echo "Legacy hooks cleaned"
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
Check `~/.claude/settings.json` for manual hook entries. If the "hooks" key exists with UserPromptSubmit, Stop, or SessionStart entries pointing to bash scripts, inform the user:
|
|
511
|
-
|
|
512
|
-
> **Note**: Found legacy hooks in settings.json. These should be removed since the plugin now provides hooks automatically. Remove the "hooks" section from ~/.claude/settings.json to prevent duplicate hook execution.
|
|
513
|
-
|
|
514
|
-
### Verify Plugin Installation
|
|
515
|
-
|
|
516
|
-
```bash
|
|
517
|
-
grep -q "oh-my-claudecode" ~/.claude/settings.json && echo "Plugin verified" || echo "Plugin NOT found - run: claude /install-plugin oh-my-claudecode"
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
### Confirm Global Configuration Success
|
|
521
|
-
|
|
522
|
-
After completing global configuration, save progress and report:
|
|
523
|
-
|
|
524
|
-
```bash
|
|
525
|
-
# Save progress - Step 2 complete (Global config)
|
|
526
|
-
mkdir -p .omc/state
|
|
527
|
-
cat > ".omc/state/setup-state.json" << EOF
|
|
528
|
-
{
|
|
529
|
-
"lastCompletedStep": 2,
|
|
530
|
-
"timestamp": "$(date -Iseconds)",
|
|
531
|
-
"configType": "global"
|
|
532
|
-
}
|
|
533
|
-
EOF
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
**OMC Global Configuration Complete**
|
|
537
|
-
- CLAUDE.md: Updated with latest configuration from GitHub at ~/.claude/CLAUDE.md
|
|
538
|
-
- Backup: Previous CLAUDE.md backed up to `~/.claude/CLAUDE.md.backup.YYYY-MM-DD` (if existed)
|
|
539
|
-
- Scope: **GLOBAL** - applies to all Claude Code sessions
|
|
540
|
-
- Hooks: Provided by plugin (no manual installation needed)
|
|
541
|
-
- Agents: 28+ available (base + tiered variants)
|
|
542
|
-
- Model routing: Haiku/Sonnet/Opus based on task complexity
|
|
543
|
-
|
|
544
|
-
**Note**: Hooks are now managed by the plugin system automatically. No manual hook installation required.
|
|
545
|
-
|
|
546
|
-
If `--global` flag was used, clear state and **STOP HERE**:
|
|
547
|
-
```bash
|
|
548
|
-
rm -f ".omc/state/setup-state.json"
|
|
549
|
-
```
|
|
550
|
-
Do not continue to HUD setup or other steps.
|
|
551
|
-
|
|
552
|
-
## Step 3: Setup HUD Statusline
|
|
553
|
-
|
|
554
|
-
**Note**: If resuming and lastCompletedStep >= 3, skip to Step 3.5.
|
|
555
|
-
|
|
556
|
-
The HUD shows real-time status in Claude Code's status bar. **Invoke the hud skill** to set up and configure:
|
|
557
|
-
|
|
558
|
-
Use the Skill tool to invoke: `hud` with args: `setup`
|
|
559
|
-
|
|
560
|
-
This will:
|
|
561
|
-
1. Install the HUD wrapper script to `~/.claude/hud/omc-hud.mjs`
|
|
562
|
-
2. Configure `statusLine` in `~/.claude/settings.json`
|
|
563
|
-
3. Report status and prompt to restart if needed
|
|
564
|
-
|
|
565
|
-
After HUD setup completes, save progress:
|
|
566
|
-
```bash
|
|
567
|
-
# Save progress - Step 3 complete (HUD setup)
|
|
568
|
-
mkdir -p .omc/state
|
|
569
|
-
CONFIG_TYPE=$(cat ".omc/state/setup-state.json" 2>/dev/null | grep -oE '"configType":\s*"[^"]+"' | cut -d'"' -f4 || echo "unknown")
|
|
570
|
-
cat > ".omc/state/setup-state.json" << EOF
|
|
571
|
-
{
|
|
572
|
-
"lastCompletedStep": 3,
|
|
573
|
-
"timestamp": "$(date -Iseconds)",
|
|
574
|
-
"configType": "$CONFIG_TYPE"
|
|
575
|
-
}
|
|
576
|
-
EOF
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
## Step 3.5: Clear Stale Plugin Cache
|
|
580
|
-
|
|
581
|
-
Clear old cached plugin versions to avoid conflicts:
|
|
582
|
-
|
|
583
|
-
```bash
|
|
584
|
-
# Clear stale plugin cache versions (cross-platform)
|
|
585
|
-
node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.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<=1){console.log('Cache is clean');process.exit()}v.slice(0,-1).forEach(x=>{f.rmSync(p.join(b,x),{recursive:true,force:true})});console.log('Cleared',v.length-1,'stale cache version(s)')}catch{console.log('No cache directory found (normal for new installs)')}"
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
## Step 3.6: Check for Updates
|
|
589
|
-
|
|
590
|
-
Notify user if a newer version is available:
|
|
591
|
-
|
|
592
|
-
```bash
|
|
593
|
-
# Detect installed version (cross-platform)
|
|
594
|
-
node -e "
|
|
595
|
-
const p=require('path'),f=require('fs'),h=require('os').homedir();
|
|
596
|
-
const d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');
|
|
597
|
-
let v='';
|
|
598
|
-
// Try cache directory first
|
|
599
|
-
const b=p.join(d,'plugins','cache','omc','oh-my-claudecode');
|
|
600
|
-
try{const vs=f.readdirSync(b).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));if(vs.length)v=vs[vs.length-1]}catch{}
|
|
601
|
-
// Try .omc-version.json second
|
|
602
|
-
if(v==='')try{const j=JSON.parse(f.readFileSync('.omc-version.json','utf-8'));v=j.version||''}catch{}
|
|
603
|
-
// Try CLAUDE.md header third
|
|
604
|
-
if(v==='')for(const c of['.claude/CLAUDE.md',p.join(d,'CLAUDE.md')]){try{const m=f.readFileSync(c,'utf-8').match(/^# oh-my-claudecode.*?(v?\d+\.\d+\.\d+)/m);if(m){v=m[1].replace(/^v/,'');break}}catch{}}
|
|
605
|
-
console.log('Installed:',v||'(not found)');
|
|
606
|
-
"
|
|
607
|
-
|
|
608
|
-
# Check npm for latest version
|
|
609
|
-
LATEST_VERSION=$(npm view claudecode-omc version 2>/dev/null)
|
|
610
|
-
|
|
611
|
-
if [ -n "$INSTALLED_VERSION" ] && [ -n "$LATEST_VERSION" ]; then
|
|
612
|
-
# Simple version comparison (assumes semantic versioning)
|
|
613
|
-
if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then
|
|
614
|
-
echo ""
|
|
615
|
-
echo "UPDATE AVAILABLE:"
|
|
616
|
-
echo " Installed: v$INSTALLED_VERSION"
|
|
617
|
-
echo " Latest: v$LATEST_VERSION"
|
|
618
|
-
echo ""
|
|
619
|
-
echo "To update, run: claude /install-plugin oh-my-claudecode"
|
|
620
|
-
else
|
|
621
|
-
echo "You're on the latest version: v$INSTALLED_VERSION"
|
|
622
|
-
fi
|
|
623
|
-
elif [ -n "$LATEST_VERSION" ]; then
|
|
624
|
-
echo "Latest version available: v$LATEST_VERSION"
|
|
625
|
-
fi
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
## Step 3.7: Set Default Execution Mode
|
|
629
|
-
|
|
630
|
-
Use the AskUserQuestion tool to prompt the user:
|
|
631
|
-
|
|
632
|
-
**Question:** "Which parallel execution mode should be your default when you say 'fast' or 'parallel'?"
|
|
633
|
-
|
|
634
|
-
**Options:**
|
|
635
|
-
1. **ultrawork (maximum capability)** - Uses all agent tiers including Opus for complex tasks. Best for challenging work where quality matters most. (Recommended)
|
|
636
|
-
|
|
637
|
-
Store the preference in `~/.claude/.omc-config.json`:
|
|
638
|
-
|
|
639
|
-
```bash
|
|
640
|
-
# Read existing config or create empty object
|
|
641
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
642
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
643
|
-
|
|
644
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
645
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
646
|
-
else
|
|
647
|
-
EXISTING='{}'
|
|
648
|
-
fi
|
|
649
|
-
|
|
650
|
-
# Set defaultExecutionMode (replace USER_CHOICE with "ultrawork" or "")
|
|
651
|
-
echo "$EXISTING" | jq --arg mode "USER_CHOICE" '. + {defaultExecutionMode: $mode, configuredAt: (now | todate)}' > "$CONFIG_FILE"
|
|
652
|
-
echo "Default execution mode set to: USER_CHOICE"
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
**Note**: This preference ONLY affects generic keywords ("fast", "parallel"). Explicit keywords ("ulw") always override this preference.
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
## Step 3.8: Install OMC CLI Tool
|
|
659
|
-
|
|
660
|
-
The OMC CLI (`omc` command) provides standalone monitoring and analytics commands (HUD statusline + cost/session reporting).
|
|
661
|
-
|
|
662
|
-
First, check if the CLI is already installed:
|
|
663
|
-
|
|
664
|
-
```bash
|
|
665
|
-
# Check if omc CLI is already available
|
|
666
|
-
if command -v omc &>/dev/null; then
|
|
667
|
-
OMC_CLI_VERSION=$(omc --version 2>/dev/null | head -1 || echo "installed")
|
|
668
|
-
echo "OMC CLI already installed: $OMC_CLI_VERSION"
|
|
669
|
-
OMC_CLI_INSTALLED="true"
|
|
670
|
-
else
|
|
671
|
-
OMC_CLI_INSTALLED="false"
|
|
672
|
-
fi
|
|
673
|
-
```
|
|
674
|
-
|
|
675
|
-
If `OMC_CLI_INSTALLED` is `"true"`, skip the rest of this step.
|
|
676
|
-
|
|
677
|
-
If `OMC_CLI_INSTALLED` is `"false"`, use the AskUserQuestion tool to prompt the user:
|
|
678
|
-
|
|
679
|
-
**Question:** "Would you like to install the OMC CLI globally for standalone monitoring and analytics? (`omc`, `omc cost`, `omc sessions`)"
|
|
680
|
-
|
|
681
|
-
**Options:**
|
|
682
|
-
1. **Yes (Recommended)** - Install `claudecode-omc` via `npm install -g`
|
|
683
|
-
2. **No - Skip** - Skip installation (can install manually later with `npm install -g claudecode-omc`)
|
|
684
|
-
|
|
685
|
-
If user chooses **Yes**:
|
|
686
|
-
|
|
687
|
-
```bash
|
|
688
|
-
# Check if npm is available
|
|
689
|
-
if ! command -v npm &>/dev/null; then
|
|
690
|
-
echo "WARNING: npm not found. Cannot install OMC CLI automatically."
|
|
691
|
-
echo "Install Node.js/npm first, then run: npm install -g claudecode-omc"
|
|
692
|
-
else
|
|
693
|
-
# Install the CLI globally
|
|
694
|
-
if npm install -g claudecode-omc 2>&1; then
|
|
695
|
-
echo "OMC CLI installed successfully."
|
|
696
|
-
# Verify installation
|
|
697
|
-
if command -v omc &>/dev/null; then
|
|
698
|
-
OMC_CLI_VERSION=$(omc --version 2>/dev/null | head -1 || echo "installed")
|
|
699
|
-
echo "Verified: omc $OMC_CLI_VERSION"
|
|
700
|
-
else
|
|
701
|
-
echo "Installed but 'omc' not on PATH. You may need to restart your shell."
|
|
702
|
-
fi
|
|
703
|
-
else
|
|
704
|
-
echo "WARNING: Failed to install OMC CLI (permission issue or network error)."
|
|
705
|
-
echo "You can install manually later: npm install -g claudecode-omc"
|
|
706
|
-
echo "Or with sudo: sudo npm install -g claudecode-omc"
|
|
707
|
-
fi
|
|
708
|
-
fi
|
|
709
|
-
```
|
|
710
|
-
|
|
711
|
-
If user chooses **No - Skip**, continue to the next step without installing.
|
|
712
|
-
|
|
713
|
-
**Note**: The CLI is optional. All core functionality is also available through the plugin system (`/oh-my-claudecode:omc-help`, `/oh-my-claudecode:omc-doctor`). The CLI adds standalone terminal commands for analytics outside of Claude Code sessions.
|
|
714
|
-
|
|
715
|
-
## Step 3.8.5: Select Task Management Tool
|
|
716
|
-
|
|
717
|
-
First, detect available task tools:
|
|
718
|
-
|
|
719
|
-
```bash
|
|
720
|
-
# Detect beads (bd)
|
|
721
|
-
BD_VERSION=""
|
|
722
|
-
if command -v bd &>/dev/null; then
|
|
723
|
-
BD_VERSION=$(bd --version 2>/dev/null | head -1 || echo "installed")
|
|
724
|
-
fi
|
|
725
|
-
|
|
726
|
-
# Detect beads-rust (br)
|
|
727
|
-
BR_VERSION=""
|
|
728
|
-
if command -v br &>/dev/null; then
|
|
729
|
-
BR_VERSION=$(br --version 2>/dev/null | head -1 || echo "installed")
|
|
730
|
-
fi
|
|
731
|
-
|
|
732
|
-
# Report findings
|
|
733
|
-
if [ -n "$BD_VERSION" ]; then
|
|
734
|
-
echo "Found beads (bd): $BD_VERSION"
|
|
735
|
-
fi
|
|
736
|
-
if [ -n "$BR_VERSION" ]; then
|
|
737
|
-
echo "Found beads-rust (br): $BR_VERSION"
|
|
738
|
-
fi
|
|
739
|
-
if [ -z "$BD_VERSION" ] && [ -z "$BR_VERSION" ]; then
|
|
740
|
-
echo "No external task tools found. Using built-in Tasks."
|
|
741
|
-
fi
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
If **neither** beads nor beads-rust is detected, skip this step (default to built-in).
|
|
745
|
-
|
|
746
|
-
If beads or beads-rust is detected, use AskUserQuestion:
|
|
747
|
-
|
|
748
|
-
**Question:** "Which task management tool should I use for tracking work?"
|
|
749
|
-
|
|
750
|
-
**Options:**
|
|
751
|
-
1. **Built-in Tasks (default)** - Use Claude Code's native TaskCreate/TodoWrite. Tasks are session-only.
|
|
752
|
-
2. **Beads (bd)** - Git-backed persistent tasks. Survives across sessions. [Only if detected]
|
|
753
|
-
3. **Beads-Rust (br)** - Lightweight Rust port of beads. [Only if detected]
|
|
754
|
-
|
|
755
|
-
(Only show options 2/3 if the corresponding tool is detected)
|
|
756
|
-
|
|
757
|
-
Store the preference:
|
|
758
|
-
|
|
759
|
-
```bash
|
|
760
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
761
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
762
|
-
|
|
763
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
764
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
765
|
-
else
|
|
766
|
-
EXISTING='{}'
|
|
767
|
-
fi
|
|
768
|
-
|
|
769
|
-
# USER_CHOICE is "builtin", "beads", or "beads-rust" based on user selection
|
|
770
|
-
echo "$EXISTING" | jq --arg tool "USER_CHOICE" '. + {taskTool: $tool, taskToolConfig: {injectInstructions: true, useMcp: false}}' > "$CONFIG_FILE"
|
|
771
|
-
echo "Task tool set to: USER_CHOICE"
|
|
772
|
-
```
|
|
773
|
-
|
|
774
|
-
**Note:** The beads context instructions will be injected automatically on the next session start. No restart is needed for config to take effect.
|
|
775
|
-
|
|
776
|
-
## Step 4: Verify Plugin Installation
|
|
777
|
-
|
|
778
|
-
```bash
|
|
779
|
-
grep -q "oh-my-claudecode" ~/.claude/settings.json && echo "Plugin verified" || echo "Plugin NOT found - run: claude /install-plugin oh-my-claudecode"
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
## Step 5: Offer MCP Server Configuration
|
|
783
|
-
|
|
784
|
-
MCP servers extend Claude Code with additional tools (web search, GitHub, etc.).
|
|
785
|
-
|
|
786
|
-
Ask user: "Would you like to configure MCP servers for enhanced capabilities? (Context7, Exa search, GitHub, etc.)"
|
|
787
|
-
|
|
788
|
-
If yes, invoke the mcp-setup skill:
|
|
789
|
-
```
|
|
790
|
-
/oh-my-claudecode:mcp-setup
|
|
791
|
-
```
|
|
792
|
-
|
|
793
|
-
If no, skip to next step.
|
|
794
|
-
|
|
795
|
-
## Step 5.5: Configure Agent Teams (Optional)
|
|
796
|
-
|
|
797
|
-
**Note**: If resuming and lastCompletedStep >= 5.5, skip to Step 6.
|
|
798
|
-
|
|
799
|
-
Agent teams are an experimental Claude Code feature that lets you spawn N coordinated agents working on a shared task list with inter-agent messaging. **Teams are disabled by default** and require enabling via `settings.json`.
|
|
800
|
-
|
|
801
|
-
Reference: https://code.claude.com/docs/en/agent-teams
|
|
802
|
-
|
|
803
|
-
Use the AskUserQuestion tool to prompt:
|
|
804
|
-
|
|
805
|
-
**Question:** "Would you like to enable agent teams? Teams let you spawn coordinated agents (e.g., `/team 3:executor 'fix all errors'`). This is an experimental Claude Code feature."
|
|
806
|
-
|
|
807
|
-
**Options:**
|
|
808
|
-
1. **Yes, enable teams (Recommended)** - Enable the experimental feature and configure defaults
|
|
809
|
-
2. **No, skip** - Leave teams disabled (can enable later)
|
|
810
|
-
|
|
811
|
-
### If User Chooses YES:
|
|
812
|
-
|
|
813
|
-
#### Step 5.5.1: Enable Agent Teams in settings.json
|
|
814
|
-
|
|
815
|
-
**CRITICAL**: Agent teams require `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` to be set in `~/.claude/settings.json`. This must be done carefully to preserve existing user settings.
|
|
816
|
-
|
|
817
|
-
First, read the current settings.json:
|
|
818
|
-
|
|
819
|
-
```bash
|
|
820
|
-
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
821
|
-
|
|
822
|
-
if [ -f "$SETTINGS_FILE" ]; then
|
|
823
|
-
echo "Current settings.json found"
|
|
824
|
-
cat "$SETTINGS_FILE"
|
|
825
|
-
else
|
|
826
|
-
echo "No settings.json found - will create one"
|
|
827
|
-
fi
|
|
828
|
-
```
|
|
829
|
-
|
|
830
|
-
Then use the Read tool to read `~/.claude/settings.json` (if it exists). Use the Edit tool to merge the teams configuration while preserving ALL existing settings.
|
|
831
|
-
|
|
832
|
-
**If settings.json exists and has an `env` key**, merge the new env var into it:
|
|
833
|
-
|
|
834
|
-
```json
|
|
835
|
-
{
|
|
836
|
-
"env": {
|
|
837
|
-
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
```
|
|
841
|
-
|
|
842
|
-
Use jq to safely merge without overwriting existing settings:
|
|
843
|
-
|
|
844
|
-
```bash
|
|
845
|
-
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
846
|
-
|
|
847
|
-
if [ -f "$SETTINGS_FILE" ]; then
|
|
848
|
-
# Merge env var into existing settings, preserving everything else
|
|
849
|
-
TEMP_FILE=$(mktemp)
|
|
850
|
-
jq '.env = (.env // {} | . + {"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"})' "$SETTINGS_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$SETTINGS_FILE"
|
|
851
|
-
echo "Added CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to existing settings.json"
|
|
852
|
-
else
|
|
853
|
-
# Create new settings.json with just the teams env var
|
|
854
|
-
mkdir -p "$(dirname "$SETTINGS_FILE")"
|
|
855
|
-
cat > "$SETTINGS_FILE" << 'SETTINGS_EOF'
|
|
856
|
-
{
|
|
857
|
-
"env": {
|
|
858
|
-
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
SETTINGS_EOF
|
|
862
|
-
echo "Created settings.json with teams enabled"
|
|
863
|
-
fi
|
|
864
|
-
```
|
|
865
|
-
|
|
866
|
-
**IMPORTANT**: The Edit tool is preferred for modifying settings.json when possible, since it preserves formatting and comments. The jq approach above is the fallback for when the file needs structural merging.
|
|
867
|
-
|
|
868
|
-
#### Step 5.5.2: Configure Teammate Display Mode
|
|
869
|
-
|
|
870
|
-
Use the AskUserQuestion tool:
|
|
871
|
-
|
|
872
|
-
**Question:** "How should teammates be displayed?"
|
|
873
|
-
|
|
874
|
-
**Options:**
|
|
875
|
-
1. **Auto (Recommended)** - Uses split panes if in tmux, otherwise in-process. Best for most users.
|
|
876
|
-
2. **In-process** - All teammates in your main terminal. Use Shift+Up/Down to select. Works everywhere.
|
|
877
|
-
3. **Split panes (tmux)** - Each teammate in its own pane. Requires tmux or iTerm2.
|
|
878
|
-
|
|
879
|
-
If user chooses anything other than "Auto", add `teammateMode` to settings.json:
|
|
880
|
-
|
|
881
|
-
```bash
|
|
882
|
-
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
883
|
-
|
|
884
|
-
# TEAMMATE_MODE is "in-process" or "tmux" based on user choice
|
|
885
|
-
# Skip this if user chose "Auto" (that's the default)
|
|
886
|
-
jq --arg mode "TEAMMATE_MODE" '. + {teammateMode: $mode}' "$SETTINGS_FILE" > "${SETTINGS_FILE}.tmp" && mv "${SETTINGS_FILE}.tmp" "$SETTINGS_FILE"
|
|
887
|
-
echo "Teammate display mode set to: TEAMMATE_MODE"
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
#### Step 5.5.3: Configure Team Defaults in omc-config
|
|
891
|
-
|
|
892
|
-
Use the AskUserQuestion tool with multiple questions:
|
|
893
|
-
|
|
894
|
-
**Question 1:** "How many agents should teams spawn by default?"
|
|
895
|
-
|
|
896
|
-
**Options:**
|
|
897
|
-
1. **3 agents (Recommended)** - Good balance of speed and resource usage
|
|
898
|
-
2. **5 agents (maximum)** - Maximum parallelism for large tasks
|
|
899
|
-
3. **2 agents** - Conservative, for smaller projects
|
|
900
|
-
|
|
901
|
-
**Question 2:** "Which agent type should teammates use by default?"
|
|
902
|
-
|
|
903
|
-
**Options:**
|
|
904
|
-
1. **executor (Recommended)** - General-purpose code implementation agent
|
|
905
|
-
2. **build-fixer** - Specialized for build/type error fixing
|
|
906
|
-
3. **designer** - Specialized for UI/frontend work
|
|
907
|
-
|
|
908
|
-
Store the team configuration in `~/.claude/.omc-config.json`:
|
|
909
|
-
|
|
910
|
-
```bash
|
|
911
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
912
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
913
|
-
|
|
914
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
915
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
916
|
-
else
|
|
917
|
-
EXISTING='{}'
|
|
918
|
-
fi
|
|
919
|
-
|
|
920
|
-
# Replace MAX_AGENTS, AGENT_TYPE with user choices
|
|
921
|
-
echo "$EXISTING" | jq \
|
|
922
|
-
--argjson maxAgents MAX_AGENTS \
|
|
923
|
-
--arg agentType "AGENT_TYPE" \
|
|
924
|
-
'. + {team: {maxAgents: $maxAgents, defaultAgentType: $agentType, monitorIntervalMs: 30000, shutdownTimeoutMs: 15000}}' > "$CONFIG_FILE"
|
|
925
|
-
|
|
926
|
-
echo "Team configuration saved:"
|
|
927
|
-
echo " Max agents: MAX_AGENTS"
|
|
928
|
-
echo " Default agent: AGENT_TYPE"
|
|
929
|
-
echo " Model: teammates inherit your session model"
|
|
930
|
-
```
|
|
931
|
-
|
|
932
|
-
**Note:** Teammates do not have a separate model default. Each teammate is a full Claude Code session that inherits your configured model. Subagents spawned by teammates can use any model tier.
|
|
933
|
-
|
|
934
|
-
#### Verify settings.json Integrity
|
|
935
|
-
|
|
936
|
-
After all modifications, verify settings.json is valid JSON and contains the expected keys:
|
|
937
|
-
|
|
938
|
-
```bash
|
|
939
|
-
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
940
|
-
|
|
941
|
-
# Verify JSON is valid
|
|
942
|
-
if jq empty "$SETTINGS_FILE" 2>/dev/null; then
|
|
943
|
-
echo "settings.json: valid JSON"
|
|
944
|
-
else
|
|
945
|
-
echo "ERROR: settings.json is invalid JSON! Restoring from backup..."
|
|
946
|
-
# The backup from Step 2 should still exist
|
|
947
|
-
exit 1
|
|
948
|
-
fi
|
|
949
|
-
|
|
950
|
-
# Verify teams env var is present
|
|
951
|
-
if jq -e '.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS' "$SETTINGS_FILE" > /dev/null 2>&1; then
|
|
952
|
-
echo "Agent teams: ENABLED"
|
|
953
|
-
else
|
|
954
|
-
echo "WARNING: Agent teams env var not found in settings.json"
|
|
955
|
-
fi
|
|
956
|
-
|
|
957
|
-
# Show final settings.json for user review
|
|
958
|
-
echo ""
|
|
959
|
-
echo "Final settings.json:"
|
|
960
|
-
jq '.' "$SETTINGS_FILE"
|
|
961
|
-
```
|
|
962
|
-
|
|
963
|
-
### If User Chooses NO:
|
|
964
|
-
|
|
965
|
-
Skip this step. Agent teams will remain disabled. User can enable later by adding to `~/.claude/settings.json`:
|
|
966
|
-
```json
|
|
967
|
-
{
|
|
968
|
-
"env": {
|
|
969
|
-
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
```
|
|
973
|
-
|
|
974
|
-
Or by running `/oh-my-claudecode:omc-setup --force` and choosing to enable teams.
|
|
975
|
-
|
|
976
|
-
### Save Progress
|
|
977
|
-
|
|
978
|
-
```bash
|
|
979
|
-
# Save progress - Step 5.5 complete (Teams configured)
|
|
980
|
-
mkdir -p .omc/state
|
|
981
|
-
CONFIG_TYPE=$(cat ".omc/state/setup-state.json" 2>/dev/null | grep -oE '"configType":\s*"[^"]+"' | cut -d'"' -f4 || echo "unknown")
|
|
982
|
-
cat > ".omc/state/setup-state.json" << EOF
|
|
983
|
-
{
|
|
984
|
-
"lastCompletedStep": 5.5,
|
|
985
|
-
"timestamp": "$(date -Iseconds)",
|
|
986
|
-
"configType": "$CONFIG_TYPE"
|
|
987
|
-
}
|
|
988
|
-
EOF
|
|
989
|
-
```
|
|
990
|
-
|
|
991
|
-
## Step 6: Detect Upgrade from 2.x
|
|
992
|
-
|
|
993
|
-
Check if user has existing configuration:
|
|
994
|
-
```bash
|
|
995
|
-
# Check for existing 2.x artifacts
|
|
996
|
-
ls ~/.claude/commands/ralph-loop.md 2>/dev/null || ls ~/.claude/commands/ultrawork.md 2>/dev/null
|
|
997
|
-
```
|
|
998
|
-
|
|
999
|
-
If found, this is an upgrade from 2.x.
|
|
1000
|
-
|
|
1001
|
-
## Step 7: Show Welcome Message
|
|
1002
|
-
|
|
1003
|
-
### For New Users:
|
|
1004
|
-
|
|
1005
|
-
```
|
|
1006
|
-
OMC Setup Complete!
|
|
1007
|
-
|
|
1008
|
-
You don't need to learn any commands. I now have intelligent behaviors that activate automatically.
|
|
1009
|
-
|
|
1010
|
-
WHAT HAPPENS AUTOMATICALLY:
|
|
1011
|
-
- Complex tasks -> I parallelize and delegate to specialists
|
|
1012
|
-
- "plan this" -> I start a planning interview
|
|
1013
|
-
- "don't stop until done" -> I persist until verified complete
|
|
1014
|
-
- "stop" or "cancel" -> I intelligently stop current operation
|
|
1015
|
-
|
|
1016
|
-
MAGIC KEYWORDS (optional power-user shortcuts):
|
|
1017
|
-
Just include these words naturally in your request:
|
|
1018
|
-
|
|
1019
|
-
| Keyword | Effect | Example |
|
|
1020
|
-
|---------|--------|---------|
|
|
1021
|
-
| ralph | Persistence mode | "ralph: fix the auth bug" |
|
|
1022
|
-
| ralplan | Iterative planning | "ralplan this feature" |
|
|
1023
|
-
| ulw | Max parallelism | "ulw refactor the API" |
|
|
1024
|
-
| plan | Planning interview | "plan the new endpoints" |
|
|
1025
|
-
| team | Coordinated agents | "/team 3:executor fix errors" |
|
|
1026
|
-
|
|
1027
|
-
**ralph includes ultrawork:** When you activate ralph mode, it automatically includes ultrawork's parallel execution. No need to combine keywords.
|
|
1028
|
-
|
|
1029
|
-
TEAMS:
|
|
1030
|
-
Spawn coordinated agents with shared task lists and real-time messaging:
|
|
1031
|
-
- /oh-my-claudecode:team 3:executor "fix all TypeScript errors"
|
|
1032
|
-
- /oh-my-claudecode:team 5:build-fixer "fix build errors in src/"
|
|
1033
|
-
Teams use Claude Code native tools (TeamCreate/SendMessage/TaskCreate).
|
|
1034
|
-
|
|
1035
|
-
MCP SERVERS:
|
|
1036
|
-
Run /oh-my-claudecode:mcp-setup to add tools like web search, GitHub, etc.
|
|
1037
|
-
|
|
1038
|
-
HUD STATUSLINE:
|
|
1039
|
-
The status bar now shows OMC state. Restart Claude Code to see it.
|
|
1040
|
-
|
|
1041
|
-
CLI ANALYTICS (if installed):
|
|
1042
|
-
- omc - Default analytics dashboard
|
|
1043
|
-
- omc cost - View cost reports (daily/weekly/monthly)
|
|
1044
|
-
- omc sessions - Inspect session history
|
|
1045
|
-
- omc backfill - Import transcript analytics
|
|
1046
|
-
|
|
1047
|
-
That's it! Just use Claude Code normally.
|
|
1048
|
-
```
|
|
1049
|
-
|
|
1050
|
-
### For Users Upgrading from 2.x:
|
|
1051
|
-
|
|
1052
|
-
```
|
|
1053
|
-
OMC Setup Complete! (Upgraded from 2.x)
|
|
1054
|
-
|
|
1055
|
-
GOOD NEWS: Your existing commands still work!
|
|
1056
|
-
- /ralph, /ultrawork, /omc-plan, etc. all still function
|
|
1057
|
-
|
|
1058
|
-
WHAT'S NEW in 3.0:
|
|
1059
|
-
You no longer NEED those commands. Everything is automatic now:
|
|
1060
|
-
- Just say "don't stop until done" instead of /ralph
|
|
1061
|
-
- Just say "fast" or "parallel" instead of /ultrawork
|
|
1062
|
-
- Just say "plan this" instead of /omc-plan
|
|
1063
|
-
- Just say "stop" instead of /cancel
|
|
1064
|
-
|
|
1065
|
-
MAGIC KEYWORDS (power-user shortcuts):
|
|
1066
|
-
| Keyword | Same as old... | Example |
|
|
1067
|
-
|---------|----------------|---------|
|
|
1068
|
-
| ralph | /ralph | "ralph: fix the bug" |
|
|
1069
|
-
| ralplan | /ralplan | "ralplan this feature" |
|
|
1070
|
-
| ulw | /ultrawork | "ulw refactor API" |
|
|
1071
|
-
| omc-plan | /omc-plan | "plan the endpoints" |
|
|
1072
|
-
| team | (new!) | "/team 3:executor fix errors" |
|
|
1073
|
-
|
|
1074
|
-
TEAMS (NEW!):
|
|
1075
|
-
Spawn coordinated agents with shared task lists and real-time messaging:
|
|
1076
|
-
- /oh-my-claudecode:team 3:executor "fix all TypeScript errors"
|
|
1077
|
-
- Uses Claude Code native tools (TeamCreate/SendMessage/TaskCreate)
|
|
1078
|
-
|
|
1079
|
-
HUD STATUSLINE:
|
|
1080
|
-
The status bar now shows OMC state. Restart Claude Code to see it.
|
|
1081
|
-
|
|
1082
|
-
CLI ANALYTICS (if installed):
|
|
1083
|
-
- omc - Default analytics dashboard
|
|
1084
|
-
- omc cost - View cost reports (daily/weekly/monthly)
|
|
1085
|
-
- omc sessions - Inspect session history
|
|
1086
|
-
- omc backfill - Import transcript analytics
|
|
1087
|
-
|
|
1088
|
-
Your workflow won't break - it just got easier!
|
|
1089
|
-
```
|
|
1090
|
-
|
|
1091
|
-
## Step 8: Ask About Starring Repository
|
|
1092
|
-
|
|
1093
|
-
First, check if `gh` CLI is available and authenticated:
|
|
1094
|
-
|
|
1095
|
-
```bash
|
|
1096
|
-
gh auth status &>/dev/null
|
|
142
|
+
bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-progress.sh" clear
|
|
1097
143
|
```
|
|
1098
144
|
|
|
1099
|
-
|
|
145
|
+
## Phase Execution
|
|
1100
146
|
|
|
1101
|
-
|
|
147
|
+
### For `--local` or `--global` flags:
|
|
148
|
+
Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/omc-setup/phases/01-install-claude-md.md` and follow its instructions.
|
|
149
|
+
(The phase file handles early exit for flag mode.)
|
|
1102
150
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
1106
|
-
if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
|
|
1107
|
-
OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
1108
|
-
fi
|
|
1109
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
1110
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
1111
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
1112
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
1113
|
-
fi
|
|
1114
|
-
fi
|
|
1115
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
1116
|
-
OMC_OWNER="${OMC_REPO%%/*}"
|
|
1117
|
-
OMC_REPO_NAME="${OMC_REPO##*/}"
|
|
1118
|
-
gh api "/user/starred/${OMC_OWNER}/${OMC_REPO_NAME}" &>/dev/null
|
|
1119
|
-
```
|
|
1120
|
-
|
|
1121
|
-
**If already starred (exit code 0):**
|
|
1122
|
-
- Skip the prompt entirely
|
|
1123
|
-
- Continue to next step silently
|
|
151
|
+
### For full setup (default or --force):
|
|
152
|
+
Execute phases sequentially. For each phase, read the corresponding file and follow its instructions:
|
|
1124
153
|
|
|
1125
|
-
**
|
|
154
|
+
1. **Phase 1 - Install CLAUDE.md**: Read `${CLAUDE_PLUGIN_ROOT}/skills/omc-setup/phases/01-install-claude-md.md` and follow its instructions.
|
|
1126
155
|
|
|
1127
|
-
|
|
156
|
+
2. **Phase 2 - Environment Configuration**: Read `${CLAUDE_PLUGIN_ROOT}/skills/omc-setup/phases/02-configure.md` and follow its instructions.
|
|
1128
157
|
|
|
1129
|
-
**
|
|
158
|
+
3. **Phase 3 - Integration Setup**: Read `${CLAUDE_PLUGIN_ROOT}/skills/omc-setup/phases/03-integrations.md` and follow its instructions.
|
|
1130
159
|
|
|
1131
|
-
**
|
|
1132
|
-
1. **Yes, star it!** - Star the repository
|
|
1133
|
-
2. **No thanks** - Skip without further prompts
|
|
1134
|
-
3. **Maybe later** - Skip without further prompts
|
|
160
|
+
4. **Phase 4 - Completion**: Read `${CLAUDE_PLUGIN_ROOT}/skills/omc-setup/phases/04-welcome.md` and follow its instructions.
|
|
1135
161
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
```bash
|
|
1139
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
1140
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
1141
|
-
if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
|
|
1142
|
-
OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
1143
|
-
fi
|
|
1144
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
1145
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
1146
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
1147
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
1148
|
-
fi
|
|
1149
|
-
fi
|
|
1150
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
1151
|
-
OMC_OWNER="${OMC_REPO%%/*}"
|
|
1152
|
-
OMC_REPO_NAME="${OMC_REPO##*/}"
|
|
1153
|
-
gh api -X PUT "/user/starred/${OMC_OWNER}/${OMC_REPO_NAME}" 2>/dev/null && echo "Thanks for starring! ⭐" || true
|
|
1154
|
-
```
|
|
1155
|
-
|
|
1156
|
-
**Note:** Fail silently if the API call doesn't work - never block setup completion.
|
|
1157
|
-
|
|
1158
|
-
### If gh is NOT available or not authenticated:
|
|
1159
|
-
|
|
1160
|
-
```bash
|
|
1161
|
-
echo ""
|
|
1162
|
-
echo "If you enjoy oh-my-claudecode, consider starring the repo:"
|
|
1163
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
1164
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
1165
|
-
if [ -z "$OMC_REPO" ] && [ -f "$CONFIG_FILE" ]; then
|
|
1166
|
-
OMC_REPO=$(jq -r '.updateRepository // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
1167
|
-
fi
|
|
1168
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
1169
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
1170
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
1171
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
1172
|
-
fi
|
|
1173
|
-
fi
|
|
1174
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
1175
|
-
echo " https://github.com/${OMC_REPO}"
|
|
1176
|
-
echo ""
|
|
1177
|
-
```
|
|
1178
|
-
|
|
1179
|
-
### Clear Setup State and Mark Completion
|
|
1180
|
-
|
|
1181
|
-
After Step 8 completes (regardless of star choice), clear the temporary state and mark setup as completed:
|
|
1182
|
-
|
|
1183
|
-
```bash
|
|
1184
|
-
# Setup complete - clear temporary state file
|
|
1185
|
-
rm -f ".omc/state/setup-state.json"
|
|
1186
|
-
|
|
1187
|
-
# Mark setup as completed in persistent config (prevents re-running full setup on updates)
|
|
1188
|
-
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
1189
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
1190
|
-
|
|
1191
|
-
# Get current OMC version from CLAUDE.md
|
|
1192
|
-
OMC_VERSION=""
|
|
1193
|
-
if [ -f ".claude/CLAUDE.md" ]; then
|
|
1194
|
-
OMC_VERSION=$(grep -m1 "^# oh-my-claudecode" .claude/CLAUDE.md 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
1195
|
-
elif [ -f "$HOME/.claude/CLAUDE.md" ]; then
|
|
1196
|
-
OMC_VERSION=$(grep -m1 "^# oh-my-claudecode" "$HOME/.claude/CLAUDE.md" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
1197
|
-
fi
|
|
1198
|
-
|
|
1199
|
-
# Resolve source repository and persist it for future updates
|
|
1200
|
-
OMC_REPO="${OMC_REPO:-}"
|
|
1201
|
-
OMC_BRANCH="${OMC_BRANCH:-}"
|
|
1202
|
-
if [ -z "$OMC_REPO" ] && command -v git >/dev/null 2>&1; then
|
|
1203
|
-
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || true)
|
|
1204
|
-
if [ -n "$ORIGIN_URL" ]; then
|
|
1205
|
-
OMC_REPO=$(echo "$ORIGIN_URL" | sed -E 's#^git@github.com:##; s#^https://github.com/##; s#\\.git$##')
|
|
1206
|
-
fi
|
|
1207
|
-
fi
|
|
1208
|
-
OMC_REPO="${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}"
|
|
1209
|
-
OMC_BRANCH="${OMC_BRANCH:-main}"
|
|
1210
|
-
|
|
1211
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
1212
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
1213
|
-
else
|
|
1214
|
-
EXISTING='{}'
|
|
1215
|
-
fi
|
|
1216
|
-
|
|
1217
|
-
# Add setupCompleted timestamp/version and persisted source repo
|
|
1218
|
-
echo "$EXISTING" | jq --arg ts "$(date -Iseconds)" --arg ver "$OMC_VERSION" --arg repo "$OMC_REPO" --arg branch "$OMC_BRANCH" \
|
|
1219
|
-
'. + {setupCompleted: $ts, setupVersion: $ver, updateRepository: $repo, updateBranch: $branch}' > "$CONFIG_FILE"
|
|
162
|
+
## Graceful Interrupt Handling
|
|
1220
163
|
|
|
1221
|
-
|
|
1222
|
-
echo "Note: Future updates will only refresh CLAUDE.md, not the full setup wizard."
|
|
1223
|
-
```
|
|
164
|
+
**IMPORTANT**: This setup process saves progress after each phase via `${CLAUDE_PLUGIN_ROOT}/scripts/setup-progress.sh`. If interrupted (Ctrl+C or connection loss), the setup can resume from where it left off.
|
|
1224
165
|
|
|
1225
166
|
## Keeping Up to Date
|
|
1226
167
|
|
|
@@ -1234,75 +175,3 @@ After installing oh-my-claudecode updates (via npm or plugin update):
|
|
|
1234
175
|
- `/oh-my-claudecode:omc-setup --force` to re-run the full wizard (reconfigure preferences)
|
|
1235
176
|
|
|
1236
177
|
This ensures you have the newest features and agent configurations without the token cost of repeating the full setup.
|
|
1237
|
-
|
|
1238
|
-
## Help Text
|
|
1239
|
-
|
|
1240
|
-
When user runs `/oh-my-claudecode:omc-setup --help` or just `--help`, display:
|
|
1241
|
-
|
|
1242
|
-
```
|
|
1243
|
-
OMC Setup - Configure oh-my-claudecode
|
|
1244
|
-
|
|
1245
|
-
USAGE:
|
|
1246
|
-
/oh-my-claudecode:omc-setup Run initial setup wizard (or update if already configured)
|
|
1247
|
-
/oh-my-claudecode:omc-setup --local Configure local project (.claude/CLAUDE.md)
|
|
1248
|
-
/oh-my-claudecode:omc-setup --global Configure global settings (~/.claude/CLAUDE.md)
|
|
1249
|
-
/oh-my-claudecode:omc-setup --force Force full setup wizard even if already configured
|
|
1250
|
-
/oh-my-claudecode:omc-setup --help Show this help
|
|
1251
|
-
|
|
1252
|
-
MODES:
|
|
1253
|
-
Initial Setup (no flags)
|
|
1254
|
-
- Interactive wizard for first-time setup
|
|
1255
|
-
- Configures CLAUDE.md (local or global)
|
|
1256
|
-
- Sets up HUD statusline
|
|
1257
|
-
- Checks for updates
|
|
1258
|
-
- Offers MCP server configuration
|
|
1259
|
-
- Configures team mode defaults (agent count, type, model)
|
|
1260
|
-
- If already configured, offers quick update option
|
|
1261
|
-
|
|
1262
|
-
Local Configuration (--local)
|
|
1263
|
-
- Downloads fresh CLAUDE.md to ./.claude/
|
|
1264
|
-
- Backs up existing CLAUDE.md to .claude/CLAUDE.md.backup.YYYY-MM-DD
|
|
1265
|
-
- Project-specific settings
|
|
1266
|
-
- Use this to update project config after OMC upgrades
|
|
1267
|
-
|
|
1268
|
-
Global Configuration (--global)
|
|
1269
|
-
- Downloads fresh CLAUDE.md to ~/.claude/
|
|
1270
|
-
- Backs up existing CLAUDE.md to ~/.claude/CLAUDE.md.backup.YYYY-MM-DD
|
|
1271
|
-
- Applies to all Claude Code sessions
|
|
1272
|
-
- Cleans up legacy hooks
|
|
1273
|
-
- Use this to update global config after OMC upgrades
|
|
1274
|
-
|
|
1275
|
-
Force Full Setup (--force)
|
|
1276
|
-
- Bypasses the "already configured" check
|
|
1277
|
-
- Runs the complete setup wizard from scratch
|
|
1278
|
-
- Use when you want to reconfigure preferences
|
|
1279
|
-
|
|
1280
|
-
EXAMPLES:
|
|
1281
|
-
/oh-my-claudecode:omc-setup # First time setup (or update CLAUDE.md if configured)
|
|
1282
|
-
/oh-my-claudecode:omc-setup --local # Update this project
|
|
1283
|
-
/oh-my-claudecode:omc-setup --global # Update all projects
|
|
1284
|
-
/oh-my-claudecode:omc-setup --force # Re-run full setup wizard
|
|
1285
|
-
|
|
1286
|
-
For more info: https://github.com/${OMC_REPO:-Yeachan-Heo/oh-my-claudecode}
|
|
1287
|
-
```
|
|
1288
|
-
|
|
1289
|
-
## Optional Rule Templates
|
|
1290
|
-
|
|
1291
|
-
OMC includes rule templates you can copy to your project's `.claude/rules/` directory for automatic context injection:
|
|
1292
|
-
|
|
1293
|
-
| Template | Purpose |
|
|
1294
|
-
|----------|---------|
|
|
1295
|
-
| `coding-style.md` | Code style, immutability, file organization |
|
|
1296
|
-
| `testing.md` | TDD workflow, 80% coverage target |
|
|
1297
|
-
| `security.md` | Secret management, input validation |
|
|
1298
|
-
| `performance.md` | Model selection, context management |
|
|
1299
|
-
| `git-workflow.md` | Commit conventions, PR workflow |
|
|
1300
|
-
| `karpathy-guidelines.md` | Coding discipline — think before coding, simplicity, surgical changes |
|
|
1301
|
-
|
|
1302
|
-
Copy with:
|
|
1303
|
-
```bash
|
|
1304
|
-
mkdir -p .claude/rules
|
|
1305
|
-
cp "${CLAUDE_PLUGIN_ROOT}/templates/rules/"*.md .claude/rules/
|
|
1306
|
-
```
|
|
1307
|
-
|
|
1308
|
-
See `templates/rules/README.md` for details.
|