@wirecat/cli-base 0.112.0 → 0.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,21 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
8
8
  Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
9
9
  [`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
10
10
 
11
+ ## 0.113.0 — 17.11.2026
12
+
13
+ ### Added
14
+
15
+ - **A CLI's README has one first row of links: Docs, Install and Usage.**
16
+ [A new rule](docs/standards/docs.md#wc-doc-24--a-clis-readme-links-docs-install-and-usage-in-its-first-row) sets
17
+ the row under the hero line, with labels in the README's language and a community link only where the tool's
18
+ audience uses it. Today each CLI has its own row (Examples, Comparison, Discord or none), so a reader has to look
19
+ for the install page in a different place each time. It is checked in review, so no CLI fails a check. Each CLI
20
+ moves to the row at its next README change.
21
+ - **A parity difference can name the one CLI whose value differs.** Beside `absent` and `only`, an entry in a parity
22
+ group may say `differs: "<cli>"`: that CLI's summary or value name is its own by design, and every other CLI
23
+ compared must still agree. memo uses it for its `mcp` and `mcp serve` summaries, which name memo instead of a
24
+ profile (cli-memo 0.143.0). Before this, every CLI's `cli-dev audit` failed on those two summaries.
25
+
11
26
  ## 0.112.0 — 17.11.2026
12
27
 
13
28
  ### Added
package/dist/dev/audit.js CHANGED
@@ -285,7 +285,7 @@ export const auditClis = (inputs, options, rules = AUDIT_RULES) => {
285
285
  return findings
286
286
  .filter((finding) => finding.rule === entry.rule && finding.target.endsWith(` ${entry.target}`))
287
287
  .map((finding) => ({ ...entry, group: group.name, target: finding.target, expected: finding.message }));
288
- const cli = entry.absent ?? entry.only;
288
+ const cli = entry.absent ?? entry.only ?? entry.differs;
289
289
  if (!cli)
290
290
  return [{ group: group.name, ...entry }];
291
291
  const matching = findings.filter((finding) => {
@@ -297,12 +297,14 @@ export const auditClis = (inputs, options, rules = AUDIT_RULES) => {
297
297
  .map(([, value]) => value);
298
298
  if (mine === undefined || others.length === 0)
299
299
  return false;
300
- return entry.absent
301
- ? mine === "absent" && new Set(others).size === 1
302
- : mine !== "absent" && others.every((value) => value === "absent");
300
+ if (entry.absent)
301
+ return mine === "absent" && new Set(others).size === 1;
302
+ if (entry.only)
303
+ return mine !== "absent" && others.every((value) => value === "absent");
304
+ return mine !== "absent" && new Set(others).size === 1 && !others.includes(mine) && !others.includes("absent");
303
305
  });
304
306
  if (matching.length === 0 && clis.includes(cli))
305
- problems.push(`stale difference in ${group.name}, no such divergence — remove it: ${entry.rule} ${entry.target} (${entry.absent ? "absent" : "only"} in ${cli})`);
307
+ problems.push(`stale difference in ${group.name}, no such divergence — remove it: ${entry.rule} ${entry.target} (${entry.absent ? "absent" : entry.only ? "only" : "differs"} in ${cli})`);
306
308
  return matching.map((finding) => ({
307
309
  ...entry,
308
310
  group: group.name,
@@ -32,6 +32,8 @@ declare const parityGroupSchema: v.StrictObjectSchema<{
32
32
  readonly absent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>, undefined>;
33
33
  /** The one CLI that has the path or flag by design; every other CLI compared must lack it. */
34
34
  readonly only: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>, undefined>;
35
+ /** The one CLI whose value (a summary, a value name) differs by design; every other CLI compared must agree. */
36
+ readonly differs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>, undefined>;
35
37
  readonly reason: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, v.MinLengthAction<string, 10, "say why, in a sentence">]>;
36
38
  /** Warns from 14 days before and fails 14 days after, as a lint override does. */
37
39
  readonly review_after: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, "a date, YYYY-MM-DD">]>, undefined>;
@@ -61,21 +61,27 @@ const parityGroupSchema = v.strictObject({
61
61
  absent: v.optional(word),
62
62
  /** The one CLI that has the path or flag by design; every other CLI compared must lack it. */
63
63
  only: v.optional(word),
64
+ /** The one CLI whose value (a summary, a value name) differs by design; every other CLI compared must agree. */
65
+ differs: v.optional(word),
64
66
  reason: v.pipe(text, v.minLength(10, "say why, in a sentence")),
65
67
  /** Warns from 14 days before and fails 14 days after, as a lint override does. */
66
68
  review_after: v.optional(v.pipe(v.string(), v.isoDate("a date, YYYY-MM-DD"))),
67
69
  })),
68
70
  });
71
+ /** Which of `absent`, `only` and `differs` a difference names: the CLI it measures by name. */
72
+ const kindOf = (entry) => ["absent", "only", "differs"].filter((one) => entry[one] !== undefined);
69
73
  export const defineParityGroups = (input) => parseRegistry("parity groups", v.array(parityGroupSchema), input, (groups) => [
70
74
  ...duplicates(groups.map((group) => group.name)).map((name) => `"${name}" is listed twice`),
71
75
  ...groups.flatMap((group) => [
72
76
  ...duplicates(group.differences.map((entry) => `${entry.rule} ${entry.target}`)).map((both) => `${group.name}: "${both}" is listed twice`),
73
77
  ...group.differences
74
- .filter((entry) => (entry.absent || entry.only) && entry.expected)
75
- .map((entry) => `${group.name}: "${entry.target}" has \`${entry.absent ? "absent" : "only"}\`, which measures the values itself; drop \`expected\``),
78
+ .filter((entry) => kindOf(entry).length === 1 && entry.expected)
79
+ .map((entry) => `${group.name}: "${entry.target}" has \`${kindOf(entry)[0]}\`, which measures the values itself; drop \`expected\``),
76
80
  ...group.differences
