08 · update-cli-without-cli
本场景验证什么
--without={module} 标志(及其等价的 agent prompt 形式)在 update 时真的会移除一个可选模块——包括删除该模块在磁盘上的文件, 而不仅仅是把它标记为"今后跳过"。
这是针对最常见用户诉求的回归测试:
"我上周安装 Archon 时带上了 cli 模块,但我们的 CI 镜像不能装 Node。能不能只把 CLI 卸掉,而不必把 Archon 整个卸载?"
可以。本场景就是证明。
测试环境
| Fixture | 场景 01 的产物(已安装 cli 模块) |
| IDE | Cursor |
| OS | 与场景 01 相同 |
| Archon 来源 | https://aaep.site/manifest.json |
| 受测 manifest 版本 | v0.1.0(不需要版本号上调) |
前置条件
- 场景 01 ✅,且包含
cli模块(默认)。 tools/archon-cli/已在磁盘上存在。git status干净。
操作步骤
text
1. In Cursor, paste exactly:
hi archon, update yourself but without the cli module
2. Or equivalently via CLI:
npx @archon/cli@latest update --without=cli --yes
3. The agent / CLI prints a planned-changes table that should include:
- REMOVE tools/archon-cli/... (every cli file)
- KEEP .archon/... (core unchanged)
- KEEP .cursor/... (binding unchanged)
4. Confirm.
5. Verify tools/archon-cli/ no longer exists.
6. Verify .archon/manifest.md or wherever opted-in modules are
tracked reflects "cli: not installed".预期结果
| 检查项 | 期望 |
|---|---|
tools/archon-cli/ 已被移除 | yes |
| 其他模块未被触动 | yes |
.archon/drift.md 行 | 未变化 |
.archon/VERSION | 未变化 |
后续 archon sync(场景 09)将 cli 报告为 "not installed"——而不是 "0/N ok" | yes |
python3 scripts/archon-check.py --root . 退出码 | 0 |
npm run validate 退出码 | 0 |
Demo 录制
Recording coming soon
update-cli-without-cli.mp4IDE chat-panel walkthroughdocs/public/videos/update-cli-without-cli.mp4 once recorded. See videos/README for upload conventions. $ archon doctor .
[L1 Structural] OK
[L2 Contract] OK
[L3 Hints] OK
✔ Recording coming soon — placeholderdocs/public/asciinema/update-cli-without-cli.cast embedded via the asciinema-player web component. See asciinema/README for the recording command. 运行记录
下表由 sandbox runner (scripts/sandbox-run.mjs) 写入 docs/testing/sandbox/runs/update-cli-without-cli/ 的 JSON 实时渲染。要新增一行,请运行
bash
node scripts/sandbox-run.mjs --only=update-cli-without-cli| Started (UTC) | Manifest | Runner | Result | Duration | Notes | Record |
|---|---|---|---|---|---|---|
2026-05-06 10:24:37 UTC | v0.1.0 | cli | ❌ failing | 345 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-06 06:10:26 UTC | v0.1.0 | cli | ❌ failing | 349 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-06 00:55:45 UTC | v0.1.0 | cli | ❌ failing | 345 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-06 00:40:11 UTC | v0.1.0 | cli | ❌ failing | 353 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 15:00:36 UTC | v0.1.0 | cli | ❌ failing | 298 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 14:55:20 UTC | v0.1.0 | cli | ❌ failing | 354 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 14:22:55 UTC | v0.1.0 | cli | ❌ failing | 351 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 14:04:55 UTC | v0.1.0 | cli | ❌ failing | 339 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 14:00:02 UTC | v0.1.0 | cli | ❌ failing | 329 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 13:59:14 UTC | v0.1.0 | cli | ❌ failing | 348 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
2026-05-05 13:55:06 UTC | v0.1.0 | cli | ❌ failing | 346 ms | failed assertions: dir_exists: tools/archon-cli: missing dir: tools/archon-cli file_exists: tools/archon-cli/bin/archon.mjs: missing: tools/archon-cli/bin/archon.mjs | JSON |
已知局限
- 未测试稍后通过
--with=cli把 cli 加回来。这是一个值得单独添加的 场景(update-add-cli-back),等基础的移除路径绿了再补。 - 未测试移除一个 required(必需)模块——那种情况应当大声失败。 负向场景
update-without-required-fails是不错的后续补充。
交叉引用
- 协议页面:
/zh/setup/update§ "Module selection (--with / --without)" - Manifest:
/zh/setup/manifest— required 与 optional 模块对照表 - 前置:01 install-cursor-node
- 后续:任何后续的 09 sync-clean 运行都应当 把 cli 反映为 "not installed"。
json
{
"runnable": "cli",
"fixture": "fixtures/sandbox-node-ts",
"ide_platform": "cursor",
"prerequisites": [
{
"name": "archon install (no cli)",
"cli": "install",
"flags": [
"--without=cli"
]
}
],
"steps": [
{
"name": "archon update with cli",
"cli": "update",
"flags": [
"--with=cli"
]
}
],
"assertions": [
{
"dir_exists": "tools/archon-cli"
},
{
"file_exists": "tools/archon-cli/bin/archon.mjs"
}
]
}