Skip to content

Commit 6ed25b3

Browse files
committed
chore: sync private docs
1 parent 0c43cd0 commit 6ed25b3

3 files changed

Lines changed: 746 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# AGENTS.md
2+
3+
## Agent Constraints
4+
5+
### Lean 4 Skill
6+
7+
When working on Lean 4 proofs, theorem statements, proof repair, diagnostics, or library
8+
search, use the Lean 4 skill at:
9+
10+
`/home/raibunitsu/working_directory/lean4-skills/plugins/lean4/skills/lean4/SKILL.md`
11+
12+
Prefer the workflows and helper scripts described there over ad-hoc approaches.
13+
14+
### Environment
15+
16+
The following environment variables are expected to be available in the shell:
17+
18+
- `LEAN4_PLUGIN_ROOT=/home/raibunitsu/working_directory/lean4-skills/plugins/lean4`
19+
- `LEAN4_SCRIPTS=/home/raibunitsu/working_directory/lean4-skills/plugins/lean4/lib/scripts`
20+
- `LEAN4_REFS=/home/raibunitsu/working_directory/lean4-skills/plugins/lean4/skills/lean4/references`
21+
22+
### Lean Workflow
23+
24+
- Prefer using the Lean 4 skill for proof workflows, theorem search, and handling `sorry`s.
25+
- Prefer helper scripts from `LEAN4_SCRIPTS` when the skill references them.
26+
- Use absolute paths when invoking local Lean 4 skill resources.
27+
- If Lean MCP is configured for this repository, use it as part of the Lean workflow for goals,
28+
diagnostics, and code actions.
29+
30+
### GitHub MCP Pull Requests
31+
32+
- Before calling `create_pull_request`, load the pull request template from the target
33+
repository's default branch.
34+
- Check in this order: `.github/pull_request_template.md`, `pull_request_template.md`,
35+
`docs/pull_request_template.md`, then `.github/PULL_REQUEST_TEMPLATE/`.
36+
- If no repository template exists, check for an organization or user default community health
37+
template.
38+
- Pass the template contents as the `body` to `create_pull_request`.
39+
- If the pull request already exists, use `update_pull_request` to set the `body`.
40+
- If multiple templates exist and the correct one is unclear, ask the user which one to use.
41+
42+
## Project Constraints
43+
44+
For Mathlib project-specific contribution requirements, consult the official documents under:
45+
46+
`/home/raibunitsu/working_directory/leanprover-community.github.io/templates/contribute/`
47+
48+
Treat all relevant documents in that directory as authoritative rather than relying on duplicated
49+
local summaries. At the time of writing, this directory contains:
50+
51+
- `index.md`: overall Mathlib contribution guide covering contribution scope, AI disclosure,
52+
branch-and-PR workflow, and review-queue lifecycle.
53+
- `style.md`: Lean code style guide covering formatting, headers and imports, indentation,
54+
declaration layout, and related file-structure conventions.
55+
- `naming.md`: naming guide for files, declarations, namespaces, symbol-derived names, and
56+
standard structural lemma names.
57+
- `doc.md`: documentation guide covering file headers, module docstrings, declaration docstrings,
58+
Markdown/LaTeX usage, citations, and sectioning comments.
59+
- `commit.md`: pull request title and description convention, including allowed types, scope
60+
format, subject/body rules, footers, and dependency listings.
61+
- `git.md`: contributor git workflow covering fork/clone setup, remotes, branch management,
62+
pushing changes, and working with pull requests.
63+
- `pr-review.md`: review guide describing review etiquette and the main checks for style,
64+
documentation, location, improvements, and library integration.
65+
- `tags_and_branches.md`: branch, tag, and CI workflow guide for Lean, Batteries, and Mathlib,
66+
especially nightly-testing and breaking-change adaptation workflows.
67+
68+
If additional relevant contribution documents are added there later, treat them as part of the
69+
project constraints as well.

0 commit comments

Comments
 (0)