@kisev/skills-opencode 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,100 +2,89 @@
2
2
 
3
3
  [Русский](README.ru.md)
4
4
 
5
- `@kisev/skills-opencode` is the optional npm integration. It does not include
6
- portable skills or mutate configuration on import.
7
- Managed files use exact SHA-256 ownership checks.
8
- It provides the capability router, OpenCode runtime, agent-profile management,
9
- and an opt-in installer for agents, commands, and plugins. It requires Node.js
10
- 22+ and OpenCode 1.18.29+; import, plugin loading, and npm lifecycle do not
11
- write configuration.
5
+ `@kisev/skills-opencode@2.0.3` is the optional OpenCode-specific layer. Portable
6
+ skills have a separate lifecycle and must be installed independently through the
7
+ [root portable flow](../../README.md).
12
8
 
13
- ## Install Skills
9
+ ## Requirements and Ownership
14
10
 
15
- Install portable skills first:
11
+ The package requires Node.js 22+ and OpenCode `>=1.18.29 <1.19.0`.
16
12
 
17
- ```shell
18
- npx --yes skills add kisev/skills --agent opencode --skill '*' --copy --yes
19
- ```
20
-
21
- Use `--skill <name>` for one skill. `npx skills` accepts a reproducible tag URL,
22
- for example `https://github.com/kisev/skills/tree/v2.0.0`; the package never
23
- installs or updates skills and reports the exact `npx skills add` command when a
24
- skill is missing.
13
+ | Component | Project scope | Global scope |
14
+ | ------------------ | ---------------------------- | --------------------------------------------------------- |
15
+ | npm package | project `node_modules` | `node_modules` in the npm project at `~/.config/opencode` |
16
+ | Commands | `.opencode/commands` | `~/.config/opencode/commands` |
17
+ | Agents | `.opencode/agents` | `~/.config/opencode/agents` |
18
+ | Optional wrappers | `.opencode/plugins` | `~/.config/opencode/plugins` |
19
+ | Ownership metadata | `.opencode/.skills-opencode` | `~/.config/opencode/.skills-opencode` |
25
20
 
26
- ## Install Integration
21
+ The package and generated wrappers must remain resolvable after the installer
22
+ exits. Import, plugin loading, and npm lifecycle scripts do not install assets,
23
+ install portable skills, or edit OpenCode configuration.
27
24
 
28
- ```shell
29
- npm install @kisev/skills-opencode@2.0.0
30
- ```
25
+ ## Persistent Package Install
31
26
 
32
- Interactive selection is available only in a TTY. Non-TTY installs require
33
- explicit `--commands`, `--agents`, and `--plugins` flags; selectable plugins
34
- default to an empty set. The wizard shows skill commands, package commands,
35
- fixed agents, and `rules-injector`, `rtk`, `zed-bell`.
27
+ ### Project Scope
36
28
 
37
- Preview before any write:
29
+ Install in the repository's npm project and run the CLI from that project root:
38
30
 
39
31
  ```shell
40
- npm exec -- skills-opencode install --scope global --dry-run
32
+ cd /path/to/project
33
+ npm install --save-exact @kisev/skills-opencode@2.0.3
34
+ npm exec -- skills-opencode install --scope project --dry-run
41
35
  ```
42
36
 
43
- Apply the shown digest only:
37
+ The package remains in project `node_modules`; confirmed assets go under
38
+ `.opencode`.
39
+
40
+ ### Global Scope
41
+
42
+ Use `~/.config/opencode` as the persistent npm project:
44
43
 
45
44
  ```shell
46
- npm exec -- skills-opencode install --scope global --confirm <digest>
45
+ mkdir -p "$HOME/.config/opencode"
46
+ cd "$HOME/.config/opencode"
47
+ test -f package.json || npm init --yes
48
+ npm install --save-exact @kisev/skills-opencode@2.0.3
49
+ npm exec -- skills-opencode install --scope global --dry-run
47
50
  ```
48
51
 
49
- Use `--json` for automation.
50
- The machine-readable plan includes `requires_restart`; a preview uses `--dry-run`
51
- and an apply uses `--confirm <digest>` with identical arguments.
52
+ Keep the dependency in that npm project's `package.json` and lock file.
53
+ Confirmed assets go under `~/.config/opencode`.
52
54
 
53
- `global` manages `.config/opencode/agents`, `.config/opencode/commands`, and
54
- `.config/opencode/plugins`. Project scope manages `.opencode/agents`,
55
- `.opencode/commands`, and `.opencode/plugins`. Profile configuration is kept in
56
- `.config/opencode/.skills-opencode/agent-profiles.json` globally or under
57
- `.opencode/.skills-opencode` for a project.
58
- Project assets are limited to the current working directory. Scope is required;
59
- the installer never changes `opencode.json`, overwrites unknown or modified
60
- files, or records ownership manifests before confirmed apply. The short preview
61
- reports changed paths, conflicts, restart status, digest, and its confirm command.
55
+ ## Select Assets
62
56
 
63
- ## Read-only Doctor
57
+ In a TTY, `install` opens four selection groups: Skill command adapters, Package
58
+ command adapters, Fixed agents, and Selectable plugins. The two command groups
59
+ and six fixed agents start selected; optional plugins start unselected. Skill
60
+ command adapters are OpenCode slash commands that load an already-installed
61
+ same-named portable skill. Package command adapters invoke package tools. A
62
+ command adapter selection never selects or installs a skill.
64
63
 
65
- `doctor` reports facts without writing:
64
+ Outside a TTY, pass all three selection groups. This example selects three
65
+ commands, all fixed agents, and no wrapper:
66
66
 
