Commit graph

25 commits

Author SHA1 Message Date
Kim Morrison
68764f5382
doc: add CLAUDE.md guidance on rebasing vs changing PR base (#13652)
This PR adds a short guidance note to `.claude/CLAUDE.md` clarifying
that "rebase onto X" requests should only change the local branch base,
never the PR's `--base` target on GitHub. The Lean4 workflow
specifically uses `nightly-with-mathlib` as a rebase target to get a
mathlib-tested snapshot for CI, while the PR continues to target
`master`.

🤖 Prepared with Claude Code

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 11:34:50 +00:00
Sebastian Ullrich
22abf93a59
chore: CLAUDE.md: test moddocs (#13662) 2026-05-06 14:03:06 +00:00
Sebastian Ullrich
b7ca76a96e
chore: refine PR description guidance in .claude/CLAUDE.md (#13597)
Keep it short and user-level in the first paragraph
2026-05-02 12:02:25 +00:00
Mac Malone
24bef91f9a
test: tests/lake/run_test.sh (#13501)
This PR removes the Makefile-based Lake test runner and replaces it with
`run_test.sh` and `run_clean.sh`. These are still not designed for use
with the `with_*.sh` runners, but this a step closer to that
eventuality.

It also adds a line to `CLAUDE.md` informing Claude how to build and run
a single Lake test.
2026-04-25 04:36:08 +00:00
Sebastian Ullrich
cd697eac81
chore: remove module build instructions from CLAUDE.md (#13386)
This seems to be prone to confusing Claude
2026-04-13 10:08:33 +00:00
Sebastian Ullrich
8678c99b76 fix: respect module visibility in initialize/builtin_initialize
Previously, `elabInitialize` only checked for explicit `private` when
deciding whether to mangle `fullId`, ignoring the `module` system's
default-private semantics. It also overrode the user's visibility for
the generated `initFn` via `visibility.ofBool`.

Now, `elabInitialize` uses `elabVisibility` + `isInferredPublic` to
correctly handle all visibility contexts. The generated `initFn`
inherits the user's visibility rather than being forced public.

Also factors out `elabVisibility` from `elabModifiers` for reuse.
2026-04-10 15:08:43 +02:00
Sebastian Ullrich
22308dbaaa
chore: CLAUDE.md individual module build instructions (#13189) 2026-03-30 14:30:16 +00:00
Garmelon
492fda3bca
chore: speed up test suite slightly (#12969)
This PR speeds up some benchmarks when run as tests by lowering their
workload. It also stops testing some of the more expensive benchmarks
that can't be easily made smaller.
2026-03-20 12:24:32 +00:00
Joachim Breitner
0717cb73d5
chore: hints about ccache in CLAUDE.md (#12960)
This PR adds instructions for building Lean with ccache in sandboxes.
2026-03-18 10:01:26 +00:00
Garmelon
49715fe63c
chore: improve how test suite interacts with stages (#12913)
The tests need to run with certain environment variables set that only
cmake really knows and that differ between stages. Cmake could just set
the variables directly when running the tests and benchmarks, but that
would leave no good way to manually run a single benchmark. So cmake
generates some stage-specific scripts instead that set the required
environment variables.

Previously, those scripts were sourced directly by the individual
`run_*` scripts, so the env scripts of different stages would overwrite
each other. This PR changes the setup so they can instead be generated
next to each other. This also simplifies the `run_*` scripts themselves
a bit, and makes `tests/bench/build` less of a hack.
2026-03-16 15:20:03 +00:00
Sebastian Ullrich
ddd5c213c6
chore: CLAUDE.md: stage 2 build instructions (#12929) 2026-03-16 09:47:14 +00:00
Kim Morrison
f3752861c9
fix: validate stage0 version matches release version (#12700)
This PR fixes a CMake scoping bug that made `-DLEAN_VERSION_*` overrides
ineffective.

The version variables (`LEAN_VERSION_MAJOR`, `MINOR`, `PATCH`,
`IS_RELEASE`) were declared with plain `set()`, which creates normal
variables that shadow cache variables set by `-D` on the command line.
The fix changes them to `CACHE STRING ""` to match the existing
`LEAN_SPECIAL_VERSION_DESC` pattern.

However, `CACHE STRING ""` alone isn't sufficient because `project(LEAN
CXX C)` implicitly creates empty `LEAN_VERSION_{MAJOR,MINOR,PATCH}`
normal variables (CMake sets `<PROJECT>_VERSION_*` for the project
name). These shadow the cache values, so we `unset()` them after the
cache declarations to let `${VAR}` fall through to the cache.

Closes https://github.com/leanprover/lean4/issues/12681

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:31:29 +00:00
Garmelon
08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00
Sebastian Ullrich
5115229be2
chore: CLAUDE.md: restrict build parallelism (#12624) 2026-02-22 14:35:05 +00:00
Leonardo de Moura
13a2a6b4c1
chore: update CLAUDE.md PR body formatting guidelines (#12629)
This PR updates the CLAUDE.md instructions to better conform with our PR
conventions. Specifically, it clarifies that PR bodies must start with
"This PR" (which gets incorporated into release notes), and that
markdown headings like `## Summary` or `## Test plan` should not be used
in PR descriptions.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:53:18 +00:00
Kim Morrison
f3cbdca6e2
chore: add module/prelude guidance to CLAUDE.md (#12542)
This PR adds guidance to `.claude/CLAUDE.md` about the `module` +
`prelude` convention required for files in `src/Lean/`, `src/Std/`, and
`src/lake/Lake/`. CI enforces that these files contain `prelude`, but
with `prelude` nothing is auto-imported, so explicit `Init.*` imports
are needed for standard library features like `while`,
`String.startsWith`, etc.

🤖 Prepared with Claude Code

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 00:57:20 +00:00
Kim Morrison
12d3ffc15b
chore: add copyright header guidance to CLAUDE.md (#12541)
This PR adds a "Copyright Headers" section to `.claude/CLAUDE.md`
instructing Claude to:
- Always use `date +%Y` for the copyright year instead of relying on
memory
- Match the copyright holder to what the author uses in other recent
files in the repo
- Skip copyright headers for test files in `tests/`

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 00:44:02 +00:00
Kim Morrison
5115b8f361
doc: add test suite documentation to .claude/CLAUDE.md (#12421)
This PR adds comprehensive test running instructions to
`.claude/CLAUDE.md`,
replacing the single `test_single.sh` example with the full range of
test
commands documented in `doc/dev/testing.md`: full suite, filtered by
name,
rerun failures, and direct ctest usage.

🤖 Prepared with Claude Code

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:42:06 +00:00
Kim Morrison
00c8431cf8
doc: add changelog label instructions to CLAUDE.md (#12227)
This PR documents the available `changelog-*` labels and when to use
them in the project-specific CLAUDE.md instructions.

🤖 Prepared with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-29 03:24:23 +00:00
Kim Morrison
e441ed8e46 Revert "doc: add changelog label instructions to CLAUDE.md"
This reverts commit 119533d602.
2026-01-29 03:16:10 +00:00
Kim Morrison
119533d602 doc: add changelog label instructions to CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 03:14:38 +00:00
Kim Morrison
a96ae4bb12
chore: add CI log retrieval guidance to CLAUDE.md (#11964)
This PR adds guidance for investigating CI failures promptly rather than
waiting for other jobs to complete.

---
🤖 Prepared with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-10 07:41:41 +00:00
Leonardo de Moura
f77ce8c669
doc: expand PR creation guidelines in CLAUDE.md (#11835)
This PR expands the pull request creation section with detailed
formatting guidelines including title format (type prefixes, imperative
present tense) and body format requirements (starting with "This PR").
Adds a concrete example for reference.

All modifications were suggested by Claude.
2025-12-29 17:42:28 +00:00
Kim Morrison
387833be70
chore: update Claude prompting (#11370)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-26 02:53:36 +00:00
Kim Morrison
04d72fe346
chore: basic dev instructions for Claude (#11074)
This PR adds a `.claude/claude.md`, with basic development instructions
for Claude Code to operate in this repository.
2025-11-04 04:07:53 +00:00