77
- .filter((entry) => entry.absent && entry.only)
78
- .map((entry) => `${group.name}: "${entry.target}" has both \`absent\` and \`only\`; keep one`),
81
+ .filter((entry) => kindOf(entry).length > 1)
82
+ .map((entry) => `${group.name}: "${entry.target}" has ${kindOf(entry)
83
+ .map((one) => `\`${one}\``)
84
+ .join(" and ")}; keep one`),
79
85
  ]),
80
86
  ]);
81
87
  const MEMO_HAS_NO_PROFILES = [
@@ -91,6 +97,13 @@ const MEMO_HAS_NO_PROFILES = [
91
97
  reason: "memo has no profiles: it reads other CLIs' stores and selects their accounts with --source and --account " +
92
98
  "(https://github.com/WireCatLabs/cli-base/issues/390)",
93
99
  }));
100
+ /** cli-core's shared `mcp` summaries name the profile; memo, which has none, names itself (cli-memo 0.143.0). */
101
+ const MEMO_MCP_SUMMARIES = ["mcp", "mcp serve"].map((path) => ({
102
+ rule: "same-path-contract",
103
+ target: `${path}: summary`,
104
+ differs: "memo",
105
+ reason: "memo has no profiles, so its mcp commands serve memo's commands rather than a profile's",
106
+ }));
94
107
  const MEMO_DOCTOR_DEEP = {
95
108
  rule: "same-path-contract",
96
109
  target: "doctor --deep",
@@ -124,7 +137,7 @@ export const PARITY_GROUPS = defineParityGroups([
124
137
  name: "all",
125
138
  members: ["tg", "max", "memo", "drive", "zm", "wa"],
126
139
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "search", "notes", "meetings"],
127
- differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP],
140
+ differences: [...MEMO_HAS_NO_PROFILES, ...MEMO_MCP_SUMMARIES, MEMO_DOCTOR_DEEP],
128
141
  },
129
142
  // mail's `search messages` is cli-core's mail search, not the messengers' command: --complete took their 20-odd
130
143
  // differences as inherited (https://github.com/WireCatLabs/cli-base/issues/390). mail is compared everywhere else
@@ -133,7 +146,7 @@ export const PARITY_GROUPS = defineParityGroups([
133
146
  name: "mail-shared",
134
147
  members: ["tg", "max", "memo", "drive", "zm", "wa", "mail"],
135
148
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "notes", "meetings"],
136
- differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP],
149
+ differences: [...MEMO_HAS_NO_PROFILES, ...MEMO_MCP_SUMMARIES, MEMO_DOCTOR_DEEP],
137
150
  },
138
151
  // gcal is compared on what it already shares with every CLI; doctor, mcp, search and skill wait until the published
139
152
  // CLIs agree there (https://github.com/WireCatLabs/cli-base/issues/390), then gcal moves back into "all".
@@ -151,7 +164,7 @@ export const PARITY_GROUPS = defineParityGroups([
151
164
  name: "shared-roots",
152
165
  members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline", "pbx", "notion", "amo"],
153
166
  covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
154
- differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP],
167
+ differences: [...MEMO_HAS_NO_PROFILES, ...MEMO_MCP_SUMMARIES, MEMO_DOCTOR_DEEP],
155
168
  },
156
169
  // The CRM CLIs on cli-core's shared CRM commands. amo-cli (amoCRM and Kommo) is not on npm yet, so `audit --family`
157
170
  // skips it, as beeline. Only b24 has `leads` (amoCRM has no lead apart from a deal), `products` (amo leaves them for
@@ -40,7 +40,7 @@ the four steps that need a person. A new CLI is ready for its first release when
40
40
  | [Data model](data-model.md) | `DATA` | 9 | Core entities, entities and source records, `external_id`, field names, links and duplicates, files, calendar entries |
41
41
  | [Testing](testing.md) | `TEST` | 19 | Sandbox, no network, no real waits, one test time limit, leak tests, coverage, contracts, test matrix, parity, fakes as strict as the service |
42
42
  | [Security](security.md) | `SECR` | 24 | Secrets, logs, keyring, argv, error text, untrusted text, scanners, workflow hardening, reporting, OAuth sign-in and which app it uses, meeting secrets, keyring in moved-folder runs |
43
- | [Documents](docs.md) | `DOC` | 23 | User pages and developer pages, generated pages, current facts, changelog, repository page |
43
+ | [Documents](docs.md) | `DOC` | 24 | User pages and developer pages, generated pages, current facts, changelog, repository page |
44
44
  | [Comparisons](comparisons.md) | `CMP` | 11 | Which tools a comparison page lists, rows as user tasks, agents and safety, where others are better, proof of marks |
45
45
  | [Releases](releases.md) | `REL` | 16 | `bin/release`, the release lock, versions, the owner's yes, trusted publishing |
46
46
  | [CI](ci.md) | `CI` | 13 | Hooks, the pull request budget, full validation, monthly runs, conflict markers |
@@ -1,6 +1,6 @@
1
1
  # Documents
2
2
 
3
- <!-- cspell:ignore whatsapp -->
3
+ <!-- cspell:ignore whatsapp ydisk -->
4
4
 
5
5
  ## Scope
6
6
 
@@ -75,10 +75,10 @@ Rule ids on this page are `WC-DOC-<n>`. How to read a rule, how ids work and whi
75
75
  - **Why:** most readers open only the README, and it must take them from "what is this" to a first result. A reader
76
76
  decides whether to install from what the tool does for them, so the gains and the "why" come before the steps.
77
77
  - **Enforced by:** review only.
78
- - **Example:** follow tg-cli's README order: the hero line with what the reader gets, three bold gains, what you get
79
- (with an invented conversation), why this tool and a one-line link to the comparison, quick start, use it with your
80
- agent, what it can do, how it works, settings and permissions, security, when something goes wrong,
81
- documentation, development. The install command stays within the first two screens.
78
+ - **Example:** follow tg-cli's README order: the hero line with what the reader gets, the links row (WC-DOC-24), three
79
+ bold gains, what you get (with an invented conversation), why this tool and a one-line link to the comparison, quick
80
+ start, use it with your agent, what it can do, how it works, settings and permissions, security, when something goes
81
+ wrong, documentation, development. The install command stays within the first two screens.
82
82
  - **Exceptions:** a library or a kit follows WC-DOC-23 instead.
83
83
  - **Applies to:** all CLIs. **Since:** cli-base 0.41.0. **Rulings:** NEED-500.
84
84
 
@@ -279,6 +279,36 @@ An agent that opens the skill carries SKILL.md in every later turn of its sessio
279
279
  - **Applies to:** cli-base, cli-core, cli-template and every other WireCat library or kit. **Since:** cli-base
280
280
  0.111.0. **Rulings:** none.
281
281
 
282
+ ### WC-DOC-24 · A CLI's README links Docs, Install and Usage in its first row
283
+
284
+ The first row of links sits right under the hero line. It has three links, in this order, with labels in the README's
285
+ own language:
286
+
287
+ - **Docs:** the tool's page on wirecat.dev once it exists, until then `docs/index.md`.
288
+ - **Install:** the site's install page for the tool once it exists, until then `docs/installation.md`.
289
+ - **Usage:** `docs/usage.md`.
290
+
291
+ A community link (Discord, Telegram or another) may follow as a fourth link, only where the tool's audience uses that
292
+ community. A link to examples or a comparison goes in the body, for example in "Why this tool".
293
+
294
+ - **Why:** a reader who arrives from npm, GitHub or a search looks for the same three things in every tool: what it
295
+ is, how to install it and how to use it. One row in one place lets them find each with one click. A community the
296
+ audience does not use is a dead end, so a tool for a mainly Russian-speaking audience has no Discord link.
297
+ - **Enforced by:** review only, check planned: a docs check that reads the first links row of the README.
298
+ - **Example:** ydisk-cli's README, below. The links are full GitHub addresses, since the npm package ships
299
+ `README.md` without `docs/` and a relative link breaks on npmjs.com. A README in Russian reads
300
+ "Документация · Установка · Использование".
301
+
302
+ ```html
303
+ <p align="center">
304
+ <a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/index.md">Docs</a> ·
305
+ <a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/installation.md">Install</a> ·
306
+ <a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/usage.md">Usage</a>
307
+ </p>
308
+ ```
309
+ - **Exceptions:** a library or a kit keeps its own links row under WC-DOC-23.
310
+ - **Applies to:** all CLIs. **Since:** cli-base 0.113.0. **Rulings:** none.
311
+
282
312
  ## Sources
283
313
 
284
314
  These documents explain the rules on this page in more detail. Where one of them disagrees with this page, this page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.112.0",
3
+ "version": "0.113.0",
4
4
  "description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",