Skip to content

Add developer guide and AGENTS.md; slim down CONTRIBUTING.md - #3975

Merged
EwoutH merged 5 commits into
mesa:mainfrom
EwoutH:developer-guide
Oct 28, 2026
Merged

EwoutH merged 5 commits into
mesa:mainfrom
EwoutH:developer-guide

Conversation

@EwoutH

@EwoutH EwoutH commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

A lot of Mesa's maintainer knowledge is spread over years of issues, PRs, discussions and wiki notes. That covers how we work, what we value, what we decided and why, and what we look for in review. This PR collects it into a developer guide (docs/development/, published on Read the Docs). It also turns CONTRIBUTING.md into a short front door and adds an AGENTS.md for AI coding assistants.

This is also preparation for allowing us to align AI better with the way we do things at Mesa.

Read rendered on Readthedocs: https://mesa--3975.org.readthedocs.build/3975/development/index.html

Motive

  • New contributors, especially during GSoC, keep running into the same conventions, trade-offs and decisions. We explain them again in every review.
  • We want contributors to align with us on the problem (what are we solving, for whom) and the concept (what a good solution looks like, which trade-offs) before code-level review. That process was only partly written down.
  • Many contributors work with AI assistants. AGENTS.md makes those tools follow our process (problem before code, small PRs, verify claims, let contributors use their own words) instead of working against it.
  • It's also a foundation if we want to revisit AI-assisted triage or guidance (Scaling contributor learning and quality with limited maintainer capacity #3485). Any such tool should work from the same written guidance as humans.

Implementation

One source of truth, two entry points:

File Reader Role
docs/development/ Everyone The knowledge itself
CONTRIBUTING.md Humans arriving via GitHub Welcome, how we work in short, setup, links into the guide. 423 → 105 lines; the "I have no idea where to start" section is kept verbatim
AGENTS.md AI coding assistants How to behave on Mesa, plus pointers into the guide

Developer guide pages:

  • index.md: how we work. Problem → concept → implementation, when to open what, pathfinding PRs (moved from CONTRIBUTING), and a new "Using AI tools" section consistent with the Code of Conduct.
  • principles.md: design principles and the trade-offs we make (new).
  • standards.md: code, API, exceptions, determinism, performance, tests, docs. The examples policy and deprecation policy moved here from CONTRIBUTING, condensed (the deprecation steps and version table are unchanged).
  • review.md: reviewing in stage order and giving warm, actionable feedback (new).
  • decisions.md: log of cross-cutting decisions, rejected ideas and open questions (new).
  • maintainers.md: roles and the release process, moved from CONTRIBUTING unchanged.

How the new pages were made: I analysed about 2,600 PRs, issues and discussions with maintainer input (2021–2026), plus the wiki, with an LLM. It extracted about 1,150 knowledge items (decisions, conventions, principles, rejected ideas), each with its source. The pages were drafted from those items, then checked against current code (e.g. mesa.space is marked superseded because it is removed in 4.0). Sources are linked inline so claims can be traced. Afterwards the pages were condensed to remove duplication between them.

Additional notes

Review requested. These pages describe our practice, so please check that they say what we mean:

Reviewing page by page is fine, and smaller follow-up PRs are welcome.

Not included yet: notes per subsystem (semantics, invariants and decisions for spaces, time/events, data collection and so on). Those might live closer to the code; to be discussed separately.

Before merge:

  • The links from CONTRIBUTING to mesa.readthedocs.io/latest/development/… only resolve once this is merged and built.
  • Vale reports 0 errors and 2 minor style warnings.

@EwoutH EwoutH added the docs Release notes label label Oct 23, 2026
@github-actions github-actions Bot added the ci Release notes label label Oct 23, 2026
@EwoutH
EwoutH marked this pull request as ready for review October 23, 2026 09:23
@EwoutH

EwoutH commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

I hope this is a clear summary of how we do stuff at Mesa and why we do them that way. It's based on thousands of comments of all of us since 2021, indexed, sorted and analyzed.

