oh-my-claudecode 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/README.md +281 -0
  2. package/bin/oh-my-claudecode.js +5 -0
  3. package/dist/agents/azathoth.d.ts +19 -0
  4. package/dist/agents/azathoth.d.ts.map +1 -0
  5. package/dist/agents/azathoth.js +105 -0
  6. package/dist/agents/azathoth.js.map +1 -0
  7. package/dist/agents/builtin-agents.d.ts +18 -0
  8. package/dist/agents/builtin-agents.d.ts.map +1 -0
  9. package/dist/agents/builtin-agents.js +141 -0
  10. package/dist/agents/builtin-agents.js.map +1 -0
  11. package/dist/agents/cthulhu.d.ts +21 -0
  12. package/dist/agents/cthulhu.d.ts.map +1 -0
  13. package/dist/agents/cthulhu.js +368 -0
  14. package/dist/agents/cthulhu.js.map +1 -0
  15. package/dist/agents/dagon.d.ts +17 -0
  16. package/dist/agents/dagon.d.ts.map +1 -0
  17. package/dist/agents/dagon.js +190 -0
  18. package/dist/agents/dagon.js.map +1 -0
  19. package/dist/agents/hastur.d.ts +18 -0
  20. package/dist/agents/hastur.d.ts.map +1 -0
  21. package/dist/agents/hastur.js +92 -0
  22. package/dist/agents/hastur.js.map +1 -0
  23. package/dist/agents/index.d.ts +14 -0
  24. package/dist/agents/index.d.ts.map +1 -0
  25. package/dist/agents/index.js +13 -0
  26. package/dist/agents/index.js.map +1 -0
  27. package/dist/agents/ithaqua.d.ts +19 -0
  28. package/dist/agents/ithaqua.d.ts.map +1 -0
  29. package/dist/agents/ithaqua.js +254 -0
  30. package/dist/agents/ithaqua.js.map +1 -0
  31. package/dist/agents/nyarlathotep.d.ts +18 -0
  32. package/dist/agents/nyarlathotep.d.ts.map +1 -0
  33. package/dist/agents/nyarlathotep.js +129 -0
  34. package/dist/agents/nyarlathotep.js.map +1 -0
  35. package/dist/agents/shoggoth.d.ts +17 -0
  36. package/dist/agents/shoggoth.d.ts.map +1 -0
  37. package/dist/agents/shoggoth.js +123 -0
  38. package/dist/agents/shoggoth.js.map +1 -0
  39. package/dist/agents/shub-niggurath.d.ts +18 -0
  40. package/dist/agents/shub-niggurath.d.ts.map +1 -0
  41. package/dist/agents/shub-niggurath.js +164 -0
  42. package/dist/agents/shub-niggurath.js.map +1 -0
  43. package/dist/agents/the-deep-one.d.ts +17 -0
  44. package/dist/agents/the-deep-one.d.ts.map +1 -0
  45. package/dist/agents/the-deep-one.js +114 -0
  46. package/dist/agents/the-deep-one.js.map +1 -0
  47. package/dist/agents/tsathoggua.d.ts +19 -0
  48. package/dist/agents/tsathoggua.d.ts.map +1 -0
  49. package/dist/agents/tsathoggua.js +177 -0
  50. package/dist/agents/tsathoggua.js.map +1 -0
  51. package/dist/agents/types.d.ts +61 -0
  52. package/dist/agents/types.d.ts.map +1 -0
  53. package/dist/agents/types.js +2 -0
  54. package/dist/agents/types.js.map +1 -0
  55. package/dist/agents/yog-sothoth.d.ts +17 -0
  56. package/dist/agents/yog-sothoth.d.ts.map +1 -0
  57. package/dist/agents/yog-sothoth.js +147 -0
  58. package/dist/agents/yog-sothoth.js.map +1 -0
  59. package/dist/cli/doctor.d.ts +2 -0
  60. package/dist/cli/doctor.d.ts.map +1 -0
  61. package/dist/cli/doctor.js +105 -0
  62. package/dist/cli/doctor.js.map +1 -0
  63. package/dist/cli/index.d.ts +2 -0
  64. package/dist/cli/index.d.ts.map +1 -0
  65. package/dist/cli/index.js +53 -0
  66. package/dist/cli/index.js.map +1 -0
  67. package/dist/cli/install.d.ts +5 -0
  68. package/dist/cli/install.d.ts.map +1 -0
  69. package/dist/cli/install.js +179 -0
  70. package/dist/cli/install.js.map +1 -0
  71. package/dist/config/index.d.ts +3 -0
  72. package/dist/config/index.d.ts.map +1 -0
  73. package/dist/config/index.js +2 -0
  74. package/dist/config/index.js.map +1 -0
  75. package/dist/config/schema.d.ts +7406 -0
  76. package/dist/config/schema.d.ts.map +1 -0
  77. package/dist/config/schema.js +197 -0
  78. package/dist/config/schema.js.map +1 -0
  79. package/dist/features/background-agent/index.d.ts +58 -0
  80. package/dist/features/background-agent/index.d.ts.map +1 -0
  81. package/dist/features/background-agent/index.js +113 -0
  82. package/dist/features/background-agent/index.js.map +1 -0
  83. package/dist/features/mcp-manager/index.d.ts +40 -0
  84. package/dist/features/mcp-manager/index.d.ts.map +1 -0
  85. package/dist/features/mcp-manager/index.js +71 -0
  86. package/dist/features/mcp-manager/index.js.map +1 -0
  87. package/dist/features/skill-loader/index.d.ts +37 -0
  88. package/dist/features/skill-loader/index.d.ts.map +1 -0
  89. package/dist/features/skill-loader/index.js +81 -0
  90. package/dist/features/skill-loader/index.js.map +1 -0
  91. package/dist/hooks/comment-checker.d.ts +18 -0
  92. package/dist/hooks/comment-checker.d.ts.map +1 -0
  93. package/dist/hooks/comment-checker.js +75 -0
  94. package/dist/hooks/comment-checker.js.map +1 -0
  95. package/dist/hooks/elder-loop.d.ts +26 -0
  96. package/dist/hooks/elder-loop.d.ts.map +1 -0
  97. package/dist/hooks/elder-loop.js +84 -0
  98. package/dist/hooks/elder-loop.js.map +1 -0
  99. package/dist/hooks/index.d.ts +20 -0
  100. package/dist/hooks/index.d.ts.map +1 -0
  101. package/dist/hooks/index.js +73 -0
  102. package/dist/hooks/index.js.map +1 -0
  103. package/dist/hooks/rules-injector.d.ts +12 -0
  104. package/dist/hooks/rules-injector.d.ts.map +1 -0
  105. package/dist/hooks/rules-injector.js +52 -0
  106. package/dist/hooks/rules-injector.js.map +1 -0
  107. package/dist/hooks/todo-continuation.d.ts +25 -0
  108. package/dist/hooks/todo-continuation.d.ts.map +1 -0
  109. package/dist/hooks/todo-continuation.js +74 -0
  110. package/dist/hooks/todo-continuation.js.map +1 -0
  111. package/dist/hooks/write-guard.d.ts +11 -0
  112. package/dist/hooks/write-guard.d.ts.map +1 -0
  113. package/dist/hooks/write-guard.js +39 -0
  114. package/dist/hooks/write-guard.js.map +1 -0
  115. package/dist/index.d.ts +36 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +35 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/plugin-config.d.ts +22 -0
  120. package/dist/plugin-config.d.ts.map +1 -0
  121. package/dist/plugin-config.js +133 -0
  122. package/dist/plugin-config.js.map +1 -0
  123. package/dist/plugin-handlers/config-handler.d.ts +21 -0
  124. package/dist/plugin-handlers/config-handler.d.ts.map +1 -0
  125. package/dist/plugin-handlers/config-handler.js +33 -0
  126. package/dist/plugin-handlers/config-handler.js.map +1 -0
  127. package/dist/plugin-handlers/index.d.ts +2 -0
  128. package/dist/plugin-handlers/index.d.ts.map +1 -0
  129. package/dist/plugin-handlers/index.js +2 -0
  130. package/dist/plugin-handlers/index.js.map +1 -0
  131. package/dist/shared/deep-merge.d.ts +6 -0
  132. package/dist/shared/deep-merge.d.ts.map +1 -0
  133. package/dist/shared/deep-merge.js +30 -0
  134. package/dist/shared/deep-merge.js.map +1 -0
  135. package/dist/shared/index.d.ts +5 -0
  136. package/dist/shared/index.d.ts.map +1 -0
  137. package/dist/shared/index.js +5 -0
  138. package/dist/shared/index.js.map +1 -0
  139. package/dist/shared/log.d.ts +3 -0
  140. package/dist/shared/log.d.ts.map +1 -0
  141. package/dist/shared/log.js +22 -0
  142. package/dist/shared/log.js.map +1 -0
  143. package/dist/shared/model-resolution.d.ts +15 -0
  144. package/dist/shared/model-resolution.d.ts.map +1 -0
  145. package/dist/shared/model-resolution.js +46 -0
  146. package/dist/shared/model-resolution.js.map +1 -0
  147. package/dist/shared/parse-jsonc.d.ts +6 -0
  148. package/dist/shared/parse-jsonc.d.ts.map +1 -0
  149. package/dist/shared/parse-jsonc.js +14 -0
  150. package/dist/shared/parse-jsonc.js.map +1 -0
  151. package/package.json +42 -0
  152. package/skills/cancel-elder-loop.md +22 -0
  153. package/skills/cthulhu.md +45 -0
  154. package/skills/elder-loop.md +39 -0
  155. package/skills/exorcise-ai-slop.md +45 -0
  156. package/skills/invoke-shub.md +32 -0
  157. package/skills/old-ones-init.md +47 -0
  158. package/skills/session-handoff.md +57 -0
  159. package/skills/shoggoth.md +34 -0
  160. package/skills/yog-sothoth.md +30 -0
