一键导入
workflows
Common developer workflows, commands, and troubleshooting for leanSpec
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Common developer workflows, commands, and troubleshooting for leanSpec
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Document code in this repository.
Show what changed in leanSpec between devnet versions or HEAD
Run unit tests with coverage
Read-only, multi-agent audit of the leanSpec codebase. Fans out the py-architect, consensus-researcher, code-tester, and doc-writer agents across the source tree to find dead code, over-abstraction, stdlib simplifications, test gaps, safety/security defects, and documentation rot, then synthesizes a precise, prioritized AUDIT_REPORT.md. Never modifies code.
Run leanSpec fixtures against a client implementation
Run all code quality checks
| name | workflows |
| description | Common developer workflows, commands, and troubleshooting for leanSpec |
Common developer workflows and commands for working in leanSpec.
# Single test file
just test tests/node/networking/transport/test_peer_id.py -v
# Single test class or method
just test -k "TestDiscoveryTransport::test_start" -v
# With print output visible
just test -s -k "test_name"
The project uses two type checkers. Run them separately to isolate issues:
# Full type check (ty — the primary checker used in CI)
just typecheck
# Lint check (ruff — catches style and import issues)
just lint
Common type error patterns:
invalid-assignment — Wrong type assigned; check if a domain type (RequestId, PeerId) is expected instead of raw bytesinvalid-argument-type — Function argument type mismatch; verify the function signatureunion-attr — Accessing attribute on a possibly-None value; add an assert is not None guardAfter running tests, coverage reports are generated:
# View coverage in terminal
just test-cov
# Open HTML report
open htmlcov/index.html
Interop tests are excluded from the default test run. Run them explicitly:
just interop
# Run spell check
just spellcheck
# Add legitimate words to the ignore list
echo "newword" >> .codespell-ignore-words.txt
# Check markdown formatting (docs only)
just mdformat
ruff format changes after ruff check --fix: Always run format after fix — the fixer doesn't guarantee formatting compliance.just fix to auto-sort imports.