Skip to content

Add mojo-stdlib-contributing and mojo-stdlib-review skills#3

Open
msaelices wants to merge 13 commits into
modular:mainfrom
msaelices:mojo-stdlib-contributing
Open

Add mojo-stdlib-contributing and mojo-stdlib-review skills#3
msaelices wants to merge 13 commits into
modular:mainfrom
msaelices:mojo-stdlib-contributing

Conversation

@msaelices

@msaelices msaelices commented Mar 22, 2026

Copy link
Copy Markdown

Summary

Add two complementary skills for working on the Mojo standard library, both distilled from 30+ reviewed PRs to modular/modular.

mojo-stdlib-contributing

Patterns and pitfalls for contributing to the Mojo stdlib. Covers:

  • Process (GitHub issues before new APIs, draft PRs, branch isolation)
  • Assertion semantics (assert_mode="safe" table)
  • Optimization verification with compile_info and benchmarks
  • Code design patterns (reuse primitives, lazy eval, move semantics)
  • Benchmark patterns (black_box/keep, setup outside hot loop)
  • Testing requirements (unicode, edge cases, hit/miss paths)
  • SIMD/memory safety (pointer validation, endianness)
  • Writable trait patterns (Some[Writer], FormatStruct)

mojo-stdlib-review

Adversarial (red-team) review of one or more Mojo stdlib PRs. Spawns parallel agents that deep-read every changed file, extract factual claims, and verify each against the actual stdlib source and the rules in mojo-stdlib-contributing. Findings are classified (Critical / Factual / Completeness / Inconsistency / Question / Minor) and written to a local findings file by default ("local mode") so the author can self-review before flipping a draft PR to ready. Pass "in post mode" to post review comments on the PR via gh pr review instead.

Also updates README.md to document both skills.

Assisted-by: AI

Add a skill capturing patterns and pitfalls for contributing to the Mojo
standard library, distilled from 30+ reviewed PRs. Covers process,
assertion semantics, optimization verification with compile_info,
benchmarks, testing, SIMD safety, and Writable trait patterns.

Signed-off-by: Manuel Saelices <msaelices@gmail.com>
Maintainer review cycles are expensive. The skill should instruct
the agent to ask the human to review the diff, PR description, and
benchmarks before converting from draft to ready for review.

Signed-off-by: Manuel Saelices <msaelices@gmail.com>
- Use standard editorial comment template from other skills
- Add opening paragraph consistent with mojo-syntax/gpu-fundamentals
- Remove content duplicated from mojo-syntax (Writable basics,
  deprecated APIs, comptime vs @parameter, move semantics)
- Remove general git/build commands already in CLAUDE.md
- Consolidate compile_info section, cut niche bullets
- Merge changelog into process section
- Reorder: process, assertions, optimizations, design, benchmarks,
  testing, SIMD, writable
- Reduce from 169 to 111 lines (34% smaller)

Signed-off-by: Manuel Saelices <msaelices@gmail.com>
Signed-off-by: Manuel Saelices <msaelices@gmail.com>
@BradLarson

Copy link
Copy Markdown
Member

!sync

@msaelices msaelices changed the title Add mojo-stdlib-contributing skill Add mojo-stdlib-contributing skill Apr 11, 2026
msaelices added 6 commits May 12, 2026 23:16
Adds an adversarial red-team review skill for Mojo stdlib PRs. The skill
spawns one parallel agent per PR that:

- Reads the full diff and extracts every verifiable claim across 14
  categories (process, API design, trait conformance, docstrings, tests,
  iterators, benchmarks, optimizations, code reuse, memory/lifetime,
  asserts, style, removed-line side effects, renames).
- Verifies each claim against the actual stdlib source and the rules in
  `mojo-stdlib-contributing`.
- Either posts review comments on the PR (default) or writes findings to
  `.specs/stdlib-review-<PR>.md` for the author to fix before flipping a
  draft PR to ready-for-review.

Distilled from 30+ reviewed PRs against `modular/modular`.

Assisted-by: AI
Adds the README entry for the new skill alongside `mojo-stdlib-contributing`.

Assisted-by: AI
Flips the default output mode so findings are written to
`.specs/stdlib-review-<PR>.md` unless the caller opts into posting on the PR
via "in post mode" / "post comments" / "post to PR". Local mode is the
typical use case (self-review of one's own draft before flipping to
ready-for-review); post mode now requires an explicit opt-in.

Also reorders the emit blocks in the agent prompt template (local first),
updates the README entry, and tweaks the follow-up options so the local-mode
"Fix locally" choice is the default.

Assisted-by: AI
…ncise

Adds a row in section D so reviews flag verbose or redundant docstrings
in the PR being reviewed, and updates the "Fix locally" follow-up so any
docstrings or comments written during fix-up stay terse.
@msaelices msaelices changed the title Add mojo-stdlib-contributing skill Add mojo-stdlib-contributing and mojo-stdlib-review skills Jun 9, 2026
@patrickdoc

Copy link
Copy Markdown

!sync

@ehsanmok

Copy link
Copy Markdown
Member

@msaelices could you clear out the lint issue in the mds [MD013] Line length exceeds 80 characters [*]?

@msaelices

Copy link
Copy Markdown
Author

MD013 lint fix pushed: prose wrapped to <=80 cols. Code blocks and tables left untouched (incl. the embedded review prompt). Ready for !sync.

@ehsanmok

Copy link
Copy Markdown
Member

!sync

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants