Skip to content

Add mojo-stdlib-contributing skill#3

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

Add mojo-stdlib-contributing skill#3
msaelices wants to merge 11 commits into
modular:mainfrom
msaelices:mojo-stdlib-contributing

Conversation

@msaelices
Copy link
Copy Markdown

@msaelices msaelices commented Mar 22, 2026

Summary

Add a skill for contributing to the Mojo standard library, distilled from 30+ reviewed PRs. 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)

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 5 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.
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.

2 participants