As this project's AI coding tool, you must follow the additional conventions below, in addition to the built-in functions.
Engineering tools for internal use.
TODO
- Python
- Environment:
uv - Lint:
ruff - Test:
pytest - Type checking:
ty - Build:
hatchling
- Environment:
- Matlab
- Lint:
checkcode - Test:
runtests
- Lint:
- KLayout
- pcell: use python not ruby
- Python
- Install:
uv syncfrom pyproject.toml - Lint:
uvx ruff check [path] --fix --extend-select I,B,SIM,C4,ISC,PIE && uvx ruff format [path] - Test:
uv run pytest - Type check:
uvx ty check [path]
- Install:
- Matlab
- Test: `matlab -batch "runtests('tests')"
- Never run
git checkout(destructive) - Never use unicode in code (breaks Python on Windows)
- Plan first, share plan, get explicit approval before implementing
- Never assume a good plan means you should implement it
- If unsure or stuck, ask the user
- If something fails, do not silently move on - ask for clarification
- If
uvfails due to permissions, consult user
- Run tests after changes; all tests must pass before task is complete
- Prefer tests over manual verification
- Use type hints and docstrings for all functions
- Keep files under 300 LOC; split if longer
- Fix all linter issues
- Single source of truth for defaults (e.g. config.py)
- Use enums instead of bare strings
- Never use
params.get('key', default)pattern - Never use
if config then value else defaultpattern
- Delete old interfaces; no legacy wrappers or thin compatibility layers
- No emojis in code or docs
- No excessive bold in markdown; use styling selectively
- No "last updated" dates or authorship
- Commands on single line, not split across lines
- Read project-specific docs and datasheets before making suggestions
- Use exact part numbers, not generic equivalents
- Prioritize safety over convenience; err on side of caution
- For python, include
addcopyfighandlerfor easy matplotlib copy/paste