This repository keeps AI project policy in .claude/. Treat .claude/ as the
authoritative source of truth; this file is only the Codex entrypoint.
Before making code changes, reviewing code, committing changes, or working across layers:
- Read
.claude/CLAUDE.md - Read all relevant files in
.claude/rules/ - Follow
.claude/skills/*/SKILL.mdwhen the task matches a repository-local workflow - Follow the installed
pypto-developerorpypto-userplugin skill when the task matches a shared workflow
Task mapping:
- Testing:
.claude/skills/testing/SKILL.md - Code review:
.claude/skills/code-review/SKILL.md - Codegen comparison:
.claude/skills/compare-codegen/SKILL.md - Shared Git, PR, issue, and branch workflows:
pypto-developerplugin - Shared IR trace and in-core profiling workflows:
pypto-userplugin
Portable skills are published from hw-native-sys/pypto-skills; they are not
vendored into this repository. Install the plugins needed for the current
agent and scenario.
Codex:
codex plugin marketplace add hw-native-sys/pypto-skills
codex plugin add pypto-developer@pypto-skills
codex plugin add pypto-user@pypto-skillsClaude Code:
claude plugin marketplace add hw-native-sys/pypto-skills
claude plugin install pypto-developer@pypto-skills
claude plugin install pypto-user@pypto-skillsWhen a Claude skill or agent refers to Task, a subagent, or Claude-only
plugins:
- Execute the workflow directly in Codex
- Use parallel tool calls when safe
- Treat
.claude/agents/*/AGENT.mdas checklists, not as a separate runtime
- Use modern language standards: Python 3.10+ and C++17+
- Keep public API changes synchronized across
include/pypto/,src/,python/bindings/, andpython/pypto/pypto_core/*.pyi - Update docs when behavior changes. English docs in
docs/en/dev/are the ground truth; keepdocs/zh/dev/aligned when English docs change - Follow
.claude/rules/documentation.mdfor markdown file placement; do not create markdown files outsidedocs/unless that rule explicitly allows it - Do not create temporary test scripts or examples outside
tests/andexamples/ - Build and test from the current worktree. Never copy
.sofiles or other build artifacts from another checkout - Treat
.env,secrets/, credentials, and machine-specific absolute paths as off-limits unless the user explicitly requires them - Never add AI co-author lines to commits or PR text
For full testing details, follow .claude/skills/testing/SKILL.md.
# Install dev dependencies
pip install -e ".[dev]"
# Optional test env
[ -f .claude/skills/testing/testing.env ] && . .claude/skills/testing/testing.env
# Configure and build
[ ! -f build/CMakeCache.txt ] && cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
# Test
export PYTHONPATH=$(pwd)/python:$PYTHONPATH
python -m pytest tests/ut/ -n auto --maxprocesses 8 -v
python -m pytest tests/ut/core/test_error.py -n auto --maxprocesses 8 -v
# Lint and type check
ruff check .
ruff format --check .
pyright
pre-commit run --all-filesRun system tests in tests/st/ only when the task requires them and the
necessary hardware or environment is available.
include/pypto/: public C++ headerssrc/: C++ implementation, passes, codegen, runtime internalspython/bindings/: nanobind extension bindingspython/pypto/: Python API, DSL, pass manager, and type stubstests/ut/: unit teststests/st/: system and hardware-dependent teststests/lint/: repo-specific lint and validation scriptsdocs/en/dev/,docs/zh/dev/: developer documentationexamples/: user-facing examples (beginner/, intermediate/, advanced/, models/, runtime/, utils/)