Filter out null, undefined, or malformed entries in installed_plugins.json before accessing properties. Prevents fatal crash on corrupted data. Addresses cubic-dev-ai review feedback.
Extract plugin component loading into dedicated modules: - discovery.ts: plugin directory detection - plugin-path-resolver.ts: path resolution logic - agent-loader.ts, command-loader.ts, hook-loader.ts - mcp-server-loader.ts, skill-loader.ts