diff --git a/plugins/code-oz/.claude-plugin/plugin.json b/plugins/code-oz/.claude-plugin/plugin.json index 20faea5..a306f47 100644 --- a/plugins/code-oz/.claude-plugin/plugin.json +++ b/plugins/code-oz/.claude-plugin/plugin.json @@ -12,6 +12,5 @@ "./commands/code-oz-init.md", "./commands/code-oz-doctor.md", "./commands/code-oz-resume.md" - ], - "hooks": "./hooks/hooks.json" + ] } diff --git a/tests/plugins/manifest-shape.test.ts b/tests/plugins/manifest-shape.test.ts index 757d261..c132f30 100644 --- a/tests/plugins/manifest-shape.test.ts +++ b/tests/plugins/manifest-shape.test.ts @@ -42,7 +42,11 @@ describe('plugins/code-oz manifest shape', () => { expect(plugin.name).toBe('code-oz') expect(typeof plugin.description).toBe('string') expect((plugin.description as string).length).toBeGreaterThan(0) - expect(plugin.hooks).toBe('./hooks/hooks.json') + // The standard hooks/hooks.json auto-loads. Declaring it in manifest.hooks + // makes Claude Code load it twice and the plugin fails to load entirely + // ("Duplicate hooks file detected"). manifest.hooks must reference only + // ADDITIONAL hook files, so the code-oz plugin must not set it. + expect(plugin.hooks).toBeUndefined() expect(Array.isArray(plugin.commands)).toBe(true) expect(plugin.commands).toEqual(EXPECTED_COMMANDS) })