Skip to content

chore: apply unreleased upstream improvements from caffeinelabs/motoko#6083 and caffeinelabs/mops#530 #184

@marc0olo

Description

@marc0olo

Context

PR #183 introduced the motoko, mops-cli, and migration skills. During review, we submitted feedback to the upstream repos. Two upstream PRs landed in response — both on main/master but not yet on a release tag. Our sync workflow (sync-upstream.yml) only watches releases, so these won't be auto-detected until upstream cuts a new release.

This issue tracks the follow-up work to apply those improvements proactively and clean up the ownership comment.


Tasks

1. Trim the "Sections owned by icskills" comment in skills/motoko/SKILL.md

The upstream PR caffeinelabs/motoko#6083 absorbed our contributions, so several sections are no longer icskills-exclusive. The ownership comment should only list what's truly unique to icskills:

Remove from the owned list (now also in upstream):

  • transient var
  • M0141
  • variant tag

Keep in the owned list (still icskills-only):

  • Runtime.envVar
  • icp-cli deployment notes
  • M0145
  • Cross-reference links to other icskills skills (Load motoko skill, Load mops-cli skill)
  • References owned by icskills line (references/examples.md, references/control-flow.md, references/type-conversions.md)

2. Add content from caffeinelabs/motoko#6083 that we don't have yet

caffeinelabs/motoko#6083 added:

  • Reserved keywords list (53 reserved words) to writing-motoko/SKILL.md — add this to skills/motoko/SKILL.md
  • Field-initializer constraint note to writing-motoko/examples.md — add to skills/motoko/references/examples.md

Fetch the exact content from the upstream PR to apply it accurately:

# Get the unreleased commit SHA for the writing-motoko changes
# The PR was merged into caffeinelabs/motoko main — fetch the current main tip
curl -s "https://api.github.com/repos/caffeinelabs/motoko/git/ref/heads/main" | python3 -c "import sys,json; print(json.load(sys.stdin)['object']['sha'])"

# Then fetch the skill file at that SHA
curl -s "https://raw.githubusercontent.com/caffeinelabs/motoko/<sha>/.agents/skills/writing-motoko/SKILL.md"

When updating the upstream comment block in skills/motoko/SKILL.md, note the commit SHA from the merged PR (not a release tag). Use the format:

<!-- Upstream: https://github.com/caffeinelabs/motoko
     Tag: 1.7.0  Commit: <new-sha-from-main>
     ...
     Last synced: <today> -->

Since this is a pre-release sync, the tag stays 1.7.0 (the last released tag) and the commit SHA updates to the main tip.


3. Apply improvements from caffeinelabs/mops#530 to skills/mops-cli/SKILL.md

caffeinelabs/mops#530 made these changes to .agents/skills/mops-cli/SKILL.md:

  • Mark as experimental: mops migrate, next directory field in mops.toml, and build-limit field
  • Simplify recommended workflow: The recommended [canisters.backend.migrations] block should show only chain + optional check-limit. Remove build-limit and next from the recommended example (they're experimental).
  • Version bumps in example mops.toml / config blocks:
    • moc: 1.5.1 → 1.7.0
    • lintoko: 0.9.0 → 0.10.0
    • core: 2.2.0 → 2.5.0

Fetch the exact diff:

# Get current main SHA for caffeinelabs/mops
curl -s "https://api.github.com/repos/caffeinelabs/mops/git/ref/heads/main" | python3 -c "import sys,json; print(json.load(sys.stdin)['object']['sha'])"

# Fetch the skill file at that SHA
curl -s "https://raw.githubusercontent.com/caffeinelabs/mops/<sha>/.agents/skills/mops-cli/SKILL.md"

Update the upstream comment in skills/mops-cli/SKILL.md similarly: keep Tag: cli-v2.13.1, update commit SHA to the current main tip, update Last synced date.


4. Validate and open a PR

npm run validate

Fix any errors. Open a PR targeting main with:

  • Title: chore: sync upstream improvements from caffeinelabs/motoko#6083 and mops#530
  • Reference this issue

No eval results are required since no new pitfalls or behaviors are being added — only existing content from upstream + trimming the ownership comment.


Going forward

Once this PR merges, the next time upstream cuts a release:

  • sync-upstream.yml will fire and open a sync PR
  • The diff will be small (most content already aligned)
  • The ownership comment accurately reflects what to protect

No action needed from this issue beyond the tasks above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions