Skip to content

Commit d8dad4c

Browse files
authored
chore: sync mops-cli skill from upstream cli-v2.14.0 (#221)
1 parent a953309 commit d8dad4c

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

.claude/upstream.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Upstream file paths are relative to `.agents/skills/<upstream-skill-name>/` in t
5252
## mops-cli
5353

5454
- **Upstream:** https://github.com/caffeinelabs/mops
55-
- **Tag:** cli-v2.13.2
56-
- **Commit:** 59d4c5f264ec4276bbe03d3df2d81fe3cd0e6352
57-
- **Last synced:** 2026-05-28
55+
- **Tag:** cli-v2.14.0
56+
- **Commit:** d448cdf90991c3164cafd8b6d1b39f433ad820b1
57+
- **Last synced:** 2026-06-16
5858
- **Upstream file:** `.agents/skills/mops-cli/SKILL.md`
5959
- **icskills-owned sections:** none — body is 1:1 with upstream; only frontmatter differs

evaluations/mops-cli.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@
7373
"Does NOT place warning flags in [build].args (those are build-only)"
7474
]
7575
},
76+
{
77+
"name": "Replica tests pocket-ic pin",
78+
"prompt": "I'm adding replica-mode tests (actor files / `// @testmode replica`) to my mops project and `mops test --mode replica` prints a warning about the dfx replica. How do I configure mops so it doesn't fall back to the deprecated dfx replica? Just the config change.",
79+
"expected_behaviors": [
80+
"Explains the warning is because `pocket-ic` is not pinned in `[toolchain]`, so mops falls back to the deprecated dfx replica",
81+
"Pins `pocket-ic` in the `[toolchain]` section of mops.toml (e.g. `pocket-ic = \"12.0.0\"`) OR uses `mops toolchain use pocket-ic 12.0.0`",
82+
"Pins a specific pocket-ic version rather than `latest` (latest may resolve to a version the bundled pic-js client doesn't support)",
83+
"Notes the same pin also applies to `mops bench` and `mops watch`"
84+
]
85+
},
7686
{
7787
"name": "Adversarial: file path to mops check",
7888
"prompt": "I want to type-check my canister. My main file is at src/backend/main.mo. I'll run: mops check src/backend/main.mo. Is that right?",

skills/mops-cli/SKILL.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: mops-cli
33
description: "Manage Motoko projects with the mops CLI — toolchain pinning, dependency management, type-checking, building, and linting. Use when working with mops.toml, mops.lock, running mops commands, adding/removing packages, pinning moc or lintoko versions, checking or building canisters, configuring moc flags, or setting up a new Motoko project."
44
license: Apache-2.0
5-
compatibility: "mops >= 2.13.0"
5+
compatibility: "mops >= 2.14.0"
66
metadata:
77
title: Mops CLI
88
category: Infrastructure
@@ -14,7 +14,7 @@ Opinionated guide for Motoko projects. Covers project config, dependency managem
1414

1515
## Key Principles
1616

17-
1. **No dfx** — always pin `moc` in `[toolchain]`. Use the newest `moc` version.
17+
1. **No dfx** — always pin `moc` in `[toolchain]`. Use the newest `moc` version. Pin `pocket-ic` too if you have replica tests or benchmarks (otherwise `mops test --mode replica`, `mops bench`, and `mops watch` fall back to the deprecated dfx replica and print a warning).
1818
2. **No `mo:base`** — it is deprecated. Always use `mo:core` (`import Array "mo:core/Array"`).
1919
3. **All config in `mops.toml`** — canisters, moc flags, toolchain versions, build settings.
2020
4. **Canister-centric workflow** — define all canisters in `[canisters]`; never pass file paths to `mops check`. Exception: library packages (no `[canisters]`) use file paths directly: `mops check src/**/*.mo`.
@@ -27,6 +27,7 @@ Opinionated guide for Motoko projects. Covers project config, dependency managem
2727
[toolchain]
2828
moc = "1.7.0"
2929
lintoko = "0.10.0"
30+
pocket-ic = "12.0.0" # only if you have replica tests / benchmarks
3031

3132
[dependencies]
3233
core = "2.5.0"
@@ -108,7 +109,7 @@ mops check -- -Werror # treat warnings as errors
108109

109110
**Always use canister names, not file paths.** Per-canister args from `mops.toml` are applied automatically.
110111

111-
`--fix` applies machine-applicable fixes from both moc and lintoko in one pass.
112+
`--fix` applies machine-applicable fixes from both moc and lintoko in one pass. Concurrent `--fix` runs (across processes) serialize automatically via an advisory lock at `.mops/fix.lock` — safe to invoke from multiple agents on the same project.
112113

113114
### `mops build`
114115

@@ -127,6 +128,7 @@ Produces `.wasm`, `.did`, and `.most` files in `[build].outputDir` (default `.mo
127128
mops toolchain use moc 1.7.0 # pin specific version
128129
mops toolchain use moc latest # pin latest version (non-interactive)
129130
mops toolchain use lintoko 0.10.0 # pin specific version
131+
mops toolchain use pocket-ic 12.0.0 # pin for replica tests / benchmarks (pin a specific version; `latest` may resolve to one the bundled pic-js client doesn't support)
130132
mops toolchain update moc # update to latest (requires existing [toolchain] entry)
131133
mops toolchain update # update all tools to latest
132134
mops toolchain bin moc # print path to binary
@@ -154,6 +156,7 @@ mops remove base
154156
mops outdated # list outdated dependencies (caret-bound)
155157
mops update # update all within caret bound (no major-version crossing)
156158
mops update core # update specific package within caret bound
159+
mops update --patch # restrict to patch bumps only (mutually exclusive with --major)
157160
mops update --major # allow updates that cross major versions
158161
mops sync # add missing / remove unused packages
159162
```
@@ -172,6 +175,8 @@ mops test --reporter verbose # show Debug.print output
172175
mops test --watch # re-run on file changes
173176
```
174177

178+
Replica tests (actor files or `// @testmode replica`) use `pocket-ic` from `[toolchain]`. With no pin they fall back to the deprecated `dfx` replica (warning printed) — pin `pocket-ic` in `[toolchain]` to silence it. Same applies to `mops bench` and `mops watch`.
179+
175180
### `mops lint`
176181

177182
Runs lintoko (also runs automatically as part of `mops check` when lintoko is in toolchain):

0 commit comments

Comments
 (0)