lean-project
Use when adding Lean formalization to a repository or locating the workspace for a Lean task.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lean-project
- description
- Use when adding Lean formalization to a repository or locating the workspace for a Lean task.
03 SKILL.md 正文
Select or establish the Lean workspace
Input: repository, authorized deliverable, local instructions and layout. Output: workspace path, library/module roots, pinned dependencies, scratch path, the registry-manifest path, and the command that verifies setup.
- Read the nearest instructions and
LAYOUT.mdwhen present. Locate existing lakefiles and toolchains before creating anything. Reuse the relevant project; do not upgrade it, overwrite its manifests or move it to satisfy a default. - For a new workspace, default to repository-root
lean/besidelatex/. Honor a declared alternative. If a binding layout must change, route that amendment through installednew-repo-layout-policy, carrying existing user authorization; otherwise report the exact unresolved layout choice. - Read tool recipes. Select a concrete Lean/Mathlib-compatible pin. Create the smallest library workspace needed; record its toolchain, lakefile and dependency lockfile. Add source modules to actual build targets. Core-only mathematics need not acquire Mathlib.
- Ignore
.lake/and generated build output in the workspace. Put experiments, logs and source maps under the declared scratch root, default datedai/at repository root. Keep reusable formalization sources in the Lean workspace. - Declare the workspace's documentation paths, all inside it beside the library
root: an assumption census, a statement-to-declaration map, and — when the
project may be registered — a Palomar manifest at
<workspace>/PALOMAR.md. A registry entry describes a Lean workspace at an exact commit, so its manifest belongs with that workspace, never in a separate repository-root directory. Report the path at setup even when the file does not yet exist, so later work does not invent a location. Preparing a manifest and submitting it are separate acts, and submission needs its own explicit authorization; a manifest states which has occurred. Per entry it records the declaration name, its elaborated type quoted verbatim from Lean, an informal claim rendered from that type rather than from memory, the axioms, and an explicit does not claim block — registries check informal-against-formal agreement, and an absent claim is not visible to a reviewer unless it is written down. - Invoke
lean-doctor; return its evidence and any setup blocker. An unavailable compiler still permits source analysis but cannot produce a checked result.
Example: a repo already using formal/Algebra/ keeps that project; a manuscript
repo with only latex/ normally gains lean/, with run evidence under ai/.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code