For the review, I recommend everybody to start at index.md (on readthedocs), and review whatever you like. But maybe:

  • @quaquel, I think principles.md should really align with you, and a fact check on decisions.md would also be useful.
  • @tpike3, a good look at review.md would be appreciated, alongside a quick scan of AGENTS.md and CONTRIBUTING.md.
  • @jackiekazil probably also a good look at review.md, as well as the index.
  • @wang-boyu probably standards.md and AGENTS.md.
  • @Sahil-Chhoker probably the docs and examples sections of standards.md.

Comment thread docs/development/decisions.md Resolved
Comment thread docs/development/decisions.md Resolved
Comment thread docs/development/decisions.md Resolved
Comment thread docs/development/index.md Resolved
Comment thread docs/development/index.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/principles.md Resolved
Comment thread docs/development/review.md Resolved
Comment thread docs/development/standards.md Resolved

@quaquel quaquel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good stuff. The ai thing might need some more conversation. But otherwise, fine with me. If you need an approve, just ping me.

EwoutH and others added 5 commits October 28, 2026 13:13
Collect maintainer knowledge that was scattered across issues, PRs,
discussions and the wiki into a developer guide in docs/development/:

- index: how we work (problem -> concept -> implementation), when to
  open what, pathfinding PRs, and expectations for AI tool use
- principles: design principles and the trade-offs Mesa makes
- standards: code, API, exception, determinism, performance, test,
  docs, examples and deprecation conventions
- review: how to review contributions in stage order, and how to give
  warm, actionable feedback
- decisions: log of cross-cutting project decisions and rejected ideas
- maintainers: roles and the release process

CONTRIBUTING.md becomes a short front door that links into the guide.
AGENTS.md instructs AI coding assistants how to work on Mesa (problem
before code, small PRs, verify claims, let contributors speak for
themselves) and points to the guide; CLAUDE.md imports it.

Drafts were generated from ~2,600 maintainer-reviewed threads (2021-2026)
and checked against current code; they still need maintainer review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Remove duplication and condense the developer guide (~9,200 -> ~5,500
words):

- principles: 11 -> 7 principles. Dropped "start with the problem" and
  "keep contributions reviewable" (covered by index and review), merged
  the API and defaults principles, removed the history section.
- standards: removed self-evident items and most citations; examples
  and deprecation policy condensed (rules and version table kept).
- decisions: dropped rows that restated process or standards; shorter
  table without a separate "why" column; added commonly re-proposed
  ideas we decided against.
- review: tightened wording; removed repetition of the index.
- maintainers: fixed a typo in the roles intro.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Apply Oxford comma suggestions and use it consistently across the guide
- Clarify what core examples are in decisions.md
- Update seeding guidance to Mesa 4.0's rng/Scenario API
- Mark manual labeling decision as partly superseded by mesa#3813
- Ask contributors to write PR and issue text themselves
- Ask bug reports to explain how the bug affects real models

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@EwoutH

EwoutH commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@quaquel Thanks for the review, addressed all points.

@quaquel quaquel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suggest we open a separate discussion on AI use. Feel free to merge when ready.

@EwoutH
EwoutH merged commit b276008 into mesa:main Oct 28, 2026
5 checks passed
@EwoutH

EwoutH commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Perfect. We can discuss AI use:

@jackiekazil

Copy link
Copy Markdown
Member

I love the idea. I have been pushing for more governance structure for years outside of the AI stuff. The ai stuff was inevitable.

I just had a chance to review last night, and I have feedback. The language is hard to read because it is so AI heavy written. I don't know quite where to start since this is merge and some of the feedback is more around the governance. Should I just submit another PR on top?

This feels like something that should have happened in a branch with more refinement, and not the type that is years of iterations, but maybe a few weeks to a month.

@EwoutH

EwoutH commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Thanks for getting back. I agree the language can be improved, and I could have left the PR open for a bit longer.

I think is best to just submit another PR on top. These can (should) be living documents, and they can be continuously iterated.

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

Labels

ci Release notes label docs Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants