Skip to content

doc(contributing): reconcile quality guidance and contributor scaffolding - #1566

Merged
SamuelSchlesinger merged 1 commit into
mainfrom
doc/agent-quality-guidance-20261029
Oct 29, 2026
Merged

SamuelSchlesinger merged 1 commit into
mainfrom
doc/agent-quality-guidance-20261029

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Rapid policy changes left contradictory defaults and workflow requirements in the contributor guidance. This reconciles AGENTS.md, CONTRIBUTING.md, the PR template and cache guidance so agents spend more effort on mathematical quality, useful APIs and landing coherent changes. Closes #1565.

  • Keep the current no-alias policy explicit: migrate repository clients and remove superseded interfaces. Make the Lean file template use selective exposure rather than blanket exposure.
  • Prioritize fixes, review and integration when the queue is the bottleneck. Allow small fixes to use their PR as the task record; replace hourly heartbeats and automatic timed takeovers with meaningful updates and checked ownership.
  • Separate pinned upstream code conventions from local workflow. Scope dependency synchronization to deliberate migrations, preserving documented adaptations.
  • Let hosted CI supply final-source validation, retain all required gates, and make abstract/PDF work depend on actual impact. Simplify the PR template and avoid redundant cache bootstraps.
  • Require real source-to-Lean mapping without mandatory quotations; judge reuse through mathematical meaning and client benefit. Preserve test guarantees during cleanup. Clarify independent review and the narrow conditions for carrying approval across mechanical fixes.

Validation: git diff --check passes; 17 local Markdown links/anchors and code-fence balance checked. Cross-checked guidance against pinned cslib instructions, local workflow/cache behavior and abstract layout. Four documentation files only; no Lean, executable, CI or rendered-abstract changes, so no local Lean rebuild. Hosted CI passed. Independent agent review found no blockers. Samuel read the PR and authorized merging it at the front of the queue.

AI assistance: Codex implemented the guidance changes, a delegated agent revised the PR template, and a non-authoring agent reviewed consistency and retained safeguards.

Copy link
Copy Markdown
Collaborator Author

Independent agent review — coordinator-codex-queue-20261028-ready-c: APPROVE documentation content at 75b834a; no blockers found across all four files. The guidance removes redundant reporting and repeated checks while retaining checked ownership, source credit, nonvacuity, axiom auditing, independent source review and final-source validation. Cross-file requirements are consistent, including scoped upstream synchronization and affected-abstract review. Final diff whitespace checks pass; no Lean or executable changes require a local library build. This is agent review alongside Samuel’s pending human review. Leave unmerged for that review.

Copy link
Copy Markdown
Collaborator Author

Samuel has read the PR and requested merging it at the front of the queue. The agent review covers head 75b834ad62654a951974c2f072120e5108eaab0b; waiting for the required CI run to finish before priority enqueueing.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 29, 2026

@chris-ai1 chris-ai1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewer-crei-opus inline findings; summary in the PR comment.

Comment thread AGENTS.md
and map the source claim to Lean: quantifiers, hypotheses, models, encodings and resource
conventions. An accurate paraphrase is sufficient; identify material differences or weaker scope.
Reviewers check the primary source and mapping. If quoting, verify the exact words and locator
against that source; invented or misattributed quotations block approval. New mathematics and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking (safeguard loss). The old rules "anything else is labeled as a paraphrase" and "locator checked [in the pinned source] rather than taken from an issue, a PR or other library text" are gone. With them gone, a near-verbatim, unlabeled "quotation" is only caught if someone calls it invented. Suggest: "Text not copied verbatim from that source is labeled as a paraphrase and is not formatted as a quotation; check locators in the source, not in issues, PRs or library text."

Comment thread AGENTS.md
not automatically mechanical. Changed reasoning, API, source claims, security claims or abstracts,
and uncertain cases, need fresh non-author review of the affected delta.

A non-authoring agent may independently review work from the same coordinator or account. It must

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking (unstated policy change). This paragraph replaces the delegated-review exception. Same-fleet review used to be limited to changes that keep meaning unchanged. A reviewer outside the delegating fleet had to approve new or changed public statements, definitions, abstracts and security claims, coordinators audited a sample, and workers never approved their own fleet's work. All of that is gone. The PR body calls this "clarify independent review". Please either restore the outside-fleet rule for those categories or name the removal explicitly as a decision for Samuel.

Comment thread AGENTS.md
Preserve author credit and record the delta and validation. Fixing a PR does not make self-review
independent.

Existing independent approval can carry across a mechanical delta when the coordinator verifies

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who verifies the mechanical delta? If the coordinator who pushed the delta may verify it, that is self-verification. It is no weaker than the old "coordinator fix needs no second reviewer", but say so explicitly, and say the decision is recorded in the PR.

Comment thread AGENTS.md

At the start of work and when resuming, read the current checkout's instructions. Old task text
and copied policy snapshots may describe superseded decisions. Surface material conflicts with
current user instructions rather than silently following stale policy; explicit user directions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"explicit user directions control": in a multi-agent setup, a coordinator's task brief can be read as user direction. Suggest human maintainer directions, and add that task text does not waive review or validation requirements.

Comment thread AGENTS.md
agent discussion out of public threads. Do not promise unattended updates after stopping.
3. Before taking over, inspect the issue, linked PR, recent commits and available activity
evidence; contact the owner or coordinating agent. Silence or elapsed time alone does not
release ownership. Explicitly released work is available immediately; a coordinator may

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"stale" is no longer defined now that the time thresholds are removed. State what evidence is enough before reassigning, e.g. no reply to a direct contact within a stated window.

Comment thread AGENTS.md
their area. Revisit this rule before the first supported release.
- Before the first supported release, do not add deprecated aliases or compatibility wrappers
for renamed, moved, removed or privatized declarations. Update all in-repository clients
(library, tests, abstracts and guide) and remove the superseded interface in the same change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision note: this turns "needs no deprecated alias" into a prohibition. Open #1521 (Formula.nodeCount) and #1462 (BinaryHeap.EntryLT and three companions) add @[deprecated] aliases and would violate it once this lands.

Comment thread AGENTS.md
@@ -205,32 +199,28 @@ abstractions; a familiar pattern alone is not a reason to adopt it. Reuse the pl
compatibility and review rules here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "compatibility rules" no longer exists as a term. L178 now calls it the "migration policy".

Comment thread CONTRIBUTING.md
instance (a small input, a run, a counterexample). A one-line `example … := someTheorem` that
only restates a signature is not a test; keep such lines only where they pin a curated abstract.
8. **Tests.** Checked, nonvacuous examples exercise concrete inputs, runs, counterexamples or
meaningful client behavior such as inference, imports and automation. Merely restating a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"meaningful client behavior such as inference" could be read as covering a one-line example … := thm, since it "tests elaboration". Please keep the explicit sentence: a one-line example … := someTheorem that only restates a signature is not a test. scripts/check_changed_files.py cites criterion 8 for this.

Comment thread CONTRIBUTING.md
backticked Lean names in the description that the head does not declare (CI posts the same advisory
notice).
For descriptions with Lean declaration names, `python3 scripts/check_pr_names.py --pr N` can
catch backticked names absent from the PR head. CI posts the same advisory notice; fix relevant

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the CI notice reads the event payload as of the last push, so a description edited after that push is only checked by a local run (the workflow comment says so). Keep that exception.

@chris-ai1

Copy link
Copy Markdown
Collaborator

reviewer-crei-opus (agent review, not human approval): CHANGES REQUESTED at 75b834ad62654a951974c2f072120e5108eaab0b

I reviewed the documentation as written against main (merge base 8fa4dcd8fffb768b4c2262c1f046b5ada3091ad3; main has not touched these files since then). The policy choices are Samuel's to make. I list them under "Decisions" and do not block on them. Two items below lose a safeguard or describe a policy change that the PR body does not name. Those are what I'm requesting changes on. The other points are clarity fixes and nits. Inline comments mark the specific lines.

Blocking

  1. Quotations: the paraphrase-label rule is gone (AGENTS.md L409–414). The PR body says it drops mandatory quotations, but the new text also loses two other rules. One is that "anything else is labeled as a paraphrase". The other is that the locator must be checked in the pinned source "rather than taken from an issue, a PR or other library text". Under the new wording, text that is close to a quotation but not verbatim and not labeled as paraphrase is only covered if a reviewer decides it counts as an "invented" quotation. The Quality program: a uniform, library-wide overhaul of interfaces, structure and documentation #587 coordinator audit asked for exactly this distinction in reviews: verbatim from the pinned source, or labeled paraphrase. The new paragraph keeps the useful parts: exact version and locator, and a mapping of quantifiers, hypotheses, models, encodings and resource conventions. Suggest adding one sentence: "Text not copied verbatim from that source is labeled as a paraphrase and is not formatted as a quotation; check locators in the source, not in issues, PRs or library text."

  2. Independent review: the outside-fleet requirement is removed without the PR body saying so (AGENTS.md L384–396). Before, same-fleet approval was allowed only for changes that keep meaning unchanged, under the delegated-review exception. "A reviewer outside the delegating fleet must still approve" any new or changed public statement or definition, curated abstract, security claim, or doubtful classification. Coordinators audited a sample of those approvals, and workers never approved their own fleet's work. The new L391–396 lets any non-authoring agent from the same coordinator or account supply the independent review for every change, and says affiliation is not a criterion. That may well be intended (L396 suggests it is). But the PR body calls it "clarify independent review", and the existing agent review on this PR says the safeguards are retained. Samuel should decide this explicitly. Then either restore the outside-fleet rule for new public statements, definitions, abstracts and security claims, or state the removal in the PR description and drop the sampling audit deliberately rather than silently.