67
67
  ```shell
68
- npm exec -- skills-opencode doctor --scope project
69
- npm exec -- skills-opencode doctor --scope global --json
68
+ npm exec -- skills-opencode install --scope project \
69
+ --commands doctor,reconcile,agent-profiles \
70
+ --agents manager,architect,mapper,worker,review,critic \
71
+ --plugins none --dry-run
70
72
  ```
71
73
 
72
- It never creates lifecycle state, consumes receipts, recovers journals, starts
73
- plugins, or starts LSP servers. Its versioned JSON report contains stable check
74
- IDs, catalog and installed-manifest versions, ownership/drift/collision classes,
75
- inventory findings, runtime summaries, redacted configuration projections, and
76
- LSP facts. It never serializes secrets, raw configuration, environment values,
77
- receipts, or credentials. Exit status `0` is clean, `1` reports findings, and
78
- `2` means invalid input or an incomplete probe failure.
79
-
80
- ## Reconcile Retired Assets
81
-
82
- `reconcile` previews retirement and preserves conflicts:
74
+ If any selection flag is present outside a TTY, `--commands`, `--agents`, and
75
+ `--plugins` are all required. Query exact current names with:
83
76
 
84
77
  ```shell
85
- npm exec -- skills-opencode reconcile --scope project --dry-run
86
- npm exec -- skills-opencode reconcile --scope project --confirm <digest>
87
- npm exec -- skills-opencode reconcile --scope global --dry-run --json
78
+ npm exec -- skills-opencode capabilities --json
88
79
  ```
89
80
 
90
- It considers only public portable skills, package commands, plugins, agents, and
91
- installation metadata for the selected scope. Retired exact-owned files move to
92
- a private content-addressed XDG archive with an index, never disappear.
93
- Modified-managed, user-owned, unknown, symlink, unsafe-path, worktree, and
94
- ambiguous-source entries remain byte-for-byte conflicts. The journaled target and
95
- archive transaction provides rollback, recovery, and repeatable no-op operation.
96
- Doctor reports archive entries and conflicts read-only.
81
+ The selectable wrappers are `rules-injector`, `rtk`, and `zed-bell`.
82
+
83
+ ## Activate the Core Plugin
97
84
 
98
- Add the plugin manually:
85
+ The installer records whether the selection needs core integration, but never
86
+ creates or edits `opencode.json`. Add the package to the user-owned `plugin`
87
+ array for the same scope while preserving existing entries:
99
88
 
100
89
  ```json
101
90
  {
@@ -104,104 +93,129 @@ Add the plugin manually:
104
93
  }
105
94
  ```
106
95
 
107
- ## Manage Agents
96
+ For project scope, keep the package in project `node_modules` and configuration
97
+ in the project. For global scope, keep the npm project and user configuration
98
+ under `~/.config/opencode`. Restart OpenCode after activation or asset changes.
99
+
100
+ ## Preview and Confirm
108
101
 
109
- The direct CLI manages models without LLM calls:
102
+ Every mutation begins with `--dry-run`. The preview reports operations,
103
+ conflicts, restart requirements, receipt expiry, a SHA-256 digest, and the exact
104
+ confirmation command.
110
105
 
111
106
  ```shell
112
- npm exec -- skills-opencode agent list --scope global
113
- npm exec -- skills-opencode agent configure manager --scope global --dry-run
114
- npm exec -- skills-opencode agent model-set worker --scope global \
115
- --model openai/gpt-5 --variant high --dry-run
116
- npm exec -- skills-opencode agent reconcile --scope global --dry-run
107
+ npm exec -- skills-opencode install --scope project --dry-run
117
108
  ```
118
109
 
119
- Fixed roles preserve their names and canonical prompts and permissions; only
120
- model and variant change. The interactive configuration wizard selects an agent,
121
- provider, its models, and published variants, showing the current target and
122
- offering keep, change, clear variant, back, and cancel. It does not invoke an
123
- LLM, OpenCode Question, or catalog refresh. If the catalog is unavailable it
124
- does not write and prints the exact model instruction.
110
+ The mandatory OpenCode flow is: persistent npm install, `install --dry-run`, the
111
+ exact confirmation command printed by that preview, add the package to the
112
+ user-owned `plugin` entry, and restart OpenCode. Use the persistent npm project
113
+ at `~/.config/opencode` for global commands. Only after this flow is complete,
114
+ update the package and apply its installer plan before running reconcile.
115
+
116
+ Run the command printed by the preview, including all selection flags. Receipts
117
+ are private, valid for 10 minutes, single-use, and bound to the action, scope,
118
+ root, and current inventory. Apply rejects stale state and unsafe conflicts.
119
+
120
+ ## Doctor
125
121
 
126
- When the catalog is unavailable, use exact `--model <provider/model>` and an
127
- optional `--variant`; `provider/model` identifies the selected model. The
128
- optional `agent_profiles` tool and slash commands adapt the same direct-CLI
129
- plan/apply contract.
122
+ `doctor` reads integration facts without creating receipts, recovering journals,
123
+ starting plugins, or starting LSP servers:
130
124
 
131
125
  ```shell
132
- npm exec -- skills-opencode critic add security --scope global \
133
- --model anthropic/claude-sonnet-4-6 --dry-run
134
- npm exec -- skills-opencode critic remove security --scope global --dry-run
126
+ npm exec -- skills-opencode doctor --scope project
127
+ npm exec -- skills-opencode doctor --scope project --json
135
128
  ```
136
129
 
