diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 7e0e045..4421c4d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -4,14 +4,14 @@ "name": "HelixHarness contributors" }, "metadata": { - "description": "Plugin marketplace for the HelixHarness repository, exposing the helixharness workflow plugin for Claude Code and Codex" + "description": "Plugin marketplace for the HelixHarness repository, exposing the helixharness workflow plugin for Claude Code, Codex, Cursor and OpenCode (macOS 2.3.2 Stable)" }, "plugins": [ { "name": "helix", - "description": "HelixHarness workflow plugin for Claude Code and Codex with commands and reusable skills", + "description": "HelixHarness workflow plugin for Claude Code, Codex, Cursor and OpenCode (macOS 2.3.2 Stable) with commands and reusable skills", "source": "./helixharness", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0" } ] diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json new file mode 100644 index 0000000..d29206f --- /dev/null +++ b/.cursor-plugin/marketplace.json @@ -0,0 +1,14 @@ +{ + "name": "helixharness-marketplace", + "owner": {"name": "HelixHarness contributors"}, + "metadata": {"description": "HelixHarness Cursor marketplace"}, + "plugins": [ + { + "name": "helix", + "description": "HelixHarness workflow skills for Cursor", + "source": "./helixharness", + "version": "1.1.0", + "license": "Apache-2.0" + } + ] +} diff --git a/README.md b/README.md index 3c6ed27..a3a3b74 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ > > Your team's engineering DNA, carried into AI development. -**HelixHarness helps your team build its own AI coding harness on Codex and Claude Code.** It brings your business knowledge, engineering rules and development workflow into the agent's work—from requirements through implementation, tests, review and archive. Verified lessons stay with the project, ready for the next feature. +**HelixHarness helps your team build its own AI coding harness on Codex, Claude Code, Cursor, [OpenCode (macOS Stable)](docs/opencode-testing.md) and [Qoder](helixharness/hosts/qoder/installer.md).** It brings your business knowledge, engineering rules and development workflow into the agent's work—from requirements through implementation, tests, review and archive. Verified lessons stay with the project, ready for the next feature. Start with the plugin. When you want to improve the harness itself, the optional **helixharness-platform** lets maintainers observe usage, compare framework versions and evaluate candidate improvements before adopting them. -**9 commands · Codex / Claude Code · Single repo / multi-repo Workspace · Apache-2.0** +**9 commands · Codex / Claude Code / Cursor / [OpenCode (macOS Stable)](docs/opencode-testing.md) / [Qoder](helixharness/hosts/qoder/installer.md) · Single repo / multi-repo Workspace · Apache-2.0** [Quick start](#quick-start) · [The name](#the-story-behind-the-name) · [Why HelixHarness](#why-helixharness) · [Framework iteration platform](#a-platform-for-iterating-on-helixharness) · [User guide](docs/user-guide.md) @@ -63,11 +63,11 @@ Knowledge accumulates as **reviewable repository documents**. You control what b ### 1. Install the plugin -Requirements: Python 3.10+, Git and a plugin-capable Codex or Claude Code installation. Make sure the host is signed in or has its model configuration set up and is working normally. +Requirements: Python 3.10+, Git and a plugin-capable Codex, Claude Code, Cursor, OpenCode installation (macOS, 2.3.2; see the [support matrix](docs/opencode-testing.md)) or Qoder Desktop / CLI. Make sure the host is signed in or has its model configuration set up and is working normally. -For macOS and native Windows setup, interpreter detection and host-specific requirements, see [platform support](docs/platform-support.md). Windows Codex uses PowerShell; Windows Claude Code uses Git for Windows Bash. +For macOS and native Windows setup, interpreter detection and host-specific requirements, see [platform support](docs/platform-support.md). Windows Codex uses PowerShell; Windows Claude Code uses Git for Windows Bash. Cursor native acceptance currently covers macOS; Windows Cursor is outside this release's verified scope. Qoder's Host Kit contract tests run in the CI matrix, but the Qoder App has no Windows acceptance yet and only the POSIX hook launcher exists. -After the repository is public, run the commands for your host in a terminal. No manual source clone is needed: +After the repository is public, install Codex and Claude Code plugins with the terminal commands below. Cursor uses the marketplace UI described afterward. Qoder installs through a locally built ZIP because it has no marketplace CLI. These marketplace routes do not require a manual source clone: ```bash # Codex @@ -81,24 +81,49 @@ claude plugin marketplace add https://github.com/didi/helixharness.git claude plugin install helix@helixharness-marketplace ``` +Cursor users install `helix` from their Cursor marketplace through **Customize → helix → Install**, then reload the window and open a new Agent. A team administrator first imports the published release repository into the team's marketplace. Cursor uses `/helix-init`, `/helix-propose`, etc. See [marketplace setup, optional Local installation and capability limits](docs/installation.md#cursor-preview). + +OpenCode installation was verified with 2.3.2: clone this repository and configure the absolute `helixharness/` subdirectory in `opencode.json(c)`. Follow the [local-directory installation steps](docs/installation.md#opencode-local-directory-installation-verified-with-232); this repository is not installed with native `plugin add`. + +**Qoder:** Qoder's App install tool only consumes a plugin ZIP, so build one locally and install it. Clone the repository, run `python3 scripts/package_qoder_plugin.py` inside `helixharness/` to produce `dist/helix-.zip`, then pick that ZIP in Qoder's **Extensions → Install local plugin** panel (or ask the assistant to call `qoder-settings.install_extension`). Open a new session afterwards — plugin manifests, skills, agents and hooks load at session start. Qoder has no marketplace CLI, so `/helix:update` is `unsupported`; upgrades reinstall a new ZIP. See the [Qoder installer](helixharness/hosts/qoder/installer.md) for packaging details, capability boundaries and acceptance checks. + +**OpenCode Stable support (macOS, 2.3.2):** See the [support matrix](docs/opencode-testing.md) for the current source candidate’s scope and boundaries. OpenCode 2.2.2 and 2.3.0 have automated compatibility coverage only. + +The plugin registers native `helix:` commands, `helix-` method skills and `helix-` roles. Commands, native `skill` tool results, Skill mentions and native Skill activation bind the requesting session's repository. Unbound Skill content is blocked when session lookup or directory validation fails. On 2026-11-20, OpenCode 2.3.2 with DeepSeek completed one synthetic single-repository Init → Propose → Apply → Archive lifecycle, with operator confirmations and a controlled contract amendment. On 2026-11-23, OpenCode 2.3.2 with DeepSeek also completed assisted synthetic two-repository Workspace and standalone UT runs; UT classification validation and protected atomic publication were subsequently fixed and passed a fresh real-model UT run without corrective operator prompts. [Targeted real-model tests on synthetic Workspaces](helixharness/opencode/tests/README.md#recovery-and-auxiliary-workflow-acceptance-2026-11-23) also verified native Apply and partial Archive cancellation followed by fresh-session recovery, plus dependent-dispatch blocking after an injected native context-hook failure. Full production-project acceptance, unattended protocol compliance and full TUI/desktop UI acceptance remain outstanding; see [targeted terminal UI acceptance](helixharness/opencode/tests/README.md#targeted-terminal-ui-acceptance-2026-11-23) for the tested scope. Workspace Apply uses `helix-worker` for `may_delegate` RepoJobs and requires `experimental.subagent_depth >= 2`; independent reviewers remain read-only leaf jobs. Insufficient depth blocks the RepoJob rather than bypassing review. + +The adapter uses native tool/session hooks but provides no equivalent SessionStart/Stop/failure/session-end business guarantee. `scripts/task_plan.py` atomically updates the canonical `tasks.md`. Explicitly consented telemetry records stage facts and workflow traces only; native conversations, token usage and unobserved tool counts remain unavailable. `/helix:update` uses the existing confirmation protocol for clean source checkouts with an explicit Git upstream, pins the approved commit and only fast-forwards. Dirty, detached or package-managed copies are not automatically updated. Init merges `AGENTS.md` without `.opencode/` settings; plugin-level checks run existing project linters after successful native write/edit/patch. Shell changes still require explicit checks. The d-d2c Claude skill-scoped Stop/PreToolUse guards do not run. Its [explicit OpenCode gate](helixharness/hosts/opencode/runtime.md) binds a fresh checkpoint to the actual native session and checks completion evidence; invoke it at the documented workflow transitions. It does not intercept arbitrary stops or establish browser/MasterGo authenticity. Mutation entry preflight observes registered tools and session-move API availability; permissions still require actual execution, and effective delegation depth remains unknown until native admission. + +See the [OpenCode installer](helixharness/hosts/opencode/installer.md) for binding checks and manual updates. + The root marketplace installs the `helixharness/` plugin, not the platform. For testing before publication or modifying the plugin, use [developer installation from local source](docs/installation.md#developer-installation). See [hook verification, updates and uninstall](docs/installation.md). ### 2. Run a small feature The product name is **HelixHarness**; its plugin ID and command namespace are **`helix`**. -Open a new agent session in the **application repository** you want to develop. Review the plugin hooks through the host's native interface, then enter these commands in the conversation: +Open a new agent session in the **application repository** you want to develop. On Claude Code, Codex, Cursor and Qoder, review the plugin hooks through the host's native interface; OpenCode registers its surfaces from the plugin package. Then enter the commands for your host in the conversation. + +Codex / Claude Code / OpenCode / Qoder: ```text /helix:init /helix:propose task-filter ./requirements/task-filter.md --loop ``` +Cursor: + +```text +/helix-init +/helix-propose task-filter ./requirements/task-filter.md --loop +``` + +Cursor uses `/helix-` throughout; Codex, Claude Code, OpenCode and Qoder use `/helix:`. On Qoder the nine entries come from the plugin's `hosts/qoder/skills/` thin entries rather than a native command surface, but the invocation text and arguments are the same. + Use the [self-contained task-filter example](examples/README.md) to get a starter project, requirement and acceptance check. `--loop` runs Propose → Apply → Archive, pausing for decisions or blockers. It does not publish or deploy your code. You can also run `/helix:propose`, `/helix:apply` and `/helix:archive` separately. See [all nine commands](docs/user-guide.md#commands). -Use `/helix:status` to inspect progress and blockers, and `/helix:config` to view or change telemetry consent and reporting addresses. +Use `/helix:status` (Cursor: `/helix-status`) to inspect progress and blockers, and `/helix:config` (Cursor: `/helix-config`) to view or change telemetry consent and reporting addresses. ## How it relates to Superpowers and OpenSpec @@ -199,10 +224,10 @@ Report community bugs through [GitHub Issues](https://github.com/didi/helixharne Two planned directions will help more teams shape HelixHarness around their development practices: -- **More coding agents.** Extend support beyond Codex and Claude Code so teams can use HelixHarness with more of their preferred tools. +- **More coding agents.** Extend support to more hosts beyond Codex, Claude Code, Cursor, [OpenCode (macOS Stable)](docs/opencode-testing.md) and [Qoder](helixharness/hosts/qoder/installer.md) so teams can use HelixHarness with more of their preferred tools. - **Configurable workflows.** Let teams configure workflow stages and their order to fit their development process. -These are planned capabilities. The current release supports Codex and Claude Code with the Propose → Apply → Archive workflow. Share concrete use cases through the [contribution guide](CONTRIBUTING.md) to help shape these directions. +These are planned capabilities. The source supports Codex, Claude Code and Cursor, plus [OpenCode within its macOS Stable scope](docs/opencode-testing.md) and [Qoder through local ZIP installation](helixharness/hosts/qoder/installer.md), using the Propose → Apply → Archive workflow. Cursor native-client acceptance is tracked separately from automated contract tests. Share concrete use cases through the [contribution guide](CONTRIBUTING.md) to help shape these directions. ## Documentation and contribution @@ -210,7 +235,7 @@ These are planned capabilities. The current release supports Codex and Claude Co - [Complete user guide](docs/user-guide.md) · [中文指南](docs/user-guide.zh-CN.md) - [Development and contribution](CONTRIBUTING.md) · [Code of Conduct](CODE_OF_CONDUCT.md) -Source version: **HelixHarness 1.0.0 · helixharness-platform 1.0.0**. Public repository and release availability are separate from the version embedded in this source copy. +Source version: **HelixHarness 1.1.0 · helixharness-platform 1.0.0**. Public repository and release availability are separate from the version embedded in this source copy. ## License diff --git a/README.zh-CN.md b/README.zh-CN.md index 7839a29..80b70ca 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -6,11 +6,11 @@ > > 为适配而生,为进化而设计。让团队的工程 DNA,融入 AI 研发。 -**HelixHarness 帮助团队在 Codex 和 Claude Code 上构建专属的 AI Coding Harness。** 将你的业务知识、工程规范与研发工作流带入 Agent 的工作过程,从需求分析、实现、测试、评审到归档,让 AI 按团队的方式开展研发,并将经验证的经验留在项目中,供下一个需求复用。 +**HelixHarness 帮助团队在 Codex、Claude Code、Cursor、[OpenCode(macOS Stable)](docs/opencode-testing.md) 与 [Qoder](helixharness/hosts/qoder/installer.md) 上构建专属的 AI Coding Harness。** 将你的业务知识、工程规范与研发工作流带入 Agent 的工作过程,从需求分析、实现、测试、评审到归档,让 AI 按团队的方式开展研发,并将经验证的经验留在项目中,供下一个需求复用。 从插件开始即可。当你希望改进 Harness 本身时,可选的 **helixharness-platform** 帮助框架维护者观测使用过程、对比框架版本,并在采纳候选改进前验证效果。 -**9 个命令 · Codex / Claude Code · 单仓 / 多仓 Workspace · Apache-2.0** +**9 个命令 · Codex / Claude Code / Cursor / [OpenCode(macOS Stable)](docs/opencode-testing.md) / [Qoder](helixharness/hosts/qoder/installer.md) · 单仓 / 多仓 Workspace · Apache-2.0** [快速开始](#快速开始) · [命名故事](#名字背后的故事) · [框架亮点](#框架亮点) · [框架迭代平台](#围绕-helixharness-框架的迭代平台) · [使用指南](docs/user-guide.zh-CN.md) @@ -63,11 +63,11 @@ Knowledge 与 Harness 通过索引引导上下文加载,Specs 保存每个需 ### 1. 安装插件 -需要 Python 3.10+、Git,以及支持插件市场的 Codex 或 Claude Code。先确保宿主已完成登录或模型配置,能够正常使用。 +需要 Python 3.10+、Git,以及支持插件的 Codex、Claude Code、Cursor、OpenCode(macOS、2.3.2;见[支持矩阵](docs/opencode-testing.md))或 Qoder Desktop / CLI。先确保宿主已完成登录或模型配置,能够正常使用。 -macOS 与原生 Windows 的依赖、解释器探测及宿主要求见[跨平台说明](docs/platform-support.md)。Windows Codex 使用 PowerShell;Windows Claude Code 使用 Git for Windows Bash。 +macOS 与原生 Windows 的依赖、解释器探测及宿主要求见[跨平台说明](docs/platform-support.md)。Windows Codex 使用 PowerShell;Windows Claude Code 使用 Git for Windows Bash。Cursor 实机验收目前覆盖 macOS,Windows Cursor 不在本期已验证范围。Qoder 的 Host Kit 契约测试已进入 CI 矩阵,但 Qoder App 尚未完成 Windows 实机验收,且只提供 POSIX hook 启动器。 -仓库公开后,在终端选择对应宿主安装,无需先手动克隆源码: +仓库公开后,Codex 和 Claude Code 使用下方终端命令,Cursor 使用随后说明的市场界面安装,Qoder 使用随后说明的本地 ZIP 安装流程;市场安装方式无需先手动克隆源码: ```bash # Codex @@ -81,22 +81,47 @@ claude plugin marketplace add https://github.com/didi/helixharness.git claude plugin install helix@helixharness-marketplace ``` +Cursor 用户通过 **Customize → helix → Install** 从市场安装,随后重载窗口并新建 Agent。团队管理员需先将已发布的发行仓库导入团队市场。Cursor 使用 `/helix-init`、`/helix-propose` 等入口,详见[市场安装、可选 Local 安装及能力限制](docs/installation.md#cursor-preview)。 + +OpenCode 安装已在 2.3.2 验证:克隆本仓库后,在 `opencode.json(c)` 中配置 `helixharness/` 子目录的绝对路径。详见[本地目录安装步骤](docs/installation.md#opencode-local-directory-installation-verified-with-232);本仓库不使用原生 `plugin add` 安装。 + +**Qoder:** Qoder 的安装工具只消费插件 ZIP,需要先本地打包再安装。克隆本仓库后,在 `helixharness/` 内运行 `python3 scripts/package_qoder_plugin.py` 生成 `dist/helix-.zip`,在 Qoder **扩展 → 安装本地插件** 面板选择该 ZIP(或让会话调用 `qoder-settings.install_extension`)。安装完成后须新开会话——插件清单、skills、agents 与 hook 都在会话启动时装载。Qoder 没有等价 marketplace CLI,`/helix:update` 声明为 `unsupported`,升级需重装新版 ZIP。打包细节、能力边界与验收清单见 [Qoder 安装说明](helixharness/hosts/qoder/installer.md)。 + +**OpenCode Stable 支持(macOS、2.3.2):** 当前源码候选的支持范围与边界见[支持矩阵](docs/opencode-testing.md)。OpenCode 2.2.2、2.3.0 仅有自动化兼容覆盖。 + +插件注册原生 `helix:` 命令、`helix-` 方法 Skill 和 `helix-` 角色。命令、原生 `skill` 工具结果、Skill mention 与原生 Skill 激活均按请求会话绑定仓库目录;会话查询或目录校验失败时阻断未绑定的 Skill 正文。2026-11-20 已在 OpenCode 2.3.2 + DeepSeek 上完成一次合成单仓 Init → Propose → Apply → Archive 真实模型闭环,包含操作者确认和一次受控合同修订;2026-11-23 又完成了 OpenCode 2.3.2 + DeepSeek 的操作者辅助合成双仓 Workspace 与独立 UT 验证;后续已修复 UT 分类校验与原子发布保护,并通过无纠正提醒的真实模型复验。[合成 Workspace 的专项真实模型验证](helixharness/opencode/tests/README.md#recovery-and-auxiliary-workflow-acceptance-2026-11-23)还覆盖了 Apply 与部分 Archive 原生取消后新会话恢复,以及注入原生 context hook 故障后阻断依赖派发。完整生产业务项目、无人干预时的协议遵守与完整 TUI/桌面 UI 验收仍未完成;已覆盖范围见[定向终端 UI 验收](helixharness/opencode/tests/README.md#targeted-terminal-ui-acceptance-2026-11-23)。Workspace Apply 的 `may_delegate` RepoJob 使用 `helix-worker`,需要 `experimental.subagent_depth >= 2`;独立 reviewer 保持只读 leaf。深度不足时阻塞该 RepoJob,不得绕过评审。 + +OpenCode 适配使用原生工具和会话 Hook,但未提供等价的 SessionStart/Stop/失败/会话结束业务保证。任务跟踪通过 `scripts/task_plan.py` 原子更新同一份 `tasks.md`。统计在明确授权后记录阶段事实和工作流轨迹,不采集原始会话,token 和未观察到的工具次数保持未知。`/helix:update` 对有明确 Git upstream 的干净源码安装执行既有确认协议,锁定 commit 并仅快进;有本地修改、游离版本或包管理安装时不自动更新。Init 合并 `AGENTS.md`,不创建 `.opencode/` settings;插件在原生 write/edit/patch 成功后执行已有项目巡检,shell 修改仍需显式检查。d-d2c 的 Claude skill-scoped Stop/PreToolUse guard 不执行。[OpenCode 显式门禁](helixharness/hosts/opencode/runtime.md) 将新检查点绑定到实际原生会话并校验完成证据,须在文档指定的流程节点主动调用;它不拦截任意停止,也不认证浏览器/MasterGo 的真实性。写入型命令的入口预检观察工具注册和会话移动 API 是否存在;权限仍须实际执行验证,有效委派深度在原生准入前保持未知。 + +绑定检查与手动更新步骤见 [OpenCode 安装说明](helixharness/hosts/opencode/installer.md)。 + 根市场会安装 `helixharness/` 插件,不会安装平台。发布前测试或修改插件时,使用[开发者安装(本地源码)](docs/installation.md#developer-installation)。详见[hooks 检查、更新与卸载](docs/installation.md)。 ### 2. 完成一个小需求 -在要开发的**业务仓库**新开 Agent 会话,通过宿主原生界面审阅插件 hooks,然后在对话中输入: +在要开发的**业务仓库**新开 Agent 会话,Claude Code、Codex、Cursor 与 Qoder 通过宿主原生界面审阅插件 hooks;OpenCode 由插件包注册入口。然后在对话中输入对应宿主的命令。 + +Codex / Claude Code / OpenCode / Qoder: ```text /helix:init /helix:propose task-filter ./requirements/task-filter.md --loop ``` +Cursor: + +```text +/helix-init +/helix-propose task-filter ./requirements/task-filter.md --loop +``` + +Cursor 全部使用 `/helix-`,Codex、Claude Code、OpenCode 与 Qoder 使用 `/helix:`;命令参数和工作流相同。Qoder 的九个入口来自插件 `hosts/qoder/skills/` 下的薄入口,而不是宿主原生命令面,但输入形式和参数一致。 + [任务筛选示例](examples/README.md)提供起始项目、需求和独立验收脚本,可直接跟着操作。`--loop` 串联 Propose → Apply → Archive,遇到需要决策的问题或阻断时暂停,不包含代码发布或部署。 也可分别执行 `/helix:propose`、`/helix:apply` 和 `/helix:archive`。详见[九个公开命令](docs/user-guide.zh-CN.md#命令参考)。 -产品名称为 **HelixHarness**,插件 ID 和命令前缀使用 **`helix`**。使用 `/helix:status` 查看进度与阻塞,使用 `/helix:config` 查看或修改统计授权和上报地址。 +产品名称为 **HelixHarness**,插件 ID 和命令前缀使用 **`helix`**。使用 `/helix:status`(Cursor:`/helix-status`)查看进度与阻塞,使用 `/helix:config`(Cursor:`/helix-config`)查看或修改统计授权和上报地址。 ## 与 Superpowers、OpenSpec 的侧重点 @@ -197,10 +222,10 @@ python -m web_ui.demo --port 7860 接下来计划围绕两个方向,让更多团队按自己的研发方式使用 HelixHarness: -- **支持更多 Coding Agent**:在 Codex 和 Claude Code 之外扩展宿主适配,让团队能在更多熟悉的工具中使用 HelixHarness。 +- **支持更多 Coding Agent**:在 Codex、Claude Code、Cursor、[OpenCode(macOS Stable)](docs/opencode-testing.md) 与 [Qoder](helixharness/hosts/qoder/installer.md) 的基础上继续扩展宿主适配,让团队能在更多熟悉的工具中使用 HelixHarness。 - **支持工作流配置**:允许团队配置工作流阶段及其顺序,适配自身的研发流程。 -以上为规划能力。当前版本支持 Codex 和 Claude Code,采用 Propose → Apply → Archive 工作流。欢迎通过[贡献指南](CONTRIBUTING.md)分享具体使用场景,帮助完善这些方向。 +以上为规划方向。当前源码支持 Codex、Claude Code 和 Cursor,另提供 [OpenCode macOS Stable 支持](docs/opencode-testing.md) 与 [Qoder 本地 ZIP 安装](helixharness/hosts/qoder/installer.md),采用 Propose → Apply → Archive 工作流。Cursor 原生客户端验收与自动化合同测试分别记录。欢迎通过[贡献指南](CONTRIBUTING.md)分享具体使用场景,帮助完善这些方向。 ## 文档与贡献 @@ -208,7 +233,7 @@ python -m web_ui.demo --port 7860 - [完整中文指南](docs/user-guide.zh-CN.md) · [English guide](docs/user-guide.md) - [开发与贡献](CONTRIBUTING.md) · [社区行为准则](CODE_OF_CONDUCT.md) -源码版本:**HelixHarness 1.0.0 · helixharness-platform 1.0.0**。源码中的版本号不代表 GitHub 仓库或 Release 已公开发布。 +源码版本:**HelixHarness 1.1.0 · helixharness-platform 1.0.0**。源码中的版本号不代表 GitHub 仓库或 Release 已公开发布。 ## 开源协议 diff --git a/docs/claude-testing.md b/docs/claude-testing.md new file mode 100644 index 0000000..128b4c9 --- /dev/null +++ b/docs/claude-testing.md @@ -0,0 +1,42 @@ +# Claude Code compatibility verification / Claude Code 兼容验证 + +## Scope and evidence / 范围与证据 + +Cursor integration shares command contracts, Init output validation and update infrastructure with Claude Code. Focused command, lifecycle, update and shared Init regression passed in the recorded runs. The latest productization suite and accepted Cursor release scope are summarized in the [Cursor report](cursor-testing.md). Historical source versions and overlapping test counts are kept in local evidence. + +Cursor 接入与 Claude Code 共用命令合同、Init 产物校验和更新基础设施。已记录的命令、生命周期、更新及共享 Init 定向回归通过。最近产品化测试及 Cursor 发布范围见 [Cursor 报告](cursor-testing.md)。历史源码版本与重叠测试数量保留在本地证据。 + +Native samples on Claude Code 2.1.252 covered plugin discovery, selected status/config execution and visible-notice enable/disable. Earlier isolated Hook tests and authenticated command tests used different execution setups, so those samples do not establish a complete Hook-to-model chain. Some earlier interaction attempts timed out or stopped at `notice_required`; later successful samples retain that history. + +Claude Code 2.1.252 的实机样例覆盖插件发现、所选 status/config 执行、可见说明后的统计开启/关闭。早期隔离 Hook 与已认证命令使用不同执行配置,不能据此认定完整 Hook 到模型链路通过。部分早期交互超时或停在 `notice_required`,后续成功样例保留这些历史结果。 + +## Historical diagnostic findings / 历史诊断问题 + +- Update probes found that a synthetic host returning success without installing the approved version, or installing a later version, could produce a success result and consume authorization. Both outcomes also reproduced on the original baseline. / 更新探测发现,合成宿主返回成功却未安装批准版本、或实际安装更高版本时,包装脚本可能误报成功并消费授权;两种情况也在原基线复现。 +- A synthetic native usage probe found omitted cache-read/write fields and an incorrectly precise total. Cache semantics must be normalized in the Claude adapter because other hosts may already include cache in input totals. / 合成原生用量探测发现缓存读写字段遗漏并错误标记精确总量;应在 Claude 适配层归一化缓存语义,其他宿主的 input 可能已包含缓存。 + +These are retained historical findings, not new Cursor defects. The 2026-11-20 pre-merge review reran both independent probes: the two abnormal update outcomes still failed, and the native cache-usage probe still omitted cache fields on both the current parser and the original baseline. These explicitly selected diagnostics are not included in standard-suite pass counts. + +这些是保留的历史发现,不是 Cursor 新引入缺陷。2026-11-20 合并前评审重跑两项独立探针:两类异常升级结果仍失败,原生缓存用量探针在当前解析器和原基线仍遗漏缓存字段。这些显式诊断不包含在常规测试通过数量中。 + +## Reproduce / 复跑 + +Run from the combined repository root. Use synthetic projects and keep runtime evidence in ignored `output/` directories. Native testing should authenticate normally without copying credentials. Synthetic routing/state tests do not establish model-generated code quality or every native interaction path. + +在组合仓库根执行,使用合成项目,将运行证据保存在忽略的 `output/` 中。原生测试通过正常机制认证,不复制凭据。合成路由/状态测试不证明模型生成质量或全部原生交互路径。 + +```bash +PYTHONPATH=helixharness/scripts:helixharness/scripts/tests \ +python3 -m unittest test_claude_command_scenarios test_claude_lifecycle_scenarios \ + test_claude_update_scenarios test_claude_local_update + +# Independent historical failure probes / 独立历史失败探针 +python3 helixharness/scripts/tests/test_claude_update_scenarios.py --probe-postconditions +python3 helixharness/scripts/tests/test_claude_update_scenarios.py --probe-postconditions --baseline +PYTHONPATH=helixharness/scripts:helixharness/scripts/tests \ +python3 helixharness/scripts/tests/test_claude_lifecycle_scenarios.py --probe-native-cache +``` + +The probes exit nonzero while their modeled failure remains. Full plugin reproduction and environment requirements are in the [Cursor verification guide](cursor-testing.md#reproduce--复跑). See the [Claude Code installer](../helixharness/hosts/claude-code/installer.md) for normal installation. + +探测问题仍存在时返回非零。插件全量复跑与环境要求见 [Cursor 验证说明](cursor-testing.md#reproduce--复跑),正常安装见 [Claude Code 安装指南](../helixharness/hosts/claude-code/installer.md)。 diff --git a/docs/codex-testing.md b/docs/codex-testing.md new file mode 100644 index 0000000..f02b79c --- /dev/null +++ b/docs/codex-testing.md @@ -0,0 +1,40 @@ +# Codex compatibility verification / Codex 兼容验证 + +## Scope and evidence / 范围与证据 + +Cursor integration shares workflow contracts, Init validation and update infrastructure with Codex. Recorded command, lifecycle, update and shared Init regression passed. The latest productization suite and accepted Cursor release scope are summarized in the [Cursor report](cursor-testing.md). Tests use synthetic repositories, artifacts, host outcomes and consent choices. + +Cursor 接入与 Codex 共用流程合同、Init 校验和更新基础设施。已记录的命令、生命周期、更新及共享 Init 定向回归通过。最近产品化回归和 Cursor 发布范围见 [Cursor 报告](cursor-testing.md)。测试使用合成仓库、产物、宿主结果及授权选择。 + +Native Codex CLI 0.144.3 samples covered source resolution and entry loading. A later visible-notice enable/disable sequence completed with independent readback, while an initial unavailable readback and native error events remained unexplained. An earlier bounded status/config attempt reached its deadline before business execution. Those samples retain their limited scope and do not establish zero-anomaly native compatibility. + +Codex CLI 0.144.3 的实机样例覆盖来源解析和入口加载。后续可见说明后的统计开启/关闭完成并有独立读回,但首次 unavailable 读回及原生错误事件未完成归因。更早的有界 status/config 尝试在业务执行前到达期限。各样例保留原范围,不据此认定全部原生交互无异常。 + +## Historical update findings / 历史更新问题 + +Independent probes reproduced two outcomes on both the current source at that time and the original baseline: the native updater returned success but left the old version installed, or installed a higher version than approved after its source advanced. The wrapper reported success and consumed authorization. Normal successful-update tests passed. The finding concerns validation of abnormal native outcomes. + +独立探针在当时源码和原基线均复现两类结果:原生更新器返回成功但仍保留旧版,或来源推进后安装了高于批准版本的版本。包装脚本误报成功并消费授权,正常升级用例通过。问题在于异常原生结果的安装后校验。 + +The 2026-11-20 pre-merge review reran the probe against the current source: both abnormal update outcomes still failed. Standard-suite pass counts exclude this explicitly selected diagnostic. Reassess the current [Codex adapter](../helixharness/scripts/update_hosts/codex.py) and [shared updater](../helixharness/scripts/version_update.py) with the commands below. Installed-version checks must consider versioned-cache switching rather than assuming the executing old plugin directory has changed. + +2026-11-20 合并前评审在当前源码重跑探针,两类异常升级结果仍失败;常规测试通过数量不包含这项显式诊断。通过下方命令复核当前 [Codex 适配器](../helixharness/scripts/update_hosts/codex.py) 和[公共更新器](../helixharness/scripts/version_update.py)。安装结果校验需考虑版本缓存切换,不能假定正在执行的旧插件目录已变为新版。 + +## Reproduce / 复跑 + +Run from the combined repository root. Use synthetic projects and keep raw runtime evidence in ignored `output/`. The deterministic workflow tests supply prepared Spec/Tasks/review receipts; they verify routing, persistence and gates. They do not prove native discovery, model implementation quality or complete UT worker behavior. + +在组合仓库根运行,使用合成项目,原始运行证据保存在忽略的 `output/` 中。确定性流程测试预置 Spec/Tasks/评审收据,验证路由、持久状态和门禁,不证明原生发现、模型实现质量或完整 UT worker 行为。 + +```bash +PYTHONPATH=helixharness/scripts:helixharness/scripts/tests \ +python3 -m unittest test_codex_command_scenarios test_codex_lifecycle_scenarios \ + test_codex_update_scenarios test_codex_local_update + +# Independent historical failure probe / 独立历史失败探针 +python3 helixharness/scripts/tests/test_codex_update_scenarios.py --probe-postconditions +``` + +The probe exits nonzero while its modeled failure remains. Full reproduction and environment requirements are in the [Cursor verification guide](cursor-testing.md#reproduce--复跑). See the [Codex installer](../helixharness/hosts/codex/installer.md) for normal installation. + +探测问题仍存在时返回非零。插件全量复跑与环境要求见 [Cursor 验证说明](cursor-testing.md#reproduce--复跑),正常安装见 [Codex 安装指南](../helixharness/hosts/codex/installer.md)。 diff --git a/docs/cursor-testing.md b/docs/cursor-testing.md new file mode 100644 index 0000000..a79704d --- /dev/null +++ b/docs/cursor-testing.md @@ -0,0 +1,75 @@ +# Cursor support and verification / Cursor 支持与验证 + +## Release scope / 发布范围 + +Cursor desktop support is `stable` and release-ready within the documented limits. On 2026-11-20 the project owner accepted the remaining verification gaps for this release. Commands use `/helix-xxx`. Single-repository and Workspace workflows, unit-test generation, status/configuration and consent-based statistics are implemented. Managed Local automatic updates require a registered installation. Installation options are documented in the [installation guide](installation.md#cursor-preview). + +Cursor 桌面接入按已声明的能力边界标记为 `stable`、可发布。项目负责人于 2026-11-20 接受本次剩余验证缺口。命令使用 `/helix-xxx`,已实现单仓与 Workspace 流程、单测生成、状态/配置管理及授权后统计。托管 Local 自动升级需要已登记的安装。安装方式见[安装指南](installation.md#cursor-preview)。 + +The integrated source follows GitHub main's Python 3.10+ runtime contract. The Python 3.9.6 native sample below belongs to an earlier Cursor candidate; it does not validate this integrated source or promise current Python 3.9 support. Native Windows Cursor is outside this release's verified scope. + +That scope gap has a specific shape, and it is recorded here rather than patched on a guess. Every Cursor hook command is `sh "${CURSOR_PLUGIN_ROOT}/hosts/cursor/hook_bootstrap.sh" `: the Windows CI job adds Git for Windows' `bin` directory to PATH (`.github/workflows/cross-platform.yml`), so the launcher runs there, but a native Windows Cursor installation does not guarantee that. `hosts/cursor/hook_entry.py` also injects `HELIXHARNESS_BOUND_PLUGIN_ROOT`, `HELIXHARNESS_CURSOR_CONVERSATION_ID` and `HELIXHARNESS_CURSOR_WORKSPACE_ROOTS` into prompt context as a POSIX `KEY='value'` prefix, asking the model to hand them to the runtime launcher or export them in the current shell; no Windows Cursor session has been recorded, so there is no evidence for which shell that terminal actually uses, and neither form has an evidence base there. When the prefix cannot be applied, `scripts/telemetry_hosts/cursor.py` reports the session context unavailable, `scripts/metrics.py` skips that record and feedback falls back to an `unknown` session — workflows still run and only statistics degrade. It stays a limitation instead of being rewritten for PowerShell, because changing the syntax on an unaccepted host could only be guesswork. Closing it takes one native Windows Cursor session that records the shell the terminal uses and whether an identity assignment made by the model reaches the plugin script. + +整合后的源码沿用 GitHub 主干的 Python 3.10+ 运行时合同。下方 Python 3.9.6 实机样例属于较早的 Cursor 候选,不代表整合版本已实机通过,也不承诺当前支持 Python 3.9。Windows Cursor 不在本期已验证范围。 + +那个缺口有具体形状,记录在此而不是按猜测修补。每条 Cursor hook 命令都是 `sh "${CURSOR_PLUGIN_ROOT}/hosts/cursor/hook_bootstrap.sh" `:CI 的 Windows 任务把 Git for Windows 的 `bin` 目录加进了 PATH(`.github/workflows/cross-platform.yml`),所以启动器在 CI 里可跑,但原生 Windows Cursor 安装并不保证这一点。`hosts/cursor/hook_entry.py` 还会把 `HELIXHARNESS_BOUND_PLUGIN_ROOT`、`HELIXHARNESS_CURSOR_CONVERSATION_ID` 和 `HELIXHARNESS_CURSOR_WORKSPACE_ROOTS` 以 POSIX `KEY='value'` 形式注入 prompt 上下文,要求模型转交给运行器或在当前 shell 导出;由于从未记录过任何 Windows Cursor 会话,它的终端实际使用哪种 shell 没有证据,两种形态在当地因此都缺少证据基础。若前缀无法生效,`scripts/telemetry_hosts/cursor.py` 会给出会话上下文不可用,`scripts/metrics.py` 跳过该条记录,反馈里的会话退化为 `unknown`——工作流照常执行,只有统计降级。把它记为限制而不是改成 PowerShell 写法,是因为在未验收的宿主上改写语法只能靠猜。要收口这个结论,需要在原生 Windows Cursor 里跑一次会话,记录终端实际使用的 shell,以及模型设置的身份变量能否传到插件脚本。 + +| Capability / 能力 | Evidence and boundary / 证据与边界 | +| --- | --- | +| Commands and workflows / 命令与流程 | Synthetic contract tests cover all nine entries. Native samples cover Single and Workspace implementation/archive, active Single BugFix, frontend Init and Java UT. / 合同测试覆盖九个入口;实机样例覆盖单仓及多仓实施/归档、活跃单仓 BugFix、前端 Init 和 Java UT。 | +| Recorded Local candidate / 已验 Local 候选 | 387 reviewed files matched the installed package. Two identity rounds and normal status/preflight on Python 3.9.6 passed. The unregistered Local updater returned the expected source warning. / 387 个审核文件与安装包匹配;两轮身份、Python 3.9.6 下的 status/预检及未登记 Local 更新警告通过。 | +| Native fixed source / 原生固定来源 | An earlier candidate was fetched by Cursor with 386 matching files; status, identity and partial statistics passed. / 较早候选由 Cursor 获取,386 文件匹配,status、身份及有限统计通过。 | +| Managed Local upgrade / 托管 Local 升级 | A synthetic 1.0.0 → 1.0.1 native upgrade and post-reload version recognition passed. Abnormal installation outcomes are covered by automated checks. / 合成版本原生升级及重载后识别通过,安装异常结果由自动化检查覆盖。 | +| Statistics and cleanup / 统计与清理 | Real tool events, one loopback acknowledgment, repeat-collection deduplication and consent-revocation cleanup passed in isolation. Usage remained partial. / 隔离环境真实工具事件、本机接收、重复采集去重与关闭授权清理通过,usage 为 partial。 | +| D2C | A synthetic local page and owner-bound checkpoint gate passed selected checks. The full MasterGo-to-delivery workflow remains unaccepted. / 合成本地页面与 owner checkpoint 门禁通过所选检查,完整 MasterGo 到交付流程未完整验收。 | + +The 2026-11-20 pre-merge regression ran 727 plugin tests: 726 passed, and one process-inspection case was blocked by the sandbox's `ps` restriction; that case passed an authorized isolated retry. All 132 related platform tests passed. Cursor and Codex Skill projections and platform Ruff checks passed. These results cover the Cursor source before integration with the newer GitHub main, not the integrated result; native candidate results above refer to earlier recorded packages. Native replies were partly supplied by the user; installed hashes and selected artifacts were independently checked. + +2026-11-20 合并前回归运行 727 项插件测试,726 项通过,1 项因沙箱禁止 `ps` 而报错;该用例获准单独重跑后通过。相关平台测试 132 项全部通过,Cursor/Codex Skill 投影与平台 Ruff 检查通过。这些结果覆盖与新版 GitHub 主干整合之前的 Cursor 源码,不代表整合结果已通过;上方实机结果对应此前记录的候选包。部分原生回复由用户提供,安装哈希及所选产物独立核验。 + +## GitHub main integration regression / GitHub 主干整合回归 + +Cursor source `f213db5` was integrated with GitHub main `5bde4b3`, retaining Python 3.10+, cross-platform runtime handling and greenfield Init. On macOS with Python 3.12.16, the plugin suite ran 780 cases: 772 passed, seven Windows-only cases were skipped, and one `ps` sandbox error passed an isolated retry. The platform suite ran 842 cases: 834 passed and two Windows-only cases were skipped; two Worker cases passed after supplying the isolated package path, and four localhost server cases passed after allowing loopback binding. These were environment retries, not one uninterrupted green run. All 15 D2C script groups passed after optional dependencies were supplied in a temporary directory. Skill projections, host registration, platform Ruff and document links passed. Focused runs overlap these suites and are not added to their totals. + +Cursor 源码 `f213db5` 与 GitHub 主干 `5bde4b3` 整合,保留 Python 3.10+、跨平台运行时及空项目 Init。macOS / Python 3.12.16 下,插件测试共 780 项:772 通过、7 项 Windows 专属测试跳过,1 项 `ps` 沙箱错误单独复跑通过。平台测试共 842 项:834 通过、2 项 Windows 专属测试跳过;两项 Worker 用例补齐隔离包路径后通过,四项本机服务用例允许回环端口后通过。这些属于环境修正后的复跑,不能写成一次全绿。临时补齐可选依赖后,D2C 脚本 15 组全部通过。Skill 投影、宿主注册、平台 Ruff 和文档链接检查通过;专项与全量存在重叠,不累加数量。 + +This verifies the integrated code contracts. No fresh native Cursor, Claude Code, Codex or Windows session was exercised for this merge; the earlier native samples and accepted capability limits remain separate evidence. + +本轮验证整合后的代码合同,没有重新进行 Cursor、Claude Code、Codex 或 Windows 实机验收;此前实机样例和已接受的能力边界仍作为独立证据保留。 + +## Accepted limitations and follow-up / 已接受限制与跟进项 + +- Native fixed-SHA automatic upgrades, colon-prefix completion, Cloud Agents and native Skill-scoped stop/question interception are outside this release's capabilities. / 原生固定 SHA 自动升级、冒号补全、Cloud Agents 及原生 Skill 级停止/提问拦截不在本期能力范围。 +- Token attribution can remain partial/unavailable. Full token precision, default background delivery and production statistics ingestion have not completed native acceptance. / Token 可为 partial/unavailable;完整精度、默认后台投递与生产统计入库未完成实机验收。 +- Window-close cleanup is best effort. Explicit consent revocation cleans the current repository; later startup can retry scoped cleanup. / 关窗清理尽力执行,主动关闭授权清理当前仓库,后续启动可补扫。 +- Fresh remote loading of the productized candidate, native update-entry behavior, invalid-source/recovery and the general marketplace UI flow remain accepted follow-up verification. / 产品化候选的新一轮远程加载、原生更新入口、错误来源/恢复及普通市场 UI 完整流程作为已接受的后续验证。 +- Cursor Agent CLI, full D2C and all native cancellation/concurrency boundaries remain outside complete acceptance. / Cursor Agent CLI、完整 D2C 及全部原生取消/并发边界未完整验收。 +- Mixed imported/Local copies can select different Skill and Hook roots. Resolve source conflicts without bypassing binding checks. Imported Claude hooks may duplicate checks. / 混合导入与 Local 副本可能选中不同 Skill/Hook 来源,需解决来源冲突并保留绑定检查;导入 Claude hooks 可能重复检查。 + +Historical failures remain recorded in local evidence. Earlier Hook timeouts, missing identity and empty-cwd tool accounting led to repairs and subsequent focused/native checks. Earlier upgrade runs also exposed a test-launcher lock issue and a model's failure-to-stop deviation; successful final installation does not erase those observations. Original-host historical diagnostics are summarized in the [Claude Code](claude-testing.md) and [Codex](codex-testing.md) reports. + +历史失败保留在本地证据中。此前 Hook 超时、身份缺失和空 cwd 工具计数问题促成修复,并有后续定向/实机复验。升级历史还记录了测试 launcher 锁识别问题及模型未遵守失败停止的偏差,最终安装成功不会覆盖这些观察。原宿主历史诊断见 [Claude Code](claude-testing.md) 与 [Codex](codex-testing.md)。 + +## Reproduce / 复跑 + +Run from the combined repository root with Python 3.10+, Git and Node.js. The process-timeout fixture needs permission to inspect its own child process. Use synthetic projects and keep raw runtime evidence in ignored `output/` directories. + +在组合仓库根运行,需要 Python 3.10+、Git 和 Node.js。进程超时夹具需能检查自身子进程。使用合成项目,将原始运行证据保存在忽略的 `output/` 中。 + +```bash +GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null \ +GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.hooksPath GIT_CONFIG_VALUE_0=/dev/null \ +python3 helixharness/scripts/run_tests.py + +PYTHONPATH=helixharness/scripts:helixharness/scripts/tests \ +python3 -m unittest test_cursor_command_scenarios test_cursor_lifecycle_scenarios \ + test_cursor_native_install test_cursor_native_update test_cursor_managed_update + +python3 helixharness/scripts/cursor_skill_projection.py --check +python3 helixharness/scripts/codex_skill_projection.py --check +python3 helixharness/scripts/host_runtime_cli.py list +``` + +Automated contract tests supply synthetic workflow artifacts. They verify routing, persistence, isolation and gates; native model behavior and external service delivery require their own recorded evidence. Read the [Host API](../helixharness/reference/host-api.md) for the capability contract. + +自动化合同测试提供合成流程产物,验证路由、持久状态、隔离与门禁;原生模型行为和外部投递需各自的实际证据。能力合同见 [Host API](../helixharness/reference/host-api.md)。 diff --git a/docs/installation.md b/docs/installation.md index 368f722..5c6005f 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -4,17 +4,17 @@ ## Requirements -Python 3.10+, Git and a Codex or Claude Code installation supporting plugin marketplaces are required. Make sure the host is signed in or has its model configuration set up and is working normally. The platform is optional. +Python 3.10+, Git and a plugin-capable Codex, Claude Code, Cursor, OpenCode installation (macOS, 2.3.2; see the [support matrix](opencode-testing.md)) or Qoder Desktop / CLI are required. Make sure the host is signed in or has its model configuration set up and is working normally. The platform is optional. Cursor desktop support follows the release scope and limitations below; Qoder installs through a locally built plugin ZIP because the App has no marketplace CLI. -The source supports macOS, native Windows and Linux; see [platform support and verification](platform-support.md). Windows Codex uses the PowerShell entrypoint, while Claude Code hooks require Git for Windows Bash. +The shared runtime supports macOS, native Windows and Linux; see [platform support and verification](platform-support.md). Windows Codex uses the PowerShell entrypoint, while Claude Code hooks require Git for Windows Bash. Cursor native acceptance currently covers macOS; Windows Cursor is outside this release's verified scope. Qoder's Host Kit contract tests run in the CI matrix, but the Qoder App has no Windows acceptance yet and only the POSIX hook launcher exists. Unless marked PowerShell, the examples use Bash/Zsh. `didi/helixharness` is the planned public repository; remote commands become usable after its publication. For testing before publication or modifying the plugin, use [developer installation](#developer-installation). -This edition uses only the HelixHarness identifiers: `helix@helixharness-marketplace`, `/helix:*`, `.helixharness/`, `helixharness.workspace.yaml`, and `HELIXHARNESS_*` environment variables. It does not recognize or migrate identifiers, configuration or runtime data from previous branding. Initialize a fresh application copy when validating this edition. +This edition uses only the HelixHarness identifiers: `helix@helixharness-marketplace`, logical `/helix:*` commands (Cursor: `/helix-{command}`), `.helixharness/`, `helixharness.workspace.yaml`, and `HELIXHARNESS_*` environment variables. It does not recognize or migrate identifiers, configuration or runtime data from previous branding. Initialize a fresh application copy when validating this edition. ## Install from GitHub after publication -Choose your host and run its commands in a terminal. No manual source clone is needed: +For Codex and Claude Code, run the following terminal commands. For Cursor, use the [marketplace flow](#cursor). For Qoder, build a local ZIP and install it through the App — see [Qoder](#qoder). These marketplace routes do not require a manual source clone: ```bash # Codex @@ -28,7 +28,35 @@ claude plugin marketplace add https://github.com/didi/helixharness.git claude plugin install helix@helixharness-marketplace ``` -The repository root contains `.claude-plugin/marketplace.json`, whose `./helixharness` source points to the plugin. Both hosts consume this compatible marketplace format. The platform is not installed by these commands. +## OpenCode local-directory installation (verified with 2.3.2) + +The plugin package lives in this repository's `helixharness/` subdirectory. In the tested OpenCode 2.3.2 client, native `plugin add` accepts npm/Git package specifications, but not an absolute local directory or a Git subdirectory suffix. Clone the repository after publication (replace the destination placeholder), then configure the plugin directory: + +```bash +git clone https://github.com/didi/helixharness.git /absolute/path/to/helixharness-source +``` + +Merge this entry into the existing `plugins` array in project or global `opencode.json(c)`, preserving other settings and plugins: + +```jsonc +{ + "$schema": "https://opencode.ai/config.json", + "plugins": ["/absolute/path/to/helixharness-source/helixharness"] +} +``` + +Use the directory containing the plugin's `package.json`, not the repository root or a single `.ts` file. This package has no runtime npm dependencies; an independent source copy loads without `node_modules` or `bun install`. Restart or reload OpenCode and open a new session after configuring it. These installation observations apply to 2.3.2; other client versions need their own verification. + + +**OpenCode Stable support (macOS, 2.3.2):** See the [support matrix](opencode-testing.md) for the current source candidate’s scope and boundaries. OpenCode 2.2.2 and 2.3.0 have automated compatibility coverage only. + +The plugin registers native `helix:` commands, `helix-` method skills and `helix-` roles. Commands, native `skill` tool results, Skill mentions and native Skill activation bind the requesting session's repository. Unbound Skill content is blocked when session lookup or directory validation fails. On 2026-11-20, OpenCode 2.3.2 with DeepSeek completed one synthetic single-repository Init → Propose → Apply → Archive lifecycle, with operator confirmations and a controlled contract amendment. On 2026-11-23, OpenCode 2.3.2 with DeepSeek also completed assisted synthetic two-repository Workspace and standalone UT runs; UT classification validation and protected atomic publication were subsequently fixed and passed a fresh real-model UT run without corrective operator prompts. [Targeted real-model tests on synthetic Workspaces](../helixharness/opencode/tests/README.md#recovery-and-auxiliary-workflow-acceptance-2026-11-23) also verified native Apply and partial Archive cancellation followed by fresh-session recovery, plus dependent-dispatch blocking after an injected native context-hook failure. Full production-project acceptance, unattended protocol compliance and full TUI/desktop UI acceptance remain outstanding; see [targeted terminal UI acceptance](../helixharness/opencode/tests/README.md#targeted-terminal-ui-acceptance-2026-11-23) for the tested scope. Workspace Apply uses `helix-worker` for `may_delegate` RepoJobs and requires `experimental.subagent_depth >= 2`; independent reviewers remain read-only leaf jobs. Insufficient depth blocks the RepoJob rather than bypassing review. + +The adapter uses native tool/session hooks but provides no equivalent SessionStart/Stop/failure/session-end business guarantee. `scripts/task_plan.py` atomically updates the canonical `tasks.md`. Explicitly consented telemetry records stage facts and workflow traces only; native conversations, token usage and unobserved tool counts remain unavailable. `/helix:update` uses the existing confirmation protocol for clean source checkouts with an explicit Git upstream, pins the approved commit and only fast-forwards. Dirty, detached or package-managed copies are not automatically updated. Init merges `AGENTS.md` without `.opencode/` settings; plugin-level checks run existing project linters after successful native write/edit/patch. Shell changes still require explicit checks. The d-d2c Claude skill-scoped Stop/PreToolUse guards do not run; use its no-hook / `--bare` semantics while retaining user decisions, visual acceptance and completion checks. + +See the [OpenCode installer](../helixharness/hosts/opencode/installer.md) for host-specific checks. + +The repository root contains `.claude-plugin/marketplace.json`, whose `./helixharness` source points to the plugin. Codex and Claude Code consume this compatible marketplace format. OpenCode loads the configured local `helixharness/` package through its `package.json` export, `opencode/index.ts`. These installation routes do not install the platform. Sources: [OpenAI plugin packaging](https://developers.openai.com/plugins/build/plugins#marketplace-metadata), [Claude Code marketplaces](https://code.claude.com/docs/en/plugin-marketplaces). Host commands and trust screens can vary with client version; use a version providing the listed commands. @@ -50,42 +78,117 @@ claude plugin marketplace add "$HELIXHARNESS_SOURCE" claude plugin install helix@helixharness-marketplace ``` +For OpenCode local development, use the same [local-directory configuration](#opencode-local-directory-installation-verified-with-232) with the absolute plugin subdirectory of your source copy; no native `plugin add` step is used. + A standalone plugin copy can still use the absolute path to `helixharness/`; its nested marketplace points to `.`. Register only one source under `helixharness-marketplace` at a time. When switching sources, remove the old marketplace using the host's plugin management first. ## Verify installation Open a new host session in the application repository you want to develop. Confirm the nine public commands: `init`, `propose`, `apply`, `archive`, `bug-fix`, `ut`, `update`, `status`, `config`. -Review and trust the plugin's hooks through the host's native interface. Confirm SessionStart identifies the host and installed plugin path. Command visibility alone does not prove hooks executed. Then run `/helix:init`; check generated project hooks and project documentation before creating a feature. Repeated init should preserve unrelated host settings. For single-repository Init, required project files include nonempty `docs/harness/index.md`, `docs/knowledge/index.md` and `docs/knowledge/project-context.md`; also check the other outputs required for the detected project type. A final completion message is not a substitute for those checks. +On Claude Code, Codex and Cursor, review and trust the plugin's hooks through the host's native interface and confirm SessionStart identifies the host and installed plugin path. Command visibility alone does not prove hooks executed. OpenCode instead registers native commands, skills and agents; check a command expansion includes `canonical_host_id: opencode`, the intended `plugin_root`, and the current `repo_root` and session binding. It does not generate project hooks or `.opencode/` settings. Then run `/helix:init` (Cursor: `/helix-init`); check project documentation and, on hosts supporting them, generated project hooks before creating a feature. Repeated init should preserve unrelated host settings. For single-repository Init, required project files include nonempty `docs/harness/index.md`, `docs/knowledge/index.md` and `docs/knowledge/project-context.md`; also check the other outputs required for the detected project type. A final completion message is not a substitute for those checks. If an entrypoint reports `plugin_source_mismatch`, its executing copy differs from the source bound to the session. Check the active marketplace and installed plugin, keep the intended source selected, and start a new session. Use resources from that installation; do not mix another checkout or cached version into the workflow. ### Start with an empty project -Run `/helix:init` in a Git repository root. For a new directory, run `git init` yourself first; an initial commit is not required. An empty or documentation-only repository skips code scans and gets a minimal project context, harness, specs directories, and host hooks. Unconfirmed project details stay as TODOs. Use `/helix:propose` and `/helix:apply` to develop the first feature. Init and Apply do not create a commit. +Run `/helix:init` (Cursor: `/helix-init`) in a Git repository root. For a new directory, run `git init` yourself first; an initial commit is not required. An empty or documentation-only repository skips code scans and gets a minimal project context, harness, specs directories, and host hooks where supported (OpenCode merges `AGENTS.md` only). Unconfirmed project details stay as TODOs. Use `/helix:propose` and `/helix:apply` (Cursor: `/helix-propose` and `/helix-apply`) to develop the first feature. Init and Apply do not create a commit. + + + +## Cursor + +Cursor desktop support uses `/helix-xxx` Skills and requires Python 3.10+, following the shared runtime contract. The default distribution route is a Cursor marketplace. After the release repository is available, a team administrator imports it through **Dashboard → Plugins & MCPs → Add Marketplace → Import from Repo**. Users then open **Customize → helix → Install** and select project or user scope. Follow Cursor's repository-provider and account-permission prompts. Helix has the required marketplace manifests; a public Cursor Marketplace listing requires submission and review. See [Cursor's marketplace documentation](https://cursor.com/docs/plugins). + +Cursor 桌面支持使用 `/helix-xxx` Skill,按共享运行时合同要求 Python 3.10+,默认通过 Cursor 市场分发。发行仓库可访问后,团队管理员通过 **Dashboard → Plugins & MCPs → Add Marketplace → Import from Repo** 导入;用户在 **Customize → helix → Install** 选择项目或用户范围。仓库和账号权限按 Cursor 提示配置。Helix 已具备市场清单,公共市场上架需单独提交审核。 + +Reload the window, start a new Agent and select `/helix-status` from `/helix-` completion. Verify the selected plugin root and runtime preflight, then use `/helix-init` in the application repository. The nine command names and arguments follow the shared workflow contracts. Existing native acceptance covers a fixed remote source; the general marketplace UI flow remains an accepted verification gap for this release. + +安装后重载窗口,新建 Agent,从 `/helix-` 补全选择 `/helix-status`,核对插件来源及运行预检,再在业务仓库运行 `/helix-init`。九个命令的名称与参数沿用公共流程合同。已有原生实机证据覆盖固定远程来源;普通市场 UI 完整流程保留为本次接受的验证缺口。 + +The [Cursor installer contract](../helixharness/hosts/cursor/installer.md) documents advanced fixed-SHA project configuration, optional Helix-managed Local installation and recovery. Fixed-SHA configuration lets Cursor obtain the package without a source checkout. Registered managed-local installations on macOS/Linux support `/helix-update`; native marketplace installations use Cursor's update controls. A manually copied Local package has no managed registration. + +[Cursor 安装合同](../helixharness/hosts/cursor/installer.md)提供高级固定 SHA 项目配置、可选的 Helix 托管 Local 安装及恢复步骤。固定 SHA 由 Cursor 获取插件,无需先下载源码。macOS/Linux 的已登记托管 Local 支持 `/helix-update`;原生市场安装通过 Cursor 管理更新,手工复制副本没有托管登记。 + +Keep a single intended Helix source active in Cursor. A Skill from an imported copy can conflict with a Hook from another installation. Resolve `plugin_source_mismatch` by checking the actual Skill and plugin root. Matching names or versions alone do not identify the selected source. Imported Claude hooks may also duplicate checks. Preserve other hosts' installations and user settings while resolving these conflicts. + +Cursor 中应选择明确的 Helix 来源。导入副本的 Skill 与另一安装的 Hook 可能冲突,遇到 `plugin_source_mismatch` 时核对实际 Skill 与插件根路径。同名或同版本不能证明来源一致;导入 Claude hooks 也可能重复检查。处理冲突时保留其他宿主安装及用户设置。 + +Statistics require explicit consent and current-session identity. Missing identity skips statistics while workflows continue. Token attribution can be partial or unavailable. Consent revocation cleans the current repository; window-close and later-startup cleanup are best effort. CLI, Cloud and full D2C are outside this release's complete acceptance scope. See [support and verification boundaries](cursor-testing.md). + +统计需要明确授权和本次会话身份,缺身份时跳过统计并继续业务,Token 归属可为 partial/unavailable。关闭授权清理当前仓库,关窗及后续启动清理尽力执行。CLI、Cloud、完整 D2C 不在本期完整验收范围,详见[支持与验证边界](cursor-testing.md)。 + + + +## Qoder + +Qoder Desktop and Qoder CLI only consume plugin ZIPs through the App install tool, so HelixHarness ships a packaging script instead of a marketplace entry. Clone the repository, then from the plugin directory build the ZIP: + +```bash +cd helixharness +python3 scripts/package_qoder_plugin.py # produces dist/helix-.zip +``` + +The ZIP root is the plugin root and packs only the Qoder-facing allowlist: `.qoder-plugin/plugin.json`; `agents/`; `skills/`; the Qoder Host Kit under `hosts/qoder/` (host manifest, hooks, command projection, installer contract and runtime adapters) together with `hosts/shared/` and `hosts/host-manifest-v1.schema.json`; the host-neutral `commands/`, `reference/`, `scripts/`, `templates/` and `workflows/`; and the root license, notice, README and plugin-usage files. `hosts/qoder/hooks.json` is copied to `hooks/hooks.json` in the package. Codex, Claude Code, Cursor and openCode surfaces, `__pycache__` and local state are excluded; inside a Git checkout the build also refuses untracked files under allowlisted paths and symlinks that resolve outside the plugin root. Each `agents/*.md` gets a `name` frontmatter matching the file name, because Qoder registers subagents by `name`. + +Install through one of: + +- **Qoder App**: Extensions panel → Install local plugin → pick `dist/helix-.zip`. +- **In-session tool**: ask the assistant to call `qoder-settings.install_extension` with `{source: "local", kind: "plugin", filePath: "/absolute/path/helix-.zip"}`. + +After installation, review and trust the plugin hooks in the App, then open a new session: plugin manifest, skills, agents and hooks load at session start, and a session already started continues using the previously bound plugin root. Qoder's `.qoder-plugin/plugin.json` `version` drives the cache directory `/plugins/cache/local/helix//`, so each release bumps the version and the App replaces the older cache; coexisting versions inside the same session are not supported. Uninstall through Extensions → Installed → the plugin → Delete. + +Because Qoder has no marketplace CLI equivalent, the plugin's `plugin_update` adapter is declared `unsupported`, and `/helix:update` returns a blocked status. Upgrades reinstall a new ZIP built from an updated source copy. The Qoder Host Kit declares a shape-based stale-binding policy so re-running `/helix:init` collapses the linter handlers from earlier version directories in `.qoder/settings.json` and reports residual drift as warnings (`--strict` promotes them to failures); user-owned hooks are never touched. See the [Qoder installer contract](../helixharness/hosts/qoder/installer.md) for the full packaging list, capability boundaries and acceptance checks. + +Qoder Desktop 与 Qoder CLI 只能通过 App 安装工具消费插件 ZIP,因此 HelixHarness 提供本地打包脚本而不是市场条目。克隆仓库后在插件目录内运行: + +```bash +cd helixharness +python3 scripts/package_qoder_plugin.py # 产出 dist/helix-.zip +``` + +ZIP 根即插件根,只按白名单收 Qoder 表面:`.qoder-plugin/plugin.json`;`agents/`;`skills/`;`hosts/qoder/` 下的 Qoder Host Kit(宿主清单、hooks、命令投影、安装合同与运行时适配文件)以及 `hosts/shared/` 与 `hosts/host-manifest-v1.schema.json`;与其它宿主共享的 `commands/`、`reference/`、`scripts/`、`templates/` 与 `workflows/`;以及根目录的 license、notice、README 与插件使用说明文件。`hosts/qoder/hooks.json` 打包时复制为 `hooks/hooks.json`。Codex、Claude Code、Cursor、openCode 的表面、`__pycache__` 与本地状态都在排除之列;在 git 仓库内构建时,白名单路径下未纳入版本控制的文件与解析到插件根之外的符号链接会直接报错。每个 `agents/*.md` 会被注入与文件名一致的 `name` frontmatter——Qoder 按 `name` 注册子代理角色。 + +安装方式二选一: + +- **Qoder App**:扩展面板 → 安装本地插件 → 选择 `dist/helix-.zip`。 +- **会话内工具**:让助手调用 `qoder-settings.install_extension`,参数 `{source: "local", kind: "plugin", filePath: "/绝对路径/helix-.zip"}`。 + +安装后先在 App 内审阅并信任插件 hooks,然后开新会话:插件清单、skills、agents 与 hook 都在会话启动时装载;已开启的会话仍沿用之前绑定的 `plugin_root`,不会随更新刷新。Qoder 的 `.qoder-plugin/plugin.json` `version` 决定缓存目录 `/plugins/cache/local/helix//`,每次发布递增版本号,App 会替换旧版本缓存,同一会话内不保证多版本共存。卸载在 扩展 → 已安装 → 该插件 → … → 删除 完成。 + +Qoder 没有等价 marketplace CLI,插件的 `plugin_update` 声明为 `unsupported`,`/helix:update` 会返回阻断状态;升级须重新打包并安装新版 ZIP。Qoder Host Kit 声明了基于形状的陈旧绑定策略,重跑 `/helix:init` 时按 `--linter` 参数与脚本路径识别早先写入的检查命令,无论版本目录或路径写法怎么变都会自动收敛重复条目,`check` 默认把残留差异报为 warning,`--strict` 才判失败;用户自己的其他 Hook 不受影响。完整打包列表、能力边界与验收清单见 [Qoder 安装合同](../helixharness/hosts/qoder/installer.md)。 ## Updates -Run `/helix:update` in the host conversation. The plugin checks the configured marketplace, shows an available update and uses the host adapter after authorization. +On Claude Code and Codex, run `/helix:update` in the host conversation. The plugin checks the configured marketplace, shows an available update and uses the host adapter after authorization. Cursor uses `/helix-update` for registered Helix-managed local installations on macOS/Linux, following the same check, confirmation and one-time authorization protocol. Manual copies and Cursor marketplace installations use their original update mechanism. OpenCode's `/helix:update` supports clean source checkouts with an explicit Git upstream through the same confirmation protocol, pins the approved commit and only fast-forwards. Dirty, detached or package-managed copies require their original manual mechanism. Restart or reload OpenCode and open a new session after an update. Rollback remains an explicit source-revision selection, not an automatic reset; see the [OpenCode update and rollback steps](../helixharness/hosts/opencode/installer.md#更新回退与卸载). Qoder declares `plugin_update` as `unsupported` because the App has no marketplace CLI — upgrade by bumping `.qoder-plugin/plugin.json` `version`, rebuilding the ZIP with `scripts/package_qoder_plugin.py` and installing it through the App; the new version replaces the older cache and any session opened before the install continues using the previously bound plugin root. -- **Git source:** the host refreshes the configured repository; use the same marketplace for later versions. -- **Local source:** update the source copy yourself first, then check for updates. The plugin does not pull an arbitrary local checkout automatically. If the copy was cloned, review its working tree and update it using your normal Git workflow. +- **Marketplace Git source (Codex/Claude Code):** the host refreshes the configured repository; use the same marketplace for later versions. OpenCode's clone-based directory configuration follows the local-source steps below. +- **Local source:** update the source copy yourself first, then restart or reload the host. The plugin does not pull an arbitrary local checkout automatically. If the copy was cloned, review its working tree and update it using your normal Git workflow. +- **Qoder ZIP:** rebuild and reinstall through the App; `/helix:update` returns a blocked status. - Start a new host session after updating; review changed hooks when the host requests it. ## Uninstall -Use the host's plugin management to uninstall `helix@helixharness-marketplace`. Generated project knowledge, requirements and business code are retained. Review project hook settings separately if you no longer want the host to invoke HelixHarness in that application repository. +Use the host's plugin management to uninstall `helix@helixharness-marketplace`; for this repository's OpenCode directory configuration, remove only its entry from the `plugins` array and restart or reload OpenCode; for Qoder, uninstall through Extensions → Installed → the plugin → … → Delete. Generated project knowledge, requirements and business code are retained. Review project hook settings separately if you no longer want the host to invoke HelixHarness in that application repository. ## 中文说明 -需要 Python 3.10+、Git,以及支持插件市场的 Codex 或 Claude Code。先确保宿主已完成登录或模型配置,能够正常使用。平台不是安装插件的前置条件。 +需要 Python 3.10+、Git,以及支持插件的 Codex、Claude Code、Cursor、OpenCode(macOS、2.3.2;见[支持矩阵](opencode-testing.md))或 Qoder。Cursor 使用上面的 [Cursor 独立安装流程](#cursor-preview),Qoder 使用上面的 [Qoder 本地 ZIP 安装流程](#qoder)。先确保宿主已完成登录或模型配置,能够正常使用。平台不是安装插件的前置条件。共享运行时的 Windows 支持不代表 Windows Cursor 已完成验收;Cursor 实机验收目前覆盖 macOS。Qoder 的 Host Kit 契约测试已进入 CI 矩阵,但 Qoder App 尚未完成 Windows 实机验收,且只提供 POSIX hook 启动器。 + +**OpenCode Stable 支持(macOS、2.3.2):** 当前源码候选的支持范围与边界见[支持矩阵](opencode-testing.md)。OpenCode 2.2.2、2.3.0 仅有自动化兼容覆盖。 + +插件注册原生 `helix:` 命令、`helix-` 方法 Skill 和 `helix-` 角色。命令、原生 `skill` 工具结果、Skill mention 与原生 Skill 激活均按请求会话绑定仓库目录;会话查询或目录校验失败时阻断未绑定的 Skill 正文。2026-11-20 已在 OpenCode 2.3.2 + DeepSeek 上完成一次合成单仓 Init → Propose → Apply → Archive 真实模型闭环,包含操作者确认和一次受控合同修订;2026-11-23 又完成了 OpenCode 2.3.2 + DeepSeek 的操作者辅助合成双仓 Workspace 与独立 UT 验证;后续已修复 UT 分类校验与原子发布保护,并通过无纠正提醒的真实模型复验。[合成 Workspace 的专项真实模型验证](../helixharness/opencode/tests/README.md#recovery-and-auxiliary-workflow-acceptance-2026-11-23)还覆盖了 Apply 与部分 Archive 原生取消后新会话恢复,以及注入原生 context hook 故障后阻断依赖派发。完整生产业务项目、无人干预时的协议遵守与完整 TUI/桌面 UI 验收仍未完成;已覆盖范围见[定向终端 UI 验收](../helixharness/opencode/tests/README.md#targeted-terminal-ui-acceptance-2026-11-23)。Workspace Apply 的 `may_delegate` RepoJob 使用 `helix-worker`,需要 `experimental.subagent_depth >= 2`;独立 reviewer 保持只读 leaf。深度不足时阻塞该 RepoJob,不得绕过评审。 + +OpenCode 适配使用原生工具和会话 Hook,但未提供等价的 SessionStart/Stop/失败/会话结束业务保证。任务跟踪通过 `scripts/task_plan.py` 原子更新同一份 `tasks.md`。统计在明确授权后记录阶段事实和工作流轨迹,不采集原始会话,token 和未观察到的工具次数保持未知。`/helix:update` 对有明确 Git upstream 的干净源码安装执行既有确认协议,锁定 commit 并仅快进;有本地修改、游离版本或包管理安装时不自动更新。Init 合并 `AGENTS.md`,不创建 `.opencode/` settings;插件在原生 write/edit/patch 成功后执行已有项目巡检,shell 修改仍需显式检查。d-d2c 的 Claude skill-scoped Stop/PreToolUse guard 不执行,采用无 hook / `--bare` 语义,仍须遵守用户决策、视觉验收和完成门禁。 + +正式发布后,Codex 与 Claude Code 使用上面的 GitHub 安装命令,Cursor 使用市场界面流程,这些市场安装方式无需先手动克隆源码。Qoder 通过 App 安装本地 ZIP:克隆本仓库,在 `helixharness/` 内运行 `python3 scripts/package_qoder_plugin.py` 生成 `dist/helix-.zip`,再由 Qoder 扩展面板或 `qoder-settings.install_extension` 完成安装,之后在 App 内审阅并信任 hooks、新开一个会话;升级须重新打包并安装新版 ZIP,同一会话不会刷新已绑定的 `plugin_root`。OpenCode 的安装已在 2.3.2 验证:按[本地目录安装步骤](#opencode-local-directory-installation-verified-with-232)先克隆本仓库,再将 `helixharness/` 子目录的绝对路径加入项目或全局 `opencode.json(c)` 的 `plugins`;保留已有配置和其他插件,无需 `bun install`,随后重启或重新加载并新开会话。该版本原生 `plugin add` 不接受绝对本地目录或 Git 子目录后缀;其他版本须另行核验。发布前测试或修改插件时,使用[开发者安装(本地源码)](#developer-installation):先下载或克隆源码;Codex/Claude Code 从**包含两个子项目的根目录**添加本地市场,OpenCode 继续使用上述本地目录配置。根市场指向 `./helixharness`,不会安装平台。独立插件副本仍可添加插件目录本身;同名市场只保留一个来源。 -正式发布后使用上面的 GitHub 安装命令,无需先手动克隆源码。发布前测试或修改插件时,使用[开发者安装(本地源码)](#developer-installation):先下载或克隆源码,再从**包含两个子项目的根目录**添加本地市场。根市场指向 `./helixharness`,不会安装平台。独立插件副本仍可添加插件目录本身;同名市场只保留一个来源。 +安装后新开会话,确认九个命令可见;Claude Code/Codex/Cursor 检查插件 hooks 已审阅并实际执行,Qoder 在扩展面板审阅插件 hooks,OpenCode 检查命令展开后的当前仓库/会话 Host Context 绑定,再在业务仓库运行 `/helix:init`(Cursor 为 `/helix-init`,Qoder 亦为 `/helix:init`,来源是 `hosts/qoder/skills/` 薄入口)并检查项目文档及宿主支持的项目 hooks(OpenCode 不生成项目 hooks)。单仓 Init 还需检查非空的 `docs/harness/index.md`、`docs/knowledge/index.md`、`docs/knowledge/project-context.md` 及对应项目类型要求的其他产物,不能只看“已完成”回复。若出现 `plugin_source_mismatch`,先核对市场来源与当前安装插件,选定正确来源并新开会话,避免混用其他 checkout 或缓存版本。Claude Code/Codex 更新使用 `/helix:update`;本地来源需先自行更新源码,不能把版本识别成功当作已完成跨版本升级。Cursor 在 macOS/Linux 上使用 `/helix-update` 升级已登记的 Helix 托管本地安装,复用检查、确认与一次性授权协议;手工副本和原生市场安装仍通过原安装方式更新。Qoder 的 `plugin_update` 声明为 `unsupported`,`/helix:update` 返回阻断,升级须重新打包并安装新版 ZIP;重跑 `/helix:init` 时 Qoder 的 Host Kit 会按 `--linter` 参数与脚本路径识别自家 handler,自动收敛旧版本目录与不同路径写法留下的重复条目。 -安装后新开会话,确认九个命令可见、插件 hooks 已审阅并实际执行,再在业务仓库运行 `/helix:init` 并检查项目 hooks。单仓 Init 还需检查非空的 `docs/harness/index.md`、`docs/knowledge/index.md`、`docs/knowledge/project-context.md` 及对应项目类型要求的其他产物,不能只看“已完成”回复。若出现 `plugin_source_mismatch`,先核对市场来源与当前安装插件,选定正确来源并新开会话,避免混用其他 checkout 或缓存版本。更新使用 `/helix:update`;本地来源需先自行更新源码,不能把版本识别成功当作已完成跨版本升级。 +OpenCode 的本仓库安装由用户自行更新源码并重启或重新加载;回退时在源码副本切换到此前批准的版本,不能用原生 `plugin update` 替代。卸载只移除 `plugins` 中本插件的目录条目,不删除业务仓库的知识、需求或代码。固定版本与回退示例见 [OpenCode 安装说明](../helixharness/hosts/opencode/installer.md#更新回退与卸载)。 -**从空项目开始:**在 Git 仓库根目录运行 `/helix:init`。新目录请先自行执行 `git init`,不需要首次提交。空仓库或纯文档仓库跳过代码扫描,生成最小项目上下文、约束、需求目录与宿主 hooks,未确认的信息标记 TODO。再用 `/helix:propose` 和 `/helix:apply` 开发第一个需求。Init 和 Apply 不创建提交。 +**从空项目开始:**在 Git 仓库根目录运行 `/helix:init`(Cursor 为 `/helix-init`)。新目录请先自行执行 `git init`,不需要首次提交。空仓库或纯文档仓库跳过代码扫描,生成最小项目上下文、约束、需求目录与宿主支持的 hooks(OpenCode 只合并 `AGENTS.md`),未确认的信息标记 TODO。再用 `/helix:propose` 和 `/helix:apply`(Cursor 为 `/helix-propose` 和 `/helix-apply`)开发第一个需求。Init 和 Apply 不创建提交。 ## Windows local source / Windows 本地源码 diff --git a/docs/opencode-testing.md b/docs/opencode-testing.md new file mode 100644 index 0000000..faeacaf --- /dev/null +++ b/docs/opencode-testing.md @@ -0,0 +1,75 @@ +# OpenCode support and verification / OpenCode 支持与验证 + +## Release decision / 发布结论 + +The 2026-11-23 maintainer-directed assessment classifies the current source candidate as **Stable within the scope below**. The primary verified environment is macOS 15.7.1 arm64 with OpenCode **2.3.2**, local CLI/server and selected PTY interactions. This is a scoped integration-support decision based on the recorded acceptance, not a claim that every model, operating system or UI path is accepted. The candidate includes local uncommitted fixes; this decision does not publish a release, tag or remote commit. + +2026-11-23 按维护者授权完成支持范围评定:当前源码候选在下列范围内为 **Stable(稳定支持)**。主要已验环境为 macOS 15.7.1 arm64、OpenCode **2.3.2**、本地 CLI/server 与所列 PTY 交互。这是根据已有验收作出的集成支持声明,不代表任意模型、平台和 UI 路径均已验收。候选包含本地未提交修复;本次评定不创建发布、Tag 或远端提交。 + +OpenCode 2.2.2 and 2.3.0 passed automated native-server compatibility tests. Those results are retained separately; they do not extend the primary real-model/installation Stable envelope to every version from 2.2.2 onward. Unlisted versions require compatibility checks before that envelope is extended. + +OpenCode 2.2.2、2.3.0 已通过自动化原生服务兼容检查;该证据单独保留,不将主要真实模型/安装验收范围外推为“2.2.2 起所有版本均 Stable”。未列版本须先验证兼容性,再扩展支持矩阵。 + +## Supported scope / 支持矩阵 + +| Area / 范围 | Supported behavior and evidence / 已验行为与证据 | Boundary / 边界 | +| --- | --- | --- | +| Environment / 环境 | macOS 15.7.1 arm64, OpenCode 2.3.2, Python 3.10+ contract (actual runs: 3.14.3), Git; JVM samples used Java 17. / Python 合同为 3.10+,已记录执行版本为 3.14.3,JVM 样本使用 Java 17。 | No native Windows/Linux, desktop GUI or unlisted-version acceptance. / Windows、Linux 原生会话、桌面图形与未列版本未验收。 | +| Installation / 安装 | A checked-out nested plugin configured by its absolute package directory loads without runtime npm dependencies. Independent copies resolve nine commands, eight method Skills and seventeen roles to their installed roots. / checkout 后配置绝对包目录,无运行时 npm 依赖;独立副本的命令、Skill、角色及路径绑定通过。 | This repository's monorepo Git subdirectory spec and native CLI add of an absolute directory are unsupported on the tested build; use the [installation guide](installation.md). / 已测版本采用安装指南中的目录配置路径。 | +| Single workflows / 单仓流程 | Recorded synthetic real-model Init, Propose, Apply, Archive, active Single BugFix, readonly Status and independent native review. Existing Java tests/build files remain protected. / 合成真实模型覆盖核心阶段、活跃 BugFix、只读 Status 和独立评审,并核验既有测试/构建文件。 | Normal product, task, Advisory and knowledge-scope choices remain interactive. This is not an unattended-production reliability guarantee. / 正常产品、任务、Advisory 和知识范围决策仍需交互,不保证无人干预生产可靠性。 | +| Workspace / 多仓 | Synthetic two-repository workflows, actual native ownership-root moves, readonly repositories, dependency blocking, Apply cancellation/fresh-session recovery and partial Archive recovery are recorded. / 双仓流程、原生切仓、只读仓库、依赖阻断与定向恢复已记录。 | Workspace Apply requires effective nested delegation depth at least 2 and actual admission of independent leaf reviewers. Unknown depth is not a pass; blockers must not trigger inline/self-review fallback. / depth 至少 2,须实际准入;未知不算通过,不内联或自审。 | +| Unit tests / 单测 | Java 17 Maven/Gradle samples, existing tests, incremental precompile, structured classification and single-file atomic publication were checked. / Java 17 Maven/Gradle、既有测试、增量预编译、结构化分类与单文件原子发布已验证。 | Default class discovery is root-project-only; custom/multi-module paths require explicit verification. Real Kotlin/Groovy compilation and a naturally elapsed one-hour timeout remain unaccepted. Native write/edit guards are not a shell sandbox or multi-file transaction. / 不承诺自动发现多模块;未验真实 Kotlin/Groovy、一小时自然超时或多文件事务。 | +| Native surfaces / 原生入口 | Nine commands, eight method Skills and seventeen roles are registered. Direct mentions, Skill activation, cross-session binding, resource confinement and prerequisite failures have automated native coverage. / 九命令、八方法 Skill、十七角色,原生 mention/激活、跨会话绑定和失败阻断有自动化覆盖。 | Config still needs separate full interaction acceptance; source update, stage telemetry and task adapters have their own scoped checks. / Config 完整设置交互另需验收;源码更新、阶段统计和任务适配分别有专项验证。 | +| Targeted PTY / 定向终端 | Native question choice, permission Reject, double-Escape shell interruption, session-history reattachment, command menu and Status were exercised through a real PTY client. / 真实 PTY 验证问答、拒绝权限、双 Escape 中断、历史重连、菜单与 Status。 | Terminal byte streams/reconstructed text are interaction evidence, not pixel screenshots or full desktop/TUI coverage. / 文本重建仅证明交互,不是像素或完整图形界面验收。 | +| Models / 模型 | Recorded real-model runs used DeepSeek with tool support; other native tests used a loopback scripted model. / 真实模型使用支持工具调用的 DeepSeek,其余原生回归使用回环脚本模型。 | Arbitrary provider/model behavior is not guaranteed. A correct script receipt can still be misdescribed by a model; Status has a closed empty-output contract but no final-text interceptor. / 不保证任意模型行为;Status 展示受合同约束,不是最终文本硬拦截。 | + +## Assessment gates and evidence / 评定门槛与依据 + +The scoped decision requires: (1) native registration/binding and confinement checks pass; (2) core workflow and independent-review acceptance is recorded; (3) selected failure/cancellation paths fail closed and preserve completed work; (4) the documented installation path works independently of the development checkout; (5) current relevant regressions pass; (6) unsupported and unverified capabilities remain explicit. No unresolved high/medium finding in the recorded reviews was waived by renaming it an unsupported feature. + +本次门槛为:原生注册/绑定/边界检查通过;核心流程和独立评审有记录;所列故障/取消场景保留完成进度并阻断后续错误执行;文档安装路径可脱离开发工作树运行;当前相关回归通过;不支持和未验收项保持明确。没有将已记录审查中未解决的高/中等级问题改名为“不支持”而放行。 + +Public summaries are in the [adapter verification record](../helixharness/opencode/tests/README.md), especially [recovery and auxiliary acceptance](../helixharness/opencode/tests/README.md#recovery-and-auxiliary-workflow-acceptance-2026-11-23), [targeted terminal acceptance](../helixharness/opencode/tests/README.md#targeted-terminal-ui-acceptance-2026-11-23), and [existing Java-project acceptance](../helixharness/opencode/tests/README.md#existing-java-project-acceptance-2026-11-23). Raw synthetic traces remain local and ignored; no credentials, session transcripts or runtime dumps are published here. The manifest's optional machine-E2E receipt remains null; this document is a scoped support assessment, not a fabricated new machine receipt. + +公开摘要见上述适配验收记录及三个专项章节。原始合成轨迹只保存在本地忽略目录,不在此发布凭据、会话正文或运行时转储。manifest 的可选机器 E2E receipt 保持 null;本文是支持范围评定,不伪装为新生成的机器验收回执。 + +Historical checkpoints include 888 Python cases (881 passed, seven skipped), and 136 Bun tests / 483 assertions on each of 2.2.2, 2.3.0 and 2.3.2. The final delivery follow-up reran 136 native-enabled Bun tests on 2.3.2, 18 readonly/user-command tests and 34 host/reference tests, plus typecheck and links. These suites overlap and must not be added together. The release-declaration change receives fresh related checks; it does not relabel old logs as newly executed full suites. + +历史检查点包括 Python 888 项(881 通过、7 跳过),三个版本各 136 项 Bun 测试/483 次断言。交付收尾复跑 2.3.2 的 136 项原生开启 Bun 测试、18 项只读/命令及 34 项宿主/引用检查,另有类型与链接检查。检查有重叠,不累加;本次声明调整另跑相关检查,不把旧日志写成新全量。 + +## Explicit exclusions / 明确排除 + +- [Helix-owned capability adapters](../helixharness/hosts/opencode/capabilities.md) cover consented stage facts, canonical task progress, plugin-level edit checks and consented pinned fast-forward source updates. Native project settings hooks and equivalent Stop/failure/session-end business hooks remain unsupported. / 已补齐授权阶段统计、canonical 任务进度、插件编辑后巡检和确认后锁定 commit 的源码快进更新;原生项目设置 Hook 和等价 Stop/失败/会话结束业务 Hook 仍未提供。 +- Full D2C/MasterGo/browser provenance and visual-fidelity acceptance are outside this Stable scope. Existing explicit evidence gates remain available with their documented audit limits; remaining D2C work stays paused. / 完整 D2C、浏览器来源认证与视觉还原不在本次 Stable 范围,既有门禁保留,剩余工作暂停。 +- Controlled standalone Git-package install/update/rollback used local synthetic Git transport. Public GitHub transport, arbitrary registries, marketplace GUI and every source-conflict combination are not accepted. / 独立根包 Git 验收使用本地受控传输,不外推公开网络、市场 GUI 或任意来源冲突。 +- Existing Java acceptance used controlled synthetic planning inputs and a clean copy after an unborn-Git dirty-baseline blocker. It is not an uninterrupted unattended production run. / 存量 Java 验收包含夹具准备、正常决策及干净副本,不是连续无人干预生产运行。 + +## Reassessment rules / 后续升级与降级 + +Reassess before expanding operating systems, OpenCode versions, model claims, build layouts, distribution channels or unsupported capabilities. A reproducible break in the supported scope's repository/session binding, readonly ownership, independent-review admission, publication integrity or completed-work recovery blocks release until repaired or explicitly removed from the support scope. Feature-specific evidence gaps outside the matrix do not silently broaden the Stable promise. Preserve failed attempts and distinguish test-environment repairs from product fixes. + +扩展平台、OpenCode 版本、模型声明、构建布局、分发渠道或原不支持能力前重新评定。已支持范围内若复现目录/会话绑定、只读所有权、独立评审准入、发布完整性或完成进度恢复缺陷,应阻断发布,修复后验证或明确收缩支持范围。矩阵外的缺口不自动扩大 Stable 承诺;保留失败记录,区分夹具排错与产品修复。 + + +## Declaration-check rerun / 声明检查复跑 + +The 2026-11-23 declaration change passed 11 OpenCode Host Kit tests, 20 Host Registry tests, 136 native-enabled Bun tests on OpenCode 2.3.2 (483 assertions), and typecheck. Business runtime and capability flags were unchanged. These are new declaration/compatibility checks, not new paid-model lifecycle acceptance. + +本次声明变更复跑通过 11 项 OpenCode Host Kit、20 项 Host Registry、OpenCode 2.3.2 下的 136 项原生开启 Bun 测试(483 次断言)及类型检查;业务运行代码与能力标志未改。这是新的声明/兼容检查,不是新增付费模型全流程验收。 + +From repository root with Python 3.10+ / 在仓库根目录运行: + +```bash +PYTHONPATH=helixharness/scripts python3 -m unittest discover -s helixharness/scripts/tests -p test_opencode_host.py +PYTHONPATH=helixharness/scripts python3 -m unittest discover -s helixharness/scripts/tests -p test_host_runtime_registry.py +``` + +Then from the plugin directory with development dependencies available / 然后在插件目录、具备开发检查依赖时运行: + +```bash +cd helixharness +HELIXHARNESS_OPENCODE_BIN=/absolute/path/to/opencode-2.3.2 HELIXHARNESS_OPENCODE_E2E=1 bun test opencode/tests +bun run typecheck +``` + +Native fixtures use isolated homes and scripted loopback models and clean their own services. Use the declared runtime version; checking a different version does not automatically expand this Stable matrix. / 原生夹具隔离 home、使用回环脚本模型并清理自有服务;使用已声明的宿主版本,其他版本的单次检查不会自动扩展本矩阵。 diff --git a/docs/platform-support.md b/docs/platform-support.md index cda0bcc..c4b0ad5 100644 --- a/docs/platform-support.md +++ b/docs/platform-support.md @@ -8,6 +8,8 @@ HelixHarness 面向 macOS、原生 Windows 与 Linux,要求 Python 3.10+、Git | --- | --- | --- | | Codex plugin / 插件 | POSIX preflight and hooks | PowerShell preflight; Codex `commandWindows` hooks | | Claude Code plugin / 插件 | Bash hooks | Git for Windows Bash; set `CLAUDE_CODE_GIT_BASH_PATH` if auto-discovery fails | +| Cursor plugin / 插件 | POSIX entrypoints; native acceptance on macOS, managed Local updates on macOS/Linux / POSIX 入口;macOS 实机验收,macOS/Linux 托管 Local 更新 | Outside this release's verified scope / 不在本期已验证范围 | +| Qoder plugin / 插件 | Plugin ZIP installed by the App; POSIX `sh` SessionStart hook; native acceptance on macOS / 由 App 安装插件 ZIP;POSIX `sh` SessionStart hook;macOS 实机验收 | Host Kit contract tests run in the CI matrix; no native Windows acceptance yet, and only the POSIX hook launcher exists / Host Kit 契约测试已进入 CI 矩阵;尚未完成 Windows 实机验收,且仅有 POSIX hook 启动器 | | Project linters / 项目检查 | Python scripts | Same Python scripts; legacy `.sh` scripts require Git Bash | | Platform Web, Demo, eval / 平台 | Python service | Same Python service, PowerShell environment syntax | | Scheduled usage sync / 定时同步 | crontab | Task Scheduler, current user logged in; cron matching in Python | @@ -16,9 +18,13 @@ HelixHarness 面向 macOS、原生 Windows 与 Linux,要求 Python 3.10+、Git | Optional root user isolation / 可选 root 隔离 | Linux `setpriv` only | Leave `HELIXHARNESS_PLATFORM_EVOLUTION_EXECUTION_USER` unset; do not configure Linux user isolation | | D2C browser helpers / 浏览器工具 | Node and Chrome/Edge | Node and Chrome/Edge; native executable discovery | -The host controls hook trust and execution. Codex must support `commandWindows`; Claude Code must support Bash hooks (`shell: "bash"`). Review changed hooks after updating and start a new session. Merely seeing commands in the menu does not verify hooks. +The host controls hook trust and execution. Codex must support `commandWindows`; Claude Code must support Bash hooks (`shell: "bash"`). Review changed hooks after updating and start a new session. Merely seeing commands in the menu does not verify hooks. Generated project hook commands bind the current interpreter and the plugin paths. Qoder's Host Kit declares a shape-based stale-binding policy, so re-running Init lets `project_hooks_cli.py merge` recognize our own earlier handlers by their `--linter` flag and script path regardless of version-directory or path-spelling changes and collapse duplicates automatically. Recognition is strict: the command must be our canonical ` -X utf8