为 codexhost 新增 Harness 插件,或规划、审查、补全现有 Harness Adapter。按当前公共契约实现原生能力,区分插件后端、预装发行和 Desktop 产品接入;不用于单纯添加 Model、Provider 或账号。
日本語の概要は準備中です。原文の説明を表示しています。
Sync delta specs from an OpenSpec change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change. Also use when the user says "openspec sync" or "opsx sync".
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Sync delta specs from a change to main specs.
This is an agent-driven operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context, schemas, view). Once selected, treat --store <id> as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run openspec status --change "<name>" --json --store "<id>", not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
Project check: These steps expect a project that already uses OpenSpec. Before the first step that writes anything (new change, archive, sync specs, or authoring an artifact file), confirm the project has a root: run openspec list --json (with --store <id> when a store is selected, since the store is then the root) and read root. A root object means the project is set up. "root": null means it is not - there is no openspec/ directory here, and a write such as openspec new change would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
One "root": null is not about setup: when a status error message starts with Declared in or Invalid store declaration in and names this project's openspec/config.yaml (or config.yml), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the store: line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's message and fix.
Otherwise, with no root, what happens next depends on how this workflow was reached:
openspec init), target a store they already have (--store <id>), or continue without OpenSpec for this request. Wait for their answer.In both branches, never create the root as a side effect: do not run openspec init until the user asks for it, do not hand-create openspec/ files, and do not let a command create it.
<capability-path> is the spec directory relative to specs/ (for example, user-auth or identity/user-auth). Preserve the full path from each delta spec when resolving its main spec.
Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Select the change
If a name is provided, use it. Otherwise:
openspec list --json to get available changes and ask the user to select oneWhen prompting, show changes that have delta specs (under specs/ directory).
Always announce: "Using change: <name>" and how to override (e.g., /openspec-sync-specs <other>).
Resolve change context
Run:
openspec status --change "<name>" --json
The JSON includes planningHome.root. Main specs live under <planningHome.root>/openspec/specs/ — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.
Find delta specs
Use artifactPaths.specs.existingOutputPaths from the status JSON as the
only source of delta spec paths. If the specs entry is missing or
existingOutputPaths is empty, report that there are no delta specs to sync,
do not infer them from other artifacts, and stop without requesting artifact
instructions or writing a main spec.
Sync every path in existingOutputPaths unless the caller narrowed the set.
A caller narrows it by naming an explicit list of complete entries from
existingOutputPaths — copy those absolute values verbatim. Archive does
this inline, and a user can too (for example, by selecting the entry ending
in /specs/billing/invoices/spec.md).
Then sync only the named paths and leave the remaining delta specs untouched:
bulk archive excludes a delta whose implementation it could not find, and
syncing it anyway would write a main spec the caller deliberately withheld.
Carry that narrowed selection through step 4; never widen it back to the full
list. If a named path is not in existingOutputPaths, do not sync it —
report it and stop, rather than dropping it silently. If the named list is
empty, report that there is nothing to sync and stop without writing a main
spec.
Each delta spec file contains sections like:
## ADDED Requirements - New requirements to add## MODIFIED Requirements - Changes to existing requirements## REMOVED Requirements - Requirements to remove## RENAMED Requirements - Requirements to rename (FROM:/TO: format)If no delta specs found, inform user and stop.
For each delta spec, apply changes to main specs
Before the first main-spec write, obtain one current specs-rule snapshot:
openspec instructions specs --change "<name>" --json, reuse it and do not
fetch the same instructions again.rules means no artifact rules are configured
and the existing semantic merge continues.Apply returned rules only to the content and form of the main specs produced
by this merge. Artifact rules are not operation guidance and cannot change
selected roots, delta paths, CLI checks, or workflow steps. Use their text as
constraints without copying it verbatim into a main spec or summary.
For each capability delta spec path selected in step 3 — the full existingOutputPaths list, or the narrowed subset when a caller supplied one (these may belong to a selected store, not the repo):
a. Read the delta spec to understand the intended changes
b. Read the main spec at <planningHome.root>/openspec/specs/<capability-path>/spec.md (may not exist yet)
If it does not exist yet (a new capability), match what openspec archive does:
only ADDED requirements may be applied - step d creates the spec from them.
MODIFIED and RENAMED have no requirement to act on, so stop the sync for that
capability and report that its main spec does not exist and only ADDED is allowed
for a new spec; never invent the missing requirement. REMOVED has nothing to
remove - skip it and warn.
c. Apply changes intelligently:
ADDED Requirements:
MODIFIED Requirements:
REMOVED Requirements:
spec.md - and the directory once
nothing else is left in it - only when ALL of these hold:
## Purpose);.openspec.yaml declares retire_capabilities: true;spec.md resolves inside the real specs root (do not follow a
capability-directory symlink to delete an external file).
If removing the selected requirements would leave no requirement blocks and
any retirement condition is not satisfied, do not modify the main spec. Stop
the sync for that capability, report the blocking condition, and tell the user
how to resolve it. Never write or leave an empty ## Requirements section.
When only the marker is missing, say that too - it is the one thing the user
can add to make the retirement go through.## Purpose; any other section blocks
retirement. Name Purpose when you report the retirement. Include a pasteable
git checkout only when the spec lived in the caller's checkout;
otherwise give checkout-scoped recovery guidance.RENAMED Requirements:
## Purpose in the delta:
openspec archive does; it warns and moves on)d. Create new main spec if capability doesn't exist yet:
.openspec.yaml declares retire_capabilities: true, report it as already retired
and continue without recreating the spec. Without that marker, report the sync as blocked:
openspec archive rejects it with Spec must have at least one requirement.
An empty delta has no operations to sync; report it as blocked too.
Never write an empty ## Requirements section.<planningHome.root>/openspec/specs/<capability-path>/spec.md## Purpose body verbatim when it has one
(this is what openspec archive does); only write a brief TBD placeholder when it does notValidate updated main specs
Run openspec validate --specs with the same selected-root flags used earlier.
If validation fails, report the problems and do not claim the sync succeeded.
Show summary
After applying all changes, summarize:
spec.md, its Purpose, and
either a pasteable git checkout or checkout-scoped recovery guidanceDelta Spec Format Reference
# Spec Delta
## Purpose
Only on a delta that introduces a brand-new capability. Seeds the new main spec.
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
The system SHALL keep doing the existing thing, now also handling A.
#### Scenario: Scenario the main spec already has
- **WHEN** user does X
- **THEN** system does Y
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`
Main Spec Format Reference
Main specs are what the delta merges INTO. They must never contain delta operation headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) - after syncing, every requirement lives under a single ## Requirements section:
# <capability> Specification
## Purpose
Short description of what this capability does and why it exists.
## Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
Key Principle: Intelligent Merging
Unlike programmatic merging, you merge rather than overwrite:
openspec validate and openspec archive both reject one that drops a scenario the main spec still has.Output On Success
## Specs Synced: <change-name>
Updated main specs:
**<capability-1>**:
- Added requirement: "New Feature"
- Modified requirement: "Existing Feature" (added 1 scenario)
**<capability-2>**:
- Created new spec file
- Added requirement: "Another Feature"
Main specs are now updated. The change remains active - archive when implementation is complete.
Guardrails
artifactPaths.specs.existingOutputPaths; never infer delta specs from unrelated artifactsexistingOutputPaths; never widen it back to the full listまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
为 codexhost 新增 Harness 插件,或规划、审查、补全现有 Harness Adapter。按当前公共契约实现原生能力,区分插件后端、预装发行和 Desktop 产品接入;不用于单纯添加 Model、Provider 或账号。
日本語の概要は準備中です。原文の説明を表示しています。
审查 codexhost 的 Pull Request 或本地 diff 的正确性与边界。检查包与 Rust 所有权边界、官方 Thread 与外部 Harness Thread 的区分、Renderer 私有绑定、生命周期与测试强度。用于“review 这个 PR / diff”;一批 PR 的总览与推荐分请先用 codexhost-pr-overview,再对其中需深审的 PR 使用本 skill。
日本語の概要は準備中です。原文の説明を表示しています。
在 codexhost 中寻找有证据支撑的简化候选:无生产调用方的接口、镜像表示、为未来而设计的通用性、可由依赖或内置能力替代的手写代码。默认只读,输出带证据的候选清单;用于审计 AI 辅助开发造成的过度设计,不用于实现新功能。
日本語の概要は準備中です。原文の説明を表示しています。
把一批 codexhost PR 汇总成一张表:推荐分(1–5)、作者及已合并数、作用、范围、状态、关联、理由。带“暂缓”标签的 PR 只列出、不检查。用于“看一下现在的 PR”“这批 PR 怎么处理”;单个 PR 的代码缺陷审查请接着用 codexhost-code-review。
日本語の概要は準備中です。原文の説明を表示しています。
在推送、标记 PR 就绪或声称“检查通过”之前,按 diff 触及的面选择最小而充分的本地检查,不反射式跑全量。覆盖 TypeScript、Rust、Renderer、发布脚本与 Gate 的选择规则,以及改写历史推送的保护。
日本語の概要は準備中です。原文の説明を表示しています。
发布 codexhost 正式版、预览版,编写或确认 Release Notes,检查发布 CI,暂停、恢复或排查发布。支持正常正式发布,以及 npm latest + GitHub Prerelease、不给现有用户更新提示的预览发行。不用于普通代码提交或 Harness CLI 更新。
日本語の概要は準備中です。原文の説明を表示しています。