一键导入
spec-diff
Show what changed in leanSpec between devnet versions or HEAD
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Show what changed in leanSpec between devnet versions or HEAD
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Document code in this repository.
Run unit tests with coverage
Common developer workflows, commands, and troubleshooting for leanSpec
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 | spec-diff |
| description | Show what changed in leanSpec between devnet versions or HEAD |
Show what changed in the spec code (src/lean_spec/) and consensus test vectors
(tests/consensus/) between two devnet versions (or HEAD).
Scope: Protocol-level spec types, functions, containers, forkchoice logic, and the test fixtures that generate cross-client test vectors.
Excluded: Test framework infrastructure (packages/testing/, consensus_testing/),
unit tests (tests/), interop tests (tests/interop/),
documentation (docs/), CI/tooling configs, and the node implementation layer
(networking, sync, storage, node runner).
/spec-diff devnet3 - Changes from devnet 3 to HEAD/spec-diff devnet2 devnet3 - Changes from devnet 2 to devnet 3/spec-diff devnet0 devnet3 - Full changelog across multiple devnetsLook up commit hashes from VERSIONS.md in the repo root. It contains a table mapping
version names (e.g. "Devnet 3") to commit hashes.
Parse the argument(s):
devnet3, Devnet 3, d3 should all resolve to the same entry)If a version is not found in VERSIONS.md, report the available versions and abort.
Run both commands:
git diff --name-only <from-commit> <to-commit> -- src/lean_spec/
git diff --name-only <from-commit> <to-commit> -- tests/consensus/
Filter to .py files only.
For each changed spec file (src/lean_spec/), run:
git diff <from-commit> <to-commit> -- <file>
Categorize each item as:
For modified items, briefly describe what changed (e.g. "added deadline parameter",
"changed return type from bool to Optional[bool]").
Detecting renames: A rename+change appears in the diff as a removal in one place and
an addition in another. Before classifying something as [Removed] + [New], check
whether the removed item has a corresponding new item with a similar name, similar
parameters, or similar objective. If so, report it as a single [Modified] entry:
old_name() → renamed to new_name(), with a description of what else changed.
Common rename patterns: prefix/suffix changes (gossip_ → attestation_), class
extraction (function → Class.method), split (one_func → two_funcs).
For each changed consensus test file (tests/consensus/), run:
git diff <from-commit> <to-commit> -- <file>
Summarize changes to test vectors grouped by test category (fork choice, SSZ, signature verification, etc.). Focus on:
Group changes by component (logical area of the spec), not by file path.
Within each component, prefix each item with [New], [Modified], or [Removed].
After the spec component sections, include a Test Vectors section covering
changes to consensus test fixtures (tests/consensus/).
## Spec changes: Devnet 3 → HEAD
### Block Envelope
- [New] `SignedBlock` — replaces `SignedBlockWithAttestation`
- [Removed] `BlockWithAttestation` — no longer needed
### State Transition
- [Modified] `State` — added `deposit_index` field (Uint64)
### Test Vectors
**Fork Choice** (5 files, +770 -407 lines)
- [Modified] Tests now use explicit attestations — weight from attestations not block count
- [Removed] `test_auto_collect_proposer_attestations` — auto-collection removed
**SSZ Containers** (2 files)
- [Modified] `Validator` tests — dual pubkeys
### Summary
- X spec files, Z test files changed
- Brief description of core design changes
Guidelines:
[New], [Modified], or [Removed].