coding-skill
스타15
포크3
업데이트2026년 4월 7일 07:51
Python Coding Standards & Best Practices for Spec2RTL-Agent & EDA Development
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SKILL.md
readonly메뉴
Python Coding Standards & Best Practices for Spec2RTL-Agent & EDA Development
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | coding_skill |
| description | Python Coding Standards & Best Practices for Spec2RTL-Agent & EDA Development |
This document outlines the mandatory coding standards, architectural principles, and EDA-specific development practices for the Antigravity AI agent. Adherence to these guidelines is non-negotiable to ensure maximum modularity, readability, and maintainability of the hardware generation pipeline.
black (with an 88-character line limit) and ruff for linting.typing module). This is critical for EDA tools where data types (e.g., AST nodes, binary strings, file paths) frequently cross boundaries.
def parse_verilog_ast(filepath: Path) -> Dict[str, Any]:def parse_verilog(filepath):Args:, Returns:, and Raises: sections explicitly.pathlib.Path for file system operations instead of os.path. EDA tools involve heavy file manipulation (RTL files, GDSII, logs, TCL scripts); pathlib ensures cross-platform reliability.ProgressiveCoder writes code; Verifier tests code; LibrelaneRunner executes CLI).abc module to define interfaces for swappable components.
class BaseLLM(ABC): must define abstract methods like generate(). OpenAILLM and LocalOllamaLLM will inherit and implement this.class BaseHLSCompiler(ABC): must define synthesize().pydantic models) rather than using global variables or deeply nested dictionaries.pydantic-settings).subprocess module with explicit timeout arguments to prevent hanging processes.stdout and stderr streams independently.process.returncode == 0). If a tool fails, wrap the standard error in a custom Python exception.builds/run_YYYYMMDD_HHMMSS/).pycparser or tree-sitter) over complex Regex if possible. If Regex must be used, compile the patterns globally and comment them extensively.LibrelaneManager.generate_tcl() method twice with the same inputs must yield the exact same file hash.openai or anthropic directly into functional logic. Use an intermediary wrapper layer (like litellm or a custom proxy class) so the backend can route to local or cloud models interchangeably..jinja2 or .txt) in a dedicated prompts/ directory. Load and inject variables at runtime.pydantic before passing it to the next EDA stage.Spec2RTLError(Exception) (Base)LLMRateLimitError(Spec2RTLError)HLSSynthesisFailedError(Spec2RTLError)PhysicalDesignRoutingError(Spec2RTLError)logging module. Console logs should be readable for the user (INFO level), but file logs must be highly detailed (DEBUG level), including raw LLM prompts, tool CLI arguments, and execution times.ReflectionAgent for debugging.pytest.unittest.mock to mock tool return codes, API responses, and file outputs.