Refresh MoonBit skills for v0.10.12 and bump stale tool versions - #11
Merged
Merged
Conversation
MoonBit moved from v0.10.0 (the version these skills were written against)
to v0.10.12, and several constructs the skills taught are now gone.
moonbit-practice:
- reference/ide.md documented `moon ide goto-definition` with `-tags` /
`-query` flags; that interface no longer exists. Rewrote around the seven
real subcommands (peek-def, find-references, outline, doc, hover, rename,
analyze). `moon doc <SYMBOL>` is deprecated in favour of `moon ide doc` —
fixed in stdlib.md, language.md and performance.md too.
- `moon runwasm` is deprecated: registry packages run with `moonx`, local
ones with `moon run --target wasm`. Updated skills-marketplace.md.
- Moonrun policy files are JSON, not TOML — the marketplace reference showed
the wrong format entirely.
- Config: `pkgtype(kind: "executable")` replaces `options("is-main": true)`,
`source` is a top-level assignment in moon.mod, `.moonignore` replaces the
deprecated include/exclude fields, `formatter(ignore:)` and `#export_name`
documented. Samples in assets/ updated to match.
- New language surface: `extend Type with Trait::{..}` (implicit impl→method
attachment is deprecated), `errdefer`, labelled blocks, `guard` exhaustive-
ness and `guard!`, `[| .. |]` Iter literals, or-pattern `with` defaults,
`try!`, bytes interpolation.
- Removed/changed: `try?` (gone), `immut/array` (removed), `from_array`,
negative view indices, `moonbitlang/sys` → `moonbitlang/core/env`,
`@debug.to_repr` → `@debug.Repr`, default target is now `wasm`.
- QuickCheck moved into the standard library as moonbitlang/core/quickcheck
with check/report entry points; testing.md still told people to add a
separate dependency.
- .mbtx script mode is no longer nightly-only and is documented upstream.
moonbit-js-binding / ts2moonbit-migration: moon.mod DSL instead of the
deprecated JSON form, moonbitlang/async 0.21 (with its breaking changes),
`#export_name`, and the `try?` occurrences in their references.
Tool versions across the rest of the repo: GitHub Actions majors (checkout
v7, setup-node v7, cache v6, upload-artifact v7, download-artifact v8, plus
third-party actions), refreshed SHA pins in actions-ci-tuning, and Workers
compatibility_date samples.
node-sqlite-vec claimed `--experimental-sqlite` is required on Node <= 24;
it has not been required since v22.13.0 / v23.4.0. Replaced with the actual
stability timeline (verified against a live Node 22 run).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDtACzJESsw5xzC2sUhDAK
The struct and enum rows were written from inference, not from a verified
example. `moonbitlang/moonbit-docs` sources/language/src/derive/debug.mbt
shows `{ x: 1, y: 2 }` (spaces inside the braces) for a struct and
`Rect(width=3, height=4)` for an enum with labelled fields. Since the
surrounding section tells readers not to hand-write `content=` values, the
reference table itself has to be exact.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDtACzJESsw5xzC2sUhDAK
Three fresh executors (two rerun scenarios plus a Marketplace-packaging
hold-out) each hit 7/7 on the critical checklists, so the remaining signal
was qualitative. Two of them independently tripped on the same two things.
Contradictions between SKILL.md and its own references:
- reference/stdlib.md banned adding `moonbitlang/core/*` to a `moon.pkg`
import block, while SKILL.md instructs exactly that for `immut/vector`,
`quickcheck` and `env`. The ban is only correct for `moon.mod` deps:
prelude packages are automatic, every other core package needs a package
import. Rewritten with the alias rule (path after `moonbitlang/core/`).
- reference/stdlib.md still used the removed `f(x)!` propagation suffix in
six live examples (`@strconv.parse_int("42")!` and friends).
- "Cross-package `.` syntax for `impl` removed" stood unamended next to the
new `extend` section, which is precisely the mechanism that makes such a
dot call legal again. Restated as one rule.
- reference/testing.md had a hand-written `content="Err(InvalidInput)"` in
the section that SKILL.md's new "never hand-write a snapshot" rule
governs. Emptied for `moon test -u`.
Gaps that forced executors to guess:
- `guard ... else` was described in prose but only `guard!` was shown.
- `fn main` was never shown at all, in a skill whose description advertises
executables.
- No visibility guidance for `pub(all)` vs `pub` on a `suberror`, which
decides whether another package can match its constructors.
- `derive` on the payload-free `suberror` form had no example.
- The Debug rendering table read as an invitation to hand-write snapshots;
framed as a read-aid instead.
- `moon fmt`'s scope was summarised in four words that implied it migrates
everything on the pitfalls list. Enumerated: JSON→DSL and the trait/impl
`fn` keyword, nothing else.
skills-marketplace.md, from the hold-out scenario:
- Its layout diagram assumed no `source` key while assets/moon.mod sets
`source = "src"`; copying both gave a module that cannot build the
command. Both layouts now shown with the assumption stated.
- CLI path arguments are filesystem paths (`moon run ./src/main` in moon's
own fixtures), not import paths.
- "Also test a restrictive policy" was prose in a runbook of commands; now
a two-direction command block.
- Stated that a deny-all `net` policy does not block moonx's own asset
download, since the policy governs guest execution only.
- Published assets are linear-memory `wasm`; `moon info` is a no-op on an
executable package; the `quick_validate.py` placeholder path is now
resolvable and marked optional.
- Noted that a pinned coordinate inside the shipped SKILL.md must be
updated before the dry-run, and is better left unpinned.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDtACzJESsw5xzC2sUhDAK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MoonBit skills were written against v0.10.0. Upstream is now v0.10.12 (docs repo updated 2026-09-09), and several constructs the skills taught no longer exist. Researched against the official release notes (v0.10.4, v0.10.9), the
moonbit-docsrepo, and themoonCLI source, then re-ran theempirical-prompt-tuningloop on the result.MoonBit — what was wrong
moon ide goto-definition -tags 'pub fn' -query '…'peek-def,find-references,outline,doc,hover,rename,analyzemoon doc '<query>'is "the primary tool for API discovery"moon ide docmoon runwasm author/mod/cmd/toolmoonx <coordinate>for registry packages,moon run <pkg> --target wasmlocallyoptions("is-main": true),options(source: "src"),exclude: [...]pkgtype(kind: "executable"), top-levelsource = "src",.moonignoreimport { "moonbitlang/quickcheck" }moonbitlang/core/quickcheck(check/report).mbtxis "nightly only"moonxandmoon run -caddedtry?,immut/arrayAlso newly covered:
extend Type with Trait::{..}(implicitimpl→ method attachment is deprecated as of v0.10.4 — this one silently changes generated code),errdefer, labelled blocks,guardexhaustiveness +guard!,[| .. |]Iter literals, or-patternwithdefaults,try!, bytes interpolation,#export_name, and the default build target switching towasm.moonbit-js-bindingandts2moonbit-migrationgot the same config-format andtry?fixes, plusmoonbitlang/async0.21 and its breaking changes.Evaluation loop
Two blank-slate executors ran a "new module" scenario and a "modernise legacy code" scenario against the rewritten skill, with
[critical]-tagged checklists.Accuracy saturated immediately, but the qualitative side surfaced real defects, several of which two independent executors hit:
debug_inspect-for-containers rule and theOk(..) catch {..}→Resultrule collide: the composed case needsDebugon the error side, which the skill never showed. Both executors got stuck here.fn Type::Type(..)was documented at the definition site only — never called, so migration of call sites was a guess.suberrorhad no payload-free form documented, though that is the common case.moon docdeprecation had been recorded in SKILL.md but not propagated toreference/stdlib.md(13 occurrences) orreference/language.md, which still called it "preferred".self : Self(SKILL.md) vsself : Rectangle(reference/language.md).reference/testing.mdexisted but was unreachable from SKILL.md.fn-keyword and v0.10.4extendmigrations always fire on the same code but were documented as unrelated sections.Iteration 2 fixed all of those, added a "never hand-write
content=, letmoon test -ufill it" policy with theDebugrendering shapes, a precedence rule (SKILL.md wins overreference/), and a no-toolchain fallback section. A hold-out scenario (Marketplace packaging) was added for the overfitting check.Rest of the repo
checkoutv4→v7,setup-nodev4→v7,cachev4→v6,upload-artifactv4→v7,download-artifactv4→v8, plussetup-just,pnpm/action-setup,release-please-action,configure-aws-credentials,setup-terraform,devbox-install-action. SHA pins inactions-ci-tuningre-resolved and dated.node-sqlite-vecclaimed--experimental-sqliteis still required on Node ≤ 24. It has not been required since v22.13.0 / v23.4.0 — verified against a live Node 22 run in this session, which loadsnode:sqlitewith no flag. Replaced with the actual stability timeline (still stability 1.2, so theExperimentalWarningguidance stays).compatibility_datesamples refreshed;ts2moonbit-migrationadded to theskill-selectorcatalog.pkf run testequivalents pass: frontmatter validation (68 files) and README sync.🤖 Generated with Claude Code
https://claude.ai/code/session_01MDtACzJESsw5xzC2sUhDAK
Generated by Claude Code