137
- Additional critics use `critic-<safe-suffix>`; fixed roles and the standard
138
- critic cannot be renamed or removed. Every mutation uses a one-time private
139
- receipt valid for 10 minutes, a lifecycle lock, inventory recheck, journaled
140
- all-or-rollback transaction, and final validation. Interrupted mutations recover
141
- before requiring a fresh plan. Global profile configuration and its semantic
142
- deployment manifest are kept together; project scope keeps corresponding files
143
- under its `.opencode` directory. Package updates do not reset selected models,
144
- variants, or additional critics.
130
+ The report includes versions, ownership, drift, collisions, archive counts,
131
+ redacted configuration projections, runtime summaries, and LSP facts. It does
132
+ not serialize raw configuration, environment values, receipts, credentials, or
133
+ secrets. Exit status `0` is clean, `1` reports findings, and `2` reports invalid
134
+ input or an incomplete probe failure.
135
+
136
+ ## Update
145
137
 
146
- ## Upgrade and Uninstall
138
+ From the npm project that owns the dependency, install the exact intended
139
+ version, preview and confirm `install` with the same scope and desired selection,
140
+ then restart OpenCode:
147
141
 
148
142
  ```shell
149
- npm exec -- skills-opencode uninstall --scope global --dry-run
150
- npm exec -- skills-opencode uninstall --scope global --confirm <digest>
143
+ npm install --save-exact @kisev/skills-opencode@2.0.3
144
+ npm exec -- skills-opencode install --scope project --dry-run
151
145
  ```
152
146
 
153
- The full JSON install preview is:
147
+ Use the complete confirmation command printed by the preview. The installer
148
+ updates only files whose recorded ownership and SHA-256 still match. User-owned
149
+ or modified managed files remain conflicts. Package update does not reset agent
150
+ model choices, variants, additional critics, or retained profile configuration.
151
+
152
+ ## Reconcile
153
+
154
+ `reconcile` classifies current and historical portable skills, package commands,
155
+ plugins, agents, and installation metadata for one scope:
154
156
 
155
157
  ```shell
156
- npm exec -- skills-opencode install --scope global --dry-run --json
158
+ npm exec -- skills-opencode reconcile --scope project --dry-run
159
+ npm exec -- skills-opencode reconcile --scope project --confirm <digest>
160
+ npm exec -- skills-opencode reconcile --scope global --dry-run --json
157
161
  ```
158
162
 
159
- On upgrade, the installer updates only managed files whose SHA-256 still matches.
160
- The one-time `1.0.0` migration transfers the six fixed-agent ownership records
161
- only when package/version, manifest records, and every file hash match exactly.
162
- Uninstall removes only unchanged manifest-owned files; modified files remain
163
- conflicts and profile configuration is retained for a later installation.
163
+ Before reconcile, first update the package in its owning npm project and apply
164
+ the exact installer plan. Reconcile does not install, update, or remove portable
165
+ skills; use only the pinned `npx --yes skills@1.5.23` flow for those skills.
164
166
 
165
- ## Runtime Options
167
+ Confirmed reconcile archives exact-owned retired assets in a private
168
+ content-addressed XDG archive and removes their deployed copies. Modified,
169
+ user-owned, unknown, symlink, unsafe, or ambiguous entries remain unchanged as
170
+ findings or conflicts. Worktrees and runtime state are preserved. The archive is
171
+ inspectable through `doctor`; no archive restore or purge command is provided.
166
172
 
167
- Plugins are independent and selectable ones are opt-in.
173
+ ## Manage Agents
174
+
175
+ The direct CLI manages fixed-agent models and additional critics without an LLM
176
+ call:
168
177
 
169
178
  ```shell
170
- npm exec -- skills-opencode agent list --scope global --json
179
+ npm exec -- skills-opencode agent list --scope global
180
+ npm exec -- skills-opencode agent configure manager --scope global --dry-run
181
+ npm exec -- skills-opencode agent model-set worker --scope global --model openai/gpt-5 --variant high --dry-run
182
+ npm exec -- skills-opencode critic add security --scope global --model anthropic/claude-sonnet-4-6 --dry-run
183
+ npm exec -- skills-opencode agent reconcile --scope global --dry-run
171
184
  ```
172
185
 
173
- The package exports the core OpenCode plugin and independent factories for
174
- `rules-injector`, `rtk`, and `zed-bell`. Retired plugin APIs and internal lifecycle
175
- implementations are not public. Rules injection fails soft within a bounded
176
- budget; RTK fails open.
186
+ Fixed roles keep their names, prompts, and permissions; only model and variant
187
+ change. Additional critics use `critic-<safe-suffix>`. Every mutation uses the
188
+ same preview and one-time confirmation contract.
177
189
 
178
- ## Stage 18 Routing
190
+ ## Uninstall
179
191
 
180
- `doit` owns the complete evidence -> plan -> confirmation -> execution -> checks
181
- -> report lifecycle; `manager` only adapts it to OpenCode. The route tool has four
182
- destinations: exploration to `mapper`, architecture to `architect`, implementation
183
- to `worker`, and review to `review` or one selected `critic`. Documentation and
184
- quick work remain in `doit`.
192
+ Keep the package resolvable until its assets are removed:
185
193
 
186
- The route inventory comes only from resolved host configuration. Callers cannot
187
- inject agents, capabilities, tools, models, or availability. Versioned receipts,
188
- cards, and mapper/worker/review/critic reports are checked at real Task dispatch
189
- and result hooks. Cards bind paths, checks, explicit VCS operations, and separate
190
- execution, publication, and history-rewrite confirmations.
191
-
192
- ## Boundaries
193
-
194
- Portable skills and package assets install independently.
194
+ 1. Preview and confirm package-owned asset removal.
195
+ 2. Remove `@kisev/skills-opencode` from the user-owned `plugin` array.
196
+ 3. Uninstall the dependency from the same npm project.
197
+ 4. Restart OpenCode.
195
198
 
