olympus-ai 3.2.3 → 3.3.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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/__tests__/ascent-checkpoint.test.d.ts +2 -0
- package/dist/__tests__/ascent-checkpoint.test.d.ts.map +1 -0
- package/dist/__tests__/ascent-checkpoint.test.js +261 -0
- package/dist/__tests__/ascent-checkpoint.test.js.map +1 -0
- package/dist/__tests__/config-ascent.test.d.ts +2 -0
- package/dist/__tests__/config-ascent.test.d.ts.map +1 -0
- package/dist/__tests__/config-ascent.test.js +134 -0
- package/dist/__tests__/config-ascent.test.js.map +1 -0
- package/dist/__tests__/hook-blocking.test.d.ts +8 -0
- package/dist/__tests__/hook-blocking.test.d.ts.map +1 -0
- package/dist/__tests__/hook-blocking.test.js +277 -0
- package/dist/__tests__/hook-blocking.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +1 -1
- package/dist/__tests__/metrics-cli.test.d.ts +5 -0
- package/dist/__tests__/metrics-cli.test.d.ts.map +1 -0
- package/dist/__tests__/metrics-cli.test.js +24 -0
- package/dist/__tests__/metrics-cli.test.js.map +1 -0
- package/dist/__tests__/skill-auto-detection.test.d.ts +2 -0
- package/dist/__tests__/skill-auto-detection.test.d.ts.map +1 -0
- package/dist/__tests__/skill-auto-detection.test.js +255 -0
- package/dist/__tests__/skill-auto-detection.test.js.map +1 -0
- package/dist/__tests__/token-estimator.test.d.ts +5 -0
- package/dist/__tests__/token-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/token-estimator.test.js +192 -0
- package/dist/__tests__/token-estimator.test.js.map +1 -0
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +83 -1
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/document-writer.d.ts.map +1 -1
- package/dist/agents/document-writer.js +38 -0
- package/dist/agents/document-writer.js.map +1 -1
- package/dist/agents/frontend-engineer.d.ts.map +1 -1
- package/dist/agents/frontend-engineer.js +16 -0
- package/dist/agents/frontend-engineer.js.map +1 -1
- package/dist/agents/olympian.d.ts.map +1 -1
- package/dist/agents/olympian.js +15 -0
- package/dist/agents/olympian.js.map +1 -1
- package/dist/cli/commands/metrics.d.ts +31 -0
- package/dist/cli/commands/metrics.d.ts.map +1 -0
- package/dist/cli/commands/metrics.js +266 -0
- package/dist/cli/commands/metrics.js.map +1 -0
- package/dist/cli/index.js +39 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +16 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/features/ascent-checkpoint/index.d.ts +48 -0
- package/dist/features/ascent-checkpoint/index.d.ts.map +1 -0
- package/dist/features/ascent-checkpoint/index.js +144 -0
- package/dist/features/ascent-checkpoint/index.js.map +1 -0
- package/dist/features/hook-logging/index.d.ts +37 -0
- package/dist/features/hook-logging/index.d.ts.map +1 -0
- package/dist/features/hook-logging/index.js +120 -0
- package/dist/features/hook-logging/index.js.map +1 -0
- package/dist/features/hook-logging/index.test.d.ts +5 -0
- package/dist/features/hook-logging/index.test.d.ts.map +1 -0
- package/dist/features/hook-logging/index.test.js +268 -0
- package/dist/features/hook-logging/index.test.js.map +1 -0
- package/dist/features/index.d.ts +3 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +8 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/magic-keywords.d.ts +51 -0
- package/dist/features/magic-keywords.d.ts.map +1 -1
- package/dist/features/magic-keywords.js +172 -0
- package/dist/features/magic-keywords.js.map +1 -1
- package/dist/features/session-state/index.d.ts +50 -0
- package/dist/features/session-state/index.d.ts.map +1 -0
- package/dist/features/session-state/index.js +64 -0
- package/dist/features/session-state/index.js.map +1 -0
- package/dist/features/session-state/index.test.d.ts +5 -0
- package/dist/features/session-state/index.test.d.ts.map +1 -0
- package/dist/features/session-state/index.test.js +221 -0
- package/dist/features/session-state/index.test.js.map +1 -0
- package/dist/features/token-metrics/index.d.ts +6 -0
- package/dist/features/token-metrics/index.d.ts.map +1 -0
- package/dist/features/token-metrics/index.js +5 -0
- package/dist/features/token-metrics/index.js.map +1 -0
- package/dist/features/token-metrics/storage.d.ts +16 -0
- package/dist/features/token-metrics/storage.d.ts.map +1 -0
- package/dist/features/token-metrics/storage.js +144 -0
- package/dist/features/token-metrics/storage.js.map +1 -0
- package/dist/features/token-metrics/token-estimator.d.ts +66 -0
- package/dist/features/token-metrics/token-estimator.d.ts.map +1 -0
- package/dist/features/token-metrics/token-estimator.js +230 -0
- package/dist/features/token-metrics/token-estimator.js.map +1 -0
- package/dist/features/token-metrics/types.d.ts +63 -0
- package/dist/features/token-metrics/types.d.ts.map +1 -0
- package/dist/features/token-metrics/types.js +5 -0
- package/dist/features/token-metrics/types.js.map +1 -0
- package/dist/hooks/olympus-orchestrator/constants.d.ts +2 -0
- package/dist/hooks/olympus-orchestrator/constants.d.ts.map +1 -1
- package/dist/hooks/olympus-orchestrator/constants.js +41 -0
- package/dist/hooks/olympus-orchestrator/constants.js.map +1 -1
- package/dist/hooks/olympus-orchestrator/index.d.ts +10 -1
- package/dist/hooks/olympus-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/olympus-orchestrator/index.js +108 -14
- package/dist/hooks/olympus-orchestrator/index.js.map +1 -1
- package/dist/hooks/registrations/index.d.ts +2 -1
- package/dist/hooks/registrations/index.d.ts.map +1 -1
- package/dist/hooks/registrations/index.js +3 -1
- package/dist/hooks/registrations/index.js.map +1 -1
- package/dist/hooks/registrations/token-metrics.d.ts +11 -0
- package/dist/hooks/registrations/token-metrics.d.ts.map +1 -0
- package/dist/hooks/registrations/token-metrics.js +119 -0
- package/dist/hooks/registrations/token-metrics.js.map +1 -0
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +334 -9
- package/dist/installer/index.js.map +1 -1
- package/dist/shared/types.d.ts +16 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/scripts/.olympus/token-metrics.jsonl +1 -0
- package/scripts/dist/hooks/olympus-hooks.cjs +127 -128
- package/scripts/esbuild.hooks.mjs +1 -1
- package/.claude/CLAUDE.md +0 -66
- package/scripts/generate-logo-hybrid-v2.mjs +0 -213
- package/scripts/generate-logo-hybrid.mjs +0 -209
- package/scripts/generate-logo-infinity.mjs +0 -239
- package/scripts/generate-logo-mythology.mjs +0 -190
- package/scripts/generate-logo-orchestration.mjs +0 -228
- package/scripts/generate-logo-recraft.mjs +0 -147
- package/scripts/generate-logo-simple.mjs +0 -154
- package/scripts/generate-logo.mjs +0 -117
|
@@ -11,6 +11,7 @@ import { registerPreToolUseHooks } from './pre-tool-use.js';
|
|
|
11
11
|
import { registerPostToolUseHooks } from './post-tool-use.js';
|
|
12
12
|
import { registerPostToolUseFailureHooks } from './post-tool-use-failure.js';
|
|
13
13
|
import { registerNotificationHooks } from './notification.js';
|
|
14
|
+
import { registerTokenMetricsHooks } from './token-metrics.js';
|
|
14
15
|
/**
|
|
15
16
|
* Register all hooks with the router.
|
|
16
17
|
* Safe to call multiple times (idempotent).
|
|
@@ -21,5 +22,5 @@ export declare function registerAllHooks(): void;
|
|
|
21
22
|
* Primarily used for testing.
|
|
22
23
|
*/
|
|
23
24
|
export declare function resetRegistration(): void;
|
|
24
|
-
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerPostToolUseFailureHooks, registerNotificationHooks, };
|
|
25
|
+
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerPostToolUseFailureHooks, registerNotificationHooks, registerTokenMetricsHooks, };
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAK/D;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAgBvC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAGD,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { registerPreToolUseHooks } from './pre-tool-use.js';
|
|
|
11
11
|
import { registerPostToolUseHooks } from './post-tool-use.js';
|
|
12
12
|
import { registerPostToolUseFailureHooks } from './post-tool-use-failure.js';
|
|
13
13
|
import { registerNotificationHooks } from './notification.js';
|
|
14
|
+
import { registerTokenMetricsHooks } from './token-metrics.js';
|
|
14
15
|
/** Flag to prevent double registration */
|
|
15
16
|
let registered = false;
|
|
16
17
|
/**
|
|
@@ -29,6 +30,7 @@ export function registerAllHooks() {
|
|
|
29
30
|
registerPostToolUseHooks();
|
|
30
31
|
registerPostToolUseFailureHooks();
|
|
31
32
|
registerNotificationHooks();
|
|
33
|
+
registerTokenMetricsHooks();
|
|
32
34
|
registered = true;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
@@ -39,5 +41,5 @@ export function resetRegistration() {
|
|
|
39
41
|
registered = false;
|
|
40
42
|
}
|
|
41
43
|
// Re-export individual registration functions for selective use
|
|
42
|
-
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerPostToolUseFailureHooks, registerNotificationHooks, };
|
|
44
|
+
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerPostToolUseFailureHooks, registerNotificationHooks, registerTokenMetricsHooks, };
|
|
43
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/registrations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA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yB,GAC1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Metrics Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Captures token usage metrics from Claude Code events.
|
|
5
|
+
* Tracks prompts and tool executions for usage analysis.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Register token metrics hooks
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerTokenMetricsHooks(): void;
|
|
11
|
+
//# sourceMappingURL=token-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-metrics.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/token-metrics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2CH;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CA+EhD"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Metrics Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Captures token usage metrics from Claude Code events.
|
|
5
|
+
* Tracks prompts and tool executions for usage analysis.
|
|
6
|
+
*/
|
|
7
|
+
import { registerHook } from '../registry.js';
|
|
8
|
+
import { logTokenMetric } from '../../features/token-metrics/storage.js';
|
|
9
|
+
import { estimateTokens, estimateTokensFromToolOutput } from '../../features/token-metrics/token-estimator.js';
|
|
10
|
+
/**
|
|
11
|
+
* Extract prompt text from various input formats
|
|
12
|
+
*/
|
|
13
|
+
function getPromptText(ctx) {
|
|
14
|
+
if (ctx.prompt) {
|
|
15
|
+
return ctx.prompt;
|
|
16
|
+
}
|
|
17
|
+
if (ctx.message?.content) {
|
|
18
|
+
return ctx.message.content;
|
|
19
|
+
}
|
|
20
|
+
if (ctx.parts) {
|
|
21
|
+
return ctx.parts
|
|
22
|
+
.filter(p => p.type === 'text' && p.text)
|
|
23
|
+
.map(p => p.text)
|
|
24
|
+
.join(' ');
|
|
25
|
+
}
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extract model identifier from context
|
|
30
|
+
*/
|
|
31
|
+
function getModelIdentifier(ctx) {
|
|
32
|
+
if (ctx.message?.model) {
|
|
33
|
+
const { providerId, modelId } = ctx.message.model;
|
|
34
|
+
if (providerId && modelId) {
|
|
35
|
+
return `${providerId}/${modelId}`;
|
|
36
|
+
}
|
|
37
|
+
if (modelId) {
|
|
38
|
+
return modelId;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Register token metrics hooks
|
|
45
|
+
*/
|
|
46
|
+
export function registerTokenMetricsHooks() {
|
|
47
|
+
// Hook 1: Capture user prompt submissions
|
|
48
|
+
registerHook({
|
|
49
|
+
name: 'tokenMetricsPrompt',
|
|
50
|
+
event: 'UserPromptSubmit',
|
|
51
|
+
priority: 110, // Low priority - passive capture, run after other hooks
|
|
52
|
+
handler: async (ctx) => {
|
|
53
|
+
try {
|
|
54
|
+
const promptText = getPromptText(ctx);
|
|
55
|
+
// Estimate input tokens (will be 0 if empty)
|
|
56
|
+
const inputTokens = promptText ? await estimateTokens(promptText) : 0;
|
|
57
|
+
const model = getModelIdentifier(ctx);
|
|
58
|
+
// Create metrics entry
|
|
59
|
+
const entry = {
|
|
60
|
+
timestamp: new Date().toISOString(),
|
|
61
|
+
session_id: ctx.sessionId || 'unknown',
|
|
62
|
+
event_type: 'prompt',
|
|
63
|
+
input_tokens: inputTokens,
|
|
64
|
+
model,
|
|
65
|
+
project_path: ctx.directory,
|
|
66
|
+
};
|
|
67
|
+
// Log to storage (fire-and-forget) - always log for complete session tracking
|
|
68
|
+
logTokenMetric(entry, ctx.directory).catch(err => {
|
|
69
|
+
// Silent failure - metrics should never block execution
|
|
70
|
+
console.error('[Olympus Token Metrics] Failed to log prompt metric:', err);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
// Silent failure - metrics should never break hooks
|
|
75
|
+
console.error('[Olympus Token Metrics] Error in prompt handler:', error);
|
|
76
|
+
}
|
|
77
|
+
return { continue: true };
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
// Hook 2: Capture tool executions
|
|
81
|
+
registerHook({
|
|
82
|
+
name: 'tokenMetricsToolUse',
|
|
83
|
+
event: 'PostToolUse',
|
|
84
|
+
priority: 70, // Lower priority - passive capture
|
|
85
|
+
handler: async (ctx) => {
|
|
86
|
+
try {
|
|
87
|
+
if (!ctx.toolName) {
|
|
88
|
+
return { continue: true };
|
|
89
|
+
}
|
|
90
|
+
// Estimate output tokens from tool result
|
|
91
|
+
const outputTokens = ctx.toolOutput
|
|
92
|
+
? await estimateTokensFromToolOutput(ctx.toolOutput)
|
|
93
|
+
: 0;
|
|
94
|
+
const model = getModelIdentifier(ctx);
|
|
95
|
+
// Create metrics entry
|
|
96
|
+
const entry = {
|
|
97
|
+
timestamp: new Date().toISOString(),
|
|
98
|
+
session_id: ctx.sessionId || 'unknown',
|
|
99
|
+
event_type: 'tool_use',
|
|
100
|
+
output_tokens: outputTokens,
|
|
101
|
+
model,
|
|
102
|
+
tool_name: ctx.toolName,
|
|
103
|
+
project_path: ctx.directory,
|
|
104
|
+
};
|
|
105
|
+
// Log to storage (fire-and-forget)
|
|
106
|
+
logTokenMetric(entry, ctx.directory).catch(err => {
|
|
107
|
+
// Silent failure - metrics should never block execution
|
|
108
|
+
console.error('[Olympus Token Metrics] Failed to log tool metric:', err);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
// Silent failure - metrics should never break hooks
|
|
113
|
+
console.error('[Olympus Token Metrics] Error in tool use handler:', error);
|
|
114
|
+
}
|
|
115
|
+
return { continue: true };
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=token-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-metrics.js","sourceRoot":"","sources":["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
25
|
export declare const VERSION_FILE: string;
|
|
26
26
|
/** Current version - MUST match package.json */
|
|
27
|
-
export declare const VERSION = "3.
|
|
27
|
+
export declare const VERSION = "3.3.0";
|
|
28
28
|
/** Installation result */
|
|
29
29
|
export interface InstallResult {
|
|
30
30
|
success: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAsBH,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAC5D,eAAO,MAAM,UAAU,QAAoC,CAAC;AAC5D,eAAO,MAAM,YAAY,QAAsC,CAAC;AAChE,eAAO,MAAM,UAAU,QAAoC,CAAC;AAC5D,eAAO,MAAM,SAAS,QAAmC,CAAC;AAC1D,eAAO,MAAM,aAAa,QAA2C,CAAC;AACtE,eAAO,MAAM,YAAY,QAAmD,CAAC;AAE7E,gDAAgD;AAChD,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,0BAA0B;AAC1B,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,2BAA2B;AAC3B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAA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A;CAAE,CAOxF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAQ3C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAm0CpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAu7BtD,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,2qWA6Q7B,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAyB7C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAyYnE;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAehG"}
|
package/dist/installer/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export const HOOKS_DIR = join(CLAUDE_CONFIG_DIR, 'hooks');
|
|
|
33
33
|
export const SETTINGS_FILE = join(CLAUDE_CONFIG_DIR, 'settings.json');
|
|
34
34
|
export const VERSION_FILE = join(CLAUDE_CONFIG_DIR, '.olympus-version.json');
|
|
35
35
|
/** Current version - MUST match package.json */
|
|
36
|
-
export const VERSION = '3.
|
|
36
|
+
export const VERSION = '3.3.0';
|
|
37
37
|
/**
|
|
38
38
|
* Check if the current Node.js version meets the minimum requirement
|
|
39
39
|
*/
|
|
@@ -773,6 +773,12 @@ BLOCKED ACTIONS (will fail if attempted):
|
|
|
773
773
|
- Any agent spawning: BLOCKED
|
|
774
774
|
|
|
775
775
|
You work ALONE. No delegation. No background tasks. Execute directly.
|
|
776
|
+
|
|
777
|
+
CRITICAL PATH RULES:
|
|
778
|
+
- NEVER use absolute paths (C:\\\\..., /Users/...) in Write, Edit, or Bash directory creation
|
|
779
|
+
- ALWAYS use relative paths from project root (e.g., "src/features/", ".olympus/")
|
|
780
|
+
- Before creating files/directories, verify path does NOT contain drive letters or home directory markers
|
|
781
|
+
- If you accidentally create malformed directories (CUsers..., C:...), DELETE them immediately
|
|
776
782
|
</Critical_Constraints>
|
|
777
783
|
|
|
778
784
|
<Work_Context>
|
|
@@ -1264,6 +1270,12 @@ BLOCKED ACTIONS (will fail if attempted):
|
|
|
1264
1270
|
- Any agent spawning: BLOCKED
|
|
1265
1271
|
|
|
1266
1272
|
You work ALONE. No delegation. Execute directly with careful reasoning.
|
|
1273
|
+
|
|
1274
|
+
CRITICAL PATH RULES:
|
|
1275
|
+
- NEVER use absolute paths (C:\\\\..., /Users/...) in Write, Edit, or Bash directory creation
|
|
1276
|
+
- ALWAYS use relative paths from project root (e.g., "src/features/", ".olympus/")
|
|
1277
|
+
- Before creating files/directories, verify path does NOT contain drive letters or home directory markers
|
|
1278
|
+
- If you accidentally create malformed directories (CUsers..., C:...), DELETE them immediately
|
|
1267
1279
|
</Critical_Constraints>
|
|
1268
1280
|
|
|
1269
1281
|
<Todo_Discipline>
|
|
@@ -1292,6 +1304,11 @@ Execute tasks directly. NEVER delegate.
|
|
|
1292
1304
|
|
|
1293
1305
|
<Constraints>
|
|
1294
1306
|
BLOCKED: Task tool, agent spawning
|
|
1307
|
+
|
|
1308
|
+
CRITICAL PATH RULES:
|
|
1309
|
+
- NEVER use absolute paths (C:\\\\..., /Users/...) in Write, Edit, or Bash directory creation
|
|
1310
|
+
- ALWAYS use relative paths from project root
|
|
1311
|
+
- If you create malformed directories (CUsers..., C:...), DELETE them immediately
|
|
1295
1312
|
Keep it simple - if task seems complex, escalate to olympian or olympian-high.
|
|
1296
1313
|
</Constraints>`,
|
|
1297
1314
|
// Librarian variants (default is sonnet)
|
|
@@ -1893,16 +1910,20 @@ I will check for available updates to Olympus.
|
|
|
1893
1910
|
|
|
1894
1911
|
### Update Methods
|
|
1895
1912
|
|
|
1896
|
-
**
|
|
1897
|
-
Run the install script to update:
|
|
1913
|
+
**npm (Recommended):**
|
|
1898
1914
|
\`\`\`bash
|
|
1899
|
-
|
|
1915
|
+
npm update -g olympus-ai
|
|
1916
|
+
olympus-ai install --force
|
|
1900
1917
|
\`\`\`
|
|
1901
1918
|
|
|
1902
|
-
**
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1919
|
+
**Alternative (install script):**
|
|
1920
|
+
\`\`\`bash
|
|
1921
|
+
# macOS/Linux
|
|
1922
|
+
curl -fsSL https://raw.githubusercontent.com/mikev10/olympus/main/scripts/install.sh | bash
|
|
1923
|
+
|
|
1924
|
+
# Windows (PowerShell)
|
|
1925
|
+
irm https://raw.githubusercontent.com/mikev10/olympus/main/scripts/install.ps1 | iex
|
|
1926
|
+
\`\`\`
|
|
1906
1927
|
|
|
1907
1928
|
### Version Info Location
|
|
1908
1929
|
|
|
@@ -2011,7 +2032,311 @@ If NOT COMPLETED:
|
|
|
2011
2032
|
|
|
2012
2033
|
---
|
|
2013
2034
|
|
|
2014
|
-
**Remember: Summon the gods of code. Verify everything. Trust nothing without evidence
|
|
2035
|
+
**Remember: Summon the gods of code. Verify everything. Trust nothing without evidence.**`,
|
|
2036
|
+
'doctor.md': `---
|
|
2037
|
+
description: Diagnose and fix olympus installation issues
|
|
2038
|
+
---
|
|
2039
|
+
|
|
2040
|
+
$ARGUMENTS
|
|
2041
|
+
|
|
2042
|
+
## Task: Run Installation Diagnostics
|
|
2043
|
+
|
|
2044
|
+
You are the Olympus Doctor - diagnose and fix installation issues.
|
|
2045
|
+
|
|
2046
|
+
### Step 1: Check Plugin Version
|
|
2047
|
+
|
|
2048
|
+
\`\`\`bash
|
|
2049
|
+
# Get installed version
|
|
2050
|
+
INSTALLED=$(ls ~/.claude/plugins/cache/olympus/olympus/ 2>/dev/null | sort -V | tail -1)
|
|
2051
|
+
echo "Installed: $INSTALLED"
|
|
2052
|
+
|
|
2053
|
+
# Get latest from npm
|
|
2054
|
+
LATEST=$(npm view olympus version 2>/dev/null)
|
|
2055
|
+
echo "Latest: $LATEST"
|
|
2056
|
+
\`\`\`
|
|
2057
|
+
|
|
2058
|
+
**Diagnosis**:
|
|
2059
|
+
- If no version installed: CRITICAL - plugin not installed
|
|
2060
|
+
- If INSTALLED != LATEST: WARN - outdated plugin
|
|
2061
|
+
- If multiple versions exist: WARN - stale cache
|
|
2062
|
+
|
|
2063
|
+
### Step 2: Check for Legacy Hooks in settings.json
|
|
2064
|
+
|
|
2065
|
+
Read \`~/.claude/settings.json\` and check if there's a \`"hooks"\` key with entries like:
|
|
2066
|
+
- \`bash $HOME/.claude/hooks/keyword-detector.sh\`
|
|
2067
|
+
- \`bash $HOME/.claude/hooks/persistent-mode.sh\`
|
|
2068
|
+
- \`bash $HOME/.claude/hooks/session-start.sh\`
|
|
2069
|
+
|
|
2070
|
+
**Diagnosis**:
|
|
2071
|
+
- If found: CRITICAL - legacy hooks causing duplicates
|
|
2072
|
+
|
|
2073
|
+
### Step 3: Check for Legacy Bash Hook Scripts
|
|
2074
|
+
|
|
2075
|
+
\`\`\`bash
|
|
2076
|
+
ls -la ~/.claude/hooks/*.sh 2>/dev/null
|
|
2077
|
+
\`\`\`
|
|
2078
|
+
|
|
2079
|
+
**Diagnosis**:
|
|
2080
|
+
- If \`keyword-detector.sh\`, \`persistent-mode.sh\`, \`session-start.sh\`, or \`stop-continuation.sh\` exist: WARN - legacy scripts (can cause confusion)
|
|
2081
|
+
|
|
2082
|
+
### Step 4: Check CLAUDE.md
|
|
2083
|
+
|
|
2084
|
+
\`\`\`bash
|
|
2085
|
+
# Check if CLAUDE.md exists
|
|
2086
|
+
ls -la ~/.claude/CLAUDE.md 2>/dev/null
|
|
2087
|
+
|
|
2088
|
+
# Check for Olympus marker
|
|
2089
|
+
grep -q "Olympus Multi-Agent System" ~/.claude/CLAUDE.md 2>/dev/null && echo "Has Olympus config" || echo "Missing Olympus config"
|
|
2090
|
+
\`\`\`
|
|
2091
|
+
|
|
2092
|
+
**Diagnosis**:
|
|
2093
|
+
- If missing: CRITICAL - CLAUDE.md not configured
|
|
2094
|
+
- If missing Olympus marker: WARN - outdated CLAUDE.md
|
|
2095
|
+
|
|
2096
|
+
### Step 5: Check for Stale Plugin Cache
|
|
2097
|
+
|
|
2098
|
+
\`\`\`bash
|
|
2099
|
+
# Count versions in cache
|
|
2100
|
+
ls ~/.claude/plugins/cache/olympus/olympus/ 2>/dev/null | wc -l
|
|
2101
|
+
\`\`\`
|
|
2102
|
+
|
|
2103
|
+
**Diagnosis**:
|
|
2104
|
+
- If > 1 version: WARN - multiple cached versions (cleanup recommended)
|
|
2105
|
+
|
|
2106
|
+
### Step 6: Check for Legacy Curl-Installed Content
|
|
2107
|
+
|
|
2108
|
+
Check for legacy agents, commands, and skills installed via curl (before plugin system):
|
|
2109
|
+
|
|
2110
|
+
\`\`\`bash
|
|
2111
|
+
# Check for legacy agents directory
|
|
2112
|
+
ls -la ~/.claude/agents/ 2>/dev/null
|
|
2113
|
+
|
|
2114
|
+
# Check for legacy commands directory
|
|
2115
|
+
ls -la ~/.claude/commands/ 2>/dev/null
|
|
2116
|
+
|
|
2117
|
+
# Check for legacy skills directory
|
|
2118
|
+
ls -la ~/.claude/skills/ 2>/dev/null
|
|
2119
|
+
\`\`\`
|
|
2120
|
+
|
|
2121
|
+
**Diagnosis**:
|
|
2122
|
+
- If \`~/.claude/agents/\` exists with olympus-related files: WARN - legacy agents (now provided by plugin)
|
|
2123
|
+
- If \`~/.claude/commands/\` exists with olympus-related files: WARN - legacy commands (now provided by plugin)
|
|
2124
|
+
- If \`~/.claude/skills/\` exists with olympus-related files: WARN - legacy skills (now provided by plugin)
|
|
2125
|
+
|
|
2126
|
+
Look for files like:
|
|
2127
|
+
- \`oracle.md\`, \`librarian.md\`, \`explore.md\`, \`olympian.md\`, etc. in agents/
|
|
2128
|
+
- \`ultrawork.md\`, \`olympus-default.md\`, \`deepsearch.md\`, etc. in commands/
|
|
2129
|
+
- Any olympus-related \`.md\` files in skills/
|
|
2130
|
+
|
|
2131
|
+
---
|
|
2132
|
+
|
|
2133
|
+
## Report Format
|
|
2134
|
+
|
|
2135
|
+
After running all checks, output a report:
|
|
2136
|
+
|
|
2137
|
+
\`\`\`
|
|
2138
|
+
## Olympus Doctor Report
|
|
2139
|
+
|
|
2140
|
+
### Summary
|
|
2141
|
+
[HEALTHY / ISSUES FOUND]
|
|
2142
|
+
|
|
2143
|
+
### Checks
|
|
2144
|
+
|
|
2145
|
+
| Check | Status | Details |
|
|
2146
|
+
|-------|--------|---------|
|
|
2147
|
+
| Plugin Version | OK/WARN/CRITICAL | ... |
|
|
2148
|
+
| Legacy Hooks (settings.json) | OK/CRITICAL | ... |
|
|
2149
|
+
| Legacy Scripts (~/.claude/hooks/) | OK/WARN | ... |
|
|
2150
|
+
| CLAUDE.md | OK/WARN/CRITICAL | ... |
|
|
2151
|
+
| Plugin Cache | OK/WARN | ... |
|
|
2152
|
+
| Legacy Agents (~/.claude/agents/) | OK/WARN | ... |
|
|
2153
|
+
| Legacy Commands (~/.claude/commands/) | OK/WARN | ... |
|
|
2154
|
+
| Legacy Skills (~/.claude/skills/) | OK/WARN | ... |
|
|
2155
|
+
|
|
2156
|
+
### Issues Found
|
|
2157
|
+
1. [Issue description]
|
|
2158
|
+
2. [Issue description]
|
|
2159
|
+
|
|
2160
|
+
### Recommended Fixes
|
|
2161
|
+
[List fixes based on issues]
|
|
2162
|
+
\`\`\`
|
|
2163
|
+
|
|
2164
|
+
---
|
|
2165
|
+
|
|
2166
|
+
## Auto-Fix (if user confirms)
|
|
2167
|
+
|
|
2168
|
+
If issues found, ask user: "Would you like me to fix these issues automatically?"
|
|
2169
|
+
|
|
2170
|
+
If yes, apply fixes:
|
|
2171
|
+
|
|
2172
|
+
### Fix: Legacy Hooks in settings.json
|
|
2173
|
+
Remove the \`"hooks"\` section from \`~/.claude/settings.json\` (keep other settings intact)
|
|
2174
|
+
|
|
2175
|
+
### Fix: Legacy Bash Scripts
|
|
2176
|
+
\`\`\`bash
|
|
2177
|
+
rm -f ~/.claude/hooks/keyword-detector.sh
|
|
2178
|
+
rm -f ~/.claude/hooks/persistent-mode.sh
|
|
2179
|
+
rm -f ~/.claude/hooks/session-start.sh
|
|
2180
|
+
rm -f ~/.claude/hooks/stop-continuation.sh
|
|
2181
|
+
\`\`\`
|
|
2182
|
+
|
|
2183
|
+
### Fix: Outdated Plugin
|
|
2184
|
+
\`\`\`bash
|
|
2185
|
+
rm -rf ~/.claude/plugins/cache/olympus
|
|
2186
|
+
echo "Plugin cache cleared. Restart Claude Code to fetch latest version."
|
|
2187
|
+
\`\`\`
|
|
2188
|
+
|
|
2189
|
+
### Fix: Stale Cache (multiple versions)
|
|
2190
|
+
\`\`\`bash
|
|
2191
|
+
# Keep only latest version
|
|
2192
|
+
cd ~/.claude/plugins/cache/olympus/olympus/
|
|
2193
|
+
ls | sort -V | head -n -1 | xargs rm -rf
|
|
2194
|
+
\`\`\`
|
|
2195
|
+
|
|
2196
|
+
### Fix: Missing/Outdated CLAUDE.md
|
|
2197
|
+
Fetch latest from GitHub and write to \`~/.claude/CLAUDE.md\`:
|
|
2198
|
+
\`\`\`
|
|
2199
|
+
WebFetch(url: "https://raw.githubusercontent.com/mikev10/olympus/main/docs/CLAUDE.md", prompt: "Return the complete raw markdown content exactly as-is")
|
|
2200
|
+
\`\`\`
|
|
2201
|
+
|
|
2202
|
+
### Fix: Legacy Curl-Installed Content
|
|
2203
|
+
|
|
2204
|
+
Remove legacy agents, commands, and skills directories (now provided by plugin):
|
|
2205
|
+
|
|
2206
|
+
\`\`\`bash
|
|
2207
|
+
# Backup first (optional - ask user)
|
|
2208
|
+
# mv ~/.claude/agents ~/.claude/agents.bak
|
|
2209
|
+
# mv ~/.claude/commands ~/.claude/commands.bak
|
|
2210
|
+
# mv ~/.claude/skills ~/.claude/skills.bak
|
|
2211
|
+
|
|
2212
|
+
# Or remove directly
|
|
2213
|
+
rm -rf ~/.claude/agents
|
|
2214
|
+
rm -rf ~/.claude/commands
|
|
2215
|
+
rm -rf ~/.claude/skills
|
|
2216
|
+
\`\`\`
|
|
2217
|
+
|
|
2218
|
+
**Note**: Only remove if these contain olympus-related files. If user has custom agents/commands/skills, warn them and ask before removing.
|
|
2219
|
+
|
|
2220
|
+
---
|
|
2221
|
+
|
|
2222
|
+
## Post-Fix
|
|
2223
|
+
|
|
2224
|
+
After applying fixes, inform user:
|
|
2225
|
+
> Fixes applied. **Restart Claude Code** for changes to take effect.`,
|
|
2226
|
+
'deepinit.md': `---
|
|
2227
|
+
description: Index full codebase recursively with hierarchical AGENTS.md files
|
|
2228
|
+
---
|
|
2229
|
+
|
|
2230
|
+
Target: $ARGUMENTS
|
|
2231
|
+
|
|
2232
|
+
## Argument Parsing
|
|
2233
|
+
|
|
2234
|
+
Parse the arguments for flags and path:
|
|
2235
|
+
- \`--update\` or \`-u\`: Update mode only (skip directories without existing AGENTS.md)
|
|
2236
|
+
- \`--dry-run\`: Show what would be created without writing files
|
|
2237
|
+
- \`[path]\`: Target directory (defaults to current directory if not specified)
|
|
2238
|
+
|
|
2239
|
+
Examples:
|
|
2240
|
+
- \`/deepinit\` → Initialize current directory
|
|
2241
|
+
- \`/deepinit ./src\` → Initialize ./src directory
|
|
2242
|
+
- \`/deepinit --update\` → Update existing AGENTS.md files only
|
|
2243
|
+
- \`/deepinit ./src --update\` → Update existing AGENTS.md in ./src
|
|
2244
|
+
|
|
2245
|
+
## Deep Initialization Task
|
|
2246
|
+
|
|
2247
|
+
You are performing a **deep codebase initialization** - creating hierarchical AGENTS.md files that document every directory in the project.
|
|
2248
|
+
|
|
2249
|
+
### What This Does
|
|
2250
|
+
|
|
2251
|
+
1. **Recursively Analyzes** every directory in the codebase
|
|
2252
|
+
2. **Creates AGENTS.md** files that describe each directory's purpose and contents
|
|
2253
|
+
3. **Hierarchical Tagging** - lower-level files reference their parent AGENTS.md
|
|
2254
|
+
4. **Smart Updates** - if AGENTS.md exists, compares and merges changes
|
|
2255
|
+
|
|
2256
|
+
### Execution Strategy
|
|
2257
|
+
|
|
2258
|
+
Use **parallel exploration** with the explore agent to analyze directories, then use **olympian** agents to create the AGENTS.md files.
|
|
2259
|
+
|
|
2260
|
+
#### Phase 1: Discovery
|
|
2261
|
+
|
|
2262
|
+
\`\`\`
|
|
2263
|
+
Task(subagent_type="olympus:explore", prompt="Map the directory structure of this codebase. List all directories recursively (excluding node_modules, .git, dist, build, __pycache__, .venv). Return as a tree structure.")
|
|
2264
|
+
\`\`\`
|
|
2265
|
+
|
|
2266
|
+
#### Phase 2: Hierarchical Generation
|
|
2267
|
+
|
|
2268
|
+
Start from the root and work down:
|
|
2269
|
+
|
|
2270
|
+
1. **Root Level First** - Create \`/AGENTS.md\` for the entire project
|
|
2271
|
+
2. **First-Level Directories** - Create \`src/AGENTS.md\`, \`lib/AGENTS.md\`, etc.
|
|
2272
|
+
3. **Deeper Levels** - Continue recursively, each referencing parent
|
|
2273
|
+
|
|
2274
|
+
#### Phase 3: Content Generation Per Directory
|
|
2275
|
+
|
|
2276
|
+
For each directory, the AGENTS.md should contain:
|
|
2277
|
+
|
|
2278
|
+
\`\`\`markdown
|
|
2279
|
+
<!-- Parent: ../AGENTS.md -->
|
|
2280
|
+
# {Directory Name}
|
|
2281
|
+
|
|
2282
|
+
## Purpose
|
|
2283
|
+
[What this directory contains and its role in the project]
|
|
2284
|
+
|
|
2285
|
+
## Key Files
|
|
2286
|
+
- \`file1.ts\` - [description]
|
|
2287
|
+
- \`file2.ts\` - [description]
|
|
2288
|
+
|
|
2289
|
+
## Subdirectories
|
|
2290
|
+
- \`subdir1/\` - [brief purpose, see subdir1/AGENTS.md]
|
|
2291
|
+
- \`subdir2/\` - [brief purpose, see subdir2/AGENTS.md]
|
|
2292
|
+
|
|
2293
|
+
## For AI Agents
|
|
2294
|
+
[Special instructions for AI agents working in this directory]
|
|
2295
|
+
|
|
2296
|
+
## Dependencies
|
|
2297
|
+
[Key dependencies or relationships with other parts of the codebase]
|
|
2298
|
+
\`\`\`
|
|
2299
|
+
|
|
2300
|
+
#### Phase 4: Compare and Update (if exists)
|
|
2301
|
+
|
|
2302
|
+
If an AGENTS.md already exists:
|
|
2303
|
+
1. Read the existing file
|
|
2304
|
+
2. Compare with the new analysis
|
|
2305
|
+
3. Preserve any manual annotations (look for \`<!-- MANUAL -->\` tags)
|
|
2306
|
+
4. Merge new discoveries while keeping existing documentation
|
|
2307
|
+
5. Update outdated information
|
|
2308
|
+
|
|
2309
|
+
**Update Mode (\`--update\` flag)**:
|
|
2310
|
+
When \`--update\` is specified in arguments:
|
|
2311
|
+
- **Only process directories that already have AGENTS.md**
|
|
2312
|
+
- Skip directories without existing documentation
|
|
2313
|
+
- Focus on refreshing existing docs rather than creating new ones
|
|
2314
|
+
- Use this for maintaining documentation as codebase evolves
|
|
2315
|
+
|
|
2316
|
+
**Dry Run Mode (\`--dry-run\` flag)**:
|
|
2317
|
+
When \`--dry-run\` is specified:
|
|
2318
|
+
- List all directories that would be processed
|
|
2319
|
+
- Show which files would be created/updated
|
|
2320
|
+
- Do NOT write any files
|
|
2321
|
+
- Report summary of planned changes
|
|
2322
|
+
|
|
2323
|
+
### Parallelization Strategy
|
|
2324
|
+
|
|
2325
|
+
- **Batch Processing**: Process directories at the same level in parallel
|
|
2326
|
+
- **Level Order**: Complete one level before starting the next (ensures parent references exist)
|
|
2327
|
+
- **Use Multiple Agents**: Spawn olympian agents for parallel file creation
|
|
2328
|
+
|
|
2329
|
+
### Quality Checks
|
|
2330
|
+
|
|
2331
|
+
After generation:
|
|
2332
|
+
- [ ] Every non-empty directory has an AGENTS.md
|
|
2333
|
+
- [ ] Parent references are correct (\`<!-- Parent: ../AGENTS.md -->\`)
|
|
2334
|
+
- [ ] File descriptions are accurate
|
|
2335
|
+
- [ ] No broken references to subdirectories
|
|
2336
|
+
|
|
2337
|
+
### Begin Execution
|
|
2338
|
+
|
|
2339
|
+
Start now. Create a todo list tracking each directory, then systematically generate AGENTS.md files from root to leaves.`
|
|
2015
2340
|
};
|
|
2016
2341
|
// SKILL_DEFINITIONS removed - skills are now only in COMMAND_DEFINITIONS to avoid duplicates
|
|
2017
2342
|
// Skills are installed to ~/.claude/commands/<skill>/skill.md
|