Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .sopify/blueprint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## 当前焦点

<!-- sopify:auto:focus:start -->
- 当前活动 plan:无;`20260720_plain_language_output` 已完成 Skill 表达、产品页和图文收口,并通过 Sopify `2026-07-21` Release 与 `main / root` GitHub Pages 完成公开交付
- 当前活动 plan:`../plan/20260828_cursor_agent_cli_entry` 已完成 Cursor IDE + 本地 CLI 一次安装,以及 CLI 方案/开发/接续入口;本机安装和两轮 Cursor 独立审计通过,状态为 `ready_to_archive`。feat 分支已提交并 push,PR #73 已创建;尚未 finalize、合并或发布
- MCP tool plane 已完成 Codex-first 持久注册验证和 Claude 会话级只读调用验证,Qoder / Claude / Copilot 的后续持久注册仍按证据推进。
- P8 Protocol Kernel & Runtime Retirement 已归档至 `../history/2026-06/20260605_p8_protocol_kernel_runtime_retirement`。
- history 归档:已可用;最近归档:`../history/2026-07/20260720_plain_language_output`。
Expand All @@ -28,6 +28,7 @@
- [蓝图任务](./tasks.md)
- [Sopify 宿主接入规范 (Protocol v0)](./protocol.md)
- [Skill 标准对齐蓝图](./skill-standards-refactor.md)
- [Cursor Agent CLI 一次安装方案](../plan/20260828_cursor_agent_cli_entry/plan.md)
- [变更历史](../history/index.md)
- 最近归档:`../history/2026-07/20260720_plain_language_output`
<!-- sopify:auto:read-next:end -->
4 changes: 2 additions & 2 deletions .sopify/blueprint/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ P4b 减重和 P4c 宿主消费治理的红线边界。只冻结 artifact / schem

> **未列入面默认可删**:`state/sessions/*`、`state/last_route.json`、runtime 内部模块边界、route name 全集、output 渲染文案措辞均为 runtime 内部实现,不在 keep-list 内。P4b 减重时可自由处置。

`host_support` 只声明官方适配器能把 Skill 语义交付到对应宿主的支持界面并由宿主消费。它不等同于原生 Skill discovery,也不证明该宿主已经完成 E2E;支持等级、已验证能力和入口形态继续由 `HostCapability` 表达。当前五个内置 Skill 面向 `codex / claude / qoder / copilot / cursor`,其中 Copilot 通过单文件展开消费Cursor IDE 通过用户 Plugin Rule 与全局 Skill 树拆分消费;Agent CLI 只保留手工 Skill 与用户 Hook 兼容面
`host_support` 只声明官方适配器能把 Skill 语义交付到对应宿主的支持界面并由宿主消费。它不等同于原生 Skill discovery,也不证明该宿主已经完成 E2E;支持等级、已验证能力和入口形态继续由 `HostCapability` 表达。当前五个内置阶段 Skill 面向 `codex / claude / qoder / copilot / cursor`,其中 Copilot 通过单文件展开消费Cursor IDE 通过用户 Plugin Rule 进入,本地 Agent CLI 默认安装 managed-first 顶层 Skill,选中后读取同一 Rule,并与 IDE 共用阶段 Skill 树、payload 与用户 Hooks。CLI 模型选择属于 best-effort,安装事实不替代行为证据


## Output Rendering Audit — *[pre-P8 legacy reference]*
Expand Down Expand Up @@ -504,7 +504,7 @@ output.py 渲染层逐字段分类。只做分类,不做改造决策(改造
| Claude | `protocol_verified` | `install.sh --target claude:zh-CN` | CONTINUATION + INTERACTION + AUDIT | 已验证 |
| Qoder | `protocol_verified` | `install.sh --target qoder` | CONTINUATION + INTERACTION + AUDIT | W3.1-W3.3 已验证 |
| Copilot | `baseline_supported` | `install.sh --target copilot` | PROMPT_ONLY | Prompt-only |
| Cursor | `baseline_supported` | `install.sh --target cursor` | PROMPT_ONLY + HOOKS | IDE user Plugin Rule + global Skills/payload + user-level `~/.cursor/hooks.json`; observable IDE baseline evidence, CLI manual Skills only |
| Cursor | `baseline_supported` | `install.sh --target cursor` | PROMPT_ONLY + HOOKS | IDE user Plugin Rule + managed-first CLI entry + shared Skills/payload + user-level `~/.cursor/hooks.json`; IDE/CLI behavior evidence remains separate |

### 契约消费矩阵(P8 2-file state model)

Expand Down
79 changes: 79 additions & 0 deletions .sopify/plan/20260828_cursor_agent_cli_entry/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: Cursor Agent CLI 顶层入口与一次安装产品化
plan_id: 20260828_cursor_agent_cli_entry
status: done
lifecycle_state: ready_to_archive
level: standard
created: 2026-08-28
updated: 2026-08-29
archive_ready: true
---

# Cursor Agent CLI 顶层入口与一次安装产品化

就绪状态: Ready
依据: 用户已确认 managed-first 口径,并授权先优化本机 CLI 顶层 Skill、安装最新版、经 Cursor 独立审计后,再纳入现有 Cursor 一次安装产品链;不新增 launcher、项目 Rule、runtime 或独立 CLI target。

## Context / Why

Cursor IDE 已通过用户级 Always Plugin Rule 获得 Sopify 顶层协议。2026-08-28 的本机实验进一步证明 `agent` CLI 可以发现 `~/.cursor/skills/sopify/SKILL.md`,并通过该薄入口读取已安装 Plugin Rule、路由五个阶段 Skill。

受控实验不等于稳定产品能力。安装后的三个真实用户会话中,顶层 Skill 只自动命中一次;命中会话还出现了入口 Skill 与业务素材并行读取,以及 quick-fix 从默认应用修改扩展到缓存删除和 Helper App 持久化、未重新停车的问题。当前顶层 Skill 只有用户目录单份副本,仓库安装源、升级保护、Doctor、双语文档与产品声明均未纳入;重新运行现有 Cursor 安装会删除这份本机入口。

## Scope

- 第一层:按真实使用证据优化本机中文 CLI 顶层 Skill,清理旧副本并安装唯一最新版;保持入口短小、结构清晰、语言通顺。
- 第一层验证:校验 Skill 结构与安装哈希,完成 managed 请求前向测试,然后交给 Cursor 在独立标签审计;不认可则按审计结论做最小修正并复验。
- 第二层:将中英文 CLI 顶层 Skill 纳入 canonical source,使现有 `cursor:zh-CN` / `cursor:en-US` 一次安装默认同时覆盖 IDE 与本地 Agent CLI。
- 第二层验证:补安装完整性、升级/重装、Doctor、IDE 回归和 CLI managed 流程证据;实现完成后再次交给 Cursor 独立审计。
- 同步受影响的 Cursor 接入文档、双语产品说明、Changelog 与稳定 blueprint 事实;保持支持档位和未验证边界准确。

## Approach

保留“薄 CLI 入口 → 读取已安装 Plugin Rule → 路由现有阶段 Skills”的结构。顶层 Skill 的 description 从“任何软件请求”收窄为 managed-first 高信号触发,突出 `.sopify`、`~go`、分析/设计/开发、继续/接续/恢复和 finalize/收口;普通咨询不强制触发,也不据此声称已进入 Sopify。

Plugin Rule 只补一个共享边界:当已授权动作扩展为新的用户级或系统级持久化、删除操作时重新停车确认。产品化复用现有 Cursor 用户级安装与 `copytree`,把顶层 Skill 加入 canonical 双语源和安装必需路径,不增加新 target、安装参数、能力枚举或运行时组件。

## Waves / Steps

- [x] W1:完成本机中文顶层 Skill 受控实验,并保存旧版本 receipts。
- [x] W2:根据近期真实会话优化本机 Skill,安装唯一最新版并完成 Cursor 独立审计。
- [x] W3:把中英文入口纳入一次安装、Doctor/测试和用户文档,保持 IDE/CLI 证据分离。
- [x] W4:执行目标测试、全量回归、CLI managed 前向观察和第二次 Cursor 独立审计;IDE/CLI 行为证据继续分开。
- [x] W5:按验证结论同步稳定知识并更新为 `ready_to_archive`;不自动 finalize、commit、push 或发布。

## Key Decisions

- 采用 managed-first:只保证 Sopify/managed 请求的顶层入口,大部分相关场景应自然触发;普通咨询不强制。
- 用户仍只运行一次 `--target cursor:<language>`;IDE 与本地 CLI 共用阶段 Skills、payload 与 Hooks,但入口机制和行为证据分开声明。
- 本机 Skill 与产品源使用同一正文,不保留旧版、兼容副本或额外路由文件。
- 自动 Skill 选择按 best-effort 声明;安装存在、用户已读已用和模型自述均不单独证明稳定行为。
- Cursor 保持 `BASELINE_SUPPORTED`;Cloud Agent、跨模型一致性和 `PROTOCOL_VERIFIED` 升级不在本轮承诺内。

## Constraints / Not-in-scope

- 不新增 `cursor-cli` target、`--with-cursor-cli`、launcher、项目 `.cursor/rules`、`AGENTS.md`、Custom Mode、MCP 或 runtime。
- 不修改 Cursor settings、CLI config、代理、模型、账号、API Key、钥匙串或 Cloud Agent。
- 不重构五项阶段 Skill、writer、state schema、Hook 体系或 HostCapability 架构。
- 不把通用问答未命中视为失败;只对 managed 触发、读取顺序、协议消费和副作用边界做验收。
- 不保存含敏感内容的完整 transcript;正式证据记录 session id、受限 tool trace 摘要、用户观察和 digest。

knowledge_sync:
project: skip
background: skip
design: required
tasks: skip

## Status / Progress

- [x] 本机旧 Skill、受控 receipts、真实会话命中率和现有安装覆盖行为已完成批判审计。
- [x] 用户确认 managed-first、一次安装默认支持 IDE + CLI、不过度设计,并要求两阶段均经 Cursor 独立审计。
- [x] 第一层本机 Skill 优化与审计:当前唯一 Skill SHA-256 为 `d892a90fdb7c455367d870e5b47f454a422d578109919d93c9a68eb5fd0beee9`;Cursor 首审不认可读取顺序只在正文,修正 description 后复审认可。
- [x] 第二层产品化实现:中英文顶层 Skill、一次安装内容校验、旧入口清理、Doctor 必需路径、共享 Rule 边界和用户文档已完成;目标测试与全量 `312 passed / 78 subtests` 通过。
- [x] 跨宿主污染审计与修正:Cursor 首审不认可专用入口进入共享 Skill 树;现已改为 host-specific 双语模板,补 Codex/Claude/Qoder 负向测试并恢复 shared-tree golden。
- [x] 第二层 Cursor 最终复审认可,无待修项;最终全量回归为 `313 passed / 81 subtests`。
- [x] 用户已授权在 `feat/cursor-agent-cli-entry` 本地 commit 并 push 同名 feat 分支;不包含 finalize、合并或发布。

## Next

实现与独立审计均已完成。按用户授权将当前结果 commit 并 push 到 `feat/cursor-agent-cli-entry`;只有显式 `~go finalize` 才归档,合并与发布继续需要单独授权。
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"evidence": {
"baseline_greeting_sha256": "5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03",
"demo_root": "/private/tmp/sopify-cursor-cli-entry-demo-20260828",
"installed_skill_sha256": "bbec80a93fd1acf049e7a5539930d7c93337e60dbfb97ce356f48fd4e9ffdafd",
"product_source_diff": "none",
"repository_regression": "311 passed, 78 subtests"
},
"provenance": {
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:576bf51018ab71222cacb7e8e4d7b048afa04eb3c6ba60908be4b33a3fce4b8b",
"receipt_id": "exec_001",
"scope": "local Cursor Agent CLI entry probe",
"writer": "sopify_writer"
},
"timestamp": "2026-08-28T13:39:48+00:00",
"verdict": "local_probe_ready"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"evidence": {
"cli_config_note": "Cursor Agent later refreshed its own dynamic CLI cache; this is not attributed to the Sopify installer.",
"cli_config_sha256_before_and_immediately_after_installer": "406ef6519b0fbd8bca8f8e36ea334c171833f91a7cd36aa6a31c0227b7ec496e",
"cursor_install_checks": {
"cursor_hooks_present": "pass",
"cursor_plugin_present": "pass",
"global_skill_tree_present": "pass",
"payload_present": "pass"
},
"installed_skill_sha256": "d892a90fdb7c455367d870e5b47f454a422d578109919d93c9a68eb5fd0beee9",
"installed_sopify_version": "2026-08-22.134737",
"skill_validation": "passed",
"stale_top_level_skill_copies": 0
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:11479834b277811893455f73d63e30144d99ac34a9ec0e7bfa5a012ef0052208",
"receipt_id": "exec_002",
"scope": "local Cursor CLI Skill update"
},
"timestamp": "2026-08-29T14:30:38+00:00",
"verdict": "local_cli_skill_updated"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"evidence": {
"canonical_entry_paths": [
"skills/zh/skills/sopify/SKILL.md",
"skills/en/skills/sopify/SKILL.md"
],
"cli_config_installer_observation": "unchanged across the final product install; Cursor Agent itself updates dynamic cache fields during sessions",
"installed_cursor_checks": {
"cursor_cli_behavior": "BLACK_BOX_NOT_VERIFIED",
"cursor_hooks_present": "pass",
"cursor_ide_behavior": "BLACK_BOX_NOT_VERIFIED",
"cursor_plugin_present": "pass",
"global_skill_tree_present": "pass",
"payload_present": "pass"
},
"installed_skill_sha256": "d892a90fdb7c455367d870e5b47f454a422d578109919d93c9a68eb5fd0beee9",
"installer_contract": {
"new_target_or_flag": false,
"repeat_install_action": "skipped",
"root_skill_content_verified": true,
"stale_local_entry_replaced": true,
"target": "cursor:<language>"
},
"tests": {
"full": "312 passed, 78 subtests",
"git_diff_check": "passed",
"golden_snapshots": "24 passed",
"targeted": "93 passed, 27 subtests",
"version_consistency": "passed"
}
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:1dd10d17b6cba52a06ae75d3709e34103b25b187a46107e00b3372495cd3a592",
"receipt_id": "exec_003",
"scope": "Cursor IDE and local Agent CLI one-install productization"
},
"timestamp": "2026-08-29T14:38:42+00:00",
"verdict": "cursor_cli_one_install_productized"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"evidence": {
"correction": {
"cursor_installer_writes_root_skill_separately": true,
"en_source": "skills/en/cursor-cli-skill.md.template",
"non_cursor_negative_hosts": [
"codex",
"claude",
"qoder"
],
"shared_tree_golden_restored": true,
"shared_tree_root_skill_present": false,
"zh_source": "skills/zh/cursor-cli-skill.md.template"
},
"cursor_audit": {
"dispatch_id": "ctx_750e36ccddfc",
"finding": "Cursor-only root Skill was placed in the shared host Skill tree",
"message_id": "msg_63e9bc828252",
"verdict": "not_accepted"
},
"installed_skill_sha256": "d892a90fdb7c455367d870e5b47f454a422d578109919d93c9a68eb5fd0beee9",
"repeat_install_action": "skipped",
"tests": {
"focused": "73 passed, 30 subtests",
"full": "313 passed, 81 subtests",
"git_diff_check": "passed"
}
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:1dd10d17b6cba52a06ae75d3709e34103b25b187a46107e00b3372495cd3a592",
"receipt_id": "exec_004",
"scope": "cross-host isolation correction",
"verifier_host": "cursor"
},
"timestamp": "2026-08-29T14:49:30+00:00",
"verdict": "cursor_cli_entry_isolated_from_shared_host_tree"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"evidence": {
"branch": "feat/cursor-agent-cli-entry",
"commit_authorized": true,
"cursor_final_review": "accepted with no remaining findings",
"finalize_authorized": false,
"last_full_test_result": "313 passed, 81 subtests",
"merge_authorized": false,
"push_authorized": true,
"release_authorized": false
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:9a481e9161773c7d3ccb43aba20c0242e7e6dc85fc9a1861d93abdaf8746bf40",
"receipt_id": "exec_005",
"scope": "local commit and feature-branch push authorization"
},
"timestamp": "2026-08-29T15:03:13+00:00",
"verdict": "feature_branch_delivery_authorized"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"evidence": {
"cases": {
"analyze_design": "pass",
"consult": "pass",
"develop": "pass"
},
"installed_skill_sha256": "bbec80a93fd1acf049e7a5539930d7c93337e60dbfb97ce356f48fd4e9ffdafd",
"product_source_diff": "none",
"repository_regression": "311 passed, 78 subtests",
"transcript_sha256": {
"analyze_design": "26b0f7c2c1765f4714fc543c9f01cf2c2461861db97cfd9b2b44a786cdb1a293",
"consult": "a7eb73fa5db21e7fcd3c3ea31e86e590e684dd66093964328ab7cbe9a371e5d2",
"develop": "e7932475f303926bdaf88c5191f2c24396896abd05cec825aff294f238c73bec"
},
"unverified_boundaries": [
"Cursor IDE behavior after local root Skill install",
"cross-model stability",
"bilingual product installation"
],
"verified_boundaries": [
"automatic root Skill selection in three fresh Cursor CLI sessions",
"consult read-only",
"Analyze score and Design level scripts",
"four-step continuation",
"sopify_writer state/handoff/receipts",
"state ignore",
"ready_to_archive without commit/finalize"
]
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:6060df26c8bfdae38577e4020d234a36dac2f1544b86f20e6e4639503608220b",
"receipt_id": "verify_001",
"scope": "local Cursor Agent CLI entry experiment"
},
"timestamp": "2026-08-28T14:46:07+00:00",
"verdict": "accept_local_cli_entry"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"evidence": {
"correction": "moved the Skill and Plugin Rule first-read constraint into the frontmatter description",
"first_cursor_audit": {
"dispatch_id": "ctx_2ffacf6dfec5",
"finding": "initial read-order constraint was absent from description",
"verdict": "not_accepted"
},
"forward_observation": [
"Cursor selected the sopify root Skill for the managed audit request",
"the installed Plugin Rule was read before business execution",
"the reviewing Cursor worker made no task-file mutations"
],
"installed_skill_sha256": "d892a90fdb7c455367d870e5b47f454a422d578109919d93c9a68eb5fd0beee9",
"second_cursor_audit": {
"dispatch_id": "ctx_138ea9a1430b",
"message_id": "msg_d5529bd8e813",
"verdict": "accepted"
}
},
"provenance": {
"host": "codex",
"plan_id": "20260828_cursor_agent_cli_entry",
"plan_version": "sha256:11479834b277811893455f73d63e30144d99ac34a9ec0e7bfa5a012ef0052208",
"receipt_id": "verify_002",
"scope": "local Cursor CLI Skill independent review",
"verifier_host": "cursor"
},
"timestamp": "2026-08-29T14:30:38+00:00",
"verdict": "accept_local_cli_skill_after_cursor_review"
}
Loading
Loading