196
199
  ```shell
197
- npm exec -- skills-opencode install --scope project --dry-run
198
- npm exec -- skills-opencode install --scope project --confirm <digest>
200
+ npm exec -- skills-opencode uninstall --scope project --dry-run
201
+ npm exec -- skills-opencode uninstall --scope project --confirm <digest>
202
+ npm uninstall @kisev/skills-opencode
199
203
  ```
200
204
 
201
- Commands are thin adapters that pass untrusted arguments to the native Skill
202
- tool; validation, confirmation, batch/review rules, and result format remain the
203
- skill or runner responsibility. `capabilities`, `route`, and `doctor` are package
204
- tools and commands for catalog, routing, and health. `agent_profiles` and the
205
- four agent slash commands are optional UX adapters, not a separate skill.
205
+ For global scope, run the same flow from `~/.config/opencode` with
206
+ `--scope global`. Uninstall archives exact manifest-owned assets and preserves
207
+ modified files as conflicts, along with worktrees, runtime state, and retained
208
+ profile configuration. It does not remove portable skills or edit
209
+ `opencode.json`. No archive restore or purge command is provided.
210
+
211
+ ## Boundaries
206
212
 
207
- The package is MIT-licensed; the repository root README has full instructions.
213
+ - Portable skills and package assets install, update, and uninstall independently.
214
+ - Commands corresponding to skills are thin adapters; the portable skill remains
215
+ authoritative and must be installed separately.
216
+ - Package tools are `capabilities`, `route`, `doctor`, `agent_profiles`, and
217
+ `reconcile`; `route` has no slash command.
218
+ - The installer owns only files proved by manifests and exact hashes.
219
+ - The package is MIT-licensed. Current inventory and checks are in
220
+ [Migration Inventory](../../docs/migration-inventory.md) and
221
+ [Verification](../../docs/verification.md).
package/README.ru.md CHANGED
@@ -2,97 +2,158 @@
2
2
 
3
3
  [English](README.md) | [Русский](README.ru.md)
4
4
 
5
- `@kisev/skills-opencode` - npm package с capability router, OpenCode runtime,
6
- управлением agent profiles и opt-in installer для agents, commands и plugins. Он
7
- не включает portable skills и не меняет конфигурацию при import, plugin load или
8
- npm lifecycle. Package требует Node.js 22+ и OpenCode 1.18.29+.
5
+ `@kisev/skills-opencode@2.0.3` - optional OpenCode-specific слой. У portable
6
+ skills отдельный lifecycle: их нужно установить независимо через
7
+ [корневую инструкцию](../../README.ru.md).
9
8
 
10
- ## Установка skills
9
+ ## Требования и ownership
11
10
 
12
- Сначала установите нужные portable skills через `npx skills` из публичного
13
- репозитория:
11
+ Package требует Node.js 22+ и OpenCode `>=1.18.29 <1.19.0`.
12
+
13
+ | Component | Project scope | Global scope |
14
+ | ------------------ | ---------------------------- | ------------------------------------------------- |
15
+ | npm package | project `node_modules` | `node_modules` в npm project `~/.config/opencode` |
16
+ | Commands | `.opencode/commands` | `~/.config/opencode/commands` |
17
+ | Agents | `.opencode/agents` | `~/.config/opencode/agents` |
18
+ | Optional wrappers | `.opencode/plugins` | `~/.config/opencode/plugins` |
19
+ | Ownership metadata | `.opencode/.skills-opencode` | `~/.config/opencode/.skills-opencode` |
20
+
21
+ Package и generated wrappers должны оставаться доступными после завершения
22
+ installer. Import, plugin loading и npm lifecycle scripts не устанавливают
23
+ assets или portable skills и не меняют OpenCode configuration.
24
+
25
+ ## Постоянная установка package
26
+
27
+ ### Project scope
28
+
29
+ Установите package в npm project репозитория и запускайте CLI из его корня:
14
30
 
15
31
  ```shell
16
- npx --yes skills add kisev/skills --agent opencode --skill '*' --copy --yes
32
+ cd /path/to/project
33
+ npm install --save-exact @kisev/skills-opencode@2.0.3
34
+ npm exec -- skills-opencode install --scope project --dry-run
17
35
  ```
18
36
 
19
- Для одного skill укажите `--skill <name>`. Для воспроизводимой установки можно
20
- передать URL GitHub tag, например
21
- `https://github.com/kisev/skills/tree/v2.0.0`. Package никогда не устанавливает
22
- и не обновляет skills. Если команда не нашла skill, она сообщает точную команду
23
- `npx skills add` для его установки.
37
+ Package остаётся в project `node_modules`, confirmed assets размещаются в
38
+ `.opencode`.
24
39
 
25
- ## Установка integration
40
+ ### Global scope
26
41
 
27
- Установите npm package там, где OpenCode сможет разрешить plugin:
42
+ Используйте `~/.config/opencode` как постоянный npm project:
28
43
 
29
44
  ```shell
30
- npm install @kisev/skills-opencode@2.0.0
45
+ mkdir -p "$HOME/.config/opencode"
46
+ cd "$HOME/.config/opencode"
47
+ test -f package.json || npm init --yes
48
+ npm install --save-exact @kisev/skills-opencode@2.0.3
49
+ npm exec -- skills-opencode install --scope global --dry-run
31
50
  ```
32
51
 
33
- Interactive selection доступен только в TTY. В non-TTY install нужно явно передать
34
- `--commands`, `--agents` и `--plugins`; selectable plugins по умолчанию пусты.
35
- Wizard показывает skill commands, package commands, fixed agents и
36
- `rules-injector`, `rtk`, `zed-bell`. Сначала покажите план installer. CLI выводит короткую сводку:
37
- счётчики по группам, только изменяемые paths, conflicts, restart flag, digest и
38
- готовую confirm-команду. Эта команда не меняет deployment:
52
+ Сохраните dependency в `package.json` и lock file этого npm project. Confirmed
53
+ assets размещаются в `~/.config/opencode`.
54
+
55
+ ## Выбор assets
56
+
57
+ В TTY команда `install` открывает четыре группы: Skill command adapters, Package
58
+ command adapters, Fixed agents и Selectable plugins. Две command-группы и шесть
59
+ fixed agents изначально выбраны, optional plugins - нет. Skill command adapters
60
+ это OpenCode slash-команды, загружающие уже установленный одноимённый portable
61
+ skill. Package command adapters вызывают package tools. Выбор adapter не выбирает
62
+ и не устанавливает skill.
63
+
64
+ Вне TTY передайте все три selection group. Этот пример выбирает три commands,
65
+ всех fixed agents и ни одного wrapper:
39
66
 
40
67
  ```shell
41
- npm exec -- skills-opencode install --scope global --dry-run
68
+ npm exec -- skills-opencode install --scope project \
69
+ --commands doctor,reconcile,agent-profiles \
70
+ --agents manager,architect,mapper,worker,review,critic \
71
+ --plugins none --dry-run
42
72
  ```
43
73
 
44
- Проверьте сводку и примените только показанный digest:
74
+ Если вне TTY передан любой selection flag, обязательны `--commands`, `--agents`
75
+ и `--plugins`. Точные текущие имена показывает команда:
45
76
 
46
77
  ```shell
47
- npm exec -- skills-opencode install --scope global --confirm <digest>
78
+ npm exec -- skills-opencode capabilities --json
48
79
  ```
49
80
 
50
- `global` устанавливает assets в `~/.config/opencode/agents`,
51
- `~/.config/opencode/commands` и `~/.config/opencode/plugins`. Для текущего
52
- repository используйте `project`:
81
+ Selectable wrappers: `rules-injector`, `rtk`, `zed-bell`.
82
+
83
+ ## Активация core plugin
84
+
85
+ Installer записывает, нужна ли selection core integration, но никогда не создаёт
86
+ и не меняет `opencode.json`. Добавьте package в user-owned массив `plugin` для
87
+ того же scope, сохранив существующие entries:
88
+
89
+ ```json
90
+ {
91
+ "$schema": "https://opencode.ai/config.json",
92
+ "plugin": ["@kisev/skills-opencode"]
93
+ }
94
+ ```
95
+
96
+ Для project scope храните package в project `node_modules`, а configuration - в
97
+ project. Для global scope храните npm project и user configuration в
98
+ `~/.config/opencode`. После activation или изменения assets перезапустите
99
+ OpenCode.
100
+
101
+ ## Preview и confirm
102
+
103
+ Каждая mutation начинается с `--dry-run`. Preview показывает operations,
104
+ conflicts, необходимость restart, срок действия receipt, SHA-256 digest и точную
105
+ confirmation command.
53
106
 
54
107
  ```shell
55
108
  npm exec -- skills-opencode install --scope project --dry-run
56
- npm exec -- skills-opencode install --scope project --confirm <digest>
57
109
  ```
58
110
 
59
- Project assets находятся в `.opencode/agents`, `.opencode/commands` и
60
- `.opencode/plugins` текущего working directory. Scope обязателен. Installer не изменяет `opencode.json`, не
61
- перезаписывает неизвестные или изменённые files и сохраняет ownership manifests
62
- только после confirmed apply.
111
+ Обязательный OpenCode flow: persistent npm install, `install --dry-run`, exact
112
+ confirmation command из preview, добавление package в user-owned `plugin` и
113
+ перезапуск OpenCode. Для global-команд используйте persistent npm project в
114
+ `~/.config/opencode`. Только после этого обновите package, примените installer
115
+ plan и запускайте reconcile.
63
116
 
64
- Для automation добавьте `--json`. Этот режим сохраняет полный стабильный
65
- machine-readable plan, включая `operations` и `requires_restart`:
117
+ Выполните команду из preview со всеми selection flags. Receipts приватны,
118
+ действуют 10 минут, применяются один раз и связаны с action, scope, root и
119
+ текущим inventory. Apply отклоняет stale state и unsafe conflicts.
120
+
121
+ ## Doctor
122
+
123
+ `doctor` читает integration facts без создания receipts, recovery journals,
124
+ запуска plugins или LSP servers:
66
125
 
67
126
  ```shell
68
- npm exec -- skills-opencode install --scope global --dry-run --json
69
- npm exec -- skills-opencode agent list --scope global --json
127
+ npm exec -- skills-opencode doctor --scope project
128
+ npm exec -- skills-opencode doctor --scope project --json
70
129
  ```
71
130
 
72
- ## Read-only doctor
131
+ Report содержит versions, ownership, drift, collisions, archive counts, redacted
132
+ configuration projections, runtime summaries и LSP facts. Raw configuration,
133
+ environment values, receipts, credentials и secrets не сериализуются. Exit
134
+ status `0` означает чистое состояние, `1` - findings, `2` - invalid input или
135
+ incomplete probe failure.
73
136
 
74
- `doctor` is a read-only installer health report. It never creates lifecycle
75
- state, consumes receipts, recovers journals, starts plugins or starts LSP
76
- servers. `project` and `global` are isolated scopes; unavailable OpenCode host
77
- facts are reported as incomplete rather than inferred.
137
+ ## Обновление
138
+
139
+ В npm project, которому принадлежит dependency, установите точную нужную version,
140
+ покажите и подтвердите `install` с тем же scope и нужной selection, затем
141
+ перезапустите OpenCode:
78
142
 