@@ -0,0 +1,61 @@
1
+ import type { BuiltinAgentName } from "../config/schema.js";
2
+ /** How an agent integrates with Claude Code */
3
+ export type AgentMode = "primary" | "subagent" | "all";
4
+ /** Metadata for building the Cthulhu orchestrator's dynamic prompt sections */
5
+ export interface AgentPromptMetadata {
6
+ /** Broad category for grouping in delegation tables */
7
+ category: "orchestration" | "exploration" | "advisor" | "utility";
8
+ /** Relative invocation cost */
9
+ cost: "FREE" | "CHEAP" | "MODERATE" | "EXPENSIVE";
10
+ /** Name displayed in delegation tables */
11
+ promptAlias: string;
12
+ /** One-liner trigger for when to fire this agent */
13
+ keyTrigger?: string;
14
+ /** Specific trigger scenarios */
15
+ triggers?: Array<{
16
+ domain: string;
17
+ trigger: string;
18
+ }>;
19
+ /** When to prefer this agent */
20
+ useWhen?: string[];
21
+ /** When to avoid this agent */
22
+ avoidWhen?: string[];
23
+ }
24
+ /** Full agent configuration registered with Claude Code */
25
+ export interface AgentConfig {
26
+ name: BuiltinAgentName | string;
27
+ description: string;
28
+ mode: AgentMode;
29
+ model: string;
30
+ temperature?: number;
31
+ maxTokens?: number;
32
+ prompt: string;
33
+ color?: string;
34
+ permission?: Record<string, "allow" | "deny">;
35
+ thinking?: {
36
+ type: "enabled" | "disabled";
37
+ budgetTokens?: number;
38
+ };
39
+ tools?: Record<string, boolean>;
40
+ skills?: string[];
41
+ }
42
+ /** Factory function signature for agents that need dynamic prompts */
43
+ export type AgentFactory = (model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[]) => AgentConfig;
44
+ export interface AvailableAgent {
45
+ name: string;
46
+ description: string;
47
+ metadata: AgentPromptMetadata;
48
+ }
49
+ export interface AvailableSkill {
50
+ name: string;
51
+ description: string;
52
+ }
53
+ export interface AvailableCategory {
54
+ name: string;
55
+ description: string;
56
+ }
57
+ export interface AvailableTool {
58
+ name: string;
59
+ description: string;
60
+ }
61
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,CAAA;AAEtD,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,QAAQ,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAA;IACjE,+BAA+B;IAC/B,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAA;IACjD,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAA;IACnB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrD,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAAA;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAA;IAC7C,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,sEAAsE;AACtE,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,mBAAmB,CAAC,EAAE,iBAAiB,EAAE,KACtC,WAAW,CAAA;AAEhB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,mBAAmB,CAAA;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { AgentConfig, AgentPromptMetadata } from "./types.js";
2
+ /**
3
+ * Yog-Sothoth — Architecture & Debugging Advisor
4
+ *
5
+ * Mapped from: Oracle
6
+ * Model tier: Opus with extended thinking
7
+ *
8
+ * "Yog-Sothoth knows the gate. Yog-Sothoth is the gate. Yog-Sothoth is the key
9
+ * and guardian of the gate." — All-knowing, all-seeing, the nexus of all planes.
10
+ * Consult when architecture decisions require elevated reasoning.
11
+ */
12
+ export declare const YOG_SOTHOTH_PROMPT_METADATA: AgentPromptMetadata;
13
+ export declare function createYogSothothAgent(model: string): AgentConfig;
14
+ export declare namespace createYogSothothAgent {
15
+ var mode: "subagent";
16
+ }
17
+ //# sourceMappingURL=yog-sothoth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yog-sothoth.d.ts","sourceRoot":"","sources":["../../src/agents/yog-sothoth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAa,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAI7E;;;;;;;;;GASG;AAEH,eAAO,MAAM,2BAA2B,EAAE,mBAwBzC,CAAA;AA+FD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAiBhE;yBAjBe,qBAAqB"}
@@ -0,0 +1,147 @@
1
+ const MODE = "subagent";
2
+ /**
3
+ * Yog-Sothoth — Architecture & Debugging Advisor
4
+ *
5
+ * Mapped from: Oracle
6
+ * Model tier: Opus with extended thinking
7
+ *
8
+ * "Yog-Sothoth knows the gate. Yog-Sothoth is the gate. Yog-Sothoth is the key
9
+ * and guardian of the gate." — All-knowing, all-seeing, the nexus of all planes.
10
+ * Consult when architecture decisions require elevated reasoning.
11
+ */
12
+ export const YOG_SOTHOTH_PROMPT_METADATA = {
13
+ category: "advisor",
14
+ cost: "EXPENSIVE",
15
+ promptAlias: "Yog-Sothoth",
16
+ triggers: [
17
+ { domain: "Architecture decisions", trigger: "Multi-system tradeoffs, unfamiliar patterns" },
18
+ { domain: "Self-review", trigger: "After completing significant implementation" },
19
+ { domain: "Hard debugging", trigger: "After 2+ failed fix attempts" },
20
+ ],
21
+ useWhen: [
22
+ "Complex architecture design",
23
+ "After completing significant work",
24
+ "2+ failed fix attempts",
25
+ "Unfamiliar code patterns",
26
+ "Security/performance concerns",
27
+ "Multi-system tradeoffs",
28
+ ],
29
+ avoidWhen: [
30
+ "Simple file operations (use direct tools)",
31
+ "First attempt at any fix (try yourself first)",
32
+ "Questions answerable from code you've read",
33
+ "Trivial decisions (variable names, formatting)",
34
+ "Things you can infer from existing code patterns",
35
+ ],
36
+ };
37
+ const YOG_SOTHOTH_PROMPT = `You are a strategic technical advisor with deep reasoning capabilities — the Key and the Gate to all architectural knowledge.
38
+
39
+ <context>
40
+ You function as an on-demand specialist invoked by the primary Cthulhu orchestrator when complex analysis or architectural decisions require elevated reasoning.
41
+ Each consultation is standalone, but follow-up questions via session continuation are supported — answer them efficiently without re-establishing context.
42
+ </context>
43
+
44
+ <expertise>
45
+ Your expertise covers:
46
+ - Dissecting codebases to understand structural patterns and design choices
47
+ - Formulating concrete, implementable technical recommendations
48
+ - Architecting solutions and mapping out refactoring roadmaps
49
+ - Resolving intricate technical questions through systematic reasoning
50
+ - Surfacing hidden issues and crafting preventive measures
51
+ </expertise>
52
+
53
+ <decision_framework>
54
+ Apply pragmatic minimalism in all recommendations:
55
+ - **Bias toward simplicity**: The right solution is typically the least complex one that fulfills the actual requirements. Resist hypothetical future needs.
56
+ - **Leverage what exists**: Favor modifications to current code, established patterns, and existing dependencies over introducing new components. New libraries, services, or infrastructure require explicit justification.
57
+ - **Prioritize developer experience**: Optimize for readability, maintainability, and reduced cognitive load. Theoretical performance gains or architectural purity matter less than practical usability.
58
+ - **One clear path**: Present a single primary recommendation. Mention alternatives only when they offer substantially different trade-offs worth considering.
59
+ - **Match depth to complexity**: Quick questions get quick answers. Reserve thorough analysis for genuinely complex problems or explicit requests for depth.
60
+ - **Signal the investment**: Tag recommendations with estimated effort — Quick(<1h), Short(1-4h), Medium(1-2d), or Large(3d+).
61
+ - **Know when to stop**: "Working well" beats "theoretically optimal." Identify what conditions would warrant revisiting.
62
+ </decision_framework>
63
+
64
+ <output_verbosity_spec>
65
+ Verbosity constraints (strictly enforced):
66
+ - **Bottom line**: 2-3 sentences maximum. No preamble.
67
+ - **Action plan**: ≤7 numbered steps. Each step ≤2 sentences.
68
+ - **Why this approach**: ≤4 bullets when included.
69
+ - **Watch out for**: ≤3 bullets when included.
70
+ - **Edge cases**: Only when genuinely applicable; ≤3 bullets.
71
+ - Do not rephrase the user's request unless it changes semantics.
72
+ - Avoid long narrative paragraphs; prefer compact bullets and short sections.
73
+ </output_verbosity_spec>
74
+
75
+ <response_structure>
76
+ Organize your final answer in three tiers:
77
+
78
+ **Essential** (always include):
79
+ - **Bottom line**: 2-3 sentences capturing your recommendation
80
+ - **Action plan**: Numbered steps or checklist for implementation
81
+ - **Effort estimate**: Quick/Short/Medium/Large
82
+
83
+ **Expanded** (include when relevant):
84
+ - **Why this approach**: Brief reasoning and key trade-offs
85
+ - **Watch out for**: Risks, edge cases, and mitigation strategies
86
+
87
+ **Edge cases** (only when genuinely applicable):
88
+ - **Escalation triggers**: Specific conditions that would justify a more complex solution
89
+ - **Alternative sketch**: High-level outline of the advanced path (not a full design)
90
+ </response_structure>
91
+
92
+ <uncertainty_and_ambiguity>
93
+ When facing uncertainty:
94
+ - If the question is ambiguous or underspecified: ask 1-2 precise clarifying questions, OR state your interpretation explicitly before answering: "Interpreting this as X..."
95
+ - Never fabricate exact figures, line numbers, file paths, or external references when uncertain.
96
+ - When unsure, use hedged language: "Based on the provided context…" not absolute claims.
97
+ - If multiple valid interpretations exist with similar effort, pick one and note the assumption.
98
+ - If interpretations differ significantly in effort (2x+), ask before proceeding.
99
+ </uncertainty_and_ambiguity>
100
+
101
+ <scope_discipline>
102
+ Stay within scope:
103
+ - Recommend ONLY what was asked. No extra features, no unsolicited improvements.
104
+ - If you notice other issues, list them separately as "Optional future considerations" at the end — max 2 items.
105
+ - Do NOT expand the problem surface area beyond the original request.
106
+ - If ambiguous, choose the simplest valid interpretation.
107
+ - NEVER suggest adding new dependencies or infrastructure unless explicitly asked.
108
+ </scope_discipline>
109
+
110
+ <tool_usage_rules>
111
+ Tool discipline:
112
+ - Exhaust provided context and attached files before reaching for tools.
113
+ - External lookups should fill genuine gaps, not satisfy curiosity.
114
+ - Parallelize independent reads (multiple files, searches) when possible.
115
+ - After using tools, briefly state what you found before proceeding.
116
+ </tool_usage_rules>
117
+
118
+ <high_risk_self_check>
119
+ Before finalizing answers on architecture, security, or performance:
120
+ - Re-scan your answer for unstated assumptions — make them explicit.
121
+ - Verify claims are grounded in provided code, not invented.
122
+ - Check for overly strong language ("always," "never," "guaranteed") and soften if not justified.
123
+ - Ensure action steps are concrete and immediately executable.
124
+ </high_risk_self_check>
125
+
126
+ <delivery>
127
+ Your response goes directly to the user with no intermediate processing. Make your final message self-contained: a clear recommendation they can act on immediately, covering both what to do and why. Dense and useful beats long and thorough.
128
+ </delivery>`;
129
+ export function createYogSothothAgent(model) {
130
+ return {
131
+ name: "yog-sothoth",
132
+ description: "Read-only consultation agent. The Key and Gate — all-knowing reasoning specialist for hard debugging and high-difficulty architecture design. Consult after 2+ failed fixes or for multi-system tradeoffs. (Yog-Sothoth — oh-my-claudecode)",
133
+ mode: MODE,
134
+ model,
135
+ temperature: 0.1,
136
+ thinking: { type: "enabled", budgetTokens: 32000 },
137
+ prompt: YOG_SOTHOTH_PROMPT,
138
+ color: "#9B59B6",
139
+ tools: {
140
+ Write: false,
141
+ Edit: false,
142
+ Agent: false,
143
+ },
144
+ };
145
+ }
146
+ createYogSothothAgent.mode = MODE;
147
+ //# sourceMappingURL=yog-sothoth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yog-sothoth.js","sourceRoot":"","sources":["../../src/agents/yog-sothoth.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAc,UAAU,CAAA;AAElC;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAwB;IAC9D,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,wBAAwB,EAAE,OAAO,EAAE,6CAA6C,EAAE;QAC5F,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,6CAA6C,EAAE;QACjF,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,8BAA8B,EAAE;KACtE;IACD,OAAO,EAAE;QACP,6BAA6B;QAC7B,mCAAmC;QACnC,wBAAwB;QACxB,0BAA0B;QAC1B,+BAA+B;QAC/B,wBAAwB;KACzB;IACD,SAAS,EAAE;QACT,2CAA2C;QAC3C,+CAA+C;QAC/C,4CAA4C;QAC5C,gDAAgD;QAChD,kDAAkD;KACnD;CACF,CAAA;AAED,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2Ff,CAAA;AAEZ,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,6OAA6O;QAC/O,IAAI,EAAE,IAAI;QACV,KAAK;QACL,WAAW,EAAE,GAAG;QAChB,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;QAClD,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE;YACL,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;SACb;KACF,CAAA;AACH,CAAC;AACD,qBAAqB,CAAC,IAAI,GAAG,IAAI,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function runDoctor(projectDirectory?: string): Promise<void>;
2
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAkCA,wBAAsB,SAAS,CAAC,gBAAgB,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsHvF"}
@@ -0,0 +1,105 @@
1
+ import * as fs from "fs";
2
+ import * as path from "path";
3
+ import { ALL_HOOK_DEFINITIONS } from "../hooks/index.js";
4
+ import { AGENT_METADATA_MAP } from "../agents/builtin-agents.js";
5
+ import { loadPluginConfig } from "../plugin-config.js";
6
+ const HOME = process.env.HOME ?? process.env.USERPROFILE ?? "";
7
+ const CLAUDE_DIR = path.join(HOME, ".claude");
8
+ const HOOKS_DIR = path.join(CLAUDE_DIR, "hooks");
9
+ const SKILLS_DIR = path.join(CLAUDE_DIR, "skills");
10
+ const SETTINGS_PATH = path.join(CLAUDE_DIR, "settings.json");
11
+ function check(name, condition, okMsg, failMsg) {
12
+ return {
13
+ name,
14
+ status: condition ? "ok" : "error",
15
+ message: condition ? okMsg : failMsg,
16
+ };
17
+ }
18
+ function warn(name, condition, okMsg, warnMsg) {
19
+ return {
20
+ name,
21
+ status: condition ? "ok" : "warn",
22
+ message: condition ? okMsg : warnMsg,
23
+ };
24
+ }
25
+ export async function runDoctor(projectDirectory = process.cwd()) {
26
+ console.log("\n╔══════════════════════════════════════════════════════╗");
27
+ console.log("║ oh-my-claudecode — Doctor Diagnostics ║");
28
+ console.log("╚══════════════════════════════════════════════════════╝\n");
29
+ const results = [];
30
+ // ── Check 1: ~/.claude directory ────────────────────────────────────────────
31
+ results.push(check("Claude directory", fs.existsSync(CLAUDE_DIR), `~/.claude exists`, `~/.claude not found — run: oh-my-claudecode install`));
32
+ // ── Check 2: settings.json ──────────────────────────────────────────────────
33
+ const settingsExists = fs.existsSync(SETTINGS_PATH);
34
+ results.push(check("settings.json", settingsExists, `settings.json found`, `settings.json not found — run: oh-my-claudecode install`));
35
+ // ── Check 3: Hook scripts installed ─────────────────────────────────────────
36
+ let hooksInstalled = 0;
37
+ for (const hook of ALL_HOOK_DEFINITIONS) {
38
+ const scriptName = path.basename(hook.scriptPath);
39
+ const scriptPath = path.join(HOOKS_DIR, scriptName);
40
+ if (fs.existsSync(scriptPath))
41
+ hooksInstalled++;
42
+ }
43
+ results.push(warn("Hook scripts", hooksInstalled === ALL_HOOK_DEFINITIONS.length, `All ${hooksInstalled} hook scripts installed`, `Only ${hooksInstalled}/${ALL_HOOK_DEFINITIONS.length} hook scripts found — run: oh-my-claudecode install`));
44
+ // ── Check 4: hooks registered in settings.json ──────────────────────────────
45
+ if (settingsExists) {
46
+ try {
47
+ const settings = JSON.parse(fs.readFileSync(SETTINGS_PATH, "utf-8"));
48
+ const hooksConfig = settings.hooks;
49
+ const hasHooks = hooksConfig && Object.keys(hooksConfig).length > 0;
50
+ results.push(warn("Hooks in settings.json", !!hasHooks, `Hooks registered in settings.json`, `No hooks found in settings.json — run: oh-my-claudecode install`));
51
+ }
52
+ catch {
53
+ results.push({ name: "Hooks in settings.json", status: "error", message: "Failed to parse settings.json" });
54
+ }
55
+ }
56
+ // ── Check 5: Skills installed ────────────────────────────────────────────────
57
+ const skillsInstalled = fs.existsSync(SKILLS_DIR)
58
+ ? fs.readdirSync(SKILLS_DIR).filter(f => f.endsWith(".md")).length
59
+ : 0;
60
+ results.push(warn("Skills", skillsInstalled > 0, `${skillsInstalled} skills installed in ~/.claude/skills/`, `No skills found in ~/.claude/skills/ — run: oh-my-claudecode install`));
61
+ // ── Check 6: Plugin config ───────────────────────────────────────────────────
62
+ const configPath = path.join(CLAUDE_DIR, "oh-my-claudecode.jsonc");
63
+ const altConfigPath = path.join(CLAUDE_DIR, "oh-my-claudecode.json");
64
+ const configExists = fs.existsSync(configPath) || fs.existsSync(altConfigPath);
65
+ results.push(warn("Plugin config", configExists, `Plugin config found`, `No plugin config found (~/.claude/oh-my-claudecode.jsonc) — run: oh-my-claudecode install`));
66
+ // ── Check 7: Validate config if it exists ───────────────────────────────────
67
+ if (configExists) {
68
+ try {
69
+ const config = loadPluginConfig(projectDirectory);
70
+ const agentCount = Object.keys(AGENT_METADATA_MAP).filter(n => !(config.disabled_agents ?? []).includes(n)).length;
71
+ results.push({ name: "Config validation", status: "ok", message: `Config valid — ${agentCount} agents enabled` });
72
+ }
73
+ catch (err) {
74
+ results.push({
75
+ name: "Config validation",
76
+ status: "error",
77
+ message: `Config invalid: ${String(err)}`,
78
+ });
79
+ }
80
+ }
81
+ // ── Print results ────────────────────────────────────────────────────────────
82
+ const icons = { ok: "✓", warn: "⚠", error: "✗" };
83
+ const colors = { ok: "\x1b[32m", warn: "\x1b[33m", error: "\x1b[31m" };
84
+ const reset = "\x1b[0m";
85
+ for (const result of results) {
86
+ const icon = icons[result.status];
87
+ const color = colors[result.status];
88
+ console.log(` ${color}${icon}${reset} ${result.name.padEnd(25)} ${result.message}`);
89
+ }
90
+ const errors = results.filter(r => r.status === "error").length;
91
+ const warnings = results.filter(r => r.status === "warn").length;
92
+ console.log();
93
+ if (errors === 0 && warnings === 0) {
94
+ console.log(" \x1b[32mAll checks passed. The Elder Gods are pleased.\x1b[0m");
95
+ }
96
+ else if (errors === 0) {
97
+ console.log(` \x1b[33m${warnings} warning(s). The stars are almost right.\x1b[0m`);
98
+ }
99
+ else {
100
+ console.log(` \x1b[31m${errors} error(s), ${warnings} warning(s). The Elder Gods are not satisfied.\x1b[0m`);
101
+ console.log(" Run: oh-my-claudecode install");
102
+ }
103
+ console.log();
104
+ }
105
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;AAC9D,MAAM,UAAU,GAAG,IAAI,CAAC,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G,EAAE,CAAA;IACb,IAAI,MAAM,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAA;IAChF,CAAC;SAAM,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,aAAa,QAAQ,iDAAiD,CAAC,CAAA;IACrF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,cAAc,QAAQ,uDAAuD,CAAC,CAAA;QAC7G,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;IAChD,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAA;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import { Command } from "commander";
2
+ import * as path from "path";
3
+ import { fileURLToPath } from "url";
4
+ import { runInstall } from "./install.js";
5
+ import { runDoctor } from "./doctor.js";
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+ const PACKAGE_ROOT = path.resolve(__dirname, "../..");
9
+ const program = new Command();
10
+ program
11
+ .name("oh-my-claudecode")
12
+ .description("Elder Gods agentic harness for Claude Code")
13
+ .version("0.1.0");
14
+ program
15
+ .command("install")
16
+ .description("Interactive setup wizard — installs hooks, skills, and config")
17
+ .option("--no-tui", "Non-interactive mode (accept all defaults)")
18
+ .action(async (options) => {
19
+ await runInstall({
20
+ noTui: options.noTui,
21
+ packageRoot: PACKAGE_ROOT,
22
+ });
23
+ });
24
+ program
25
+ .command("doctor")
26
+ .description("Health diagnostics — verify installation is complete")
27
+ .argument("[directory]", "Project directory to check", process.cwd())
28
+ .action(async (directory) => {
29
+ await runDoctor(directory);
30
+ });
31
+ program
32
+ .command("list-agents")
33
+ .description("List all available Elder God agents")
34
+ .action(async () => {
35
+ const { AGENT_METADATA_MAP } = await import("../agents/builtin-agents.js");
36
+ const { DEFAULT_AGENT_MODELS } = await import("../shared/model-resolution.js");
37
+ console.log("\n╔══════════════════════════════════════════╗");
38
+ console.log("║ Elder God Agent Roster ║");
39
+ console.log("╚══════════════════════════════════════════╝\n");
40
+ const rows = Object.entries(AGENT_METADATA_MAP).map(([name, meta]) => ({
41
+ name,
42
+ alias: meta.promptAlias,
43
+ model: DEFAULT_AGENT_MODELS[name] ?? "sonnet",
44
+ cost: meta.cost,
45
+ category: meta.category,
46
+ }));
47
+ for (const row of rows) {
48
+ console.log(` ${row.alias.padEnd(20)} ${row.name.padEnd(20)} ${row.model.padEnd(25)} [${row.cost}]`);
49
+ }
50
+ console.log();
51
+ });
52
+ program.parse();
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;AAC1C,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAErD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;AAE7B,OAAO;KACJ,IAAI,CAAC,kBAAkB,CAAC;KACxB,WAAW,CAAC,4CAA4C,CAAC;KAC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AAoB,CAAC,IAAI,CAAC,IAAI,QAAQ;QAC7C,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC,CAAC,CAAA;IAEH,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;IACvG,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAA;AACf,CAAC,CAAC,CAAA;AAEJ,OAAO,CAAC,KAAK,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare function runInstall(options: {
2
+ noTui?: boolean;
3
+ packageRoot: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AA6HA,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6EhB"}
@@ -0,0 +1,179 @@
1
+ import * as fs from "fs";
2
+ import * as path from "path";
3
+ import * as readline from "readline";
4
+ import { ALL_HOOK_DEFINITIONS } from "../hooks/index.js";
5
+ const HOME = process.env.HOME ?? process.env.USERPROFILE ?? "";
6
+ const CLAUDE_DIR = path.join(HOME, ".claude");
7
+ const HOOKS_DIR = path.join(CLAUDE_DIR, "hooks");
8
+ const SKILLS_DIR = path.join(CLAUDE_DIR, "skills");
9
+ const SETTINGS_PATH = path.join(CLAUDE_DIR, "settings.json");
10
+ function ensureDir(dir) {
11
+ if (!fs.existsSync(dir)) {
12
+ fs.mkdirSync(dir, { recursive: true });
13
+ }
14
+ }
15
+ function ask(rl, question) {
16
+ return new Promise(resolve => rl.question(question, resolve));
17
+ }
18
+ /** Load existing settings.json or return empty object */
19
+ function loadSettings() {
20
+ if (!fs.existsSync(SETTINGS_PATH))
21
+ return {};
22
+ try {
23
+ return JSON.parse(fs.readFileSync(SETTINGS_PATH, "utf-8"));
24
+ }
25
+ catch {
26
+ return {};
27
+ }
28
+ }
29
+ /** Save settings.json atomically with backup */
30
+ function saveSettings(settings) {
31
+ if (fs.existsSync(SETTINGS_PATH)) {
32
+ const backup = SETTINGS_PATH + `.bak.${Date.now()}`;
33
+ fs.copyFileSync(SETTINGS_PATH, backup);
34
+ console.log(` Backed up existing settings to ${backup}`);
35
+ }
36
+ fs.writeFileSync(SETTINGS_PATH, JSON.stringify(settings, null, 2), "utf-8");
37
+ }
38
+ /** Install hook shell scripts */
39
+ function installHooks(disabled) {
40
+ ensureDir(HOOKS_DIR);
41
+ for (const hook of ALL_HOOK_DEFINITIONS) {
42
+ if (disabled.has(hook.name))
43
+ continue;
44
+ const scriptPath = path.join(HOOKS_DIR, path.basename(hook.scriptPath.replace("~/.claude/hooks/", "")));
45
+ fs.writeFileSync(scriptPath, hook.scriptContent, { mode: 0o755 });
46
+ console.log(` Installed hook: ${hook.name} → ${scriptPath}`);
47
+ }
48
+ }
49
+ /** Register hooks in settings.json */
50
+ function registerHooksInSettings(settings, disabled) {
51
+ const hooks = settings.hooks ?? {};
52
+ for (const hook of ALL_HOOK_DEFINITIONS) {
53
+ if (disabled.has(hook.name))
54
+ continue;
55
+ const event = hook.event;
56
+ if (!hooks[event])
57
+ hooks[event] = [];
58
+ // Avoid duplicate entries
59
+ const existingCommands = hooks[event]
60
+ .flatMap(h => h.hooks?.map(hh => hh.command) ?? []);
61
+ const scriptName = path.basename(hook.scriptPath);
62
+ if (!existingCommands.some(cmd => cmd?.includes(scriptName))) {
63
+ ;
64
+ hooks[event].push(hook.config);
65
+ console.log(` Registered ${event} hook: ${hook.name}`);
66
+ }
67
+ else {
68
+ console.log(` Hook already registered: ${hook.name}`);
69
+ }
70
+ }
71
+ settings.hooks = hooks;
72
+ }
73
+ /** Install skill files from the package */
74
+ function installSkills(packageRoot, disabled) {
75
+ ensureDir(SKILLS_DIR);
76
+ const skillsSourceDir = path.join(packageRoot, "skills");
77
+ if (!fs.existsSync(skillsSourceDir)) {
78
+ console.log(" No skills directory found in package — skipping");
79
+ return;
80
+ }
81
+ const skillFiles = fs.readdirSync(skillsSourceDir).filter(f => f.endsWith(".md"));
82
+ for (const file of skillFiles) {
83
+ const skillName = path.basename(file, ".md");
84
+ if (disabled.has(skillName)) {
85
+ console.log(` Skipping disabled skill: ${skillName}`);
86
+ continue;
87
+ }
88
+ const src = path.join(skillsSourceDir, file);
89
+ const dest = path.join(SKILLS_DIR, file);
90
+ fs.copyFileSync(src, dest);
91
+ console.log(` Installed skill: ${skillName} → ${dest}`);
92
+ }
93
+ }
94
+ /** Create initial config file if none exists */
95
+ function createInitialConfig(configPath) {
96
+ if (fs.existsSync(configPath)) {
97
+ console.log(` Config already exists: ${configPath}`);
98
+ return;
99
+ }
100
+ const initialConfig = {
101
+ $schema: "https://raw.githubusercontent.com/oh-my-claudecode/oh-my-claudecode/main/schema.json",
102
+ // Agent overrides (uncomment to customize)
103
+ // agents: {
104
+ // cthulhu: { model: "opus" },
105
+ // shoggoth: { model: "haiku" }
106
+ // },
107
+ // Disable agents you don't need:
108
+ // disabled_agents: ["nyarlathotep", "the-deep-one"],
109
+ // Disable hooks:
110
+ // disabled_hooks: ["comment-checker"],
111
+ };
112
+ fs.writeFileSync(configPath, JSON.stringify(initialConfig, null, 2), "utf-8");
113
+ console.log(` Created config: ${configPath}`);
114
+ }
115
+ export async function runInstall(options) {
116
+ const { noTui = false, packageRoot } = options;
117
+ console.log("\n╔══════════════════════════════════════════════════════╗");
118
+ console.log("║ oh-my-claudecode — Elder Gods Arise ║");
119
+ console.log("║ Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn ║");
120
+ console.log("╚══════════════════════════════════════════════════════╝\n");
121
+ ensureDir(CLAUDE_DIR);
122
+ let disabledHooks = new Set();
123
+ let disabledSkills = new Set();
124
+ if (!noTui) {
125
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
126
+ console.log("The Elder Gods shall be configured for your codebase.\n");
127
+ const hookAnswer = await ask(rl, "Enable all lifecycle hooks? [Y/n] ");
128
+ if (hookAnswer.toLowerCase() === "n") {
129
+ console.log("\nAvailable hooks:");
130
+ ALL_HOOK_DEFINITIONS.forEach((h, i) => {
131
+ console.log(` ${i + 1}. ${h.name} (${h.event})`);
132
+ });
133
+ const disableAnswer = await ask(rl, "Enter hook numbers to disable (comma-separated), or press Enter to keep all: ");
134
+ if (disableAnswer.trim()) {
135
+ const indices = disableAnswer.split(",").map(s => parseInt(s.trim(), 10) - 1);
136
+ for (const i of indices) {
137
+ if (ALL_HOOK_DEFINITIONS[i]) {
138
+ disabledHooks.add(ALL_HOOK_DEFINITIONS[i].name);
139
+ }
140
+ }
141
+ }
142
+ }
143
+ const skillAnswer = await ask(rl, "\nInstall all skills (slash commands)? [Y/n] ");
144
+ if (skillAnswer.toLowerCase() === "n") {
145
+ disabledSkills = new Set(["all"]);
146
+ }
147
+ rl.close();
148
+ console.log();
149
+ }
150
+ console.log("Installing oh-my-claudecode...\n");
151
+ // Install hook scripts
152
+ console.log("► Hooks:");
153
+ installHooks(disabledHooks);
154
+ // Update settings.json
155
+ console.log("\n► Settings:");
156
+ const settings = loadSettings();
157
+ registerHooksInSettings(settings, disabledHooks);
158
+ saveSettings(settings);
159
+ console.log(` Saved settings to ${SETTINGS_PATH}`);
160
+ // Install skills
161
+ if (!disabledSkills.has("all")) {
162
+ console.log("\n► Skills:");
163
+ installSkills(packageRoot, disabledSkills);
164
+ }
165
+ // Create config
166
+ console.log("\n► Config:");
167
+ const configPath = path.join(CLAUDE_DIR, "oh-my-claudecode.jsonc");
168
+ createInitialConfig(configPath);
169
+ console.log("\n╔══════════════════════════════════════════════════════╗");
170
+ console.log("║ Installation Complete! ║");
171
+ console.log("║ ║");
172
+ console.log("║ The Elder Gods now watch over your codebase. ║");
173
+ console.log("║ Cthulhu orchestrates. Shoggoth searches. ║");
174
+ console.log("║ Yog-Sothoth knows. R'lyeh has risen. ║");
175
+ console.log("╚══════════════════════════════════════════════════════╝");
176
+ console.log(`\nConfig: ${path.join(CLAUDE_DIR, "oh-my-claudecode.jsonc")}`);
177
+ console.log("Run: claude (and invoke /cthulhu to start)\n");
178
+ }
179
+ //# sourceMappingURL=install.js.map