This repository hosts a knowledge and rule framework designed to empower AI models (like Gemini) with the specialized expertise required for comprehensive hardware design reviews. The goal is to provide a structured, machine-readable, and human-readable set of resources that enable an AI to analyze and identify potential issues in hardware designs, including schematics and PCB layouts.
The framework is built upon three core components:
- Ontology (
ontology/ontology.json): A machine-readable JSON file that defines a rich set of rules, domains, severity levels, and failure modes for hardware design. This forms the core of the AI's knowledge base. - Knowledge Base (
docs/AI_Hardware_Design_Review_KnowledgeBase.md): A human-readable Markdown file that provides detailed explanations, appendices, and context for the rules defined in the ontology. - Examples (
examples/examples.json): A collection of practical examples, both good and bad, that map to the rules in the ontology. These can be used for training, testing, and validating the AI's understanding of the rules.
The name pays homage to J.J. Thomson, who discovered the electron in 1897 through his experiments with cathode rays at the Cavendish Laboratory in Cambridge, England. He demonstrated that cathode rays were composed of negatively charged particles much smaller than atoms, which he called "corpuscles" (later renamed electrons). He won the Nobel Prize in Physics in 1906 for this discovery.
Just as Thomson revealed the fundamental building blocks of electrical circuits, this project aims to uncover the fundamental issues in hardware designs—catching the small problems that can have big consequences.
The initial development phase of this project is complete. All tasks outlined in the TODO.md file have been implemented, resulting in a comprehensive and well-structured framework for AI-assisted hardware design review.
The repository is organized as follows:
README.md: This file, providing an overview of the project.LICENSE: The project's license.CONTRIBUTING.md: Guidelines for contributing to the project.TODO.md: The completed task list for the initial development phase.ontology/ontology.json: The core machine-readable ontology of hardware design rules.examples/examples.json: A set of example hardware design scenarios for training and testing.docs/AI_Hardware_Design_Review_KnowledgeBase.md: A detailed, human-readable knowledge base.docs/Multi_Agent_Reasoning_Spec.md: A specification for a conceptual multi-agent reasoning architecture.tests/ontology_schema.json: A JSON schema for validatingontology/ontology.json.tests/examples_schema.json: A JSON schema for validatingexamples/examples.json.validate_json.py: A Python script for validating the JSON files against their schemas.gen_context.sh: A bash script to generate the review instructions file.review_instructions.txt: Pre-generated file containing the complete knowledge base and AI instructions. Ready to use immediately.
This framework serves two types of users:
- Design Reviewers: Engineers who want to review their circuit designs using AI
- Contributors: Developers who want to extend the knowledge base with new rules
If you just want to review your hardware design, you don't need to clone or run anything.
- Download
review_instructions.txtfrom this repository (it's pre-generated and always up-to-date). - Go to https://gemini.google.com/ (or another AI with file upload support).
- Upload two things:
- The
review_instructions.txtfile - Your design files (schematic images, PCB layout screenshots, etc.)
- The
- Type:
Please begin the review.
The AI will perform a pre-review assessment, ask for any missing information (datasheets, component values, stackup details), and then provide a comprehensive review with specific rule references.
If you want to extend the knowledge base or customize the rules:
git clone <repository-url>
cd ThomsonLintpip install jsonschema # if not installed
python validate_json.py- Modify the JSON files: Add new entries to
ontology/ontology.jsonorexamples/examples.jsonfollowing the existing structure. - Update the knowledge base: If necessary, add new sections to
docs/AI_Hardware_Design_Review_KnowledgeBase.md. - Validate your changes: Run
python validate_json.py. - Regenerate the review file:
./gen_context.sh > review_instructions.txt
- Open https://gemini.google.com/ (or Claude, ChatGPT, etc.).
- Upload
review_instructions.txtalong with your design files (schematic images, PCB layout images). - Type:
Please begin the review.
The AI will analyze your files and ask for missing information:
- Datasheets for critical ICs
- Component ratings (inductor saturation current, fuse ratings, etc.)
- PCB stackup details
Provide these details via copy-paste or direct answers.
The AI will output a list of potential issues, each citing a specific rule_id from the knowledge base.
While the initial development is complete, the framework is designed for continuous improvement. Future work could include:
- Expanding the ontology with even more specialized rules.
- Adding more complex and nuanced examples.
- Integrating the framework with actual AI models and hardware design tools.