79
143
  ```shell
80
- npm exec -- skills-opencode doctor --scope project
81
- npm exec -- skills-opencode doctor --scope global --json
144
+ npm install --save-exact @kisev/skills-opencode@2.0.3
145
+ npm exec -- skills-opencode install --scope project --dry-run
82
146
  ```
83
147
 
84
- The JSON report is versioned and contains stable check IDs, package/catalog and
85
- installed-manifest versions, ownership/drift/collision classifications, stage-8
86
- inventory findings, lifecycle/runtime state summaries, redacted config
87
- projections and LSP facts. Secrets, raw config, environment values, receipts
88
- and credentials are never serialized. Exit code `0` is clean, `1` reports
89
- findings, and `2` means invalid input or an incomplete probe failure.
148
+ Используйте полную confirmation command из preview. Installer обновляет только
149
+ files с совпадающими recorded ownership и SHA-256. User-owned или modified
150
+ managed files остаются conflicts. Package update не сбрасывает выбранные agent
151
+ models, variants, additional critics или retained profile configuration.
90
152
 
91
- ## Reconcile retired assets
153
+ ## Reconcile
92
154
 
93
- `reconcile` проверяет только public portable skills, package commands, plugins,
94
- agents и installation metadata выбранного scope. XDG runtime state не читается и
95
- не изменяется. Preview сохраняет private receipt с TTL и печатает digest:
155
+ `reconcile` классифицирует current и historical portable skills, package
156
+ commands, plugins, agents и installation metadata одного scope:
96
157
 
97
158
  ```shell
98
159
  npm exec -- skills-opencode reconcile --scope project --dry-run
@@ -100,143 +161,63 @@ npm exec -- skills-opencode reconcile --scope project --confirm <digest>
100
161
  npm exec -- skills-opencode reconcile --scope global --dry-run --json
101
162
  ```
102
163
 
103
- Retired files с доказанным inventory ownership и exact SHA-256 перемещаются в
104
- private content-addressed XDG archive с index, а не удаляются. Modified-managed,
105
- user-owned, unknown, symlink, unsafe-path, worktree и ambiguous-source entries
106
- остаются conflicts без изменения bytes. Journal target и archive обеспечивает
107
- rollback, recovery и повторный no-op reconcile. Doctor показывает archive и
108
- conflicts read-only.
164
+ Перед reconcile сначала обновите package в принадлежащем ему npm project и
165
+ примените exact installer plan. Reconcile не устанавливает, не обновляет и не
166
+ удаляет portable skills; для них используйте только pinned
167
+ `npx --yes skills@1.5.23` flow.
109
168
 
110
- Добавьте plugin в `opencode.json` вручную:
111
-
112
- ```json
113
- {
114
- "$schema": "https://opencode.ai/config.json",
115
- "plugin": ["@kisev/skills-opencode"]
116
- }
117
- ```
118
-
119
- Полностью перезапустите OpenCode после install, upgrade или uninstall: registry
120
- agents и commands строится до plugin hooks.
169
+ Confirmed reconcile архивирует exact-owned retired assets в private
170
+ content-addressed XDG archive и удаляет их deployed copies. Modified, user-owned,
171
+ unknown, symlink, unsafe и ambiguous entries остаются без изменений как findings
172
+ или conflicts. Worktrees и runtime state сохраняются. Archive доступен для
173
+ просмотра через `doctor`; команд restore или purge нет.
121
174
 
122
175
  ## Управление agents
123
176
 
124
- Рекомендуемый интерфейс - прямой terminal CLI: он не вызывает LLM и не расходует
125
- токены. Fixed roles `manager`, `architect`, `mapper`, `worker`, `review` и
126
- стандартный `critic` всегда сохраняют имена и canonical prompts/permissions.
127
- Меняются только `model` и `variant`:
177
+ Direct CLI управляет models fixed agents и additional critics без LLM call:
128
178
 
129
179
  ```shell
130
180
  npm exec -- skills-opencode agent list --scope global
131
181
  npm exec -- skills-opencode agent configure manager --scope global --dry-run
132
- npm exec -- skills-opencode agent model-set worker --scope global \
133
- --model openai/gpt-5 --variant high --dry-run
182
+ npm exec -- skills-opencode agent model-set worker --scope global --model openai/gpt-5 --variant high --dry-run
183
+ npm exec -- skills-opencode critic add security --scope global --model anthropic/claude-sonnet-4-6 --dry-run
134
184
  npm exec -- skills-opencode agent reconcile --scope global --dry-run
135
185
  ```
136
186
 
137
- `agent configure` предлагает настоящий terminal wizard: стрелками выбираются
138
- agent из inventory, затем provider, только его models и, если metadata выбранной
139
- модели публикует variants, variant. Текущие model/variant и target показываются
140
- перед выбором; доступны `keep`, `change`, `clear variant`, `back` и `cancel`.
141
- Wizard не вызывает LLM, OpenCode Question или refresh catalog. Если catalog
142
- недоступен, он завершается без записи и печатает инструкцию для exact
143
- `--model <provider/model>` с optional `--variant`. Для модели без variants
144
- дополнительный selector не показывается.
187
+ Fixed roles сохраняют имена, prompts и permissions; меняются только model и
188
+ variant. Additional critics используют `critic-<safe-suffix>`. Каждая mutation
189
+ использует тот же contract preview и one-time confirmation.
145
190
 
146
- Additional critic имеет имя `critic-<safe-suffix>`. Стандартный `critic` и fixed
147
- roles нельзя удалить или переименовать:
191
+ ## Uninstall
148
192
 
149
- ```shell
150
- npm exec -- skills-opencode critic add security --scope global \
151
- --model anthropic/claude-sonnet-4-6 --dry-run
152
- npm exec -- skills-opencode critic remove security --scope global --dry-run
153
- ```
193
+ Package должен оставаться доступным до удаления его assets:
154
194
 
