mirror of
https://ghfast.top/https://github.com/aeroxw/easy_tdx_max.git
synced 2026-09-12 15:44:18 +08:00
chore: add CLAUDE.md and .claude config
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"hooks": {
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Write|Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python scripts/ruff_hook.py",
|
||||
"timeout": 30
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Skill(update-config)",
|
||||
"Bash(echo '{\"tool_name\":\"Edit\",\"tool_input\":{\"file_path\":\"D:\\\\\\\\python\\\\\\\\xmtdx\\\\\\\\src\\\\\\\\xmtdx\\\\\\\\__init__.py\"}}')",
|
||||
"Bash(python -c \"import sys,json,subprocess;d=json.load\\(sys.stdin\\);f=d.get\\('tool_input',{}\\).get\\('file_path',''\\);exec\\('' if not f.endswith\\(\\\\\\\\'.py\\\\\\\\'\\) else 'subprocess.run\\([\\\\\\\\'ruff\\\\\\\\',\\\\\\\\'check\\\\\\\\',\\\\\\\\'--fix\\\\\\\\',f],capture_output=True\\);subprocess.run\\([\\\\\\\\'ruff\\\\\\\\',\\\\\\\\'format\\\\\\\\',f],capture_output=True\\)'\\);print\\(f'done: {f}'\\)\")",
|
||||
"Bash(python *)",
|
||||
"Bash(ruff check *)",
|
||||
"Bash(git add *)",
|
||||
"Bash(git commit *)",
|
||||
"Bash(git push *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: verify
|
||||
description: Run full offline verification suite (pytest unit tests + mypy + ruff) before committing changes.
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
# Verify
|
||||
|
||||
Run the full offline verification pipeline:
|
||||
|
||||
1. Run `python -m pytest tests/unit/ -v` — all unit tests must pass.
|
||||
2. Run `mypy src/` — strict type checking must pass with zero errors.
|
||||
3. Run `ruff check src/ tests/` — no lint errors.
|
||||
4. Run `ruff format --check src/ tests/` — formatting must be clean.
|
||||
|
||||
If any step fails, fix the issues and re-run. Do not report completion until all four steps pass.
|
||||
Reference in New Issue
Block a user