Similarity Calculator Architecture

Analyze component similarity calculator architecture, registration order, and execution flow.

3|Updated Jan 31, 2025
One-click install
npx skills add https://github.com/Cantara/lib-electronic-components --skill similarity-calculator-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Similarity Calculator Architecture
Source: https://github.com/Cantara/lib-electronic-components/tree/main/.claude/skills/similarity-calculator-architecture
Command: npx skills add https://github.com/Cantara/lib-electronic-components --skill similarity-calculator-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a deep dive into the architecture and behavior of the component similarity calculator system, helping users understand how component similarities are determined, debug issues, and contribute new calculators.

Core Features & Use Cases

  • Calculator Registration & Execution: Explains the "first-applicable-wins" strategy and the order of calculator execution.
  • Debugging Common Bugs: Details the "OpAmp IC Interception Bug" and how to prevent similar issues.
  • Calculator Interfaces: Describes the SimilarityCalculator and ComponentSimilarityCalculator interfaces.
  • Use Case: If two electronic components are not being recognized as similar, or are being incorrectly matched, this skill can help diagnose why by examining the calculator order and specific calculator logic.

Quick Start

Explain the calculator registration order and the "first-applicable-wins" rule.

Frequently Asked Questions about Similarity Calculator Architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the component similarity calculator registration order work?

Component similarity calculator registration uses a first-applicable-wins strategy, executing calculators in a defined order until one matches. This architecture ensures predictable similarity calculations for electronic components.

Why are my electronic components being incorrectly matched as similar?

Incorrect component matching often stems from type interception bugs, such as the OpAmp IC Interception Bug. Examining the calculator execution flow and specific calculator logic helps diagnose why components are incorrectly matched.

How do I debug a similarity calculator that fails to recognize matching electronic components?

Debug unrecognized component similarities by examining the calculator registration order and the implementations of the SimilarityCalculator and ComponentSimilarityCalculator interfaces to identify execution flow issues.

What is the difference between the SimilarityCalculator and ComponentSimilarityCalculator interfaces?

The SimilarityCalculator and ComponentSimilarityCalculator interfaces define the architecture for component similarity calculations. Understanding their implementations is crucial for debugging execution flow and developing new calculators following best practices.

What is the OpAmp IC Interception Bug in component similarity calculations?

The OpAmp IC Interception Bug is a common type interception pattern in component similarity calculations where a calculator incorrectly intercepts a specific component type. Preventing it requires careful examination of calculator registration order.

How do I develop a new component similarity calculator without causing interception bugs?

Develop new component similarity calculators by following best practices for the SimilarityCalculator and ComponentSimilarityCalculator interfaces, ensuring proper registration order to prevent type interception bugs like the OpAmp IC issue.