155
- Для любой mutation используйте готовую confirm-команду из preview либо замените
156
- `--dry-run` на `--confirm <digest>` и повторите те же аргументы. Человекочитаемый
157
- plan не печатает полный JSON и сворачивает длинные группы paths. Digest связан с
158
- одноразовым private receipt, действует 10 минут и повторно не применяется. Для
159
- machine-readable result добавьте `--json`; поле `requires_restart` сообщает о
160
- необходимости полностью перезапустить OpenCode.
161
-
162
- В global scope profile configuration хранится в
163
- `~/.config/opencode/.skills-opencode/agent-profiles.json`, а semantic deployment
164
- manifest - рядом в `agent-profiles.manifest.json`. Для project scope те же файлы
165
- находятся под `.opencode/.skills-opencode/`. Configuration хранит выбранные
166
- model/variant и additional critics; package update её не сбрасывает. Manifest
167
- хранит package version, exact critic pool и hashes canonical configuration и
168
- rendered files.
169
-
170
- Inventory различает `package-owned`, `managed`, `user-owned`, `drift` и exact-name
171
- `collision`. User-owned и неизвестные agents не изменяются. Collision блокирует
172
- apply; drift исправляется только явным `agent reconcile`. Все mutations проходят
173
- под lifecycle lock, повторно проверяют inventory, используют journaled
174
- all-or-rollback transaction и выполняют final validation. После прерывания
175
- следующая mutation безопасно восстанавливает before-images и требует свежий plan.
176
-
177
- ## Upgrade и uninstall
178
-
179
- После обновления npm package снова выполните dry-run и подтвердите новый digest.
180
- Installer обновляет только files с совпадающим managed SHA-256.
181
-
182
- При первом upgrade с `1.0.0` installer передаёт ownership шести fixed agents из
183
- generic manifest в profile domain только при точном совпадении package/version,
184
- manifest records и SHA-256 каждого файла. Любое отличие остаётся конфликтом.
185
- Commands и plugins продолжают принадлежать generic installer. Uninstall удаляет
186
- неизменённые deployments, но сохраняет profile configuration для последующей
187
- установки.
195
+ 1. Покажите preview и подтвердите удаление package-owned assets.
196
+ 2. Удалите `@kisev/skills-opencode` из user-owned массива `plugin`.
197
+ 3. Удалите dependency из того же npm project.
198
+ 4. Перезапустите OpenCode.
188
199
 
189
200
  ```shell
190
- npm exec -- skills-opencode uninstall --scope global --dry-run
191
- npm exec -- skills-opencode uninstall --scope global --confirm <digest>
201
+ npm exec -- skills-opencode uninstall --scope project --dry-run
202
+ npm exec -- skills-opencode uninstall --scope project --confirm <digest>
203
+ npm uninstall @kisev/skills-opencode
192
204
  ```
193
205
 
194
- Uninstall удаляет только files из ownership manifest, если их SHA-256 не
195
- изменился. Изменённые пользователем files остаются как `conflict`.
196
-
197
- ## Runtime options
198
-
199
- Package экспортирует core OpenCode plugin и independent plugin factories
200
- `rules-injector`, `rtk`, `zed-bell`. Retired plugin APIs и internal lifecycle
201
- implementations public surface не входят:
202
-
203
- Background Attempts создают workspace только через единый managed worktree
204
- owner. Records используют private current-only state, marker и repository
205
- fingerprint; release перепроверяет регистрацию, fingerprint и чистый status и
206
- возвращает `blocked` без удаления при расхождении. Scheduler принимает строгий
207
- five-field cron, не воспроизводит missed slots и пишет receipts `started`,
208
- `completed`, `failed` или `overrun`.
209
-
210
- `rules-injector` fail-soft применяет ограниченный budget и пропускает native
211
- project/global rules. `rtk` fail-open сжимает большой bash output и добавляет
212
- подсказку для edit error, но не содержит ownership guard.
213
-
214
- ## Routing этапа 18
215
-
216
- `doit` владеет полным lifecycle evidence -> plan -> confirmation -> execution ->
217
- checks -> report; `manager` только адаптирует его к OpenCode. Tool `route` имеет
218
- четыре назначения: exploration -> `mapper`, architecture -> `architect`,
219
- implementation -> `worker`, review -> `review` или один `critic`. Documentation и
220
- quick остаются у `doit`.
221
-
222
- Inventory берётся только из resolved host config. Caller не может подменить agents,
223
- capabilities, tools, models или availability. Versioned receipts, cards и
224
- mapper/worker/review/critic reports проверяются на реальных Task dispatch/result
225
- hooks. Card связывает paths, checks, явные VCS operations и отдельные confirmations
226
- для execution, publication и history rewrite.
206
+ Для global scope выполните тот же flow из `~/.config/opencode` с
207
+ `--scope global`. Uninstall архивирует exact manifest-owned assets и сохраняет
208
+ modified files как conflicts вместе с worktrees, runtime state и retained
209
+ profile configuration. Он не удаляет portable skills и не меняет
210
+ `opencode.json`. Команд restore или purge для archive нет.
227
211
 
228
212
  ## Границы
229
213
 
