Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: remove duplicate hooks declaration from plugin.json

Affaan Mustafae3a1306369b6
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 3186376bf..68d80fde1 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -38,6 +38,5 @@
"./agents/refactor-cleaner.md",
"./agents/security-reviewer.md",
"./agents/tdd-guide.md"
- ],
- "hooks": "./hooks/hooks.json"
+ ]
}
diff --git a/tests/hooks/hooks.test.js b/tests/hooks/hooks.test.js
index e629a2678..2ed292ad9 100644
--- a/tests/hooks/hooks.test.js
+++ b/tests/hooks/hooks.test.js
@@ -325,6 +325,22 @@ async function runTests() {
}
})) passed++; else failed++;
+ // plugin.json validation
+ console.log('\nplugin.json Validation:');
+
+ if (test('plugin.json does NOT have explicit hooks declaration', () => {
+ // Claude Code automatically loads hooks/hooks.json by convention.
+ // Explicitly declaring it in plugin.json causes a duplicate detection error.
+ // See: https://github.com/affaan-m/everything-claude-code/issues/103
+ const pluginPath = path.join(__dirname, '..', '..', '.claude-plugin', 'plugin.json');
+ const plugin = JSON.parse(fs.readFileSync(pluginPath, 'utf8'));
+
+ assert.ok(
+ !plugin.hooks,
+ 'plugin.json should NOT have "hooks" field - Claude Code auto-loads hooks/hooks.json'
+ );
+ })) passed++; else failed++;
+
// Summary
console.log('\n=== Test Results ===');
console.log(`Passed: ${passed}`);