Skip to content

Commit f5a7dd4

Browse files
committed
docs(bailian-cli): Update SKILL.md to reference new pre-flight checklist procedure
1 parent 07dafc0 commit f5a7dd4

2 files changed

Lines changed: 27 additions & 38 deletions

File tree

skills/bailian-cli/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ description: >-
1717
1818
## Version & updates (agent — do this BEFORE any other action)
1919

20-
**MANDATORY:** Before running any `bl` command, follow [`assets/versioning.md`](assets/versioning.md). If versions mismatch, ask the user whether to upgrade — do not proceed silently.
20+
**MANDATORY:** Before running any `bl` command, complete the **Agent pre-flight checklist** in [`assets/versioning.md`](assets/versioning.md). Do NOT run any `bl` command until the checklist is complete. If versions mismatch, ask the user whether to upgrade — do not proceed silently.
2121

2222
## Command reference (authoritative)
2323

skills/bailian-cli/assets/versioning.md

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,37 @@
88
agent** (non-TTY stderr), so the user never learns their `bl` is outdated. The
99
agent must take over that responsibility.
1010

11-
Run this flow **once per session**, before the first `bl` command.
11+
## Agent pre-flight checklist (MANDATORY)
1212

13-
---
14-
15-
## 1. Align the skill with the installed CLI
13+
**Do NOT run any `bl` command until you complete this checklist.** Run it **once per session**, before the first `bl` command. Cache the result — do not re-check before every command.
1614

17-
1. **Skill version**`metadata.version` in this skill's `SKILL.md` frontmatter.
18-
2. **CLI version**`bl --version` (output `bl X.Y.Z`; compare only `X.Y.Z`).
19-
3. If the two strings **differ**, refresh the skill first:
15+
1. Read this skill's version from `SKILL.md` frontmatter: `metadata.version`.
16+
2. Check the installed CLI version:
2017
```bash
21-
npx skills add modelstudioai/cli --all -g -y
18+
bl --version
2219
```
20+
If this fails, see [Missing `bl`](#missing-bl) below.
21+
3. Compare the two versions (ignore the `bl` prefix; compare only `X.Y.Z`):
22+
- If `metadata.version``bl --version`, refresh the skill before doing anything else:
23+
```bash
24+
npx skills add modelstudioai/cli --all -g -y
25+
```
26+
- Do not trust a stale `reference/` when versions mismatch — flags may be wrong.
27+
4. Check the latest published CLI version:
28+
```bash
29+
npm view bailian-cli version
30+
```
31+
5. If the installed `bl` is **older** than the latest npm version, **STOP** the current task and **ask the user** (report skill version, installed CLI version, and npm latest):
32+
> A newer version of bl is available (current: X.Y.Z, latest: A.B.C). Upgrade before continuing?
33+
- **Do NOT auto-upgrade silently** — the user decides.
34+
- If the user agrees: run `bl update`, then continue. (`bl update` upgrades `bailian-cli` via npm and, on success, also runs `npx skills add modelstudioai/cli --all -g -y` to keep the skill in lockstep across all agent apps.)
35+
- If the user declines: continue with the current version and note it in the summary.
36+
- If `npm view` / `bl update` fails (offline, registry blocked, permission): continue with the current `bl` and tell the user it could not be updated.
37+
6. Only proceed with the user's actual task after the above is resolved.
2338
24-
Do not trust a stale `reference/` when versions mismatch — flags may be wrong.
25-
26-
## 2. Check the CLI against the latest published release
27-
28-
```bash
29-
npm view bailian-cli version # latest on npm
30-
```
31-
32-
Compare with `bl --version`. If the installed `bl` is **older** than the latest:
33-
34-
```bash
35-
bl update
36-
```
37-
38-
`bl update` upgrades `bailian-cli` via npm and, on success, also runs
39-
`npx skills add modelstudioai/cli --all -g -y` to keep the skill in lockstep across all agent apps.
40-
41-
## 3. Update policy — always ask first
42-
43-
- When any version mismatch is detected, **stop and ask the user before proceeding**.
44-
- Report: skill version, installed CLI version, and npm latest.
45-
- Ask: "A newer version of bl is available (current: X.Y.Z, latest: A.B.C). Upgrade before continuing?"
46-
- **Do NOT auto-upgrade silently** — the user decides.
47-
- If the user agrees, run `bl update`, then continue the task.
48-
- If the user declines, continue with the current version and note it in the summary.
49-
- Do this **at most once per session** (cache the result; do not re-check before every command).
50-
- If `npm view` / `bl update` fails (offline, registry blocked, permission), do **not** block the task — continue with the current `bl` and tell the user it could not be updated.
39+
---
5140
52-
## 4. Missing `bl`
41+
## Missing `bl`
5342
5443
If `bl --version` fails, install the CLI and skill:
5544
@@ -58,7 +47,7 @@ npm install -g bailian-cli
5847
npx skills add modelstudioai/cli --all -g
5948
```
6049
61-
## 5. Mention it in the task summary
50+
## Mention it in the task summary
6251
6352
If you ran `bl update`, include it in your end-of-task summary (see
6453
[SKILL.md → Summarize what you did](../SKILL.md#summarize-what-you-did)), e.g.

0 commit comments

Comments
 (0)