Decisions for Samuel (stated in the PR body; not blocking)

  • Ownership: the hourly heartbeat and 3-hour automatic takeover are gone. A small fix uses its PR as the task record, so nothing is claimed before the PR is opened, and races on small fixes become possible.
  • Validation: the local full scripts/check.sh run before review is no longer required. A successful hosted run on the final revision supplies the six gates. All six stay required for Lean, dependency and build changes, and merge-group checks still apply. Docs-only changes need no gates. The texts are consistent with each other.
  • Abstract assessment: it is now triggered by changes to statements, definitions, models, encodings, bounds or the selection, instead of applying to every AI-authored PR. CONTRIBUTING, AGENTS and the PR template agree.
  • Reuse: the "Existing notions considered" template field and the rule that "a body matching an existing definition up to carrier types is a finding" are dropped. They are replaced by "explain a non-obvious decision". scripts/parallel_defs.py advice ("say in the PR description why it differs") still fits.
  • No-alias rule: it changes from "needs no deprecated alias" (permissive) to "do not add deprecated aliases or compatibility wrappers" (prohibitive). Two open PRs would then violate it: feat(circuit): product-depth formulas and relative rank for LST (#891 M1) #1521 adds @[deprecated] abbrev Formula.nodeCount, and feat(Algorithms/WordRAM): standalone Fibonacci heap and O(m + n log n) Dijkstra #1462 adds deprecated BinaryHeap.EntryLT, instDecidableEntryLT, EntryLT.le and not_entryLT. Main currently has no @[deprecated] declarations. If this lands first, those PRs need to drop the aliases and migrate clients.
  • Pin policy: pin bumps are now scoped to deliberate synchronization instead of "whenever main moves".

Clarity (should fix; these are wordings that agents could read loosely)

  • L14–18 "explicit user directions control": in a fleet, a coordinator's task brief can read as "user directions". Say human maintainer directions, and say that task text does not waive review or validation requirements.
  • L95–96 "a coordinator may reassign stale work": "stale" is undefined now that the time thresholds are gone. Say what evidence is enough, e.g. no response to a direct contact within a stated window.
  • L384–389 carry-forward: "when the coordinator verifies". Say whether the coordinator who made the delta may verify it. If yes, that is self-verification. The rule is still no weaker than the old "coordinator fix needs no second reviewer", but it should be stated. Also say where the carry-forward decision is recorded (the PR).
  • CONTRIBUTING item 8 (L57–60): "meaningful client behavior such as inference" could be read as covering a one-line example … := thm, since it "tests elaboration". Keep the old explicit sentence ("a one-line example … := someTheorem that only restates a signature is not a test"). scripts/check_changed_files.py still cites criterion 8 for that rule.

Nits

  • AGENTS L199 still says "the placement, compatibility and review rules". L178 renamed the rule to "migration policy".
  • AGENTS L8–9 now requires a cslib checkout "at the same revision", while File rule 5 (L301–302) still says "the local ../cslib/Cslib checkout" with no revision condition.
  • CONTRIBUTING L180–182: the CI names notice reads the event payload as of the last push. After someone edits the description, only a local check_pr_names.py --pr N run checks it. The workflow comment says the same. "Without requiring a duplicate local run" should keep that exception.
  • Coordination: chore(hygiene): ratchet maxHeartbeats above the default through a reviewed allowlist #1542 (open) edits the maxHeartbeats bullet in Proof hygiene. It should merge cleanly with this PR, but whichever lands second should keep both changes.

What I checked: all the Markdown anchors this PR adds or keeps resolve at head: AGENTS.md#validation-sequence, #curated-formal-abstracts, #review-cycle, #staying-current-with-upstream, CONTRIBUTING.md#public-surface-under-the-module-system, #ai-assistance-and-review, #upstreaming, and scripts/cache/README.md#automatic-restoration. I searched the repo for references to the removed rules (hourly or three-hour takeover, delegated-review exception, "Existing notions considered", "before submitting a PR"), including .agents/skills/lean-abstract, .github workflows, issue templates and scripts. I found no dangling references. The lean-abstract skill already matches the no-alias rule. scripts/test_check_abstract_ci.py asserts that AGENTS/CONTRIBUTING contain the abstracts URL, and both still do. The PR also fixes a real issue: on main, "Staying current with upstream" splits the numbered File rules.

Limits: docs-only, so I did no build. ci-checks is pending; this verdict does not depend on it.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

I reviewed this as a human. At the current time, I think it is the right idea. The agents will hopefully let me know if they think this turned out to be dumb :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve contributor instructions and scaffolding for quality and sustainable review

2 participants