230
- Portable skills в корне `skills/` универсальны и устанавливаются только через
231
- `npx skills`. Этот package поставляет только OpenCode-specific assets и runtime
232
- router. Команды - тонкие adapters: передают `$ARGUMENTS` как недоверенный ввод
233
- в native Skill tool, а target validation, confirmation, batch/review rules и
234
- формат результата остаются ответственностью skill или runner.
235
- `capabilities`, `route` и `doctor` - package tools/commands для catalog, routing и
236
- health. Tool `doctor` and direct CLI share one read-only facts API; `/doctor` is
237
- only a thin adapter. Tool `agent_profiles` и четыре slash-команды `agent-list`,
238
- `agent-model-set`, `critic-add`, `critic-remove` - optional thin UX над теми же
239
- plan/apply contracts. Отдельного skill `agent-profiles` нет.
240
-
241
- Package распространяется по лицензии MIT. Полные инструкции по portable skills,
242
- upgrade и security boundaries находятся в корневом README репозитория.
214
+ - Portable skills и package assets устанавливаются, обновляются и удаляются
215
+ независимо.
216
+ - Commands, соответствующие skills, являются thin adapters; portable skill
217
+ остаётся authoritative и устанавливается отдельно.
218
+ - Package tools: `capabilities`, `route`, `doctor`, `agent_profiles`, `reconcile`;
219
+ у `route` нет slash command.
220
+ - Installer владеет только files с доказанными manifests и exact hashes.
221
+ - Package распространяется по лицензии MIT. Текущий inventory и checks описаны в
222
+ [инвентаре миграции](../../docs/ru/migration-inventory.md) и
223
+ [документе проверки](../../docs/ru/verification.md).
package/dist/catalog.d.ts CHANGED
@@ -4,5 +4,5 @@ export declare const CATALOG: {
4
4
  readonly agents: readonly ["manager", "architect", "mapper", "worker", "review", "critic"];
5
5
  readonly package_commands: readonly ["capabilities", "doctor", "reconcile", "agent-profiles"];
6
6
  readonly tools: readonly ["capabilities", "route", "doctor", "agent_profiles", "reconcile"];
7
- readonly version: "2.0.2";
7
+ readonly version: "2.0.3";
8
8
  };
package/dist/catalog.js CHANGED
@@ -34,5 +34,5 @@ export const CATALOG = {
34
34
  agents: ["manager", "architect", "mapper", "worker", "review", "critic"],
35
35
  package_commands: ["capabilities", "doctor", "reconcile", "agent-profiles"],
36
36
  tools: ["capabilities", "route", "doctor", "agent_profiles", "reconcile"],
37
- version: "2.0.2",
37
+ version: "2.0.3",
38
38
  };
@@ -179,15 +179,24 @@ export function renderReconcile(plan, options) {
179
179
  if (plan.retired.length)
180
180
  lines.push("", "Retired:", ...plan.retired.slice(0, 20).map((entry) => ` ${terminalSafe(entry.path)}`));
181
181
  if (plan.conflicts.length)
182
- lines.push("", "Conflicts:", ...plan.conflicts
183
- .slice(0, 20)
184
- .map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
182
+ lines.push("", "Conflicts:", ...plan.conflicts.map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
183
+ if (plan.modified_managed.length)
184
+ lines.push("", "Modified managed:", ...plan.modified_managed.map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
185
185
  if (!options.applied) {
186
186
  lines.push("", `Digest: ${plan.digest}`);
187
187
  if (plan.receipt_expires_at)
188
188
  lines.push(`Confirmation expires: ${plan.receipt_expires_at}`);
189
- if (options.confirmationCommand)
189
+ const blocked = plan.modified_managed.length > 0 || plan.conflicts.length > 0;
190
+ if (blocked) {
191
+ lines.push("", "Blocked:");
192
+ if (plan.modified_managed.length)
193
+ lines.push(` Update managed assets first: ${shellCommand(["install", "--scope", plan.scope, "--dry-run"])}`, " Apply the exact confirmation command from that installer preview, then build a new reconcile preview.");
194
+ if (plan.conflicts.length)
195
+ lines.push(" Manually resolve every ownership conflict listed above before reconciling.");
196
+ }
197
+ else if (options.confirmationCommand) {
190
198
  lines.push("", "Apply:", ` ${options.confirmationCommand}`);
199
+ }
191
200
  }
192
201
  return `${lines.join("\n")}\n`;
193
202
  }
package/dist/cli.js CHANGED
@@ -100,6 +100,14 @@ function help() {
100
100
  async function interactiveInstallerSelection() {
101
101
  if (!process.stdin.isTTY || !process.stderr.isTTY)
102
102
  throw new InstallerError("terminal_required", "install requires explicit selection flags outside a terminal");
103
+ process.stderr.write([
104
+ "Portable skills are installed separately through npx skills.",
105
+ "This installer does not install, update, or remove portable skills.",
106
+ "Skill command adapters are OpenCode slash commands that load an already-installed skill with the same name.",
107
+ "Package command adapters invoke package tools.",
108
+ "Selecting a command adapter does not select or install its skill.",
109
+ "\n",
110
+ ].join("\n"));
103
111
  const group = async (label, names, initial) => {
104
112
  const choices = ["Select all", "Select none", ...names];
105
113
  const selected = await selectOption(label, choices, process.stdin, process.stderr, initial);
@@ -112,8 +120,8 @@ async function interactiveInstallerSelection() {
112
120
  return [names[selected - 2]];
113
121
  };
114
122
  const commands = [
115
- ...(await group("Skill commands", SKILL_COMMANDS, 0)),
116
- ...(await group("Package commands", PACKAGE_COMMANDS, 0)),
123
+ ...(await group("Skill command adapters", SKILL_COMMANDS, 0)),
124
+ ...(await group("Package command adapters", PACKAGE_COMMANDS, 0)),
117
125
  ];
118
126
  const agents = await group("Fixed agents", defaultSelection().agents, 0);
119
127
  const plugins = await group("Selectable plugins (none selected by default)", SELECTABLE_PLUGINS, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kisev/skills-opencode",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "OpenCode integration and opt-in installer for portable Agent Skills.",
5
5
  "license": "MIT",
6
6
  "repository": {